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