HorizontalPanelView.st
author tz
Fri, 03 Apr 1998 16:54:44 +0200
changeset 1477 2d4b6115e2c5
parent 1431 fd1e74d673ae
child 1747 d5be0d4cf7fc
permissions -rw-r--r--
redefine #defaultViewBackgroundColor for the spec class
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:#HorizontalPanelView
340
f820bcd29a51 defaultExtent with rightSpace forgot about spacing
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    14
	instanceVariableNames:''
f820bcd29a51 defaultExtent with rightSpace forgot about spacing
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    15
	classVariableNames:''
f820bcd29a51 defaultExtent with rightSpace forgot about spacing
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    16
	poolDictionaries:''
f820bcd29a51 defaultExtent with rightSpace forgot about spacing
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
!HorizontalPanelView 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 horizontal row.
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
    39
    All real work is done in PanelView - only the layout computation is
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
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
    42
    The layout is controlled the instance variables: 
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    43
	horizontalLayout and verticalLayout
127
claus
parents: 125
diff changeset
    44
    in addition to 
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    45
	horizontalSpace and verticalSpace.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
    46
133
claus
parents: 131
diff changeset
    47
    HorizontalSpace and verticalSpace control the spacing between elements;
claus
parents: 131
diff changeset
    48
    they default to some 1mm.
claus
parents: 131
diff changeset
    49
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
    50
    The horizontal layout can be any of:
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
    51
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    52
	#left           arrange elements at left
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    53
	#leftSpace      arrange elements at the left, start with spacing
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    54
	#fixLeft        same as #left, but do not reduce spacing in case of no fit
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    55
	#fixLeftSpace   same as #leftSpace, but do not reduce spacing in case of no fit
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    56
	#right          arrange elements at the right
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    57
	#rightSpace     arrange elements at the right, start with spacing
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    58
	#center         arrange elements in the center
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    59
	#spread         spread elements evenly
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    60
	#spreadSpace    spread elements evenly with spacing at the ends
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    61
	#fit            like #spread, but resize elements for tight packing
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    62
	#fitSpace       like #fit, with additional spacing at the far ends
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    63
	#leftFit        like #left, but extend the last (rightMost) element to the right
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    64
	#leftSpaceFit   like #leftSpace, but extend the last (rightMost) element to the right
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    65
	#rightFit       like #right, but extend the first (leftMost) element to the left
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    66
	#rightSpaceFit  like #rightSpace, but extend the first (leftMost) element to the left
133
claus
parents: 131
diff changeset
    67
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    68
	#leftMax        like corresponding non-Max layouts,
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    69
	#leftSpaceMax   but resize all components to width of widest components
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    70
	#rightMax
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    71
	#rightSpaceMax
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    72
	#centerMax
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    73
	#spreadMax
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    74
	#spreadSpaceMax
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
    75
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
    76
    the vertical layout can be:
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
    77
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    78
	#top            place element at the top
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    79
	#topSpace       place element at the top, offset by verticalSpace
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    80
	#center         place it horizontally centered
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    81
	#bottom         place it at the bottom
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    82
	#bottomSpace    place it at the bottom, offset by verticalSpace
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    83
	#fit            resize elements vertically to fit this panel
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    84
	#fitSpace       like #fit, but with spacing
133
claus
parents: 131
diff changeset
    85
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    86
	#topMax         like #top, but resize all views vertically to max height
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    87
	#topSpaceMax    like #topSpace, but resize all views vertically to max height
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    88
	#bottomMax      like #bottom, but resize all views vertically to max height
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    89
	#bottomSpaceMax like #bottomSpace, but resize all views vertically to max height
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
    90
	#centerMax      like #center, but resize all views vertically to max height
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
    91
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
    92
    The defaults is #center for both directions.
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
    93
    The layout is changed by the messages #verticalLayout: and #horizontalLayout:.
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
    94
    For backward compatibility (to times, where only hLayout existed), the simple
133
claus
parents: 131
diff changeset
    95
    #layout: does the same as #horizontalLayout:. 
1306
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
    96
    Do not use this old method; it will vanish and currently outputs a warning.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
    97
127
claus
parents: 125
diff changeset
    98
    The panel assumes, that the elements do not resize themselfes, after it
1306
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
    99
    became visible. This is not true for all widgets (buttons, labels or
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   100
    inputFields may like to change). 
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   101
    If you have changing elements, tell this to the panel
127
claus
parents: 125
diff changeset
   102
    with 'aPanel elementsChangeSize:true'. In that case, the panel will react
133
claus
parents: 131
diff changeset
   103
    to size changes of its elements, and reorganize things.
127
claus
parents: 125
diff changeset
   104
118
claus
parents: 77
diff changeset
   105
    By combining Horizontal- and VerticalPanels (i.e. place a hPanel into a
claus
parents: 77
diff changeset
   106
    vPanel), most layouts should be implementable.
133
claus
parents: 131
diff changeset
   107
    However, iff none of these layout/space combinations is exactly what you need 
118
claus
parents: 77
diff changeset
   108
    in your application, create a subclass, and redefine the setChildPositions 
claus
parents: 77
diff changeset
   109
    method there.
125
claus
parents: 118
diff changeset
   110
claus
parents: 118
diff changeset
   111
    TODO: for completeness, support #fixRight, #fixRightSpace,
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   112
	  #rightFit, #rightSpaceFit layouts
127
claus
parents: 125
diff changeset
   113
claus
parents: 125
diff changeset
   114
    CAVEAT: this class started with #left and no vertical alignments;
133
claus
parents: 131
diff changeset
   115
    as time went by, more layouts were added (by users requests)
1306
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   116
    and now, many layout combinations are possible.
133
claus
parents: 131
diff changeset
   117
    Reflecting this, the setup should be changed to use different selectors 
claus
parents: 131
diff changeset
   118
    for space-on/off, max-resize and alignment
127
claus
parents: 125
diff changeset
   119
    (i.e. having more and more layout symbols makes things a bit confusing ...)
585
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
   120
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
   121
    [see also:]
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   122
	VerticalPanelView
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   123
	VariableVerticalPanel VariableHorizontalPanel
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   124
	Label
585
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
   125
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
   126
    [author:]
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   127
	Claus Gittinger
585
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
   128
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
   129
    [author:]
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   130
	Claus Gittinger
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   131
"
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   132
!
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   133
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   134
examples
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   135
"
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   136
    These examples show the effect of various horizontalLayout and
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   137
    verticalLayout settings. Try them all. Especially, notice the
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   138
    differences between the xxx and xxxSpace layouts and the effect of
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   139
    setting different values for the spacing.
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   140
    Try resizing the view and see how the elements get rearranged.
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   141
1306
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   142
    Most of the examples below place 3 buttons onto a panel; 
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   143
    Of course, you can put any other view into a panel ... the last examples show this.
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   144
    (The fit layouts are especially useful to be used with SelectionInListViews;
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   145
     you can combine multiple labels & editFields with a selectionInListView, which
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   146
     is expanded to fill the remaining area of the view)
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   147
127
claus
parents: 125
diff changeset
   148
    example: default layout (center)
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   149
	centers components
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   150
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   151
	|v p b1 b2 b3|
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
   152
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   153
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   154
	v label:'default: center'.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   155
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   156
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   157
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   158
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   159
	b2 := Button label:'button2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   160
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   161
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   162
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   163
									[exEnd]
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
   164
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   165
133
claus
parents: 131
diff changeset
   166
    example: same (default center layout) with different sized elements
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   167
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   168
	|v p b1 b2 b3|
133
claus
parents: 131
diff changeset
   169
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   170
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   171
	v label:'default: center'.
133
claus
parents: 131
diff changeset
   172
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   173
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   174
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   175
	b1 := Button label:'but1' in:p. b1 font:(b1 font size:8).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   176
	b2 := Button label:'b2' in:p.      b2 font:(b1 font size:24).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   177
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   178
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   179
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   180
									[exEnd]
133
claus
parents: 131
diff changeset
   181
claus
parents: 131
diff changeset
   182
claus
parents: 131
diff changeset
   183
    example: horizontal default (center); vertical centerMax
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   184
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   185
	|v p b1 b2 b3|
133
claus
parents: 131
diff changeset
   186
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   187
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   188
	v label:'vL=centerMax'.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   189
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   190
	p verticalLayout:#centerMax.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   191
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   192
	b1 := Button label:'but1' in:p. b1 font:(b1 font size:8).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   193
	b2 := Button label:'b2' in:p.      b2 font:(b1 font size:24).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   194
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   195
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   196
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   197
									[exEnd]
133
claus
parents: 131
diff changeset
   198
claus
parents: 131
diff changeset
   199
claus
parents: 131
diff changeset
   200
    example: horizontal default (center); vertical topMax
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   201
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   202
	|v p b1 b2 b3|
133
claus
parents: 131
diff changeset
   203
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   204
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   205
	v label:'vL=topMax'.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   206
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   207
	p verticalLayout:#topMax.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   208
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   209
	b1 := Button label:'but1' in:p. b1 font:(b1 font size:8).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   210
	b2 := Button label:'b2' in:p.      b2 font:(b1 font size:24).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   211
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   212
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   213
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   214
									[exEnd]
133
claus
parents: 131
diff changeset
   215
claus
parents: 131
diff changeset
   216
claus
parents: 131
diff changeset
   217
    example: horizontal default (center); vertical topSpaceMax
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   218
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   219
	|v p b1 b2 b3|
133
claus
parents: 131
diff changeset
   220
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   221
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   222
	v label:'vL=topSpaceMax'.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   223
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   224
	p verticalLayout:#topSpaceMax.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   225
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   226
	b1 := Button label:'but1' in:p. b1 font:(b1 font size:8).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   227
	b2 := Button label:'b2' in:p.      b2 font:(b1 font size:24).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   228
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   229
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   230
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   231
									[exEnd]
133
claus
parents: 131
diff changeset
   232
claus
parents: 131
diff changeset
   233
claus
parents: 131
diff changeset
   234
    example: horizontal default (center); vertical bottomMax
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   235
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   236
	|v p b1 b2 b3|
133
claus
parents: 131
diff changeset
   237
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   238
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   239
	v label:'vL=bottomMax'.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   240
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   241
	p verticalLayout:#bottomMax.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   242
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   243
	b1 := Button label:'but1' in:p. b1 font:(b1 font size:8).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   244
	b2 := Button label:'b2' in:p.      b2 font:(b1 font size:24).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   245
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   246
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   247
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   248
									[exEnd]
133
claus
parents: 131
diff changeset
   249
claus
parents: 131
diff changeset
   250
claus
parents: 131
diff changeset
   251
    example: horizontal default (center); vertical bottomSpaceMax
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   252
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   253
	|v p b1 b2 b3|
133
claus
parents: 131
diff changeset
   254
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   255
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   256
	v label:'vL=bottomSpaceMax'.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   257
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   258
	p verticalLayout:#bottomSpaceMax.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   259
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   260
	b1 := Button label:'but1' in:p. b1 font:(b1 font size:8).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   261
	b2 := Button label:'b2' in:p.      b2 font:(b1 font size:24).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   262
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   263
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   264
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   265
									[exEnd]
133
claus
parents: 131
diff changeset
   266
claus
parents: 131
diff changeset
   267
127
claus
parents: 125
diff changeset
   268
    example: left-layout (vertical is default -> center)
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   269
	fills left-to-right; no spacing before leftMost component
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   270
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   271
	|v p b1 b2 b3|
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
   272
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   273
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   274
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   275
	v label:'hL=left; vL=default (center)'.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   276
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   277
	p horizontalLayout:#left.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   278
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   279
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   280
	b2 := Button label:'button2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   281
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   282
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   283
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   284
									[exEnd]
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
   285
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
   286
127
claus
parents: 125
diff changeset
   287
    example: left starting with spacing (vertical is default -> center)
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   288
	fills left-to-right; spacing before leftMost component
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   289
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   290
	|v p b1 b2 b3|
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   291
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   292
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   293
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   294
	v label:'hL=leftSpace; vL=center'.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   295
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   296
	p horizontalLayout:#leftSpace.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   297
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   298
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   299
	b2 := Button label:'button2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   300
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   301
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   302
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   303
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   304
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   305
127
claus
parents: 125
diff changeset
   306
    example: leftFit-layout (vertical is default -> center)
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   307
	fills left-to-right; resizes the rightMost component to fit
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   308
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   309
	|v p b1 b2 b3|
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   310
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   311
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   312
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   313
	v label:'hL=leftFit; vL=center'.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   314
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   315
	p horizontalLayout:#leftFit.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   316
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   317
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   318
	b2 := Button label:'button2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   319
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   320
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   321
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   322
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   323
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   324
127
claus
parents: 125
diff changeset
   325
    example: leftSpaceFit-layout (vertical is default -> center)
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   326
	fills left-to-right; 
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   327
	starts with spacing & resizes the rightMost component to fit with spacing
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   328
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   329
	|v p b1 b2 b3|
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   330
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   331
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   332
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   333
	v label:'hL=leftSpaceFit; vL=center'.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   334
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   335
	p horizontalLayout:#leftSpaceFit.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   336
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   337
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   338
	b2 := Button label:'button2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   339
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   340
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   341
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   342
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   343
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   344
127
claus
parents: 125
diff changeset
   345
    example: right-layout (vertical is default -> center)
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   346
	right-to-left
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   347
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   348
	|v p b1 b2 b3|
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   349
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   350
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   351
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   352
	v label:'hL=right; vL=center'.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   353
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   354
	p horizontalLayout:#right.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   355
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   356
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   357
	b2 := Button label:'button2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   358
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   359
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   360
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   361
									[exEnd]
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
   362
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
   363
127
claus
parents: 125
diff changeset
   364
    example: right with initial spacing (vertical is default -> center)
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   365
	right-to-left with spacing after last component
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   366
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   367
	|v p b1 b2 b3|
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   368
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   369
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   370
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   371
	v label:'hL=rightSpace; vL=center'.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   372
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   373
	p horizontalLayout:#rightSpace.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   374
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   375
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   376
	b2 := Button label:'button2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   377
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   378
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   379
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   380
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   381
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   382
1306
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   383
    example: rightFit-layout (vertical is default -> center)
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   384
	right-to-left; resize the leftMost component to fit
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   385
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   386
	|v p b1 b2 b3|
1306
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   387
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   388
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   389
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   390
	v label:'hL=rightFit; vL=center'.
1306
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   391
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   392
	p horizontalLayout:#rightFit.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   393
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   394
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   395
	b2 := Button label:'button2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   396
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   397
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   398
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   399
									[exEnd]
1306
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   400
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   401
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   402
    example: rightSpaceFit with initial spacing (vertical is default -> center)
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   403
	right-to-left; start with spacing & resize the leftMost to fit
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   404
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   405
	|v p b1 b2 b3|
1306
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   406
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   407
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   408
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   409
	v label:'hL=rightSpaceFit; vL=center'.
1306
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   410
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   411
	p horizontalLayout:#rightSpaceFit.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   412
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   413
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   414
	b2 := Button label:'button2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   415
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   416
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   417
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   418
									[exEnd]
1306
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   419
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   420
127
claus
parents: 125
diff changeset
   421
    example: fit-layout (vertical is default -> center)
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   422
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   423
	|v p b1 b2 b3|
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
   424
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   425
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   426
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   427
	p horizontalLayout:#fit.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   428
	v label:'hL=fit; vL=center'.
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
   429
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   430
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   431
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   432
	b2 := Button label:'button2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   433
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   434
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   435
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   436
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   437
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   438
127
claus
parents: 125
diff changeset
   439
    example: full fit i.e. no spacing (vertical is default -> center)
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   440
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   441
	|v p b1 b2 b3|
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   442
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   443
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   444
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   445
	p horizontalLayout:#fit.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   446
	p horizontalSpace:0.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   447
	v label:'hL=fit hS=0; vL=center'.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   448
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   449
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   450
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   451
	b2 := Button label:'button2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   452
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   453
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   454
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   455
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   456
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   457
127
claus
parents: 125
diff changeset
   458
    example: fit with spacing (vertical is default -> center)
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   459
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   460
	|v p b1 b2 b3|
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   461
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   462
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   463
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   464
	v label:'hL=fitSpace; vL=center'.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   465
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   466
	p horizontalLayout:#fitSpace.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   467
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   468
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   469
	b2 := Button label:'button2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   470
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   471
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   472
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   473
									[exEnd]
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   474
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   475
127
claus
parents: 125
diff changeset
   476
    example: spread-layout (vertical is default -> center)
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   477
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   478
	|v p b1 b2 b3|
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   479
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   480
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   481
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   482
	p horizontalLayout:#spread.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   483
	v label:'hL=spread; vL=center'.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   484
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   485
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   486
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   487
	b2 := Button label:'button2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   488
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   489
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   490
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   491
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   492
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   493
127
claus
parents: 125
diff changeset
   494
    example: spread with spacing (vertical is default -> center)
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   495
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   496
	|v p b1 b2 b3|
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   497
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   498
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   499
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   500
	v label:'hL=spreadSpace; vL=center'.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   501
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   502
	p horizontalLayout:#spreadSpace.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   503
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   504
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   505
	b2 := Button label:'button2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   506
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   507
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   508
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   509
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   510
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   511
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   512
    example: spread with spacing; vertical fit
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   513
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   514
	|v p b1 b2 b3|
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   515
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   516
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   517
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   518
	v label:'hL=spreadSpace; vL=fit'.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   519
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   520
	p horizontalLayout:#spreadSpace.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   521
	p verticalLayout:#fit.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   522
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   523
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   524
	b2 := Button label:'button2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   525
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   526
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   527
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   528
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   529
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   530
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   531
    example: spread with spacing; vertical fit with spacing
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   532
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   533
	|v p b1 b2 b3|
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   534
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   535
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   536
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   537
	v label:'hL=spreadSpace; vL=fitSpace'.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   538
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   539
	p horizontalLayout:#spreadSpace.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   540
	p verticalLayout:#fitSpace.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   541
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   542
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   543
	b2 := Button label:'button2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   544
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   545
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   546
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   547
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   548
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   549
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   550
    example: fit - top
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   551
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   552
	|v p b1 b2 b3|
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   553
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   554
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   555
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   556
	v label:'hL=fit; vL=top'.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   557
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   558
	p horizontalLayout:#fit.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   559
	p verticalLayout:#top.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   560
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   561
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   562
	b2 := Button label:'button2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   563
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   564
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   565
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   566
									[exEnd]
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   567
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   568
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   569
    example: fit with initial spacing
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   570
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   571
	|v p b1 b2 b3|
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   572
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   573
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   574
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   575
	v label:'hL=fitSpace; vL=top'.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   576
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   577
	p horizontalLayout:#fitSpace.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   578
	p verticalLayout:#top.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   579
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   580
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   581
	b2 := Button label:'button2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   582
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   583
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   584
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   585
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   586
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   587
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   588
    example: fit with initial spacing in both directions
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   589
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   590
	|v p b1 b2 b3|
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   591
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   592
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   593
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   594
	v label:'hL=fitSpace; vL=fitSpace'.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   595
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   596
	p horizontalLayout:#fitSpace.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   597
	p verticalLayout:#fitSpace.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   598
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   599
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   600
	b2 := Button label:'button2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   601
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   602
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   603
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   604
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   605
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   606
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   607
    example: fit without spacing in both directions
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   608
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   609
	|v p b1 b2 b3|
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   610
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   611
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   612
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   613
	v label:'hL=fit hS=0; vL=fit'.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   614
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   615
	p horizontalLayout:#fit.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   616
	p verticalLayout:#fit.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   617
	p horizontalSpace:0.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   618
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   619
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   620
	b2 := Button label:'button2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   621
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   622
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   623
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   624
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   625
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   626
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   627
    example: fit with initial spacing; top with spacing
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   628
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   629
	|v p b1 b2 b3|
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   630
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   631
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   632
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   633
	v label:'hL=fitSpace; vL=topSpace'.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   634
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   635
	p horizontalLayout:#fitSpace.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   636
	p verticalLayout:#topSpace.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   637
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   638
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   639
	b2 := Button label:'button2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   640
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   641
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   642
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   643
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   644
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   645
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   646
    example: fit - top without spacing
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   647
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   648
	|v p b1 b2 b3|
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   649
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   650
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   651
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   652
	v label:'hL=fit; vL=top'.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   653
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   654
	p horizontalLayout:#fit.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   655
	p verticalLayout:#top.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   656
	p horizontalSpace:0.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   657
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   658
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   659
	b2 := Button label:'button2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   660
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   661
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   662
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   663
									[exEnd]
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   664
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   665
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   666
    example: fit - bottom with spacing and bottomSpace
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   667
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   668
	|v p b1 b2 b3|
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   669
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   670
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   671
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   672
	v label:'hL=fitSpace; vL=bottomSpace'.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   673
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   674
	p horizontalLayout:#fitSpace.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   675
	p verticalLayout:#bottomSpace.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   676
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   677
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   678
	b2 := Button label:'button2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   679
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   680
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   681
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   682
									[exEnd]
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   683
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   684
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   685
    example: fit no horizontal space - bottom with spacing and bottomSpace
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   686
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   687
	|v p b1 b2 b3|
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   688
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   689
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   690
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   691
	v label:'hL=fit; vL=bottomSpace'.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   692
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   693
	p horizontalLayout:#fit.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   694
	p verticalLayout:#bottomSpace.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   695
	p horizontalSpace:0.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   696
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   697
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   698
	b2 := Button label:'button2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   699
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   700
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   701
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   702
									[exEnd]
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   703
133
claus
parents: 131
diff changeset
   704
    example: leftMax - vertical default
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   705
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   706
	|v p b1 b2 b3|
133
claus
parents: 131
diff changeset
   707
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   708
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   709
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   710
	v label:'hL=leftMax; vL=default'.
133
claus
parents: 131
diff changeset
   711
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   712
	p horizontalLayout:#leftMax.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   713
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   714
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   715
	b2 := Button label:'b2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   716
	b3 := Button label:'but3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   717
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   718
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   719
									[exEnd]
133
claus
parents: 131
diff changeset
   720
claus
parents: 131
diff changeset
   721
claus
parents: 131
diff changeset
   722
    example: leftSpaceMax - vertical default
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   723
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   724
	|v p b1 b2 b3|
133
claus
parents: 131
diff changeset
   725
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   726
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   727
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   728
	v label:'hL=leftSpaceMax; vL=default'.
133
claus
parents: 131
diff changeset
   729
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   730
	p horizontalLayout:#leftSpaceMax.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   731
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   732
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   733
	b2 := Button label:'b2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   734
	b3 := Button label:'but3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   735
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   736
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   737
									[exEnd]
133
claus
parents: 131
diff changeset
   738
claus
parents: 131
diff changeset
   739
claus
parents: 131
diff changeset
   740
    example: rightMax - vertical default
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   741
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   742
	|v p b1 b2 b3|
133
claus
parents: 131
diff changeset
   743
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   744
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   745
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   746
	v label:'hL=rightMax; vL=default'.
133
claus
parents: 131
diff changeset
   747
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   748
	p horizontalLayout:#rightMax.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   749
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   750
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   751
	b2 := Button label:'b2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   752
	b3 := Button label:'but3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   753
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   754
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   755
									[exEnd]
133
claus
parents: 131
diff changeset
   756
claus
parents: 131
diff changeset
   757
claus
parents: 131
diff changeset
   758
    example: rightSpaceMax - vertical default
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   759
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   760
	|v p b1 b2 b3|
133
claus
parents: 131
diff changeset
   761
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   762
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   763
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   764
	v label:'hL=rightSpaceMax; vL=default'.
133
claus
parents: 131
diff changeset
   765
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   766
	p horizontalLayout:#rightSpaceMax.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   767
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   768
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   769
	b2 := Button label:'b2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   770
	b3 := Button label:'but3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   771
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   772
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   773
									[exEnd]
133
claus
parents: 131
diff changeset
   774
claus
parents: 131
diff changeset
   775
claus
parents: 131
diff changeset
   776
    example: centerMax - vertical default
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   777
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   778
	|v p b1 b2 b3|
133
claus
parents: 131
diff changeset
   779
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   780
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   781
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   782
	v label:'hL=centerMax; vL=default'.
133
claus
parents: 131
diff changeset
   783
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   784
	p horizontalLayout:#centerMax.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   785
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   786
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   787
	b2 := Button label:'b2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   788
	b3 := Button label:'but3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   789
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   790
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   791
									[exEnd]
133
claus
parents: 131
diff changeset
   792
claus
parents: 131
diff changeset
   793
claus
parents: 131
diff changeset
   794
    example: spreadMax - vertical default
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   795
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   796
	|v p b1 b2 b3|
133
claus
parents: 131
diff changeset
   797
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   798
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   799
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   800
	v label:'hL=spreadMax; vL=default'.
133
claus
parents: 131
diff changeset
   801
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   802
	p horizontalLayout:#spreadMax.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   803
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   804
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   805
	b2 := Button label:'b2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   806
	b3 := Button label:'but3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   807
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   808
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   809
									[exEnd]
133
claus
parents: 131
diff changeset
   810
claus
parents: 131
diff changeset
   811
claus
parents: 131
diff changeset
   812
    example: spreadSpaceMax - vertical default
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   813
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   814
	|v p b1 b2 b3|
133
claus
parents: 131
diff changeset
   815
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   816
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   817
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   818
	v label:'hL=spreadSpaceMax; vL=default'.
133
claus
parents: 131
diff changeset
   819
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   820
	p horizontalLayout:#spreadSpaceMax.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   821
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   822
	b1 := Button label:'button1' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   823
	b2 := Button label:'b2' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   824
	b3 := Button label:'but3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   825
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   826
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   827
									[exEnd]
133
claus
parents: 131
diff changeset
   828
claus
parents: 131
diff changeset
   829
claus
parents: 131
diff changeset
   830
    example: maximize elements in both directions and center
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   831
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   832
	|v p b1 b2 b3|
133
claus
parents: 131
diff changeset
   833
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   834
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   835
	v label:'hL=centerMax; vL=centerMax'.
133
claus
parents: 131
diff changeset
   836
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   837
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   838
	p horizontalLayout:#centerMax.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   839
	p verticalLayout:#centerMax.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   840
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   841
	b1 := Button label:'but1' in:p. b1 font:(b1 font size:8).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   842
	b2 := Button label:'b2' in:p.      b2 font:(b1 font size:24).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   843
	b3 := Button label:'button3' in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   844
	v extent:300 @ 100.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   845
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   846
									[exEnd]
133
claus
parents: 131
diff changeset
   847
claus
parents: 131
diff changeset
   848
118
claus
parents: 77
diff changeset
   849
    example: placing hPanels into a vPanel
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   850
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   851
	|v vP hP1 hP2 hP3 b1 b2 b3 b4 b5 b6 b7 b8 b9|
118
claus
parents: 77
diff changeset
   852
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   853
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   854
	vP := VerticalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   855
	vP origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   856
	vP verticalLayout:#fit;
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   857
	   verticalSpace:0;
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   858
	   horizontalLayout:#fit.
118
claus
parents: 77
diff changeset
   859
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   860
	hP1 := HorizontalPanelView in:vP.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   861
	hP1 horizontalLayout:#fitSpace;
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   862
	    verticalLayout:#center.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   863
	b1 := Button label:'button1' in:hP1.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   864
	b2 := Button label:'button2' in:hP1.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   865
	b3 := Button label:'button3' in:hP1.
118
claus
parents: 77
diff changeset
   866
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   867
	hP2 := HorizontalPanelView in:vP.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   868
	hP2 horizontalLayout:#fitSpace;
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   869
	    verticalLayout:#center.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   870
	b4 := Button label:'button4' in:hP2.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   871
	b5 := Button label:'button5' in:hP2.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   872
	b6 := Button label:'button6' in:hP2.
118
claus
parents: 77
diff changeset
   873
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   874
	hP3 := HorizontalPanelView in:vP.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   875
	hP3 horizontalLayout:#fitSpace;
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   876
	    verticalLayout:#center.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   877
	b7 := Button label:'button7' in:hP3.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   878
	b8 := Button label:'button8' in:hP3.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   879
	b9 := Button label:'button9' in:hP3.
118
claus
parents: 77
diff changeset
   880
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   881
	v extent:300 @ 300.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   882
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   883
									[exEnd]
118
claus
parents: 77
diff changeset
   884
1306
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   885
    example: a browser like table, the two left tables have a fix width,
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   886
	     while the rightmost list extends to the far right.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   887
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   888
	|v p l1 l2 l3|
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   889
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   890
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   891
	p := HorizontalPanelView in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   892
	v label:'hL=leftFit hS=0; vL=fit'.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   893
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   894
	p horizontalLayout:#leftFit.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   895
	p horizontalSpace:0.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   896
	p verticalLayout:#fit.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   897
	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   898
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   899
	l1 := ScrollableView for:FileSelectionList in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   900
	l1 stayInDirectory:true.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   901
	l1 ignoreParentDirectory:true.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   902
	l1 directory:'/'.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   903
	l1 action:[:selection | l2 directory:(l1 selectedPathname)].
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   904
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   905
	l2 := ScrollableView for:FileSelectionList in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   906
	l2 stayInDirectory:true.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   907
	l2 directory:nil.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   908
	l2 ignoreParentDirectory:true.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   909
	l2 action:[:selection | l3 directory:(l2 selectedPathname)].
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   910
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   911
	l3 := ScrollableView for:FileSelectionList in:p.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   912
	l3 directory:nil.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   913
	l3 ignoreParentDirectory:false.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   914
	v extent:400 @ 300.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   915
	v open
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   916
									[exEnd]
125
claus
parents: 118
diff changeset
   917
claus
parents: 118
diff changeset
   918
1306
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   919
    trouble example: self-resizing elements may cause trouble
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   920
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   921
	|v p l1 l2 l3|
125
claus
parents: 118
diff changeset
   922
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   923
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   924
	p := HorizontalPanelView origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:v.
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   925
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   926
	l1 := (Label label:'one' in:p) level:-1.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   927
	l2 := (Label label:'two' in:p) level:-1.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   928
	l3 := (Label label:'three' in:p) level:-1.
125
claus
parents: 118
diff changeset
   929
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   930
	v extent:400 @ 300.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   931
	v open.
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   932
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   933
	(Delay forSeconds:5) wait.
125
claus
parents: 118
diff changeset
   934
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   935
	l1 label:'oneone'.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   936
	l2 label:'twotwo'.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   937
	l3 label:'threethree'.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   938
									[exEnd]
125
claus
parents: 118
diff changeset
   939
claus
parents: 118
diff changeset
   940
claus
parents: 118
diff changeset
   941
    fixed trouble example: tell the panel that this situation may happen
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   942
									[exBegin]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   943
	|v p l1 l2 l3|
125
claus
parents: 118
diff changeset
   944
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   945
	v := StandardSystemView new.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   946
	p := HorizontalPanelView origin:(0.0 @ 0.0) corner:(1.0 @ 1.0) in:v.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   947
	p elementsChangeSize:true.
125
claus
parents: 118
diff changeset
   948
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   949
	l1 := (Label label:'one' in:p) level:-1.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   950
	l2 := (Label label:'two' in:p) level:-1.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   951
	l3 := (Label label:'three' in:p) level:-1.
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   952
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   953
	v extent:400 @ 300.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   954
	v open.
125
claus
parents: 118
diff changeset
   955
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   956
	(Delay forSeconds:5) wait.
125
claus
parents: 118
diff changeset
   957
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   958
	l1 label:'oneone'.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   959
	l2 label:'twotwo'.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   960
	l3 label:'threethree'.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   961
									[exEnd]
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
   962
"
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 5
diff changeset
   963
! !
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   964
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   965
!HorizontalPanelView methodsFor:'accessing'!
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   966
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   967
horizontalLayout
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   968
    "return the horizontal layout as symbol.
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   969
     the returned value is one of
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   970
	#left           arrange elements at the left
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   971
	#leftSpace      arrange elements at the left, start with spacing
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   972
	#fixLeft        same as #left, but do not reduce spacing in case of no fit
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   973
	#fixLeftSpace   same as #leftSpace, but do not reduce spacing in case of no fit
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   974
	#right          arrange elements at the right
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   975
	#rightSpace     arrange elements at the right, start with spacing
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   976
	#center         arrange elements in the center
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   977
	#spread         spread elements evenly
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   978
	#spreadSpace    spread elements evenly with spacing at the ends
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   979
	#fit            like #spread, but resize elements for tight packing
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   980
	#fitSpace       like #fit, with additional spacing at the far ends
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   981
	#leftFit        like #left, but resize the last element to fit
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   982
	#leftSpaceFit   like #leftSpace, but resize the last element to fit
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   983
	#rightFit       like #right, but resize the first element to fit
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   984
	#rightSpaceFit  like #rightSpace, but resize the first element to fit
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
   985
      the default is #center
118
claus
parents: 77
diff changeset
   986
      See the class documentation for  the meanings.
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   987
    "
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   988
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   989
    ^ hLayout
1306
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   990
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
   991
    "Modified: 17.8.1997 / 15:21:26 / cg"
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   992
!
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   993
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   994
horizontalLayout:aSymbol
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   995
    "change the horizontal layout as symbol.
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
   996
     The argument, aSymbol must be one of:
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   997
	#left           arrange elements at the left
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   998
	#leftSpace      arrange elements at the left, start with spacing
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
   999
	#fixLeft        same as #left, but do not reduce spacing in case of no fit
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1000
	#fixLeftSpace   same as #leftSpace, but do not reduce spacing in case of no fit
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1001
	#right          arrange elements at the right
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1002
	#rightSpace     arrange elements at the right, start with spacing
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1003
	#center         arrange elements in the center
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1004
	#spread         spread elements evenly
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1005
	#spreadSpace    spread elements evenly with spacing at the ends
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1006
	#fit            like #spread, but resize elements for tight packing
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1007
	#fitSpace       like #fit, with additional spacing at the far ends
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1008
	#leftFit        like #left, but resize the last element to fit
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1009
	#leftSpaceFit   like #leftSpace, but resize the last element to fit
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1010
	#rightFit       like #right, but resize the first element to fit
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1011
	#rightSpaceFit  like #rightSpace, but resize the first element to fit
1306
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1012
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1013
	#leftMax        like non-Max layouts, resizing components to
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1014
	#leftSpaceMax   the width of the widest component
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1015
	#rightMax
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1016
	#rightSpaceMax
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1017
	#centerMax
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1018
	#spreadMax
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1019
	#spreadSpaceMax
118
claus
parents: 77
diff changeset
  1020
      the default (if never changed) is #center.
1306
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1021
      See the class documentation for the meanings.
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
  1022
    "
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
  1023
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
  1024
    (hLayout ~~ aSymbol) ifTrue:[
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1025
	hLayout := aSymbol.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1026
	self layoutChanged
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
  1027
    ]
1156
4f0db7433c78 commentary
Claus Gittinger <cg@exept.de>
parents: 1042
diff changeset
  1028
1306
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1029
    "Modified: 17.8.1997 / 15:21:16 / cg"
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
  1030
!
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
  1031
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1032
layout:something
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1033
    "OBSOLETE compatibility interface. Will vanish.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1034
     leftover for historic reasons - do not use any more.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1035
     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
  1036
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1037
    something isLayout ifTrue:[^ super layout:something].
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1038
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1039
    self obsoleteMethodWarning:'use #horizontalLayout:'.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1040
    ^ self horizontalLayout:something
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1041
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1042
    "Modified: 31.8.1995 / 23:07:33 / claus"
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1043
!
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1044
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1045
verticalLayout
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1046
    "return the vertical layout as a symbol.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1047
     the returned value is one of
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1048
	#top            place element at the top
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1049
	#topSpace       place element at the top, offset by verticalSpace
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1050
	#center         place it horizontally centered
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1051
	#bottom         place it at the bottom
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1052
	#bottomSpace    place it at the bottom, offset by verticalSpace
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1053
	#fit            resize elements vertically to fit this panel
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1054
	#fitSpace       like #fit, but with spacing
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1055
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1056
	#topMax         like #top, but resize all views vertically to max height
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1057
	#topSpaceMax    like #topSpace, but resize all views vertically to max height
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1058
	#bottomMax      like #bottom, but resize all views vertically to max height
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1059
	#bottomSpaceMax like #bottomSpace, but resize all views vertically to max height
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1060
	#centerMax      like #center, but resize all views vertically to max height
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1061
      the default is #center
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1062
      See the class documentation for  the meanings.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1063
    "
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1064
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1065
    ^ vLayout
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1066
!
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1067
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
  1068
verticalLayout:aSymbol
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
  1069
    "change the vertical layout as a symbol.
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
  1070
     The argument, aSymbol must be one of:
133
claus
parents: 131
diff changeset
  1071
	#top            place element at the top
claus
parents: 131
diff changeset
  1072
	#topSpace       place element at the top, offset by verticalSpace
claus
parents: 131
diff changeset
  1073
	#center         place it horizontally centered
claus
parents: 131
diff changeset
  1074
	#bottom         place it at the bottom
claus
parents: 131
diff changeset
  1075
	#bottomSpace    place it at the bottom, offset by verticalSpace
claus
parents: 131
diff changeset
  1076
	#fit            resize elements vertically to fit this panel
claus
parents: 131
diff changeset
  1077
	#fitSpace       like #fit, but with spacing
claus
parents: 131
diff changeset
  1078
claus
parents: 131
diff changeset
  1079
	#topMax         like #top, but resize all views vertically to max height
claus
parents: 131
diff changeset
  1080
	#topSpaceMax    like #topSpace, but resize all views vertically to max height
claus
parents: 131
diff changeset
  1081
	#bottomMax      like #bottom, but resize all views vertically to max height
claus
parents: 131
diff changeset
  1082
	#bottomSpaceMax like #bottomSpace, but resize all views vertically to max height
claus
parents: 131
diff changeset
  1083
	#centerMax      like #center, but resize all views vertically to max height
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
  1084
      the default (if never changed) is #center
118
claus
parents: 77
diff changeset
  1085
      See the class documentation for  the meanings.
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
  1086
    "
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
  1087
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
  1088
    (vLayout ~~ aSymbol) ifTrue:[
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
  1089
	vLayout := aSymbol.
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
  1090
	self layoutChanged
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
  1091
    ]
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
  1092
! !
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
  1093
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
  1094
!HorizontalPanelView methodsFor:'layout'!
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
  1095
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
  1096
setChildPositions
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
  1097
    "(re)compute position of every child whenever childs are added or
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
  1098
     my size has changed"
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
  1099
133
claus
parents: 131
diff changeset
  1100
    |xpos space sumOfWidths numChilds l wEach wInside hL vL resizeToMaxV 
1254
c9e604f03e6a code compactified (slightly)
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1101
     resizeToMaxH maxHeight maxWidth d m2 subViews ext
c9e604f03e6a code compactified (slightly)
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1102
     restWidth|
1042
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1038
diff changeset
  1103
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1104
    subViews := self subViewsToConsider.
1042
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1038
diff changeset
  1105
    subViews size == 0 ifTrue:[^ self].
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
  1106
1042
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1038
diff changeset
  1107
    extentChanged ifTrue:[
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1108
        ext := self computeExtent.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1109
        width := ext x.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1110
        height := ext y.
1042
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1038
diff changeset
  1111
    ].
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
  1112
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
  1113
    space := horizontalSpace.
59
450ce95a72a4 *** empty log message ***
claus
parents: 38
diff changeset
  1114
    numChilds := subViews size.
1254
c9e604f03e6a code compactified (slightly)
Claus Gittinger <cg@exept.de>
parents: 1165
diff changeset
  1115
379
a0ada7891fe9 looks bette if panels level is ~~ 0 AND subview has 0 level
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  1116
    m2 := margin * 2.
a0ada7891fe9 looks bette if panels level is ~~ 0 AND subview has 0 level
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  1117
    wInside := width - m2 + (borderWidth*2) - subViews last borderWidth.
59
450ce95a72a4 *** empty log message ***
claus
parents: 38
diff changeset
  1118
118
claus
parents: 77
diff changeset
  1119
    hL := hLayout.
claus
parents: 77
diff changeset
  1120
    vL := vLayout.
claus
parents: 77
diff changeset
  1121
133
claus
parents: 131
diff changeset
  1122
    resizeToMaxH := false.
claus
parents: 131
diff changeset
  1123
    (hL endsWith:'Max') ifTrue:[
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1124
        resizeToMaxH := true.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1125
        wEach := 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: 1418
diff changeset
  1126
        hL := (hL copyWithoutLast:3) asSymbol.
1306
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1127
    ].
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1128
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1129
    numChilds == 1 ifTrue:[
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1130
        (hL == #leftFit or:[hL == #rightFit]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1131
            hL := #fit
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1132
        ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1133
        (hL == #leftSpaceFit or:[hL == #rightSpaceFit]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1134
            hL := #fitSpace
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1135
        ].
133
claus
parents: 131
diff changeset
  1136
    ].
claus
parents: 131
diff changeset
  1137
118
claus
parents: 77
diff changeset
  1138
    hL == #fitSpace ifTrue:[
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1139
        "
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1140
         adjust childs extents and set origins.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1141
         Be careful to avoid accumulation of rounding errors
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1142
        "
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1143
        wEach := (wInside - (numChilds + 1 * space)) / numChilds.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1144
        xpos := space + margin - borderWidth.
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
  1145
    ] ifFalse:[
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1146
        hL == #fit ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1147
            "
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1148
             adjust childs extents and set origins.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1149
             Be careful to avoid accumulation of rounding errors
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1150
            "
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1151
            wEach := (wInside - (numChilds - 1 * space)) / numChilds.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1152
            xpos := margin - borderWidth.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1153
        ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1154
            l := hL.
1306
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1155
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1156
            "/ adjust - do not include width of last(first) element if doing a fit
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1157
            (hL == #leftFit or:[hL == #leftSpaceFit]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1158
                subViews last width:0.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1159
            ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1160
            (hL == #rightFit or:[hL == #rightSpaceFit]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1161
                subViews first width:0.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1162
            ].
1306
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1163
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1164
            "
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1165
             compute net width needed
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1166
            "
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1167
            resizeToMaxH ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1168
                sumOfWidths := subViews inject:0 into:[:sumSoFar :child | sumSoFar + maxWidth + (child borderWidth*2)].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1169
            ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1170
                sumOfWidths := subViews inject:0 into:[:sumSoFar :child | sumSoFar + child widthIncludingBorder].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1171
            ].
1306
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1172
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1173
            restWidth := width - sumOfWidths.
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
  1174
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1175
            ((l == #center) and:[numChilds == 1]) ifTrue:[l := #spread].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1176
            (l == #spread and:[numChilds == 1]) ifTrue:[l := #spreadSpace].
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
  1177
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1178
            "
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1179
             compute position of leftmost subview and space between them;
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1180
             if they do hardly fit, leave no space between them 
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1181
            "
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1182
            ((sumOfWidths >= (width - m2)) 
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1183
            and:[l ~~ #fixLeftSpace and:[l ~~ #fixLeft]]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1184
                xpos := margin.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1185
                space := 0
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1186
            ] ifFalse: [
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1187
                l == #fixLeftSpace ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1188
                    l := #leftSpace
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1189
                ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1190
                    l == #fixLeft ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1191
                        l := #left
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1192
                    ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1193
                ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1194
                ((l == #right) or:[l == #rightSpace
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1195
                or:[l == #rightFit or:[l == #rightSpaceFit]]]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1196
                    xpos := restWidth - (space * (numChilds - 1)).
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1197
"/
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1198
"/                    borderWidth == 0 ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1199
"/                        xpos := xpos + space 
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1200
"/                    ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1201
"/
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1202
                    (l == #rightSpace   
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1203
                    or:[l == #rightSpaceFit]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1204
                        xpos >= space ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1205
                            xpos := xpos - space
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1206
                        ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1207
                    ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1208
                    xpos := xpos - margin.
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
  1209
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1210
                    xpos < 0 ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1211
                        space := space min:(restWidth // (numChilds + 1)).
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1212
                        xpos := restWidth - (space * numChilds).
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1213
                    ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1214
                ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1215
                    (l == #spread) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1216
                        space := (restWidth - m2) // (numChilds - 1).
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1217
                        xpos := margin.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1218
                        (space == 0) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1219
                            xpos := restWidth // 2
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1220
                        ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1221
                    ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1222
                      (l == #spreadSpace) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1223
                        space := (restWidth - m2) // (numChilds + 1).
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1224
                        xpos := space + margin.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1225
                        (space == 0) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1226
                            xpos := restWidth // 2
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1227
                        ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1228
                      ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1229
                        ((l == #left) or:[l == #leftSpace
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1230
                        or:[l == #leftFit or:[l == #leftSpaceFit]]]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1231
                            space := space min:(restWidth - m2) // (numChilds + 1).
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1232
                            (hL == #fixLeft or:[hL == #fixLeftSpace]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1233
                                space := space max:horizontalSpace.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1234
                            ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1235
                                space := space max:0.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1236
                            ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1237
                            (l == #leftSpace or:[l == #leftSpaceFit]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1238
                                xpos := space + margin.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1239
                            ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1240
                                "/
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1241
                                "/ if the very first view has a 0-level AND
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1242
                                "/ my level is non-zero, begin with margin
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1243
                                "/
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1244
                                true "(margin ~~ 0 and:[subViews first level == 0])" ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1245
                                    xpos := margin
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1246
                                ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1247
                                    xpos := 0
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1248
                                ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1249
                            ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1250
                        ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1251
                            "center"
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1252
                            xpos := (restWidth - ((numChilds - 1) * space)) // 2.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1253
                            xpos < 0 ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1254
                                space := restWidth // (numChilds + 1).
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1255
                                xpos := (restWidth - ((numChilds - 1) * space)) // 2.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1256
                            ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1257
                        ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1258
                      ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1259
                    ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1260
                ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1261
            ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1262
        ].
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
  1263
    ].
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
  1264
133
claus
parents: 131
diff changeset
  1265
    resizeToMaxV := false.
1306
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1266
    (vL endsWith:'Max') ifTrue:[
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1267
        resizeToMaxV := true.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1268
        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: 1418
diff changeset
  1269
        vL := (vL copyWithoutLast:3) asSymbol.
133
claus
parents: 131
diff changeset
  1270
    ].
claus
parents: 131
diff changeset
  1271
1306
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1272
    "
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1273
     now set positions
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1274
    "
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
  1275
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
  1276
    subViews keysAndValuesDo:[:index :child |
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1277
        |ypos advance bwChild hChild newHChild|
62
7cc1e330da47 *** empty log message ***
claus
parents: 59
diff changeset
  1278
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1279
        hChild := child heightIncludingBorder.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1280
        bwChild := child borderWidth.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1281
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1282
        resizeToMaxV ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1283
            child height:(hChild := maxHeight - (bwChild  * 2)).
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1284
        ].
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
  1285
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1286
        vL == #top ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1287
            ypos := margin
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1288
        ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1289
            vL == #topSpace ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1290
                ypos :=  margin + verticalSpace
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1291
            ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1292
                vL == #bottom ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1293
                    ypos := height - margin - child heightIncludingBorder
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1294
                ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1295
                    vL == #bottomSpace ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1296
                        ypos := height - margin 
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1297
                                - verticalSpace - child heightIncludingBorder.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1298
                    ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1299
                        vL == #fitSpace ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1300
                            ypos := verticalSpace.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1301
                            newHChild := height - (verticalSpace + bwChild * 2).
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1302
                            ypos := ypos + margin.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1303
                            newHChild := newHChild - m2.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1304
                        ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1305
                            vL == #fit ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1306
                                newHChild := height - (bwChild * 2).
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1307
                                "/
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1308
                                "/ if the view has a 0-level AND
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1309
                                "/ my level is non-zero, begin with margin
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1310
                                "/
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1311
                                true "(level ~~ 0 and:[child level == 0])" ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1312
                                    ypos := margin.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1313
                                    newHChild := newHChild - m2.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1314
                                ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1315
                                    ypos := 0. 
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1316
                                ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1317
                            ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1318
                                "centered"
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1319
                                ypos := margin + ((height - m2 - hChild) // 2).
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1320
                            ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1321
                        ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1322
                    ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1323
                ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1324
            ]
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1325
        ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1326
        newHChild notNil ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1327
            child height:newHChild
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1328
        ].
379
a0ada7891fe9 looks bette if panels level is ~~ 0 AND subview has 0 level
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  1329
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1330
        (ypos < 0) ifTrue:[ypos := 0].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1331
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1332
        (hL == #fit 
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1333
         or:[hL == #fitSpace
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1334
         or:[resizeToMaxH]]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1335
            child sizeFixed ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1336
                d := wEach - (child widthIncludingBorder) // 2.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1337
                child origin:(xpos truncated + d @ ypos)
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1338
            ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1339
                child origin:(xpos truncated @ ypos)
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1340
                      corner:(xpos + wEach - (child borderWidth) - 1) truncated
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1341
                             @ (ypos + child height - 1).
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1342
            ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1343
            advance := wEach.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1344
        ] ifFalse:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1345
            child origin:(xpos @ ypos).
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1346
            advance := child widthIncludingBorder
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1347
        ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1348
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1349
        index == numChilds ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1350
            |x|
1306
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1351
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1352
            (hL == #leftFit or:[hL == #leftSpaceFit]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1353
                x := width - margin - 1 - (child borderWidth * 2) + borderWidth.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1354
                hL == #leftSpaceFit ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1355
                    x := x - space
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1356
                ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1357
                child corner:(x @ (ypos + child height - 1))
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1358
            ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1359
        ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1360
        index == 1 ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1361
            |x xR|
1306
bf4903012f7a added #rightFit & #rightSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents: 1291
diff changeset
  1362
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1363
            (hL == #rightFit or:[hL == #rightSpaceFit]) ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1364
                x := margin + 0 + (child borderWidth * 2) - borderWidth.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1365
                hL == #rightSpaceFit ifTrue:[
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1366
                    x := x + space
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1367
                ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1368
                xR := child corner x.
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1369
                child origin:(x @ (child origin y))
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1370
                      corner:(xR @ (child corner y))
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1371
            ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1372
        ].
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1373
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1374
        xpos := xpos + advance + space.
77
565b052f5277 *** empty log message ***
claus
parents: 65
diff changeset
  1375
    ].
155
claus
parents: 133
diff changeset
  1376
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1377
    "Modified: / 4.9.1995 / 18:43:10 / claus"
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1378
    "Modified: / 27.1.1998 / 21:03:06 / cg"
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
  1379
! !
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1380
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1381
!HorizontalPanelView methodsFor:'queries'!
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1382
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1383
preferredExtent
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1384
    "return a good extent, one that makes subviews fit"
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1385
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 797
diff changeset
  1386
    |sumOfWidths maxHeight maxWidth m2 subViews|
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1387
797
2f9cd56f48ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  1388
    "/ If I have an explicit preferredExtent ..
2f9cd56f48ee *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 793
diff changeset
  1389
713
0c38ad51016d care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1390
    preferredExtent notNil ifTrue:[
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1391
	^ preferredExtent
713
0c38ad51016d care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1392
    ].
0c38ad51016d care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
  1393
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1394
    subViews := self subViewsToConsider.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1395
    (subViews size == 0) ifTrue:[
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1396
	^ super preferredExtent.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1397
	"/ ^ horizontalSpace @ verticalSpace].
1038
c6d8eb89d260 useful preferredExtent if no subviews.
ca
parents: 980
diff changeset
  1398
    ].
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1399
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1400
    "compute net height needed"
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1401
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1402
    sumOfWidths := 0.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1403
    maxHeight := 0.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1404
    maxWidth := 0.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1405
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1406
    subViews do:[:child |
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1407
	|childsPreference|
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1408
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1409
	"/ better to use component's preferredExtent ...
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1410
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1411
	childsPreference := child preferredExtent.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1412
	sumOfWidths := sumOfWidths + childsPreference x.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1413
	maxHeight := maxHeight max:childsPreference y.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1414
	maxWidth := maxWidth max:childsPreference x.
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1415
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1416
	"/ ... instead of actual extent
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1417
"/        sumOfWidths := sumOfWidths + child widthIncludingBorder.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1418
"/        maxHeight := maxHeight max:(child heightIncludingBorder).
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1419
"/        maxWidth := maxWidth max:(child widthIncludingBorder).
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1420
    ].
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1421
    borderWidth ~~ 0 ifTrue:[
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1422
	sumOfWidths := sumOfWidths + (horizontalSpace * 2).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1423
	maxHeight := maxHeight + (verticalSpace * 2).
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1424
    ].
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1425
    (hLayout == #fit 
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1426
    or:[hLayout == #fitSpace
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1427
    or:[hLayout endsWith:'Max']]) ifTrue:[
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1428
	sumOfWidths := maxWidth * subViews size.
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1429
	borderWidth ~~ 0 ifTrue:[
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1430
	    sumOfWidths := sumOfWidths + (horizontalSpace * 2).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1431
	]
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1432
    ] ifFalse:[
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1433
	sumOfWidths := sumOfWidths + ((subViews size - 1) * horizontalSpace).
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1434
	((hLayout == #leftSpace) or:[hLayout == #rightSpace]) ifTrue:[
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1435
	    sumOfWidths := sumOfWidths + horizontalSpace
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1436
	] ifFalse:[
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1437
	    ((hLayout == #center) or:[hLayout == #spread]) ifTrue:[
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1438
		sumOfWidths := sumOfWidths + (horizontalSpace * 2)
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1439
	    ]
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1440
	].
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1441
    ].
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1442
1165
16b8537595fd care for spacing in preferredExtent of centerSpace layout.
Claus Gittinger <cg@exept.de>
parents: 1156
diff changeset
  1443
    ((vLayout == #topSpace) 
16b8537595fd care for spacing in preferredExtent of centerSpace layout.
Claus Gittinger <cg@exept.de>
parents: 1156
diff changeset
  1444
    or:[vLayout == #bottomSpace]) ifTrue:[
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1445
	maxHeight := maxHeight + verticalSpace
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1446
    ] ifFalse:[
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1447
	((vLayout == #fitSpace) 
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1448
	or:[vLayout == #center
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1449
	or:[vLayout == #centerSpace]]) ifTrue:[
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1450
	    maxHeight := maxHeight + (verticalSpace * 2)
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1451
	]        
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1452
    ].
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1453
379
a0ada7891fe9 looks bette if panels level is ~~ 0 AND subview has 0 level
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  1454
    m2 := margin * 2.
a0ada7891fe9 looks bette if panels level is ~~ 0 AND subview has 0 level
Claus Gittinger <cg@exept.de>
parents: 340
diff changeset
  1455
    ^ (sumOfWidths + m2) @ (maxHeight + m2)
340
f820bcd29a51 defaultExtent with rightSpace forgot about spacing
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
  1456
1418
3397ec6b8419 added ignoreInvisibleComponents stuff
Claus Gittinger <cg@exept.de>
parents: 1306
diff changeset
  1457
    "Modified: / 17.1.1998 / 00:18:38 / cg"
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1458
! !
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1459
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 797
diff changeset
  1460
!HorizontalPanelView class methodsFor:'documentation'!
205
6814c0bf8df8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 202
diff changeset
  1461
6814c0bf8df8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 202
diff changeset
  1462
version
1431
fd1e74d673ae really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
  1463
    ^ '$Header: /cvs/stx/stx/libwidg/HorizontalPanelView.st,v 1.36 1998-01-27 20:15:15 cg Exp $'
205
6814c0bf8df8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 202
diff changeset
  1464
! !