author | Claus Gittinger <cg@exept.de> |
Mon, 20 Apr 1998 15:39:07 +0200 | |
changeset 791 | 108f933f9385 |
parent 783 | 06d23b8b66bd |
child 801 | 50231f23e149 |
permissions | -rw-r--r-- |
164 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
||
14 |
||
15 |
||
16 |
ApplicationModel subclass:#UISpecificationTool |
|
759 | 17 |
instanceVariableNames:'modifiedHolder aspects specification selection specChannel |
18 |
scrolledView windowFrame' |
|
164 | 19 |
classVariableNames:'' |
20 |
poolDictionaries:'' |
|
21 |
category:'Interface-UIPainter' |
|
22 |
! |
|
23 |
||
24 |
!UISpecificationTool class methodsFor:'documentation'! |
|
25 |
||
26 |
copyright |
|
27 |
" |
|
28 |
COPYRIGHT (c) 1995 by eXept Software AG |
|
29 |
All Rights Reserved |
|
30 |
||
31 |
This software is furnished under a license and may be used |
|
32 |
only in accordance with the terms of that license and with the |
|
33 |
inclusion of the above copyright notice. This software may not |
|
34 |
be provided or otherwise made available to, or used by, any |
|
35 |
other person. No title to or ownership of the software is |
|
36 |
hereby transferred. |
|
37 |
" |
|
38 |
||
39 |
||
40 |
||
41 |
! |
|
42 |
||
43 |
documentation |
|
44 |
" |
|
45 |
used by the UIPainter to manipulate the specifications of the selected component |
|
46 |
||
47 |
[author:] |
|
48 |
Claus Atzkern |
|
49 |
||
50 |
[see also:] |
|
51 |
UIPainter |
|
52 |
UILayoutTool |
|
53 |
UIHelpTool |
|
54 |
" |
|
55 |
! ! |
|
56 |
||
172 | 57 |
!UISpecificationTool class methodsFor:'help specs'! |
58 |
||
59 |
helpSpec |
|
752 | 60 |
"This resource specification was automatically generated |
61 |
by the UIHelpTool of ST/X." |
|
62 |
||
63 |
"Do not manually edit this!! If it is corrupted, |
|
64 |
the UIHelpTool may not be able to read the specification." |
|
294 | 65 |
|
783 | 66 |
" |
752 | 67 |
UIHelpTool openOnClass:UISpecificationTool |
172 | 68 |
" |
294 | 69 |
|
752 | 70 |
<resource: #help> |
71 |
||
72 |
^super helpSpec addPairsFrom:#( |
|
172 | 73 |
|
580 | 74 |
#acceptChannel |
780 | 75 |
'Aspect selector or binding for accepting the entry.' |
580 | 76 |
|
367 | 77 |
#acceptImmediate |
780 | 78 |
'Turns on/off that after each typing in the entry string is sent to the model.' |
367 | 79 |
|
80 |
#acceptOnLeave |
|
780 | 81 |
'Turns on/off that after leaving the entry field the entry string is sent to the model.' |
367 | 82 |
|
540 | 83 |
#acceptOnLostFocus |
780 | 84 |
'Turns on/off that after loosing the focus the entry string is sent to the model.' |
540 | 85 |
|
367 | 86 |
#acceptOnReturn |
780 | 87 |
'Turns on/off that after pressing the return key the entry string is sent to the model.' |
367 | 88 |
|
89 |
#acceptOnTab |
|
780 | 90 |
'Turns on/off that after pressing the tab key the entry string is sent to the model.' |
367 | 91 |
|
303 | 92 |
#action |
780 | 93 |
'Name of the selector which is sent to the application when the widget is pressed.' |
303 | 94 |
|
367 | 95 |
#actionArg |
780 | 96 |
'Argument passed with the action selector.' |
367 | 97 |
|
540 | 98 |
#appletParamText |
99 |
'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.' |
|
100 |
||
101 |
#appletTextParse |
|
102 |
'Parse the appletTAG and fill the parameters directory from it.' |
|
103 |
||
350 | 104 |
#arbitraryView |
780 | 105 |
'The class of the arbitrary component or an aspect selector which provides a widget class.' |
294 | 106 |
|
540 | 107 |
#archiveEntry |
108 |
'The name of a zip-file archive, if the class(es) are to be loaded from a zip-archive.' |
|
109 |
||
110 |
#arrowButtonDirection |
|
780 | 111 |
'Defines the direction of the arrow.' |
540 | 112 |
|
350 | 113 |
#autoRepeat |
780 | 114 |
'Turns on/off that the action is evaluated repeatly as long as the button is pressed.' |
307 | 115 |
|
367 | 116 |
#backgroundChannel |
780 | 117 |
'Aspect selector or binding for the background color of the widget.' |
367 | 118 |
|
350 | 119 |
#backgroundColor |
780 | 120 |
'Defines the background color of the widget.' |
303 | 121 |
|
350 | 122 |
#beDefault |
780 | 123 |
'Turns on/off displaying of a return key after the label string.' |
307 | 124 |
|
580 | 125 |
#beDependentOfRows |
780 | 126 |
'Turns on/off that each row in the list is dependent.' |
580 | 127 |
|
350 | 128 |
#booleanHolder |
780 | 129 |
'Aspect selector or binding for en-/disabling the widget.' |
294 | 130 |
|
350 | 131 |
#borderWidth |
783 | 132 |
'Defines the width of the border (in pixels).' |
303 | 133 |
|
307 | 134 |
#canvas |
780 | 135 |
'Aspect selector or binding for the widget placed into the notebook.' |
294 | 136 |
|
350 | 137 |
#canvasArgument |
780 | 138 |
'The argument to the selector or none.' |
350 | 139 |
|
140 |
#canvasSelector |
|
780 | 141 |
'The name of the selector sent to the application after opening the canvas.' |
350 | 142 |
|
580 | 143 |
#clientHolder |
780 | 144 |
'Aspect selector or binding for holding the client application to be opened.' |
580 | 145 |
|
350 | 146 |
#clientKey |
780 | 147 |
'Returns an application which provides the builder. By default the application itself is used.' |
350 | 148 |
|
540 | 149 |
#codeBaseHolder |
150 |
'The URL of the directory, where the classFile-file resides. If the classFile is located on the local machine, use\ file:/<fullPath>\ where fullPath is an absolute pathname. If its to be accessed via http, use\ http:/<host>/<relativePath>\ where relativePath is the path relative to the http''s top diretory on that host.' |
|
151 |
||
152 |
#codeFileEntry |
|
153 |
'The name of the java classFile which contains the applets code. For example: ''ArcTest.class''' |
|
154 |
||
580 | 155 |
#columnButton |
780 | 156 |
'Opens a Table Columns Builder.' |
580 | 157 |
|
158 |
#columnHolder |
|
780 | 159 |
'Aspect selector or binding for holding the list of the column descriptions.' |
580 | 160 |
|
350 | 161 |
#defaultLabel |
780 | 162 |
'Default label (used, if nothing selected).' |
350 | 163 |
|
164 |
#document |
|
780 | 165 |
'Aspect selector or binding for holding the file name of the document.' |
350 | 166 |
|
167 |
#doubleClickSelector |
|
780 | 168 |
'Name of the selector sent to the application when double clicked.' |
580 | 169 |
|
170 |
#downAction |
|
780 | 171 |
'Name of the selector which is sent to the application when the down(right)-button is pressed.' |
294 | 172 |
|
350 | 173 |
#enableChannel |
780 | 174 |
'Aspect selector or binding for en-/disabling of the widget.' |
350 | 175 |
|
580 | 176 |
#fileSelectionFilterClas |
780 | 177 |
'The name of the Item class used to create the entries into the hierarchical list.' |
580 | 178 |
|
350 | 179 |
#fileSelectionTreeRoot |
780 | 180 |
'Aspect selector or binding for holding the path name of the root directory.' |
350 | 181 |
|
580 | 182 |
#fitLastRow |
780 | 183 |
'Turns on/off that the tab items are fitted to the width of the widget''s view.' |
580 | 184 |
|
350 | 185 |
#fontMenu |
780 | 186 |
'Defines the font style of the widget.' |
294 | 187 |
|
367 | 188 |
#forceRecursiveBackground |
783 | 189 |
'Turns on/off that above background color is recursively set for all sub components.' |
367 | 190 |
|
540 | 191 |
#foregroundChannel |
780 | 192 |
'Aspect selector or binding for the foreground color of the widget.' |
540 | 193 |
|
350 | 194 |
#foregroundColor |
780 | 195 |
'Defines the foreground color of the widget.' |
350 | 196 |
|
197 |
#galleryLabels |
|
780 | 198 |
'Aspect selector or binding for holding the list of the labels.' |
350 | 199 |
|
200 |
#galleryModel |
|
780 | 201 |
'Aspect selector or binding for the selected label.' |
294 | 202 |
|
307 | 203 |
#gallerySelection |
780 | 204 |
'Aspect selector or binding for the resource specification of the current selected widget.' |
307 | 205 |
|
294 | 206 |
#gallerySelectors |
780 | 207 |
'Name of the selector sent to the application returning a list of resource specification selectors.' |
294 | 208 |
|
580 | 209 |
#has3Dsepartors |
780 | 210 |
'Turns on/off that the separators of the columns and rows has a 3D-look.' |
367 | 211 |
|
350 | 212 |
#hierarchicalList |
780 | 213 |
'Aspect selector or binding for holding the root item of the hierarchical list.' |
350 | 214 |
|
215 |
#hierarchicalListButton |
|
780 | 216 |
'Opens a Hierarchical List Editor on the application class and the defined selector.' |
294 | 217 |
|
350 | 218 |
#horizontalLayout |
780 | 219 |
'Defines how sub components are horizontally arranged.' |
350 | 220 |
|
221 |
#horizontalMiniScroller |
|
780 | 222 |
'Turns on/off that the widget uses a small horizontal scroll bar.' |
294 | 223 |
|
350 | 224 |
#horizontalScroller |
780 | 225 |
'Turns on/off that the widget provides horizontal scrolling capabilities.' |
350 | 226 |
|
580 | 227 |
#horizontalSpace |
780 | 228 |
'Horizontal space between the sub components (in pixels).' |
580 | 229 |
|
350 | 230 |
#id |
780 | 231 |
'Unique symbolic name (ID) of the widget.' |
303 | 232 |
|
540 | 233 |
#initiallyDisabled |
780 | 234 |
'Turns on/off that the widget is initially disabled.' |
540 | 235 |
|
367 | 236 |
#initiallyInvisible |
780 | 237 |
'Turns on/off that the widget is initially invisible.' |
367 | 238 |
|
239 |
#inputFieldGroup |
|
780 | 240 |
'Unique symbolic name (ID) for the group of the entry field.' |
367 | 241 |
|
350 | 242 |
#isMultiSelect |
780 | 243 |
'Turns on/off whether multiple selections are allowed.' |
294 | 244 |
|
580 | 245 |
#isOpaque |
780 | 246 |
'Turns on/off that widget is displayed opaque.' |
580 | 247 |
|
350 | 248 |
#isTriggerOnDown |
752 | 249 |
'Turns on/off that the action is evaluated when the button is pressed; otherwise, when released.' |
303 | 250 |
|
251 |
#label |
|
780 | 252 |
'The label of the button.' |
303 | 253 |
|
367 | 254 |
#labelChannel |
780 | 255 |
'Aspect selector or binding for the label of the widget.' |
367 | 256 |
|
257 |
#labelIsImage |
|
780 | 258 |
'Turns on/off that the string of the label is taken as selector.' |
367 | 259 |
|
580 | 260 |
#labelPositionList |
780 | 261 |
'Defines the position of the label.' |
580 | 262 |
|
540 | 263 |
#lampColor |
780 | 264 |
'Defines the lamp color of the widget.' |
540 | 265 |
|
350 | 266 |
#level |
783 | 267 |
'Defines the width of the 3D-border (in pixels).' |
350 | 268 |
|
269 |
#listHolder |
|
780 | 270 |
'Aspect selector or binding for holding the list.' |
350 | 271 |
|
272 |
#majorKey |
|
780 | 273 |
'Name of the class which provides the window specification. If left blank, the application itself is used.' |
350 | 274 |
|
275 |
#maxChars |
|
780 | 276 |
'Maximum number of characters which can be typed in.' |
350 | 277 |
|
278 |
#maxSize |
|
279 |
'Those two fields specify the windows maximum size. The user will not be allowed to resize it to a larger size.' |
|
280 |
||
281 |
#maxXField |
|
780 | 282 |
'The maximum allowed width of the application window.' |
350 | 283 |
|
284 |
#maxYField |
|
780 | 285 |
'The maximum allowed height of the application window.' |
350 | 286 |
|
287 |
#menuButton |
|
780 | 288 |
'Opens a Menu Editor on the application class and the defined selector.' |
350 | 289 |
|
290 |
#menuId |
|
780 | 291 |
'Aspect selector or binding for the building of the tool bar components. It should return a menu spec.' |
350 | 292 |
|
293 |
#menuPerformer |
|
780 | 294 |
'Aspect selector or binding for sending the messages of the menu items to an object.' |
350 | 295 |
|
296 |
#middleButtonPressed |
|
780 | 297 |
'Name of the selector sent to the application when the middle button is pressed.' |
350 | 298 |
|
299 |
#minXField |
|
780 | 300 |
'The minimum allowed width of the application window.' |
350 | 301 |
|
302 |
#minYField |
|
780 | 303 |
'The minimum allowed height of the application window.' |
350 | 304 |
|
294 | 305 |
#minorKey |
780 | 306 |
'Name of the selector sent to the application returning a window specification.' |
350 | 307 |
|
580 | 308 |
#modifiedChannel |
780 | 309 |
'Aspect selector or binding for setting the widget as modified.' |
580 | 310 |
|
311 |
#monitoring |
|
780 | 312 |
'Turns on/off that the widget automatically updates, if the contents of the current directory has changed.' |
580 | 313 |
|
314 |
#monitoringDelayTime |
|
780 | 315 |
'Number of the seconds for the delays of the monitoring tasks.' |
580 | 316 |
|
317 |
#moveSelectedRow |
|
780 | 318 |
'Turns on/off that the row of the selected tab item is always moved down to the widget''s view.' |
580 | 319 |
|
350 | 320 |
#oneTabPerLine |
780 | 321 |
'Turns on/off that only one tab item is drawn per line.' |
350 | 322 |
|
610
c6dc33689c6a
Add help for subSpec GUI Painter opening.
Stefan Vogel <sv@exept.de>
parents:
584
diff
changeset
|
323 |
#openSubSpecGuiHelp |
780 | 324 |
'Opens a GUI Builder on the defined class and selector.' |
610
c6dc33689c6a
Add help for subSpec GUI Painter opening.
Stefan Vogel <sv@exept.de>
parents:
584
diff
changeset
|
325 |
|
580 | 326 |
#orientation |
752 | 327 |
'Defines the direction of the alignment of the two arrows (horizontal or vertical).' |
580 | 328 |
|
540 | 329 |
#paramAdd |
330 |
'Adds a name-value pair to the parameters collection.' |
|
331 |
||
332 |
#paramList |
|
333 |
'Lists defined parameters.' |
|
334 |
||
335 |
#paramNameField |
|
336 |
'The name of the appletParameter.' |
|
337 |
||
338 |
#paramRemove |
|
339 |
'Removes the definition of the current name.' |
|
340 |
||
341 |
#paramValueField |
|
342 |
'The value of the appletParameter.' |
|
343 |
||
344 |
#parameNameField |
|
345 |
'' |
|
346 |
||
347 |
#radioButtonGroup |
|
780 | 348 |
'Aspect selector or binding for the group definitions of the radio buttons.' |
540 | 349 |
|
350 |
#radioButtonValue |
|
780 | 351 |
'Defines the string which is set in the RadioButtonGroup instance above when pressed.' |
540 | 352 |
|
353 |
#readOnly |
|
780 | 354 |
'Turns on/off that the contents of the widget cannot be modified.' |
540 | 355 |
|
580 | 356 |
#regionType |
780 | 357 |
'Defines the shape of the widget.' |
580 | 358 |
|
540 | 359 |
#resizeForLabel |
780 | 360 |
'Turns on/off whether the widget recomputes its layout, if the extent of the string has changed.' |
540 | 361 |
|
580 | 362 |
#rowIfAbsent |
780 | 363 |
'Name of the selector sent to the application when an empty list entry is detected.' |
580 | 364 |
|
365 |
#selectConditionSelector |
|
780 | 366 |
'Name of the selector sent to the application before a selection is performed.' |
580 | 367 |
|
350 | 368 |
#selectionHolder |
780 | 369 |
'Aspect selector or binding for holding the selected value.' |
350 | 370 |
|
371 |
#setMaxExtent |
|
780 | 372 |
'Picks the current extent of the canvas window and sets it as the maximum extent.' |
350 | 373 |
|
374 |
#setMinExtent |
|
780 | 375 |
'Picks the current extent of the canvas window and sets it as the minimum extent.' |
350 | 376 |
|
580 | 377 |
#showDirectoryIndicator |
780 | 378 |
'Turns on/off that directory indicators are shown for none empty directories.' |
580 | 379 |
|
380 |
#showDirectoryIndicatorForRoot |
|
780 | 381 |
'Turns on/off that a directory indicator for the root item is shown.' |
303 | 382 |
|
540 | 383 |
#showLamp |
752 | 384 |
'Turns on/off that a colored lamp is shown.' |
540 | 385 |
|
350 | 386 |
#showLines |
780 | 387 |
'Turns on/off that connecting lines are shown between the tree items.' |
303 | 388 |
|
580 | 389 |
#showPercentage |
780 | 390 |
'Turns on/off that a number of percentage is shown.' |
580 | 391 |
|
350 | 392 |
#showRoot |
780 | 393 |
'Turns on/off that the root item is shown.' |
294 | 394 |
|
580 | 395 |
#showSeparatingLines |
780 | 396 |
'Turns on/off that the items are separated by lines.' |
580 | 397 |
|
350 | 398 |
#sizeAsDefault |
780 | 399 |
'Turns on/off that the widget computes its size including space for the default (return) image.' |
294 | 400 |
|
580 | 401 |
#specHolder |
780 | 402 |
'Aspect selector or binding for holding the selector returning a window specification.' |
580 | 403 |
|
404 |
#start |
|
780 | 405 |
'Defines the minimum number of the range.' |
580 | 406 |
|
407 |
#step |
|
780 | 408 |
'Defines the step number of the range.' |
580 | 409 |
|
410 |
#stop |
|
780 | 411 |
'Defines the maximum number of the range.' |
580 | 412 |
|
294 | 413 |
#tabLabels |
780 | 414 |
'Name of the selector sent to the application returning a list of labels for the tab items.' |
294 | 415 |
|
350 | 416 |
#tabOrientation |
780 | 417 |
'Defines the side for the arrangement of the tab items.' |
294 | 418 |
|
419 |
#tabWidget |
|
780 | 420 |
'Defines the type of the border style of the tab items (Windows or Mac).' |
367 | 421 |
|
540 | 422 |
#tabable |
780 | 423 |
'Turns on/off that the widget can be reached by pressing the tab key.' |
540 | 424 |
|
367 | 425 |
#translateLabel |
780 | 426 |
'Turns on/off that the label string is translated via the resource mechanism to a national language string.' |
294 | 427 |
|
350 | 428 |
#typeConverter |
780 | 429 |
'Defines how the entry field is converted to an object which is sent to the model.' |
350 | 430 |
|
580 | 431 |
#upAction |
780 | 432 |
'Name of the selector which is sent to the application when the up(left)-button is pressed.' |
580 | 433 |
|
350 | 434 |
#useIndex |
780 | 435 |
'Turns on/off that the value model of the selection is provided by the current list index of the item.' |
307 | 436 |
|
367 | 437 |
#usePreferredExtent |
783 | 438 |
'Turns on/off that the window application takes its preferred extent from the top component.' |
367 | 439 |
|
580 | 440 |
#validateDoubleClickSelector |
780 | 441 |
'Name of the selector sent to the application before a not empty directory is opened by a double click.' |
580 | 442 |
|
294 | 443 |
#valueChangeSelector |
780 | 444 |
'Name of the selector sent to the application when the widget/item has selected.' |
294 | 445 |
|
350 | 446 |
#verticalLayout |
780 | 447 |
'Defines how sub components are vertically arranged.' |
294 | 448 |
|
350 | 449 |
#verticalMiniScroller |
780 | 450 |
'Turns on/off that the widget uses a small vertical scroll bar.' |
303 | 451 |
|
350 | 452 |
#verticalScroller |
780 | 453 |
'Turns on/off that the widget provides vertical scrolling capabilities.' |
350 | 454 |
|
580 | 455 |
#verticalSpace |
780 | 456 |
'Vertical space between the sub components (in pixels).' |
580 | 457 |
|
350 | 458 |
#windowIcon |
780 | 459 |
'Name of the selector sent to the application returning a bitmap image for the icon representation of the window application.' |
303 | 460 |
|
350 | 461 |
#windowLabel |
780 | 462 |
'Label of the window application.' |
307 | 463 |
|
172 | 464 |
) |
465 |
! ! |
|
466 |
||
164 | 467 |
!UISpecificationTool class methodsFor:'interface specs'! |
468 |
||
469 |
windowSpec |
|
470 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
471 |
||
472 |
"do not manually edit this - the painter/builder may not be able to |
|
473 |
handle the specification if its corrupted." |
|
474 |
||
475 |
" |
|
476 |
UIPainter new openOnClass:UISpecificationTool andSelector:#windowSpec |
|
477 |
UISpecificationTool new openInterface:#windowSpec |
|
478 |
" |
|
479 |
"UISpecificationTool open" |
|
480 |
||
481 |
<resource: #canvas> |
|
482 |
||
483 |
^ |
|
484 |
||
485 |
#(#FullSpec |
|
486 |
#'window:' |
|
487 |
#(#WindowSpec |
|
488 |
#'name:' 'uIPainterView' |
|
489 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
490 |
#'label:' 'unnamed canvas' |
|
491 |
#'bounds:' #(#Rectangle 0 0 300 300) |
|
492 |
) |
|
493 |
#'component:' |
|
494 |
#(#SpecCollection |
|
495 |
#'collection:' |
|
496 |
#( |
|
497 |
#(#ViewSpec |
|
498 |
#'name:' 'Frame' |
|
499 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
500 |
) |
|
501 |
) |
|
502 |
) |
|
503 |
) |
|
504 |
! ! |
|
505 |
||
506 |
!UISpecificationTool methodsFor:'accessing'! |
|
507 |
||
172 | 508 |
specification |
509 |
"gets current edit specification |
|
510 |
" |
|
511 |
^ specification |
|
512 |
||
513 |
||
514 |
! |
|
515 |
||
516 |
specification:aSpec |
|
517 |
"sets current edit specification |
|
518 |
" |
|
428 | 519 |
self releaseResources. |
520 |
||
172 | 521 |
aSpec isNil ifTrue:[ |
428 | 522 |
specChannel notNil ifTrue:[ specChannel release ]. |
523 |
aspects notNil ifTrue:[ aspects release ]. |
|
524 |
||
172 | 525 |
specChannel := nil. |
526 |
specification := nil. |
|
527 |
aspects := nil. |
|
528 |
] ifFalse:[ |
|
529 |
specification class == aSpec class ifTrue:[ |
|
530 |
specification := aSpec. |
|
531 |
^ specChannel value:specification. |
|
532 |
]. |
|
428 | 533 |
specChannel notNil ifTrue:[ specChannel release ]. |
534 |
aspects notNil ifTrue:[ aspects release ]. |
|
535 |
||
172 | 536 |
specification := aSpec. |
536
3991e37ec19f
pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents:
428
diff
changeset
|
537 |
|
3991e37ec19f
pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents:
428
diff
changeset
|
538 |
"/ some tricky specs need the builder |
3991e37ec19f
pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents:
428
diff
changeset
|
539 |
"/ during the addBindings phase. |
3991e37ec19f
pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents:
428
diff
changeset
|
540 |
"/ This is passed down in a special UIBindingsDictionary |
3991e37ec19f
pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents:
428
diff
changeset
|
541 |
"/ (remain backward compatible) |
3991e37ec19f
pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents:
428
diff
changeset
|
542 |
|
3991e37ec19f
pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents:
428
diff
changeset
|
543 |
aspects := UISpecification newBindingsDictionary. |
3991e37ec19f
pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents:
428
diff
changeset
|
544 |
aspects builder:builder. |
3991e37ec19f
pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents:
428
diff
changeset
|
545 |
|
172 | 546 |
specChannel := specification asValue. |
547 |
specification class addBindingsTo:aspects for:specification channel:specChannel. |
|
548 |
aspects do:[:el| el addDependent:self ]. |
|
549 |
]. |
|
550 |
||
551 |
selection notNil ifTrue:[ |
|
759 | 552 |
self clearScrolledView. |
172 | 553 |
selection := nil. |
554 |
]. |
|
536
3991e37ec19f
pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents:
428
diff
changeset
|
555 |
|
3991e37ec19f
pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents:
428
diff
changeset
|
556 |
"Modified: / 30.1.1998 / 13:50:51 / cg" |
172 | 557 |
! ! |
558 |
||
559 |
!UISpecificationTool methodsFor:'accessing channels'! |
|
560 |
||
164 | 561 |
modifiedHolder:aValueHolder |
562 |
"set the value holder set to true in case of modifying attributes |
|
563 |
" |
|
564 |
modifiedHolder notNil ifTrue:[ |
|
565 |
modifiedHolder removeDependent:self. |
|
566 |
]. |
|
567 |
||
568 |
(modifiedHolder := aValueHolder) notNil ifTrue:[ |
|
569 |
modifiedHolder addDependent:self. |
|
570 |
]. |
|
571 |
||
572 |
! ! |
|
573 |
||
364 | 574 |
!UISpecificationTool methodsFor:'actions'! |
575 |
||
576 |
setMaxExtent |
|
577 |
"set the windows maxExtent from its current extent" |
|
578 |
||
579 |
|canvas currentExtent| |
|
580 |
||
581 |
canvas := self masterApplication painter topView. |
|
582 |
currentExtent := canvas extent. |
|
583 |
(self aspectFor:#maxX) value:currentExtent x. |
|
584 |
(self aspectFor:#maxY) value:currentExtent y. |
|
585 |
||
586 |
"Modified: / 29.10.1997 / 18:29:17 / cg" |
|
587 |
! |
|
588 |
||
589 |
setMinExtent |
|
590 |
"set the windows minExtent from its current extent" |
|
591 |
||
592 |
|canvas currentExtent| |
|
593 |
||
594 |
canvas := self masterApplication painter topView. |
|
595 |
currentExtent := canvas extent. |
|
596 |
(self aspectFor:#minX) value:currentExtent x. |
|
597 |
(self aspectFor:#minY) value:currentExtent y. |
|
598 |
||
599 |
"Created: / 29.10.1997 / 18:17:55 / cg" |
|
600 |
"Modified: / 29.10.1997 / 18:28:53 / cg" |
|
601 |
! ! |
|
602 |
||
164 | 603 |
!UISpecificationTool methodsFor:'bindings'! |
604 |
||
605 |
aspectFor:aKey |
|
606 |
"returns aspect for a key or nil |
|
607 |
" |
|
608 |
aspects notNil ifTrue:[ |
|
609 |
^ aspects at:aKey ifAbsent:nil |
|
610 |
]. |
|
611 |
^ super aspectFor:aKey |
|
612 |
||
428 | 613 |
! |
614 |
||
615 |
releaseResources |
|
616 |
"release resources |
|
617 |
" |
|
759 | 618 |
|frame appl view vscroller| |
428 | 619 |
|
759 | 620 |
frame := self windowFrame. |
428 | 621 |
appl := builder application. |
622 |
builder := UIBuilder new. |
|
623 |
builder application:appl. |
|
624 |
builder componentAt:#Frame put:frame. |
|
584
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
625 |
! |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
626 |
|
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
627 |
specificationFor:aKey |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
628 |
"this is called if our current specification contains |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
629 |
subspecifications or subcanvases. |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
630 |
Get the subspecification from the current specification" |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
631 |
|
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
632 |
|cls| |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
633 |
|
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
634 |
cls := specification class. |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
635 |
(cls respondsTo:aKey) ifTrue:[ |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
636 |
^ cls perform:aKey |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
637 |
]. |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
638 |
^ nil |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
639 |
|
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
640 |
"Created: / 4.2.1998 / 23:52:39 / stefan" |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
641 |
"Modified: / 4.2.1998 / 23:58:23 / stefan" |
172 | 642 |
! ! |
643 |
||
644 |
!UISpecificationTool methodsFor:'change & update'! |
|
164 | 645 |
|
172 | 646 |
update |
647 |
"reload specification |
|
164 | 648 |
" |
172 | 649 |
specChannel notNil ifTrue:[ |
650 |
specChannel value:specification. |
|
651 |
] |
|
164 | 652 |
|
653 |
||
654 |
! |
|
655 |
||
656 |
update:something with:someArgument from:someone |
|
657 |
"any attribute changed its state in the current specification |
|
658 |
" |
|
659 |
someone ~~ modifiedHolder ifTrue:[ |
|
660 |
modifiedHolder value ~~ true ifTrue:[ |
|
661 |
modifiedHolder value:true |
|
662 |
] |
|
663 |
] |
|
664 |
||
665 |
||
666 |
! ! |
|
667 |
||
668 |
!UISpecificationTool methodsFor:'selection'! |
|
669 |
||
670 |
selection:something |
|
172 | 671 |
"selection changed |
672 |
" |
|
759 | 673 |
|slices idx spec frame y window| |
164 | 674 |
|
172 | 675 |
specification notNil ifTrue:[ |
676 |
slices := specification class slices. |
|
164 | 677 |
idx:= slices findFirst:[:aSlice| aSlice first = something ]. |
678 |
||
679 |
idx ~~ 0 ifTrue:[ |
|
172 | 680 |
spec := specification class perform:((slices at:idx) last). |
428 | 681 |
] |
164 | 682 |
]. |
683 |
||
172 | 684 |
spec ~= selection ifTrue:[ |
759 | 685 |
self releaseResources. |
686 |
self clearScrolledView. |
|
752 | 687 |
|
759 | 688 |
window := self scrolledView scrolledView. |
164 | 689 |
|
690 |
spec notNil ifTrue:[ |
|
759 | 691 |
builder buildFromSpec:spec in:window. |
692 |
||
693 |
window allViewBackground:(self windowFrame viewBackground). |
|
694 |
window extent:1.0@(window preferredExtent y). |
|
752 | 695 |
masterApplication updateFonts. |
759 | 696 |
window realizeAllSubViews. |
697 |
self scrolledView sizeChanged:nil. |
|
164 | 698 |
] |
699 |
]. |
|
172 | 700 |
selection := spec. |
164 | 701 |
! ! |
702 |
||
759 | 703 |
!UISpecificationTool methodsFor:'spec. window'! |
704 |
||
705 |
clearScrolledView |
|
706 |
||
707 |
scrolledView isNil ifFalse:[ |
|
708 |
scrolledView scrolledView destroySubViews. |
|
709 |
] |
|
710 |
! |
|
711 |
||
712 |
scrolledView |
|
713 |
|frame vscroller| |
|
714 |
||
715 |
scrolledView isNil ifTrue:[ |
|
716 |
frame := self windowFrame. |
|
717 |
vscroller := ScrollableView for:ViewScroller origin:0.0 @ 0.0 corner:1.0 @ 1.0 in:frame. |
|
718 |
vscroller verticalScrollable:true. |
|
719 |
vscroller verticalMini:true. |
|
720 |
vscroller autoHideScrollBars:true. |
|
721 |
scrolledView := vscroller scrolledView. |
|
722 |
scrolledView scrolledView:View new. |
|
723 |
frame realizeAllSubViews. |
|
724 |
frame sizeChanged:nil. |
|
725 |
]. |
|
726 |
^ scrolledView |
|
727 |
! |
|
728 |
||
729 |
windowFrame |
|
730 |
windowFrame isNil ifTrue:[ |
|
731 |
windowFrame := builder componentAt:#Frame |
|
732 |
]. |
|
733 |
^ windowFrame. |
|
734 |
! ! |
|
735 |
||
164 | 736 |
!UISpecificationTool class methodsFor:'documentation'! |
737 |
||
738 |
version |
|
739 |
^ '$Header$' |
|
740 |
! ! |