author | Jan Vrany <jan.vrany@labware.com> |
Tue, 08 Sep 2020 11:20:32 +0100 | |
branch | jv |
changeset 19593 | 005c34e357bc |
parent 18832 | 74115b507c3d |
child 19629 | 8cdd7e139669 |
permissions | -rw-r--r-- |
6179 | 1 |
" |
2 |
COPYRIGHT (c) 2004 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 |
" |
|
5302 | 12 |
"{ Package: 'stx:libtool' }" |
13 |
||
15407
7c5e7b454c1a
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14805
diff
changeset
|
14 |
"{ NameSpace: Smalltalk }" |
7c5e7b454c1a
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14805
diff
changeset
|
15 |
|
5302 | 16 |
ToolApplicationModel subclass:#MultiViewToolApplication |
17 |
instanceVariableNames:'workspaces tabList selectedWorkspaceIndexHolder workspaceHolder' |
|
8615 | 18 |
classVariableNames:'DefaultInfoVisible DefaultEditToolBarVisible |
19 |
DefaultToolBarVisible' |
|
5302 | 20 |
poolDictionaries:'' |
21 |
category:'Interface-Smalltalk' |
|
22 |
! |
|
23 |
||
24 |
!MultiViewToolApplication class methodsFor:'documentation'! |
|
25 |
||
6179 | 26 |
copyright |
27 |
" |
|
28 |
COPYRIGHT (c) 2004 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 |
||
5302 | 40 |
documentation |
41 |
" |
|
8497 | 42 |
Common code for multiView applications (Workspace, Terminal app and maybe more later) |
5302 | 43 |
|
44 |
[author:] |
|
45 |
Claus Gittinger |
|
46 |
" |
|
47 |
! ! |
|
48 |
||
7824 | 49 |
!MultiViewToolApplication class methodsFor:'defaults'! |
50 |
||
8497 | 51 |
defaultEditToolbarVisible |
52 |
^ DefaultEditToolBarVisible ? false |
|
53 |
||
54 |
"Created: / 14-07-2007 / 16:38:47 / cg" |
|
55 |
! |
|
56 |
||
7824 | 57 |
defaultInfoVisible |
58 |
^ DefaultInfoVisible ? true |
|
59 |
||
60 |
"Created: / 14-07-2007 / 16:38:32 / cg" |
|
61 |
! |
|
62 |
||
63 |
defaultToolbarVisible |
|
64 |
^ DefaultToolBarVisible ? false |
|
65 |
||
66 |
"Created: / 14-07-2007 / 16:38:47 / cg" |
|
67 |
! ! |
|
68 |
||
9143 | 69 |
!MultiViewToolApplication class methodsFor:'help specs'! |
70 |
||
71 |
flyByHelpSpec |
|
72 |
<resource: #help> |
|
73 |
||
74 |
^ super flyByHelpSpec addPairsFrom:#( |
|
75 |
||
10221 | 76 |
#addWorkspace |
77 |
'Add another page (tab)' |
|
78 |
||
9143 | 79 |
#hideToolBar |
12482
e801a369d243
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
11727
diff
changeset
|
80 |
'Hide the toolbar. Show again via the "View"-menu' |
9143 | 81 |
|
82 |
#hideEditToolBar |
|
12482
e801a369d243
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
11727
diff
changeset
|
83 |
'Hide the edit-toolbar. Show again via the "View"-menu' |
9143 | 84 |
|
85 |
) |
|
10221 | 86 |
|
87 |
"Modified: / 06-07-2011 / 18:08:57 / cg" |
|
9143 | 88 |
! ! |
89 |
||
7650 | 90 |
!MultiViewToolApplication class methodsFor:'image specs'! |
91 |
||
92 |
hideToolBarIcon |
|
93 |
<resource: #programImage> |
|
94 |
||
95 |
^ ToolbarIconLibrary hideToolBarIcon |
|
96 |
||
97 |
"Created: / 18-02-2007 / 14:53:38 / cg" |
|
98 |
! ! |
|
99 |
||
5302 | 100 |
!MultiViewToolApplication class methodsFor:'interface specs'! |
101 |
||
102 |
windowSpec |
|
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
103 |
"This resource specification was automatically generated |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
104 |
by the UIPainter of ST/X." |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
105 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
106 |
"Do not manually edit this!! If it is corrupted, |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
107 |
the UIPainter may not be able to read the specification." |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
108 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
109 |
" |
7650 | 110 |
UIPainter new openOnClass:MultiViewToolApplication andSelector:#windowSpec |
111 |
MultiViewToolApplication new openInterface:#windowSpec |
|
112 |
MultiViewToolApplication open |
|
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
113 |
" |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
114 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
115 |
<resource: #canvas> |
5302 | 116 |
|
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
117 |
^ |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
118 |
#(FullSpec |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
119 |
name: windowSpec |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
120 |
window: |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
121 |
(WindowSpec |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
122 |
label: 'Workspace' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
123 |
name: 'Workspace' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
124 |
min: (Point 10 10) |
13858 | 125 |
bounds: (Rectangle 0 0 640 480) |
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
126 |
menu: mainMenu |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
127 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
128 |
component: |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
129 |
(SpecCollection |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
130 |
collection: ( |
7650 | 131 |
(ViewSpec |
132 |
name: 'ToolBar' |
|
8231 | 133 |
layout: (LayoutFrame 0 0 0 0 0 1 32 0) |
7650 | 134 |
visibilityChannel: toolBarVisibleHolder |
135 |
component: |
|
136 |
(SpecCollection |
|
137 |
collection: ( |
|
138 |
(ActionButtonSpec |
|
139 |
label: 'hideToolBarIcon' |
|
140 |
name: 'HideToolBarButton' |
|
141 |
layout: (LayoutFrame 0 0 0 0 13 0 0 1) |
|
142 |
activeHelpKey: hideToolBar |
|
143 |
hasCharacterOrientedLabel: false |
|
144 |
translateLabel: true |
|
145 |
model: hideToolbar |
|
146 |
postBuildCallback: hideToolBarButtonCreated: |
|
147 |
) |
|
148 |
(MenuPanelSpec |
|
149 |
name: 'ToolBarMenu' |
|
150 |
layout: (LayoutFrame 13 0.0 0 0.0 0 1.0 0 1.0) |
|
151 |
visibilityChannel: toolBarVisibleHolder |
|
152 |
menu: toolBarMenu |
|
153 |
textDefault: true |
|
154 |
) |
|
155 |
) |
|
156 |
||
157 |
) |
|
158 |
) |
|
8497 | 159 |
(ViewSpec |
160 |
name: 'EditToolBar' |
|
161 |
layout: (LayoutFrame 0 0 32 0 0 1 64 0) |
|
162 |
visibilityChannel: editToolBarVisibleHolder |
|
163 |
component: |
|
164 |
(SpecCollection |
|
165 |
collection: ( |
|
166 |
(ActionButtonSpec |
|
167 |
label: 'hideToolBarIcon' |
|
168 |
name: 'HideEditToolBarButton' |
|
169 |
layout: (LayoutFrame 0 0 0 0 13 0 0 1) |
|
9143 | 170 |
activeHelpKey: hideEditToolBar |
8497 | 171 |
hasCharacterOrientedLabel: false |
172 |
translateLabel: true |
|
173 |
model: hideEditToolbar |
|
174 |
postBuildCallback: hideToolBarButtonCreated: |
|
175 |
) |
|
176 |
(MenuPanelSpec |
|
177 |
name: 'EditToolBar1' |
|
178 |
layout: (LayoutFrame 13 0.0 0 0.0 0 1.0 0 1.0) |
|
179 |
visibilityChannel: editToolBarVisibleHolder |
|
180 |
menu: editToolBarMenu |
|
181 |
textDefault: true |
|
182 |
) |
|
183 |
) |
|
184 |
||
185 |
) |
|
186 |
) |
|
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
187 |
(NoteBookViewSpec |
7650 | 188 |
name: 'NoteBook' |
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
189 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
190 |
model: selectedWorkspaceIndexHolder |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
191 |
menu: tabList |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
192 |
useIndex: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
193 |
accessTabMenuAction: tabMenuAt: |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
194 |
destroyTabAction: destroyTab: |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
195 |
canvas: workspaceHolder |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
196 |
canvasInset: 0 |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
197 |
keepCanvasAlive: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
198 |
tabLevel: 1 |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
199 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
200 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
201 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
202 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
203 |
) |
13858 | 204 |
|
205 |
"Modified: / 11-05-2012 / 11:43:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5302 | 206 |
! ! |
207 |
||
208 |
!MultiViewToolApplication class methodsFor:'menu specs'! |
|
209 |
||
8497 | 210 |
editToolBarMenu |
211 |
"This resource specification was automatically generated |
|
212 |
by the MenuEditor of ST/X." |
|
213 |
||
214 |
"Do not manually edit this!! If it is corrupted, |
|
215 |
the MenuEditor may not be able to read the specification." |
|
216 |
||
217 |
" |
|
218 |
MenuEditor new openOnClass:MultiViewToolApplication andSelector:#toolBarMenu |
|
219 |
(Menu new fromLiteralArrayEncoding:(MultiViewToolApplication toolBarMenu)) startUp |
|
220 |
" |
|
221 |
||
222 |
<resource: #menu> |
|
223 |
||
224 |
^ |
|
225 |
#(Menu |
|
226 |
( |
|
227 |
) |
|
228 |
nil |
|
229 |
nil |
|
230 |
) |
|
231 |
||
232 |
"Modified: / 18-02-2007 / 14:59:21 / cg" |
|
233 |
! |
|
234 |
||
5302 | 235 |
mainMenu |
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
236 |
"This resource specification was automatically generated |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
237 |
by the MenuEditor of ST/X." |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
238 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
239 |
"Do not manually edit this!! If it is corrupted, |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
240 |
the MenuEditor may not be able to read the specification." |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
241 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
242 |
" |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
243 |
MenuEditor new openOnClass:MultiViewToolApplication andSelector:#mainMenu |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
244 |
(Menu new fromLiteralArrayEncoding:(MultiViewToolApplication mainMenu)) startUp |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
245 |
" |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
246 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
247 |
<resource: #menu> |
5302 | 248 |
|
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
249 |
^ |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
250 |
#(Menu |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
251 |
( |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
252 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
253 |
label: 'File' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
254 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
255 |
submenu: |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
256 |
(Menu |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
257 |
( |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
258 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
259 |
label: 'New Editor' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
260 |
itemValue: newWorkspace |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
261 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
262 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
263 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
264 |
label: '-' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
265 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
266 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
267 |
label: 'Load File...' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
268 |
itemValue: menuLoad |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
269 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
270 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
271 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
272 |
label: '-' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
273 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
274 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
275 |
label: 'Save As...' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
276 |
itemValue: menuSaveAs |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
277 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
278 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
279 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
280 |
enabled: hasMultipleBuffersHolder |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
281 |
label: 'Save all As...' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
282 |
itemValue: menuSaveAllAs |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
283 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
284 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
285 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
286 |
label: '-' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
287 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
288 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
289 |
label: 'Print...' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
290 |
itemValue: menuPrint |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
291 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
292 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
293 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
294 |
label: '-' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
295 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
296 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
297 |
label: 'Exit' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
298 |
itemValue: closeRequest |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
299 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
300 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
301 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
302 |
nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
303 |
nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
304 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
305 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
306 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
307 |
label: 'Buffers' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
308 |
nameKey: Buffer |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
309 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
310 |
submenu: |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
311 |
(Menu |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
312 |
( |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
313 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
314 |
label: 'Add Buffer' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
315 |
itemValue: addWorkspace |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
316 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
317 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
318 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
319 |
label: '-' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
320 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
321 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
322 |
label: 'Rename...' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
323 |
itemValue: renameWorkspace |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
324 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
325 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
326 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
327 |
label: '-' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
328 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
329 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
330 |
enabled: canRemoveWorkspace |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
331 |
label: 'Remove Buffer' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
332 |
itemValue: removeWorkspace |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
333 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
334 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
335 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
336 |
nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
337 |
nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
338 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
339 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
340 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
341 |
label: 'Edit' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
342 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
343 |
submenu: |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
344 |
(Menu |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
345 |
( |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
346 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
347 |
enabled: hasSelectionInActiveWorkspace |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
348 |
label: 'Cut' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
349 |
itemValue: cutSelection |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
350 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
351 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
352 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
353 |
enabled: hasSelectionInActiveWorkspace |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
354 |
label: 'Copy' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
355 |
itemValue: copySelection |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
356 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
357 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
358 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
359 |
label: 'Paste' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
360 |
itemValue: paste |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
361 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
362 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
363 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
364 |
label: '-' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
365 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
366 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
367 |
label: 'Select All' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
368 |
itemValue: selectAll |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
369 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
370 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
371 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
372 |
nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
373 |
nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
374 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
375 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
376 |
(MenuItem |
8500 | 377 |
label: 'View' |
378 |
translateLabel: true |
|
379 |
submenuChannel: viewMenu |
|
380 |
keepLinkedMenu: true |
|
381 |
) |
|
382 |
(MenuItem |
|
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
383 |
label: 'MENU_Help' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
384 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
385 |
startGroup: conditionalRight |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
386 |
submenu: |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
387 |
(Menu |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
388 |
( |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
389 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
390 |
label: 'About this Application...' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
391 |
itemValue: openAboutThisApplication |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
392 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
393 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
394 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
395 |
nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
396 |
nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
397 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
398 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
399 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
400 |
nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
401 |
nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
402 |
) |
5302 | 403 |
! |
404 |
||
405 |
tabMenu |
|
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
406 |
"This resource specification was automatically generated |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
407 |
by the MenuEditor of ST/X." |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
408 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
409 |
"Do not manually edit this!! If it is corrupted, |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
410 |
the MenuEditor may not be able to read the specification." |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
411 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
412 |
" |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
413 |
MenuEditor new openOnClass:WorkspaceApplication andSelector:#tabMenu |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
414 |
(Menu new fromLiteralArrayEncoding:(WorkspaceApplication tabMenu)) startUp |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
415 |
" |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
416 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
417 |
<resource: #menu> |
5302 | 418 |
|
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
419 |
^ |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
420 |
#(#Menu |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
421 |
#( |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
422 |
#(#MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
423 |
#label: 'Add Tab' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
424 |
#translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
425 |
"/ #triggerOnDown: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
426 |
#value: #addWorkspace |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
427 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
428 |
#(#MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
429 |
#label: '-' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
430 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
431 |
#(#MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
432 |
#label: 'Remove Tab' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
433 |
#translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
434 |
"/ #triggerOnDown: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
435 |
#value: #removeWorkspace: |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
436 |
#enabled: #canRemoveWorkspace: |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
437 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
438 |
#(#MenuItem |
8772 | 439 |
#label: 'Remove all other Tabs' |
440 |
#translateLabel: true |
|
441 |
"/ #triggerOnDown: true |
|
442 |
#value: #removeAllWorkspacesExcept: |
|
443 |
#enabled: #canRemoveAllWorkspacesExcept: |
|
444 |
) |
|
445 |
#(#MenuItem |
|
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
446 |
#label: '-' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
447 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
448 |
#(#MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
449 |
#label: 'Rename...' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
450 |
#translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
451 |
"/ #triggerOnDown: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
452 |
#value: #renameWorkspace: |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
453 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
454 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
455 |
nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
456 |
nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
457 |
) |
7650 | 458 |
! |
459 |
||
460 |
toolBarMenu |
|
461 |
"This resource specification was automatically generated |
|
462 |
by the MenuEditor of ST/X." |
|
463 |
||
464 |
"Do not manually edit this!! If it is corrupted, |
|
465 |
the MenuEditor may not be able to read the specification." |
|
466 |
||
467 |
" |
|
468 |
MenuEditor new openOnClass:MultiViewToolApplication andSelector:#toolBarMenu |
|
469 |
(Menu new fromLiteralArrayEncoding:(MultiViewToolApplication toolBarMenu)) startUp |
|
470 |
" |
|
471 |
||
472 |
<resource: #menu> |
|
473 |
||
474 |
^ |
|
475 |
#(Menu |
|
476 |
( |
|
477 |
(MenuItem |
|
478 |
label: '' |
|
479 |
) |
|
480 |
(MenuItem |
|
481 |
"/ activeHelpKey: addWorkspace |
|
482 |
label: 'Add Buffer' |
|
483 |
itemValue: addWorkspace |
|
484 |
translateLabel: true |
|
485 |
isButton: true |
|
486 |
labelImage: (ResourceRetriever ToolbarIconLibrary addBufferIcon) |
|
487 |
) |
|
488 |
) |
|
489 |
nil |
|
490 |
nil |
|
491 |
) |
|
492 |
||
493 |
"Modified: / 18-02-2007 / 14:59:21 / cg" |
|
494 |
! |
|
495 |
||
496 |
viewMenu |
|
497 |
"This resource specification was automatically generated |
|
498 |
by the MenuEditor of ST/X." |
|
499 |
||
500 |
"Do not manually edit this!! If it is corrupted, |
|
501 |
the MenuEditor may not be able to read the specification." |
|
502 |
||
14279
9214ed746ffd
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14175
diff
changeset
|
503 |
|
7650 | 504 |
" |
9058 | 505 |
MenuEditor new openOnClass:MultiViewToolApplication andSelector:#viewMenu |
506 |
(Menu new fromLiteralArrayEncoding:(MultiViewToolApplication viewMenu)) startUp |
|
7650 | 507 |
" |
508 |
||
509 |
<resource: #menu> |
|
510 |
||
511 |
^ |
|
512 |
#(Menu |
|
513 |
( |
|
514 |
(MenuItem |
|
515 |
label: 'Toolbar' |
|
516 |
hideMenuOnActivated: false |
|
517 |
indication: toolBarVisibleHolder |
|
518 |
) |
|
519 |
(MenuItem |
|
8497 | 520 |
label: 'Editor Toolbar' |
9058 | 521 |
isVisible: hasEditToolBar |
8497 | 522 |
hideMenuOnActivated: false |
523 |
indication: editToolBarVisibleHolder |
|
524 |
) |
|
525 |
(MenuItem |
|
7650 | 526 |
label: 'Info' |
9380 | 527 |
isVisible: hasInfoLabel |
7650 | 528 |
hideMenuOnActivated: false |
7653
71f20b5aab8d
Do not refer to non-existant aspect
Stefan Vogel <sv@exept.de>
parents:
7650
diff
changeset
|
529 |
indication: infoVisibleHolder |
7650 | 530 |
) |
9058 | 531 |
(MenuItem |
532 |
label: '-' |
|
533 |
) |
|
534 |
(MenuItem |
|
14279
9214ed746ffd
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14175
diff
changeset
|
535 |
label: 'Font...' |
9214ed746ffd
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14175
diff
changeset
|
536 |
itemValue: openFontDialog |
9214ed746ffd
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14175
diff
changeset
|
537 |
) |
9214ed746ffd
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14175
diff
changeset
|
538 |
(MenuItem |
9058 | 539 |
label: 'Settings...' |
540 |
itemValue: openSettingsDialog |
|
541 |
) |
|
7650 | 542 |
) |
543 |
nil |
|
544 |
nil |
|
545 |
) |
|
5302 | 546 |
! ! |
547 |
||
548 |
!MultiViewToolApplication class methodsFor:'queries'! |
|
549 |
||
15945 | 550 |
isAbstract |
551 |
^ self == MultiViewToolApplication |
|
552 |
! |
|
553 |
||
5302 | 554 |
isVisualStartable |
555 |
"return true, if this application can be started via #open. |
|
556 |
(to allow start of a change browser via double-click in the browser)" |
|
557 |
||
5303 | 558 |
self == MultiViewToolApplication ifTrue:[^false]. |
5302 | 559 |
^ super isVisualStartable |
560 |
! ! |
|
561 |
||
562 |
!MultiViewToolApplication methodsFor:'accessing'! |
|
563 |
||
564 |
selectedWorkspace |
|
565 |
|wsIndex| |
|
566 |
||
567 |
workspaces isNil ifTrue:[ |
|
568 |
workspaces := OrderedCollection new. |
|
569 |
]. |
|
570 |
wsIndex := self selectedWorkspaceIndexHolder value. |
|
571 |
wsIndex == 0 ifTrue:[ |
|
572 |
^ nil |
|
573 |
]. |
|
574 |
||
575 |
workspaces size < wsIndex ifTrue:[ |
|
576 |
workspaces grow:wsIndex. |
|
577 |
workspaces at:wsIndex put:(self createWorkspace). |
|
578 |
]. |
|
579 |
^ workspaces at:wsIndex |
|
580 |
! |
|
581 |
||
13858 | 582 |
selectedWorkspaceApplication |
583 |
"Return an aoplication of selected workspace or nil, |
|
584 |
is currently selected workspace is not an embedded |
|
585 |
ApplicationModel" |
|
586 |
||
587 |
| ws | |
|
588 |
ws := self selectedWorkspace. |
|
589 |
^(ws notNil and:[ws isApplicationSubView]) ifTrue:[ |
|
590 |
ws application |
|
591 |
] ifFalse:[ |
|
592 |
nil |
|
593 |
] |
|
594 |
||
595 |
"Created: / 11-05-2012 / 09:38:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
596 |
! |
|
597 |
||
5302 | 598 |
tabMenuAt:index |
6244 | 599 |
<resource: #programMenu> |
600 |
||
5302 | 601 |
|m i ws| |
602 |
||
603 |
m := self class tabMenu. |
|
604 |
m := m decodeAsLiteralArray. |
|
8772 | 605 |
|
5302 | 606 |
i := m detectItem:[:item | item value == #removeWorkspace:] ifNone:nil. |
607 |
i notNil ifTrue:[ |
|
608 |
i argument:index. |
|
609 |
index ~~ self selectedWorkspaceIndexHolder value ifTrue:[ |
|
8772 | 610 |
"/ for now: if that buffer is modified, do not allow removing. |
5302 | 611 |
"/ (must be brought to front, in order for check-for-modification to work) |
612 |
ws := workspaces at:index. |
|
11727
667a6bfb5c64
Avoid #isKindOf: where possible
Stefan Vogel <sv@exept.de>
parents:
11626
diff
changeset
|
613 |
ws isScrollWrapper ifTrue:[ |
5302 | 614 |
ws := ws scrolledView |
615 |
]. |
|
11727
667a6bfb5c64
Avoid #isKindOf: where possible
Stefan Vogel <sv@exept.de>
parents:
11626
diff
changeset
|
616 |
(ws isTextView not |
667a6bfb5c64
Avoid #isKindOf: where possible
Stefan Vogel <sv@exept.de>
parents:
11626
diff
changeset
|
617 |
or:[ ws modified ]) ifTrue:[ |
5302 | 618 |
i disable |
619 |
]. |
|
620 |
]. |
|
621 |
]. |
|
8772 | 622 |
|
623 |
i := m detectItem:[:item | item value == #removeAllWorkspacesExcept:] ifNone:nil. |
|
624 |
i notNil ifTrue:[ |
|
625 |
i argument:index. |
|
626 |
"/ for now: if any buffer is modified, do not allow removing. |
|
627 |
"/ (must be brought to front, in order for check-for-modification to work) |
|
628 |
workspaces doWithIndex:[:wsArg :idx | |
|
629 |
|ws| |
|
630 |
||
631 |
idx ~~ index ifTrue:[ |
|
632 |
ws := wsArg. |
|
11727
667a6bfb5c64
Avoid #isKindOf: where possible
Stefan Vogel <sv@exept.de>
parents:
11626
diff
changeset
|
633 |
ws isScrollWrapper ifTrue:[ |
8772 | 634 |
ws := ws scrolledView |
635 |
]. |
|
11727
667a6bfb5c64
Avoid #isKindOf: where possible
Stefan Vogel <sv@exept.de>
parents:
11626
diff
changeset
|
636 |
(ws isTextView and:[ ws modified ]) ifTrue:[ |
8772 | 637 |
i disable |
638 |
]. |
|
639 |
]. |
|
640 |
]. |
|
641 |
]. |
|
642 |
||
5302 | 643 |
i := m detectItem:[:item | item value == #renameWorkspace:] ifNone:nil. |
644 |
i notNil ifTrue:[ |
|
645 |
i argument:index. |
|
646 |
]. |
|
647 |
||
648 |
m findGuiResourcesIn:self. |
|
649 |
^ m |
|
650 |
! |
|
651 |
||
652 |
workspaceHolder |
|
653 |
workspaceHolder isNil ifTrue:[ |
|
654 |
workspaceHolder := ValueHolder with:(self selectedWorkspace). |
|
655 |
]. |
|
656 |
^ workspaceHolder |
|
7852 | 657 |
! |
658 |
||
659 |
workspaces |
|
18832
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
660 |
workspaces isNil ifTrue:[ |
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
661 |
workspaces := OrderedCollection new. |
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
662 |
]. |
7852 | 663 |
^ workspaces |
18832
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
664 |
|
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
665 |
"Modified: / 20-06-2019 / 18:01:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5302 | 666 |
! ! |
667 |
||
668 |
!MultiViewToolApplication methodsFor:'aspects'! |
|
669 |
||
8497 | 670 |
editToolBarVisibleHolder |
671 |
|holder| |
|
672 |
||
673 |
(holder := builder bindingAt:#editToolBarVisibleHolder) isNil ifTrue:[ |
|
674 |
holder := self class defaultEditToolbarVisible asValue. |
|
675 |
builder aspectAt:#editToolBarVisibleHolder put: holder. |
|
676 |
holder addDependent:self. |
|
677 |
]. |
|
678 |
^ holder |
|
679 |
||
680 |
"Created: / 18-02-2007 / 14:43:39 / cg" |
|
681 |
"Modified: / 14-07-2007 / 16:39:55 / cg" |
|
682 |
! |
|
683 |
||
684 |
hasEditToolBar |
|
685 |
^ (self menuFor:#editToolBarMenu) decodeAsLiteralArray hasItems |
|
686 |
! |
|
687 |
||
9380 | 688 |
hasInfoLabel |
689 |
^ false |
|
690 |
! |
|
691 |
||
7650 | 692 |
infoVisibleHolder |
693 |
|holder| |
|
694 |
||
695 |
(holder := builder bindingAt:#infoVisibleHolder) isNil ifTrue:[ |
|
7824 | 696 |
holder := self class defaultInfoVisible asValue. |
7650 | 697 |
builder aspectAt:#infoVisibleHolder put: holder. |
698 |
holder addDependent:self. |
|
699 |
]. |
|
700 |
^ holder |
|
701 |
||
702 |
"Created: / 18-02-2007 / 15:01:05 / cg" |
|
7824 | 703 |
"Modified: / 14-07-2007 / 16:39:20 / cg" |
7650 | 704 |
! |
705 |
||
5302 | 706 |
selectedWorkspaceIndexHolder |
707 |
selectedWorkspaceIndexHolder isNil ifTrue:[ |
|
708 |
selectedWorkspaceIndexHolder := 1 asValue. |
|
709 |
selectedWorkspaceIndexHolder onChangeSend:#workspaceSelectionChanged to:self. |
|
710 |
]. |
|
711 |
^ selectedWorkspaceIndexHolder. |
|
712 |
! |
|
713 |
||
714 |
tabList |
|
715 |
tabList isNil ifTrue:[ |
|
716 |
tabList := List new. |
|
717 |
]. |
|
718 |
^ tabList. |
|
7650 | 719 |
! |
720 |
||
721 |
toolBarVisibleHolder |
|
722 |
|holder| |
|
723 |
||
724 |
(holder := builder bindingAt:#toolBarVisibleHolder) isNil ifTrue:[ |
|
7824 | 725 |
holder := self class defaultToolbarVisible asValue. |
7650 | 726 |
builder aspectAt:#toolBarVisibleHolder put: holder. |
727 |
holder addDependent:self. |
|
728 |
]. |
|
729 |
^ holder |
|
730 |
||
731 |
"Created: / 18-02-2007 / 14:43:39 / cg" |
|
7824 | 732 |
"Modified: / 14-07-2007 / 16:39:55 / cg" |
5302 | 733 |
! ! |
734 |
||
735 |
!MultiViewToolApplication methodsFor:'aspects-queries'! |
|
736 |
||
8772 | 737 |
canRemoveAllWorkspacesExcept:idx |
15408
ff62d43d5a1a
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
15407
diff
changeset
|
738 |
^ [ self tabList size > 1 ] |
8772 | 739 |
! |
740 |
||
5302 | 741 |
canRemoveWorkspace |
742 |
^ self canRemoveWorkspace:(self selectedWorkspaceIndexHolder value) |
|
743 |
! |
|
744 |
||
745 |
canRemoveWorkspace:idx |
|
746 |
^ self tabList size > 1 |
|
747 |
"/ and:[ (self workspacesTextViewAt:(self selectedWorkspaceIndexHolder value)) |
|
748 |
! |
|
749 |
||
750 |
hasMultipleBuffersHolder |
|
751 |
^ [ workspaces size > 1 ] |
|
752 |
! |
|
753 |
||
754 |
hasSelectionInActiveWorkspace |
|
6424 | 755 |
|v| |
756 |
||
757 |
v := self selectedWorkspacesTextView. |
|
758 |
^ v notNil and:[v selectionAsString size > 0] |
|
8528 | 759 |
! |
760 |
||
17198 | 761 |
hasSelectionInActiveWorkspaceAndEditorIsNotReadonly |
762 |
|v| |
|
763 |
||
764 |
v := self selectedWorkspacesTextView. |
|
765 |
^ v notNil and:[v enabled and:[v selectionAsString size > 0]] |
|
766 |
! |
|
767 |
||
8528 | 768 |
hasTextInActiveWorkspace |
769 |
|v| |
|
770 |
||
771 |
v := self selectedWorkspacesTextView. |
|
772 |
^ v notNil |
|
773 |
and:[v list notEmptyOrNil |
|
774 |
and:[v list contains:[:l | l notEmptyOrNil]]] |
|
5302 | 775 |
! ! |
776 |
||
7650 | 777 |
!MultiViewToolApplication methodsFor:'change & update'! |
778 |
||
8497 | 779 |
infoVisibilityChanged |
780 |
|visible cFrame bottomOffset| |
|
781 |
||
782 |
visible := self infoVisibleHolder value. |
|
783 |
||
9380 | 784 |
cFrame := builder findComponentAt:#NoteBook. "/ #CodeView. |
8497 | 785 |
cFrame notNil ifTrue:[ |
786 |
visible ifFalse:[ |
|
787 |
bottomOffset := 0. |
|
788 |
] ifTrue:[ |
|
789 |
bottomOffset := -25. |
|
790 |
]. |
|
791 |
cFrame layout bottomOffset:bottomOffset. |
|
792 |
cFrame container notNil ifTrue:[ |
|
793 |
cFrame containerChangedSize. |
|
794 |
]. |
|
795 |
]. |
|
796 |
DefaultInfoVisible := visible |
|
797 |
||
798 |
"Created: / 18-02-2007 / 15:01:55 / cg" |
|
799 |
! |
|
800 |
||
801 |
toolBarVisibilityChanged |
|
802 |
|toolBarVisible editToolBarVisible toolBar editToolBar noteBook topOffset| |
|
803 |
||
804 |
topOffset := 0. |
|
805 |
||
806 |
toolBar := self componentAt:#ToolBar. |
|
807 |
toolBar notNil ifTrue:[ |
|
808 |
toolBarVisible := self toolBarVisibleHolder value. |
|
809 |
DefaultToolBarVisible := toolBarVisible. |
|
810 |
toolBarVisible ifTrue:[ |
|
811 |
topOffset := topOffset + toolBar height. |
|
812 |
] |
|
813 |
]. |
|
814 |
||
815 |
editToolBar := self componentAt:#EditToolBar. |
|
816 |
editToolBar notNil ifTrue:[ |
|
817 |
editToolBar layout |
|
818 |
topOffset:topOffset bottomOffset:(topOffset + editToolBar height). |
|
819 |
"/ force it to recompute its dimension |
|
820 |
editToolBar container notNil ifTrue:[ |
|
821 |
editToolBar containerChangedSize. |
|
822 |
]. |
|
823 |
editToolBarVisible := self editToolBarVisibleHolder value. |
|
824 |
DefaultEditToolBarVisible := editToolBarVisible. |
|
825 |
editToolBarVisible ifTrue:[ |
|
826 |
topOffset := topOffset + editToolBar height. |
|
827 |
] |
|
828 |
]. |
|
829 |
||
830 |
noteBook := self componentAt:#NoteBook. |
|
831 |
noteBook notNil ifTrue:[ |
|
832 |
noteBook layout topOffset:topOffset. |
|
833 |
"/ force it to recompute its dimension |
|
834 |
noteBook container notNil ifTrue:[ |
|
835 |
noteBook containerChangedSize. |
|
836 |
]. |
|
837 |
]. |
|
838 |
||
839 |
"Created: / 18-02-2007 / 14:46:22 / cg" |
|
840 |
! |
|
841 |
||
7650 | 842 |
update:something with:aParameter from:changedObject |
8497 | 843 |
((changedObject == self toolBarVisibleHolder) |
844 |
or:[ changedObject == self editToolBarVisibleHolder ]) ifTrue:[ |
|
7650 | 845 |
self toolBarVisibilityChanged. |
846 |
^ self |
|
847 |
]. |
|
7824 | 848 |
changedObject == self infoVisibleHolder ifTrue:[ |
849 |
self infoVisibilityChanged. |
|
850 |
^ self |
|
851 |
]. |
|
7650 | 852 |
^ super update:something with:aParameter from:changedObject |
853 |
||
7824 | 854 |
"Modified: / 14-07-2007 / 16:46:14 / cg" |
14175
61dceb4984c4
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
13858
diff
changeset
|
855 |
! |
61dceb4984c4
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
13858
diff
changeset
|
856 |
|
61dceb4984c4
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
13858
diff
changeset
|
857 |
windowLabelPrefix |
61dceb4984c4
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
13858
diff
changeset
|
858 |
|nm| |
61dceb4984c4
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
13858
diff
changeset
|
859 |
|
61dceb4984c4
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
13858
diff
changeset
|
860 |
nm := self class nameWithoutPrefix. |
61dceb4984c4
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
13858
diff
changeset
|
861 |
(nm endsWith:'Application') ifTrue:[ |
61dceb4984c4
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
13858
diff
changeset
|
862 |
nm := nm copyButLast:'Application' size |
61dceb4984c4
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
13858
diff
changeset
|
863 |
]. |
61dceb4984c4
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
13858
diff
changeset
|
864 |
^ nm |
61dceb4984c4
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
13858
diff
changeset
|
865 |
! |
61dceb4984c4
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
13858
diff
changeset
|
866 |
|
61dceb4984c4
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
13858
diff
changeset
|
867 |
workspaceSelectionChanged |
61dceb4984c4
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
13858
diff
changeset
|
868 |
|wsIndex windowLabel v prefix| |
61dceb4984c4
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
13858
diff
changeset
|
869 |
|
61dceb4984c4
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
13858
diff
changeset
|
870 |
"/ self selected |
61dceb4984c4
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
13858
diff
changeset
|
871 |
self workspaceHolder value:(v := self selectedWorkspace). |
61dceb4984c4
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
13858
diff
changeset
|
872 |
wsIndex := self selectedWorkspaceIndexHolder value. |
61dceb4984c4
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
13858
diff
changeset
|
873 |
|
61dceb4984c4
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
13858
diff
changeset
|
874 |
wsIndex ~~ 0 ifTrue:[ |
61dceb4984c4
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
13858
diff
changeset
|
875 |
prefix := self windowLabelPrefix. |
61dceb4984c4
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
13858
diff
changeset
|
876 |
windowLabel := tabList at:wsIndex ifAbsent:nil. |
61dceb4984c4
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
13858
diff
changeset
|
877 |
windowLabel notNil ifTrue:[self window label:prefix,': ',windowLabel]. |
61dceb4984c4
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
13858
diff
changeset
|
878 |
]. |
15408
ff62d43d5a1a
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
15407
diff
changeset
|
879 |
|
ff62d43d5a1a
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
15407
diff
changeset
|
880 |
v notNil ifTrue:[ v takeFocusWhenMapped:true ] |
7650 | 881 |
! ! |
882 |
||
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
883 |
!MultiViewToolApplication methodsFor:'defaults'! |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
884 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
885 |
defaultFileNameForLoad |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
886 |
^ 'file.txt' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
887 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
888 |
"Created: / 25-10-2006 / 14:56:19 / cg" |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
889 |
! |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
890 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
891 |
defaultFileNameForSave |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
892 |
^ 'file.txt' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
893 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
894 |
"Modified: / 25-10-2006 / 14:54:13 / cg" |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
895 |
! |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
896 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
897 |
defaultFileNameForSaveAll |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
898 |
^ 'file.txt' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
899 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
900 |
"Modified: / 25-10-2006 / 14:55:50 / cg" |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
901 |
! |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
902 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
903 |
defaultPatternLoad |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
904 |
^ '*.txt' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
905 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
906 |
"Created: / 25-10-2006 / 14:57:18 / cg" |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
907 |
! ! |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
908 |
|
7650 | 909 |
!MultiViewToolApplication methodsFor:'initialization'! |
910 |
||
911 |
hideToolBarButtonCreated:aButton |
|
912 |
aButton passiveLevel:(MenuPanel defaultLevel). |
|
913 |
"/ aButton passiveLevel:1. |
|
914 |
aButton activeLevel:-1. |
|
915 |
aButton backgroundColor:(MenuPanel defaultBackgroundColor). |
|
916 |
||
917 |
"Created: / 18-02-2007 / 14:48:28 / cg" |
|
918 |
! |
|
919 |
||
920 |
postBuildWith:aBuilder |
|
921 |
super postBuildWith:aBuilder. |
|
8497 | 922 |
|
7650 | 923 |
self infoVisibleHolder value ifTrue:[ self infoVisibilityChanged ]. |
8497 | 924 |
(self toolBarVisibleHolder value |
925 |
or:[ self editToolBarVisibleHolder value ]) ifTrue:[ self toolBarVisibilityChanged ]. |
|
7650 | 926 |
|
9694 | 927 |
self workspaceSelectionChanged. |
928 |
||
7650 | 929 |
"Created: / 18-02-2007 / 15:03:08 / cg" |
9694 | 930 |
"Modified: / 22-01-2011 / 11:46:35 / cg" |
7650 | 931 |
! ! |
932 |
||
5302 | 933 |
!MultiViewToolApplication methodsFor:'menu-actions'! |
934 |
||
935 |
addWindow:aWindow named:name |
|
936 |
^ self addWindow:aWindow named:name asFirst:false |
|
937 |
! |
|
938 |
||
939 |
addWindow:aWindow named:name asFirst:asFirst |
|
14805
3e0fc4db20cf
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14557
diff
changeset
|
940 |
^ self addWindow:aWindow named:name tabIcon:nil asFirst:asFirst |
3e0fc4db20cf
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14557
diff
changeset
|
941 |
! |
3e0fc4db20cf
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14557
diff
changeset
|
942 |
|
3e0fc4db20cf
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14557
diff
changeset
|
943 |
addWindow:aWindow named:name tabIcon:iconOrNil |
3e0fc4db20cf
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14557
diff
changeset
|
944 |
^ self addWindow:aWindow named:name tabIcon:iconOrNil asFirst:false |
3e0fc4db20cf
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14557
diff
changeset
|
945 |
! |
3e0fc4db20cf
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14557
diff
changeset
|
946 |
|
3e0fc4db20cf
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14557
diff
changeset
|
947 |
addWindow:aWindow named:name tabIcon:iconOrNil asFirst:asFirst |
15407
7c5e7b454c1a
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14805
diff
changeset
|
948 |
|tabList tabItem wsIndex newSelectedIndex initialFocusView| |
5302 | 949 |
|
950 |
tabList := self tabList. |
|
951 |
wsIndex := tabList size + 1. |
|
952 |
wsIndex == 1 ifTrue:[ |
|
953 |
"/ first - add a name for the first tab |
|
954 |
tabList add:(self window label). "/ 'Workspace'. |
|
955 |
wsIndex := wsIndex + 1. |
|
956 |
]. |
|
957 |
||
14805
3e0fc4db20cf
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14557
diff
changeset
|
958 |
tabItem := name bindWith:wsIndex. |
3e0fc4db20cf
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14557
diff
changeset
|
959 |
iconOrNil notNil ifTrue:[ |
3e0fc4db20cf
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14557
diff
changeset
|
960 |
tabItem := LabelAndIcon icon:iconOrNil string:tabItem. |
3e0fc4db20cf
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14557
diff
changeset
|
961 |
]. |
3e0fc4db20cf
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14557
diff
changeset
|
962 |
|
5302 | 963 |
workspaces grow:wsIndex. |
964 |
asFirst ifTrue:[ |
|
14805
3e0fc4db20cf
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14557
diff
changeset
|
965 |
tabList addFirst:tabItem. |
5302 | 966 |
workspaces replaceFrom:2 to:wsIndex with:workspaces startingAt:1. |
967 |
newSelectedIndex := 1. |
|
968 |
] ifFalse:[ |
|
14805
3e0fc4db20cf
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14557
diff
changeset
|
969 |
tabList addLast:tabItem. |
5302 | 970 |
newSelectedIndex := wsIndex. |
971 |
]. |
|
9664 | 972 |
|
15407
7c5e7b454c1a
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14805
diff
changeset
|
973 |
(aWindow isKeyboardConsumer) ifTrue:[ |
7c5e7b454c1a
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14805
diff
changeset
|
974 |
initialFocusView := aWindow. |
7c5e7b454c1a
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14805
diff
changeset
|
975 |
] ifFalse:[ |
7c5e7b454c1a
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14805
diff
changeset
|
976 |
(aWindow scrolledView isKeyboardConsumer) ifTrue:[ |
7c5e7b454c1a
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14805
diff
changeset
|
977 |
initialFocusView := aWindow scrolledView |
7c5e7b454c1a
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14805
diff
changeset
|
978 |
] ifFalse:[ |
7c5e7b454c1a
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14805
diff
changeset
|
979 |
initialFocusView := aWindow scrolledView allSubViewsDetect:[:v | v isKeyboardConsumer] ifNone:nil. |
7c5e7b454c1a
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14805
diff
changeset
|
980 |
] |
7c5e7b454c1a
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14805
diff
changeset
|
981 |
]. |
7c5e7b454c1a
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14805
diff
changeset
|
982 |
(initialFocusView notNil "and:[w isKeyboardConsumer]") ifTrue:[ |
7c5e7b454c1a
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14805
diff
changeset
|
983 |
initialFocusView takeFocusWhenMapped:true. |
9664 | 984 |
]. |
985 |
||
5302 | 986 |
workspaces at:newSelectedIndex put:aWindow. |
9694 | 987 |
self selectedWorkspaceIndexHolder value:newSelectedIndex. |
988 |
self workspaceSelectionChanged. |
|
989 |
||
5302 | 990 |
"/ workspaceHolder value:aWindow. |
9664 | 991 |
|
9694 | 992 |
"Modified: / 22-01-2011 / 12:02:59 / cg" |
10252 | 993 |
"Modified: / 11-06-2011 / 00:05:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5302 | 994 |
! |
995 |
||
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
996 |
addWorkspace |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
997 |
self addWindow:(self createWorkspace) named:'Workspace%1' |
6408
e0f701a20cae
remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents:
6354
diff
changeset
|
998 |
! |
e0f701a20cae
remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents:
6354
diff
changeset
|
999 |
|
6458 | 1000 |
destroyTab:tabIndex |
1001 |
self removeWorkspace:tabIndex |
|
1002 |
! |
|
1003 |
||
8576 | 1004 |
doIt |
1005 |
|v| |
|
1006 |
||
1007 |
(v := self selectedWorkspacesTextView) notNil ifTrue:[ |
|
1008 |
v doIt. |
|
1009 |
] |
|
1010 |
! |
|
1011 |
||
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1012 |
loadFile:aFileName |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1013 |
self loadFile:aFileName encoding:nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1014 |
! |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1015 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1016 |
loadFile:aFileName encoding:encodingSymbolOrNil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1017 |
|lbl| |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1018 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1019 |
lbl := aFileName asFilename withoutSuffix baseName. |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1020 |
self loadFile:aFileName encoding:encodingSymbolOrNil label:lbl. |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1021 |
! |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1022 |
|
18832
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1023 |
loadFile:file encoding: encodingSymbolOrNil into:textView |
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1024 |
"Load contents of `file` into `textView`" |
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1025 |
|
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1026 |
| contents | |
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1027 |
|
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1028 |
contents := file contents. |
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1029 |
encodingSymbolOrNil notNil ifTrue:[ |
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1030 |
contents := contents encodeFrom:encodingSymbolOrNil into:#unicode. |
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1031 |
textView externalEncoding:encodingSymbolOrNil. |
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1032 |
]. |
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1033 |
textView contents:contents. |
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1034 |
textView defaultFileNameForFileDialog:file pathName. |
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1035 |
|
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1036 |
"Modified (comment): / 21-06-2019 / 10:42:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1037 |
! |
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1038 |
|
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1039 |
loadFile:aFileName encoding:encodingSymbolOrNil label:label |
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1040 |
| file ws | |
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1041 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1042 |
file := aFileName asFilename. |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1043 |
ws := self selectedWorkspacesTextView. |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1044 |
[ |
18832
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1045 |
self |
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1046 |
loadFile:file |
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1047 |
encoding:encodingSymbolOrNil |
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1048 |
into:ws |
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1049 |
] on:StreamError do:[:ex | |
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1050 |
Dialog warn:(resources stringWithCRs:'Cannot open "%1":\\%2' |
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1051 |
with:file asString |
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1052 |
with:ex description). |
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1053 |
^ self |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1054 |
]. |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1055 |
ws modified:false. |
8033 | 1056 |
self setLabel:label. |
18832
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1057 |
|
74115b507c3d
Generalize `WorkspaceApplication` for easier reuse
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
18273
diff
changeset
|
1058 |
"Modified: / 21-06-2019 / 10:40:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1059 |
! |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1060 |
|
7745 | 1061 |
loadFile:aFileName label:lbl |
1062 |
|encoding| |
|
1063 |
||
1064 |
encoding := CharacterEncoder guessEncodingOfFile:aFileName. |
|
1065 |
(encoding == #'iso8859-1' or:[encoding == #'ascii']) ifTrue:[ |
|
1066 |
encoding := nil |
|
1067 |
]. |
|
1068 |
self loadFile:aFileName encoding:encoding label:lbl. |
|
1069 |
||
1070 |
"Created: / 15-03-2007 / 11:52:21 / cg" |
|
1071 |
! |
|
1072 |
||
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1073 |
menuLoad |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1074 |
|file| |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1075 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1076 |
(self askIfModified:'Text was modified. Load anyway ?' yesButton:'Load') ifFalse:[ ^ self]. |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1077 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1078 |
file := Dialog |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1079 |
requestFileName:(resources string:'Load file') |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1080 |
default:(self defaultFileNameForLoad) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1081 |
pattern:(self defaultPatternLoad). |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1082 |
file size ~~ 0 ifTrue:[ |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1083 |
self loadFile:file |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1084 |
] |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1085 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1086 |
"Modified: / 25-10-2006 / 14:57:34 / cg" |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1087 |
! |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1088 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1089 |
menuPrint |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1090 |
|ws| |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1091 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1092 |
ws := self selectedWorkspacesTextView. |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1093 |
ws doPrint |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1094 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1095 |
"Created: / 25-10-2006 / 15:01:51 / cg" |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1096 |
! |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1097 |
|
5302 | 1098 |
menuSaveAllAs |
1099 |
self |
|
1100 |
askForFile:'Save all Buffers into:' |
|
8196 | 1101 |
default:(self defaultFileNameForSaveAll) |
5302 | 1102 |
thenDo:[:file :doAppend | |
1103 |
|ws append| |
|
1104 |
||
1105 |
append := doAppend. |
|
1106 |
workspaces do:[:subView | |
|
1107 |
|ws| |
|
1108 |
||
1109 |
ws := self workspaceViewOfView:subView. |
|
1110 |
ws notNil ifTrue:[ |
|
1111 |
ws saveAs:file doAppend:append. |
|
1112 |
ws modified:false. |
|
1113 |
]. |
|
1114 |
append := true. |
|
1115 |
]. |
|
1116 |
] |
|
1117 |
! |
|
1118 |
||
1119 |
menuSaveAs |
|
1120 |
self |
|
6408
e0f701a20cae
remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents:
6354
diff
changeset
|
1121 |
askForFile:'Save Buffer into:' |
e0f701a20cae
remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents:
6354
diff
changeset
|
1122 |
default:(self defaultFileNameForSave) |
5302 | 1123 |
thenDo:[:file :doAppend | |
8033 | 1124 |
|ws lbl| |
5302 | 1125 |
|
1126 |
ws := self selectedWorkspacesTextView. |
|
1127 |
ws saveAs:file doAppend:doAppend. |
|
1128 |
ws modified:false. |
|
8395
3596ebae2d90
changed #defaultFileNameForSave
Claus Gittinger <cg@exept.de>
parents:
8368
diff
changeset
|
1129 |
"/ ws defaultFileNameForFileDialog:file asFilename baseName. |
8033 | 1130 |
|
1131 |
lbl := file asFilename withoutSuffix baseName. |
|
1132 |
self setLabel:lbl. |
|
5302 | 1133 |
] |
1134 |
! |
|
1135 |
||
1136 |
newWorkspace |
|
6863 | 1137 |
self class new openWithExtent:(self builder window extent). |
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1138 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1139 |
"Modified: / 25-10-2006 / 14:39:15 / cg" |
5302 | 1140 |
! |
1141 |
||
14279
9214ed746ffd
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14175
diff
changeset
|
1142 |
openFontDialog |
9214ed746ffd
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14175
diff
changeset
|
1143 |
self selectedWorkspace changeFont |
9214ed746ffd
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14175
diff
changeset
|
1144 |
! |
9214ed746ffd
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14175
diff
changeset
|
1145 |
|
9058 | 1146 |
openSTXDocumentation |
1147 |
"opens the top documentation file" |
|
1148 |
||
1149 |
self openHTMLDocument: 'TOP.html' |
|
1150 |
! |
|
1151 |
||
1152 |
openSettingsDialog |
|
14557
f2fbe336969a
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14279
diff
changeset
|
1153 |
|settingsList| |
9058 | 1154 |
|
1155 |
settingsList := |
|
1156 |
#( |
|
1157 |
#('Keyboard Mappings' #'AbstractSettingsApplication::KbdMappingSettingsAppl' ) |
|
1158 |
"/ #('Debugger' #'AbstractSettingsApplication::DebuggerSettingsAppl' ) |
|
1159 |
#('Editor' #'AbstractSettingsApplication::EditSettingsAppl' ) |
|
1160 |
"/ #('Syntax Color' #'AbstractSettingsApplication::SyntaxColorSettingsAppl' ) |
|
1161 |
"/ #('Code Format' #'AbstractSettingsApplication::SourceCodeFormatSettingsAppl' ) |
|
1162 |
). |
|
1163 |
||
14557
f2fbe336969a
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14279
diff
changeset
|
1164 |
SettingsDialog |
f2fbe336969a
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14279
diff
changeset
|
1165 |
openWithList:settingsList |
f2fbe336969a
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
14279
diff
changeset
|
1166 |
label:(resources string:'Settings'). |
9058 | 1167 |
! |
1168 |
||
8576 | 1169 |
printIt |
1170 |
! |
|
1171 |
||
8772 | 1172 |
removeAllWorkspacesExcept:wsIndex |
1173 |
tabList size downTo:wsIndex+1 do:[:idx | |
|
1174 |
self removeWorkspace:idx. |
|
1175 |
]. |
|
1176 |
1 to:wsIndex-1 do:[:idx | |
|
1177 |
self removeWorkspace:1. |
|
1178 |
]. |
|
1179 |
! |
|
1180 |
||
5302 | 1181 |
removeWorkspace |
1182 |
self removeWorkspace:(self selectedWorkspaceIndexHolder value) |
|
1183 |
! |
|
1184 |
||
1185 |
removeWorkspace:wsIndex |
|
1186 |
|tabList newWsIndex| |
|
1187 |
||
1188 |
wsIndex == self selectedWorkspaceIndexHolder value ifTrue:[ |
|
6509 | 1189 |
(self askIfModified:'Text was modified. Remove buffer anyway ?' yesButton:'Remove Buffer') ifFalse:[ |
5302 | 1190 |
^ self |
1191 |
]. |
|
1192 |
]. |
|
1193 |
||
1194 |
tabList := self tabList. |
|
1195 |
||
1196 |
wsIndex == tabList size ifTrue:[ |
|
1197 |
newWsIndex := wsIndex - 1. |
|
1198 |
] ifFalse:[ |
|
1199 |
newWsIndex := wsIndex. |
|
1200 |
]. |
|
1201 |
||
1202 |
tabList removeIndex:wsIndex. |
|
1203 |
(workspaces at:wsIndex) destroy. |
|
1204 |
workspaces removeIndex:wsIndex. |
|
1205 |
||
1206 |
tabList size == 1 ifTrue:[ |
|
1207 |
self window label:(tabList at:1). |
|
1208 |
tabList removeIndex:1 |
|
1209 |
]. |
|
1210 |
||
1211 |
workspaceHolder value:(workspaces at:newWsIndex). |
|
1212 |
self selectedWorkspaceIndexHolder value:newWsIndex. |
|
1213 |
"/ to force change (update workspaceHolder - even if same index) |
|
1214 |
self selectedWorkspaceIndexHolder changed:#value. |
|
1215 |
! |
|
1216 |
||
1217 |
renameWorkspace |
|
1218 |
self renameWorkspace:(self selectedWorkspaceIndexHolder value) |
|
1219 |
! |
|
1220 |
||
1221 |
renameWorkspace:wsIndex |
|
1222 |
|tabList oldName newName| |
|
1223 |
||
1224 |
tabList := self tabList. |
|
1225 |
tabList isEmpty ifTrue:[ |
|
1226 |
oldName := self window label |
|
1227 |
] ifFalse:[ |
|
1228 |
oldName := tabList at:wsIndex. |
|
1229 |
]. |
|
11626 | 1230 |
newName := Dialog request:(resources string:'New Name for "%1":' with:oldName) initialAnswer:oldName. |
5302 | 1231 |
newName size == 0 ifTrue:[ ^ self]. |
1232 |
||
1233 |
self renameWorkspace:wsIndex to:newName. |
|
11626 | 1234 |
|
1235 |
"Modified: / 20-07-2012 / 10:21:29 / cg" |
|
5302 | 1236 |
! |
1237 |
||
1238 |
renameWorkspace:wsIndex to:newName |
|
1239 |
|tabList| |
|
1240 |
||
1241 |
tabList := self tabList. |
|
1242 |
tabList notEmpty ifTrue:[ |
|
1243 |
tabList at:wsIndex put:newName. |
|
1244 |
]. |
|
1245 |
wsIndex == self selectedWorkspaceIndexHolder value ifTrue:[ |
|
1246 |
self window label:newName. |
|
1247 |
]. |
|
1248 |
! ! |
|
1249 |
||
1250 |
!MultiViewToolApplication methodsFor:'menu-actions-editing'! |
|
1251 |
||
1252 |
copySelection |
|
8498 | 1253 |
|v| |
1254 |
||
1255 |
(v := self selectedWorkspacesTextView) notNil ifTrue:[ |
|
1256 |
v copySelection |
|
1257 |
] |
|
5302 | 1258 |
! |
1259 |
||
1260 |
cutSelection |
|
8498 | 1261 |
|v| |
1262 |
||
1263 |
(v := self selectedWorkspacesTextView) notNil ifTrue:[ |
|
1264 |
v cutSelection |
|
1265 |
]. |
|
5302 | 1266 |
! |
1267 |
||
1268 |
paste |
|
8498 | 1269 |
|v| |
1270 |
||
1271 |
(v := self selectedWorkspacesTextView) notNil ifTrue:[ |
|
18273
c46e9ab3000c
Issue #230: use `#pasteOrReplace` to implement paste menu item
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17219
diff
changeset
|
1272 |
v pasteOrReplace |
8498 | 1273 |
] |
18273
c46e9ab3000c
Issue #230: use `#pasteOrReplace` to implement paste menu item
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17219
diff
changeset
|
1274 |
|
c46e9ab3000c
Issue #230: use `#pasteOrReplace` to implement paste menu item
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17219
diff
changeset
|
1275 |
"Modified: / 18-07-2018 / 14:35:49 / jv" |
5302 | 1276 |
! |
1277 |
||
1278 |
paste:aString |
|
9634 | 1279 |
|v| |
9633 | 1280 |
|
9634 | 1281 |
v := (workspaceHolder value) ? (self selectedWorkspacesTextView). |
11482 | 1282 |
[ |
1283 |
v perform:#paste: with:aString. |
|
1284 |
] on:MessageNotUnderstood do:[:ex| |
|
1285 |
"special code, to catch exeception sent from a scrolled view, |
|
1286 |
which has a different receiver tha v" |
|
1287 |
(ex selector ~~ #paste:) ifTrue:[ |
|
1288 |
ex reject. |
|
1289 |
]. |
|
1290 |
"else ignore it" |
|
1291 |
]. |
|
9634 | 1292 |
|
9636 | 1293 |
"Modified: / 16-11-2010 / 15:27:39 / cg" |
5302 | 1294 |
! |
1295 |
||
8509 | 1296 |
redo |
1297 |
|v| |
|
1298 |
||
1299 |
(v := self selectedWorkspacesTextView) notNil ifTrue:[ |
|
1300 |
v redo. |
|
1301 |
] |
|
1302 |
! |
|
1303 |
||
8498 | 1304 |
search |
1305 |
|v| |
|
1306 |
||
1307 |
(v := self selectedWorkspacesTextView) notNil ifTrue:[ |
|
1308 |
v search. |
|
1309 |
] |
|
1310 |
! |
|
1311 |
||
5302 | 1312 |
selectAll |
8498 | 1313 |
|v| |
1314 |
||
1315 |
(v := self selectedWorkspacesTextView) notNil ifTrue:[ |
|
1316 |
v selectAll. |
|
1317 |
] |
|
8509 | 1318 |
! |
1319 |
||
1320 |
undo |
|
1321 |
|v| |
|
1322 |
||
1323 |
(v := self selectedWorkspacesTextView) notNil ifTrue:[ |
|
1324 |
v undo. |
|
1325 |
] |
|
5302 | 1326 |
! ! |
1327 |
||
1328 |
!MultiViewToolApplication methodsFor:'private'! |
|
1329 |
||
6408
e0f701a20cae
remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents:
6354
diff
changeset
|
1330 |
askForFile:question default:defaultFilename thenDo:aBlock |
5302 | 1331 |
Dialog |
1332 |
requestSaveFileName:(resources string:question) |
|
6408
e0f701a20cae
remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents:
6354
diff
changeset
|
1333 |
default:defaultFilename |
5302 | 1334 |
fromDirectory:nil |
1335 |
action:[:fileName | aBlock value:fileName value:false] |
|
1336 |
appendAction:[:fileName | aBlock value:fileName value:true] |
|
1337 |
||
1338 |
"/ |file doAppend| |
|
1339 |
"/ |
|
1340 |
"/ doAppend := false. |
|
1341 |
"/ Dialog aboutToOpenBoxNotificationSignal handle:[:n | |
|
1342 |
"/ |box| |
|
1343 |
"/ |
|
1344 |
"/ box := n parameter. |
|
1345 |
"/ box addButton:(Button label:'Append' action:[doAppend := true. box okPressed]). |
|
1346 |
"/ n proceed. |
|
1347 |
"/ ] do:[ |
|
1348 |
"/ file := Dialog requestFileName:question default:'file.wsp'. |
|
1349 |
"/ ]. |
|
1350 |
"/ file isEmptyOrNil ifFalse:[ |
|
1351 |
"/ aBlock value:file value:doAppend |
|
1352 |
"/ ]. |
|
1353 |
! |
|
1354 |
||
6408
e0f701a20cae
remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents:
6354
diff
changeset
|
1355 |
askForFile:question thenDo:aBlock |
e0f701a20cae
remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents:
6354
diff
changeset
|
1356 |
^ self |
e0f701a20cae
remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents:
6354
diff
changeset
|
1357 |
askForFile:question default:'file.wsp' thenDo:aBlock |
e0f701a20cae
remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents:
6354
diff
changeset
|
1358 |
! |
e0f701a20cae
remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents:
6354
diff
changeset
|
1359 |
|
5302 | 1360 |
askIfAnyModified:arg1 yesButton:arg2 |
1361 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1362 |
||
1363 |
^ self subclassResponsibility |
|
1364 |
! |
|
1365 |
||
1366 |
askIfModified:question yesButton:yesButtonText |
|
1367 |
"tell user, that code has been modified - let her confirm" |
|
1368 |
||
1369 |
|textView| |
|
1370 |
||
1371 |
textView := self selectedWorkspace. |
|
1372 |
(self isModifiedWorkspace:textView) ifFalse:[^ true]. |
|
1373 |
||
1374 |
(Dialog |
|
6354 | 1375 |
confirm:(resources stringWithCRs:question) |
6634 | 1376 |
yesLabel:(resources string:yesButtonText) |
1377 |
noLabel:(resources string:'Cancel')) |
|
5302 | 1378 |
ifTrue:[ |
1379 |
"/ reset modified flag so question is asked only once |
|
1380 |
textView modified:false. |
|
1381 |
^ true |
|
1382 |
]. |
|
1383 |
^ false |
|
1384 |
||
1385 |
"Modified: 2.10.1997 / 14:23:47 / stefan" |
|
1386 |
! |
|
1387 |
||
1388 |
createWorkspace |
|
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1389 |
|ws| |
5302 | 1390 |
|
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1391 |
ws := (HVScrollableView for:EditTextView). |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1392 |
^ ws |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1393 |
|
9664 | 1394 |
"Modified: / 09-12-2010 / 10:55:25 / cg" |
5302 | 1395 |
! |
1396 |
||
1397 |
isModifiedWorkspace:aView |
|
1398 |
self subclassResponsibility |
|
1399 |
! |
|
1400 |
||
1401 |
selectedWorkspacesTextView |
|
1402 |
^ self workspaceViewOfView:(self selectedWorkspace) |
|
1403 |
! |
|
1404 |
||
8033 | 1405 |
setLabel:label |
1406 |
tabList size > 1 ifTrue:[ |
|
1407 |
tabList at:self selectedWorkspaceIndexHolder value put:label |
|
1408 |
]. |
|
1409 |
self window label:label. |
|
1410 |
! |
|
1411 |
||
5302 | 1412 |
workspaceViewOfView:aView |
1413 |
|view| |
|
1414 |
||
1415 |
view := aView. |
|
7663 | 1416 |
|
5302 | 1417 |
(view isScrollWrapper) ifTrue:[ |
1418 |
view := view scrolledView. |
|
1419 |
view isNil ifTrue:[^ nil]. |
|
1420 |
]. |
|
7663 | 1421 |
|
5302 | 1422 |
(view isTextView) ifFalse:[ |
7663 | 1423 |
(view isKindOf:InspectorView) ifTrue:[ |
1424 |
view := view workspace. |
|
1425 |
(view isScrollWrapper) ifTrue:[ |
|
1426 |
view := view scrolledView |
|
1427 |
]. |
|
5302 | 1428 |
]. |
1429 |
]. |
|
7663 | 1430 |
(view isTextView) ifTrue:[^ view]. |
1431 |
^ view allSubViewsDetect:[:v| v name = #Workspace] ifNone:nil. |
|
5302 | 1432 |
! ! |
1433 |
||
7650 | 1434 |
!MultiViewToolApplication methodsFor:'user actions'! |
1435 |
||
8497 | 1436 |
hideEditToolbar |
1437 |
self editToolBarVisibleHolder value:false |
|
1438 |
! |
|
1439 |
||
7650 | 1440 |
hideToolbar |
1441 |
self toolBarVisibleHolder value:false |
|
1442 |
||
1443 |
"Created: / 18-02-2007 / 14:55:54 / cg" |
|
1444 |
! ! |
|
1445 |
||
5302 | 1446 |
!MultiViewToolApplication class methodsFor:'documentation'! |
1447 |
||
15408
ff62d43d5a1a
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
15407
diff
changeset
|
1448 |
version |
15945 | 1449 |
^ '$Header$' |
15408
ff62d43d5a1a
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
15407
diff
changeset
|
1450 |
! |
ff62d43d5a1a
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
15407
diff
changeset
|
1451 |
|
9058 | 1452 |
version_CVS |
15945 | 1453 |
^ '$Header$' |
18273
c46e9ab3000c
Issue #230: use `#pasteOrReplace` to implement paste menu item
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17219
diff
changeset
|
1454 |
! |
c46e9ab3000c
Issue #230: use `#pasteOrReplace` to implement paste menu item
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17219
diff
changeset
|
1455 |
|
c46e9ab3000c
Issue #230: use `#pasteOrReplace` to implement paste menu item
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17219
diff
changeset
|
1456 |
version_HG |
c46e9ab3000c
Issue #230: use `#pasteOrReplace` to implement paste menu item
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17219
diff
changeset
|
1457 |
|
c46e9ab3000c
Issue #230: use `#pasteOrReplace` to implement paste menu item
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17219
diff
changeset
|
1458 |
^ '$Changeset: <not expanded> $' |
5302 | 1459 |
! ! |
12482
e801a369d243
class: MultiViewToolApplication
Claus Gittinger <cg@exept.de>
parents:
11727
diff
changeset
|
1460 |