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