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