UISpecificationTool.st
author Claus Gittinger <cg@exept.de>
Tue, 28 Oct 1997 21:26:16 +0100
changeset 354 a6de8821d3bf
parent 350 28128eeb98f0
child 364 c175e197f050
permissions -rw-r--r--
add & remove popUpMenu
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
     1
"
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
     2
 COPYRIGHT (c) 1995 by eXept Software AG
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
     3
              All Rights Reserved
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
     4
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
     5
 This software is furnished under a license and may be used
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    10
 hereby transferred.
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    11
"
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    12
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    13
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    14
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    15
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    16
ApplicationModel subclass:#UISpecificationTool
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
    17
	instanceVariableNames:'modifiedHolder aspects specification selection specChannel'
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    18
	classVariableNames:''
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    19
	poolDictionaries:''
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    20
	category:'Interface-UIPainter'
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    21
!
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    22
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    23
!UISpecificationTool class methodsFor:'documentation'!
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    24
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    25
copyright
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    26
"
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    27
 COPYRIGHT (c) 1995 by eXept Software AG
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    28
              All Rights Reserved
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    29
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    30
 This software is furnished under a license and may be used
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    31
 only in accordance with the terms of that license and with the
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    33
 be provided or otherwise made available to, or used by, any
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    34
 other person.  No title to or ownership of the software is
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    35
 hereby transferred.
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    36
"
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    37
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    38
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    39
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    40
!
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    41
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    42
documentation
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    43
"
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    44
    used by the UIPainter to manipulate the specifications of the selected component
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    45
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    46
    [author:]
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    47
        Claus Atzkern
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    48
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    49
    [see also:]
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    50
        UIPainter
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    51
        UILayoutTool
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    52
        UIHelpTool
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    53
"
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    54
! !
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    55
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
    56
!UISpecificationTool class methodsFor:'help specs'!
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
    57
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
    58
helpSpec
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
    59
    "return a dictionary filled with helpKey -> helptext associations.
294
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
    60
     These are used by the activeHelp tool."
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
    61
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
    62
    "
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
    63
    UIHelpTool openOnClass:UISpecificationTool    
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
    64
    "
294
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
    65
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
    66
  ^ super helpSpec addPairsFrom:#(
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
    67
303
798e309561f1 checkin from browser
ca
parents: 294
diff changeset
    68
#action
346
38ea269664f8 modification of help text
ca
parents: 307
diff changeset
    69
'action selector sent to the application when the button is activated. (either on-press or on-release; this depends on the setting of triggerOnDown flag). The selector may be for a one-arg message; in this case, the argument is passed (a string).'
303
798e309561f1 checkin from browser
ca
parents: 294
diff changeset
    70
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
    71
#arbitraryView
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
    72
'the class of the arbitrary component or an aspect selector which provides a widget class.'
294
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
    73
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
    74
#autoRepeat
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
    75
'repeat the action as long as the button is pressed; to have this behavior the ''isTriggerOnDown'' state must be enabled.'
307
fe559a9136d9 changes caused by update of help tool
ca
parents: 303
diff changeset
    76
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
    77
#backgroundColor
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
    78
'set the background color if the color-checkBox is turned on. Otherwise, the widget uses its default background color (which is specified in the styleSheet).'
303
798e309561f1 checkin from browser
ca
parents: 294
diff changeset
    79
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
    80
#beDefault
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
    81
'show/dont show a return-key image after the label'
307
fe559a9136d9 changes caused by update of help tool
ca
parents: 303
diff changeset
    82
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
    83
#booleanHolder
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
    84
'a boolean holder which keeps the state'
294
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
    85
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
    86
#borderWidth
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
    87
'width of the border'
303
798e309561f1 checkin from browser
ca
parents: 294
diff changeset
    88
307
fe559a9136d9 changes caused by update of help tool
ca
parents: 303
diff changeset
    89
#canvas
fe559a9136d9 changes caused by update of help tool
ca
parents: 303
diff changeset
    90
'gets a widget placed into the notebook'
294
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
    91
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
    92
#canvasArgument
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
    93
'the argument to the selector or none'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
    94
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
    95
#canvasSelector
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
    96
'after opening the application as specified by the clientKey,  this message will be sent'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
    97
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
    98
#clientKey
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
    99
'returns an application which provides the builder. By default the application itself is used.'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   100
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   101
#defaultLabel
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   102
'the default label  (used, if nothing selected).'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   103
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   104
#document
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   105
'a holder which keeps the document name.'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   106
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   107
#doubleClickSelector
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   108
'double click action which is evaluated on double click in  case of a non-nil selection.  If the selector ends with '':'' the method is invoked with the current selection as argument.'
294
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
   109
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   110
#enableChannel
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   111
'enable the view - selection changes are allowed. This field specifies the name of the aspect (-method or binding) in your application, which is supposed to return a valueHolder on to the boolean enable-flag.'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   112
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   113
#fileSelectionTreeRoot
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   114
'a holder, which keeps the pathname of the root directory (first entry in the list).'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   115
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   116
#fontMenu
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   117
'set the font for the widget if the font-checkBox is turned on. Otherwise, the widget uses its default font (which is specified in the viewStyle).'
294
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
   118
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   119
#foregroundColor
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   120
'set the foreground color if the color-checkBox is turned on. Otherwise, the widget uses its default foreground color (which is specified in the styleSheet).'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   121
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   122
#galleryLabels
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   123
'a list of tab labels'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   124
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   125
#galleryModel
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   126
'a holder, which keeps the label of the current selected tab or nil.'
294
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
   127
307
fe559a9136d9 changes caused by update of help tool
ca
parents: 303
diff changeset
   128
#gallerySelection
fe559a9136d9 changes caused by update of help tool
ca
parents: 303
diff changeset
   129
'a holder, which keeps the specification of the current selected widget or nil.'
fe559a9136d9 changes caused by update of help tool
ca
parents: 303
diff changeset
   130
294
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
   131
#gallerySelectors
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
   132
'the list of selectors specify which interface specification should be used dependent on the tab pressed. Each selector must return an interfaceSpec. On default the #windowSpec method is used'
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
   133
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   134
#hierarchicalList
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   135
'gets a hierarchical list or a holder which keeps a hierarchical list entry; the value must understand the TreeItem protocol.'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   136
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   137
#hierarchicalListButton
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   138
'opens the hierarchical list editor, which can be used to generate and install a hierarchical list.'
294
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
   139
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   140
#horizontalLayout
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   141
'specifies how components are to be arranged horizontally'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   142
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   143
#horizontalMiniScroller
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   144
'use a mini-horizontalScroller'
294
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
   145
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   146
#horizontalScroller
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   147
'make the view horizontally scrollable'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   148
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   149
#id
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   150
'the symbolic name of the component.  This ID can be used by the application to access components, using #componentAt:<ID>'
303
798e309561f1 checkin from browser
ca
parents: 294
diff changeset
   151
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   152
#isMultiSelect
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   153
'enable/disable multiple selections.'
294
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
   154
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   155
#isTriggerOnDown
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   156
'if true, the action is evaluated when the button is pressed; otherwise, when released.'
303
798e309561f1 checkin from browser
ca
parents: 294
diff changeset
   157
798e309561f1 checkin from browser
ca
parents: 294
diff changeset
   158
#label
346
38ea269664f8 modification of help text
ca
parents: 307
diff changeset
   159
'the label of the widget. If ''label is image'' is off, this is the label string. Otherwise, it specifies the applications selector, which returns the label - either a string or a bitmap image.'
303
798e309561f1 checkin from browser
ca
parents: 294
diff changeset
   160
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   161
#level
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   162
'the 3D-level relative to its superView. If left blank, the components default is used.'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   163
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   164
#listHolder
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   165
'a list or a list holders aspect'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   166
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   167
#majorKey
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   168
'name of the class which provides the window specification. If left blank, the application itself is used.'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   169
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   170
#maxChars
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   171
'maximum number of characters that are allowed in the editfield.  If left blank, no limit is set.'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   172
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   173
#maxSize
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   174
'Those two fields specify the windows maximum size. The user will not be allowed to resize it to a larger size.'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   175
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   176
#maxXField
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   177
'the maximum width - the user will not be allowed to resize the topView to a larger width.'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   178
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   179
#maxYField
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   180
'the maximum height - the user will not be allowed to resize the topView to a larger height.'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   181
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   182
#menuButton
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   183
'open a menu editor on the specified menu selector.'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   184
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   185
#menuHolder
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   186
'aspect selector or holder which provides the middle button menu'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   187
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   188
#menuId
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   189
'the aspect of the menu. The application may respond to this message by returning a menu.'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   190
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   191
#menuPerformer
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   192
'aspect providing an object which gets the menu messages. If left blank, the menu sends its menuMessages to the application.'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   193
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   194
#middleButtonPressed
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   195
'called if the middle button is pressed; you can open a menu'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   196
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   197
#minSize
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   198
'Those two fields specify the windows minimum size. The user will not be allowed to resize it to a smaller size.'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   199
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   200
#minXField
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   201
'the minimum width - the user will not be allowed to resize the topView to a smaller width.'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   202
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   203
#minYField
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   204
'the minimum height - the user will not be allowed to resize the topView to a smaller height.'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   205
294
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
   206
#minorKey
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   207
'the selector specifies which interface specification to be used. The selector must return an interfaceSpec. By default the #windowSpec method is used.'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   208
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   209
#oneTabPerLine
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   210
'draw only one tab per line'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   211
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   212
#selectionHolder
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   213
'the one which keeps the selection.'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   214
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   215
#setMaxExtent
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   216
'set the maximum size from the topViews current size.'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   217
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   218
#setMinExtent
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   219
'set the minumum size from the topViews current size.'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   220
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   221
#showDirectoryIndication
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   222
'show or hide the open/closed indicator on nodes which contains children'
294
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
   223
303
798e309561f1 checkin from browser
ca
parents: 294
diff changeset
   224
#showFrame
798e309561f1 checkin from browser
ca
parents: 294
diff changeset
   225
'show the frame'
798e309561f1 checkin from browser
ca
parents: 294
diff changeset
   226
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   227
#showLines
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   228
'show or hide lines'
303
798e309561f1 checkin from browser
ca
parents: 294
diff changeset
   229
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   230
#showRoot
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   231
'show or hide the first element of the hierarchical list.'
294
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
   232
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   233
#sizeAsDefault
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   234
'let the widget compute its size to include space for the default (return) image. Useful for buttons which are not default buttons initially, but may become a default button dynamically.'
294
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
   235
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
   236
#tabLabels
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
   237
'a list or list holder which provides the labels assigned to the tabs.'
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
   238
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   239
#tabOrientation
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   240
'where to place the tabs'
294
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
   241
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
   242
#tabWidget
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
   243
'select the tab style'
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
   244
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   245
#typeConverter
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   246
'convert the fields string value to some other object. Needed if the aspectValue is not a string (typically numbers).'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   247
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   248
#useIndex
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   249
'set/clear the useIndex flag. If set, the index of the selection is stored into the model; otherwise the selected string.'
307
fe559a9136d9 changes caused by update of help tool
ca
parents: 303
diff changeset
   250
294
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
   251
#valueChangeSelector
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   252
'name of a method in the application which is invoked whenever the selection changed. If the selector ends with '':'' the method is invoked with the current selection.'
294
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
   253
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   254
#verticalLayout
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   255
'specifies how components are to be arranged vertically'
294
65cb680c74e4 add some helptext
ca
parents: 172
diff changeset
   256
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   257
#verticalMiniScroller
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   258
'use a mini-verticalScroller'
303
798e309561f1 checkin from browser
ca
parents: 294
diff changeset
   259
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   260
#verticalScroller
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   261
'make the view vertically scrollable'
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   262
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   263
#windowIcon
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   264
'aspect of the windows icon. This is supposed to provide a bitmap image, which is displayed by the windowManager if your applications gets iconified.'
346
38ea269664f8 modification of help text
ca
parents: 307
diff changeset
   265
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   266
#windowIconLabel
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   267
'the windows icon label. This will be displayed by most windowManagers in the icon if the topView is iconified.'
303
798e309561f1 checkin from browser
ca
parents: 294
diff changeset
   268
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   269
#windowLabel
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   270
'the windows label. This will be displayed by the windowManager in the windows frame.'
307
fe559a9136d9 changes caused by update of help tool
ca
parents: 303
diff changeset
   271
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   272
)
350
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   273
28128eeb98f0 more help messages.
Claus Gittinger <cg@exept.de>
parents: 346
diff changeset
   274
    "Modified: / 27.10.1997 / 22:30:27 / cg"
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   275
! !
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   276
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   277
!UISpecificationTool class methodsFor:'interface specs'!
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   278
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   279
windowSpec
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   280
    "this window spec was automatically generated by the ST/X UIPainter"
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   281
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   282
    "do not manually edit this - the painter/builder may not be able to
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   283
     handle the specification if its corrupted."
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   284
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   285
    "
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   286
     UIPainter new openOnClass:UISpecificationTool andSelector:#windowSpec
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   287
     UISpecificationTool new openInterface:#windowSpec
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   288
    "
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   289
    "UISpecificationTool open"
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   290
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   291
    <resource: #canvas>
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   292
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   293
    ^
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   294
     
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   295
       #(#FullSpec
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   296
          #'window:' 
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   297
           #(#WindowSpec
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   298
              #'name:' 'uIPainterView'
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   299
              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   300
              #'label:' 'unnamed canvas'
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   301
              #'bounds:' #(#Rectangle 0 0 300 300)
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   302
          )
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   303
          #'component:' 
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   304
           #(#SpecCollection
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   305
              #'collection:' 
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   306
               #(
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   307
                 #(#ViewSpec
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   308
                    #'name:' 'Frame'
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   309
                    #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   310
                )
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   311
              )
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   312
          )
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   313
      )
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   314
! !
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   315
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   316
!UISpecificationTool methodsFor:'accessing'!
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   317
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   318
specification
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   319
    "gets current edit specification
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   320
    "
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   321
    ^ specification
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   322
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   323
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   324
!
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   325
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   326
specification:aSpec
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   327
    "sets current edit specification
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   328
    "
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   329
    aSpec isNil ifTrue:[
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   330
        specChannel   := nil.
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   331
        specification := nil.
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   332
        aspects       := nil.
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   333
    ] ifFalse:[
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   334
        specification class == aSpec class ifTrue:[
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   335
            specification := aSpec.
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   336
          ^ specChannel value:specification.
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   337
        ].
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   338
        specification  := aSpec.
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   339
        aspects        := IdentityDictionary new.
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   340
        specChannel    := specification asValue.
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   341
        specification class addBindingsTo:aspects for:specification channel:specChannel.
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   342
        aspects do:[:el| el addDependent:self ].
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   343
    ].
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   344
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   345
    selection notNil ifTrue:[
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   346
        (builder componentAt:#Frame) destroySubViews.
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   347
        selection := nil.
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   348
    ].
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   349
! !
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   350
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   351
!UISpecificationTool methodsFor:'accessing channels'!
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   352
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   353
modifiedHolder:aValueHolder
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   354
    "set the value holder set to true in case of modifying attributes
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   355
    "
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   356
    modifiedHolder notNil ifTrue:[
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   357
        modifiedHolder removeDependent:self. 
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   358
    ].
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   359
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   360
    (modifiedHolder := aValueHolder) notNil ifTrue:[
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   361
        modifiedHolder addDependent:self.
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   362
    ].
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   363
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   364
! !
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   365
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   366
!UISpecificationTool methodsFor:'bindings'!
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   367
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   368
aspectFor:aKey
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   369
    "returns aspect for a key or nil
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   370
    "
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   371
    aspects notNil ifTrue:[
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   372
        ^ aspects at:aKey ifAbsent:nil
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   373
    ].
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   374
    ^ super aspectFor:aKey
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   375
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   376
! !
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   377
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   378
!UISpecificationTool methodsFor:'change & update'!
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   379
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   380
update
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   381
    "reload specification
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   382
    "
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   383
    specChannel notNil ifTrue:[
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   384
        specChannel value:specification.
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   385
    ]
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   386
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   387
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   388
!
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   389
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   390
update:something with:someArgument from:someone
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   391
    "any attribute changed its state in the current specification
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   392
    "
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   393
    someone ~~ modifiedHolder ifTrue:[
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   394
        modifiedHolder value ~~ true ifTrue:[
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   395
            modifiedHolder value:true
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   396
        ]
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   397
    ]
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   398
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   399
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   400
! !
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   401
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   402
!UISpecificationTool methodsFor:'selection'!
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   403
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   404
selection:something
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   405
    "selection changed
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   406
    "
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   407
    |slices idx spec frame|
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   408
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   409
    specification notNil ifTrue:[
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   410
        slices := specification class slices.
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   411
        idx:= slices findFirst:[:aSlice| aSlice first = something ].
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   412
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   413
        idx ~~ 0 ifTrue:[
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   414
            spec := specification class perform:((slices at:idx) last).
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   415
        ].
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   416
    ].
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   417
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   418
    spec ~= selection ifTrue:[
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   419
        frame := builder componentAt:#Frame.
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   420
        frame destroySubViews.
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   421
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   422
        spec notNil ifTrue:[
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   423
            builder buildFromSpec:spec in:frame.
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   424
            frame allViewBackground:(frame viewBackground).
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   425
            frame realizeAllSubViews.
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   426
        ]
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   427
    ].
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   428
    selection := spec.
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   429
! !
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   430
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   431
!UISpecificationTool class methodsFor:'documentation'!
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   432
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   433
version
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   434
    ^ '$Header$'
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   435
! !