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