author | Claus Gittinger <cg@exept.de> |
Fri, 01 Nov 2019 05:49:50 +0100 | |
changeset 3809 | 4f210d7fe0cb |
parent 3749 | c10fb49af42b |
child 3835 | 08f1102b4a82 |
permissions | -rw-r--r-- |
3809 | 1 |
"{ Encoding: utf8 }" |
2 |
||
739 | 3 |
" |
4 |
COPYRIGHT (c) 1997 by eXept Software AG |
|
5 |
All Rights Reserved |
|
6 |
||
7 |
This software is furnished under a license and may be used |
|
8 |
only in accordance with the terms of that license and with the |
|
9 |
inclusion of the above copyright notice. This software may not |
|
10 |
be provided or otherwise made available to, or used by, any |
|
11 |
other person. No title to or ownership of the software is |
|
12 |
hereby transferred. |
|
13 |
" |
|
1431 | 14 |
"{ Package: 'stx:libtool2' }" |
1373 | 15 |
|
3330 | 16 |
"{ NameSpace: Smalltalk }" |
17 |
||
739 | 18 |
ResourceSpecEditor subclass:#TabListEditor |
1373 | 19 |
instanceVariableNames:'listOfTabs' |
739 | 20 |
classVariableNames:'' |
21 |
poolDictionaries:'' |
|
22 |
category:'Interface-UIPainter' |
|
23 |
! |
|
24 |
||
25 |
!TabListEditor class methodsFor:'documentation'! |
|
26 |
||
27 |
copyright |
|
28 |
" |
|
29 |
COPYRIGHT (c) 1997 by eXept Software AG |
|
30 |
All Rights Reserved |
|
31 |
||
32 |
This software is furnished under a license and may be used |
|
33 |
only in accordance with the terms of that license and with the |
|
34 |
inclusion of the above copyright notice. This software may not |
|
35 |
be provided or otherwise made available to, or used by, any |
|
36 |
other person. No title to or ownership of the software is |
|
37 |
hereby transferred. |
|
38 |
" |
|
39 |
||
40 |
||
41 |
! |
|
42 |
||
43 |
documentation |
|
44 |
" |
|
45 |
The TabListEditor allows you to create, modify or just inspect |
|
46 |
tab lists for tab headers or note books. |
|
47 |
||
48 |
[start with:] |
|
49 |
TabItemEditor open |
|
50 |
||
51 |
[see also:] |
|
52 |
TabItem |
|
53 |
TabView |
|
54 |
NoteBookView |
|
55 |
UIPainter |
|
56 |
||
57 |
[author:] |
|
58 |
Claus Atzkern, eXept Software AG |
|
749 | 59 |
Thomas Zwick, eXept Software AG |
739 | 60 |
" |
61 |
||
62 |
||
63 |
! ! |
|
64 |
||
65 |
!TabListEditor class methodsFor:'instance creation'! |
|
66 |
||
67 |
openModalOnTabList: aTabList |
|
68 |
"Open a TabListEditor modal on aTabList" |
|
69 |
"self openModalOnTabList: (Array with: (TabItem label: 'Tab Item 1'))" |
|
70 |
||
71 |
^self new openModalOnTabList: aTabList |
|
72 |
||
73 |
! ! |
|
74 |
||
75 |
!TabListEditor class methodsFor:'accessing'! |
|
76 |
||
77 |
resourceType |
|
78 |
"get the type of resource of the method generated by the TabListEditor" |
|
79 |
||
80 |
^#tabList |
|
81 |
||
82 |
||
83 |
||
84 |
||
85 |
||
86 |
||
87 |
! ! |
|
88 |
||
89 |
!TabListEditor class methodsFor:'aspects'! |
|
90 |
||
91 |
aspects |
|
92 |
"get the aspects for the attributes of the tab list components" |
|
93 |
||
94 |
^#( |
|
95 |
label |
|
96 |
translateLabel |
|
97 |
labelForegroundColor |
|
98 |
enabled |
|
99 |
editAgument |
|
1325 | 100 |
accessCharacterPosition |
101 |
shortcutKey |
|
1373 | 102 |
activeHelpKey |
103 |
||
104 |
majorKey |
|
105 |
minorKey |
|
106 |
createNewBuilder |
|
107 |
||
108 |
hasHorizontalScrollBar |
|
109 |
hasVerticalScrollBar |
|
110 |
miniScrollerHorizontal |
|
111 |
miniScrollerVertical |
|
739 | 112 |
) |
113 |
||
114 |
! ! |
|
115 |
||
116 |
!TabListEditor class methodsFor:'help specs'! |
|
117 |
||
118 |
helpSpec |
|
119 |
"This resource specification was automatically generated |
|
120 |
by the UIHelpTool of ST/X." |
|
121 |
||
122 |
"Do not manually edit this!! If it is corrupted, |
|
123 |
the UIHelpTool may not be able to read the specification." |
|
124 |
||
125 |
" |
|
126 |
UIHelpTool openOnClass:TabListEditor |
|
127 |
" |
|
128 |
||
129 |
<resource: #help> |
|
130 |
||
1845 | 131 |
^ super helpSpec addPairsFrom:#( |
739 | 132 |
|
133 |
#addTabItem |
|
134 |
'Adds a new tab item.' |
|
135 |
||
2346
d6fdeda319de
confusion between applicationProvidesLabel and translateLabel fixed.
Claus Gittinger <cg@exept.de>
parents:
2281
diff
changeset
|
136 |
#applicationProvidesLabel |
d6fdeda319de
confusion between applicationProvidesLabel and translateLabel fixed.
Claus Gittinger <cg@exept.de>
parents:
2281
diff
changeset
|
137 |
'If on, the label''s string is a selector returning a string or bitmap image, which is used as logo in the tab item.' |
d6fdeda319de
confusion between applicationProvidesLabel and translateLabel fixed.
Claus Gittinger <cg@exept.de>
parents:
2281
diff
changeset
|
138 |
|
1373 | 139 |
#autoHideScrollBars |
140 |
'ScrollBars should be made invisible dynamically, if there is nothing to scroll.' |
|
739 | 141 |
|
1845 | 142 |
#basicTab |
143 |
'Define the basic attributes.' |
|
144 |
||
739 | 145 |
#canSelect |
146 |
'Turns on/off whether the tab item is selectable.' |
|
147 |
||
1845 | 148 |
#canvasTab |
149 |
'Define an application, which is started if the tab is pressed the first time.' |
|
150 |
||
151 |
#color |
|
152 |
'Defines the foreground color of the label. The default color derives from the style sheet.' |
|
153 |
||
1373 | 154 |
#createNewBuilder |
155 |
'Create a new builder for the application; the application use its own aspects.' |
|
156 |
||
1845 | 157 |
#detailTab |
158 |
'Define the optional/specific attributes.' |
|
159 |
||
160 |
#detailsAccelerator |
|
161 |
'Key to be pressed to select the tab item from the keyboard (accelerator key).' |
|
162 |
||
163 |
#detailsAccessCharaterPosition |
|
164 |
'Index of the access character position of the textual label (optional).' |
|
165 |
||
166 |
#detailsArgument |
|
167 |
'An optional argument stored with the tab item.' |
|
739 | 168 |
|
169 |
#fileCreateAspectMethod |
|
170 |
'Creates the aspect method for the tab list.' |
|
171 |
||
172 |
#fileLoad |
|
173 |
'Opens a dialog for selecting and loading a tab list spec from a class.' |
|
174 |
||
175 |
#fileNew |
|
176 |
'Creates a new tab list.' |
|
177 |
||
178 |
#fileSave |
|
179 |
'Saves current tab list.' |
|
180 |
||
1373 | 181 |
#horizontalMiniScroller |
182 |
'Use a mini-scroller as horizontal scrollbar.' |
|
183 |
||
1845 | 184 |
#horizontalScroller |
185 |
'Enable horizontal scrollability.' |
|
1373 | 186 |
|
739 | 187 |
#label |
188 |
'Label of the tab item.' |
|
189 |
||
1845 | 190 |
#majorKey |
191 |
'Name of the class to be started (application if empty); or app-selector returning application instance.' |
|
1373 | 192 |
|
1845 | 193 |
#minorKey |
194 |
'Message sent to the class which returns the window specification (default: #windowSpec).' |
|
1373 | 195 |
|
739 | 196 |
#testPreview |
197 |
'Turns on/off preview of the tab list.' |
|
198 |
||
2346
d6fdeda319de
confusion between applicationProvidesLabel and translateLabel fixed.
Claus Gittinger <cg@exept.de>
parents:
2281
diff
changeset
|
199 |
#translateLabel |
d6fdeda319de
confusion between applicationProvidesLabel and translateLabel fixed.
Claus Gittinger <cg@exept.de>
parents:
2281
diff
changeset
|
200 |
'If on, the label is translated using the applications language resources.' |
d6fdeda319de
confusion between applicationProvidesLabel and translateLabel fixed.
Claus Gittinger <cg@exept.de>
parents:
2281
diff
changeset
|
201 |
|
1845 | 202 |
#verticalMiniScroller |
203 |
'Use a mini-scroller as vertical scrollbar.' |
|
204 |
||
205 |
#verticalScroller |
|
206 |
'Enable vertical scrollability.' |
|
207 |
||
739 | 208 |
) |
209 |
! ! |
|
210 |
||
211 |
!TabListEditor class methodsFor:'image specs'! |
|
212 |
||
213 |
newTabItemIcon |
|
3118
d0e78fb8d796
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3093
diff
changeset
|
214 |
<resource: #image> |
739 | 215 |
"This resource specification was automatically generated |
216 |
by the ImageEditor of ST/X." |
|
217 |
"Do not manually edit this!!!! If it is corrupted, |
|
218 |
the ImageEditor may not be able to read the specification." |
|
219 |
" |
|
3118
d0e78fb8d796
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3093
diff
changeset
|
220 |
ImageEditor openOnClass:self andSelector:#newTabItemIcon" |
d0e78fb8d796
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3093
diff
changeset
|
221 |
|
d0e78fb8d796
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3093
diff
changeset
|
222 |
^ Icon constantNamed:#'TabListEditor newTabItemIcon' |
d0e78fb8d796
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3093
diff
changeset
|
223 |
ifAbsentPut:[ |
d0e78fb8d796
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3093
diff
changeset
|
224 |
(Depth2Image new) |
d0e78fb8d796
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3093
diff
changeset
|
225 |
width:22; |
d0e78fb8d796
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3093
diff
changeset
|
226 |
height:22; |
d0e78fb8d796
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3093
diff
changeset
|
227 |
photometric:(#palette); |
d0e78fb8d796
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3093
diff
changeset
|
228 |
bitsPerSample:(#( 2 )); |
d0e78fb8d796
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3093
diff
changeset
|
229 |
samplesPerPixel:(1); |
d0e78fb8d796
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3093
diff
changeset
|
230 |
bits:(ByteArray |
d0e78fb8d796
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3093
diff
changeset
|
231 |
fromPackedString:'U@@@@EUPUEUUVEUPUF**+EUPUF**+EUPUF**+EUP@F**+@@@EV***UV@F*****+@F KNC*+NF(("H*+@F((BC +EF(("H*+@F(("C*+MF*****+@F"@ H*K@F"""(LK@F"" ("K@F"""(*K@F"" H*K@F*****+HK??????@@@@@@@@@'); |
d0e78fb8d796
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3093
diff
changeset
|
232 |
colorMapFromArray:#[ 0 0 0 255 255 255 170 170 170 127 127 127 ]; |
d0e78fb8d796
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3093
diff
changeset
|
233 |
mask:((ImageMask new) |
d0e78fb8d796
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3093
diff
changeset
|
234 |
width:22; |
d0e78fb8d796
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3093
diff
changeset
|
235 |
height:22; |
d0e78fb8d796
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3093
diff
changeset
|
236 |
bits:(ByteArray |
d0e78fb8d796
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3093
diff
changeset
|
237 |
fromPackedString:'G?<@G?<@G?<@G?<@G?<@???<???<???<???????<???<???<???<???????=???<???????<???????<???<???='); |
d0e78fb8d796
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3093
diff
changeset
|
238 |
yourself); |
d0e78fb8d796
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3093
diff
changeset
|
239 |
yourself |
d0e78fb8d796
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
3093
diff
changeset
|
240 |
] |
1431 | 241 |
! ! |
739 | 242 |
|
243 |
!TabListEditor class methodsFor:'interface specs'! |
|
244 |
||
1373 | 245 |
basicSpec |
739 | 246 |
"This resource specification was automatically generated |
247 |
by the UIPainter of ST/X." |
|
248 |
||
249 |
"Do not manually edit this!! If it is corrupted, |
|
250 |
the UIPainter may not be able to read the specification." |
|
251 |
||
252 |
" |
|
1373 | 253 |
UIPainter new openOnClass:TabListEditor andSelector:#basicSpec |
254 |
TabListEditor new openInterface:#basicSpec |
|
739 | 255 |
" |
256 |
||
257 |
<resource: #canvas> |
|
258 |
||
1183 | 259 |
^ |
1876 | 260 |
#(FullSpec |
261 |
name: basicSpec |
|
262 |
window: |
|
263 |
(WindowSpec |
|
264 |
label: 'Basic' |
|
265 |
name: 'Basic' |
|
266 |
min: (Point 10 10) |
|
267 |
max: (Point 1280 1024) |
|
2346
d6fdeda319de
confusion between applicationProvidesLabel and translateLabel fixed.
Claus Gittinger <cg@exept.de>
parents:
2281
diff
changeset
|
268 |
bounds: (Rectangle 0 0 429 240) |
1183 | 269 |
) |
1876 | 270 |
component: |
271 |
(SpecCollection |
|
272 |
collection: ( |
|
273 |
(LabelSpec |
|
274 |
label: 'Label:' |
|
275 |
name: 'labelLabel' |
|
276 |
layout: (AlignmentOrigin 98 0 26 0 1 0.5) |
|
277 |
translateLabel: true |
|
278 |
resizeForLabel: true |
|
1183 | 279 |
) |
1876 | 280 |
(InputFieldSpec |
281 |
name: 'label' |
|
282 |
layout: (LayoutFrame 100 0 15 0 -5 1.0 37 0) |
|
283 |
activeHelpKey: label |
|
284 |
tabable: true |
|
285 |
model: label |
|
286 |
group: inputGroup |
|
287 |
immediateAccept: true |
|
288 |
acceptOnReturn: false |
|
289 |
acceptOnTab: false |
|
290 |
acceptOnLostFocus: false |
|
291 |
acceptChannel: acceptChannel |
|
292 |
modifiedChannel: modifiedChannel |
|
293 |
acceptOnPointerLeave: false |
|
1325 | 294 |
) |
1876 | 295 |
(LabelSpec |
296 |
label: 'Accelerator:' |
|
297 |
name: 'shortcutKeyLabel' |
|
298 |
layout: (AlignmentOrigin 98 0 55 0 1 0.5) |
|
299 |
translateLabel: true |
|
300 |
resizeForLabel: true |
|
1325 | 301 |
) |
1876 | 302 |
(InputFieldSpec |
303 |
name: 'shortcutKey' |
|
304 |
layout: (LayoutFrame 100 0 44 0 -5 1.0 66 0) |
|
305 |
activeHelpKey: detailsAccelerator |
|
306 |
tabable: true |
|
307 |
model: shortcutKey |
|
308 |
group: inputGroup |
|
309 |
type: symbolOrNil |
|
310 |
immediateAccept: true |
|
311 |
acceptOnReturn: false |
|
312 |
acceptOnTab: false |
|
313 |
acceptOnLostFocus: false |
|
314 |
acceptChannel: acceptChannel |
|
315 |
modifiedChannel: modifiedChannel |
|
316 |
acceptOnPointerLeave: false |
|
1325 | 317 |
) |
1876 | 318 |
(LabelSpec |
319 |
label: 'Argument:' |
|
320 |
name: 'editAgumentLabel' |
|
321 |
layout: (AlignmentOrigin 98 0 84 0 1 0.5) |
|
322 |
translateLabel: true |
|
323 |
resizeForLabel: true |
|
1325 | 324 |
) |
1876 | 325 |
(InputFieldSpec |
326 |
name: 'editAgument' |
|
327 |
layout: (LayoutFrame 100 0 73 0 -5 1.0 95 0) |
|
328 |
activeHelpKey: detailsArgument |
|
329 |
tabable: true |
|
330 |
model: editAgument |
|
331 |
group: inputGroup |
|
332 |
immediateAccept: true |
|
333 |
acceptOnReturn: false |
|
334 |
acceptOnTab: false |
|
335 |
acceptOnLostFocus: false |
|
336 |
acceptChannel: acceptChannel |
|
337 |
modifiedChannel: modifiedChannel |
|
338 |
acceptOnPointerLeave: false |
|
1325 | 339 |
) |
1876 | 340 |
(LabelSpec |
341 |
label: 'Access Character Position:' |
|
342 |
name: 'accessCharacterPositionLabel' |
|
343 |
layout: (AlignmentOrigin 275 0 113 0 1 0.5) |
|
344 |
translateLabel: true |
|
345 |
resizeForLabel: true |
|
1325 | 346 |
) |
1876 | 347 |
(InputFieldSpec |
348 |
name: 'accessCharacterPosition' |
|
349 |
layout: (LayoutFrame 278 0 103 0 -5 1.0 125 0) |
|
350 |
activeHelpKey: detailsAccessCharaterPosition |
|
351 |
tabable: true |
|
352 |
model: accessCharacterPosition |
|
353 |
group: inputGroup |
|
354 |
type: number |
|
355 |
immediateAccept: true |
|
356 |
acceptOnReturn: false |
|
357 |
acceptOnTab: false |
|
358 |
acceptOnLostFocus: false |
|
359 |
acceptChannel: acceptChannel |
|
360 |
modifiedChannel: modifiedChannel |
|
361 |
acceptOnPointerLeave: false |
|
1183 | 362 |
) |
1876 | 363 |
(CheckBoxSpec |
2346
d6fdeda319de
confusion between applicationProvidesLabel and translateLabel fixed.
Claus Gittinger <cg@exept.de>
parents:
2281
diff
changeset
|
364 |
label: 'Translate Label ' |
1876 | 365 |
name: 'translateLabel' |
2346
d6fdeda319de
confusion between applicationProvidesLabel and translateLabel fixed.
Claus Gittinger <cg@exept.de>
parents:
2281
diff
changeset
|
366 |
layout: (LayoutFrame 96 0 135 0 308 0 161 0) |
d6fdeda319de
confusion between applicationProvidesLabel and translateLabel fixed.
Claus Gittinger <cg@exept.de>
parents:
2281
diff
changeset
|
367 |
activeHelpKey: translateLabel |
1876 | 368 |
tabable: true |
369 |
model: translateLabel |
|
370 |
translateLabel: true |
|
1183 | 371 |
) |
2346
d6fdeda319de
confusion between applicationProvidesLabel and translateLabel fixed.
Claus Gittinger <cg@exept.de>
parents:
2281
diff
changeset
|
372 |
(CheckBoxSpec |
d6fdeda319de
confusion between applicationProvidesLabel and translateLabel fixed.
Claus Gittinger <cg@exept.de>
parents:
2281
diff
changeset
|
373 |
label: 'Application Provides Label ' |
d6fdeda319de
confusion between applicationProvidesLabel and translateLabel fixed.
Claus Gittinger <cg@exept.de>
parents:
2281
diff
changeset
|
374 |
name: 'CheckBox1' |
d6fdeda319de
confusion between applicationProvidesLabel and translateLabel fixed.
Claus Gittinger <cg@exept.de>
parents:
2281
diff
changeset
|
375 |
layout: (LayoutFrame 96 0 161 0 308 0 187 0) |
d6fdeda319de
confusion between applicationProvidesLabel and translateLabel fixed.
Claus Gittinger <cg@exept.de>
parents:
2281
diff
changeset
|
376 |
activeHelpKey: applicationProvidesLabel |
d6fdeda319de
confusion between applicationProvidesLabel and translateLabel fixed.
Claus Gittinger <cg@exept.de>
parents:
2281
diff
changeset
|
377 |
tabable: true |
d6fdeda319de
confusion between applicationProvidesLabel and translateLabel fixed.
Claus Gittinger <cg@exept.de>
parents:
2281
diff
changeset
|
378 |
model: applicationProvidesLabel |
d6fdeda319de
confusion between applicationProvidesLabel and translateLabel fixed.
Claus Gittinger <cg@exept.de>
parents:
2281
diff
changeset
|
379 |
translateLabel: true |
d6fdeda319de
confusion between applicationProvidesLabel and translateLabel fixed.
Claus Gittinger <cg@exept.de>
parents:
2281
diff
changeset
|
380 |
) |
1876 | 381 |
(LabelSpec |
382 |
label: 'Help Key:' |
|
383 |
name: 'activeHelp' |
|
2346
d6fdeda319de
confusion between applicationProvidesLabel and translateLabel fixed.
Claus Gittinger <cg@exept.de>
parents:
2281
diff
changeset
|
384 |
layout: (AlignmentOrigin 98 0 203 0 1 0.5) |
1876 | 385 |
translateLabel: true |
386 |
resizeForLabel: true |
|
1373 | 387 |
) |
1876 | 388 |
(InputFieldSpec |
389 |
name: 'activeHelpKey' |
|
2346
d6fdeda319de
confusion between applicationProvidesLabel and translateLabel fixed.
Claus Gittinger <cg@exept.de>
parents:
2281
diff
changeset
|
390 |
layout: (LayoutFrame 100 0 192 0 -5 1.0 214 0) |
1876 | 391 |
activeHelpKey: label |
392 |
tabable: true |
|
393 |
model: activeHelpKey |
|
394 |
group: inputGroup |
|
395 |
type: symbolOrNil |
|
396 |
immediateAccept: true |
|
397 |
acceptOnReturn: false |
|
398 |
acceptOnTab: false |
|
399 |
acceptOnLostFocus: false |
|
400 |
acceptChannel: acceptChannel |
|
401 |
modifiedChannel: modifiedChannel |
|
402 |
acceptOnPointerLeave: false |
|
1373 | 403 |
) |
404 |
) |
|
405 |
||
406 |
) |
|
407 |
) |
|
408 |
! |
|
409 |
||
410 |
canvasSpec |
|
411 |
"This resource specification was automatically generated |
|
412 |
by the UIPainter of ST/X." |
|
413 |
||
414 |
"Do not manually edit this!! If it is corrupted, |
|
415 |
the UIPainter may not be able to read the specification." |
|
416 |
||
417 |
" |
|
418 |
UIPainter new openOnClass:TabListEditor andSelector:#canvasSpec |
|
419 |
TabListEditor new openInterface:#canvasSpec |
|
420 |
" |
|
421 |
||
422 |
<resource: #canvas> |
|
423 |
||
424 |
^ |
|
3663 | 425 |
#(FullSpec |
426 |
name: canvasSpec |
|
427 |
uuid: '8a7c55d6-761b-11e9-98ea-b8f6b1108e05' |
|
428 |
window: |
|
429 |
(WindowSpec |
|
430 |
label: 'Canvas' |
|
431 |
name: 'Canvas' |
|
432 |
uuid: '8a7c5964-761b-11e9-98ea-b8f6b1108e05' |
|
433 |
min: (Point 10 10) |
|
434 |
max: (Point 1280 1024) |
|
435 |
bounds: (Rectangle 0 0 383 220) |
|
436 |
) |
|
437 |
component: |
|
438 |
(SpecCollection |
|
439 |
collection: ( |
|
440 |
(LabelSpec |
|
441 |
label: 'Class / Major Key:' |
|
442 |
name: 'majorKeyLabel' |
|
443 |
layout: (AlignmentOrigin 160 0 26 0 1 0.5) |
|
444 |
activeHelpKey: majorKey |
|
445 |
uuid: '8a7cc2f0-761b-11e9-98ea-b8f6b1108e05' |
|
446 |
translateLabel: true |
|
447 |
resizeForLabel: true |
|
448 |
) |
|
449 |
(InputFieldSpec |
|
450 |
name: 'majorKeyField' |
|
451 |
layout: (LayoutFrame 161 0 15 0 -5 1.0 37 0) |
|
452 |
activeHelpKey: majorKey |
|
453 |
uuid: '8a7cc82c-761b-11e9-98ea-b8f6b1108e05' |
|
454 |
tabable: true |
|
455 |
model: majorKey |
|
456 |
group: inputGroup |
|
457 |
type: symbolOrNil |
|
458 |
immediateAccept: true |
|
459 |
acceptOnReturn: false |
|
460 |
acceptOnTab: false |
|
461 |
acceptOnLostFocus: false |
|
462 |
modifiedChannel: modifiedChannel |
|
463 |
acceptOnPointerLeave: false |
|
464 |
) |
|
465 |
(LabelSpec |
|
466 |
label: 'Selector / Minor Key:' |
|
467 |
name: 'minorKeyLabel' |
|
468 |
layout: (AlignmentOrigin 160 0 55 0 1 0.5) |
|
469 |
uuid: '8a7ccda4-761b-11e9-98ea-b8f6b1108e05' |
|
470 |
translateLabel: true |
|
471 |
resizeForLabel: true |
|
472 |
) |
|
473 |
(InputFieldSpec |
|
474 |
name: 'minorKeyField' |
|
475 |
layout: (LayoutFrame 161 0 44 0 -5 1.0 66 0) |
|
476 |
activeHelpKey: majorKey |
|
477 |
uuid: '8a7ccf7a-761b-11e9-98ea-b8f6b1108e05' |
|
478 |
tabable: true |
|
479 |
model: minorKey |
|
480 |
group: inputGroup |
|
481 |
type: symbolOrNil |
|
482 |
immediateAccept: true |
|
483 |
acceptOnReturn: false |
|
484 |
acceptOnTab: false |
|
485 |
acceptOnLostFocus: false |
|
486 |
modifiedChannel: modifiedChannel |
|
487 |
acceptOnPointerLeave: false |
|
488 |
) |
|
489 |
(FramedBoxSpec |
|
490 |
label: 'Scroll Bars' |
|
491 |
name: 'FramedBox' |
|
492 |
layout: (LayoutFrame 0 0.0 119 0.0 0 1.0 218 0) |
|
493 |
uuid: '8a7cd1be-761b-11e9-98ea-b8f6b1108e05' |
|
494 |
labelPosition: topLeft |
|
495 |
translateLabel: true |
|
496 |
component: |
|
497 |
(SpecCollection |
|
498 |
collection: ( |
|
499 |
(HorizontalPanelViewSpec |
|
500 |
name: 'HorizontalPanel1' |
|
501 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
502 |
uuid: '8a7cd42a-761b-11e9-98ea-b8f6b1108e05' |
|
503 |
horizontalLayout: fitSpace |
|
504 |
verticalLayout: fitSpace |
|
505 |
horizontalSpace: 3 |
|
506 |
verticalSpace: 3 |
|
507 |
component: |
|
508 |
(SpecCollection |
|
509 |
collection: ( |
|
510 |
(ViewSpec |
|
511 |
name: 'Box1' |
|
512 |
uuid: '8a7cd768-761b-11e9-98ea-b8f6b1108e05' |
|
513 |
component: |
|
514 |
(SpecCollection |
|
515 |
collection: ( |
|
516 |
(CheckBoxSpec |
|
517 |
label: 'Vertical' |
|
518 |
name: 'verticalScrollBarCheckBox' |
|
519 |
layout: (LayoutFrame 0 0.0 3 0 0 1.0 27 0) |
|
520 |
activeHelpKey: verticalScroller |
|
521 |
uuid: '8a7cd8ee-761b-11e9-98ea-b8f6b1108e05' |
|
522 |
tabable: true |
|
523 |
model: hasVerticalScrollBar |
|
524 |
translateLabel: true |
|
1373 | 525 |
) |
3663 | 526 |
(CheckBoxSpec |
527 |
label: 'Mini' |
|
528 |
name: 'miniScrollerVerticalCheckBox' |
|
529 |
layout: (LayoutFrame 0 0.0 32 0 0 1.0 56 0) |
|
530 |
activeHelpKey: verticalMiniScroller |
|
531 |
uuid: '8a7cdb82-761b-11e9-98ea-b8f6b1108e05' |
|
532 |
tabable: true |
|
533 |
model: miniScrollerVertical |
|
534 |
translateLabel: true |
|
535 |
) |
|
536 |
) |
|
537 |
||
538 |
) |
|
539 |
useDefaultExtent: true |
|
540 |
) |
|
541 |
(ViewSpec |
|
542 |
name: 'Box2' |
|
543 |
uuid: '8a7cdda8-761b-11e9-98ea-b8f6b1108e05' |
|
544 |
component: |
|
545 |
(SpecCollection |
|
546 |
collection: ( |
|
547 |
(CheckBoxSpec |
|
548 |
label: 'Horizontal' |
|
549 |
name: 'horizontalScrollBarCheckBox' |
|
550 |
layout: (LayoutFrame 0 0.0 3 0 0 1.0 27 0) |
|
551 |
activeHelpKey: horizontalScroller |
|
552 |
uuid: '8a7cdede-761b-11e9-98ea-b8f6b1108e05' |
|
553 |
tabable: true |
|
554 |
model: hasHorizontalScrollBar |
|
555 |
translateLabel: true |
|
556 |
) |
|
557 |
(CheckBoxSpec |
|
558 |
label: 'Mini' |
|
559 |
name: 'miniScrollerHorizontalCheckBox' |
|
560 |
layout: (LayoutFrame 0 0.0 32 0 0 1.0 56 0) |
|
561 |
activeHelpKey: horizontalMiniScroller |
|
562 |
uuid: '8a7ce064-761b-11e9-98ea-b8f6b1108e05' |
|
563 |
tabable: true |
|
564 |
model: miniScrollerHorizontal |
|
565 |
translateLabel: true |
|
1373 | 566 |
) |
3663 | 567 |
) |
568 |
||
569 |
) |
|
570 |
extent: (Point 111 53) |
|
571 |
) |
|
572 |
(ViewSpec |
|
573 |
name: 'Box3' |
|
574 |
uuid: '8a7ce1fe-761b-11e9-98ea-b8f6b1108e05' |
|
575 |
component: |
|
576 |
(SpecCollection |
|
577 |
collection: ( |
|
578 |
(LabelSpec |
|
579 |
label: 'Auto Hide:' |
|
580 |
name: 'Label1' |
|
581 |
layout: (LayoutFrame 0 0.0 6 0 0 1.0 23 0) |
|
582 |
uuid: '8a7ce334-761b-11e9-98ea-b8f6b1108e05' |
|
583 |
translateLabel: true |
|
584 |
resizeForLabel: true |
|
585 |
adjust: left |
|
1373 | 586 |
) |
3663 | 587 |
(PopUpListSpec |
588 |
label: 'Default' |
|
589 |
name: 'PopUpList1' |
|
590 |
layout: (LayoutFrame 0 0.0 32 0 0 1.0 54 0) |
|
591 |
activeHelpKey: autoHideScrollBars |
|
592 |
uuid: '8a7ce4e2-761b-11e9-98ea-b8f6b1108e05' |
|
593 |
translateLabel: true |
|
594 |
tabable: true |
|
595 |
model: autoHideScrollBars |
|
596 |
menu: |
|
597 |
(ImmutableArray |
|
598 |
Default On |
|
599 |
Off |
|
600 |
) |
|
601 |
useIndex: true |
|
602 |
) |
|
603 |
) |
|
604 |
||
605 |
) |
|
606 |
extent: (Point 112 53) |
|
1373 | 607 |
) |
3663 | 608 |
) |
609 |
||
610 |
) |
|
1373 | 611 |
) |
3663 | 612 |
) |
613 |
||
614 |
) |
|
1373 | 615 |
) |
3663 | 616 |
(CheckBoxSpec |
617 |
label: 'Create New Builder' |
|
618 |
name: 'createNewBuilder' |
|
619 |
layout: (Point 161 75) |
|
620 |
activeHelpKey: createNewBuilder |
|
621 |
uuid: '8a7ce8de-761b-11e9-98ea-b8f6b1108e05' |
|
622 |
model: createNewBuilder |
|
623 |
translateLabel: true |
|
624 |
) |
|
625 |
) |
|
626 |
||
627 |
) |
|
628 |
) |
|
1373 | 629 |
! |
630 |
||
631 |
detailSpec |
|
632 |
"This resource specification was automatically generated |
|
633 |
by the UIPainter of ST/X." |
|
634 |
||
635 |
"Do not manually edit this!! If it is corrupted, |
|
636 |
the UIPainter may not be able to read the specification." |
|
637 |
||
638 |
" |
|
639 |
UIPainter new openOnClass:TabListEditor andSelector:#detailSpec |
|
640 |
TabListEditor new openInterface:#detailSpec |
|
641 |
" |
|
642 |
||
643 |
<resource: #canvas> |
|
644 |
||
645 |
^ |
|
1876 | 646 |
#(FullSpec |
647 |
name: detailSpec |
|
648 |
window: |
|
649 |
(WindowSpec |
|
650 |
label: 'Details' |
|
651 |
name: 'Details' |
|
652 |
min: (Point 10 10) |
|
653 |
max: (Point 1280 1024) |
|
654 |
bounds: (Rectangle 0 0 358 107) |
|
1373 | 655 |
) |
1876 | 656 |
component: |
657 |
(SpecCollection |
|
658 |
collection: ( |
|
659 |
(CheckBoxSpec |
|
660 |
label: 'Can Select' |
|
661 |
name: 'enabled' |
|
662 |
layout: (Point 46 14) |
|
663 |
activeHelpKey: canSelect |
|
664 |
tabable: true |
|
665 |
model: enabled |
|
666 |
translateLabel: true |
|
1183 | 667 |
) |
1876 | 668 |
(LabelSpec |
669 |
label: 'Color:' |
|
670 |
name: 'ForegroundLabel' |
|
671 |
layout: (AlignmentOrigin 46 0 62 0 1 0.5) |
|
672 |
translateLabel: true |
|
673 |
resizeForLabel: true |
|
674 |
adjust: right |
|
1183 | 675 |
) |
1876 | 676 |
(ColorMenuSpec |
677 |
name: 'ForegroundColorMenu' |
|
678 |
layout: (LayoutFrame 48 0 50 0 -10 1.0 72 0) |
|
679 |
activeHelpKey: color |
|
680 |
model: labelForegroundColor |
|
681 |
labelsAreColored: false |
|
1183 | 682 |
) |
683 |
) |
|
684 |
||
685 |
) |
|
739 | 686 |
) |
687 |
! |
|
688 |
||
689 |
windowSpec |
|
690 |
"This resource specification was automatically generated |
|
691 |
by the UIPainter of ST/X." |
|
692 |
||
693 |
"Do not manually edit this!! If it is corrupted, |
|
694 |
the UIPainter may not be able to read the specification." |
|
695 |
||
696 |
" |
|
697 |
UIPainter new openOnClass:TabListEditor andSelector:#windowSpec |
|
698 |
TabListEditor new openInterface:#windowSpec |
|
699 |
TabListEditor open |
|
700 |
" |
|
701 |
||
702 |
<resource: #canvas> |
|
703 |
||
1183 | 704 |
^ |
3663 | 705 |
#(FullSpec |
706 |
name: windowSpec |
|
707 |
uuid: 'b2e02714-761b-11e9-98ea-b8f6b1108e05' |
|
708 |
window: |
|
709 |
(WindowSpec |
|
710 |
label: 'Tab List Editor' |
|
711 |
name: 'Tab List Editor' |
|
712 |
uuid: 'b2e02a02-761b-11e9-98ea-b8f6b1108e05' |
|
713 |
min: (Point 440 280) |
|
714 |
bounds: (Rectangle 0 0 536 369) |
|
715 |
menu: menu |
|
716 |
) |
|
717 |
component: |
|
718 |
(SpecCollection |
|
719 |
collection: ( |
|
720 |
(MenuPanelSpec |
|
721 |
name: 'menuToolbarView' |
|
722 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 34 0) |
|
723 |
uuid: 'b2e02c78-761b-11e9-98ea-b8f6b1108e05' |
|
724 |
menu: menuToolbar |
|
725 |
) |
|
726 |
(VariableHorizontalPanelSpec |
|
727 |
name: 'VariablePanel' |
|
728 |
layout: (LayoutFrame 0 0.0 36 0.0 0 1.0 -26 1.0) |
|
729 |
uuid: 'b2e02f48-761b-11e9-98ea-b8f6b1108e05' |
|
730 |
component: |
|
731 |
(SpecCollection |
|
732 |
collection: ( |
|
733 |
(SelectionInListModelViewSpec |
|
734 |
name: 'ListOfLabels' |
|
735 |
uuid: 'b2e031fa-761b-11e9-98ea-b8f6b1108e05' |
|
736 |
tabable: true |
|
737 |
model: selectionHolder |
|
738 |
menu: menuEdit |
|
739 |
hasHorizontalScrollBar: true |
|
740 |
hasVerticalScrollBar: true |
|
741 |
miniScrollerHorizontal: true |
|
742 |
listModel: listOfTabs |
|
743 |
highlightMode: line |
|
744 |
selectConditionSelector: askForItemModification |
|
745 |
) |
|
746 |
(ViewSpec |
|
747 |
name: 'SpecView' |
|
748 |
uuid: 'b2e034d4-761b-11e9-98ea-b8f6b1108e05' |
|
749 |
level: -1 |
|
750 |
component: |
|
751 |
(SpecCollection |
|
752 |
collection: ( |
|
753 |
(NoteBookViewSpec |
|
754 |
name: 'NoteBook' |
|
755 |
layout: (LayoutFrame 1 0.0 0 0.0 0 1.0 -32 1.0) |
|
756 |
uuid: 'b2e03600-761b-11e9-98ea-b8f6b1108e05' |
|
757 |
enableChannel: hasSelectionHolder |
|
758 |
tabable: true |
|
759 |
model: noteBookModel |
|
760 |
menu: noteBookTabList |
|
761 |
useIndex: true |
|
762 |
translateLabel: true |
|
763 |
keepCanvasAlive: true |
|
764 |
) |
|
765 |
(UISubSpecification |
|
766 |
name: 'subSpec' |
|
767 |
layout: (LayoutFrame 2 0.0 -32 1 -2 1.0 0 1) |
|
768 |
uuid: 'b2e039ac-761b-11e9-98ea-b8f6b1108e05' |
|
769 |
majorKey: ToolApplicationModel |
|
770 |
minorKey: windowSpecForCommit |
|
771 |
) |
|
772 |
(NoteBookViewSpec |
|
773 |
name: 'TestNoteBook' |
|
774 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
775 |
uuid: 'b2e03b32-761b-11e9-98ea-b8f6b1108e05' |
|
776 |
visibilityChannel: testMode |
|
777 |
tabable: true |
|
778 |
menu: testItemList |
|
779 |
useIndex: true |
|
780 |
translateLabel: true |
|
781 |
) |
|
1373 | 782 |
) |
3663 | 783 |
|
784 |
) |
|
1183 | 785 |
) |
3663 | 786 |
) |
787 |
||
788 |
) |
|
789 |
handles: (Any 0.23999999999999999 1.0) |
|
1183 | 790 |
) |
3663 | 791 |
(UISubSpecification |
792 |
name: 'infoBarSubSpec' |
|
793 |
layout: (LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) |
|
794 |
uuid: 'b2e03d44-761b-11e9-98ea-b8f6b1108e05' |
|
795 |
majorKey: ToolApplicationModel |
|
796 |
minorKey: windowSpecForInfoBar |
|
797 |
) |
|
798 |
) |
|
799 |
||
800 |
) |
|
801 |
) |
|
739 | 802 |
! ! |
803 |
||
1373 | 804 |
!TabListEditor class methodsFor:'list specs'! |
805 |
||
806 |
noteBookTabList |
|
807 |
"This resource specification was automatically generated |
|
808 |
by the TabListEditor of ST/X." |
|
809 |
||
810 |
"Do not manually edit this!! If it is corrupted, |
|
811 |
the TabListEditor may not be able to read the specification." |
|
812 |
||
813 |
" |
|
814 |
TabListEditor new openOnClass:TabListEditor andSelector:#noteBookTabList |
|
815 |
" |
|
816 |
||
817 |
<resource: #tabList> |
|
818 |
||
819 |
^ #( |
|
820 |
#(#TabItem |
|
821 |
#label: 'Basic' |
|
822 |
#activeHelpKey: #basicTab |
|
823 |
#minorKey: #basicSpec |
|
824 |
) |
|
825 |
#(#TabItem |
|
826 |
#label: 'Details' |
|
827 |
#activeHelpKey: #detailTab |
|
828 |
#minorKey: #detailSpec |
|
829 |
) |
|
830 |
#(#TabItem |
|
831 |
#label: 'Canvas' |
|
832 |
#activeHelpKey: #canvasTab |
|
833 |
#minorKey: #canvasSpec |
|
834 |
) |
|
835 |
) |
|
836 |
||
837 |
collect:[:aTab| TabItem new fromLiteralArrayEncoding:aTab ] |
|
838 |
! ! |
|
839 |
||
739 | 840 |
!TabListEditor class methodsFor:'menu specs'! |
841 |
||
842 |
menu |
|
843 |
"This resource specification was automatically generated |
|
844 |
by the MenuEditor of ST/X." |
|
845 |
||
846 |
"Do not manually edit this!! If it is corrupted, |
|
847 |
the MenuEditor may not be able to read the specification." |
|
848 |
||
3663 | 849 |
|
739 | 850 |
" |
851 |
MenuEditor new openOnClass:TabListEditor andSelector:#menu |
|
852 |
(Menu new fromLiteralArrayEncoding:(TabListEditor menu)) startUp |
|
853 |
" |
|
854 |
||
855 |
<resource: #menu> |
|
856 |
||
3663 | 857 |
^ |
858 |
#(Menu |
|
859 |
( |
|
860 |
(MenuItem |
|
861 |
activeHelpKey: file |
|
862 |
label: 'File' |
|
863 |
submenu: |
|
864 |
(Menu |
|
865 |
( |
|
866 |
(MenuItem |
|
867 |
activeHelpKey: fileNew |
|
868 |
label: 'New' |
|
869 |
itemValue: doNew |
|
870 |
) |
|
871 |
(MenuItem |
|
872 |
label: '-' |
|
873 |
) |
|
874 |
(MenuItem |
|
875 |
activeHelpKey: fileLoad |
|
876 |
label: 'Load...' |
|
877 |
itemValue: doLoad |
|
878 |
) |
|
879 |
(MenuItem |
|
880 |
label: '-' |
|
739 | 881 |
) |
3663 | 882 |
(MenuItem |
883 |
activeHelpKey: fileSave |
|
884 |
label: 'Save' |
|
885 |
itemValue: doSave |
|
886 |
) |
|
887 |
(MenuItem |
|
888 |
activeHelpKey: fileSave |
|
889 |
label: 'Save As...' |
|
890 |
itemValue: doSaveAs |
|
891 |
) |
|
892 |
(MenuItem |
|
893 |
label: '-' |
|
894 |
) |
|
895 |
(MenuItem |
|
896 |
activeHelpKey: fileBrowseClass |
|
897 |
label: 'Browse Class' |
|
898 |
itemValue: doBrowseClass |
|
899 |
) |
|
900 |
(MenuItem |
|
901 |
label: '-' |
|
902 |
) |
|
903 |
(MenuItem |
|
904 |
activeHelpKey: fileExit |
|
905 |
label: 'Exit' |
|
906 |
itemValue: closeRequest |
|
907 |
) |
|
908 |
) |
|
909 |
nil |
|
910 |
nil |
|
739 | 911 |
) |
3663 | 912 |
) |
913 |
(MenuItem |
|
914 |
activeHelpKey: edit |
|
915 |
label: 'Edit' |
|
916 |
submenuChannel: menuEdit |
|
917 |
) |
|
918 |
(MenuItem |
|
919 |
activeHelpKey: add |
|
920 |
label: 'Add' |
|
921 |
submenu: |
|
922 |
(Menu |
|
923 |
( |
|
924 |
(MenuItem |
|
925 |
activeHelpKey: addTabItem |
|
926 |
label: 'Tab Item' |
|
927 |
itemValue: doCreate |
|
928 |
labelImage: (ResourceRetriever nil newTabItemIcon 'Tab Item') |
|
739 | 929 |
) |
3663 | 930 |
) |
931 |
nil |
|
932 |
nil |
|
739 | 933 |
) |
3663 | 934 |
) |
935 |
(MenuItem |
|
936 |
activeHelpKey: add |
|
937 |
label: 'Generate' |
|
938 |
submenu: |
|
939 |
(Menu |
|
940 |
( |
|
941 |
(MenuItem |
|
942 |
activeHelpKey: fileCreateAspectMethod |
|
943 |
enabled: hasClassAndSelector |
|
944 |
label: 'Aspect Method' |
|
945 |
itemValue: doGenerateAspectMethod |
|
739 | 946 |
) |
3663 | 947 |
) |
948 |
nil |
|
949 |
nil |
|
739 | 950 |
) |
3663 | 951 |
) |
952 |
(MenuItem |
|
953 |
activeHelpKey: test |
|
954 |
label: 'Test' |
|
955 |
submenu: |
|
956 |
(Menu |
|
957 |
( |
|
958 |
(MenuItem |
|
959 |
activeHelpKey: testPreview |
|
960 |
enabled: canToggleTestMode |
|
961 |
label: 'Preview' |
|
962 |
indication: testMode |
|
739 | 963 |
) |
3663 | 964 |
) |
965 |
nil |
|
966 |
nil |
|
749 | 967 |
) |
3663 | 968 |
) |
969 |
(MenuItem |
|
970 |
activeHelpKey: history |
|
971 |
label: 'History' |
|
972 |
submenuChannel: menuHistory |
|
973 |
) |
|
974 |
(MenuItem |
|
975 |
activeHelpKey: help |
|
976 |
label: 'MENU_Help' |
|
977 |
startGroup: conditionalRight |
|
978 |
submenuChannel: menuHelp |
|
979 |
) |
|
980 |
) |
|
981 |
nil |
|
982 |
nil |
|
739 | 983 |
) |
984 |
! |
|
985 |
||
986 |
menuEdit |
|
987 |
"This resource specification was automatically generated |
|
988 |
by the MenuEditor of ST/X." |
|
989 |
||
990 |
"Do not manually edit this!! If it is corrupted, |
|
991 |
the MenuEditor may not be able to read the specification." |
|
992 |
||
993 |
" |
|
994 |
MenuEditor new openOnClass:TabListEditor andSelector:#menuEdit |
|
995 |
(Menu new fromLiteralArrayEncoding:(TabListEditor menuEdit)) startUp |
|
996 |
" |
|
997 |
||
998 |
<resource: #menu> |
|
999 |
||
1374 | 1000 |
^ |
1001 |
#(#Menu |
|
1002 |
#( |
|
1003 |
#(#MenuItem |
|
1004 |
#label: 'Cut' |
|
1005 |
#value: #doCut |
|
1006 |
#activeHelpKey: #editCut |
|
1007 |
#enabled: #hasSelectionHolder |
|
1008 |
) |
|
1009 |
#(#MenuItem |
|
1010 |
#label: 'Copy' |
|
1011 |
#value: #doCopy |
|
1012 |
#activeHelpKey: #editCopy |
|
1013 |
#enabled: #hasSelectionHolder |
|
1014 |
) |
|
1015 |
#(#MenuItem |
|
1016 |
#label: 'Paste' |
|
1017 |
#value: #doPaste |
|
1018 |
#activeHelpKey: #editPaste |
|
2383
e76cc686a293
rename #valueOfCanbPate to #canPasteHolder
Stefan Vogel <sv@exept.de>
parents:
2346
diff
changeset
|
1019 |
#enabled: #canPasteHolder |
1374 | 1020 |
) |
1021 |
#(#MenuItem |
|
1022 |
#label: 'Delete' |
|
1023 |
#value: #doDelete |
|
1024 |
#activeHelpKey: #editPaste |
|
1025 |
#enabled: #hasSelectionHolder |
|
1026 |
) |
|
1027 |
#(#MenuItem |
|
1028 |
#label: '-' |
|
1029 |
) |
|
1030 |
#(#MenuItem |
|
1031 |
#label: 'Move Up' |
|
1032 |
#value: #doMoveTabUpOrDown: |
|
1033 |
#activeHelpKey: #editMoveUp |
|
1034 |
#enabled: #canMoveTabItemUpOrDown |
|
1035 |
#argument: #up |
|
1036 |
#labelImage: #(#ResourceRetriever #Icon #upIcon 'Move Up') |
|
1037 |
) |
|
1038 |
#(#MenuItem |
|
1039 |
#label: 'Move Down' |
|
1040 |
#value: #doMoveTabUpOrDown: |
|
1041 |
#activeHelpKey: #editMoveDown |
|
1042 |
#enabled: #canMoveTabItemUpOrDown |
|
1043 |
#argument: #down |
|
1044 |
#labelImage: #(#ResourceRetriever #Icon #downIcon 'Move Down') |
|
1045 |
) |
|
1046 |
#(#MenuItem |
|
1047 |
#label: '-' |
|
1048 |
#isVisible: #hiddenAccelerator |
|
1049 |
) |
|
1050 |
#(#MenuItem |
|
1051 |
#label: 'Accept' |
|
1052 |
#translateLabel: true |
|
1053 |
#isVisible: #hiddenAccelerator |
|
1054 |
#value: #accept |
|
2432 | 1055 |
#enabled: #enablingCommitButtonsHolder |
1374 | 1056 |
) |
1057 |
) |
|
1058 |
nil |
|
1059 |
nil |
|
739 | 1060 |
) |
1061 |
! |
|
1062 |
||
1063 |
menuToolbar |
|
1064 |
"This resource specification was automatically generated |
|
1065 |
by the MenuEditor of ST/X." |
|
1066 |
||
1067 |
"Do not manually edit this!! If it is corrupted, |
|
1068 |
the MenuEditor may not be able to read the specification." |
|
1069 |
||
1070 |
" |
|
1071 |
MenuEditor new openOnClass:TabListEditor andSelector:#menuToolbar |
|
1072 |
(Menu new fromLiteralArrayEncoding:(TabListEditor menuToolbar)) startUp |
|
1073 |
" |
|
1074 |
||
1075 |
<resource: #menu> |
|
1076 |
||
1373 | 1077 |
^ |
1909 | 1078 |
#(Menu |
1079 |
( |
|
1080 |
(MenuItem |
|
1081 |
activeHelpKey: fileNew |
|
1082 |
label: 'New' |
|
1083 |
itemValue: doNew |
|
1084 |
translateLabel: true |
|
1085 |
isButton: true |
|
1086 |
labelImage: (ResourceRetriever ToolbarIconLibrary new22x22Icon) |
|
1373 | 1087 |
) |
1909 | 1088 |
(MenuItem |
1089 |
activeHelpKey: fileLoad |
|
1090 |
label: 'Load' |
|
1091 |
itemValue: doLoad |
|
1092 |
translateLabel: true |
|
1093 |
isButton: true |
|
1094 |
labelImage: (ResourceRetriever ToolbarIconLibrary loadFromMethodIcon) |
|
1373 | 1095 |
) |
1909 | 1096 |
(MenuItem |
1097 |
activeHelpKey: fileSave |
|
1098 |
label: 'Save' |
|
1099 |
itemValue: doSave |
|
1100 |
translateLabel: true |
|
1101 |
isButton: true |
|
1102 |
labelImage: (ResourceRetriever ToolbarIconLibrary saveAsMethodIcon) |
|
1373 | 1103 |
) |
1909 | 1104 |
(MenuItem |
1105 |
label: '-' |
|
1373 | 1106 |
) |
1909 | 1107 |
(MenuItem |
1108 |
activeHelpKey: editCut |
|
1109 |
enabled: hasSelectionHolder |
|
1110 |
label: 'Cut' |
|
1111 |
itemValue: doCut |
|
1112 |
translateLabel: true |
|
1113 |
isButton: true |
|
1114 |
labelImage: (ResourceRetriever ToolbarIconLibrary cutWidgetIcon) |
|
1373 | 1115 |
) |
1909 | 1116 |
(MenuItem |
1117 |
activeHelpKey: editCopy |
|
1118 |
enabled: hasSelectionHolder |
|
1119 |
label: 'Copy' |
|
1120 |
itemValue: doCopy |
|
1121 |
translateLabel: true |
|
1122 |
isButton: true |
|
1123 |
labelImage: (ResourceRetriever ToolbarIconLibrary copyWidgetIcon) |
|
1373 | 1124 |
) |
1909 | 1125 |
(MenuItem |
1126 |
activeHelpKey: editPaste |
|
2383
e76cc686a293
rename #valueOfCanbPate to #canPasteHolder
Stefan Vogel <sv@exept.de>
parents:
2346
diff
changeset
|
1127 |
enabled: canPasteHolder |
1909 | 1128 |
label: 'Paste' |
1129 |
itemValue: doPaste |
|
1130 |
translateLabel: true |
|
1131 |
isButton: true |
|
1132 |
labelImage: (ResourceRetriever ToolbarIconLibrary pasteWidgetIcon) |
|
1373 | 1133 |
) |
1909 | 1134 |
(MenuItem |
1135 |
activeHelpKey: editDelete |
|
1136 |
enabled: hasSelectionHolder |
|
1137 |
label: 'Delete' |
|
1138 |
itemValue: doDelete |
|
1139 |
translateLabel: true |
|
1140 |
isButton: true |
|
1141 |
isVisible: false |
|
1142 |
labelImage: (ResourceRetriever ToolbarIconLibrary delete22x22Icon) |
|
1373 | 1143 |
) |
1909 | 1144 |
(MenuItem |
1145 |
label: '-' |
|
1373 | 1146 |
) |
1909 | 1147 |
(MenuItem |
1148 |
activeHelpKey: addTabItem |
|
1149 |
label: 'Add Tab Item' |
|
1150 |
itemValue: doCreate |
|
1151 |
translateLabel: true |
|
1152 |
isButton: true |
|
1153 |
labelImage: (ResourceRetriever nil newTabItemIcon) |
|
1373 | 1154 |
) |
1909 | 1155 |
(MenuItem |
1156 |
label: '' |
|
1373 | 1157 |
) |
1909 | 1158 |
(MenuItem |
1159 |
activeHelpKey: editMoveUp |
|
1160 |
enabled: canMoveTabItemUpOrDown |
|
1161 |
label: 'Move Tab Up' |
|
1162 |
itemValue: doMoveTabUpOrDown: |
|
1163 |
translateLabel: true |
|
1164 |
isButton: true |
|
1165 |
startGroup: right |
|
1166 |
labelImage: (ResourceRetriever XPToolbarIconLibrary up22x22Icon) |
|
1167 |
argument: up |
|
1373 | 1168 |
) |
1909 | 1169 |
(MenuItem |
1170 |
activeHelpKey: editMoveDown |
|
1171 |
enabled: canMoveTabItemUpOrDown |
|
1172 |
label: 'Move Tab Down' |
|
1173 |
itemValue: doMoveTabUpOrDown: |
|
1174 |
translateLabel: true |
|
1175 |
isButton: true |
|
1176 |
startGroup: right |
|
1177 |
labelImage: (ResourceRetriever XPToolbarIconLibrary down22x22Icon) |
|
1178 |
argument: down |
|
1373 | 1179 |
) |
1180 |
) |
|
1181 |
nil |
|
1182 |
nil |
|
739 | 1183 |
) |
1184 |
! ! |
|
1185 |
||
1186 |
!TabListEditor methodsFor:'aspects'! |
|
1187 |
||
1373 | 1188 |
autoHideScrollBars |
1189 |
|holder| |
|
1190 |
||
1191 |
(holder := builder bindingAt:#autoHideScrollBars) isNil ifTrue:[ |
|
1192 |
builder aspectAt:#autoHideScrollBars put:(holder := 1 asValue). |
|
1193 |
holder addDependent: self |
|
1194 |
]. |
|
1195 |
^ holder. |
|
1196 |
! |
|
1197 |
||
739 | 1198 |
canMoveTabItemUpOrDown |
1373 | 1199 |
^ builder booleanValueAspectFor:#canMoveTabItemUpOrDown |
1200 |
! |
|
1201 |
||
1374 | 1202 |
hasSelectionHolder |
1203 |
^ builder booleanValueAspectFor:#hasSelectionHolder |
|
1204 |
! |
|
1205 |
||
1206 |
hiddenAccelerator |
|
1207 |
"used to set menu entries with an accelerator not visible to the operator |
|
1208 |
" |
|
1209 |
^ false |
|
1210 |
! |
|
1211 |
||
1326 | 1212 |
inputGroup |
1213 |
||
1214 |
|holder| |
|
1215 |
||
1216 |
(holder := builder bindingAt:#inputGroup) isNil ifTrue:[ |
|
1217 |
builder aspectAt:#inputGroup put:(holder := EnterFieldGroup new) |
|
1218 |
]. |
|
1219 |
^ holder. |
|
1220 |
||
1221 |
||
1222 |
! |
|
1223 |
||
1373 | 1224 |
listOfTabs |
1225 |
^ listOfTabs |
|
1226 |
! |
|
1227 |
||
1228 |
noteBookModel |
|
1229 |
|holder| |
|
1230 |
||
1231 |
(holder := builder bindingAt:#noteBookModel) isNil ifTrue:[ |
|
1232 |
holder := 0 asValue. |
|
1233 |
builder aspectAt:#noteBookModel put:holder. |
|
1234 |
]. |
|
1235 |
^ holder. |
|
1236 |
! |
|
1237 |
||
1238 |
noteBookTabList |
|
1239 |
"Generated by the TabListEditor" |
|
1240 |
||
1241 |
|list| |
|
1242 |
||
1243 |
(list := builder bindingAt:#noteBookTabList) isNil ifTrue:[ |
|
1244 |
builder aspectAt:#noteBookTabList put:(list := self class noteBookTabList). |
|
1245 |
]. |
|
1246 |
^ list |
|
739 | 1247 |
! |
1248 |
||
1249 |
selectionHolder |
|
1250 |
"holder which keeps the current selection |
|
1251 |
" |
|
1252 |
|holder| |
|
1253 |
||
1254 |
(holder := builder bindingAt:#selectionHolder) isNil ifTrue:[ |
|
1373 | 1255 |
holder := 0 asValue. |
739 | 1256 |
builder aspectAt:#selectionHolder put:holder. |
1373 | 1257 |
holder addDependent:self. |
739 | 1258 |
]. |
1259 |
^ holder |
|
1260 |
! |
|
1261 |
||
1373 | 1262 |
testItemList |
739 | 1263 |
|holder| |
1264 |
||
1373 | 1265 |
(holder := builder bindingAt:#testItemList) isNil ifTrue:[ |
1266 |
holder := ValueHolder new. |
|
1267 |
builder aspectAt:#testItemList put:holder. |
|
739 | 1268 |
]. |
1373 | 1269 |
^ holder. |
739 | 1270 |
! |
1271 |
||
1272 |
testMode |
|
1273 |
||
1274 |
|holder| |
|
1275 |
||
1276 |
(holder := builder bindingAt:#testMode) isNil ifTrue:[ |
|
1277 |
builder aspectAt:#testMode put:(holder := false asValue). |
|
1278 |
holder addDependent: self |
|
1279 |
]. |
|
1280 |
^ holder |
|
1281 |
||
1282 |
! ! |
|
1283 |
||
1284 |
!TabListEditor methodsFor:'building'! |
|
1285 |
||
1373 | 1286 |
buildFromResourceSpec:aListSpec |
1287 |
self buildFromTabList:aListSpec |
|
739 | 1288 |
! |
1289 |
||
1290 |
buildFromTabList: aTabList |
|
1291 |
"build from a aTabList" |
|
1292 |
||
1373 | 1293 |
self selection:0. |
739 | 1294 |
listOfTabs removeAll. |
1295 |
||
2819 | 1296 |
aTabList do:[:aTabItem| |
1297 |
self assert:(aTabItem isKindOf:TabItem). |
|
1298 |
listOfTabs add: aTabItem |
|
1299 |
]. |
|
1972 | 1300 |
self clearModified. |
1374 | 1301 |
listOfTabs notEmpty ifTrue:[ self selection:1 ]. |
2819 | 1302 |
|
1303 |
"Modified: / 08-11-2010 / 13:57:27 / cg" |
|
1972 | 1304 |
! |
739 | 1305 |
|
1972 | 1306 |
loadFromClass:aClass andSelector:aSelector |
1307 |
"build from class and selector" |
|
1308 |
||
1309 |
|cls spec| |
|
1310 |
||
1311 |
self assert:(aClass isNil or:[aClass isClass]). |
|
1312 |
||
1313 |
self testMode value: false. |
|
1314 |
self selection:0. |
|
1315 |
||
1316 |
"if opened on a tab list" |
|
1317 |
(aClass isNil and: [aSelector isNil and: [listOfTabs size > 0]]) ifFalse:[ |
|
1318 |
listOfTabs removeAll. |
|
1319 |
||
1320 |
cls := aClass isBehavior ifTrue:[ aClass ] ifFalse:[ self resolveName:aClass]. |
|
1321 |
specSelector := aSelector. |
|
1322 |
||
1323 |
cls notNil ifTrue:[ |
|
1324 |
specSelector notNil ifTrue:[ |
|
1325 |
||
1326 |
(cls respondsTo: aSelector) ifTrue:[ |
|
1327 |
spec := cls perform: aSelector. |
|
1328 |
]. |
|
1329 |
spec size ~~ 0 ifTrue:[ |
|
2819 | 1330 |
spec do:[:aTabOrArray| |
1331 |
|tab| |
|
1332 |
||
1333 |
aTabOrArray isArray ifTrue:[ |
|