UILayoutTool.st
author ca
Tue, 26 Aug 1997 17:40:37 +0200
changeset 293 54d00bdebfa9
parent 283 2f98233309f0
child 296 e542c6fb0de7
permissions -rw-r--r--
update help text
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
     1
"
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
     2
 COPYRIGHT (c) 1995 by eXept Software AG
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
     3
              All Rights Reserved
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
     4
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
     5
 This software is furnished under a license and may be used
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    10
 hereby transferred.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    11
"
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    12
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    13
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    14
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    15
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    16
ApplicationModel subclass:#UILayoutTool
221
319a24a1df06 slow grow operation on array removed
ca
parents: 201
diff changeset
    17
	instanceVariableNames:'modifiedHolder aspects selection layoutView tabList'
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    18
	classVariableNames:''
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    19
	poolDictionaries:''
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    20
	category:'Interface-UIPainter'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    21
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    22
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
    23
ApplicationModel subclass:#AlignmentOrigin
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    24
	instanceVariableNames:''
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    25
	classVariableNames:''
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    26
	poolDictionaries:''
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    27
	privateIn:UILayoutTool
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    28
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    29
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
    30
ApplicationModel subclass:#Extent
700f2ee9911e add help for components
ca
parents: 163
diff changeset
    31
	instanceVariableNames:''
700f2ee9911e add help for components
ca
parents: 163
diff changeset
    32
	classVariableNames:''
700f2ee9911e add help for components
ca
parents: 163
diff changeset
    33
	poolDictionaries:''
700f2ee9911e add help for components
ca
parents: 163
diff changeset
    34
	privateIn:UILayoutTool
700f2ee9911e add help for components
ca
parents: 163
diff changeset
    35
!
700f2ee9911e add help for components
ca
parents: 163
diff changeset
    36
700f2ee9911e add help for components
ca
parents: 163
diff changeset
    37
ApplicationModel subclass:#LayoutFrame
700f2ee9911e add help for components
ca
parents: 163
diff changeset
    38
	instanceVariableNames:''
700f2ee9911e add help for components
ca
parents: 163
diff changeset
    39
	classVariableNames:''
700f2ee9911e add help for components
ca
parents: 163
diff changeset
    40
	poolDictionaries:''
700f2ee9911e add help for components
ca
parents: 163
diff changeset
    41
	privateIn:UILayoutTool
700f2ee9911e add help for components
ca
parents: 163
diff changeset
    42
!
700f2ee9911e add help for components
ca
parents: 163
diff changeset
    43
700f2ee9911e add help for components
ca
parents: 163
diff changeset
    44
ApplicationModel subclass:#LayoutOrigin
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    45
	instanceVariableNames:''
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    46
	classVariableNames:''
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    47
	poolDictionaries:''
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    48
	privateIn:UILayoutTool
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    49
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    50
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    51
ApplicationModel subclass:#Point
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    52
	instanceVariableNames:''
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    53
	classVariableNames:''
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    54
	poolDictionaries:''
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    55
	privateIn:UILayoutTool
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    56
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    57
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
    58
ApplicationModel subclass:#Rectangle
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    59
	instanceVariableNames:''
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    60
	classVariableNames:''
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    61
	poolDictionaries:''
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    62
	privateIn:UILayoutTool
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    63
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    64
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    65
!UILayoutTool class methodsFor:'documentation'!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    66
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    67
copyright
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    68
"
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    69
 COPYRIGHT (c) 1995 by eXept Software AG
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    70
              All Rights Reserved
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    71
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    72
 This software is furnished under a license and may be used
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    73
 only in accordance with the terms of that license and with the
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    74
 inclusion of the above copyright notice.   This software may not
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    75
 be provided or otherwise made available to, or used by, any
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    76
 other person.  No title to or ownership of the software is
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    77
 hereby transferred.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    78
"
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    79
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    80
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    81
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    82
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    83
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    84
documentation
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    85
"
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    86
    used by the UIPainter to manipulate the layout of the selected component
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    87
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    88
    [author:]
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    89
        Claus Atzkern
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    90
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    91
    [see also:]
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    92
        UIPainter
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    93
        UIHelpTool
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    94
        UISpecificationTool
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    95
"
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    96
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    97
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    98
! !
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    99
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   100
!UILayoutTool class methodsFor:'constants'!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   101
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   102
label
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   103
    ^ 'Layout'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   104
! !
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   105
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   106
!UILayoutTool class methodsFor:'help specs'!
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   107
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   108
helpSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   109
    "return a dictionary filled with helpKey -> helptext associations.
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   110
     These are used by the activeHelp tool."
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   111
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   112
    "
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   113
    UIHelpTool openOnClass:UILayoutTool    
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   114
    "
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   115
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   116
  ^ super helpSpec addPairsFrom:#(
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   117
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   118
#leftAbsolute
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   119
'offset of the left edge; positive is to the right, negative to the left'
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   120
201
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   121
#originY
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   122
'absolute origin y'
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   123
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   124
#cornerY
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   125
'absolute corner y'
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   126
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   127
#makeLeftAbsolute
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   128
'compute current left offset and relative origin x to an absolute origin x'
201
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   129
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   130
#topAbsolute
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   131
'offset of the top edge; positive is to the bottom, negative to the top'
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   132
201
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   133
#makeTopRelative
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   134
'compute current relative origin y and offset of the top edge to a relative origin y'
201
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   135
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   136
#leftRelative
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   137
'relative origin x'
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   138
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   139
#makeLeftRelative
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   140
'compute current relative origin x and offset of the left edge to a relative origin x'
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   141
201
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   142
#topRelative
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   143
'relative origin y'
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   144
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   145
#originX
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   146
'absolute origin x'
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   147
201
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   148
#cornerX
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   149
'absolute corner x'
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   150
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   151
#layoutTool
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   152
'tool to set the layout of the component'
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   153
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   154
#makeTopAbsolute
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   155
'compute current top offset and relative origin y to an absolute origin y'
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   156
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   157
)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   158
! !
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   159
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   160
!UILayoutTool class methodsFor:'interface specs'!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   161
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   162
layoutOriginSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   163
    "this window spec was automatically generated by the ST/X UIPainter"
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   164
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   165
    "do not manually edit this - the painter/builder may not be able to
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   166
     handle the specification if its corrupted."
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   167
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   168
    "
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
   169
     UIPainter new openOnClass:UILayoutTool andSelector:#layoutOriginSpec
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
   170
     UILayoutTool new openInterface:#layoutOriginSpec
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   171
    "
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   172
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   173
    <resource: #canvas>
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   174
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   175
    ^
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
   176
     
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   177
       #(#FullSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   178
          #'window:' 
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   179
           #(#WindowSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   180
              #'name:' 'uIPainterView'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   181
              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   182
              #'label:' 'unnamed'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   183
              #'bounds:' #(#Rectangle 0 0 258 93)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   184
          )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   185
          #'component:' 
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   186
           #(#SpecCollection
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   187
              #'collection:' 
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   188
               #(
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   189
                 #(#LabelSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   190
                    #'name:' 'labelRelative'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   191
                    #'layout:' #(#Point 57 12)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   192
                    #'label:' 'relative'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   193
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   194
                 #(#LabelSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   195
                    #'name:' 'labelAbsolute'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   196
                    #'layout:' #(#Point 154 13)
185
10b797de4c2d update help text
ca
parents: 184
diff changeset
   197
                    #'label:' 'offset'
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   198
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   199
                 #(#LabelSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   200
                    #'name:' 'labelLeft'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   201
                    #'layout:' #(#AlignmentOrigin 52 0 44 0 1 0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   202
                    #'label:' 'left'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   203
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   204
                 #(#InputFieldSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   205
                    #'name:' 'fieldLeftFraction'
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
   206
                    #'layout:' #(#LayoutFrame 57 0 44 0 114 0 66 0)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   207
                    #'activeHelpKey:' #leftRelative
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   208
                    #'tabable:' true
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   209
                    #'model:' #leftFraction
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   210
                    #'type:' #numberOrNil
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   211
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   212
                 #(#ActionButtonSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   213
                    #'name:' 'actionRelativeLeft'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   214
                    #'layout:' #(#LayoutFrame 119 0 44 0 138 0 62 0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   215
                    #'activeHelpKey:' #makeLeftRelative
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   216
                    #'model:' #relativeLeft
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   217
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   218
                 #(#InputFieldSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   219
                    #'name:' 'fieldLeftOffset'
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
   220
                    #'layout:' #(#LayoutFrame 154 0 44 0 212 0 66 0)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   221
                    #'activeHelpKey:' #leftAbsolute
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   222
                    #'tabable:' true
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   223
                    #'model:' #leftOffset
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   224
                    #'type:' #numberOrNil
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   225
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   226
                 #(#ActionButtonSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   227
                    #'name:' 'actionAbsoluteLeft'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   228
                    #'layout:' #(#LayoutFrame 216 0 44 0 235 0 62 0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   229
                    #'activeHelpKey:' #makeLeftAbsolute
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   230
                    #'model:' #absoluteLeft
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   231
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   232
                 #(#LabelSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   233
                    #'name:' 'labelTop'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   234
                    #'layout:' #(#AlignmentOrigin 52 0 71 0 1 0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   235
                    #'label:' 'top'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   236
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   237
                 #(#InputFieldSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   238
                    #'name:' 'fieldTopFraction'
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
   239
                    #'layout:' #(#LayoutFrame 57 0 71 0 114 0 93 0)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   240
                    #'activeHelpKey:' #topRelative
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   241
                    #'tabable:' true
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   242
                    #'model:' #topFraction
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   243
                    #'type:' #numberOrNil
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   244
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   245
                 #(#ActionButtonSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   246
                    #'name:' 'actionRelativeTop'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   247
                    #'layout:' #(#LayoutFrame 119 0 71 0 138 0 89 0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   248
                    #'activeHelpKey:' #makeTopRelative
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   249
                    #'model:' #relativeTop
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   250
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   251
                 #(#InputFieldSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   252
                    #'name:' 'fieldTopOffset'
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
   253
                    #'layout:' #(#LayoutFrame 154 0 71 0 212 0 93 0)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   254
                    #'activeHelpKey:' #topAbsolute
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   255
                    #'tabable:' true
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   256
                    #'model:' #topOffset
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   257
                    #'type:' #numberOrNil
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   258
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   259
                 #(#ActionButtonSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   260
                    #'name:' 'actionAbsoluteTop'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   261
                    #'layout:' #(#LayoutFrame 216 0 71 0 235 0 89 0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   262
                    #'activeHelpKey:' #makeTopAbsolute
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   263
                    #'model:' #absoluteTop
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   264
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   265
              )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   266
          )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   267
      )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   268
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
   269
    "Modified: 28.7.1997 / 13:50:23 / cg"
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   270
!
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   271
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   272
layoutPointSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   273
    "this window spec was automatically generated by the ST/X UIPainter"
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   274
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   275
    "do not manually edit this - the painter/builder may not be able to
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   276
     handle the specification if its corrupted."
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   277
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   278
    "
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
   279
     UIPainter new openOnClass:UILayoutTool andSelector:#layoutPointSpec
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
   280
     UILayoutTool new openInterface:#layoutPointSpec
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   281
    "
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
   282
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   283
    <resource: #canvas>
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   284
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   285
    ^
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
   286
     
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   287
       #(#FullSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   288
          #'window:' 
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   289
           #(#WindowSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   290
              #'name:' 'uIPainterView'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   291
              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   292
              #'label:' 'unnamed'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   293
              #'bounds:' #(#Rectangle 0 0 194 66)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   294
          )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   295
          #'component:' 
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   296
           #(#SpecCollection
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   297
              #'collection:' 
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   298
               #(
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   299
                 #(#LabelSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   300
                    #'name:' 'labelOriginX'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   301
                    #'layout:' #(#AlignmentOrigin 75 0 19 0 1 0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   302
                    #'label:' 'origin x:'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   303
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   304
                 #(#InputFieldSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   305
                    #'name:' 'fieldOriginX'
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
   306
                    #'layout:' #(#LayoutFrame 77 0 19 0 170 0 41 0)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   307
                    #'activeHelpKey:' #originX
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   308
                    #'tabable:' true
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   309
                    #'model:' #leftOffset
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   310
                    #'type:' #numberOrNil
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   311
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   312
                 #(#LabelSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   313
                    #'name:' 'labelOriginY'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   314
                    #'layout:' #(#AlignmentOrigin 75 0 46 0 1 0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   315
                    #'label:' 'origin y:'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   316
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   317
                 #(#InputFieldSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   318
                    #'name:' 'fieldOriginY'
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
   319
                    #'layout:' #(#LayoutFrame 77 0 46 0 170 0 68 0)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   320
                    #'activeHelpKey:' #originY
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   321
                    #'tabable:' true
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   322
                    #'model:' #topOffset
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   323
                    #'type:' #numberOrNil
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   324
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   325
              )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   326
          )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   327
      )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   328
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
   329
    "Modified: 28.7.1997 / 14:12:22 / cg"
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   330
!
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   331
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   332
slices
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   333
    ^ #(
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   334
        ( 'Frame'          LayoutFrame)
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   335
        ( 'Origin'         LayoutOrigin)
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   336
        ( 'Alig.Origin'    AlignmentOrigin)
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   337
        ( 'Point'          Point)
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   338
        ( 'Rectangle'      Rectangle)
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   339
        ( 'Extent'         Extent)
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   340
       ) 
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   341
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   342
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   343
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   344
windowSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   345
    "this window spec was automatically generated by the ST/X UIPainter"
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   346
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   347
    "do not manually edit this - the painter/builder may not be able to
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   348
     handle the specification if its corrupted."
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   349
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   350
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   351
     UIPainter new openOnClass:UILayoutTool andSelector:#windowSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   352
     UILayoutTool new openInterface:#windowSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   353
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   354
    "UILayoutTool open"
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   355
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   356
    <resource: #canvas>
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   357
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   358
    ^
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   359
     
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   360
       #(#FullSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   361
          #'window:' 
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   362
           #(#WindowSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   363
              #'name:' 'uIPainterView'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   364
              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   365
              #'label:' 'unnamed canvas'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   366
              #'bounds:' #(#Rectangle 0 0 300 300)
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   367
          )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   368
          #'component:' 
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   369
           #(#SpecCollection
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   370
              #'collection:' 
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   371
               #(
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   372
                 #(#NoteBookViewSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   373
                    #'name:' 'NoteBook'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   374
                    #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   375
                    #'activeHelpKey:' #layoutTool
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   376
                    #'enableChannel:' #enableChannel
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   377
                    #'tabable:' true
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   378
                    #'menu:' #noteBookList
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   379
                    #'style:' 
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   380
                     #(#FontDescription
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   381
                        #helvetica #medium
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   382
                        #roman #'10'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   383
                    )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   384
                    #'model:' #noteBookModel
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   385
                    #'tabWidget:' #Window
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   386
                    #'direction:' #bottom
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   387
                    #'canvas:' #noteBookView
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   388
                )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   389
              )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   390
          )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   391
      )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   392
! !
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   393
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   394
!UILayoutTool methodsFor:'accessing'!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   395
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   396
layout
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   397
    "returns configued layout or nil
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   398
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   399
    |appl|
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   400
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   401
    (appl := self noteBookView application) notNil ifTrue:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   402
        ^ appl layout
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   403
    ].
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   404
  ^ nil
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   405
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   406
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   407
layoutType
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   408
    "returns current layout type or nil
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   409
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   410
    |slice|
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   411
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   412
    (slice := self selectedSlice) notNil ifTrue:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   413
        ^ slice last
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   414
    ].
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   415
  ^ nil
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   416
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   417
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   418
layoutView
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   419
    "returns current edited view
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   420
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   421
    ^ layoutView
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   422
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   423
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   424
layoutView:aView
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   425
    "change current edited view
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   426
    "
283
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   427
    self layoutView:aView type:nil
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   428
!
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   429
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   430
layoutView:aView type:aTypeOrNil
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   431
    "change current edited view
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   432
    "
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   433
    |type name list|
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   434
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   435
    layoutView := aView.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   436
283
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   437
    aTypeOrNil notNil ifTrue:[
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   438
        self class slices findFirst:[:e|
283
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   439
            e last == aTypeOrNil ifTrue:[name := e first. true]
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   440
        ].
283
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   441
        list := Array with:name
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   442
    ] ifFalse:[
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   443
        (type := UIPainterView layoutType:layoutView) notNil ifTrue:[
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   444
            self class slices findFirst:[:e|
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   445
                e last == type ifTrue:[name := e first. true]
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   446
            ].
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   447
            list := tabList.
235
4e6c0d0c6ba5 in case of layout container set extent otherwise all
ca
parents: 221
diff changeset
   448
283
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   449
            type == #Extent ifTrue:[
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   450
                aView superView specClass isLayoutContainer ifTrue:[
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   451
                    list := Array with:name
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   452
                ] ifFalse:[
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   453
                    list := list copyWith:name
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   454
                ]
235
4e6c0d0c6ba5 in case of layout container set extent otherwise all
ca
parents: 221
diff changeset
   455
            ]
4e6c0d0c6ba5 in case of layout container set extent otherwise all
ca
parents: 221
diff changeset
   456
        ]
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   457
    ].
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   458
    self noteBookList  value:list.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   459
    self noteBookModel value:name.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   460
    self update.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   461
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   462
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   463
modifiedHolder:aValueHolder
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   464
    "set the value holder set to true in case of modifying attributes
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   465
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   466
    modifiedHolder notNil ifTrue:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   467
        modifiedHolder removeDependent:self. 
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   468
    ].
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   469
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   470
    (modifiedHolder := aValueHolder) notNil ifTrue:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   471
        modifiedHolder addDependent:self.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   472
    ].
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   473
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   474
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   475
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   476
update
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   477
    "update from view
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   478
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   479
    |view appl|
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   480
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   481
    selection notNil ifTrue:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   482
        (view := self layoutView) notNil ifTrue:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   483
            (appl := self noteBookView application) notNil ifTrue:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   484
                appl fetch:view
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   485
            ]
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   486
        ]
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   487
    ].
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   488
        
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   489
! !
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   490
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   491
!UILayoutTool methodsFor:'aspects'!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   492
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   493
aspectFor:aKey
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   494
    "returns aspect for a key or nil
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   495
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   496
  ^ aspects at:aKey ifAbsent:[ super aspectFor:aKey ]
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   497
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   498
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   499
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   500
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   501
noteBookList
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   502
    "returns list of tab labels
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   503
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   504
    |holder|
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   505
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   506
    (holder := builder bindingAt:#noteBookList) isNil ifTrue:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   507
        holder := nil asValue.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   508
        builder aspectAt:#noteBookList put:holder
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   509
    ].
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   510
  ^ holder
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   511
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   512
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   513
noteBookModel
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   514
    "automatically generated by UIPainter ..."
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   515
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   516
    |holder|
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   517
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   518
    (holder := builder bindingAt:#noteBookModel) isNil ifTrue:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   519
        holder := AspectAdaptor new subject:self; forAspect:#selection.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   520
        builder aspectAt:#noteBookModel put:holder.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   521
    ].
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   522
    ^ holder
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   523
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   524
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   525
noteBookView
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   526
    "automatically generated by UIPainter ...
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   527
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   528
    |holder|
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   529
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   530
    (holder := builder bindingAt:#noteBookView) isNil ifTrue:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   531
        holder := SubCanvas new.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   532
        builder aspectAt:#noteBookView put:holder
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   533
    ].
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   534
  ^ holder
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   535
! !
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   536
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   537
!UILayoutTool methodsFor:'change & update'!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   538
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   539
update:something with:aParameter from:changedObject
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   540
    "one of my models changed its value
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   541
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   542
    changedObject ~~ modifiedHolder ifTrue:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   543
        modifiedHolder value ~~ true ifTrue:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   544
            modifiedHolder isNil ifFalse:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   545
                modifiedHolder value:true
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   546
            ]
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   547
        ]
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   548
    ]
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   549
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   550
! !
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   551
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   552
!UILayoutTool methodsFor:'converting absolute'!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   553
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   554
absolute:what xOrY:xOrY
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   555
    |extent fraction offset fractSymb offsetSymb|
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   556
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   557
    extent     := (self layoutView superView computeExtent) perform:xOrY.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   558
    fractSymb  := (what, 'Fraction') asSymbol.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   559
    offsetSymb := (what,   'Offset') asSymbol.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   560
    fraction   := (self aspectFor:fractSymb)  value.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   561
    offset     := (self aspectFor:offsetSymb) value.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   562
    offset     := offset + ((fraction * extent) asInteger).
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   563
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   564
    (self aspectFor:offsetSymb) value:offset.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   565
    (self aspectFor:fractSymb)  value:0.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   566
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   567
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   568
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   569
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   570
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   571
absoluteBottom
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   572
    self absolute:'bottom' xOrY:#y
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   573
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   574
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   575
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   576
absoluteLeft
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   577
    self absolute:'left' xOrY:#x
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   578
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   579
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   580
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   581
absoluteRight
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   582
    self absolute:'right' xOrY:#x
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   583
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   584
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   585
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   586
absoluteTop
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   587
    self absolute:'top' xOrY:#y
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   588
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   589
! !
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   590
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   591
!UILayoutTool methodsFor:'converting relative'!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   592
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   593
relative:what xOrY:xOrY
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   594
    |extent fraction offset fractSymb offsetSymb|
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   595
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   596
    extent     := (self layoutView superView computeExtent) perform:xOrY.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   597
    fractSymb  := (what, 'Fraction') asSymbol.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   598
    offsetSymb := (what,   'Offset') asSymbol.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   599
    fraction   := (self aspectFor:fractSymb)  value.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   600
    offset     := (self aspectFor:offsetSymb) value.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   601
    fraction   := (fraction + (offset / extent)) asFloat.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   602
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   603
    (fraction > 1.0) ifTrue:[ fraction := 1.0 ].
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   604
    (fraction < 0.0) ifTrue:[ fraction := 0 ].
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   605
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   606
    (self aspectFor:offsetSymb) value:0.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   607
    (self aspectFor:fractSymb)  value:fraction.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   608
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   609
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   610
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   611
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   612
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   613
relativeBottom
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   614
    self relative:'bottom' xOrY:#y
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   615
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   616
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   617
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   618
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   619
relativeLeft
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   620
    self relative:'left' xOrY:#x
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   621
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   622
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   623
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   624
relativeRight
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   625
    self relative:'right' xOrY:#x
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   626
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   627
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   628
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   629
relativeTop
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   630
    self relative:'top' xOrY:#y
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   631
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   632
! !
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   633
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   634
!UILayoutTool methodsFor:'initialization'!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   635
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   636
initialize
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   637
    "initialize channels
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   638
    "
221
319a24a1df06 slow grow operation on array removed
ca
parents: 201
diff changeset
   639
    |slices size|
319a24a1df06 slow grow operation on array removed
ca
parents: 201
diff changeset
   640
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   641
    super initialize.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   642
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   643
    aspects  := IdentityDictionary new.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   644
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   645
    #(  bottomFraction          bottomOffset
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   646
        leftFraction            leftOffset
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   647
        topFraction             topOffset
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   648
        rightFraction           rightOffset
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   649
        leftAlignmentFraction   topAlignmentFraction
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   650
    )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   651
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   652
    do:[:aKey||holder|
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   653
        holder := ValueHolder new.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   654
        holder addDependent:self.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   655
        aspects at:aKey put:holder.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   656
    ].
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   657
221
319a24a1df06 slow grow operation on array removed
ca
parents: 201
diff changeset
   658
    slices  := self class slices.
319a24a1df06 slow grow operation on array removed
ca
parents: 201
diff changeset
   659
    size    := slices size - 1.
319a24a1df06 slow grow operation on array removed
ca
parents: 201
diff changeset
   660
    tabList := Array new:size.
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   661
221
319a24a1df06 slow grow operation on array removed
ca
parents: 201
diff changeset
   662
    1 to:size do:[:i| tabList at:i put:((slices at:i) first) ].
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   663
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   664
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   665
! !
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   666
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   667
!UILayoutTool methodsFor:'selection'!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   668
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   669
selectedSlice
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   670
    "returns slice assigned to selection or nil
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   671
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   672
    selection notNil ifTrue:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   673
        self class slices do:[:aSlice|
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   674
            aSlice first = selection ifTrue:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   675
                ^ aSlice
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   676
            ]
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   677
        ]
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   678
    ].
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   679
    ^ nil
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   680
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   681
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   682
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   683
selection
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   684
    ^ selection
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   685
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   686
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   687
selection:aSelection
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   688
    |appl slice sel|
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   689
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   690
    aSelection isNumber ifTrue:[
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   691
        aSelection ~~ 0 ifTrue:[sel := tabList at:aSelection]
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   692
    ] ifFalse:[
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   693
        sel := aSelection
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   694
    ].
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   695
    selection = sel ifFalse:[
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   696
        (selection := sel) notNil ifTrue:[
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   697
            slice := self selectedSlice.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   698
            appl  := slice last asString.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   699
            appl := Smalltalk classNamed:(self class name asString, '::', appl).
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   700
            appl := appl new.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   701
            appl masterApplication:self.
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   702
            modifiedHolder value:true.
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   703
        ].
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   704
        self noteBookView client:appl.
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   705
    ].
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   706
    self update
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   707
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   708
! !
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   709
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   710
!UILayoutTool::AlignmentOrigin class methodsFor:'help specs'!
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   711
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   712
helpSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   713
    "return a dictionary filled with helpKey -> helptext associations.
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   714
     These are used by the activeHelp tool."
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   715
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   716
    "
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   717
    UIHelpTool openOnClass:UILayoutTool::AlignmentOrigin    
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   718
    "
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   719
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   720
  ^ super helpSpec addPairsFrom:#(
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   721
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   722
#alignLeftCenter
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   723
'align components leftCenter to location'
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   724
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   725
#alignBottomCenter
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   726
'align components bottomCenter to location'
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   727
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   728
#alignHorizontal
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   729
'horizontal inset to the location point of the component'
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   730
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   731
#alignBottomRight
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   732
'align components bottomRight to location'
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   733
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   734
#alignTopCenter
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   735
'align components topCenter to location'
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   736
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   737
#alignTopLeft
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   738
'align components topLeft to location'
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   739
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   740
#alignTopRight
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   741
'align components topRight to location'
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   742
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   743
#alignCenter
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   744
'align components center to location'
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   745
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   746
#alignVertical
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   747
'vertical inset to the location point of the component'
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   748
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   749
#alignBottomLeft
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   750
'align components bottomLeft to location'
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   751
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   752
#alignRightCenter
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   753
'align components rightCenter to location'
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   754
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   755
)
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   756
! !
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   757
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   758
!UILayoutTool::AlignmentOrigin class methodsFor:'interface specs'!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   759
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   760
windowSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   761
    "this window spec was automatically generated by the ST/X UIPainter"
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   762
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   763
    "do not manually edit this - the painter/builder may not be able to
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   764
     handle the specification if its corrupted."
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   765
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   766
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   767
     UIPainter new openOnClass:UILayoutTool::AlignmentOrigin andSelector:#windowSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   768
     UILayoutTool::AlignmentOrigin new openInterface:#windowSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   769
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   770
    "UILayoutTool::AlignmentOrigin open"
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   771
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   772
    <resource: #canvas>
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   773
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   774
    ^
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   775
     
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   776
       #(#FullSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   777
          #'window:' 
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   778
           #(#WindowSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   779
              #'name:' 'uIPainterView'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   780
              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   781
              #'label:' 'AlignmentOrigin'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   782
              #'bounds:' #(#Rectangle 0 0 268 205)
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   783
          )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   784
          #'component:' 
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   785
           #(#SpecCollection
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   786
              #'collection:' 
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   787
               #(
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   788
                 #(#UISubSpecification
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   789
                    #'name:' 'subSpecification'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   790
                    #'layout:' #(#LayoutOrigin 0 0 0 0)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   791
                    #'majorKey:' #UILayoutTool
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   792
                    #'minorKey:' #layoutOriginSpec
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   793
                )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   794
                 #(#LabelSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   795
                    #'name:' 'label5'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   796
                    #'layout:' #(#AlignmentOrigin 84 0 106 0 1 0)
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   797
                    #'label:' 'align H'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   798
                    #'adjust:' #right
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   799
                )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   800
                 #(#LabelSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   801
                    #'name:' 'label6'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   802
                    #'layout:' #(#AlignmentOrigin 84 0 132 0 1 0)
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   803
                    #'label:' 'align V'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   804
                    #'adjust:' #right
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   805
                )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   806
                 #(#InputFieldSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   807
                    #'name:' 'editField5'
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
   808
                    #'layout:' #(#LayoutFrame 89 0 106 0 146 0 128 0)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   809
                    #'activeHelpKey:' #alignHorizontal
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   810
                    #'tabable:' true
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   811
                    #'model:' #leftAlignmentFraction
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   812
                    #'type:' #numberOrNil
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   813
                )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   814
                 #(#InputFieldSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   815
                    #'name:' 'editField6'
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
   816
                    #'layout:' #(#LayoutFrame 89 0 132 0 146 0 154 0)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   817
                    #'activeHelpKey:' #alignVertical
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   818
                    #'tabable:' true
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   819
                    #'model:' #topAlignmentFraction
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   820
                    #'type:' #numberOrNil
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   821
                )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   822
                 #(#DividerSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   823
                    #'name:' 'separator1'
262
4b5889b5066c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 260
diff changeset
   824
                    #'layout:' #(#Rectangle 175 110 224 115)
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   825
                    #'orientation:' #horizontal
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   826
                )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   827
                 #(#DividerSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   828
                    #'name:' 'separator2'
262
4b5889b5066c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 260
diff changeset
   829
                    #'layout:' #(#Rectangle 175 140 224 145)
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   830
                    #'orientation:' #horizontal
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   831
                )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   832
                 #(#DividerSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   833
                    #'name:' 'separator3'
262
4b5889b5066c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 260
diff changeset
   834
                    #'layout:' #(#Rectangle 170 118 175 139)
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   835
                    #'orientation:' #vertical
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   836
                )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   837
                 #(#DividerSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   838
                    #'name:' 'separator4'
262
4b5889b5066c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 260
diff changeset
   839
                    #'layout:' #(#Rectangle 226 118 231 139)
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   840
                    #'orientation:' #vertical
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   841
                )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   842
                 #(#ActionButtonSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   843
                    #'name:' 'alignBottomRight'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   844
                    #'layout:' #(#Rectangle 222 138 234 150)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   845
                    #'activeHelpKey:' #alignBottomRight
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   846
                    #'model:' #alignBottomRight
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   847
                )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   848
                 #(#ActionButtonSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   849
                    #'name:' 'alignTopLeft'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   850
                    #'layout:' #(#Rectangle 166 107 178 119)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   851
                    #'activeHelpKey:' #alignTopLeft
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   852
                    #'model:' #alignTopLeft
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   853
                )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   854
                 #(#ActionButtonSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   855
                    #'name:' 'alignTopRight'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   856
                    #'layout:' #(#Rectangle 222 107 234 119)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   857
                    #'activeHelpKey:' #alignTopRight
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   858
                    #'model:' #alignTopRight
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   859
                )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   860
                 #(#ActionButtonSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   861
                    #'name:' 'alignBottomLeft'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   862
                    #'layout:' #(#Rectangle 166 137 178 149)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   863
                    #'activeHelpKey:' #alignBottomLeft
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   864
                    #'model:' #alignBottomLeft
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   865
                )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   866
                 #(#ActionButtonSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   867
                    #'name:' 'alignTopCenter'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   868
                    #'layout:' #(#Rectangle 194 107 206 119)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   869
                    #'activeHelpKey:' #alignTopCenter
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   870
                    #'model:' #alignTopCenter
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   871
                )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   872
                 #(#ActionButtonSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   873
                    #'name:' 'alignBottomCenter'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   874
                    #'layout:' #(#Rectangle 194 138 206 150)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   875
                    #'activeHelpKey:' #alignBottomCenter
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   876
                    #'model:' #alignBottomCenter
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   877
                )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   878
                 #(#ActionButtonSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   879
                    #'name:' 'alignLeftCenter'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   880
                    #'layout:' #(#Rectangle 166 122 178 134)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   881
                    #'activeHelpKey:' #alignLeftCenter
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   882
                    #'model:' #alignLeftCenter
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   883
                )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   884
                 #(#ActionButtonSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   885
                    #'name:' 'alignRightCenter'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   886
                    #'layout:' #(#Rectangle 222 122 234 134)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   887
                    #'activeHelpKey:' #alignRightCenter
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   888
                    #'model:' #alignRightCenter
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   889
                )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   890
                 #(#ActionButtonSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   891
                    #'name:' 'alignCenter'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   892
                    #'layout:' #(#Rectangle 194 122 206 134)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   893
                    #'activeHelpKey:' #alignCenter
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   894
                    #'model:' #alignCenter
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   895
                )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   896
              )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   897
          )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   898
      )
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
   899
262
4b5889b5066c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 260
diff changeset
   900
    "Modified: 28.7.1997 / 15:12:25 / cg"
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   901
! !
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   902
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   903
!UILayoutTool::AlignmentOrigin methodsFor:'accessing'!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   904
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   905
fetch:aView
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   906
    "fetch alignmentOrigin
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   907
    "
252
c7ee94ff51c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   908
    |layout type|
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   909
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   910
    type   := UIPainterView layoutType:aView.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   911
    layout := aView geometryLayout.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   912
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   913
    layout isLayout ifTrue:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   914
        (self aspectFor:#leftOffset)   value:(layout leftOffset).
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   915
        (self aspectFor:#leftFraction) value:(layout leftFraction).
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   916
        (self aspectFor:#topOffset)    value:(layout topOffset).
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   917
        (self aspectFor:#topFraction)  value:(layout topFraction).
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   918
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   919
        type == #AlignmentOrigin ifTrue:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   920
            (self aspectFor:#leftAlignmentFraction) value:(layout leftAlignmentFraction).
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   921
            (self aspectFor:#topAlignmentFraction)  value:(layout topAlignmentFraction).
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   922
          ^ self
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   923
        ]
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   924
    ] ifFalse:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   925
        layout := aView computeOrigin.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   926
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   927
        (self aspectFor:#leftOffset)   value:(layout x).
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   928
        (self aspectFor:#leftFraction) value:0.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   929
        (self aspectFor:#topOffset)    value:(layout y).
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   930
        (self aspectFor:#topFraction)  value:0.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   931
    ].
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   932
    (self aspectFor:#leftAlignmentFraction) value:0.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   933
    (self aspectFor:#topAlignmentFraction)  value:0.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   934
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   935
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   936
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   937
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   938
layout
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   939
    "returns current layout as alignmentOrigin
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   940
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   941
    |layout|
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   942
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   943
    layout  := Smalltalk::AlignmentOrigin new.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   944
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   945
    layout   leftOffset:((self aspectFor:#leftOffset)   value) ? 0.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   946
    layout    topOffset:((self aspectFor:#topOffset)    value) ? 0.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   947
    layout leftFraction:((self aspectFor:#leftFraction) value) ? 0.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   948
    layout  topFraction:((self aspectFor:#topFraction)  value) ? 0.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   949
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   950
    layout leftAlignmentFraction:((self aspectFor:#leftAlignmentFraction) value) ? 0.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   951
    layout  topAlignmentFraction:((self aspectFor:#topAlignmentFraction)  value) ? 0.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   952
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   953
  ^ layout
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   954
! !
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   955
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   956
!UILayoutTool::AlignmentOrigin methodsFor:'alignment'!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   957
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   958
alignBottomCenter
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   959
    self makeAlignLeft:0.5 top:1
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   960
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   961
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   962
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   963
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   964
alignBottomLeft
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   965
    self makeAlignLeft:0 top:1
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   966
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   967
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   968
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   969
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   970
alignBottomRight
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   971
    self makeAlignLeft:1 top:1
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   972
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   973
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   974
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   975
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   976
alignCenter
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   977
    self makeAlignLeft:0.5 top:0.5
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   978
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   979
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   980
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   981
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   982
alignLeftCenter
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   983
    self makeAlignLeft:0 top:0.5
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   984
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   985
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   986
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   987
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   988
alignRightCenter
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   989
    self makeAlignLeft:1 top:0.5
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   990
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   991
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   992
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   993
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   994
alignTopCenter
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   995
    self makeAlignLeft:0.5 top:0
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   996
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   997
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   998
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   999
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1000
alignTopLeft
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1001
    self makeAlignLeft:0 top:0
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1002
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1003
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1004
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1005
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1006
alignTopRight
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1007
    self makeAlignLeft:1 top:0
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1008
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1009
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1010
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1011
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1012
makeAlignLeft:leftAlignmentFraction top:topAlignmentFraction
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1013
    |lAF tAF lO tO ext|
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1014
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1015
    lAF     := (self aspectFor:#leftAlignmentFraction) value ? 0.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1016
    tAF     := (self aspectFor:#topAlignmentFraction)  value ? 0.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1017
    ext     := (self aspectFor:#layoutView) computeExtent.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1018
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1019
    (self aspectFor:#leftAlignmentFraction) value:leftAlignmentFraction.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1020
    (self aspectFor:#topAlignmentFraction)  value:topAlignmentFraction.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1021
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1022
    lO := (self aspectFor:#leftOffset) value ? 0.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1023
    tO := (self aspectFor:#topOffset)  value ? 0.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1024
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1025
    lO := lO + (ext x * (leftAlignmentFraction - lAF)).
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1026
    tO := tO + (ext y * (topAlignmentFraction  - tAF)).
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1027
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1028
    (self aspectFor:#leftOffset) value:(lO rounded).
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1029
    (self aspectFor:#topOffset)  value:(tO rounded).
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1030
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1031
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1032
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1033
makeAlignTopRight
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1034
    self makeAlignLeft:1 top:0
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1035
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1036
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1037
! !
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1038
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1039
!UILayoutTool::Extent class methodsFor:'help specs'!
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1040
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1041
helpSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1042
    "return a dictionary filled with helpKey -> helptext associations.
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1043
     These are used by the activeHelp tool."
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1044
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1045
    "
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1046
    UIHelpTool openOnClass:UILayoutTool::Extent    
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1047
    "
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1048
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1049
  ^ super helpSpec addPairsFrom:#(
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1050
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1051
#vrtExtent
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1052
'vertical extent of the component'
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1053
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1054
#hrzExtent
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1055
'horizontal extent of the component'
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1056
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1057
)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1058
! !
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1059
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1060
!UILayoutTool::Extent class methodsFor:'interface specs'!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1061
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1062
windowSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1063
    "this window spec was automatically generated by the ST/X UIPainter"
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1064
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1065
    "do not manually edit this - the painter/builder may not be able to
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1066
     handle the specification if its corrupted."
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1067
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1068
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1069
     UIPainter new openOnClass:UILayoutTool::Extent andSelector:#windowSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1070
     UILayoutTool::Extent new openInterface:#windowSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1071
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1072
    "UILayoutTool::Extent open"
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1073
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1074
    <resource: #canvas>
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1075
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1076
    ^
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1077
     
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1078
       #(#FullSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1079
          #'window:' 
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1080
           #(#WindowSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1081
              #'name:' 'uIPainterView'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1082
              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1083
              #'label:' 'unnamed'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1084
              #'bounds:' #(#Rectangle 0 0 226 86)
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1085
          )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1086
          #'component:' 
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1087
           #(#SpecCollection
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1088
              #'collection:' 
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1089
               #(
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1090
                 #(#LabelSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1091
                    #'name:' 'labelHorizontal'
264
83a592912306 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 262
diff changeset
  1092
                    #'layout:' #(#AlignmentOrigin 84 0 36 0 1 0.5)
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1093
                    #'label:' 'horizontal:'
264
83a592912306 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 262
diff changeset
  1094
                    #'adjust:' #right
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1095
                )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1096
                 #(#InputFieldSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1097
                    #'name:' 'fieldLeftOffset'
264
83a592912306 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 262
diff changeset
  1098
                    #'layout:' #(#LayoutFrame 85 0 25 0 178 0 43 0)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1099
                    #'activeHelpKey:' #hrzExtent
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1100
                    #'tabable:' true
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1101
                    #'model:' #leftOffset
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1102
                    #'type:' #numberOrNil
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1103
                )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1104
                 #(#LabelSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1105
                    #'name:' 'labelVertical'
264
83a592912306 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 262
diff changeset
  1106
                    #'layout:' #(#AlignmentOrigin 84 0 63 0 1 0.5)
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1107
                    #'label:' 'vertical:'
264
83a592912306 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 262
diff changeset
  1108
                    #'adjust:' #right
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1109
                )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1110
                 #(#InputFieldSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1111
                    #'name:' 'fieldRightOffset'
264
83a592912306 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 262
diff changeset
  1112
                    #'layout:' #(#LayoutFrame 85 0 52 0 178 0 70 0)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1113
                    #'activeHelpKey:' #vrtExtent
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1114
                    #'tabable:' true
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1115
                    #'model:' #rightOffset
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1116
                    #'type:' #numberOrNil
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1117
                )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1118
              )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1119
          )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1120
      )
264
83a592912306 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 262
diff changeset
  1121
83a592912306 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 262
diff changeset
  1122
    "Modified: 28.7.1997 / 16:43:21 / cg"
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1123
! !
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1124
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1125
!UILayoutTool::Extent methodsFor:'accessing'!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1126
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1127
fetch:aView
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1128
    "fetch extent
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1129
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1130
    |extent|
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1131
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1132
    extent  := aView computeExtent.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1133
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1134
    (self aspectFor:#leftOffset)  value:(extent x).
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1135
    (self aspectFor:#rightOffset) value:(extent y).
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1136
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1137
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1138
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1139
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1140
layout
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1141
    "returns current extent
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1142
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1143
  ^ Smalltalk::Point x:(((self aspectFor:#leftOffset)   value) ? 0)
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1144
                     y:(((self aspectFor:#rightOffset)  value) ? 0)
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1145
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1146
! !
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
  1147
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1148
!UILayoutTool::LayoutFrame class methodsFor:'help specs'!
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1149
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1150
helpSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1151
    "return a dictionary filled with helpKey -> helptext associations.
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1152
     These are used by the activeHelp tool."
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1153
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1154
    "
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1155
    UIHelpTool openOnClass:UILayoutTool::LayoutFrame    
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1156
    "
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1157
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1158
  ^ super helpSpec addPairsFrom:#(
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1159
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1160
#makeRightRelative
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1161
'compute current relative corner x and offset of the right edge to a relative corner x'
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1162
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1163
#makeBottomAbsolute
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1164
'compute current bottom offset and relative corner y to an absolute corner y'
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1165
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1166
#bottomAbsolute
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1167
'offset of the bottom edge; positive is to the bottom, negative to the top'
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1168
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1169
#rightRelative
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1170
'relative corner x'
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1171
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1172
#makeBottomRelative
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1173
'compute current relative corner y and offset of the bottom edge to a relative corner y'
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1174
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1175
#makeRightAbsolute
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1176
'compute current right offset and relative corner x to an absolute corner x'
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1177
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1178
#bottomRelative
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1179
'relative corner y'
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1180
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1181
#rightAbsolute
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
  1182
'offset of the right edge; positive is to the right, negative to the left'
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1183
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1184
)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1185
! !
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1186
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1187
!UILayoutTool::LayoutFrame class methodsFor:'interface specs'!
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1188
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1189
windowSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1190
    "this window spec was automatically generated by the ST/X UIPainter"
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1191
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1192
    "do not manually edit this - the painter/builder may not be able to
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1193
     handle the specification if its corrupted."
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1194
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1195
    "
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1196
     UIPainter new openOnClass:UILayoutTool::LayoutFrame andSelector:#windowSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1197
     UILayoutTool::LayoutFrame new openInterface:#windowSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1198
    "
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1199
    "UILayoutTool::LayoutFrame open"
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1200
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1201
    <resource: #canvas>
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1202
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1203
    ^
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1204
     
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1205
       #(#FullSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1206
          #'window:' 
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1207
           #(#WindowSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1208
              #'name:' 'uIPainterView'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1209
              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1210
              #'label:' 'unnamed'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1211
              #'bounds:' #(#Rectangle 0 0 250 193)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1212
          )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1213
          #'component:' 
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1214
           #(#SpecCollection
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1215
              #'collection:' 
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1216
               #(
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1217
                 #(#UISubSpecification
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1218
                    #'name:' 'subLayoutSpec'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1219
                    #'layout:' #(#LayoutOrigin 0 0 0 0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1220
                    #'majorKey:' #UILayoutTool
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1221
                    #'minorKey:' #layoutOriginSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1222
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1223
                 #(#LabelSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1224
                    #'name:' 'labelRight'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1225
                    #'layout:' #(#AlignmentOrigin 52 0 98 0 1 0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1226
                    #'label:' 'right'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1227
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1228
                 #(#InputFieldSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1229
                    #'name:' 'fieldRightFraction'
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
  1230
                    #'layout:' #(#LayoutFrame 57 0 98 0 114 0 120 0)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1231
                    #'activeHelpKey:' #rightRelative
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1232
                    #'model:' #rightFraction
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1233
                    #'type:' #numberOrNil
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1234
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1235
                 #(#ActionButtonSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1236
                    #'name:' 'actionRelativeRight'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1237
                    #'layout:' #(#LayoutFrame 119 0 98 0 138 0 116 0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1238
                    #'activeHelpKey:' #makeRightRelative
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1239
                    #'model:' #relativeRight
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1240
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1241
                 #(#InputFieldSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1242
                    #'name:' 'fieldRightOffset'
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
  1243
                    #'layout:' #(#LayoutFrame 154 0 98 0 212 0 120 0)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1244
                    #'activeHelpKey:' #rightAbsolute
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1245
                    #'model:' #rightOffset
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1246
                    #'type:' #numberOrNil
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1247
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1248
                 #(#ActionButtonSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1249
                    #'name:' 'actionAbsoluteRight'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1250
                    #'layout:' #(#LayoutFrame 216 0 98 0 235 0 116 0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1251
                    #'activeHelpKey:' #makeRightAbsolute
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1252
                    #'model:' #absoluteRight
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1253
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1254
                 #(#LabelSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1255
                    #'name:' 'labelBottom'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1256
                    #'layout:' #(#AlignmentOrigin 52 0 126 0 1 0)
260
bf00ccde13f9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
  1257
                    #'label:' 'bott'
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1258
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1259
                 #(#InputFieldSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1260
                    #'name:' 'fieldBottomFraction'
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
  1261
                    #'layout:' #(#LayoutFrame 57 0 126 0 114 0 148 0)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1262
                    #'activeHelpKey:' #bottomRelative
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1263
                    #'model:' #bottomFraction
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1264
                    #'type:' #numberOrNil
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1265
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1266
                 #(#ActionButtonSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1267
                    #'name:' 'actionRelativeBottom'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1268
                    #'layout:' #(#LayoutFrame 119 0 126 0 138 0 144 0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1269
                    #'activeHelpKey:' #makeBottomRelative
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1270
                    #'model:' #relativeBottom
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1271
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1272
                 #(#InputFieldSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1273
                    #'name:' 'fieldBottomOffset'
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
  1274
                    #'layout:' #(#LayoutFrame 154 0 126 0 211 0 148 0)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1275
                    #'activeHelpKey:' #bottomAbsolute
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1276
                    #'model:' #bottomOffset
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1277
                    #'type:' #numberOrNil
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1278
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1279
                 #(#ActionButtonSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1280
                    #'name:' 'actionAbsoluteBottom'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1281
                    #'layout:' #(#LayoutFrame 216 0 126 0 235 0 144 0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1282
                    #'activeHelpKey:' #makeBottomAbsolute
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1283
                    #'model:' #absoluteBottom
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1284
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1285
              )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1286
          )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1287
      )
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
  1288
260
bf00ccde13f9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
  1289
    "Modified: 28.7.1997 / 14:13:44 / cg"
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1290
! !
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1291
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1292
!UILayoutTool::LayoutFrame methodsFor:'accessing'!
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1293
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1294
fetch:aView
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1295
    |layout|
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1296
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1297
    layout  := UIPainterView asLayoutFrameFromView:aView.
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1298
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1299
    (self aspectFor:#leftOffset)     value:(layout leftOffset).
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1300
    (self aspectFor:#leftFraction)   value:(layout leftFraction).
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1301
    (self aspectFor:#topOffset)      value:(layout topOffset).
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1302
    (self aspectFor:#topFraction)    value:(layout topFraction).
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1303
    (self aspectFor:#rightOffset)    value:(layout rightOffset).
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1304
    (self aspectFor:#bottomOffset)   value:(layout bottomOffset).
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1305
    (self aspectFor:#rightFraction)  value:(layout rightFraction).
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1306
    (self aspectFor:#bottomFraction) value:(layout bottomFraction).
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1307
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1308
!
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1309
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1310
layout
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1311
    "returns current layout as layoutFrame
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1312
    "
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1313
    |layout|
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1314
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1315
    layout  := Smalltalk::LayoutFrame new.
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1316
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1317
    layout     leftOffset:((self aspectFor:#leftOffset)     value) ? 0.
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1318
    layout    rightOffset:((self aspectFor:#rightOffset)    value) ? 0.
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1319
    layout      topOffset:((self aspectFor:#topOffset)      value) ? 0.
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1320
    layout   bottomOffset:((self aspectFor:#bottomOffset)   value) ? 0.
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1321
    layout   leftFraction:((self aspectFor:#leftFraction)   value) ? 0.
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1322
    layout  rightFraction:((self aspectFor:#rightFraction)  value) ? 0.
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1323
    layout    topFraction:((self aspectFor:#topFraction)    value) ? 0.
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1324
    layout bottomFraction:((self aspectFor:#bottomFraction) value) ? 0.
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1325
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1326
  ^ layout
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1327
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1328
! !
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1329
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1330
!UILayoutTool::LayoutOrigin class methodsFor:'interface specs'!
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1331
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1332
windowSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1333
    "this window spec was automatically generated by the ST/X UIPainter"
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1334
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1335
    "do not manually edit this - the painter/builder may not be able to
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1336
     handle the specification if its corrupted."
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1337
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1338
    "
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1339
     UIPainter new openOnClass:UILayoutTool::LayoutOrigin andSelector:#windowSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1340
     UILayoutTool::LayoutOrigin new openInterface:#windowSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1341
    "
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1342
    "UILayoutTool::LayoutOrigin open"
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1343
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1344
    <resource: #canvas>
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1345
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1346
    ^
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1347
     
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1348
       #(#FullSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1349
          #'window:' 
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1350
           #(#WindowSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1351
              #'name:' 'uIPainterView'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1352
              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1353
              #'label:' 'unnamed'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1354
              #'bounds:' #(#Rectangle 0 0 258 93)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1355
          )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1356
          #'component:' 
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1357
           #(#SpecCollection
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1358
              #'collection:' 
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1359
               #(
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1360
                 #(#UISubSpecification
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1361
                    #'name:' 'subSpecification'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1362
                    #'layout:' #(#LayoutOrigin 0 0 0 0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1363
                    #'majorKey:' #UILayoutTool
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1364
                    #'minorKey:' #layoutOriginSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1365
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1366
              )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1367
          )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1368
      )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1369
! !
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1370
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1371
!UILayoutTool::LayoutOrigin methodsFor:'accessing'!
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1372
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1373
fetch:aView
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1374
    "fetch layoutOrigin
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1375
    "
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1376
    |layout|
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1377
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1378
    layout  := UIPainterView asLayoutFrameFromView:aView.
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1379
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1380
    (self aspectFor:#leftOffset)   value:(layout leftOffset).
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1381
    (self aspectFor:#leftFraction) value:(layout leftFraction).
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1382
    (self aspectFor:#topOffset)    value:(layout topOffset).
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1383
    (self aspectFor:#topFraction)  value:(layout topFraction).
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1384
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1385
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1386
!
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1387
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1388
layout
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1389
    "returns current layout as layoutOrigin
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1390
    "
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1391
    |layout|
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1392
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1393
    layout  := Smalltalk::LayoutOrigin new.
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1394
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1395
    layout   leftOffset:((self aspectFor:#leftOffset)   value) ? 0.
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1396
    layout    topOffset:((self aspectFor:#topOffset)    value) ? 0.
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1397
    layout leftFraction:((self aspectFor:#leftFraction) value) ? 0.
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1398
    layout  topFraction:((self aspectFor:#topFraction)  value) ? 0.
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1399
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1400
  ^ layout
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1401
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1402
! !
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1403
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1404
!UILayoutTool::Point class methodsFor:'interface specs'!
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1405
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1406
windowSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1407
    "this window spec was automatically generated by the ST/X UIPainter"
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1408
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1409
    "do not manually edit this - the painter/builder may not be able to
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1410
     handle the specification if its corrupted."
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1411
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1412
    "
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1413
     UIPainter new openOnClass:UILayoutTool::Point andSelector:#windowSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1414
     UILayoutTool::Point new openInterface:#windowSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1415
    "
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1416
    "UILayoutTool::Point open"
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1417
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1418
    <resource: #canvas>
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1419
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1420
    ^
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1421
     
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1422
       #(#FullSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1423
          #'window:' 
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1424
           #(#WindowSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1425
              #'name:' 'uIPainterView'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1426
              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1427
              #'label:' 'unnamed'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1428
              #'bounds:' #(#Rectangle 0 0 194 66)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1429
          )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1430
          #'component:' 
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1431
           #(#SpecCollection
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1432
              #'collection:' 
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1433
               #(
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1434
                 #(#UISubSpecification
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1435
                    #'name:' 'subSpecification'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1436
                    #'layout:' #(#LayoutOrigin 0 0 0 0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1437
                    #'majorKey:' #UILayoutTool
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1438
                    #'minorKey:' #layoutPointSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1439
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1440
              )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1441
          )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1442
      )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1443
! !
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1444
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1445
!UILayoutTool::Point methodsFor:'accessing'!
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1446
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1447
fetch:aView
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1448
    "fetch point
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1449
    "
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1450
    |origin|
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1451
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1452
    origin  := aView computeOrigin.
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1453
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1454
    (self aspectFor:#leftOffset) value:(origin x).
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1455
    (self aspectFor:#topOffset)  value:(origin y).
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1456
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1457
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1458
!
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1459
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1460
layout
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1461
    "returns current layout as point
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1462
    "
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1463
  ^ Smalltalk::Point x:(((self aspectFor:#leftOffset) value) ? 0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1464
                     y:(((self aspectFor:#topOffset)  value) ? 0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1465
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1466
! !
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1467
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1468
!UILayoutTool::Rectangle class methodsFor:'interface specs'!
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1469
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1470
windowSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1471
    "this window spec was automatically generated by the ST/X UIPainter"
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1472
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1473
    "do not manually edit this - the painter/builder may not be able to
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1474
     handle the specification if its corrupted."
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1475
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1476
    "
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1477
     UIPainter new openOnClass:UILayoutTool::Rectangle andSelector:#windowSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1478
     UILayoutTool::Rectangle new openInterface:#windowSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1479
    "
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1480
    "UILayoutTool::Rectangle open"
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1481
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1482
    <resource: #canvas>
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1483
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1484
    ^
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1485
     
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1486
       #(#FullSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1487
          #'window:' 
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1488
           #(#WindowSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1489
              #'name:' 'uIPainterView'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1490
              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1491
              #'label:' 'unnamed'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1492
              #'bounds:' #(#Rectangle 0 0 224 146)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1493
          )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1494
          #'component:' 
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1495
           #(#SpecCollection
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1496
              #'collection:' 
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1497
               #(
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1498
                 #(#UISubSpecification
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1499
                    #'name:' 'subSpecification'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1500
                    #'layout:' #(#LayoutOrigin 0 0 0 0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1501
                    #'majorKey:' #UILayoutTool
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1502
                    #'minorKey:' #layoutPointSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1503
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1504
                 #(#LabelSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1505
                    #'name:' 'labelCornerX'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1506
                    #'layout:' #(#AlignmentOrigin 75 0 74 0 1 0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1507
                    #'label:' 'corner x:'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1508
                    #'adjust:' #left
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1509
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1510
                 #(#InputFieldSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1511
                    #'name:' 'fieldCornerX'
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
  1512
                    #'layout:' #(#LayoutFrame 77 0 74 0 170 0 96 0)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1513
                    #'activeHelpKey:' #cornerX
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1514
                    #'tabable:' true
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1515
                    #'model:' #rightOffset
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1516
                    #'type:' #numberOrNil
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1517
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1518
                 #(#LabelSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1519
                    #'name:' 'labelCornerY'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1520
                    #'layout:' #(#AlignmentOrigin 75 0 101 0 1 0)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1521
                    #'label:' 'corner y:'
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1522
                    #'adjust:' #left
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1523
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1524
                 #(#InputFieldSpec
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1525
                    #'name:' 'fieldCornerY'
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
  1526
                    #'layout:' #(#LayoutFrame 77 0 101 0 170 0 123 0)
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1527
                    #'activeHelpKey:' #cornerY
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1528
                    #'tabable:' true
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1529
                    #'model:' #bottomOffset
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1530
                    #'type:' #numberOrNil
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1531
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1532
              )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1533
          )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1534
      )
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
  1535
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
  1536
    "Modified: 28.7.1997 / 14:12:46 / cg"
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1537
! !
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1538
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1539
!UILayoutTool::Rectangle methodsFor:'accessing'!
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1540
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1541
fetch:aView
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1542
    "fetch rectangle
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1543
    "
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1544
    |origin corner|
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1545
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1546
    origin := aView computeOrigin.
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1547
    corner := aView computeCorner.
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1548
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1549
    (self aspectFor:#leftOffset)   value:(origin x).
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1550
    (self aspectFor:#rightOffset)  value:(corner x).
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1551
    (self aspectFor:#topOffset)    value:(origin y).
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1552
    (self aspectFor:#bottomOffset) value:(corner y).
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1553
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1554
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1555
!
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1556
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1557
layout
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1558
    "returns current layout as rectangle
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1559
    "
700f2ee9911e add help for components
ca
parents: 163
diff changeset
  1560
  ^ Smalltalk::Rectangle left:(((self aspectFor:#leftOffset)   value) ? 0)