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