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