UILayoutTool.st
author Claus Gittinger <cg@exept.de>
Wed, 07 Nov 2001 11:12:27 +0100
changeset 1528 4136505d3cbe
parent 1447 bf034d910b27
child 1581 d7afe06ebbae
permissions -rw-r--r--
oops - menu was wrong
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
1409
176ae89e0b31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1343
diff changeset
    16
"{ Package: 'stx:libtool2' }"
176ae89e0b31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1343
diff changeset
    17
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    18
ApplicationModel subclass:#UILayoutTool
1305
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
    19
	instanceVariableNames:'modifiedHolder aspects selection currentTool layoutView tabList
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
    20
		layoutSpec toolsDictionary'
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    21
	classVariableNames:''
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    22
	poolDictionaries:''
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    23
	category:'Interface-UIPainter'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    24
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    25
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
    26
ApplicationModel subclass:#AnyLayout
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
    27
	instanceVariableNames:''
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
    28
	classVariableNames:''
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
    29
	poolDictionaries:''
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
    30
	privateIn:UILayoutTool
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
    31
!
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
    32
1447
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
    33
UILayoutTool::AnyLayout subclass:#AlignmentOrigin
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
    34
	instanceVariableNames:''
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
    35
	classVariableNames:''
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
    36
	poolDictionaries:''
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
    37
	privateIn:UILayoutTool
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
    38
!
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
    39
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
    40
UILayoutTool::AnyLayout subclass:#Extent
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
    41
	instanceVariableNames:''
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
    42
	classVariableNames:''
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
    43
	poolDictionaries:''
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
    44
	privateIn:UILayoutTool
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
    45
!
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
    46
1409
176ae89e0b31 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1343
diff changeset
    47
UILayoutTool::AnyLayout subclass:#LayoutFrame
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
    48
	instanceVariableNames:''
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
    49
	classVariableNames:''
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
    50
	poolDictionaries:''
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
    51
	privateIn:UILayoutTool
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
    52
!
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
    53
1447
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
    54
UILayoutTool::AnyLayout subclass:#LayoutOrigin
1310
572125002ce9 make tabable in LayoutFrame
ca
parents: 1305
diff changeset
    55
	instanceVariableNames:''
572125002ce9 make tabable in LayoutFrame
ca
parents: 1305
diff changeset
    56
	classVariableNames:''
572125002ce9 make tabable in LayoutFrame
ca
parents: 1305
diff changeset
    57
	poolDictionaries:''
572125002ce9 make tabable in LayoutFrame
ca
parents: 1305
diff changeset
    58
	privateIn:UILayoutTool
572125002ce9 make tabable in LayoutFrame
ca
parents: 1305
diff changeset
    59
!
572125002ce9 make tabable in LayoutFrame
ca
parents: 1305
diff changeset
    60
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
    61
UILayoutTool::AnyLayout subclass:#Point
1310
572125002ce9 make tabable in LayoutFrame
ca
parents: 1305
diff changeset
    62
	instanceVariableNames:''
572125002ce9 make tabable in LayoutFrame
ca
parents: 1305
diff changeset
    63
	classVariableNames:''
572125002ce9 make tabable in LayoutFrame
ca
parents: 1305
diff changeset
    64
	poolDictionaries:''
572125002ce9 make tabable in LayoutFrame
ca
parents: 1305
diff changeset
    65
	privateIn:UILayoutTool
572125002ce9 make tabable in LayoutFrame
ca
parents: 1305
diff changeset
    66
!
572125002ce9 make tabable in LayoutFrame
ca
parents: 1305
diff changeset
    67
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
    68
UILayoutTool::AnyLayout subclass:#Rectangle
1304
ca
parents: 1268
diff changeset
    69
	instanceVariableNames:''
ca
parents: 1268
diff changeset
    70
	classVariableNames:''
ca
parents: 1268
diff changeset
    71
	poolDictionaries:''
ca
parents: 1268
diff changeset
    72
	privateIn:UILayoutTool
ca
parents: 1268
diff changeset
    73
!
ca
parents: 1268
diff changeset
    74
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    75
!UILayoutTool class methodsFor:'documentation'!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    76
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    77
copyright
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    78
"
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    79
 COPYRIGHT (c) 1995 by eXept Software AG
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    80
              All Rights Reserved
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    81
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    82
 This software is furnished under a license and may be used
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    83
 only in accordance with the terms of that license and with the
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    84
 inclusion of the above copyright notice.   This software may not
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    85
 be provided or otherwise made available to, or used by, any
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    86
 other person.  No title to or ownership of the software is
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    87
 hereby transferred.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    88
"
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    89
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    90
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    91
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    92
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    93
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    94
documentation
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    95
"
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    96
    used by the UIPainter to manipulate the layout of the selected component
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    97
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    98
    [author:]
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
    99
        Claus Atzkern
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   100
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   101
    [see also:]
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   102
        UIPainter
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   103
        UIHelpTool
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   104
        UISpecificationTool
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   105
"
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   106
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   107
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   108
! !
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   109
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   110
!UILayoutTool class methodsFor:'constants'!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   111
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   112
label
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   113
    ^ 'Layout'
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   114
! !
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   115
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   116
!UILayoutTool class methodsFor:'help specs'!
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   117
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   118
helpSpec
741
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   119
    "This resource specification was automatically generated
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   120
     by the UIHelpTool of ST/X."
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   121
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   122
    "Do not manually edit this!! If it is corrupted,
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   123
     the UIHelpTool may not be able to read the specification."
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   124
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   125
    "
741
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   126
     UIHelpTool openOnClass:UILayoutTool    
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   127
    "
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   128
741
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   129
    <resource: #help>
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   130
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   131
    ^super helpSpec addPairsFrom:#(
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   132
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   133
#cornerX
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   134
'Absolute corner x of the selected widget.'
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   135
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   136
#cornerY
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   137
'Absolute corner y of the selected widget.'
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   138
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   139
#layoutTool
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   140
'Tool to set the layout of the selected widget.'
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   141
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   142
#leftAbsolute
714
61d4a7df2574 some changes for the docu
tz
parents: 690
diff changeset
   143
'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
   144
741
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   145
#leftRelative
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   146
'Relative origin x of the selected widget.'
201
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   147
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   148
#makeLeftAbsolute
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   149
'Compute pure-absolute x'
201
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   150
741
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   151
#makeLeftRelative
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   152
'Compute pure-fraction x.'
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   153
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   154
#makeLeftRelativeFromRight
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   155
'Compute fraction+offset for x relative to containers right.'
741
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   156
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   157
#makeTopAbsolute
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   158
'Compute pure-absolute y.'
741
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   159
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   160
#makeTopRelative
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   161
'Computes pure-fractional y.'
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   162
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   163
#makeTopRelativeFromBottom
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   164
'Compute fraction+offset for y relative to containers bottom.'
741
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   165
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   166
#originX
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   167
'Absolute origin x of the selected widget.'
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   168
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   169
#originY
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   170
'Absolute origin y of the selected widget.'
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   171
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   172
#topAbsolute
714
61d4a7df2574 some changes for the docu
tz
parents: 690
diff changeset
   173
'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
   174
201
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   175
#topRelative
714
61d4a7df2574 some changes for the docu
tz
parents: 690
diff changeset
   176
'Relative origin y of the selected widget.'
201
b10f071028cb *** empty log message ***
ca
parents: 186
diff changeset
   177
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   178
)
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   179
! !
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   180
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   181
!UILayoutTool class methodsFor:'interface specs'!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   182
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   183
layoutOriginSpec
741
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   184
    "This resource specification was automatically generated
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   185
     by the UIPainter of ST/X."
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   186
741
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   187
    "Do not manually edit this!! If it is corrupted,
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   188
     the UIPainter may not be able to read the specification."
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   189
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   190
    "
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
   191
     UIPainter new openOnClass:UILayoutTool andSelector:#layoutOriginSpec
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
   192
     UILayoutTool new openInterface:#layoutOriginSpec
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   193
    "
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   194
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   195
    <resource: #canvas>
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   196
1304
ca
parents: 1268
diff changeset
   197
    ^ 
ca
parents: 1268
diff changeset
   198
     #(#FullSpec
ca
parents: 1268
diff changeset
   199
        #name: #layoutOriginSpec
ca
parents: 1268
diff changeset
   200
        #window: 
ca
parents: 1268
diff changeset
   201
       #(#WindowSpec
ca
parents: 1268
diff changeset
   202
          #label: 'UILayoutTool'
ca
parents: 1268
diff changeset
   203
          #name: 'UILayoutTool'
ca
parents: 1268
diff changeset
   204
          #min: #(#Point 10 10)
ca
parents: 1268
diff changeset
   205
          #max: #(#Point 1152 900)
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   206
          #bounds: #(#Rectangle 12 22 357 204)
1304
ca
parents: 1268
diff changeset
   207
        )
ca
parents: 1268
diff changeset
   208
        #component: 
ca
parents: 1268
diff changeset
   209
       #(#SpecCollection
ca
parents: 1268
diff changeset
   210
          #collection: #(
ca
parents: 1268
diff changeset
   211
           #(#FramedBoxSpec
ca
parents: 1268
diff changeset
   212
              #label: 'Origin'
ca
parents: 1268
diff changeset
   213
              #name: 'FramedBox'
ca
parents: 1268
diff changeset
   214
              #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 108 0)
ca
parents: 1268
diff changeset
   215
              #labelPosition: #topLeft
ca
parents: 1268
diff changeset
   216
              #component: 
ca
parents: 1268
diff changeset
   217
             #(#SpecCollection
ca
parents: 1268
diff changeset
   218
                #collection: #(
ca
parents: 1268
diff changeset
   219
                 #(#LabelSpec
ca
parents: 1268
diff changeset
   220
                    #label: 'Relative:'
ca
parents: 1268
diff changeset
   221
                    #name: 'labelRelative'
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   222
                    #layout: #(#Point 103 6)
1304
ca
parents: 1268
diff changeset
   223
                  )
ca
parents: 1268
diff changeset
   224
                 #(#LabelSpec
ca
parents: 1268
diff changeset
   225
                    #label: 'Offset:'
ca
parents: 1268
diff changeset
   226
                    #name: 'labelAbsolute'
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   227
                    #layout: #(#Point 203 6)
1304
ca
parents: 1268
diff changeset
   228
                  )
ca
parents: 1268
diff changeset
   229
                 #(#LabelSpec
ca
parents: 1268
diff changeset
   230
                    #label: 'Left:'
ca
parents: 1268
diff changeset
   231
                    #name: 'labelLeft'
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   232
                    #layout: #(#AlignmentOrigin 68 0 27 0 1 0)
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   233
                  )
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   234
                 #(#ActionButtonSpec
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   235
                    #label: 'imageFractX'
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   236
                    #name: 'actionRelativeLeft'
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   237
                    #layout: #(#LayoutFrame 77 0 24 0 99 0 46 0)
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   238
                    #activeHelpKey: #makeLeftRelative
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   239
                    #hasCharacterOrientedLabel: false
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   240
                    #tabable: true
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   241
                    #model: #relativeLeft
1304
ca
parents: 1268
diff changeset
   242
                  )
ca
parents: 1268
diff changeset
   243
                 #(#InputFieldSpec
ca
parents: 1268
diff changeset
   244
                    #name: 'fieldLeftFraction'
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   245
                    #layout: #(#LayoutFrame 103 0 24 0 153 0 46 0)
1304
ca
parents: 1268
diff changeset
   246
                    #activeHelpKey: #leftRelative
ca
parents: 1268
diff changeset
   247
                    #tabable: true
ca
parents: 1268
diff changeset
   248
                    #model: #leftFraction
ca
parents: 1268
diff changeset
   249
                    #group: #inputGroup
ca
parents: 1268
diff changeset
   250
                    #type: #numberOrNil
ca
parents: 1268
diff changeset
   251
                    #acceptChannel: #acceptChannel
ca
parents: 1268
diff changeset
   252
                    #modifiedChannel: #modifiedChannel
ca
parents: 1268
diff changeset
   253
                    #acceptOnPointerLeave: false
ca
parents: 1268
diff changeset
   254
                  )
ca
parents: 1268
diff changeset
   255
                 #(#ActionButtonSpec
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   256
                    #label: 'imageAbsXFromRight'
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   257
                    #name: 'actionRightRelativeLeft'
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   258
                    #layout: #(#LayoutFrame 257 0 24 0 279 0 46 0)
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   259
                    #activeHelpKey: #makeLeftRelativeFromRight
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   260
                    #hasCharacterOrientedLabel: false
1304
ca
parents: 1268
diff changeset
   261
                    #tabable: true
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   262
                    #model: #rightRelativeLeft
1304
ca
parents: 1268
diff changeset
   263
                  )
ca
parents: 1268
diff changeset
   264
                 #(#InputFieldSpec
ca
parents: 1268
diff changeset
   265
                    #name: 'fieldLeftOffset'
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   266
                    #layout: #(#LayoutFrame 203 0 24 0 253 0 46 0)
1304
ca
parents: 1268
diff changeset
   267
                    #activeHelpKey: #leftAbsolute
ca
parents: 1268
diff changeset
   268
                    #tabable: true
ca
parents: 1268
diff changeset
   269
                    #model: #leftOffset
ca
parents: 1268
diff changeset
   270
                    #group: #inputGroup
ca
parents: 1268
diff changeset
   271
                    #type: #numberOrNil
1063
9e710dbc7c92 inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   272
                    #acceptChannel: #acceptChannel
9e710dbc7c92 inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   273
                    #modifiedChannel: #modifiedChannel
1304
ca
parents: 1268
diff changeset
   274
                    #acceptOnPointerLeave: false
ca
parents: 1268
diff changeset
   275
                  )
ca
parents: 1268
diff changeset
   276
                 #(#ActionButtonSpec
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   277
                    #label: 'imageAbsX'
1304
ca
parents: 1268
diff changeset
   278
                    #name: 'actionAbsoluteLeft'
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   279
                    #layout: #(#LayoutFrame 178 0 24 0 200 0 46 0)
1304
ca
parents: 1268
diff changeset
   280
                    #activeHelpKey: #makeLeftAbsolute
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   281
                    #hasCharacterOrientedLabel: false
1304
ca
parents: 1268
diff changeset
   282
                    #tabable: true
ca
parents: 1268
diff changeset
   283
                    #model: #absoluteLeft
ca
parents: 1268
diff changeset
   284
                  )
ca
parents: 1268
diff changeset
   285
                 #(#LabelSpec
ca
parents: 1268
diff changeset
   286
                    #label: 'Top:'
ca
parents: 1268
diff changeset
   287
                    #name: 'labelTop'
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   288
                    #layout: #(#AlignmentOrigin 68 0 54 0 1 0)
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   289
                  )
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   290
                 #(#ActionButtonSpec
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   291
                    #label: 'imageFractY'
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   292
                    #name: 'actionRelativeTop'
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   293
                    #layout: #(#LayoutFrame 77 0 51 0 99 0 73 0)
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   294
                    #activeHelpKey: #makeTopRelative
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   295
                    #hasCharacterOrientedLabel: false
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   296
                    #tabable: true
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   297
                    #model: #relativeTop
1304
ca
parents: 1268
diff changeset
   298
                  )
ca
parents: 1268
diff changeset
   299
                 #(#InputFieldSpec
ca
parents: 1268
diff changeset
   300
                    #name: 'fieldTopFraction'
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   301
                    #layout: #(#LayoutFrame 103 0 51 0 153 0 73 0)
1304
ca
parents: 1268
diff changeset
   302
                    #activeHelpKey: #topRelative
ca
parents: 1268
diff changeset
   303
                    #tabable: true
ca
parents: 1268
diff changeset
   304
                    #model: #topFraction
ca
parents: 1268
diff changeset
   305
                    #group: #inputGroup
ca
parents: 1268
diff changeset
   306
                    #type: #numberOrNil
1063
9e710dbc7c92 inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   307
                    #acceptChannel: #acceptChannel
9e710dbc7c92 inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   308
                    #modifiedChannel: #modifiedChannel
1304
ca
parents: 1268
diff changeset
   309
                    #acceptOnPointerLeave: false
ca
parents: 1268
diff changeset
   310
                  )
ca
parents: 1268
diff changeset
   311
                 #(#ActionButtonSpec
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   312
                    #label: 'imageAbsYFromBottom'
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   313
                    #name: 'actionBottomRelativeTop'
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   314
                    #layout: #(#LayoutFrame 257 0 51 0 279 0 73 0)
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   315
                    #activeHelpKey: #makeTopRelativeFromBottom
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   316
                    #hasCharacterOrientedLabel: false
1304
ca
parents: 1268
diff changeset
   317
                    #tabable: true
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   318
                    #model: #bottomRelativeTop
1304
ca
parents: 1268
diff changeset
   319
                  )
ca
parents: 1268
diff changeset
   320
                 #(#InputFieldSpec
ca
parents: 1268
diff changeset
   321
                    #name: 'fieldTopOffset'
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   322
                    #layout: #(#LayoutFrame 203 0 51 0 253 0 73 0)
1304
ca
parents: 1268
diff changeset
   323
                    #activeHelpKey: #topAbsolute
ca
parents: 1268
diff changeset
   324
                    #tabable: true
ca
parents: 1268
diff changeset
   325
                    #model: #topOffset
ca
parents: 1268
diff changeset
   326
                    #group: #inputGroup
ca
parents: 1268
diff changeset
   327
                    #type: #numberOrNil
1063
9e710dbc7c92 inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   328
                    #acceptChannel: #acceptChannel
9e710dbc7c92 inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   329
                    #modifiedChannel: #modifiedChannel
1304
ca
parents: 1268
diff changeset
   330
                    #acceptOnPointerLeave: false
ca
parents: 1268
diff changeset
   331
                  )
ca
parents: 1268
diff changeset
   332
                 #(#ActionButtonSpec
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   333
                    #label: 'imageAbsY'
1304
ca
parents: 1268
diff changeset
   334
                    #name: 'actionAbsoluteTop'
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   335
                    #layout: #(#LayoutFrame 178 0 51 0 200 0 73 0)
1304
ca
parents: 1268
diff changeset
   336
                    #activeHelpKey: #makeTopAbsolute
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   337
                    #hasCharacterOrientedLabel: false
1304
ca
parents: 1268
diff changeset
   338
                    #tabable: true
ca
parents: 1268
diff changeset
   339
                    #model: #absoluteTop
ca
parents: 1268
diff changeset
   340
                  )
ca
parents: 1268
diff changeset
   341
                 )
ca
parents: 1268
diff changeset
   342
               
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   343
              )
1304
ca
parents: 1268
diff changeset
   344
            )
ca
parents: 1268
diff changeset
   345
           )
ca
parents: 1268
diff changeset
   346
         
ca
parents: 1268
diff changeset
   347
        )
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   348
      )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   349
!
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   350
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   351
layoutPointSpec
741
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   352
    "This resource specification was automatically generated
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   353
     by the UIPainter of ST/X."
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   354
741
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   355
    "Do not manually edit this!! If it is corrupted,
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   356
     the UIPainter may not be able to read the specification."
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   357
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   358
    "
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
   359
     UIPainter new openOnClass:UILayoutTool andSelector:#layoutPointSpec
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
   360
     UILayoutTool new openInterface:#layoutPointSpec
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   361
    "
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
   362
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   363
    <resource: #canvas>
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   364
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   365
    ^
259
83440731fc3d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 252
diff changeset
   366
     
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   367
       #(#FullSpec
690
a1033b88a8e8 consistent naming of the labels
tz
parents: 296
diff changeset
   368
          #window: 
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   369
           #(#WindowSpec
741
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   370
              #name: 'UILayoutTool'
949
2e3469100a6a fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   371
              #layout: #(#LayoutFrame 216 0 173 0 493 0 296 0)
741
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   372
              #label: 'UILayoutTool'
690
a1033b88a8e8 consistent naming of the labels
tz
parents: 296
diff changeset
   373
              #min: #(#Point 10 10)
a1033b88a8e8 consistent naming of the labels
tz
parents: 296
diff changeset
   374
              #max: #(#Point 1152 900)
949
2e3469100a6a fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   375
              #bounds: #(#Rectangle 216 173 494 297)
690
a1033b88a8e8 consistent naming of the labels
tz
parents: 296
diff changeset
   376
              #usePreferredExtent: false
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   377
          )
690
a1033b88a8e8 consistent naming of the labels
tz
parents: 296
diff changeset
   378
          #component: 
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   379
           #(#SpecCollection
690
a1033b88a8e8 consistent naming of the labels
tz
parents: 296
diff changeset
   380
              #collection: 
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   381
               #(
751
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   382
                 #(#FramedBoxSpec
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   383
                    #name: 'FramedBox'
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   384
                    #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 94 0)
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   385
                    #component: 
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   386
                     #(#SpecCollection
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   387
                        #collection: 
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   388
                         #(
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   389
                           #(#LabelSpec
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   390
                              #name: 'labelOriginY'
949
2e3469100a6a fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   391
                              #layout: #(#AlignmentOrigin 83 0 14 0 1 0)
751
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   392
                              #label: 'Left:'
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   393
                          )
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   394
                           #(#InputFieldSpec
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   395
                              #name: 'fieldOriginX'
949
2e3469100a6a fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   396
                              #layout: #(#LayoutFrame 85 0 11 0 135 0 33 0)
751
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   397
                              #activeHelpKey: #originX
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   398
                              #tabable: true
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   399
                              #model: #leftOffset
949
2e3469100a6a fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   400
                              #group: #inputGroup
751
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   401
                              #type: #numberOrNil
1063
9e710dbc7c92 inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   402
                    #acceptChannel: #acceptChannel
9e710dbc7c92 inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   403
                    #modifiedChannel: #modifiedChannel
751
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   404
                          )
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   405
                           #(#LabelSpec
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   406
                              #name: 'labelOriginX'
949
2e3469100a6a fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   407
                              #layout: #(#AlignmentOrigin 83 0 39 0 1 0)
751
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   408
                              #label: 'Top:'
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   409
                          )
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   410
                           #(#InputFieldSpec
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   411
                              #name: 'fieldOriginY'
949
2e3469100a6a fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   412
                              #layout: #(#LayoutFrame 85 0 36 0 135 0 58 0)
751
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   413
                              #activeHelpKey: #originY
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   414
                              #tabable: true
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   415
                              #model: #topOffset
949
2e3469100a6a fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   416
                              #group: #inputGroup
751
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   417
                              #type: #numberOrNil
1063
9e710dbc7c92 inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   418
                    #acceptChannel: #acceptChannel
9e710dbc7c92 inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   419
                    #modifiedChannel: #modifiedChannel
751
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   420
                          )
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   421
                        )
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   422
                    )
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   423
                    #label: 'Origin'
b182b42defd0 FramedBoxes for the UILayoutTool!
tz
parents: 741
diff changeset
   424
                    #labelPosition: #topLeft
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   425
                )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   426
              )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   427
          )
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   428
      )
922
0a5799408f54 assign all inputFields to a common group.
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   429
949
2e3469100a6a fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents: 922
diff changeset
   430
    "Modified: / 13.8.1998 / 19:52:15 / cg"
184
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   431
!
700f2ee9911e add help for components
ca
parents: 163
diff changeset
   432
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   433
slices
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   434
    ^ #(
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   435
        ( 'Frame'          LayoutFrame)
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   436
        ( 'Origin'         LayoutOrigin)
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   437
        ( 'Alig.Origin'    AlignmentOrigin)
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   438
        ( 'Point'          Point)
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   439
        ( 'Rectangle'      Rectangle)
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   440
        ( 'Extent'         Extent)
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   441
       ) 
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   442
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   443
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   444
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   445
windowSpec
741
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   446
    "This resource specification was automatically generated
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   447
     by the UIPainter of ST/X."
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   448
741
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   449
    "Do not manually edit this!! If it is corrupted,
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   450
     the UIPainter may not be able to read the specification."
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   451
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   452
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   453
     UIPainter new openOnClass:UILayoutTool andSelector:#windowSpec
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   454
     UILayoutTool new openInterface:#windowSpec
741
c94606aecebf user defined font support
tz
parents: 714
diff changeset
   455
     UILayoutTool open
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   456
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   457
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   458
    <resource: #canvas>
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   459
1305
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   460
    ^ 
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   461
     #(#FullSpec
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   462
        #name: #windowSpec
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   463
        #window: 
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   464
       #(#WindowSpec
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   465
          #label: 'UILayoutTool'
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   466
          #name: 'UILayoutTool'
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   467
          #min: #(#Point 10 10)
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   468
          #max: #(#Point 1152 900)
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   469
          #bounds: #(#Rectangle 12 22 312 322)
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   470
        )
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   471
        #component: 
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   472
       #(#SpecCollection
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   473
          #collection: #(
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   474
           #(#NoteBookViewSpec
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   475
              #attributes: 
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   476
             #(#tabable
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   477
                true
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   478
              )
1305
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   479
              #name: 'NoteBook'
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   480
              #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   481
              #activeHelpKey: #layoutTool
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   482
              #enableChannel: #enableChannel
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   483
              #tabable: true
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   484
              #model: #noteBookModel
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   485
              #menu: #noteBookList
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   486
              #direction: #bottom
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   487
              #canvas: #layoutCanvasHolder
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   488
              #keepCanvasAlive: true
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   489
            )
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   490
           )
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   491
         
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   492
        )
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   493
      )
1332
ba34b85c14d8 do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   494
ba34b85c14d8 do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   495
    "Modified: / 5.2.2000 / 15:37:02 / cg"
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   496
! !
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   497
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   498
!UILayoutTool methodsFor:'accessing'!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   499
1063
9e710dbc7c92 inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   500
acceptChannel
9e710dbc7c92 inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   501
    "return the value of the instance variable 'acceptChannel' (automatically generated)"
9e710dbc7c92 inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   502
9e710dbc7c92 inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   503
    ^ masterApplication acceptChannel
9e710dbc7c92 inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   504
!
9e710dbc7c92 inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
   505
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   506
layout
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   507
    "returns configued layout or nil
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   508
    "
1305
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   509
    ^ currentTool notNil ifTrue:[currentTool layout]
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   510
                        ifFalse:[nil]
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   511
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   512
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   513
layoutType
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   514
    "returns current layout type or nil
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   515
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   516
    |slice|
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   517
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   518
    (slice := self selectedSlice) notNil ifTrue:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   519
        ^ slice last
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   520
    ].
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   521
  ^ nil
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   522
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   523
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   524
layoutView
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   525
    "returns current edited view
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   526
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   527
    ^ layoutView
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   528
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   529
1072
84ae04e0af72 defaultExtent (in panels)
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
   530
layoutView:aView type:aTypeOrNil spec:aSpec
283
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   531
    "change current edited view
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   532
    "
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   533
    |type name list|
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   534
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   535
    layoutView := aView.
1072
84ae04e0af72 defaultExtent (in panels)
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
   536
    layoutSpec := aSpec.
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   537
1074
49ef9991d1d5 disable defaultExtent button when editing the top-windows spec.
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
   538
    (self aspectFor:#defaultExtentEnabled) value:(aSpec class ==  WindowSpec) not.
49ef9991d1d5 disable defaultExtent button when editing the top-windows spec.
Claus Gittinger <cg@exept.de>
parents: 1072
diff changeset
   539
283
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   540
    aTypeOrNil notNil ifTrue:[
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   541
        self class slices findFirst:[:e|
283
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   542
            e last == aTypeOrNil ifTrue:[name := e first. true]
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   543
        ].
283
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   544
        list := Array with:name
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   545
    ] ifFalse:[
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   546
        (type := UIPainterView layoutType:layoutView) notNil ifTrue:[
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   547
            self class slices findFirst:[:e|
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   548
                e last == type ifTrue:[name := e first. true]
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   549
            ].
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   550
            list := tabList.
235
4e6c0d0c6ba5 in case of layout container set extent otherwise all
ca
parents: 221
diff changeset
   551
283
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   552
            type == #Extent ifTrue:[
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   553
                aView superView specClass isLayoutContainer ifTrue:[
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   554
                    list := Array with:name
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   555
                ] ifFalse:[
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   556
                    list := list copyWith:name
2f98233309f0 support layout of canvas view
ca
parents: 264
diff changeset
   557
                ]
235
4e6c0d0c6ba5 in case of layout container set extent otherwise all
ca
parents: 221
diff changeset
   558
            ]
4e6c0d0c6ba5 in case of layout container set extent otherwise all
ca
parents: 221
diff changeset
   559
        ]
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   560
    ].
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   561
    self noteBookList  value:list.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   562
    self noteBookModel value:name.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   563
    self update.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   564
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   565
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   566
modifiedHolder:aValueHolder
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   567
    "set the value holder set to true in case of modifying attributes
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   568
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   569
    modifiedHolder notNil ifTrue:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   570
        modifiedHolder removeDependent:self. 
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   571
    ].
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   572
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   573
    (modifiedHolder := aValueHolder) notNil ifTrue:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   574
        modifiedHolder addDependent:self.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   575
    ].
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   576
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   577
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   578
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   579
update
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   580
    "update from view
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   581
    "
1305
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   582
    |view|
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   583
1305
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   584
    (selection notNil and:[currentTool notNil]) ifTrue:[
1072
84ae04e0af72 defaultExtent (in panels)
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
   585
        (view := layoutView) notNil ifTrue:[
1305
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   586
            currentTool fetch:view spec:layoutSpec
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   587
        ]
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   588
    ].
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   589
        
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   590
! !
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   591
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   592
!UILayoutTool methodsFor:'aspects'!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   593
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   594
aspectFor:aKey
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   595
    "returns aspect for a key or nil
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   596
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   597
  ^ aspects at:aKey ifAbsent:[ super aspectFor:aKey ]
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
1305
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   602
layoutCanvasHolder
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   603
    |holder|
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   604
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   605
    (holder := builder bindingAt:#layoutCanvasHolder) isNil ifTrue:[
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   606
        holder := ValueHolder new.
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   607
        builder aspectAt:#layoutCanvasHolder put:holder
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   608
    ].
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   609
  ^ holder
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   610
!
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   611
1072
84ae04e0af72 defaultExtent (in panels)
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
   612
notUsingDefaultExtent
84ae04e0af72 defaultExtent (in panels)
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
   613
    |holder|
84ae04e0af72 defaultExtent (in panels)
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
   614
84ae04e0af72 defaultExtent (in panels)
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
   615
    (holder := builder bindingAt:#notUsingDefaultExtent) isNil ifTrue:[
84ae04e0af72 defaultExtent (in panels)
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
   616
        holder := BlockValue forLogicalNot:(self aspectFor:#useDefaultExtent).
84ae04e0af72 defaultExtent (in panels)
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
   617
        builder aspectAt:#notUsingDefaultExtent put:holder.
84ae04e0af72 defaultExtent (in panels)
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
   618
    ].
84ae04e0af72 defaultExtent (in panels)
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
   619
    ^ holder
84ae04e0af72 defaultExtent (in panels)
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
   620
84ae04e0af72 defaultExtent (in panels)
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
   621
!
84ae04e0af72 defaultExtent (in panels)
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
   622
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   623
noteBookList
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   624
    "returns list of tab labels
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   625
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   626
    |holder|
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   627
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   628
    (holder := builder bindingAt:#noteBookList) isNil ifTrue:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   629
        holder := nil asValue.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   630
        builder aspectAt:#noteBookList put:holder
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   631
    ].
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   632
  ^ holder
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   633
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   634
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   635
noteBookModel
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   636
    "automatically generated by UIPainter ..."
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   637
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   638
    |holder|
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   639
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   640
    (holder := builder bindingAt:#noteBookModel) isNil ifTrue:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   641
        holder := AspectAdaptor new subject:self; forAspect:#selection.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   642
        builder aspectAt:#noteBookModel put:holder.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   643
    ].
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   644
    ^ holder
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   645
! !
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   646
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   647
!UILayoutTool methodsFor:'change & update'!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   648
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   649
update:something with:aParameter from:changedObject
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   650
    "one of my models changed its value
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   651
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   652
    changedObject ~~ modifiedHolder ifTrue:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   653
        modifiedHolder value ~~ true ifTrue:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   654
            modifiedHolder isNil ifFalse:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   655
                modifiedHolder value:true
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   656
            ]
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   657
        ]
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
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   662
!UILayoutTool methodsFor:'converting absolute'!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   663
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   664
absolute:what xOrY:xOrY
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   665
    "compute what as absolute (i.e. fraction=0, offset >= 0)"
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   666
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   667
    |extent fraction offset fractSymb offsetSymb 
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   668
     newOffset newFraction fractHolder offsetHolder|
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   669
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   670
    extent     := (self layoutView superView computeExtent) perform:xOrY.
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   671
    fractSymb  := (what, 'Fraction') asSymbol.
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   672
    offsetSymb := (what,   'Offset') asSymbol.
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   673
    fractHolder := (self aspectFor:fractSymb).
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   674
    offsetHolder := (self aspectFor:offsetSymb).
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   675
    fraction   := fractHolder  value.
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   676
    offset     := offsetHolder value.
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   677
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   678
    newOffset := offset + ((fraction * extent) asInteger).
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   679
    newFraction := 0.
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   680
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   681
    fractHolder  value:newFraction.
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   682
    offsetHolder value:newOffset.
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   683
!
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   684
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   685
absoluteBottom
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   686
    "compute bottom as absolute (i.e. fraction=0, offset >= 0)"
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   687
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   688
    self absolute:'bottom' xOrY:#y
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   689
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   690
!
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   691
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   692
absoluteLeft
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   693
    "compute left as absolute (i.e. fraction=0, offset >= 0)"
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   694
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   695
    self absolute:'left' xOrY:#x
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   696
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   697
!
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   698
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   699
absoluteRight
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   700
    "compute right as absolute (i.e. fraction=0, offset >= 0)"
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   701
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   702
    self absolute:'right' xOrY:#x
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   703
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   704
!
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   705
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   706
absoluteTop
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   707
    "compute top as absolute (i.e. fraction=0, offset >= 0)"
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   708
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   709
    self absolute:'top' xOrY:#y
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   710
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   711
! !
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   712
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   713
!UILayoutTool methodsFor:'converting absolute from corner'!
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   714
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   715
bottomRelativeBottom
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   716
    "compute bottom relative to containers bottom (fraction=1, offset negative)"
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   717
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   718
    self cornerRelative:'bottom' xOrY:#y
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   719
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   720
!
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   721
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   722
bottomRelativeTop
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   723
    "compute top relative to containers bottom (fraction=1, offset negative)"
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   724
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   725
    self cornerRelative:'top' xOrY:#y
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   726
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   727
!
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   728
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   729
cornerRelative:what xOrY:xOrY
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   730
    "compute what relative to the corner (i.e. fraction=1, offset negative)"
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   731
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   732
    |extent fraction offset fractSymb offsetSymb 
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   733
     newFraction newOffset fractHolder offsetHolder|
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   734
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   735
    extent     := (self layoutView superView computeExtent) perform:xOrY.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   736
    fractSymb  := (what, 'Fraction') asSymbol.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   737
    offsetSymb := (what,   'Offset') asSymbol.
1198
6b7cfe55105b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
   738
    fractHolder := (self aspectFor:fractSymb).
6b7cfe55105b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
   739
    offsetHolder := (self aspectFor:offsetSymb).
6b7cfe55105b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
   740
    fraction   := fractHolder  value.
6b7cfe55105b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
   741
    offset     := offsetHolder value.
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   742
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   743
    newOffset := offset + ((fraction * extent) asInteger).
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   744
    newOffset := newOffset - extent.
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   745
    newFraction := 1.
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   746
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   747
    fractHolder  value:newFraction.
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   748
    offsetHolder value:newOffset.
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   749
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   750
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   751
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   752
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   753
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   754
rightRelativeLeft
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   755
    "compute left relative to containers right (fraction=1, offset negative)"
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   756
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   757
    self cornerRelative:'left' xOrY:#x
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   758
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   759
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   760
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   761
rightRelativeRight
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   762
    "compute right relative to containers right (fraction=1, offset negative)"
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   763
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   764
    self cornerRelative:'right' xOrY:#x
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   765
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   766
! !
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   767
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   768
!UILayoutTool methodsFor:'converting relative'!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   769
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   770
relative:what xOrY:xOrY
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   771
    "compute what relative to the origin (i.e. fraction=0..1, offset 0)"
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   772
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   773
    |extent fraction offset fractSymb offsetSymb 
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   774
     newFraction newOffset
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   775
     fractHolder offsetHolder|
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   776
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   777
    extent     := (self layoutView superView computeExtent) perform:xOrY.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   778
    fractSymb  := (what, 'Fraction') asSymbol.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   779
    offsetSymb := (what,   'Offset') asSymbol.
1198
6b7cfe55105b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
   780
    fractHolder := (self aspectFor:fractSymb).
6b7cfe55105b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
   781
    offsetHolder := (self aspectFor:offsetSymb).
6b7cfe55105b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
   782
    fraction   := fractHolder  value.
6b7cfe55105b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
   783
    offset     := offsetHolder value.
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   784
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   785
    newFraction   := (fraction + (offset / extent)) asFloat.
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   786
    newOffset := 0.
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   787
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   788
    (newFraction > 1.0) ifTrue:[newFraction := 1.0].
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   789
    (newFraction < 0.0) ifTrue:[newFraction := 0].
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   790
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   791
    offsetHolder value:newOffset.
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   792
    fractHolder  value:newFraction.
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   793
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   794
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   795
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   796
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   797
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   798
relativeBottom
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   799
    "compute bottom relative to the origin (i.e. fraction=0..1, offset 0)"
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   800
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   801
    self relative:'bottom' xOrY:#y
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   802
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   803
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   804
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   805
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   806
relativeLeft
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   807
    "compute left relative to the origin (i.e. fraction=0..1, offset 0)"
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   808
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   809
    self relative:'left' xOrY:#x
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   810
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   811
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   812
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   813
relativeRight
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   814
    "compute right relative to the origin (i.e. fraction=0..1, offset 0)"
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   815
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   816
    self relative:'right' xOrY:#x
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
relativeTop
1339
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   821
    "compute top relative to the origin (i.e. fraction=0..1, offset 0)"
b989732e3610 added make right/bottom relative functions
Claus Gittinger <cg@exept.de>
parents: 1334
diff changeset
   822
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   823
    self relative:'top' xOrY:#y
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   824
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   825
! !
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   826
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   827
!UILayoutTool methodsFor:'initialization'!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   828
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   829
initialize
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   830
    "initialize channels
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   831
    "
221
319a24a1df06 slow grow operation on array removed
ca
parents: 201
diff changeset
   832
    |slices size|
319a24a1df06 slow grow operation on array removed
ca
parents: 201
diff changeset
   833
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   834
    super initialize.
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   835
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   836
    aspects  := IdentityDictionary new.
1305
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   837
    toolsDictionary := IdentityDictionary new.
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   838
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   839
    #(  bottomFraction          bottomOffset
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   840
        leftFraction            leftOffset
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   841
        topFraction             topOffset
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   842
        rightFraction           rightOffset
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   843
        leftAlignmentFraction   topAlignmentFraction
1268
1bc516d840bf must initialize some valueHolders with real boolean
Claus Gittinger <cg@exept.de>
parents: 1198
diff changeset
   844
        (useDefaultExtent     false)
1bc516d840bf must initialize some valueHolders with real boolean
Claus Gittinger <cg@exept.de>
parents: 1198
diff changeset
   845
        (defaultExtentEnabled false)
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   846
    )
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   847
1268
1bc516d840bf must initialize some valueHolders with real boolean
Claus Gittinger <cg@exept.de>
parents: 1198
diff changeset
   848
    do:[:aKeyOrPair| |holder key val|
1bc516d840bf must initialize some valueHolders with real boolean
Claus Gittinger <cg@exept.de>
parents: 1198
diff changeset
   849
        (key := aKeyOrPair) isSymbol ifFalse:[
1bc516d840bf must initialize some valueHolders with real boolean
Claus Gittinger <cg@exept.de>
parents: 1198
diff changeset
   850
            key := aKeyOrPair first.
1bc516d840bf must initialize some valueHolders with real boolean
Claus Gittinger <cg@exept.de>
parents: 1198
diff changeset
   851
            val := aKeyOrPair second
1bc516d840bf must initialize some valueHolders with real boolean
Claus Gittinger <cg@exept.de>
parents: 1198
diff changeset
   852
        ].
1bc516d840bf must initialize some valueHolders with real boolean
Claus Gittinger <cg@exept.de>
parents: 1198
diff changeset
   853
        holder := val asValue.
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   854
        holder addDependent:self.
1268
1bc516d840bf must initialize some valueHolders with real boolean
Claus Gittinger <cg@exept.de>
parents: 1198
diff changeset
   855
        aspects at:key put:holder.
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   856
    ].
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   857
221
319a24a1df06 slow grow operation on array removed
ca
parents: 201
diff changeset
   858
    slices  := self class slices.
319a24a1df06 slow grow operation on array removed
ca
parents: 201
diff changeset
   859
    size    := slices size - 1.
319a24a1df06 slow grow operation on array removed
ca
parents: 201
diff changeset
   860
    tabList := Array new:size.
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   861
221
319a24a1df06 slow grow operation on array removed
ca
parents: 201
diff changeset
   862
    1 to:size do:[:i| tabList at:i put:((slices at:i) first) ].
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   863
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   864
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   865
! !
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   866
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   867
!UILayoutTool methodsFor:'selection'!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   868
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   869
selectedSlice
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   870
    "returns slice assigned to selection or nil
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   871
    "
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   872
    selection notNil ifTrue:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   873
        self class slices do:[:aSlice|
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   874
            aSlice first = selection ifTrue:[
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   875
                ^ aSlice
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   876
            ]
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   877
        ]
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   878
    ].
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   879
    ^ nil
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   880
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   881
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   882
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   883
selection
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   884
    ^ selection
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   885
!
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   886
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   887
selection:aSelection
1305
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   888
    |appl slice sel noteBook key view|
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   889
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   890
    aSelection isNumber ifTrue:[
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   891
        aSelection ~~ 0 ifTrue:[sel := tabList at:aSelection]
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   892
    ] ifFalse:[
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   893
        sel := aSelection
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   894
    ].
1305
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   895
293
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   896
    selection = sel ifFalse:[
54d00bdebfa9 update help text
ca
parents: 283
diff changeset
   897
        (selection := sel) notNil ifTrue:[
1305
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   898
            key := selection asSymbol.
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   899
            appl := toolsDictionary at:key ifAbsent:nil.
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   900
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   901
            appl isNil ifTrue:[
1334
36c1ee53aede bug fix for HelpSpec
ca
parents: 1332
diff changeset
   902
                view  := ApplicationSubView new.
1305
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   903
                slice := self selectedSlice.
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   904
                appl  := slice last asString.
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   905
                appl := Smalltalk classNamed:(self class name asString, '::', appl).
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   906
                appl := appl new.
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   907
                appl masterApplication:self.
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   908
                appl createBuilder.
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   909
                view client:appl.
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   910
                appl window:view.
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   911
                toolsDictionary at:key put:appl.
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   912
            ] ifFalse:[
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   913
                view := appl window
1332
ba34b85c14d8 do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   914
            ].
ba34b85c14d8 do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   915
            modifiedHolder value:true.
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   916
        ].
1305
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   917
        currentTool := appl.
3aa9dab59633 use the canvasHolder in Notebook
ca
parents: 1304
diff changeset
   918
        self layoutCanvasHolder value:view.
163
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   919
    ].
dff48b7ca574 intitial checkin
ca
parents:
diff changeset
   920
    self update
1332
ba34b85c14d8 do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   921
ba34b85c14d8 do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   922
    "Modified: / 4.2.2000 / 22:31:41 / cg"
ba34b85c14d8 do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   923
! !
ba34b85c14d8 do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   924
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   925
!UILayoutTool::AnyLayout class methodsFor:'image specs'!
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   926
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   927
imageAbsX
1332
ba34b85c14d8 do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   928
    "This resource specification was automatically generated
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   929
     by the ImageEditor of ST/X."
1332
ba34b85c14d8 do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   930
ba34b85c14d8 do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   931
    "Do not manually edit this!! If it is corrupted,
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   932
     the ImageEditor may not be able to read the specification."
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   933
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   934
    "
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   935
     self imageAbsX inspect
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   936
     ImageEditor openOnClass:self andSelector:#imageAbsX
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   937
    "
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   938
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   939
    <resource: #image>
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   940
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   941
    ^Icon
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   942
        constantNamed:#'UILayoutTool imageAbsX'
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   943
        ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   944
<@BP@I@N$L*P*)BZ''8*@@(@B''8*P&)B*$L*PC)@@<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   945
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
1447
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
   946
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'<@C0@O@N<L;0;/C>??;??/?>??;0?/C.<L;0C/@@<@@b') ; yourself); yourself]
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
   947
!
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   948
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   949
imageAbsXFromRight
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   950
    "This resource specification was automatically generated
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   951
     by the ImageEditor of ST/X."
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   952
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   953
    "Do not manually edit this!! If it is corrupted,
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   954
     the ImageEditor may not be able to read the specification."
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   955
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   956
    "
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   957
     self imageAbsXFromRight inspect
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   958
     ImageEditor openOnClass:self andSelector:#imageAbsXFromRight
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   959
    "
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   960
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   961
    <resource: #image>
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   962
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   963
    ^Icon
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   964
        constantNamed:#'UILayoutTool imageAbsXFromRight'
1447
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
   965
        ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@<@BW@IT0%UBU$IT_%@@T@AT_%YBUTIT0%0BP@I@@<b') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@<@C7@O\0=7C7<O_?=??7??_?=?C7\O\0=0C0@O@@<b') ; yourself); yourself]
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
   966
!
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   967
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   968
imageAbsY
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   969
    "This resource specification was automatically generated
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   970
     by the ImageEditor of ST/X."
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   971
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   972
    "Do not manually edit this!! If it is corrupted,
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   973
     the ImageEditor may not be able to read the specification."
1332
ba34b85c14d8 do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   974
ba34b85c14d8 do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   975
    "
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   976
     self imageAbsY inspect
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   977
     ImageEditor openOnClass:self andSelector:#imageAbsY
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   978
    "
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   979
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   980
    <resource: #image>
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   981
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   982
    ^Icon
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   983
        constantNamed:#'UILayoutTool imageAbsY'
1447
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
   984
        ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??>@@X@A?''<BP@I@@$@BPA98D@ HD@P O''0 AC?<@@@b') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??????????<C0@O@@<@C0A?8G? O<@_ O?0??C?<@@@b') ; yourself); yourself]
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
   985
!
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   986
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   987
imageAbsYFromBottom
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   988
    "This resource specification was automatically generated
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   989
     by the ImageEditor of ST/X."
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   990
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   991
    "Do not manually edit this!! If it is corrupted,
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   992
     the ImageEditor may not be able to read the specification."
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   993
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   994
    "
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   995
     self imageAbsYFromBottom inspect
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   996
     ImageEditor openOnClass:self andSelector:#imageAbsYFromBottom
1332
ba34b85c14d8 do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   997
    "
ba34b85c14d8 do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   998
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
   999
    <resource: #image>
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1000
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1001
    ^Icon
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1002
        constantNamed:#'UILayoutTool imageAbsYFromBottom'
1447
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1003
        ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@??B@DO''0DH@ PD@ ^^@I@@$@BP@I@?''>@@X@A??<b') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@??C?<O?0G8@?0G? _>@O@@<@C0@O@??????????<b') ; yourself); yourself]
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1004
!
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1005
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1006
imageFractX
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1007
    "This resource specification was automatically generated
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1008
     by the ImageEditor of ST/X."
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1009
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1010
    "Do not manually edit this!! If it is corrupted,
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1011
     the ImageEditor may not be able to read the specification."
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1012
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1013
    "
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1014
     self imageFractX inspect
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1015
     ImageEditor openOnClass:self andSelector:#imageFractX
1332
ba34b85c14d8 do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
  1016
    "
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1017
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1018
    <resource: #image>
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1019
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1020
    ^Icon
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1021
        constantNamed:#'UILayoutTool::AnyLayout imageFractX'
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1022
        ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1023
<@>PBY@I&A&TJYII$X&@@X@A$X&RRYP)&A&PBY@I<@<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1024
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
1447
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1025
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'<@?0C?@O>A?<O?9????????????>_?0?>A?0C?@O<@<b') ; yourself); yourself]
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1026
!
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1027
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1028
imageFractY
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1029
    "This resource specification was automatically generated
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1030
     by the ImageEditor of ST/X."
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1031
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1032
    "Do not manually edit this!! If it is corrupted,
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1033
     the ImageEditor may not be able to read the specification."
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1034
1332
ba34b85c14d8 do not overwrite defaultFin windowSpec
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
  1035
    "
1343
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1036
     self imageFractY inspect
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1037
     ImageEditor openOnClass:self andSelector:#imageFractY
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1038
    "
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1039
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1040
    <resource: #image>
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1041
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1042
    ^Icon
7d97b214f2ac buttons
Claus Gittinger <cg@exept.de>
parents: 1339
diff changeset
  1043
        constantNamed:#'UILayoutTool::AnyLayout imageFractY'
1447
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1044
        ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??>@@X@A?''<PB@ PAB@BP@I@AB@HDA@H?''>@@X@A??<b') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??????????<_>@?0A>@C0@O@A>@O<A?8??????????<b') ; yourself); yourself]
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1045
! !
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1046
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1047
!UILayoutTool::AlignmentOrigin class methodsFor:'help specs'!
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1048
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1049
helpSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1050
    "This resource specification was automatically generated
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1051
     by the UIHelpTool of ST/X."
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1052
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1053
    "Do not manually edit this!! If it is corrupted,
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1054
     the UIHelpTool may not be able to read the specification."
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1055
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1056
    "
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1057
     UIHelpTool openOnClass:UILayoutTool::AlignmentOrigin    
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1058
    "
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1059
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1060
    <resource: #help>
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1061
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1062
    ^super helpSpec addPairsFrom:#(
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1063
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1064
#alignBottomCenter
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1065
'Aligns the selected widget bottomCenter to location.'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1066
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1067
#alignBottomLeft
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1068
'Aligns the selected widget bottomLeft to location.'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1069
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1070
#alignBottomRight
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1071
'Aligns the selected widget bottomRight to location.'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1072
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1073
#alignCenter
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1074
'Aligns the selected widget center to location.'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1075
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1076
#alignHorizontal
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1077
'Horizontal inset to the location point of the selected widget.'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1078
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1079
#alignLeftCenter
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1080
'Aligns the selected widget leftCenter to location.'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1081
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1082
#alignRightCenter
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1083
'Aligns the selected widget rightCenter to location.'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1084
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1085
#alignTopCenter
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1086
'Aligns the selected widget topCenter to location.'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1087
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1088
#alignTopLeft
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1089
'Aligns the selected widget topLeft to location.'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1090
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1091
#alignTopRight
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1092
'Aligns the selected widget topRight to location.'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1093
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1094
#alignVertical
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1095
'Vertical inset to the location point of the widget.'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1096
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1097
)
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1098
! !
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1099
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1100
!UILayoutTool::AlignmentOrigin class methodsFor:'interface specs'!
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1101
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1102
windowSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1103
    "This resource specification was automatically generated
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1104
     by the UIPainter of ST/X."
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1105
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1106
    "Do not manually edit this!! If it is corrupted,
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1107
     the UIPainter may not be able to read the specification."
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1108
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1109
    "
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1110
     UIPainter new openOnClass:UILayoutTool::AlignmentOrigin andSelector:#windowSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1111
     UILayoutTool::AlignmentOrigin new openInterface:#windowSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1112
     UILayoutTool::AlignmentOrigin open
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1113
    "
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1114
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1115
    <resource: #canvas>
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1116
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1117
    ^ 
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1118
     #(#FullSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1119
        #name: #windowSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1120
        #window: 
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1121
       #(#WindowSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1122
          #label: 'UILayoutTool-AlignmentOrigin'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1123
          #name: 'UILayoutTool-AlignmentOrigin'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1124
          #min: #(#Point 10 10)
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1125
          #max: #(#Point 1152 900)
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1126
          #bounds: #(#Rectangle 42 231 447 438)
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1127
        )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1128
        #component: 
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1129
       #(#SpecCollection
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1130
          #collection: #(
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1131
           #(#UISubSpecification
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1132
              #name: 'layoutOriginSpec'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1133
              #layout: #(#LayoutFrame 1 0.0 6 0 0 1.0 111 0)
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1134
              #majorKey: #UILayoutTool
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1135
              #minorKey: #layoutOriginSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1136
            )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1137
           #(#FramedBoxSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1138
              #label: 'Alignment'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1139
              #name: 'FramedBox'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1140
              #layout: #(#LayoutFrame 1 0.0 113 0 0 1.0 208 0)
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1141
              #labelPosition: #topLeft
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1142
              #component: 
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1143
             #(#SpecCollection
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1144
                #collection: #(
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1145
                 #(#LabelSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1146
                    #label: 'Horizontal:'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1147
                    #name: 'alignHLabel'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1148
                    #layout: #(#AlignmentOrigin 88 0 17 0 1 0)
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1149
                    #adjust: #right
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1150
                  )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1151
                 #(#InputFieldSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1152
                    #attributes: 
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1153
                   #(#tabable
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1154
                      true
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1155
                    )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1156
                    #name: 'leftAlignmentFractionField'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1157
                    #layout: #(#LayoutFrame 90 0 14 0 147 0 36 0)
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1158
                    #activeHelpKey: #alignHorizontal
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1159
                    #tabable: true
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1160
                    #model: #leftAlignmentFraction
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1161
                    #group: #inputGroup
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1162
                    #type: #numberOrNil
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1163
                    #acceptOnLostFocus: true
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1164
                    #acceptChannel: #acceptChannel
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1165
                    #modifiedChannel: #modifiedChannel
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1166
                    #acceptOnPointerLeave: false
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1167
                  )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1168
                 #(#LabelSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1169
                    #label: 'Vertical:'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1170
                    #name: 'alignVLabel'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1171
                    #layout: #(#AlignmentOrigin 88 0 43 0 1 0)
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1172
                    #adjust: #right
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1173
                  )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1174
                 #(#InputFieldSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1175
                    #attributes: 
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1176
                   #(#tabable
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1177
                      true
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1178
                    )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1179
                    #name: 'topAlignmentFractionField'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1180
                    #layout: #(#LayoutFrame 90 0 40 0 147 0 62 0)
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1181
                    #activeHelpKey: #alignVertical
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1182
                    #tabable: true
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1183
                    #model: #topAlignmentFraction
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1184
                    #group: #inputGroup
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1185
                    #type: #numberOrNil
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1186
                    #acceptOnLostFocus: true
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1187
                    #acceptChannel: #acceptChannel
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1188
                    #modifiedChannel: #modifiedChannel
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1189
                    #acceptOnPointerLeave: false
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1190
                  )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1191
                 #(#DividerSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1192
                    #name: 'separator1'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1193
                    #layout: #(#LayoutFrame 204 0 19 0 245 0 22 0)
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1194
                  )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1195
                 #(#DividerSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1196
                    #name: 'separator2'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1197
                    #layout: #(#LayoutFrame 204 0 55 0 245 0 58 0)
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1198
                  )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1199
                 #(#DividerSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1200
                    #name: 'separator3'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1201
                    #layout: #(#LayoutFrame 196 0 28 0 199 0 50 0)
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1202
                    #orientation: #vertical
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1203
                  )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1204
                 #(#DividerSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1205
                    #name: 'separator4'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1206
                    #layout: #(#LayoutFrame 250 0 28 0 253 0 50 0)
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1207
                    #orientation: #vertical
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1208
                  )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1209
                 #(#ActionButtonSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1210
                    #attributes: 
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1211
                   #(#tabable
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1212
                      true
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1213
                    )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1214
                    #name: 'alignTopLeft'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1215
                    #layout: #(#LayoutFrame 190 0 14 0 204 0 28 0)
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1216
                    #activeHelpKey: #alignTopLeft
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1217
                    #tabable: true
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1218
                    #model: #alignTopLeft
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1219
                  )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1220
                 #(#ActionButtonSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1221
                    #attributes: 
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1222
                   #(#tabable
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1223
                      true
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1224
                    )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1225
                    #name: 'alignTopCenter'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1226
                    #layout: #(#LayoutFrame 217 0 14 0 231 0 28 0)
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1227
                    #activeHelpKey: #alignTopCenter
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1228
                    #tabable: true
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1229
                    #model: #alignTopCenter
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1230
                  )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1231
                 #(#ActionButtonSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1232
                    #attributes: 
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1233
                   #(#tabable
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1234
                      true
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1235
                    )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1236
                    #name: 'alignTopRight'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1237
                    #layout: #(#LayoutFrame 245 0 14 0 259 0 28 0)
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1238
                    #activeHelpKey: #alignTopRight
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1239
                    #tabable: true
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1240
                    #model: #alignTopRight
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1241
                  )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1242
                 #(#ActionButtonSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1243
                    #attributes: 
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1244
                   #(#tabable
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1245
                      true
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1246
                    )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1247
                    #name: 'alignLeftCenter'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1248
                    #layout: #(#LayoutFrame 190 0 32 0 204 0 46 0)
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1249
                    #activeHelpKey: #alignLeftCenter
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1250
                    #tabable: true
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1251
                    #model: #alignLeftCenter
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1252
                  )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1253
                 #(#ActionButtonSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1254
                    #attributes: 
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1255
                   #(#tabable
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1256
                      true
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1257
                    )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1258
                    #name: 'alignCenter'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1259
                    #layout: #(#LayoutFrame 217 0 32 0 231 0 46 0)
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1260
                    #activeHelpKey: #alignCenter
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1261
                    #tabable: true
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1262
                    #model: #alignCenter
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1263
                  )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1264
                 #(#ActionButtonSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1265
                    #attributes: 
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1266
                   #(#tabable
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1267
                      true
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1268
                    )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1269
                    #name: 'alignRightCenter'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1270
                    #layout: #(#LayoutFrame 245 0 32 0 259 0 46 0)
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1271
                    #activeHelpKey: #alignRightCenter
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1272
                    #tabable: true
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1273
                    #model: #alignRightCenter
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1274
                  )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1275
                 #(#ActionButtonSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1276
                    #attributes: 
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1277
                   #(#tabable
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1278
                      true
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1279
                    )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1280
                    #name: 'alignBottomLeft'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1281
                    #layout: #(#LayoutFrame 190 0 50 0 204 0 64 0)
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1282
                    #activeHelpKey: #alignBottomLeft
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1283
                    #tabable: true
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1284
                    #model: #alignBottomLeft
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1285
                  )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1286
                 #(#ActionButtonSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1287
                    #attributes: 
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1288
                   #(#tabable
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1289
                      true
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1290
                    )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1291
                    #name: 'alignBottomCenter'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1292
                    #layout: #(#LayoutFrame 217 0 50 0 231 0 64 0)
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1293
                    #activeHelpKey: #alignBottomCenter
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1294
                    #tabable: true
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1295
                    #model: #alignBottomCenter
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1296
                  )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1297
                 #(#ActionButtonSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1298
                    #attributes: 
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1299
                   #(#tabable
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1300
                      true
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1301
                    )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1302
                    #name: 'alignBottomRight'
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1303
                    #layout: #(#LayoutFrame 245 0 50 0 259 0 64 0)
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1304
                    #activeHelpKey: #alignBottomRight
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1305
                    #tabable: true
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1306
                    #model: #alignBottomRight
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1307
                  )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1308
                 )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1309
               
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1310
              )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1311
            )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1312
           )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1313
         
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1314
        )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1315
      )
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1316
! !
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1317
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1318
!UILayoutTool::AlignmentOrigin methodsFor:'accessing'!
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1319
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1320
fetch:aView spec:aSpec
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1321
    "fetch alignmentOrigin
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1322
    "
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1323
    |layout type 
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1324
     leftAlignmentFractionHolder topAlignmentFractionHolder
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1325
     leftOffsetHolder leftFractionHolder topOffsetHolder topFractionHolder|
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1326
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1327
    type   := UIPainterView layoutType:aView.
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1328
    layout := aView geometryLayout.
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1329
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1330
    leftOffsetHolder := (self aspectFor:#leftOffset).
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1331
    leftFractionHolder := (self aspectFor:#leftFraction).
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1332
    topOffsetHolder := (self aspectFor:#topOffset).
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1333
    topFractionHolder := (self aspectFor:#topFraction).
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1334
    leftAlignmentFractionHolder := (self aspectFor:#leftAlignmentFraction).
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1335
    topAlignmentFractionHolder := (self aspectFor:#topAlignmentFraction).
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1336
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1337
    layout isLayout ifTrue:[
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1338
        leftOffsetHolder   value:(layout leftOffset).
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1339
        leftFractionHolder value:(layout leftFraction).
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1340
        topOffsetHolder    value:(layout topOffset).
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1341
        topFractionHolder  value:(layout topFraction).
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1342
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1343
        type == #AlignmentOrigin ifTrue:[
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1344
            leftAlignmentFractionHolder value:(layout leftAlignmentFraction).
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1345
            topAlignmentFractionHolder  value:(layout topAlignmentFraction).
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1346
          ^ self
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1347
        ]
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1348
    ] ifFalse:[
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1349
        layout := aView computeOrigin.
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1350
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1351
        leftOffsetHolder   value:(layout x).
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1352
        leftFractionHolder value:0.
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1353
        topOffsetHolder    value:(layout y).
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1354
        topFractionHolder  value:0.
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1355
    ].
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1356
    leftAlignmentFractionHolder value:0.
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1357
    topAlignmentFractionHolder  value:0.
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1358
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1359
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1360
!
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1361
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1362
layout
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1363
    "returns current layout as alignmentOrigin
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1364
    "
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1365
    |layout|
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1366
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1367
    layout  := Smalltalk::AlignmentOrigin new.
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1368
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1369
    layout   leftOffset:((self aspectFor:#leftOffset)   value) ? 0.
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1370
    layout    topOffset:((self aspectFor:#topOffset)    value) ? 0.
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1371
    layout leftFraction:((self aspectFor:#leftFraction) value) ? 0.
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1372
    layout  topFraction:((self aspectFor:#topFraction)  value) ? 0.
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1373
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1374
    layout leftAlignmentFraction:((self aspectFor:#leftAlignmentFraction) value) ? 0.
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1375
    layout  topAlignmentFraction:((self aspectFor:#topAlignmentFraction)  value) ? 0.
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1376
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1377
  ^ layout
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1378
! !
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1379
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1380
!UILayoutTool::AlignmentOrigin methodsFor:'alignment'!
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1381
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1382
alignBottomCenter
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1383
    self makeAlignLeft:0.5 top:1
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1384
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1385
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1386
!
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1387
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1388
alignBottomLeft
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1389
    self makeAlignLeft:0 top:1
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1390
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1391
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1392
!
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1393
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1394
alignBottomRight
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1395
    self makeAlignLeft:1 top:1
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1396
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1397
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1398
!
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1399
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1400
alignCenter
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1401
    self makeAlignLeft:0.5 top:0.5
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1402
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1403
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1404
!
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1405
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1406
alignLeftCenter
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1407
    self makeAlignLeft:0 top:0.5
bf034d910b27 bug fix when setting FrameLayout from menu
ca
parents: 1409
diff changeset
  1408