author | tz |
Mon, 29 Jun 1998 16:46:21 +0200 | |
changeset 880 | a344e9ef09dc |
parent 876 | 32b1012426e3 |
child 893 | 09ea254a9fda |
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 |
|
847 | 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 |
801 | 78 |
'Enable sending of the entered string to the model with every key press.' |
367 | 79 |
|
80 |
#acceptOnLeave |
|
801 | 81 |
'Enable sending of the entered string to the model when the mouse pointer is moved out of the field.' |
367 | 82 |
|
540 | 83 |
#acceptOnLostFocus |
801 | 84 |
'Enable sending of the entered string to the model when the field looses its input focus.' |
540 | 85 |
|
367 | 86 |
#acceptOnReturn |
801 | 87 |
'Enable sending of the entered string to the model when the RETURN key is pressed.' |
367 | 88 |
|
89 |
#acceptOnTab |
|
801 | 90 |
'Enable sending of the entered string to the model when the TAB key is pressed.' |
367 | 91 |
|
303 | 92 |
#action |
801 | 93 |
'Name of the message sent to the application when the widget is activated.' |
303 | 94 |
|
367 | 95 |
#actionArg |
801 | 96 |
'Optional argument passed with the action message.' |
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 |
801 | 105 |
'The name of the message sent to the application to provide the view instance.' |
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 |
801 | 114 |
'Turn on automatic repetition of the action 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 |
801 | 123 |
'Show a default (-return) bitmap after the label.' |
307 | 124 |
|
580 | 125 |
#beDependentOfRows |
801 | 126 |
'Make the widget dependent on each row (i.e. rows send change messages).' |
580 | 127 |
|
350 | 128 |
#booleanHolder |
837 | 129 |
'Aspect selector or binding for a boolean holder which enables 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 |
801 | 138 |
'An optional argument passed with the message.' |
350 | 139 |
|
140 |
#canvasSelector |
|
801 | 141 |
'The name of the message sent to the application after opening the canvas.' |
350 | 142 |
|
580 | 143 |
#clientHolder |
801 | 144 |
'Aspect selector or binding for a holder on the client application to be opened.' |
580 | 145 |
|
350 | 146 |
#clientKey |
801 | 147 |
'Name of the message which returns an application. 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 |
|
801 | 153 |
'The name of the java classFile which contains the applets code. For example: ''ArcTest.class''' |
540 | 154 |
|
580 | 155 |
#columnButton |
780 | 156 |
'Opens a Table Columns Builder.' |
580 | 157 |
|
158 |
#columnHolder |
|
801 | 159 |
'Aspect selector or binding for a holder on the list of the column descriptions.' |
580 | 160 |
|
847 | 161 |
#dblClickChannel |
162 |
'' |
|
163 |
||
350 | 164 |
#defaultLabel |
780 | 165 |
'Default label (used, if nothing selected).' |
350 | 166 |
|
167 |
#document |
|
855 | 168 |
'Aspect selector or binding for a holder of the URL of the document.' |
350 | 169 |
|
170 |
#doubleClickSelector |
|
801 | 171 |
'Name of the message sent to the application when double clicked.' |
580 | 172 |
|
173 |
#downAction |
|
801 | 174 |
'Name of the message sent to the application when the down(right)-button is pressed.' |
294 | 175 |
|
350 | 176 |
#enableChannel |
837 | 177 |
'Aspect selector or binding for a boolean holder which enables the widget.' |
350 | 178 |
|
580 | 179 |
#fileSelectionFilterClas |
801 | 180 |
'The name of the item class used to create the entries into the hierarchical list.' |
580 | 181 |
|
350 | 182 |
#fileSelectionTreeRoot |
801 | 183 |
'Aspect selector or binding for a holder on the root directories path name.' |
350 | 184 |
|
580 | 185 |
#fitLastRow |
801 | 186 |
'Resize the last row to fit the width of the widget.' |
580 | 187 |
|
350 | 188 |
#fontMenu |
801 | 189 |
'Defines the font used by the widget.' |
294 | 190 |
|
367 | 191 |
#forceRecursiveBackground |
801 | 192 |
'If on, the background color is recursively set in all sub components.' |
367 | 193 |
|
540 | 194 |
#foregroundChannel |
801 | 195 |
'Aspect selector or binding for a foreground color holder.' |
540 | 196 |
|
350 | 197 |
#foregroundColor |
780 | 198 |
'Defines the foreground color of the widget.' |
350 | 199 |
|
200 |
#galleryLabels |
|
801 | 201 |
'Aspect selector or binding for a holder on the label list.' |
350 | 202 |
|
203 |
#galleryModel |
|
780 | 204 |
'Aspect selector or binding for the selected label.' |
294 | 205 |
|
307 | 206 |
#gallerySelection |
801 | 207 |
'Aspect selector or binding for a holder which gets the windowSpec of the selected widget.' |
307 | 208 |
|
294 | 209 |
#gallerySelectors |
801 | 210 |
'Name of the message sent to the application returning a list of resource spec selectors.' |
294 | 211 |
|
580 | 212 |
#has3Dsepartors |
801 | 213 |
'Enable 3D-look row/column separators.' |
367 | 214 |
|
350 | 215 |
#hierarchicalList |
801 | 216 |
'Aspect selector or binding for a root item holder.' |
350 | 217 |
|
218 |
#hierarchicalListButton |
|
780 | 219 |
'Opens a Hierarchical List Editor on the application class and the defined selector.' |
294 | 220 |
|
350 | 221 |
#horizontalLayout |
801 | 222 |
'Defines how sub components are arranged horizontally.' |
350 | 223 |
|
224 |
#horizontalMiniScroller |
|
801 | 225 |
'Use a mini-scroller as horizontal scrollbar.' |
294 | 226 |
|
350 | 227 |
#horizontalScroller |
801 | 228 |
'Enable horizontal scrollability.' |
350 | 229 |
|
580 | 230 |
#horizontalSpace |
801 | 231 |
'Horizontal space between sub components (in pixels).' |
580 | 232 |
|
350 | 233 |
#id |
780 | 234 |
'Unique symbolic name (ID) of the widget.' |
303 | 235 |
|
540 | 236 |
#initiallyDisabled |
801 | 237 |
'Widget is initially disabled.' |
540 | 238 |
|
367 | 239 |
#initiallyInvisible |
801 | 240 |
'Widget is initially invisible.' |
367 | 241 |
|
242 |
#inputFieldGroup |
|
780 | 243 |
'Unique symbolic name (ID) for the group of the entry field.' |
367 | 244 |
|
350 | 245 |
#isMultiSelect |
801 | 246 |
'Enable/disable multiple selections.' |
294 | 247 |
|
580 | 248 |
#isOpaque |
801 | 249 |
'If on, the widget is displayed opaque; if off, its transparent.' |
580 | 250 |
|
350 | 251 |
#isTriggerOnDown |
801 | 252 |
'If on, the button triggers its action when pressed. If off, it triggers on release.' |
303 | 253 |
|
254 |
#label |
|
801 | 255 |
'The label of the widget.' |
303 | 256 |
|
367 | 257 |
#labelChannel |
801 | 258 |
'Aspect selector or binding for a labelString holder.' |
367 | 259 |
|
260 |
#labelIsImage |
|
837 | 261 |
'Label is actually the selector if a message providing an image-label.' |
367 | 262 |
|
580 | 263 |
#labelPositionList |
780 | 264 |
'Defines the position of the label.' |
580 | 265 |
|
540 | 266 |
#lampColor |
801 | 267 |
'Defines the lamps color.' |
540 | 268 |
|
350 | 269 |
#level |
801 | 270 |
'Defines the level of the 3D-border (in pixels).' |
350 | 271 |
|
272 |
#listHolder |
|
801 | 273 |
'Aspect selector or binding for the list holder.' |
350 | 274 |
|
275 |
#majorKey |
|
801 | 276 |
'Name of the class which provides the window spec. If empty, the application itself is used.' |
350 | 277 |
|
278 |
#maxChars |
|
801 | 279 |
'Maximum number of characters in the field.' |
350 | 280 |
|
281 |
#maxSize |
|
282 |
'Those two fields specify the windows maximum size. The user will not be allowed to resize it to a larger size.' |
|
283 |
||
847 | 284 |
#maxValue |
285 |
'An optional maximum value (if fieldType = numberInRange)' |
|
286 |
||
350 | 287 |
#maxXField |
801 | 288 |
'The maximum width of the applications topWindow.' |
350 | 289 |
|
290 |
#maxYField |
|
801 | 291 |
'The maximum height of the applications topWindow.' |
350 | 292 |
|
293 |
#menuButton |
|
801 | 294 |
'Open a Menu Editor on the menu.' |
350 | 295 |
|
296 |
#menuId |
|
801 | 297 |
'Aspect selector or binding for a menu spec defining the tool bar components.' |
350 | 298 |
|
299 |
#menuPerformer |
|
801 | 300 |
'Aspect selector or binding providing the receiver of menu messages.' |
350 | 301 |
|
302 |
#middleButtonPressed |
|
801 | 303 |
'Name of the message sent to the application when the middle button is pressed.' |
350 | 304 |
|
847 | 305 |
#minValue |
306 |
'An optional minimum value (if fieldType = numberInRange)' |
|
307 |
||
350 | 308 |
#minXField |
801 | 309 |
'The minimum width of the applications topWindow.' |
350 | 310 |
|
311 |
#minYField |
|
801 | 312 |
'The minimum height of the applications topWindow.' |
350 | 313 |
|
294 | 314 |
#minorKey |
801 | 315 |
'Name of the message sent to the application returning the window specification.' |
350 | 316 |
|
580 | 317 |
#modifiedChannel |
801 | 318 |
'Aspect selector or binding for a holder for the modified-flag.' |
580 | 319 |
|
320 |
#monitoring |
|
801 | 321 |
'Enable automatic update whenever the directory is modified.' |
580 | 322 |
|
323 |
#monitoringDelayTime |
|
801 | 324 |
'Time in seconds between updates (if monitoring is enabled).' |
580 | 325 |
|
326 |
#moveSelectedRow |
|
801 | 327 |
'Enable/disable automatic movement of the row containing the selected tab item.' |
580 | 328 |
|
350 | 329 |
#oneTabPerLine |
801 | 330 |
'Arrange tabs vertically, with only one tab item per row.' |
350 | 331 |
|
610
c6dc33689c6a
Add help for subSpec GUI Painter opening.
Stefan Vogel <sv@exept.de>
parents:
584
diff
changeset
|
332 |
#openSubSpecGuiHelp |
780 | 333 |
'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
|
334 |
|
580 | 335 |
#orientation |
801 | 336 |
'Defines the orientation (horizontal or vertical).' |
580 | 337 |
|
540 | 338 |
#paramAdd |
801 | 339 |
'Adds a name-value pair to the appletParameter collection.' |
540 | 340 |
|
341 |
#paramList |
|
342 |
'Lists defined parameters.' |
|
343 |
||
344 |
#paramNameField |
|
345 |
'The name of the appletParameter.' |
|
346 |
||
347 |
#paramRemove |
|
801 | 348 |
'Removes that appletParameter.' |
540 | 349 |
|
350 |
#paramValueField |
|
351 |
'The value of the appletParameter.' |
|
352 |
||
353 |
#radioButtonGroup |
|
801 | 354 |
'Aspect selector or binding providing the radioButton group-model.' |
540 | 355 |
|
356 |
#radioButtonValue |
|
801 | 357 |
'Value passed to the radioButton group-model.' |
540 | 358 |
|
359 |
#readOnly |
|
801 | 360 |
'Make the contents be readOnly.' |
540 | 361 |
|
580 | 362 |
#regionType |
780 | 363 |
'Defines the shape of the widget.' |
580 | 364 |
|
540 | 365 |
#resizeForLabel |
801 | 366 |
'Enable/disable automatic resize after a label change.' |
540 | 367 |
|
580 | 368 |
#rowIfAbsent |
801 | 369 |
'Name of the message sent to the application when an empty list entry is detected.' |
580 | 370 |
|
371 |
#selectConditionSelector |
|
801 | 372 |
'Name of the message sent to the application to validate a selection.' |
580 | 373 |
|
350 | 374 |
#selectionHolder |
801 | 375 |
'Aspect selector or binding for a holder on the selection.' |
350 | 376 |
|
377 |
#setMaxExtent |
|
801 | 378 |
'Pick the maximum extent from the canvases current extent.' |
350 | 379 |
|
380 |
#setMinExtent |
|
801 | 381 |
'Pick the minimum extent from the canvases current extent.' |
350 | 382 |
|
580 | 383 |
#showDirectoryIndicator |
801 | 384 |
'Show/hide directory indicators for non-empty directories.' |
580 | 385 |
|
386 |
#showDirectoryIndicatorForRoot |
|
801 | 387 |
'Show/hide the directory indicator for the root item.' |
303 | 388 |
|
540 | 389 |
#showLamp |
801 | 390 |
'Show/hide the colored lamp.' |
540 | 391 |
|
350 | 392 |
#showLines |
801 | 393 |
'Show/hide connecting lines between tree items.' |
303 | 394 |
|
580 | 395 |
#showPercentage |
801 | 396 |
'Show/hide the percentage display.' |
580 | 397 |
|
350 | 398 |
#showRoot |
801 | 399 |
'Show/hide the root item.' |
294 | 400 |
|
580 | 401 |
#showSeparatingLines |
801 | 402 |
'Show/hide separated lines.' |
580 | 403 |
|
350 | 404 |
#sizeAsDefault |
801 | 405 |
'Size the widget to include space for the default-(return) bitmap.' |
294 | 406 |
|
580 | 407 |
#specHolder |
780 | 408 |
'Aspect selector or binding for holding the selector returning a window specification.' |
580 | 409 |
|
410 |
#start |
|
801 | 411 |
'Defines the ranges minimum.' |
580 | 412 |
|
413 |
#step |
|
801 | 414 |
'Defines the step within the range.' |
580 | 415 |
|
416 |
#stop |
|
801 | 417 |
'Defines the ranges maximum.' |
580 | 418 |
|
294 | 419 |
#tabLabels |
801 | 420 |
'Name of the message sent to the application returning a list of labels for the tab items.' |
294 | 421 |
|
350 | 422 |
#tabOrientation |
780 | 423 |
'Defines the side for the arrangement of the tab items.' |
294 | 424 |
|
425 |
#tabWidget |
|
801 | 426 |
'Defines the type of the border style of the tab items (Windows style vs. Mac style).' |
367 | 427 |
|
540 | 428 |
#tabable |
837 | 429 |
'Widget can be reached by pressing the TAB key.' |
540 | 430 |
|
367 | 431 |
#translateLabel |
837 | 432 |
'Translate the label via the resource mechanism to a national language string.' |
294 | 433 |
|
350 | 434 |
#typeConverter |
801 | 435 |
'Defines how the entry string is converted to an object which is passed to the model.' |
350 | 436 |
|
580 | 437 |
#upAction |
801 | 438 |
'Name of the message sent to the application when the up(left)-button is pressed.' |
580 | 439 |
|
350 | 440 |
#useIndex |
801 | 441 |
'If on, use the items index as selection; if off, use the items value.' |
307 | 442 |
|
367 | 443 |
#usePreferredExtent |
801 | 444 |
'If on, the window computes its preferred extent. Take specified extent if off.' |
367 | 445 |
|
580 | 446 |
#validateDoubleClickSelector |
801 | 447 |
'Name of the message sent to the application before a not empty directory is opened by a double click.' |
580 | 448 |
|
294 | 449 |
#valueChangeSelector |
801 | 450 |
'Name of the message sent to the application when the widget/item has selected.' |
294 | 451 |
|
350 | 452 |
#verticalLayout |
780 | 453 |
'Defines how sub components are vertically arranged.' |
294 | 454 |
|
350 | 455 |
#verticalMiniScroller |
801 | 456 |
'Use a mini-scroller as vertical scrollbar.' |
303 | 457 |
|
350 | 458 |
#verticalScroller |
801 | 459 |
'Enable vertical scrollability.' |
350 | 460 |
|
580 | 461 |
#verticalSpace |
780 | 462 |
'Vertical space between the sub components (in pixels).' |
580 | 463 |
|
350 | 464 |
#windowIcon |
801 | 465 |
'Name of the message sent to the application returning an icon image for the top window.' |
303 | 466 |
|
350 | 467 |
#windowLabel |
801 | 468 |
'Label of the top window.' |
307 | 469 |
|
172 | 470 |
) |
855 | 471 |
|
472 |
"Modified: / 29.5.1998 / 21:50:15 / cg" |
|
172 | 473 |
! ! |
474 |
||
164 | 475 |
!UISpecificationTool class methodsFor:'interface specs'! |
476 |
||
477 |
windowSpec |
|
478 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
479 |
||
480 |
"do not manually edit this - the painter/builder may not be able to |
|
481 |
handle the specification if its corrupted." |
|
482 |
||
483 |
" |
|
484 |
UIPainter new openOnClass:UISpecificationTool andSelector:#windowSpec |
|
485 |
UISpecificationTool new openInterface:#windowSpec |
|
486 |
" |
|
487 |
"UISpecificationTool open" |
|
488 |
||
489 |
<resource: #canvas> |
|
490 |
||
491 |
^ |
|
492 |
||
493 |
#(#FullSpec |
|
494 |
#'window:' |
|
495 |
#(#WindowSpec |
|
496 |
#'name:' 'uIPainterView' |
|
497 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
498 |
#'label:' 'unnamed canvas' |
|
499 |
#'bounds:' #(#Rectangle 0 0 300 300) |
|
500 |
) |
|
501 |
#'component:' |
|
502 |
#(#SpecCollection |
|
503 |
#'collection:' |
|
504 |
#( |
|
505 |
#(#ViewSpec |
|
506 |
#'name:' 'Frame' |
|
507 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
508 |
) |
|
509 |
) |
|
510 |
) |
|
511 |
) |
|
512 |
! ! |
|
513 |
||
514 |
!UISpecificationTool methodsFor:'accessing'! |
|
515 |
||
172 | 516 |
specification |
517 |
"gets current edit specification |
|
518 |
" |
|
519 |
^ specification |
|
520 |
||
521 |
||
522 |
! |
|
523 |
||
524 |
specification:aSpec |
|
525 |
"sets current edit specification |
|
526 |
" |
|
428 | 527 |
self releaseResources. |
528 |
||
172 | 529 |
aSpec isNil ifTrue:[ |
428 | 530 |
specChannel notNil ifTrue:[ specChannel release ]. |
531 |
aspects notNil ifTrue:[ aspects release ]. |
|
532 |
||
172 | 533 |
specChannel := nil. |
534 |
specification := nil. |
|
535 |
aspects := nil. |
|
536 |
] ifFalse:[ |
|
537 |
specification class == aSpec class ifTrue:[ |
|
538 |
specification := aSpec. |
|
539 |
^ specChannel value:specification. |
|
540 |
]. |
|
428 | 541 |
specChannel notNil ifTrue:[ specChannel release ]. |
542 |
aspects notNil ifTrue:[ aspects release ]. |
|
543 |
||
172 | 544 |
specification := aSpec. |
536
3991e37ec19f
pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents:
428
diff
changeset
|
545 |
|
3991e37ec19f
pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents:
428
diff
changeset
|
546 |
"/ some tricky specs need the builder |
3991e37ec19f
pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents:
428
diff
changeset
|
547 |
"/ during the addBindings phase. |
3991e37ec19f
pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents:
428
diff
changeset
|
548 |
"/ This is passed down in a special UIBindingsDictionary |
3991e37ec19f
pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents:
428
diff
changeset
|
549 |
"/ (remain backward compatible) |
3991e37ec19f
pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents:
428
diff
changeset
|
550 |
|
3991e37ec19f
pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents:
428
diff
changeset
|
551 |
aspects := UISpecification newBindingsDictionary. |
3991e37ec19f
pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents:
428
diff
changeset
|
552 |
aspects builder:builder. |
3991e37ec19f
pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents:
428
diff
changeset
|
553 |
|
172 | 554 |
specChannel := specification asValue. |
555 |
specification class addBindingsTo:aspects for:specification channel:specChannel. |
|
556 |
aspects do:[:el| el addDependent:self ]. |
|
557 |
]. |
|
558 |
||
559 |
selection notNil ifTrue:[ |
|
759 | 560 |
self clearScrolledView. |
172 | 561 |
selection := nil. |
562 |
]. |
|
536
3991e37ec19f
pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents:
428
diff
changeset
|
563 |
|
3991e37ec19f
pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents:
428
diff
changeset
|
564 |
"Modified: / 30.1.1998 / 13:50:51 / cg" |
172 | 565 |
! ! |
566 |
||
567 |
!UISpecificationTool methodsFor:'accessing channels'! |
|
568 |
||
164 | 569 |
modifiedHolder:aValueHolder |
570 |
"set the value holder set to true in case of modifying attributes |
|
571 |
" |
|
572 |
modifiedHolder notNil ifTrue:[ |
|
573 |
modifiedHolder removeDependent:self. |
|
574 |
]. |
|
575 |
||
576 |
(modifiedHolder := aValueHolder) notNil ifTrue:[ |
|
577 |
modifiedHolder addDependent:self. |
|
578 |
]. |
|
579 |
||
580 |
! ! |
|
581 |
||
364 | 582 |
!UISpecificationTool methodsFor:'actions'! |
583 |
||
584 |
setMaxExtent |
|
585 |
"set the windows maxExtent from its current extent" |
|
586 |
||
587 |
|canvas currentExtent| |
|
588 |
||
589 |
canvas := self masterApplication painter topView. |
|
590 |
currentExtent := canvas extent. |
|
591 |
(self aspectFor:#maxX) value:currentExtent x. |
|
592 |
(self aspectFor:#maxY) value:currentExtent y. |
|
593 |
||
594 |
"Modified: / 29.10.1997 / 18:29:17 / cg" |
|
595 |
! |
|
596 |
||
597 |
setMinExtent |
|
598 |
"set the windows minExtent from its current extent" |
|
599 |
||
600 |
|canvas currentExtent| |
|
601 |
||
602 |
canvas := self masterApplication painter topView. |
|
603 |
currentExtent := canvas extent. |
|
604 |
(self aspectFor:#minX) value:currentExtent x. |
|
605 |
(self aspectFor:#minY) value:currentExtent y. |
|
606 |
||
607 |
"Created: / 29.10.1997 / 18:17:55 / cg" |
|
608 |
"Modified: / 29.10.1997 / 18:28:53 / cg" |
|
609 |
! ! |
|
610 |
||
164 | 611 |
!UISpecificationTool methodsFor:'bindings'! |
612 |
||
613 |
aspectFor:aKey |
|
614 |
"returns aspect for a key or nil |
|
615 |
" |
|
616 |
aspects notNil ifTrue:[ |
|
617 |
^ aspects at:aKey ifAbsent:nil |
|
618 |
]. |
|
619 |
^ super aspectFor:aKey |
|
620 |
||
428 | 621 |
! |
622 |
||
623 |
releaseResources |
|
624 |
"release resources |
|
625 |
" |
|
876 | 626 |
|frame appl| |
428 | 627 |
|
876 | 628 |
builder notNil ifTrue:[ |
629 |
frame := self windowFrame. |
|
630 |
appl := builder application. |
|
631 |
builder application:appl. |
|
632 |
builder componentAt:#Frame put:frame. |
|
633 |
]. |
|
869 | 634 |
|
876 | 635 |
"Modified: / 20.6.1998 / 15:45:20 / cg" |
584
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
636 |
! |
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 |
specificationFor:aKey |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
639 |
"this is called if our current specification contains |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
640 |
subspecifications or subcanvases. |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
641 |
Get the subspecification from the current specification" |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
642 |
|
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
643 |
|cls| |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
644 |
|
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
645 |
cls := specification class. |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
646 |
(cls respondsTo:aKey) ifTrue:[ |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
647 |
^ cls perform:aKey |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
648 |
]. |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
649 |
^ nil |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
650 |
|
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
651 |
"Created: / 4.2.1998 / 23:52:39 / stefan" |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
652 |
"Modified: / 4.2.1998 / 23:58:23 / stefan" |
172 | 653 |
! ! |
654 |
||
655 |
!UISpecificationTool methodsFor:'change & update'! |
|
164 | 656 |
|
172 | 657 |
update |
658 |
"reload specification |
|
164 | 659 |
" |
172 | 660 |
specChannel notNil ifTrue:[ |
661 |
specChannel value:specification. |
|
662 |
] |
|
164 | 663 |
|
664 |
||
665 |
! |
|
666 |
||
667 |
update:something with:someArgument from:someone |
|
668 |
"any attribute changed its state in the current specification |
|
669 |
" |
|
670 |
someone ~~ modifiedHolder ifTrue:[ |
|
671 |
modifiedHolder value ~~ true ifTrue:[ |
|
672 |
modifiedHolder value:true |
|
673 |
] |
|
674 |
] |
|
675 |
||
676 |
||
677 |
! ! |
|
678 |
||
679 |
!UISpecificationTool methodsFor:'selection'! |
|
680 |
||
681 |
selection:something |
|
172 | 682 |
"selection changed |
683 |
" |
|
759 | 684 |
|slices idx spec frame y window| |
164 | 685 |
|
172 | 686 |
specification notNil ifTrue:[ |
687 |
slices := specification class slices. |
|
164 | 688 |
idx:= slices findFirst:[:aSlice| aSlice first = something ]. |
689 |
||
690 |
idx ~~ 0 ifTrue:[ |
|
172 | 691 |
spec := specification class perform:((slices at:idx) last). |
428 | 692 |
] |
164 | 693 |
]. |
694 |
||
172 | 695 |
spec ~= selection ifTrue:[ |
759 | 696 |
self releaseResources. |
697 |
self clearScrolledView. |
|
752 | 698 |
|
759 | 699 |
window := self scrolledView scrolledView. |
164 | 700 |
|
701 |
spec notNil ifTrue:[ |
|
759 | 702 |
builder buildFromSpec:spec in:window. |
703 |
||
704 |
window allViewBackground:(self windowFrame viewBackground). |
|
705 |
window extent:1.0@(window preferredExtent y). |
|
752 | 706 |
masterApplication updateFonts. |
759 | 707 |
window realizeAllSubViews. |
708 |
self scrolledView sizeChanged:nil. |
|
164 | 709 |
] |
710 |
]. |
|
172 | 711 |
selection := spec. |
164 | 712 |
! ! |
713 |
||
759 | 714 |
!UISpecificationTool methodsFor:'spec. window'! |
715 |
||
716 |
clearScrolledView |
|
717 |
||
718 |
scrolledView isNil ifFalse:[ |
|
719 |
scrolledView scrolledView destroySubViews. |
|
720 |
] |
|
721 |
! |
|
722 |
||
723 |
scrolledView |
|
724 |
|frame vscroller| |
|
725 |
||
726 |
scrolledView isNil ifTrue:[ |
|
727 |
frame := self windowFrame. |
|
728 |
vscroller := ScrollableView for:ViewScroller origin:0.0 @ 0.0 corner:1.0 @ 1.0 in:frame. |
|
729 |
vscroller verticalScrollable:true. |
|
730 |
vscroller verticalMini:true. |
|
731 |
vscroller autoHideScrollBars:true. |
|
732 |
scrolledView := vscroller scrolledView. |
|
733 |
scrolledView scrolledView:View new. |
|
734 |
frame realizeAllSubViews. |
|
735 |
frame sizeChanged:nil. |
|
845
146b3f78afcb
we dont want any 3D effect for the scrolled view
Claus Gittinger <cg@exept.de>
parents:
837
diff
changeset
|
736 |
|
146b3f78afcb
we dont want any 3D effect for the scrolled view
Claus Gittinger <cg@exept.de>
parents:
837
diff
changeset
|
737 |
"/ we dont want any 3D effect for the scrolled view. |
146b3f78afcb
we dont want any 3D effect for the scrolled view
Claus Gittinger <cg@exept.de>
parents:
837
diff
changeset
|
738 |
"/ must change the slaveViews level late, after realization. |
146b3f78afcb
we dont want any 3D effect for the scrolled view
Claus Gittinger <cg@exept.de>
parents:
837
diff
changeset
|
739 |
"/ (scrolledView has its own idea, changing the level of |
146b3f78afcb
we dont want any 3D effect for the scrolled view
Claus Gittinger <cg@exept.de>
parents:
837
diff
changeset
|
740 |
"/ the scrolled view. |
146b3f78afcb
we dont want any 3D effect for the scrolled view
Claus Gittinger <cg@exept.de>
parents:
837
diff
changeset
|
741 |
scrolledView level:0. |
759 | 742 |
]. |
743 |
^ scrolledView |
|
845
146b3f78afcb
we dont want any 3D effect for the scrolled view
Claus Gittinger <cg@exept.de>
parents:
837
diff
changeset
|
744 |
|
146b3f78afcb
we dont want any 3D effect for the scrolled view
Claus Gittinger <cg@exept.de>
parents:
837
diff
changeset
|
745 |
"Modified: / 21.5.1998 / 00:59:05 / cg" |
759 | 746 |
! |
747 |
||
748 |
windowFrame |
|
749 |
windowFrame isNil ifTrue:[ |
|
750 |
windowFrame := builder componentAt:#Frame |
|
751 |
]. |
|
752 |
^ windowFrame. |
|
753 |
! ! |
|
754 |
||
164 | 755 |
!UISpecificationTool class methodsFor:'documentation'! |
756 |
||
757 |
version |
|
758 |
^ '$Header$' |
|
759 |
! ! |