PanelView.st
author Claus Gittinger <cg@exept.de>
Fri, 27 Jun 1997 11:56:45 +0200
changeset 1254 c9e604f03e6a
parent 1216 3506a6474c42
child 1418 3397ec6b8419
permissions -rw-r--r--
code compactified (slightly)
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
60
f3c738c24ce6 mostly style
claus
parents: 38
diff changeset
     3
	      All Rights Reserved
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     4
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    11
"
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    12
119
claus
parents: 63
diff changeset
    13
SimpleView subclass:#PanelView
585
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    14
	instanceVariableNames:'hLayout vLayout verticalSpace horizontalSpace mustRearrange
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    15
		elementsChangeSize'
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    16
	classVariableNames:''
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    17
	poolDictionaries:''
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    18
	category:'Views-Layout'
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    19
!
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    20
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
    21
!PanelView class methodsFor:'documentation'!
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    22
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 15
diff changeset
    23
copyright
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 15
diff changeset
    24
"
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 15
diff changeset
    25
 COPYRIGHT (c) 1989 by Claus Gittinger
60
f3c738c24ce6 mostly style
claus
parents: 38
diff changeset
    26
	      All Rights Reserved
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    27
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 15
diff changeset
    28
 This software is furnished under a license and may be used
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 15
diff changeset
    29
 only in accordance with the terms of that license and with the
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 15
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 15
diff changeset
    31
 be provided or otherwise made available to, or used by, any
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 15
diff changeset
    32
 other person.  No title to or ownership of the software is
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 15
diff changeset
    33
 hereby transferred.
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 15
diff changeset
    34
"
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 15
diff changeset
    35
!
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    36
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 15
diff changeset
    37
documentation
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 15
diff changeset
    38
"
127
claus
parents: 125
diff changeset
    39
    this is a view for holding subviews. (layout-widget ?)
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 15
diff changeset
    40
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 15
diff changeset
    41
    Instances of PanelView try to get all their subviews into them,
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 15
diff changeset
    42
    arranging subviews left-to-right, top-to-bottom.
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 15
diff changeset
    43
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 15
diff changeset
    44
    If you dont like its layout, define a new subclass or use one of
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 15
diff changeset
    45
    the existing subclasses: HorizontalPanelView and VerticalPanelView.
60
f3c738c24ce6 mostly style
claus
parents: 38
diff changeset
    46
127
claus
parents: 125
diff changeset
    47
    The panel assumes, that the elements do not resize themselfes, after it
claus
parents: 125
diff changeset
    48
    became visible. This is not true for all widgets (buttons or labels may
claus
parents: 125
diff changeset
    49
    like to change). If you have changing elements, tell this to the panel
claus
parents: 125
diff changeset
    50
    with 'aPanel elementsChangeSize:true'. In that case, the panel will react
claus
parents: 125
diff changeset
    51
    to size changes, and reorganize things.
claus
parents: 125
diff changeset
    52
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 60
diff changeset
    53
    PanelViews normally delay the actual positioning/sizing of their elements,
60
f3c738c24ce6 mostly style
claus
parents: 38
diff changeset
    54
    until actually displayed. This is useful, if more elements are to
f3c738c24ce6 mostly style
claus
parents: 38
diff changeset
    55
    be added, to avoid repeated configuration of the elements.
f3c738c24ce6 mostly style
claus
parents: 38
diff changeset
    56
f3c738c24ce6 mostly style
claus
parents: 38
diff changeset
    57
    If you want to query for the relative position of an element BEFORE
f3c738c24ce6 mostly style
claus
parents: 38
diff changeset
    58
    the view is visible, you have to send #setChildPositionsIfChanged before
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 60
diff changeset
    59
    doing so (otherwise, you may get invalid origins from the subviews). As
f4eaf04d1eaf *** empty log message ***
claus
parents: 60
diff changeset
    60
    an example, the modalBoxes do so before showing themselfes to ask for the
f4eaf04d1eaf *** empty log message ***
claus
parents: 60
diff changeset
    61
    position of the ok-button relative to the top-left box-origin, in order to
f4eaf04d1eaf *** empty log message ***
claus
parents: 60
diff changeset
    62
    position the ok-button under the mouse-pointer.
f4eaf04d1eaf *** empty log message ***
claus
parents: 60
diff changeset
    63
585
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    64
    [Instance variables:]
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 60
diff changeset
    65
585
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    66
        hLayout         <Symbol>        controls horizontal layout; ignored in this
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    67
                                        class, but used in Horizontal- and
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    68
                                        VerticalPanelViews. See more info there.
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 60
diff changeset
    69
585
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    70
        vLayout         <Symbol>        controls vertical layout; ignored in this
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    71
                                        class, but used in Horizontal- and
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    72
                                        VerticalPanelViews. See more info there.
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 60
diff changeset
    73
585
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    74
        horizontalSpace <Integer>       number of pixels to use as space between elements
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    75
                                        defaults to ViewSpacing, which is 1mm
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 60
diff changeset
    76
585
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    77
        verticalSpace   <Integer>       number of pixels to use as space between elements
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    78
                                        defaults to ViewSpacing, which is 1mm
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 60
diff changeset
    79
585
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    80
        mustRearrange   <Boolean>       internal flag, if rearrangement is needed
125
claus
parents: 119
diff changeset
    81
585
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    82
        elementsChangeSize   
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    83
                        <Boolean>       if true, the panel takes care of this situation.
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    84
                                        By default, this is false.
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    85
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    86
    [author:]
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
    87
        Claus Gittinger
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 15
diff changeset
    88
"
787
c568dfd06f11 recompute & resize to the preferredExtent when views are added
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    89
! !
c568dfd06f11 recompute & resize to the preferredExtent when views are added
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    90
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
    91
!PanelView methodsFor:'accessing'!
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
    92
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
    93
elementsChangeSize:aBoolean
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
    94
    "tell the panel if elements are to change their size by themselfes
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
    95
     (for example, Lables or Buttons may do so if their contents changes).
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
    96
     Setting this flag will make the panel reorganize the elements whenever
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
    97
     any element changes its size."
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
    98
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
    99
    |subViews|
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   100
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   101
    elementsChangeSize := aBoolean.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   102
    aBoolean ifTrue:[
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   103
        (subViews := self subViews) notNil ifTrue:[
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   104
            subViews do:[:aView |
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   105
                aView addDependent:self
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   106
            ]
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   107
        ]
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   108
    ]
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   109
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   110
    "Modified: 28.1.1997 / 17:51:28 / cg"
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   111
!
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   112
1036
5958cde90d09 added dummy access to hLayout and vLayout.
ca
parents: 980
diff changeset
   113
horizontalLayout
5958cde90d09 added dummy access to hLayout and vLayout.
ca
parents: 980
diff changeset
   114
    "not supported by this view"
5958cde90d09 added dummy access to hLayout and vLayout.
ca
parents: 980
diff changeset
   115
5958cde90d09 added dummy access to hLayout and vLayout.
ca
parents: 980
diff changeset
   116
    ^ nil
5958cde90d09 added dummy access to hLayout and vLayout.
ca
parents: 980
diff changeset
   117
!
5958cde90d09 added dummy access to hLayout and vLayout.
ca
parents: 980
diff changeset
   118
5958cde90d09 added dummy access to hLayout and vLayout.
ca
parents: 980
diff changeset
   119
horizontalLayout:aLayoutSymbol
5958cde90d09 added dummy access to hLayout and vLayout.
ca
parents: 980
diff changeset
   120
    "not supported by this view"
5958cde90d09 added dummy access to hLayout and vLayout.
ca
parents: 980
diff changeset
   121
5958cde90d09 added dummy access to hLayout and vLayout.
ca
parents: 980
diff changeset
   122
!
5958cde90d09 added dummy access to hLayout and vLayout.
ca
parents: 980
diff changeset
   123
1072
79c647d81083 checkin from browser
ca
parents: 1042
diff changeset
   124
horizontalSpace
79c647d81083 checkin from browser
ca
parents: 1042
diff changeset
   125
    "return the horizontal space between elements on pixels (default is 1mm)"
79c647d81083 checkin from browser
ca
parents: 1042
diff changeset
   126
79c647d81083 checkin from browser
ca
parents: 1042
diff changeset
   127
    ^ horizontalSpace 
79c647d81083 checkin from browser
ca
parents: 1042
diff changeset
   128
!
79c647d81083 checkin from browser
ca
parents: 1042
diff changeset
   129
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   130
horizontalSpace:numberOfPixels
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   131
    "set the horizontal space between elements on pixels (default is 1mm)"
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   132
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   133
    horizontalSpace ~= numberOfPixels ifTrue:[
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   134
	horizontalSpace := numberOfPixels.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   135
	self layoutChanged
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   136
    ]
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   137
!
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   138
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   139
space:numberOfPixels
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   140
    "set the space between elements in pixels (default is 1mm) for both directions"
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   141
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   142
    (verticalSpace ~= numberOfPixels 
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   143
    or:[horizontalSpace ~= numberOfPixels]) ifTrue:[
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   144
	horizontalSpace := numberOfPixels.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   145
	verticalSpace := numberOfPixels.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   146
	self layoutChanged
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   147
    ]
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   148
!
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   149
1036
5958cde90d09 added dummy access to hLayout and vLayout.
ca
parents: 980
diff changeset
   150
verticalLayout
5958cde90d09 added dummy access to hLayout and vLayout.
ca
parents: 980
diff changeset
   151
    "not supported by this view"
5958cde90d09 added dummy access to hLayout and vLayout.
ca
parents: 980
diff changeset
   152
5958cde90d09 added dummy access to hLayout and vLayout.
ca
parents: 980
diff changeset
   153
    ^ nil
5958cde90d09 added dummy access to hLayout and vLayout.
ca
parents: 980
diff changeset
   154
!
5958cde90d09 added dummy access to hLayout and vLayout.
ca
parents: 980
diff changeset
   155
5958cde90d09 added dummy access to hLayout and vLayout.
ca
parents: 980
diff changeset
   156
verticalLayout:aLayoutSymbol
5958cde90d09 added dummy access to hLayout and vLayout.
ca
parents: 980
diff changeset
   157
    "not supported by this view"
5958cde90d09 added dummy access to hLayout and vLayout.
ca
parents: 980
diff changeset
   158
5958cde90d09 added dummy access to hLayout and vLayout.
ca
parents: 980
diff changeset
   159
!
5958cde90d09 added dummy access to hLayout and vLayout.
ca
parents: 980
diff changeset
   160
1072
79c647d81083 checkin from browser
ca
parents: 1042
diff changeset
   161
verticalSpace
79c647d81083 checkin from browser
ca
parents: 1042
diff changeset
   162
    "return the vertical space between elements on pixels (default is 1mm)"
79c647d81083 checkin from browser
ca
parents: 1042
diff changeset
   163
79c647d81083 checkin from browser
ca
parents: 1042
diff changeset
   164
    ^ verticalSpace 
79c647d81083 checkin from browser
ca
parents: 1042
diff changeset
   165
!
79c647d81083 checkin from browser
ca
parents: 1042
diff changeset
   166
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   167
verticalSpace:numberOfPixels
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   168
    "set the vertical space between elements (in pixels).
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   169
     The default is computed for 1mm spacing."
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   170
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   171
    verticalSpace ~= numberOfPixels ifTrue:[
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   172
	verticalSpace := numberOfPixels.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   173
	self layoutChanged
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   174
    ]
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   175
! !
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   176
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   177
!PanelView methodsFor:'adding & removing subviews'!
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   178
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   179
addComponent:aComponent
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   180
    "redefined to recompute layout when a component is added"
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   181
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   182
    super addComponent:aComponent.
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   183
    self addedView:aComponent
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   184
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   185
    "Created: 28.1.1997 / 17:44:18 / cg"
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   186
!
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   187
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   188
addSubView:aView
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   189
    "redefined to recompute layout when a subview is added"
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   190
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   191
    super addSubView:aView.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   192
    self addedView:aView
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   193
!
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   194
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   195
addSubView:newView after:aView
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   196
    "redefined to recompute layout when a subview is added"
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   197
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   198
    super addSubView:newView after:aView.
787
c568dfd06f11 recompute & resize to the preferredExtent when views are added
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   199
    self addedView:newView
c568dfd06f11 recompute & resize to the preferredExtent when views are added
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   200
c568dfd06f11 recompute & resize to the preferredExtent when views are added
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   201
    "Modified: 15.7.1996 / 10:15:04 / cg"
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   202
!
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   203
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   204
addSubView:newView before:aView
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   205
    "redefined to recompute layout when a subview is added"
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   206
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   207
    super addSubView:newView before:aView.
787
c568dfd06f11 recompute & resize to the preferredExtent when views are added
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   208
    self addedView:newView
c568dfd06f11 recompute & resize to the preferredExtent when views are added
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   209
c568dfd06f11 recompute & resize to the preferredExtent when views are added
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   210
    "Modified: 15.7.1996 / 10:14:39 / cg"
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   211
!
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   212
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   213
removeSubView:aView
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   214
    "redefined to recompute layout when a subview is removed"
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   215
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   216
    super removeSubView:aView.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   217
    aView removeDependent:self.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   218
    self layoutChanged
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 15
diff changeset
   219
! !
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   220
1159
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1072
diff changeset
   221
!PanelView methodsFor:'enumerating subviews'!
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1072
diff changeset
   222
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1072
diff changeset
   223
changeSequenceOrderFor:aSubView to:anIndex
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1072
diff changeset
   224
    "change a subview's position into subviews collection
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1072
diff changeset
   225
    "
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1072
diff changeset
   226
    |success|
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1072
diff changeset
   227
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1072
diff changeset
   228
    success := super changeSequenceOrderFor:aSubView to:anIndex.
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1072
diff changeset
   229
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1072
diff changeset
   230
    success ifTrue:[
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1072
diff changeset
   231
        self layoutChanged.
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1072
diff changeset
   232
    ].
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1072
diff changeset
   233
    ^ success
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1072
diff changeset
   234
! !
856ac1c6046c changeSequenceOrderFor:to:
ca
parents: 1072
diff changeset
   235
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   236
!PanelView methodsFor:'event processing'!
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   237
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   238
sizeChanged:how
119
claus
parents: 63
diff changeset
   239
    "my size has changed - must rearrange elements"
claus
parents: 63
diff changeset
   240
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   241
    super sizeChanged:how.
60
f3c738c24ce6 mostly style
claus
parents: 38
diff changeset
   242
    self layoutChanged
125
claus
parents: 119
diff changeset
   243
!
claus
parents: 119
diff changeset
   244
claus
parents: 119
diff changeset
   245
update:something with:aParameter from:changedObject
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   246
    "an element changed its size"
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   247
125
claus
parents: 119
diff changeset
   248
    something == #sizeOfView ifTrue:[
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   249
        self layoutChanged.
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   250
        ^ self
125
claus
parents: 119
diff changeset
   251
    ].
claus
parents: 119
diff changeset
   252
    ^ super update:something with:aParameter from:changedObject
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   253
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   254
    "Modified: 28.1.1997 / 17:52:44 / cg"
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   255
! !
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   256
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   257
!PanelView methodsFor:'initialization'!
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   258
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   259
initialize
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   260
    super initialize.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   261
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   262
    hLayout := vLayout := #center.  "/ notice, this is ignored in this class
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   263
				    "/ used by subclasses only
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   264
    verticalSpace := ViewSpacing.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   265
    horizontalSpace := ViewSpacing.
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   266
    mustRearrange := elementsChangeSize := false
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   267
!
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   268
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   269
realize
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   270
    mustRearrange ifTrue:[
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   271
	self setChildPositions
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   272
    ].
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   273
    super realize
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   274
!
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   275
1216
3506a6474c42 setChildPos if extent is set in create->resize->prefExtent
ca
parents: 1159
diff changeset
   276
resize
3506a6474c42 setChildPos if extent is set in create->resize->prefExtent
ca
parents: 1159
diff changeset
   277
    super resize.
3506a6474c42 setChildPos if extent is set in create->resize->prefExtent
ca
parents: 1159
diff changeset
   278
    mustRearrange ifTrue:[
3506a6474c42 setChildPos if extent is set in create->resize->prefExtent
ca
parents: 1159
diff changeset
   279
        self setChildPositions
3506a6474c42 setChildPos if extent is set in create->resize->prefExtent
ca
parents: 1159
diff changeset
   280
    ].
3506a6474c42 setChildPos if extent is set in create->resize->prefExtent
ca
parents: 1159
diff changeset
   281
!
3506a6474c42 setChildPos if extent is set in create->resize->prefExtent
ca
parents: 1159
diff changeset
   282
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   283
setChildPositionsIfChanged
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   284
    "set all of my child positions - this is usually delayed,
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   285
     until the panel is actually shown (since we dont know, if more
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   286
     elements are to be added) thus avoiding repositioning the elements
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   287
     over and over. However, sometimes it is nescessary, to force positioning
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   288
     the elements, for example, before querying the relative position of
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   289
     an element (modalBoxes do so, to position the ok-button under the mouse
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   290
     pointer)."
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   291
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   292
    mustRearrange ifTrue:[
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   293
	self setChildPositions
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   294
    ].
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   295
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   296
! !
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   297
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   298
!PanelView methodsFor:'private'!
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   299
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   300
addedView:aView
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   301
    "added a new element - rearrange components"
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   302
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   303
    elementsChangeSize ifTrue:[
787
c568dfd06f11 recompute & resize to the preferredExtent when views are added
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   304
        aView addDependent:self
c568dfd06f11 recompute & resize to the preferredExtent when views are added
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   305
    ].
c568dfd06f11 recompute & resize to the preferredExtent when views are added
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   306
    aView resize.
788
653fd742b5b0 extent handling when adding views
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
   307
"/    explicitExtent ~~ true ifTrue:[
653fd742b5b0 extent handling when adding views
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
   308
"/        self resize
653fd742b5b0 extent handling when adding views
Claus Gittinger <cg@exept.de>
parents: 787
diff changeset
   309
"/    ].
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   310
    self layoutChanged
787
c568dfd06f11 recompute & resize to the preferredExtent when views are added
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   311
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   312
    "Modified: 28.1.1997 / 17:45:10 / cg"
202
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   313
!
01f3cbb8e20e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   314
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   315
layoutChanged
119
claus
parents: 63
diff changeset
   316
    "called whenever repositioning is required. If the panel view is
claus
parents: 63
diff changeset
   317
     already visible, reposition elements right now. Otherwise, remember
claus
parents: 63
diff changeset
   318
     that a repositioning is needed to do so when the view eventually becomes
claus
parents: 63
diff changeset
   319
     visible."
claus
parents: 63
diff changeset
   320
15
0dbce35d3c69 *** empty log message ***
claus
parents: 5
diff changeset
   321
    shown ifTrue:[
60
f3c738c24ce6 mostly style
claus
parents: 38
diff changeset
   322
	self setChildPositions
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   323
    ] ifFalse:[
60
f3c738c24ce6 mostly style
claus
parents: 38
diff changeset
   324
	mustRearrange := true
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   325
    ]
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   326
!
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   327
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   328
setChildPositions
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 60
diff changeset
   329
    "(re)compute position of every child.
f4eaf04d1eaf *** empty log message ***
claus
parents: 60
diff changeset
   330
     This method is redefined for different layout characteristics - you may
f4eaf04d1eaf *** empty log message ***
claus
parents: 60
diff changeset
   331
     even create subclasses with completely different geometry management."
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   332
1042
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   333
    |first xpos ypos maxHeightInRow thisRow subViews ext|
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   334
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   335
    subViews := self subViews.
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   336
    subViews size == 0 ifTrue:[^ self].
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   337
1042
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   338
    extentChanged ifTrue:[
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   339
        ext := self computeExtent.
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   340
        width := ext x.
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   341
        height := ext y.
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   342
    ].
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   343
1042
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   344
    xpos := horizontalSpace.
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   345
    ypos := verticalSpace.
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   346
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   347
    maxHeightInRow := 0.
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   348
    first := true.
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   349
    thisRow := OrderedCollection new.
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   350
    subViews do:[:child |
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   351
        "go to next row, if this subview won't fit"
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   352
        first ifFalse: [
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   353
            (xpos + child widthIncludingBorder + horizontalSpace) > width
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   354
            ifTrue: [
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   355
                thisRow notEmpty ifTrue:[
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   356
                    thisRow do:[:rowElement |
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   357
                        rowElement heightIncludingBorder < maxHeightInRow ifTrue:[
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   358
                            rowElement top:(rowElement top + (maxHeightInRow - rowElement heightIncludingBorder))
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   359
                        ]
1042
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   360
                    ]
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   361
                ].
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   362
                ypos := ypos + verticalSpace + maxHeightInRow.
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   363
                xpos := horizontalSpace.
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   364
                maxHeightInRow := 0.
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   365
                thisRow := OrderedCollection new.
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   366
            ]
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   367
        ].
1042
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   368
        thisRow add:child.
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   369
        child origin:(xpos@ypos).
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   370
        xpos := xpos + (child widthIncludingBorder) + horizontalSpace.
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   371
        (maxHeightInRow < (child heightIncludingBorder)) ifTrue:[
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   372
            maxHeightInRow := child heightIncludingBorder
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   373
        ].
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   374
        first := false
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   375
    ].
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   376
    thisRow notEmpty ifTrue:[
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   377
        thisRow do:[:rowElement |
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   378
            rowElement heightIncludingBorder < maxHeightInRow ifTrue:[
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   379
                rowElement top:(rowElement top + (maxHeightInRow - rowElement heightIncludingBorder))
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   380
            ]
5914ecc423e1 care for sizing with no subviews;
ca
parents: 1036
diff changeset
   381
        ]
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   382
    ].
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   383
    mustRearrange := false
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   384
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   385
    "Modified: 28.1.1997 / 17:51:36 / cg"
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   386
! !
125
claus
parents: 119
diff changeset
   387
980
6079922a5519 eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents: 788
diff changeset
   388
!PanelView class methodsFor:'documentation'!
205
6814c0bf8df8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 202
diff changeset
   389
6814c0bf8df8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 202
diff changeset
   390
version
1216
3506a6474c42 setChildPos if extent is set in create->resize->prefExtent
ca
parents: 1159
diff changeset
   391
    ^ '$Header: /cvs/stx/stx/libwidg/PanelView.st,v 1.24 1997-05-06 07:30:32 ca Exp $'
205
6814c0bf8df8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 202
diff changeset
   392
! !