UISpecificationTool.st
changeset 752 2dc82cdfdd90
parent 610 c6dc33689c6a
child 759 f0c325edcc6c
equal deleted inserted replaced
751:b182b42defd0 752:2dc82cdfdd90
    54 ! !
    54 ! !
    55 
    55 
    56 !UISpecificationTool class methodsFor:'help specs'!
    56 !UISpecificationTool class methodsFor:'help specs'!
    57 
    57 
    58 helpSpec
    58 helpSpec
    59     "return a dictionary filled with helpKey -> helptext associations.
    59     "This resource specification was automatically generated
    60      These are used by the activeHelp tool."
    60      by the UIHelpTool of ST/X."
    61 
    61 
    62     "
    62     "Do not manually edit this!! If it is corrupted,
    63     UIHelpTool openOnClass:UISpecificationTool    
    63      the UIHelpTool may not be able to read the specification."
    64     "
    64 
    65 
    65     "
    66   ^ super helpSpec addPairsFrom:#(
    66      UIHelpTool openOnClass:UISpecificationTool    
       
    67     "
       
    68 
       
    69     <resource: #help>
       
    70 
       
    71     ^super helpSpec addPairsFrom:#(
    67 
    72 
    68 #acceptChannel
    73 #acceptChannel
    69 'acceptChannel for the view. 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 accept-flag.\ If the holder changed its value to true, the contents will be accepted and the modifiaction flag is set to false.'
    74 'acceptChannel for the view. 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 accept-flag.\ If the holder changed its value to true, the contents will be accepted and the modifiaction flag is set to false.'
    70 
    75 
    71 #acceptImmediate
    76 #acceptImmediate
    82 
    87 
    83 #acceptOnTab
    88 #acceptOnTab
    84 'input will we sent to the model when the tab key is pressed'
    89 'input will we sent to the model when the tab key is pressed'
    85 
    90 
    86 #action
    91 #action
    87 '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).'
    92 'Name of the selector which is sent to the application when the widget is pressed. (If the selector is a one-arg selector, the argument is passed as a string).'
    88 
    93 
    89 #actionArg
    94 #actionArg
    90 'action argument passed to action method, if action selector is a one-arg selector (i.e. ends with '':''). The arg is passed as a string.'
    95 'Argument passed with the action selector. The action selector must end with '':''.'
    91 
    96 
    92 #appletParamText
    97 #appletParamText
    93 'Paste the complete appletTAGs HTML text here (i.e. all from <applet> up to and including the </applet>). Press parse to extract all parameters from it.'
    98 'Paste the complete appletTAGs HTML text here (i.e. all from <applet> up to and including the </applet>). Press parse to extract all parameters from it.'
    94 
    99 
    95 #appletTextParse
   100 #appletTextParse
   100 
   105 
   101 #archiveEntry
   106 #archiveEntry
   102 'The name of a zip-file archive, if the class(es) are to be loaded from a zip-archive.'
   107 'The name of a zip-file archive, if the class(es) are to be loaded from a zip-archive.'
   103 
   108 
   104 #arrowButtonDirection
   109 #arrowButtonDirection
   105 'the direction of the arrow.'
   110 'Specifies the direction of the arrow.'
   106 
   111 
   107 #autoRepeat
   112 #autoRepeat
   108 'repeat the action as long as the button is pressed; to have this behavior the ''isTriggerOnDown'' state must be enabled.'
   113 'Turns on/off that the action is evaluated repeatly as long as the button is pressed. To get this behavior, the check box ''Trigger On Down'' must be turned on.'
   109 
   114 
   110 #backgroundChannel
   115 #backgroundChannel
   111 'a holder, which provides the widgets backgroundColor. Useful if the labels bg color is to be changed dynamically (alerts).'
   116 'Aspect selector or binding for the background color of the widget''s view. It should return a ValueHolder with a Color. (It is useful, if the background color has to be changed dynamically.)'
   112 
   117 
   113 #backgroundColor
   118 #backgroundColor
   114 '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).'
   119 'Defines the background color of the widget. After selecting the check toggle the background color can be chosen by selecting the desired colored button. If no color is selected, the widget takes its default background color from the style sheet.'
   115 
   120 
   116 #beDefault
   121 #beDefault
   117 'show/dont show a return-key image after the label'
   122 'Turns on/off displaying of a return-key after the label.'
   118 
   123 
   119 #beDependentOfRows
   124 #beDependentOfRows
   120 'make each row in the list dependant. Thus, whenever a row raises a change notification, the row will be redrawn (if visible on the screen).'
   125 'make each row in the list dependant. Thus, whenever a row raises a change notification, the row will be redrawn (if visible on the screen).'
   121 
   126 
   122 #booleanHolder
   127 #booleanHolder
   123 'aspect of a boolean holder which keeps the state'
   128 'Aspect of a boolean holder which keeps the state'
   124 
   129 
   125 #borderWidth
   130 #borderWidth
   126 'width of the border'
   131 'width of the border'
   127 
   132 
   128 #canvas
   133 #canvas
   160 
   165 
   161 #doubleClickSelector
   166 #doubleClickSelector
   162 '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.'
   167 '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.'
   163 
   168 
   164 #downAction
   169 #downAction
   165 'action selector sent to the application when the down button is activated. The selector may be for a one-arg message; in this case, the argument is passed.'
   170 'Name of the selector which is sent to the application when the down(right)-button is pressed. If the selector is an one-arg selector, the argument is passed as a string.'
   166 
   171 
   167 #enableChannel
   172 #enableChannel
   168 'enableHolder for the view. 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. This is convenient, if many widgets are to be enabled/disabled depending on the setting of a single flag, because the application can change them all with a single setting of the enableHolders value.'
   173 'Aspect selector or binding for en-/disabling of the widget''s view. It should return a boolean ValueHolder.'
   169 
   174 
   170 #fileSelectionFilterClas
   175 #fileSelectionFilterClas
   171 'the name of the Item class used to create the entries into the hierarchical list. The class is oblegated to provide the whole interface of the FileSelectionItem class. If no class is specified, the FileSelectionItem class is used. \ Thus you can define your own filter operations, icons, ....'
   176 'the name of the Item class used to create the entries into the hierarchical list. The class is oblegated to provide the whole interface of the FileSelectionItem class. If no class is specified, the FileSelectionItem class is used. \ Thus you can define your own filter operations, icons, ....'
   172 
   177 
   173 #fileSelectionTreeRoot
   178 #fileSelectionTreeRoot
   175 
   180 
   176 #fitLastRow
   181 #fitLastRow
   177 'fit rows to tab horizontal or vertical extent'
   182 'fit rows to tab horizontal or vertical extent'
   178 
   183 
   179 #fontMenu
   184 #fontMenu
   180 '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).'
   185 'Defines the font style of the widget. After selecting the check toggle the font style can be chosen by selecting one of the Family/Face/Style/Size buttons. If no font style is selected, the widget takes its default font style from the style sheet.'
   181 
   186 
   182 #forceRecursiveBackground
   187 #forceRecursiveBackground
   183 'also change all subcomponents viewBackground (recursively).'
   188 'also change all subcomponents viewBackground (recursively).'
   184 
   189 
   185 #foregroundChannel
   190 #foregroundChannel
   186 'a holder, which provides the widgets foregroundColor. Useful if the labels fg color is to be changed dynamically (alerts).'
   191 'Aspect selector or binding for the foreground color of the widget''s view. It should return a ValueHolder with a Color. (It is useful, if the foreground color has to be changed dynamically.)'
   187 
   192 
   188 #foregroundColor
   193 #foregroundColor
   189 '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).'
   194 'Defines the foreground color of the widget. After selecting the check toggle the foreground color can be chosen by selecting the desired colored button. If no color is selected, the widget takes its default foreground color from the style sheet.'
   190 
   195 
   191 #galleryLabels
   196 #galleryLabels
   192 'a list of tab labels'
   197 'a list of tab labels'
   193 
   198 
   194 #galleryModel
   199 #galleryModel
   223 
   228 
   224 #horizontalSpace
   229 #horizontalSpace
   225 'horizontal space between elements on pixels'
   230 'horizontal space between elements on pixels'
   226 
   231 
   227 #id
   232 #id
   228 'the symbolic name of the component.  This ID can be used by the application to access components, using #componentAt:<ID>'
   233 'Unique symbolic name (ID) of the widget. This ID can be used by the application to access the view via builder>>componentAt:ID.'
   229 
   234 
   230 #initiallyDisabled
   235 #initiallyDisabled
   231 'if on, the widget is initially disabled (to be enabled programatically with "(self componentAt:<ID>) enable").'
   236 'Turns on/off that the view of the widget is initially disabled.'
   232 
   237 
   233 #initiallyInvisible
   238 #initiallyInvisible
   234 'if on, the widget is initially invisible (to be made visible programatically with "(self componentAt:<ID>) beVisible")).'
   239 'Turns on/off that the view of the widget is initially invisible.'
   235 
   240 
   236 #inputFieldGroup
   241 #inputFieldGroup
   237 'symbolic ID of the input group - fields within a group can be reached via cursor up/down.'
   242 'symbolic ID of the input group - fields within a group can be reached via cursor up/down.'
   238 
   243 
   239 #isMultiSelect
   244 #isMultiSelect
   241 
   246 
   242 #isOpaque
   247 #isOpaque
   243 'define how the widget is displayed; opaque or not opaque'
   248 'define how the widget is displayed; opaque or not opaque'
   244 
   249 
   245 #isTriggerOnDown
   250 #isTriggerOnDown
   246 'if true, the action is evaluated when the button is pressed; otherwise, when released.'
   251 'Turns on/off that the action is evaluated when the button is pressed; otherwise, when released.'
   247 
   252 
   248 #label
   253 #label
   249 '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.'
   254 'The label of the button. If the check box ''Label Is Image'' is turned off, this is the label string. Otherwise, it is the name of the selector, which returns the label - either a string or a bitmap image from the application.'
   250 
   255 
   251 #labelChannel
   256 #labelChannel
   252 'a holder, which provides the widgets label. Useful if the label is to be changed dynamically.'
   257 'Aspect selector or binding for the label of the widget''s view. It should return a ValueHolder with a String. (It is useful, if the label has to be changed dynamically.)'
   253 
   258 
   254 #labelIsImage
   259 #labelIsImage
   255 'if ''label is image'' is off (the default), the widgets label is the string as entered in the label aspect. Otherwise, its the name of the message sent to the application - this should return a string or bitmap image, which is used as logo in the widget.'
   260 'Turns on/off that the name of the label is taken as selector. The selector should return a string or bitmap image used as logo in the widget.'
   256 
   261 
   257 #labelPositionList
   262 #labelPositionList
   258 'define the position of the label'
   263 'define the position of the label'
   259 
   264 
   260 #lampColor
   265 #lampColor
   261 'set the lamp color if the color-checkBox is turned on. Otherwise, the widget uses its default lamp color (which is specified in the styleSheet).'
   266 'Defines the lamp color of the widget. After selecting the check toggle the lamp color can be chosen by selecting the desired colored button. If no color is selected, the widget takes its default lamp color from the style sheet.'
   262 
   267 
   263 #level
   268 #level
   264 'the 3D-level relative to its superView. If left blank, the components default is used.'
   269 'the 3D-level relative to its superView. If left blank, the components default is used.'
   265 
   270 
   266 #listHolder
   271 #listHolder
   280 
   285 
   281 #maxYField
   286 #maxYField
   282 'the maximum height - the user will not be allowed to resize the topView to a larger height.'
   287 'the maximum height - the user will not be allowed to resize the topView to a larger height.'
   283 
   288 
   284 #menuButton
   289 #menuButton
   285 'open a menu editor on the specified menu selector.'
   290 'Opens a Menu Editor on the application  class and the defined selector.'
   286 
   291 
   287 #menuHolder
   292 #menuHolder
   288 'aspect selector or holder which provides the middle button menu'
   293 'aspect selector or holder which provides the middle button menu'
   289 
   294 
   290 #menuId
   295 #menuId
   291 'the aspect of the menu. The application may respond to this message by returning a menu.'
   296 'Aspect selector or binding for the  building of the tool bar components. It should return a menu spec.'
   292 
   297 
   293 #menuPerformer
   298 #menuPerformer
   294 'aspect providing an object which gets the menu messages. If left blank, the menu sends its menuMessages to the application.'
   299 'Aspect selector or binding for sending the messages of the tool bar items to an  object.  It should return an object which can receive the messages.'
   295 
   300 
   296 #middleButtonPressed
   301 #middleButtonPressed
   297 'called if the middle button is pressed; you can open a menu'
   302 'called if the middle button is pressed; you can open a menu'
   298 
   303 
   299 #minSize
   304 #minSize
   325 
   330 
   326 #openSubSpecGuiHelp
   331 #openSubSpecGuiHelp
   327 'Start a GUI Builder for this subspecification.'
   332 'Start a GUI Builder for this subspecification.'
   328 
   333 
   329 #orientation
   334 #orientation
   330 'define the orientation of the widget; horizontal or vertical.'
   335 'Defines the direction of the alignment of the two arrows (horizontal or vertical).'
   331 
   336 
   332 #paramAdd
   337 #paramAdd
   333 'Adds a name-value pair to the parameters collection.'
   338 'Adds a name-value pair to the parameters collection.'
   334 
   339 
   335 #paramList
   340 #paramList
   385 
   390 
   386 #showFrame
   391 #showFrame
   387 'show the frame'
   392 'show the frame'
   388 
   393 
   389 #showLamp
   394 #showLamp
   390 'enable/disable display of the toggles lamp.'
   395 'Turns on/off that a colored lamp is shown.'
   391 
   396 
   392 #showLines
   397 #showLines
   393 'show or hide lines'
   398 'show or hide lines'
   394 
   399 
   395 #showPercentage
   400 #showPercentage
   400 
   405 
   401 #showSeparatingLines
   406 #showSeparatingLines
   402 'seperate each menu item by a vertical or horizontal line dependant on its vertical layout'
   407 'seperate each menu item by a vertical or horizontal line dependant on its vertical layout'
   403 
   408 
   404 #sizeAsDefault
   409 #sizeAsDefault
   405 '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.'
   410 'Turns on/off that the widget computes its size including space for the default (return) image. Useful for buttons which are initially not default buttons , but may become a default button dynamically.'
   406 
   411 
   407 #specHolder
   412 #specHolder
   408 'holder which provides the selector to access the windowspec used to open the sub application derived from the application holder. If no selector is defined, the #windowSpec selector is used.'
   413 'holder which provides the selector to access the windowspec used to open the sub application derived from the application holder. If no selector is defined, the #windowSpec selector is used.'
   409 
   414 
   410 #start
   415 #start
   424 
   429 
   425 #tabWidget
   430 #tabWidget
   426 'select the tab style (windows- or mac look)'
   431 'select the tab style (windows- or mac look)'
   427 
   432 
   428 #tabable
   433 #tabable
   429 'if on, the widget can be reached by tabbing.'
   434 'Turns on/off that the view of the widget can be reached by tabbing.'
   430 
   435 
   431 #translateLabel
   436 #translateLabel
   432 'if on, the labelString is translated via the resource mechanism to a national language string (if a translation for that string is present in the resource file of the application).'
   437 'Turns on/off that the label string is translated via the resource mechanism to a national language string. A translation for that string must be defined in the resource file of the application class.'
   433 
   438 
   434 #typeConverter
   439 #typeConverter
   435 'convert the fields string value to some other object. Needed if the aspectValue is not a string (typically numbers).'
   440 'convert the fields string value to some other object. Needed if the aspectValue is not a string (typically numbers).'
   436 
   441 
   437 #upAction
   442 #upAction
   438 'action selector sent to the application when the up button is activated. The selector may be for a one-arg message; in this case, the argument is passed.'
   443 'Name of the selector which is sent to the application when the up(left)-button is pressed. If the selector is an one-arg selector, the argument is passed as a string.'
   439 
   444 
   440 #useIndex
   445 #useIndex
   441 'set/clear the useIndex flag. If set, the index of the selection is stored into the model; otherwise the selected string.'
   446 'set/clear the useIndex flag. If set, the index of the selection is stored into the model; otherwise the selected string.'
   442 
   447 
   443 #usePreferredExtent
   448 #usePreferredExtent
   469 
   474 
   470 #windowLabel
   475 #windowLabel
   471 'the windows label. This will be displayed by the windowManager in the windows frame.'
   476 'the windows label. This will be displayed by the windowManager in the windows frame.'
   472 
   477 
   473 )
   478 )
   474 
       
   475     "Modified: / 6.2.1998 / 14:08:44 / stefan"
       
   476 ! !
   479 ! !
   477 
   480 
   478 !UISpecificationTool class methodsFor:'interface specs'!
   481 !UISpecificationTool class methodsFor:'interface specs'!
   479 
   482 
   480 windowSpec
   483 windowSpec
   692             spec := specification class perform:((slices at:idx) last).
   695             spec := specification class perform:((slices at:idx) last).
   693         ]
   696         ]
   694     ].
   697     ].
   695 
   698 
   696     spec ~= selection ifTrue:[
   699     spec ~= selection ifTrue:[
       
   700 
   697         self releaseResources.
   701         self releaseResources.
   698         frame := builder componentAt:#Frame.
   702         frame := builder componentAt:#Frame.
   699         frame destroySubViews.
   703         frame destroySubViews.
   700 
   704 
   701         spec notNil ifTrue:[
   705         spec notNil ifTrue:[
   702             builder buildFromSpec:spec in:frame.
   706             builder buildFromSpec:spec in:frame.
   703             frame allViewBackground:(frame viewBackground).
   707             frame allViewBackground:(frame viewBackground).
   704             frame realizeAllSubViews.
   708             masterApplication updateFonts.
       
   709             frame realizeAllSubViews. 
   705         ]
   710         ]
   706     ].
   711     ].
   707     selection := spec.
   712     selection := spec.
   708 ! !
   713 ! !
   709 
   714