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