VPanelV.st
author Claus Gittinger <cg@exept.de>
Sat, 06 Mar 1999 04:04:04 +0100
changeset 1764 45ca6b617934
parent 1431 fd1e74d673ae
permissions -rw-r--r--
checkin from browser
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     1
"
5
claus
parents: 3
diff changeset
     2
 COPYRIGHT (c) 1989 by Claus Gittinger
59
450ce95a72a4 *** empty log message ***
claus
parents: 38
diff changeset
     3
	      All Rights Reserved
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     4
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    11
"
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    12
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    13
PanelView subclass:#VerticalPanelView
321
00c17944cb00 preferredExtent computation used hSpace instead of vSpace
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    14
	instanceVariableNames:''
00c17944cb00 preferredExtent computation used hSpace instead of vSpace
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    15
	classVariableNames:''
00c17944cb00 preferredExtent computation used hSpace instead of vSpace
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    16
	poolDictionaries:''
00c17944cb00 preferredExtent computation used hSpace instead of vSpace
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    17
	category:'Views-Layout'
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    18
!
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    19
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 797
diff changeset
    20
!VerticalPanelView class methodsFor:'documentation'!
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
    21
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
    22
copyright
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
    23
"
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
    24
 COPYRIGHT (c) 1989 by Claus Gittinger
59
450ce95a72a4 *** empty log message ***
claus
parents: 38
diff changeset
    25
	      All Rights Reserved
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
    26
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
    27
 This software is furnished under a license and may be used
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
    28
 only in accordance with the terms of that license and with the
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
    29
 inclusion of the above copyright notice.   This software may not
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
    30
 be provided or otherwise made available to, or used by, any
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
    31
 other person.  No title to or ownership of the software is
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
    32
 hereby transferred.
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
    33
"
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
    34
!
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
    35
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
    36
documentation
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
    37
"
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
    38
    a View which arranges its child-views in a vertical column.
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
    39
    All real work is done in PanelView - except the layout computation is
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
    40
    redefined here.
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
    41
127
claus
parents: 125
diff changeset
    42
    The layout is controlled by the instance variables: 
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    43
	horizontalLayout and verticalLayout
127
claus
parents: 125
diff changeset
    44
    in addition to 
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    45
	horizontalSpace and verticalSpace.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
    46
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
    47
    The vertical layout can be any of:
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
    48
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    49
	#top            arrange elements at the top
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    50
	#topSpace       arrange elements at the top, start with spacing
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    51
	#bottom         arrange elements at the bottom
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    52
	#bottomSpace    arrange elements at the bottom, start with spacing
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    53
	#center         arrange elements in the center; ignore verticalSpace
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    54
	#spread         spread elements evenly; ignore verticalSpace
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    55
	#spreadSpace    spread elements evenly with spacing at ends; ignore verticalSpace
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    56
	#fit            like #spread, but resize elements for tight packing; ignore verticalSpace
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    57
	#fitSpace       like #fit, with spacing; ignore verticalSpace
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    58
	#topFit         like #top, but resize the last element to fit
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    59
	#topSpaceFit    like #topSpace, but resize the last element to fit
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    60
	#bottomFit      like #bottom, but resize the first element to fit
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    61
	#bottomSpaceFit like #bottomSpace, but resize the first element to fit
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
    62
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
    63
    the horizontal layout can be:
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
    64
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    65
	#left           place element at the left
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    66
	#leftSpace      place element at the left, offset by horizontalSpace
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    67
	#center         place elements horizontally centered; ignore horizontalSpace
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    68
	#right          place it at the right
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    69
	#rightSpace     place it at the right, offset by horizontalSpace
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    70
	#fit            resize elements horizontally to fit this panel; ignore horizontalSpace
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    71
	#fitSpace       like #fit, but add spacing; ignore horizontalSpace
127
claus
parents: 125
diff changeset
    72
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    73
	#leftMax        like #left, but resize elements to max of them
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    74
	#leftSpaceMax   like #leftSpace, but resize elements
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    75
	#centerMax      like #center, but resize elements
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    76
	#rightMax       like #right, but resize elements to max of them
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
    77
	#rightSpaceMax  like #rightSpace, but resize elements
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
    78
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
    79
    The defaults is #center for both directions.
127
claus
parents: 125
diff changeset
    80
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
    81
    The layout is changed by the messages #verticalLayout: and #horizontalLayout:.
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
    82
    For backward compatibility (to times, where only vLayout existed), the simple
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
    83
    #layout: does the same as #verticalLayout:. Do not use this old method.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
    84
127
claus
parents: 125
diff changeset
    85
    The panel assumes, that the elements do not resize themselfes, after it
claus
parents: 125
diff changeset
    86
    became visible. This is not true for all widgets (buttons or labels may
claus
parents: 125
diff changeset
    87
    like to change). If you have changing elements, tell this to the panel
claus
parents: 125
diff changeset
    88
    with 'aPanel elementsChangeSize:true'. In that case, the panel will react
claus
parents: 125
diff changeset
    89
    to size changes, and reorganize things.
claus
parents: 125
diff changeset
    90
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
    91
    If none of these layout/space combinations is exactly what you need in
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
    92
    your application, create a subclass, and redefine the setChildPositions method.
127
claus
parents: 125
diff changeset
    93
claus
parents: 125
diff changeset
    94
    CAVEAT: this class started with #top and no horizontal alignments;
claus
parents: 125
diff changeset
    95
    as time went by, more layouts were added and the setup should be changed
claus
parents: 125
diff changeset
    96
    to use different selectors for space, max-resize and alignment
claus
parents: 125
diff changeset
    97
    (i.e. having more and more layout symbols makes things a bit confusing ...)
585
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 380
diff changeset
    98
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 380
diff changeset
    99
    [see also:]
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   100
	HorizontalPanelView
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   101
	VariableVerticalPanel VariableHorizontalPanel
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   102
	Label
585
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 380
diff changeset
   103
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 380
diff changeset
   104
    [author:]
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   105
	Claus Gittinger
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
   106
"
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
   107
!
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
   108
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
   109
examples
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
   110
"
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   111
    These examples demonstrate the effect of different layout
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   112
    settings.
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   113
    You should try more examples, combining spacing and different
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   114
    verticalLayout:/horizontalLayout: combinations.
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   115
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   116
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
   117
    example: default layout (centered)
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   118
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   119
	|v p b1 b2 b3|
127
claus
parents: 125
diff changeset
   120
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   121
	v := StandardSystemView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   122
	v label:'center (default)'.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   123
	p := VerticalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   124
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   125
	b1 := Button label:'button1' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   126
	b2 := Button label:'b2' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   127
	b3 := Button label:'butt3' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   128
	v extent:100 @ 300.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   129
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   130
									[exEnd]
127
claus
parents: 125
diff changeset
   131
claus
parents: 125
diff changeset
   132
claus
parents: 125
diff changeset
   133
    example: horizontal centerMax
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   134
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   135
	|v p b1 b2 b3|
127
claus
parents: 125
diff changeset
   136
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   137
	v := StandardSystemView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   138
	v label:'hL=centerMax'.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   139
	p := VerticalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   140
	p horizontalLayout:#centerMax.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   141
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   142
	b1 := Button label:'button1' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   143
	b2 := Button label:'b2' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   144
	b3 := Button label:'butt3' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   145
	v extent:100 @ 300.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   146
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   147
									[exEnd]
127
claus
parents: 125
diff changeset
   148
claus
parents: 125
diff changeset
   149
claus
parents: 125
diff changeset
   150
    example: horizontal leftMax
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   151
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   152
	|v p b1 b2 b3|
127
claus
parents: 125
diff changeset
   153
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   154
	v := StandardSystemView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   155
	v label:'hL=leftMax'.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   156
	p := VerticalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   157
	p horizontalLayout:#leftMax.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   158
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   159
	b1 := Button label:'button1' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   160
	b2 := Button label:'b2' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   161
	b3 := Button label:'butt3' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   162
	v extent:100 @ 300.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   163
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   164
									[exEnd]
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
   165
127
claus
parents: 125
diff changeset
   166
    example: horizontal leftSpaceMax
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   167
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   168
	|v p b1 b2 b3|
127
claus
parents: 125
diff changeset
   169
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   170
	v := StandardSystemView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   171
	v label:'hL=leftMax'.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   172
	p := VerticalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   173
	p horizontalLayout:#leftSpaceMax.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   174
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   175
	b1 := Button label:'button1' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   176
	b2 := Button label:'b2' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   177
	b3 := Button label:'butt3' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   178
	v extent:100 @ 300.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   179
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   180
									[exEnd]
127
claus
parents: 125
diff changeset
   181
claus
parents: 125
diff changeset
   182
    example: horizontal rightMax
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   183
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   184
	|v p b1 b2 b3|
127
claus
parents: 125
diff changeset
   185
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   186
	v := StandardSystemView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   187
	v label:'hL=rightMax'.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   188
	p := VerticalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   189
	p horizontalLayout:#rightMax.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   190
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   191
	b1 := Button label:'button1' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   192
	b2 := Button label:'b2' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   193
	b3 := Button label:'butt3' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   194
	v extent:100 @ 300.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   195
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   196
									[exEnd]
127
claus
parents: 125
diff changeset
   197
claus
parents: 125
diff changeset
   198
    example: horizontal rightSpaceMax
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   199
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   200
	|v p b1 b2 b3|
127
claus
parents: 125
diff changeset
   201
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   202
	v := StandardSystemView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   203
	v label:'hL=rightMaxSpace'.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   204
	p := VerticalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   205
	p horizontalLayout:#rightSpaceMax.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   206
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   207
	b1 := Button label:'button1' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   208
	b2 := Button label:'b2' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   209
	b3 := Button label:'butt3' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   210
	v extent:100 @ 300.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   211
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   212
									[exEnd]
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   213
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
   214
    example: top-layout
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   215
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   216
	|v p b1 b2 b3|
127
claus
parents: 125
diff changeset
   217
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   218
	v := StandardSystemView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   219
	v label:'vL=top; hL=center (default)'.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   220
	p := VerticalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   221
	p verticalLayout:#top.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   222
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   223
	b1 := Button label:'button1' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   224
	b2 := Button label:'butt2' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   225
	b3 := Button label:'button3' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   226
	v extent:100 @ 300.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   227
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   228
									[exEnd]
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
   229
127
claus
parents: 125
diff changeset
   230
    example: topSpace-layout
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   231
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   232
	|v p b1 b2 b3|
127
claus
parents: 125
diff changeset
   233
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   234
	v := StandardSystemView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   235
	v label:'vL=topSpace; hL=center (default)'.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   236
	p := VerticalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   237
	p verticalLayout:#topSpace.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   238
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   239
	b1 := Button label:'button1' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   240
	b2 := Button label:'butt2' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   241
	b3 := Button label:'button3' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   242
	v extent:100 @ 300.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   243
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   244
									[exEnd]
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
   245
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   246
    example: top-layout; horizontal fit
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   247
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   248
	|v p b1 b2 b3|
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   249
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   250
	v := StandardSystemView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   251
	p := VerticalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   252
	v label:'vL=top; hL=fit'.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   253
	p verticalLayout:#top.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   254
	p horizontalLayout:#fit.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   255
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   256
	b1 := Button label:'button1' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   257
	b2 := Button label:'butt2' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   258
	b3 := Button label:'button3' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   259
	v extent:100 @ 300.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   260
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   261
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   262
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   263
    example: top-layout; horizontal fit with space
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   264
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   265
	|v p b1 b2 b3|
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   266
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   267
	v := StandardSystemView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   268
	v label:'vL=top; hL=fitSpace'.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   269
	p := VerticalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   270
	p verticalLayout:#top.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   271
	p horizontalLayout:#fitSpace.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   272
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   273
	b1 := Button label:'button1' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   274
	b2 := Button label:'butt2' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   275
	b3 := Button label:'button3' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   276
	v extent:100 @ 300.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   277
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   278
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   279
127
claus
parents: 125
diff changeset
   280
    example: topSpace-layout; horizontal fit with space
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   281
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   282
	|v p b1 b2 b3|
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   283
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   284
	v := StandardSystemView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   285
	v label:'vL=topSpace; hL=fitSpace'.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   286
	p := VerticalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   287
	p verticalLayout:#topSpace.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   288
	p horizontalLayout:#fitSpace.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   289
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   290
	b1 := Button label:'button1' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   291
	b2 := Button label:'butt2' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   292
	b3 := Button label:'button3' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   293
	v extent:100 @ 300.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   294
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   295
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   296
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
   297
    example: bottom-layout
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   298
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   299
	|v p b1 b2 b3|
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   300
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   301
	v := StandardSystemView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   302
	v label:'vL=bottom; hL=center (default)'.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   303
	p := VerticalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   304
	p verticalLayout:#bottom.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   305
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   306
	b1 := Button label:'button1' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   307
	b2 := Button label:'butt2' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   308
	b3 := Button label:'button3' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   309
	v extent:100 @ 300.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   310
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   311
									[exEnd]
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
   312
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   313
    example: bottomSpace-layout
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   314
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   315
	|v p b1 b2 b3|
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   316
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   317
	v := StandardSystemView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   318
	v label:'vL=bottomSpace; hL=center (default)'.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   319
	p := VerticalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   320
	p verticalLayout:#bottomSpace.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   321
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   322
	b1 := Button label:'button1' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   323
	b2 := Button label:'butt2' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   324
	b3 := Button label:'button3' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   325
	v extent:100 @ 300.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   326
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   327
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   328
133
claus
parents: 131
diff changeset
   329
    example: topFit-layout
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   330
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   331
	|v p b1 b2 b3|
133
claus
parents: 131
diff changeset
   332
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   333
	v := StandardSystemView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   334
	v label:'vL=topFit; hL=center (default)'.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   335
	p := VerticalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   336
	p verticalLayout:#topFit.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   337
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   338
	b1 := Button label:'button1' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   339
	b2 := Button label:'butt2' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   340
	b3 := Button label:'button3' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   341
	v extent:100 @ 300.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   342
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   343
									[exEnd]
133
claus
parents: 131
diff changeset
   344
claus
parents: 131
diff changeset
   345
    example: topSpaceFit-layout; combined with horizontal #fitSpace
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   346
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   347
	|v p b1 b2 b3|
133
claus
parents: 131
diff changeset
   348
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   349
	v := StandardSystemView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   350
	v label:'vL=topFit; hL=center (default)'.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   351
	p := VerticalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   352
	p verticalLayout:#topSpaceFit.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   353
	p horizontalLayout:#fitSpace.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   354
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   355
	b1 := Button label:'button1' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   356
	b2 := Button label:'butt2' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   357
	b3 := Button label:'button3' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   358
	v extent:100 @ 300.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   359
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   360
									[exEnd]
133
claus
parents: 131
diff changeset
   361
1307
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   362
    example: bottomFit-layout (arrange at bottom; resize first to fit)
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   363
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   364
	|v p b1 b2 b3|
1307
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   365
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   366
	v := StandardSystemView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   367
	v label:'vL=bottomFit; hL=center (default)'.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   368
	p := VerticalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   369
	p verticalLayout:#bottomFit.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   370
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   371
	b1 := Button label:'button1' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   372
	b2 := Button label:'butt2' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   373
	b3 := Button label:'button3' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   374
	v extent:100 @ 300.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   375
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   376
									[exEnd]
1307
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   377
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   378
    example: bottomSpaceFit-layout (arrange at bottom; resize first to fit; with spacing
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   379
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   380
	|v p b1 b2 b3|
1307
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   381
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   382
	v := StandardSystemView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   383
	v label:'vL=bottomSpaceFit; hL=center (default)'.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   384
	p := VerticalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   385
	p verticalLayout:#bottomSpaceFit.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   386
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   387
	b1 := Button label:'button1' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   388
	b2 := Button label:'butt2' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   389
	b3 := Button label:'button3' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   390
	v extent:100 @ 300.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   391
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   392
									[exEnd]
1307
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   393
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
   394
    example: spread-layout
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   395
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   396
	|v p b1 b2 b3|
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
   397
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   398
	v := StandardSystemView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   399
	v label:'vL=spread; hL=center (default)'.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   400
	p := VerticalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   401
	p verticalLayout:#spread.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   402
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   403
	b1 := Button label:'button1' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   404
	b2 := Button label:'butt2' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   405
	b3 := Button label:'button3' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   406
	v extent:100 @ 300.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   407
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   408
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   409
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   410
    example: spreadSpace-layout
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   411
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   412
	|v p b1 b2 b3|
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   413
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   414
	v := StandardSystemView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   415
	v label:'vL=spreadSpace; hL=center (default)'.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   416
	p := VerticalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   417
	p verticalLayout:#spreadSpace.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   418
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   419
	b1 := Button label:'button1' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   420
	b2 := Button label:'butt2' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   421
	b3 := Button label:'button3' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   422
	v extent:100 @ 300.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   423
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   424
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   425
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   426
    example: fit-layout
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   427
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   428
	|v p b1 b2 b3|
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   429
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   430
	v := StandardSystemView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   431
	v label:'vL=fit; hL=center (default)'.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   432
	p := VerticalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   433
	p verticalLayout:#fit.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   434
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   435
	b1 := Button label:'button1' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   436
	b2 := Button label:'butt2' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   437
	b3 := Button label:'button3' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   438
	v extent:100 @ 300.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   439
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   440
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   441
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   442
    example: fitSpace-layout
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   443
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   444
	|v p b1 b2 b3|
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   445
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   446
	v := StandardSystemView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   447
	v label:'vL=fitSpace; hL=center (default)'.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   448
	p := VerticalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   449
	p verticalLayout:#fitSpace.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   450
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   451
	b1 := Button label:'button1' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   452
	b2 := Button label:'butt2' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   453
	b3 := Button label:'button3' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   454
	v extent:100 @ 300.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   455
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   456
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   457
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   458
    example: fully fitSpace
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   459
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   460
	|v p b1 b2 b3|
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   461
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   462
	v := StandardSystemView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   463
	v label:'vL=fitSpace; hL=fitSpace'.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   464
	p := VerticalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   465
	p verticalLayout:#fitSpace.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   466
	p horizontalLayout:#fitSpace.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   467
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   468
	b1 := Button label:'button1' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   469
	b2 := Button label:'butt2' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   470
	b3 := Button label:'button3' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   471
	v extent:100 @ 300.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   472
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   473
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   474
131
claus
parents: 130
diff changeset
   475
    example: combine fully fitSpace with scaling button labels
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   476
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   477
	|v p b1 b2 b3|
131
claus
parents: 130
diff changeset
   478
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   479
	v := StandardSystemView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   480
	v label:'vL=fitSpace; hL=fitSpace'.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   481
	p := VerticalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   482
	p verticalLayout:#fitSpace.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   483
	p horizontalLayout:#fitSpace.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   484
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   485
	b1 := Button label:'button1' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   486
	b1 adjust:#fit.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   487
	b2 := Button label:'butt2' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   488
	b2 adjust:#fit.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   489
	b3 := Button label:'button3' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   490
	b3 adjust:#fit.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   491
	v extent:100 @ 300.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   492
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   493
									[exEnd]
131
claus
parents: 130
diff changeset
   494
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
   495
    example: from top, each at left:
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   496
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   497
	|v p b1 b2 b3|
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
   498
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   499
	v := StandardSystemView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   500
	v label:'vL=top; hL=left'.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   501
	p := VerticalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   502
	p verticalLayout:#top.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   503
	p horizontalLayout:#left.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   504
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   505
	b1 := Button label:'button1' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   506
	b2 := Button label:'butt2' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   507
	b3 := Button label:'button3' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   508
	v extent:100 @ 300.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   509
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   510
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   511
127
claus
parents: 125
diff changeset
   512
    example: center, right:
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   513
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   514
	|v p b1 b2 b3|
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
   515
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   516
	v := StandardSystemView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   517
	v label:'vL=center; hL=right'.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   518
	p := VerticalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   519
	p verticalLayout:#center.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   520
	p horizontalLayout:#right.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   521
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   522
	b1 := Button label:'button1' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   523
	b2 := Button label:'butt2' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   524
	b3 := Button label:'button3' in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   525
	v extent:100 @ 300.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   526
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   527
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   528
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   529
    example: a panel in a panel
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   530
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   531
	|v hp p b1 b2 b3|
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   532
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   533
	v := StandardSystemView new.
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
   534
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   535
	hp := HorizontalPanelView in:v.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   536
	hp verticalLayout:#fit.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   537
	hp horizontalLayout:#fitSpace.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   538
	hp origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
   539
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   540
	1 to:3 do:[:i |
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   541
	    p := VerticalPanelView in:hp.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   542
	    p borderWidth:0.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   543
	    p verticalLayout:#fitSpace.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   544
	    p horizontalLayout:#fit.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   545
	    b1 := Button label:('button1-' , i printString) in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   546
	    b2 := Button label:('butt2-' , i printString) in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   547
	    b3 := Button label:('button3-' , i printString) in:p.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   548
	].
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
   549
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   550
	v extent:300 @ 100.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   551
	v open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   552
									[exEnd]
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   553
125
claus
parents: 77
diff changeset
   554
    example: checkToggles in a panel
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   555
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   556
	|panel|
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
   557
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   558
	panel := VerticalPanelView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   559
	panel horizontalLayout:#left.
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
   560
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   561
	panel add:((CheckBox on:true asValue) label:'this is toggle number 1'; resize).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   562
	panel add:((CheckBox on:false asValue) label:'nr 2 '; resize).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   563
	panel add:((CheckBox on:true asValue) label:'number 3 '; resize).
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   564
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   565
	panel extent:(panel preferredExtent).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   566
	panel open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   567
									[exEnd]
1307
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   568
    example: the topFit & bottomFit layouts are great to combine
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   569
	     labels or enterFields with a selectionInList or textView:
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   570
									[exBegin]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   571
	|panel|
1307
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   572
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   573
	panel := VerticalPanelView new.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   574
	panel horizontalLayout:#fit.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   575
	panel verticalLayout:#topFit.
1307
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   576
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   577
	panel add:(Label new label:'this is label number 1'; font:(Font family:'courier' size:16)).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   578
	panel add:(EditField new).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   579
	panel add:(Label new label:'this is label number 1').
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   580
	panel add:(ScrollableView for:SelectionInListView).
1307
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   581
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   582
	panel extent:(panel preferredExtent).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   583
	panel open
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   584
									[exEnd]
125
claus
parents: 77
diff changeset
   585
"
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   586
! !
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   587
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   588
!VerticalPanelView methodsFor:'accessing'!
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   589
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   590
horizontalLayout
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   591
    "return the horizontal layout as symbol.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   592
     the returned value is one of
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   593
	#left           place element at the left
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   594
	#leftSpace      place element at the left, offset by horizontalSpace
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   595
	#center         place elements horizontally centered; ignore horizontalSpace
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   596
	#right          place it at the right
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   597
	#rightSpace     place it at the right, offset by horizontalSpace
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   598
	#fit            resize elements horizontally to fit this panel; ignore horizontalSpace
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   599
	#fitSpace       like #fit, but add spacing; ignore horizontalSpace
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   600
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   601
	#leftMax        like #left, but resize elements to max of them
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   602
	#leftSpaceMax   like #leftSpace, but resize elements
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   603
	#centerMax      like #center, but resize elements
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   604
	#rightMax       like #right, but resize elements to max of them
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   605
	#rightSpaceMax  like #rightSpace, but resize elements
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   606
      the default is #centered
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   607
    "
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   608
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   609
    ^ hLayout
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   610
!
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   611
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   612
horizontalLayout:aSymbol
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   613
    "change the horizontal layout as symbol.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   614
     The argument, aSymbol must be one of:
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   615
	#left           place element at the left
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   616
	#leftSpace      place element at the left, offset by horizontalSpace
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   617
	#center         place elements horizontally centered; ignore horizontalSpace
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   618
	#right          place it at the right
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   619
	#rightSpace     place it at the right, offset by horizontalSpace
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   620
	#fit            resize elements horizontally to fit this panel; ignore horizontalSpace
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   621
	#fitSpace       like #fit, but add spacing; ignore horizontalSpace
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   622
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   623
	#leftMax        like #left, but resize elements to max of them
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   624
	#leftSpaceMax   like #leftSpace, but resize elements
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   625
	#centerMax      like #center, but resize elements
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   626
	#rightMax       like #right, but resize elements to max of them
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   627
	#rightSpaceMax  like #rightSpace, but resize elements
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   628
      the default (if never changed) is #centered
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   629
    "
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   630
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   631
    (hLayout ~~ aSymbol) ifTrue:[
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   632
	hLayout := aSymbol.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   633
	self layoutChanged
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   634
    ]
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   635
!
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   636
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   637
layout:something
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   638
    "OBSOLETE compatibility interface. Will vanish.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   639
     leftover for historic reasons - do not use any more.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   640
     In the meantime, try to figure out what is meant ... a kludge"
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   641
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   642
    something isLayout ifTrue:[^ super layout:something].
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   643
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   644
    self obsoleteMethodWarning:'use #verticalLayout:'.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   645
    ^ self verticalLayout:something
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   646
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   647
    "Modified: 31.8.1995 / 23:08:54 / claus"
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   648
!
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   649
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   650
verticalLayout
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   651
    "return the vertical layout as a symbol.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   652
     the returned value is one of
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   653
	#top            arrange elements at the top
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   654
	#topSpace       arrange elements at the top, start with spacing
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   655
	#bottom         arrange elements at the bottom
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   656
	#bottomSpace    arrange elements at the bottom, start with spacing
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   657
	#center         arrange elements in the center; ignore verticalSpace
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   658
	#spread         spread elements evenly; ignore verticalSpace
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   659
	#spreadSpace    spread elements evenly with spacing at ends; ignore verticalSpace
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   660
	#fit            like #spread, but resize elements for tight packing; ignore verticalSpace
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   661
	#fitSpace       like #fit, with spacing; ignore verticalSpace
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   662
	#topFit         like #top, but resize the last element to fit
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   663
	#topSpaceFit    like #topSpace, but resize the last element to fit
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   664
	#bottomFit      like #bottom, but resize the first element to fit
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   665
	#bottomSpaceFit like #bottomSpace, but extend the first element to fit
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   666
      the default is #centered
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   667
    "
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   668
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   669
    ^ vLayout
1307
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   670
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   671
    "Modified: 17.8.1997 / 15:20:13 / cg"
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   672
!
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   673
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   674
verticalLayout:aSymbol
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   675
    "change the vertical layout as a symbol.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   676
     The argument, aSymbol must be one of:
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   677
	#top            arrange elements at the top
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   678
	#topSpace       arrange elements at the top, start with spacing
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   679
	#bottom         arrange elements at the bottom
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   680
	#bottomSpace    arrange elements at the bottom, start with spacing
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   681
	#center         arrange elements in the center; ignore verticalSpace
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   682
	#spread         spread elements evenly; ignore verticalSpace
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   683
	#spreadSpace    spread elements evenly with spacing at ends; ignore verticalSpace
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   684
	#fit            like #spread, but resize elements for tight packing; ignore verticalSpace
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   685
	#fitSpace       like #fit, with spacing; ignore verticalSpace
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   686
	#topFit         like #top, but resize the last element to fit
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   687
	#topSpaceFit    like #topSpace, but resize the last element to fit
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   688
	#bottomFit      like #bottom, but resize the first element to fit
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   689
	#bottomSpaceFit like #bottomSpace, but extend the first element to fit
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   690
      the default (if never changed) is #centered
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   691
    "
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   692
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   693
    (vLayout ~~ aSymbol) ifTrue:[
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   694
	vLayout := aSymbol.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   695
	self layoutChanged
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   696
    ]
1307
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   697
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   698
    "Modified: 17.8.1997 / 15:19:58 / cg"
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   699
! !
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   700
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   701
!VerticalPanelView methodsFor:'layout'!
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   702
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   703
setChildPositions
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   704
    "(re)compute position of every child"
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   705
1307
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   706
    |ypos space sumOfHeights numChilds l hEach hInside hL vL
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   707
     maxWidth maxHeight resizeToMaxV resizeToMaxH m2 subViews ext restHeight|
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   708
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   709
    subViews := self subViewsToConsider.
1042
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1038
diff changeset
   710
    subViews size == 0 ifTrue:[^ self].
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1038
diff changeset
   711
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1038
diff changeset
   712
    extentChanged ifTrue:[
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   713
        ext := self computeExtent.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   714
        width := ext x.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   715
        height := ext y.
1042
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1038
diff changeset
   716
    ].
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   717
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   718
    space := verticalSpace.
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
   719
    numChilds := subViews size.
1307
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   720
380
6eb402d01ae0 looks better if panels level is ~~ 0 AND subview has 0 level
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   721
    m2 := margin * 2.
6eb402d01ae0 looks better if panels level is ~~ 0 AND subview has 0 level
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   722
    hInside := height - m2 + (borderWidth*2) - subViews last borderWidth.
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   723
1307
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   724
    hL := hLayout.
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   725
    vL := vLayout.
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   726
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   727
    resizeToMaxV := false.
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   728
    (vL endsWith:'Max') ifTrue:[
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   729
        resizeToMaxV := true.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   730
        hEach := maxHeight := subViews inject:0 into:[:maxSoFar :child | maxSoFar max:child heightIncludingBorder].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   731
        vL := (vL copyWithoutLast:3) asSymbol.
1307
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   732
    ].
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   733
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   734
    numChilds == 1 ifTrue:[
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   735
        (vL == #topFit or:[vL == #bottomFit]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   736
            vL := #fit
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   737
        ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   738
        (vL == #topSpaceFit or:[vL == #bottomSpaceFit]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   739
            vL := #fitSpace
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   740
        ].
1307
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   741
    ].
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   742
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   743
    vL == #fitSpace ifTrue:[
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   744
        "
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   745
         adjust childs extents and set origins.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   746
         Be careful to avoid accumulation of rounding errors
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   747
        "
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   748
        hEach := (hInside - (numChilds + 1 * space)) / numChilds.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   749
        ypos := space + margin - borderWidth.
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
   750
    ] ifFalse:[
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   751
        vL == #fit ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   752
            "
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   753
             adjust childs extents and set origins.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   754
             Be careful to avoid accumulation of rounding errors
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   755
            "
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   756
            hEach := (hInside - (numChilds - 1 * space)) / numChilds.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   757
            ypos := margin - borderWidth.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   758
        ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   759
            l := vL.
1307
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   760
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   761
            "/ adjust - do not include height of last(first) element if doing a fit
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   762
            (vL == #topFit or:[vL == #topSpaceFit]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   763
                subViews last height:0.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   764
            ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   765
            (vL == #bottomFit or:[vL == #bottomSpaceFit]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   766
                subViews first height:0.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   767
            ].
1307
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   768
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   769
            "
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   770
             compute net height needed
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   771
            "
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   772
            resizeToMaxV ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   773
                sumOfHeights := subViews inject:0 into:[:sumSoFar :child | sumSoFar + maxHeight + (child borderWidth*2)].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   774
            ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   775
                sumOfHeights := subViews inject:0 into:[:sumSoFar :child | sumSoFar + child heightIncludingBorder].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   776
            ].
1307
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   777
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   778
            restHeight := height - sumOfHeights.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   779
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   780
            ((l == #center) and:[numChilds == 1]) ifTrue:[l := #spread].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   781
            (l == #spread and:[numChilds == 1]) ifTrue:[l := #spreadSpace].
59
450ce95a72a4 *** empty log message ***
claus
parents: 38
diff changeset
   782
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   783
            "
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   784
             compute position of topmost subview and space between them;
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   785
             if they do hardly fit, leave no space between them 
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   786
            "
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   787
            ((sumOfHeights >= (height - m2))
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   788
            and:[l ~~ #fixTopSpace and:[l ~~ #fixTop]]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   789
                "
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   790
                 if we have not enough space for all the elements, 
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   791
                 fill them tight, and show what can be shown (at least)
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   792
                "
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   793
                ypos := margin.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   794
                space := 0
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   795
            ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   796
                l == #fixTopSpace ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   797
                    l := #topSpace
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   798
                ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   799
                    l == #fixTop ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   800
                        l := #top 
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   801
                    ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   802
                ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   803
                ((l == #bottom) or:[l == #bottomSpace
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   804
                or:[l == #bottomFit or:[l == #bottomSpaceFit]]]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   805
                    ypos := restHeight - (space * (numChilds - 1)).
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   806
"/
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   807
"/                    borderWidth == 0 ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   808
"/                        ypos := ypos + space 
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   809
"/                    ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   810
"/           
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   811
                    (l == #bottomSpace
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   812
                    or:[l == #bottomSpaceFit]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   813
                        ypos >= space ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   814
                            ypos := ypos - space
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   815
                        ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   816
                    ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   817
                    ypos := ypos - margin.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   818
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   819
                    ypos < 0 ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   820
                        space := space min:(restHeight // (numChilds + 1)).
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   821
                        ypos := restHeight - (space * numChilds).
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   822
                    ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   823
                ] ifFalse: [
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   824
                    (l == #spread) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   825
                        space := (restHeight - m2) // (numChilds - 1).
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   826
                        ypos := margin.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   827
                        (space == 0) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   828
                            ypos := restHeight // 2
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   829
                        ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   830
                    ] ifFalse: [
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   831
                      (l == #spreadSpace) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   832
                        space := (restHeight - m2) // (numChilds + 1).
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   833
                        ypos := space + margin.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   834
                        (space == 0) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   835
                            ypos := restHeight // 2
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   836
                        ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   837
                      ] ifFalse: [
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   838
                        ((l == #top) or:[l == #topSpace
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   839
                        or:[l == #topFit or:[l == #topSpaceFit]]]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   840
                            space := space min:(restHeight - m2) // (numChilds + 1).
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   841
                            (vL == #fixTop or:[vL == #fixTopSpace]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   842
                                space := space max:verticalSpace.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   843
                            ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   844
                                space := space max:0.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   845
                            ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   846
                            (l == #topSpace or:[l == #topSpaceFit]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   847
                                ypos := space + margin.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   848
                            ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   849
                                "/
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   850
                                "/ if the very first view has a 0-level AND
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   851
                                "/ my level is non-zero, begin with margin
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   852
                                "/
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   853
                                true "(margin ~~ 0 and:[subViews first level == 0])" ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   854
                                    ypos := margin
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   855
                                ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   856
                                    ypos := 0
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   857
                                ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   858
                            ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   859
                        ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   860
                            "center"
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   861
                            ypos := (restHeight - ((numChilds - 1) * space)) // 2.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   862
                            ypos < 0 ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   863
                                space := restHeight // (numChilds + 1).
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   864
                                ypos := (restHeight - ((numChilds - 1) * space)) // 2.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   865
                            ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   866
                        ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   867
                      ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   868
                    ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   869
                ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   870
            ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   871
        ].
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
   872
    ].
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
   873
1307
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   874
    resizeToMaxH := false.
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   875
    (hL endsWith:'Max') ifTrue:[
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   876
        resizeToMaxH := true.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   877
        maxWidth := subViews inject:0 into:[:maxSoFar :child | maxSoFar max:child widthIncludingBorder].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   878
        hL := (hL copyWithoutLast:3) asSymbol.
127
claus
parents: 125
diff changeset
   879
    ].
claus
parents: 125
diff changeset
   880
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
   881
    "
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
   882
     now set positions
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
   883
    "
133
claus
parents: 131
diff changeset
   884
    subViews keysAndValuesDo:[:index :child |
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   885
        |xpos advance bwChild wChild newWChild x2|
125
claus
parents: 77
diff changeset
   886
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   887
        wChild := child widthIncludingBorder.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   888
        bwChild := child borderWidth.
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
   889
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   890
        resizeToMaxH ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   891
            child width:(wChild := maxWidth - (bwChild  * 2)).
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   892
        ].
127
claus
parents: 125
diff changeset
   893
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   894
        hL == #left ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   895
            xpos := 0 - borderWidth + margin.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   896
        ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   897
            hL == #leftSpace ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   898
                xpos := horizontalSpace + margin
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   899
            ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   900
                hL == #right ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   901
                    xpos := width - wChild - margin
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   902
                ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   903
                    hL == #rightSpace ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   904
                        xpos := width - horizontalSpace - wChild - margin.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   905
                    ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   906
                        hL == #fitSpace ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   907
                            xpos := horizontalSpace + margin.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   908
                            newWChild := width - m2 - (horizontalSpace + bwChild * 2)
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   909
                        ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   910
                            hL == #fit ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   911
                                newWChild := width "- (bwChild * 2)".
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   912
                                borderWidth == 0 ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   913
                                    newWChild :=  newWChild - (bwChild * 2)
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   914
                                ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   915
                                true "child level == 0" ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   916
                                    xpos := margin - borderWidth.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   917
                                    newWChild := newWChild - m2
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   918
                                ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   919
                                    xpos := 0 - borderWidth. 
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   920
                                ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   921
                            ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   922
                                "centered"
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   923
                                 xpos := margin + ((width - m2 - wChild) // 2).
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   924
                            ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   925
                        ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   926
                    ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   927
                ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   928
            ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   929
        ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   930
        newWChild notNil ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   931
            child width:newWChild
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   932
        ].
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
   933
793
12396da0e36e care for borderWidths
Claus Gittinger <cg@exept.de>
parents: 713
diff changeset
   934
"/        (xpos < 0) ifTrue:[ xpos := 0 ].
12396da0e36e care for borderWidths
Claus Gittinger <cg@exept.de>
parents: 713
diff changeset
   935
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   936
        x2 := xpos + (child widthIncludingBorder - 1).
380
6eb402d01ae0 looks better if panels level is ~~ 0 AND subview has 0 level
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   937
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   938
        (vL == #fit 
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   939
        or:[vL == #fitSpace
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   940
        or:[resizeToMaxV]]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   941
            child origin:(xpos @ ypos rounded)
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   942
                  corner:(x2 @ (ypos + hEach - bwChild - 1) rounded).
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   943
            advance := hEach
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   944
        ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   945
            child origin:(xpos@ypos).
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   946
            advance := child heightIncludingBorder
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   947
        ].
133
claus
parents: 131
diff changeset
   948
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   949
        index == numChilds ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   950
            |y|
133
claus
parents: 131
diff changeset
   951
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   952
            (vL == #topFit or:[vL == #topSpaceFit]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   953
                y := height - margin - 1.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   954
                vL == #topSpaceFit ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   955
                    y := y - space
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   956
                ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   957
                child corner:x2 @ y
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   958
            ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   959
        ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   960
        index == 1 ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   961
            |y yB|
1307
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   962
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   963
            (vL == #bottomFit or:[vL == #bottomSpaceFit]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   964
                y := margin + 0 + (child borderWidth * 2) - borderWidth.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   965
                vL == #bottomSpaceFit ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   966
                    y := y + space
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   967
                ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   968
                yB := child corner y.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   969
                child origin:((child origin x) @ y)
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   970
                      corner:((child corner x) @ yB)
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   971
            ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   972
        ].
1307
f2ce08878d5e added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   973
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   974
        ypos := ypos + advance + space.
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   975
    ]
155
claus
parents: 133
diff changeset
   976
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   977
    "Modified: / 4.9.1995 / 18:43:29 / claus"
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
   978
    "Modified: / 27.1.1998 / 21:14:32 / cg"
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   979
! !
125
claus
parents: 77
diff changeset
   980
claus
parents: 77
diff changeset
   981
!VerticalPanelView methodsFor:'queries'!
claus
parents: 77
diff changeset
   982
130
claus
parents: 127
diff changeset
   983
preferredExtent
125
claus
parents: 77
diff changeset
   984
    "return a good extent, one that makes subviews fit"
claus
parents: 77
diff changeset
   985
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 797
diff changeset
   986
    |sumOfHeights maxWidth maxHeight m2 subViews|
125
claus
parents: 77
diff changeset
   987
797
2f9cd56f48ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
   988
    "/ If I have an explicit preferredExtent ..
2f9cd56f48ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
   989
713
0c38ad51016d care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   990
    preferredExtent notNil ifTrue:[
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   991
	^ preferredExtent
713
0c38ad51016d care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   992
    ].
0c38ad51016d care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   993
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   994
    subViews := self subViewsToConsider.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   995
    (subViews size == 0) ifTrue:[
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   996
	^ super preferredExtent.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   997
	"/ ^ horizontalSpace @ verticalSpace].
1038
c6d8eb89d260 useful preferredExtent if no subviews.
ca
parents: 1000
diff changeset
   998
    ].
c6d8eb89d260 useful preferredExtent if no subviews.
ca
parents: 1000
diff changeset
   999
125
claus
parents: 77
diff changeset
  1000
claus
parents: 77
diff changeset
  1001
    "compute net height needed"
claus
parents: 77
diff changeset
  1002
claus
parents: 77
diff changeset
  1003
    sumOfHeights := 0.
claus
parents: 77
diff changeset
  1004
    maxWidth := 0.
claus
parents: 77
diff changeset
  1005
    maxHeight := 0.
claus
parents: 77
diff changeset
  1006
claus
parents: 77
diff changeset
  1007
    subViews do:[:child |
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
  1008
	|childsPreference|
125
claus
parents: 77
diff changeset
  1009
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
  1010
	childsPreference := child preferredExtent.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
  1011
	sumOfHeights := sumOfHeights + childsPreference y.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
  1012
	maxHeight := maxHeight max:childsPreference y.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
  1013
	maxWidth := maxWidth max:childsPreference x.
125
claus
parents: 77
diff changeset
  1014
claus
parents: 77
diff changeset
  1015
"/        sumOfHeights := sumOfHeights + child heightIncludingBorder.
claus
parents: 77
diff changeset
  1016
"/        maxWidth := maxWidth max:(child widthIncludingBorder).
claus
parents: 77
diff changeset
  1017
"/        maxHeight := maxHeight max:(child heightIncludingBorder).
claus
parents: 77
diff changeset
  1018
    ].
321
00c17944cb00 preferredExtent computation used hSpace instead of vSpace
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1019
125
claus
parents: 77
diff changeset
  1020
    borderWidth ~~ 0 ifTrue:[
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
  1021
	sumOfHeights := sumOfHeights + (verticalSpace * 2).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
  1022
	maxWidth := maxWidth + (horizontalSpace * 2).
125
claus
parents: 77
diff changeset
  1023
    ].
321
00c17944cb00 preferredExtent computation used hSpace instead of vSpace
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1024
125
claus
parents: 77
diff changeset
  1025
    (vLayout == #fit or:[vLayout == #fitSpace]) ifTrue:[
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
  1026
	sumOfHeights := maxHeight * subViews size.
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
  1027
	borderWidth ~~ 0 ifTrue:[
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
  1028
	    sumOfHeights := sumOfHeights + (verticalSpace * 2).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
  1029
	]
125
claus
parents: 77
diff changeset
  1030
    ] ifFalse:[
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
  1031
	sumOfHeights := sumOfHeights + ((subViews size - 1) * verticalSpace).
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
  1032
	((vLayout == #topSpace) or:[vLayout == #bottomSpace]) ifTrue:[
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
  1033
	    sumOfHeights := sumOfHeights + verticalSpace
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
  1034
	] ifFalse:[
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
  1035
	    ((vLayout == #center) or:[vLayout == #spread]) ifTrue:[
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
  1036
		sumOfHeights := sumOfHeights + (verticalSpace * 2)
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
  1037
	    ]
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
  1038
	].
125
claus
parents: 77
diff changeset
  1039
    ].
claus
parents: 77
diff changeset
  1040
claus
parents: 77
diff changeset
  1041
    ((hLayout == #leftSpace) or:[hLayout == #rightSpace]) ifTrue:[
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
  1042
	maxWidth := maxWidth + horizontalSpace
125
claus
parents: 77
diff changeset
  1043
    ] ifFalse:[
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
  1044
	((hLayout == #fitSpace) or:[hLayout == #center]) ifTrue:[
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
  1045
	    maxWidth := maxWidth + (horizontalSpace * 2)
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
  1046
	]        
125
claus
parents: 77
diff changeset
  1047
    ].
380
6eb402d01ae0 looks better if panels level is ~~ 0 AND subview has 0 level
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1048
    m2 := margin * 2.
6eb402d01ae0 looks better if panels level is ~~ 0 AND subview has 0 level
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
  1049
    ^ (maxWidth + m2) @ (sumOfHeights + m2)
321
00c17944cb00 preferredExtent computation used hSpace instead of vSpace
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1050
1417
e9dffd6767a6 added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
  1051
    "Modified: / 17.1.1998 / 00:18:16 / cg"
125
claus
parents: 77
diff changeset
  1052
! !
claus
parents: 77
diff changeset
  1053
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 797
diff changeset
  1054
!VerticalPanelView class methodsFor:'documentation'!
205
6814c0bf8df8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 202
diff changeset
  1055
6814c0bf8df8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 202
diff changeset
  1056
version
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1417
diff changeset
  1057
    ^ '$Header: /cvs/stx/stx/libwidg/Attic/VPanelV.st,v 1.34 1998-01-27 20:15:43 cg Exp $'
205
6814c0bf8df8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 202
diff changeset
  1058
! !