author | Claus Gittinger <cg@exept.de> |
Sun, 10 May 2009 11:32:56 +0200 | |
changeset 8615 | 3407696ae28f |
parent 8576 | d8906424444d |
child 8772 | 85bc7bdd6cea |
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 |
||
14 |
ToolApplicationModel subclass:#MultiViewToolApplication |
|
15 |
instanceVariableNames:'workspaces tabList selectedWorkspaceIndexHolder workspaceHolder' |
|
8615 | 16 |
classVariableNames:'DefaultInfoVisible DefaultEditToolBarVisible |
17 |
DefaultToolBarVisible' |
|
5302 | 18 |
poolDictionaries:'' |
19 |
category:'Interface-Smalltalk' |
|
20 |
! |
|
21 |
||
22 |
!MultiViewToolApplication class methodsFor:'documentation'! |
|
23 |
||
6179 | 24 |
copyright |
25 |
" |
|
26 |
COPYRIGHT (c) 2004 by eXept Software AG |
|
27 |
All Rights Reserved |
|
28 |
||
29 |
This software is furnished under a license and may be used |
|
30 |
only in accordance with the terms of that license and with the |
|
31 |
inclusion of the above copyright notice. This software may not |
|
32 |
be provided or otherwise made available to, or used by, any |
|
33 |
other person. No title to or ownership of the software is |
|
34 |
hereby transferred. |
|
35 |
" |
|
36 |
! |
|
37 |
||
5302 | 38 |
documentation |
39 |
" |
|
8497 | 40 |
Common code for multiView applications (Workspace, Terminal app and maybe more later) |
5302 | 41 |
|
42 |
[author:] |
|
43 |
Claus Gittinger |
|
44 |
" |
|
45 |
! ! |
|
46 |
||
7824 | 47 |
!MultiViewToolApplication class methodsFor:'defaults'! |
48 |
||
8497 | 49 |
defaultEditToolbarVisible |
50 |
^ DefaultEditToolBarVisible ? false |
|
51 |
||
52 |
"Created: / 14-07-2007 / 16:38:47 / cg" |
|
53 |
! |
|
54 |
||
7824 | 55 |
defaultInfoVisible |
56 |
^ DefaultInfoVisible ? true |
|
57 |
||
58 |
"Created: / 14-07-2007 / 16:38:32 / cg" |
|
59 |
! |
|
60 |
||
61 |
defaultToolbarVisible |
|
62 |
^ DefaultToolBarVisible ? false |
|
63 |
||
64 |
"Created: / 14-07-2007 / 16:38:47 / cg" |
|
65 |
! ! |
|
66 |
||
7650 | 67 |
!MultiViewToolApplication class methodsFor:'image specs'! |
68 |
||
69 |
hideToolBarIcon |
|
70 |
<resource: #programImage> |
|
71 |
||
72 |
^ ToolbarIconLibrary hideToolBarIcon |
|
73 |
||
74 |
"Created: / 18-02-2007 / 14:53:38 / cg" |
|
75 |
! ! |
|
76 |
||
5302 | 77 |
!MultiViewToolApplication class methodsFor:'interface specs'! |
78 |
||
79 |
windowSpec |
|
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
80 |
"This resource specification was automatically generated |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
81 |
by the UIPainter of ST/X." |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
82 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
83 |
"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
|
84 |
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
|
85 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
86 |
" |
7650 | 87 |
UIPainter new openOnClass:MultiViewToolApplication andSelector:#windowSpec |
88 |
MultiViewToolApplication new openInterface:#windowSpec |
|
89 |
MultiViewToolApplication open |
|
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
90 |
" |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
91 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
92 |
<resource: #canvas> |
5302 | 93 |
|
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
94 |
^ |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
95 |
#(FullSpec |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
96 |
name: windowSpec |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
97 |
window: |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
98 |
(WindowSpec |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
99 |
label: 'Workspace' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
100 |
name: 'Workspace' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
101 |
min: (Point 10 10) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
102 |
bounds: (Rectangle 0 0 432 241) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
103 |
menu: mainMenu |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
104 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
105 |
component: |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
106 |
(SpecCollection |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
107 |
collection: ( |
7650 | 108 |
(ViewSpec |
109 |
name: 'ToolBar' |
|
8231 | 110 |
layout: (LayoutFrame 0 0 0 0 0 1 32 0) |
7650 | 111 |
visibilityChannel: toolBarVisibleHolder |
112 |
component: |
|
113 |
(SpecCollection |
|
114 |
collection: ( |
|
115 |
(ActionButtonSpec |
|
116 |
label: 'hideToolBarIcon' |
|
117 |
name: 'HideToolBarButton' |
|
118 |
layout: (LayoutFrame 0 0 0 0 13 0 0 1) |
|
119 |
activeHelpKey: hideToolBar |
|
120 |
hasCharacterOrientedLabel: false |
|
121 |
translateLabel: true |
|
122 |
model: hideToolbar |
|
123 |
postBuildCallback: hideToolBarButtonCreated: |
|
124 |
) |
|
125 |
(MenuPanelSpec |
|
126 |
name: 'ToolBarMenu' |
|
127 |
layout: (LayoutFrame 13 0.0 0 0.0 0 1.0 0 1.0) |
|
128 |
visibilityChannel: toolBarVisibleHolder |
|
129 |
menu: toolBarMenu |
|
130 |
textDefault: true |
|
131 |
) |
|
132 |
) |
|
133 |
||
134 |
) |
|
135 |
) |
|
8497 | 136 |
(ViewSpec |
137 |
name: 'EditToolBar' |
|
138 |
layout: (LayoutFrame 0 0 32 0 0 1 64 0) |
|
139 |
visibilityChannel: editToolBarVisibleHolder |
|
140 |
component: |
|
141 |
(SpecCollection |
|
142 |
collection: ( |
|
143 |
(ActionButtonSpec |
|
144 |
label: 'hideToolBarIcon' |
|
145 |
name: 'HideEditToolBarButton' |
|
146 |
layout: (LayoutFrame 0 0 0 0 13 0 0 1) |
|
147 |
activeHelpKey: hideToolBar |
|
148 |
hasCharacterOrientedLabel: false |
|
149 |
translateLabel: true |
|
150 |
model: hideEditToolbar |
|
151 |
postBuildCallback: hideToolBarButtonCreated: |
|
152 |
) |
|
153 |
(MenuPanelSpec |
|
154 |
name: 'EditToolBar1' |
|
155 |
layout: (LayoutFrame 13 0.0 0 0.0 0 1.0 0 1.0) |
|
156 |
visibilityChannel: editToolBarVisibleHolder |
|
157 |
menu: editToolBarMenu |
|
158 |
textDefault: true |
|
159 |
) |
|
160 |
) |
|
161 |
||
162 |
) |
|
163 |
) |
|
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
164 |
(NoteBookViewSpec |
7650 | 165 |
name: 'NoteBook' |
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
166 |
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
|
167 |
model: selectedWorkspaceIndexHolder |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
168 |
menu: tabList |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
169 |
useIndex: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
170 |
accessTabMenuAction: tabMenuAt: |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
171 |
destroyTabAction: destroyTab: |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
172 |
canvas: workspaceHolder |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
173 |
canvasInset: 0 |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
174 |
keepCanvasAlive: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
175 |
tabLevel: 1 |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
176 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
177 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
178 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
179 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
180 |
) |
5302 | 181 |
! ! |
182 |
||
183 |
!MultiViewToolApplication class methodsFor:'menu specs'! |
|
184 |
||
8497 | 185 |
editToolBarMenu |
186 |
"This resource specification was automatically generated |
|
187 |
by the MenuEditor of ST/X." |
|
188 |
||
189 |
"Do not manually edit this!! If it is corrupted, |
|
190 |
the MenuEditor may not be able to read the specification." |
|
191 |
||
192 |
" |
|
193 |
MenuEditor new openOnClass:MultiViewToolApplication andSelector:#toolBarMenu |
|
194 |
(Menu new fromLiteralArrayEncoding:(MultiViewToolApplication toolBarMenu)) startUp |
|
195 |
" |
|
196 |
||
197 |
<resource: #menu> |
|
198 |
||
199 |
^ |
|
200 |
#(Menu |
|
201 |
( |
|
202 |
) |
|
203 |
nil |
|
204 |
nil |
|
205 |
) |
|
206 |
||
207 |
"Modified: / 18-02-2007 / 14:59:21 / cg" |
|
208 |
! |
|
209 |
||
5302 | 210 |
mainMenu |
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
211 |
"This resource specification was automatically generated |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
212 |
by the MenuEditor of ST/X." |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
213 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
214 |
"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
|
215 |
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
|
216 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
217 |
" |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
218 |
MenuEditor new openOnClass:MultiViewToolApplication andSelector:#mainMenu |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
219 |
(Menu new fromLiteralArrayEncoding:(MultiViewToolApplication mainMenu)) startUp |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
220 |
" |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
221 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
222 |
<resource: #menu> |
5302 | 223 |
|
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
224 |
^ |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
225 |
#(Menu |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
226 |
( |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
227 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
228 |
label: 'File' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
229 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
230 |
submenu: |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
231 |
(Menu |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
232 |
( |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
233 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
234 |
label: 'New Editor' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
235 |
itemValue: newWorkspace |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
236 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
237 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
238 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
239 |
label: '-' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
240 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
241 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
242 |
label: 'Load File...' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
243 |
itemValue: menuLoad |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
244 |
translateLabel: true |
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 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
247 |
label: '-' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
248 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
249 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
250 |
label: 'Save As...' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
251 |
itemValue: menuSaveAs |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
252 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
253 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
254 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
255 |
enabled: hasMultipleBuffersHolder |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
256 |
label: 'Save all As...' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
257 |
itemValue: menuSaveAllAs |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
258 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
259 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
260 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
261 |
label: '-' |
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: 'Print...' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
265 |
itemValue: menuPrint |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
266 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
267 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
268 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
269 |
label: '-' |
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: 'Exit' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
273 |
itemValue: closeRequest |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
274 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
275 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
276 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
277 |
nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
278 |
nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
279 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
280 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
281 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
282 |
label: 'Buffers' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
283 |
nameKey: Buffer |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
284 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
285 |
submenu: |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
286 |
(Menu |
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: 'Add Buffer' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
290 |
itemValue: addWorkspace |
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: 'Rename...' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
298 |
itemValue: renameWorkspace |
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 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
302 |
label: '-' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
303 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
304 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
305 |
enabled: canRemoveWorkspace |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
306 |
label: 'Remove Buffer' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
307 |
itemValue: removeWorkspace |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
308 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
309 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
310 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
311 |
nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
312 |
nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
313 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
314 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
315 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
316 |
label: 'Edit' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
317 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
318 |
submenu: |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
319 |
(Menu |
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 |
enabled: hasSelectionInActiveWorkspace |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
323 |
label: 'Cut' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
324 |
itemValue: cutSelection |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
325 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
326 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
327 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
328 |
enabled: hasSelectionInActiveWorkspace |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
329 |
label: 'Copy' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
330 |
itemValue: copySelection |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
331 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
332 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
333 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
334 |
label: 'Paste' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
335 |
itemValue: paste |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
336 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
337 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
338 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
339 |
label: '-' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
340 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
341 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
342 |
label: 'Select All' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
343 |
itemValue: selectAll |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
344 |
translateLabel: true |
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 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
347 |
nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
348 |
nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
349 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
350 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
351 |
(MenuItem |
8500 | 352 |
label: 'View' |
353 |
translateLabel: true |
|
354 |
submenuChannel: viewMenu |
|
355 |
keepLinkedMenu: true |
|
356 |
) |
|
357 |
(MenuItem |
|
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
358 |
label: 'MENU_Help' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
359 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
360 |
startGroup: conditionalRight |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
361 |
submenu: |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
362 |
(Menu |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
363 |
( |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
364 |
(MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
365 |
label: 'About this Application...' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
366 |
itemValue: openAboutThisApplication |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
367 |
translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
368 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
369 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
370 |
nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
371 |
nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
372 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
373 |
) |
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 |
nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
376 |
nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
377 |
) |
5302 | 378 |
! |
379 |
||
380 |
tabMenu |
|
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
381 |
"This resource specification was automatically generated |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
382 |
by the MenuEditor of ST/X." |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
383 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
384 |
"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
|
385 |
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
|
386 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
387 |
" |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
388 |
MenuEditor new openOnClass:WorkspaceApplication andSelector:#tabMenu |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
389 |
(Menu new fromLiteralArrayEncoding:(WorkspaceApplication tabMenu)) startUp |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
390 |
" |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
391 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
392 |
<resource: #menu> |
5302 | 393 |
|
7475
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 |
#(#Menu |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
396 |
#( |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
397 |
#(#MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
398 |
#label: 'Add Tab' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
399 |
#translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
400 |
"/ #triggerOnDown: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
401 |
#value: #addWorkspace |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
402 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
403 |
#(#MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
404 |
#label: '-' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
405 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
406 |
#(#MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
407 |
#label: 'Remove Tab' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
408 |
#translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
409 |
"/ #triggerOnDown: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
410 |
#value: #removeWorkspace: |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
411 |
#enabled: #canRemoveWorkspace: |
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 |
#(#MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
414 |
#label: '-' |
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 |
#(#MenuItem |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
417 |
#label: 'Rename...' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
418 |
#translateLabel: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
419 |
"/ #triggerOnDown: true |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
420 |
#value: #renameWorkspace: |
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 |
) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
423 |
nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
424 |
nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
425 |
) |
7650 | 426 |
! |
427 |
||
428 |
toolBarMenu |
|
429 |
"This resource specification was automatically generated |
|
430 |
by the MenuEditor of ST/X." |
|
431 |
||
432 |
"Do not manually edit this!! If it is corrupted, |
|
433 |
the MenuEditor may not be able to read the specification." |
|
434 |
||
435 |
" |
|
436 |
MenuEditor new openOnClass:MultiViewToolApplication andSelector:#toolBarMenu |
|
437 |
(Menu new fromLiteralArrayEncoding:(MultiViewToolApplication toolBarMenu)) startUp |
|
438 |
" |
|
439 |
||
440 |
<resource: #menu> |
|
441 |
||
442 |
^ |
|
443 |
#(Menu |
|
444 |
( |
|
445 |
(MenuItem |
|
446 |
label: '' |
|
447 |
) |
|
448 |
(MenuItem |
|
449 |
"/ activeHelpKey: addWorkspace |
|
450 |
label: 'Add Buffer' |
|
451 |
itemValue: addWorkspace |
|
452 |
translateLabel: true |
|
453 |
isButton: true |
|
454 |
labelImage: (ResourceRetriever ToolbarIconLibrary addBufferIcon) |
|
455 |
) |
|
456 |
) |
|
457 |
nil |
|
458 |
nil |
|
459 |
) |
|
460 |
||
461 |
"Modified: / 18-02-2007 / 14:59:21 / cg" |
|
462 |
! |
|
463 |
||
464 |
viewMenu |
|
465 |
"This resource specification was automatically generated |
|
466 |
by the MenuEditor of ST/X." |
|
467 |
||
468 |
"Do not manually edit this!! If it is corrupted, |
|
469 |
the MenuEditor may not be able to read the specification." |
|
470 |
||
471 |
" |
|
472 |
MenuEditor new openOnClass:WorkspaceApplication andSelector:#viewMenu |
|
473 |
(Menu new fromLiteralArrayEncoding:(WorkspaceApplication viewMenu)) startUp |
|
474 |
" |
|
475 |
||
476 |
<resource: #menu> |
|
477 |
||
478 |
^ |
|
479 |
#(Menu |
|
480 |
( |
|
481 |
(MenuItem |
|
482 |
label: 'Toolbar' |
|
483 |
translateLabel: true |
|
484 |
hideMenuOnActivated: false |
|
485 |
indication: toolBarVisibleHolder |
|
486 |
) |
|
487 |
(MenuItem |
|
8497 | 488 |
label: 'Editor Toolbar' |
489 |
translateLabel: true |
|
490 |
hideMenuOnActivated: false |
|
491 |
indication: editToolBarVisibleHolder |
|
492 |
isVisible: hasEditToolBar |
|
493 |
) |
|
494 |
(MenuItem |
|
7650 | 495 |
label: 'Info' |
496 |
translateLabel: true |
|
497 |
isVisible: false |
|
498 |
hideMenuOnActivated: false |
|
7653
71f20b5aab8d
Do not refer to non-existant aspect
Stefan Vogel <sv@exept.de>
parents:
7650
diff
changeset
|
499 |
indication: infoVisibleHolder |
7650 | 500 |
) |
501 |
) |
|
502 |
nil |
|
503 |
nil |
|
504 |
) |
|
7824 | 505 |
|
506 |
"Modified: / 14-07-2007 / 16:49:04 / cg" |
|
5302 | 507 |
! ! |
508 |
||
509 |
!MultiViewToolApplication class methodsFor:'queries'! |
|
510 |
||
511 |
isVisualStartable |
|
512 |
"return true, if this application can be started via #open. |
|
513 |
(to allow start of a change browser via double-click in the browser)" |
|
514 |
||
5303 | 515 |
self == MultiViewToolApplication ifTrue:[^false]. |
5302 | 516 |
^ super isVisualStartable |
517 |
! ! |
|
518 |
||
519 |
!MultiViewToolApplication methodsFor:'accessing'! |
|
520 |
||
521 |
selectedWorkspace |
|
522 |
|wsIndex| |
|
523 |
||
524 |
workspaces isNil ifTrue:[ |
|
525 |
workspaces := OrderedCollection new. |
|
526 |
]. |
|
527 |
wsIndex := self selectedWorkspaceIndexHolder value. |
|
528 |
wsIndex == 0 ifTrue:[ |
|
529 |
^ nil |
|
530 |
]. |
|
531 |
||
532 |
workspaces size < wsIndex ifTrue:[ |
|
533 |
workspaces grow:wsIndex. |
|
534 |
workspaces at:wsIndex put:(self createWorkspace). |
|
535 |
]. |
|
536 |
^ workspaces at:wsIndex |
|
537 |
! |
|
538 |
||
539 |
tabMenuAt:index |
|
6244 | 540 |
<resource: #programMenu> |
541 |
||
5302 | 542 |
|m i ws| |
543 |
||
544 |
m := self class tabMenu. |
|
545 |
m := m decodeAsLiteralArray. |
|
546 |
i := m detectItem:[:item | item value == #removeWorkspace:] ifNone:nil. |
|
547 |
i notNil ifTrue:[ |
|
548 |
i argument:index. |
|
549 |
index ~~ self selectedWorkspaceIndexHolder value ifTrue:[ |
|
550 |
"/ for now: if that buffer is modified, |
|
551 |
"/ do not allow removing. |
|
552 |
"/ (must be brought to front, in order for check-for-modification to work) |
|
553 |
ws := workspaces at:index. |
|
554 |
(ws isKindOf:ScrollableView) ifTrue:[ |
|
555 |
ws := ws scrolledView |
|
556 |
]. |
|
557 |
((ws isKindOf:TextView) not |
|
558 |
or:[ ws modified ]) |
|
559 |
ifTrue:[ |
|
560 |
i disable |
|
561 |
]. |
|
562 |
]. |
|
563 |
]. |
|
564 |
i := m detectItem:[:item | item value == #renameWorkspace:] ifNone:nil. |
|
565 |
i notNil ifTrue:[ |
|
566 |
i argument:index. |
|
567 |
]. |
|
568 |
||
569 |
m findGuiResourcesIn:self. |
|
570 |
^ m |
|
571 |
! |
|
572 |
||
573 |
workspaceHolder |
|
574 |
workspaceHolder isNil ifTrue:[ |
|
575 |
workspaceHolder := ValueHolder with:(self selectedWorkspace). |
|
576 |
]. |
|
577 |
^ workspaceHolder |
|
7852 | 578 |
! |
579 |
||
580 |
workspaces |
|
581 |
^ workspaces |
|
5302 | 582 |
! ! |
583 |
||
584 |
!MultiViewToolApplication methodsFor:'aspects'! |
|
585 |
||
8497 | 586 |
editToolBarVisibleHolder |
587 |
|holder| |
|
588 |
||
589 |
(holder := builder bindingAt:#editToolBarVisibleHolder) isNil ifTrue:[ |
|
590 |
holder := self class defaultEditToolbarVisible asValue. |
|
591 |
builder aspectAt:#editToolBarVisibleHolder put: holder. |
|
592 |
holder addDependent:self. |
|
593 |
]. |
|
594 |
^ holder |
|
595 |
||
596 |
"Created: / 18-02-2007 / 14:43:39 / cg" |
|
597 |
"Modified: / 14-07-2007 / 16:39:55 / cg" |
|
598 |
! |
|
599 |
||
600 |
hasEditToolBar |
|
601 |
^ (self menuFor:#editToolBarMenu) decodeAsLiteralArray hasItems |
|
602 |
! |
|
603 |
||
7650 | 604 |
infoVisibleHolder |
605 |
|holder| |
|
606 |
||
607 |
(holder := builder bindingAt:#infoVisibleHolder) isNil ifTrue:[ |
|
7824 | 608 |
holder := self class defaultInfoVisible asValue. |
7650 | 609 |
builder aspectAt:#infoVisibleHolder put: holder. |
610 |
holder addDependent:self. |
|
611 |
]. |
|
612 |
^ holder |
|
613 |
||
614 |
"Created: / 18-02-2007 / 15:01:05 / cg" |
|
7824 | 615 |
"Modified: / 14-07-2007 / 16:39:20 / cg" |
7650 | 616 |
! |
617 |
||
5302 | 618 |
selectedWorkspaceIndexHolder |
619 |
selectedWorkspaceIndexHolder isNil ifTrue:[ |
|
620 |
selectedWorkspaceIndexHolder := 1 asValue. |
|
621 |
selectedWorkspaceIndexHolder onChangeSend:#workspaceSelectionChanged to:self. |
|
622 |
]. |
|
623 |
^ selectedWorkspaceIndexHolder. |
|
624 |
! |
|
625 |
||
626 |
tabList |
|
627 |
tabList isNil ifTrue:[ |
|
628 |
tabList := List new. |
|
629 |
]. |
|
630 |
^ tabList. |
|
7650 | 631 |
! |
632 |
||
633 |
toolBarVisibleHolder |
|
634 |
|holder| |
|
635 |
||
636 |
(holder := builder bindingAt:#toolBarVisibleHolder) isNil ifTrue:[ |
|
7824 | 637 |
holder := self class defaultToolbarVisible asValue. |
7650 | 638 |
builder aspectAt:#toolBarVisibleHolder put: holder. |
639 |
holder addDependent:self. |
|
640 |
]. |
|
641 |
^ holder |
|
642 |
||
643 |
"Created: / 18-02-2007 / 14:43:39 / cg" |
|
7824 | 644 |
"Modified: / 14-07-2007 / 16:39:55 / cg" |
5302 | 645 |
! ! |
646 |
||
647 |
!MultiViewToolApplication methodsFor:'aspects-queries'! |
|
648 |
||
649 |
canRemoveWorkspace |
|
650 |
^ self canRemoveWorkspace:(self selectedWorkspaceIndexHolder value) |
|
651 |
! |
|
652 |
||
653 |
canRemoveWorkspace:idx |
|
654 |
^ self tabList size > 1 |
|
655 |
"/ and:[ (self workspacesTextViewAt:(self selectedWorkspaceIndexHolder value)) |
|
656 |
! |
|
657 |
||
658 |
hasMultipleBuffersHolder |
|
659 |
^ [ workspaces size > 1 ] |
|
660 |
! |
|
661 |
||
662 |
hasSelectionInActiveWorkspace |
|
6424 | 663 |
|v| |
664 |
||
665 |
v := self selectedWorkspacesTextView. |
|
666 |
^ v notNil and:[v selectionAsString size > 0] |
|
8528 | 667 |
! |
668 |
||
669 |
hasTextInActiveWorkspace |
|
670 |
|v| |
|
671 |
||
672 |
v := self selectedWorkspacesTextView. |
|
673 |
^ v notNil |
|
674 |
and:[v list notEmptyOrNil |
|
675 |
and:[v list contains:[:l | l notEmptyOrNil]]] |
|
5302 | 676 |
! ! |
677 |
||
7650 | 678 |
!MultiViewToolApplication methodsFor:'change & update'! |
679 |
||
8497 | 680 |
infoVisibilityChanged |
681 |
|visible cFrame bottomOffset| |
|
682 |
||
683 |
visible := self infoVisibleHolder value. |
|
684 |
||
685 |
cFrame := builder findComponentAt:#EditorNoteBook. "/ #CodeView. |
|
686 |
cFrame notNil ifTrue:[ |
|
687 |
visible ifFalse:[ |
|
688 |
bottomOffset := 0. |
|
689 |
] ifTrue:[ |
|
690 |
bottomOffset := -25. |
|
691 |
]. |
|
692 |
cFrame layout bottomOffset:bottomOffset. |
|
693 |
cFrame container notNil ifTrue:[ |
|
694 |
cFrame containerChangedSize. |
|
695 |
]. |
|
696 |
]. |
|
697 |
DefaultInfoVisible := visible |
|
698 |
||
699 |
"Created: / 18-02-2007 / 15:01:55 / cg" |
|
700 |
! |
|
701 |
||
702 |
toolBarVisibilityChanged |
|
703 |
|toolBarVisible editToolBarVisible toolBar editToolBar noteBook topOffset| |
|
704 |
||
705 |
topOffset := 0. |
|
706 |
||
707 |
toolBar := self componentAt:#ToolBar. |
|
708 |
toolBar notNil ifTrue:[ |
|
709 |
toolBarVisible := self toolBarVisibleHolder value. |
|
710 |
DefaultToolBarVisible := toolBarVisible. |
|
711 |
toolBarVisible ifTrue:[ |
|
712 |
topOffset := topOffset + toolBar height. |
|
713 |
] |
|
714 |
]. |
|
715 |
||
716 |
editToolBar := self componentAt:#EditToolBar. |
|
717 |
editToolBar notNil ifTrue:[ |
|
718 |
editToolBar layout |
|
719 |
topOffset:topOffset bottomOffset:(topOffset + editToolBar height). |
|
720 |
"/ force it to recompute its dimension |
|
721 |
editToolBar container notNil ifTrue:[ |
|
722 |
editToolBar containerChangedSize. |
|
723 |
]. |
|
724 |
editToolBarVisible := self editToolBarVisibleHolder value. |
|
725 |
DefaultEditToolBarVisible := editToolBarVisible. |
|
726 |
editToolBarVisible ifTrue:[ |
|
727 |
topOffset := topOffset + editToolBar height. |
|
728 |
] |
|
729 |
]. |
|
730 |
||
731 |
noteBook := self componentAt:#NoteBook. |
|
732 |
noteBook notNil ifTrue:[ |
|
733 |
noteBook layout topOffset:topOffset. |
|
734 |
"/ force it to recompute its dimension |
|
735 |
noteBook container notNil ifTrue:[ |
|
736 |
noteBook containerChangedSize. |
|
737 |
]. |
|
738 |
]. |
|
739 |
||
740 |
"Created: / 18-02-2007 / 14:46:22 / cg" |
|
741 |
! |
|
742 |
||
7650 | 743 |
update:something with:aParameter from:changedObject |
8497 | 744 |
((changedObject == self toolBarVisibleHolder) |
745 |
or:[ changedObject == self editToolBarVisibleHolder ]) ifTrue:[ |
|
7650 | 746 |
self toolBarVisibilityChanged. |
747 |
^ self |
|
748 |
]. |
|
7824 | 749 |
changedObject == self infoVisibleHolder ifTrue:[ |
750 |
self infoVisibilityChanged. |
|
751 |
^ self |
|
752 |
]. |
|
7650 | 753 |
^ super update:something with:aParameter from:changedObject |
754 |
||
7824 | 755 |
"Modified: / 14-07-2007 / 16:46:14 / cg" |
7650 | 756 |
! ! |
757 |
||
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
758 |
!MultiViewToolApplication methodsFor:'defaults'! |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
759 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
760 |
defaultFileNameForLoad |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
761 |
^ 'file.txt' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
762 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
763 |
"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
|
764 |
! |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
765 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
766 |
defaultFileNameForSave |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
767 |
^ 'file.txt' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
768 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
769 |
"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
|
770 |
! |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
771 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
772 |
defaultFileNameForSaveAll |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
773 |
^ 'file.txt' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
774 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
775 |
"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
|
776 |
! |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
777 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
778 |
defaultPatternLoad |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
779 |
^ '*.txt' |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
780 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
781 |
"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
|
782 |
! ! |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
783 |
|
7650 | 784 |
!MultiViewToolApplication methodsFor:'initialization'! |
785 |
||
786 |
hideToolBarButtonCreated:aButton |
|
787 |
aButton passiveLevel:(MenuPanel defaultLevel). |
|
788 |
"/ aButton passiveLevel:1. |
|
789 |
aButton activeLevel:-1. |
|
790 |
aButton backgroundColor:(MenuPanel defaultBackgroundColor). |
|
791 |
||
792 |
"Created: / 18-02-2007 / 14:48:28 / cg" |
|
793 |
! |
|
794 |
||
795 |
postBuildWith:aBuilder |
|
796 |
super postBuildWith:aBuilder. |
|
8497 | 797 |
|
7650 | 798 |
self infoVisibleHolder value ifTrue:[ self infoVisibilityChanged ]. |
8497 | 799 |
(self toolBarVisibleHolder value |
800 |
or:[ self editToolBarVisibleHolder value ]) ifTrue:[ self toolBarVisibilityChanged ]. |
|
7650 | 801 |
|
802 |
"Created: / 18-02-2007 / 15:03:08 / cg" |
|
803 |
! ! |
|
804 |
||
5302 | 805 |
!MultiViewToolApplication methodsFor:'menu-actions'! |
806 |
||
807 |
addWindow:aWindow named:name |
|
808 |
^ self addWindow:aWindow named:name asFirst:false |
|
809 |
! |
|
810 |
||
811 |
addWindow:aWindow named:name asFirst:asFirst |
|
812 |
|tabList wsIndex newSelectedIndex| |
|
813 |
||
814 |
tabList := self tabList. |
|
815 |
wsIndex := tabList size + 1. |
|
816 |
wsIndex == 1 ifTrue:[ |
|
817 |
"/ first - add a name for the first tab |
|
818 |
tabList add:(self window label). "/ 'Workspace'. |
|
819 |
wsIndex := wsIndex + 1. |
|
820 |
]. |
|
821 |
||
822 |
workspaces grow:wsIndex. |
|
823 |
asFirst ifTrue:[ |
|
824 |
tabList addFirst:(name bindWith:wsIndex). |
|
825 |
workspaces replaceFrom:2 to:wsIndex with:workspaces startingAt:1. |
|
826 |
newSelectedIndex := 1. |
|
827 |
] ifFalse:[ |
|
828 |
tabList addLast:(name bindWith:wsIndex). |
|
829 |
newSelectedIndex := wsIndex. |
|
830 |
]. |
|
831 |
workspaces at:newSelectedIndex put:aWindow. |
|
832 |
self selectedWorkspaceIndexHolder value:newSelectedIndex. |
|
833 |
"/ workspaceHolder value:aWindow. |
|
834 |
! |
|
835 |
||
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
836 |
addWorkspace |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
837 |
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
|
838 |
! |
e0f701a20cae
remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents:
6354
diff
changeset
|
839 |
|
6458 | 840 |
destroyTab:tabIndex |
841 |
self removeWorkspace:tabIndex |
|
842 |
! |
|
843 |
||
8576 | 844 |
doIt |
845 |
|v| |
|
846 |
||
847 |
(v := self selectedWorkspacesTextView) notNil ifTrue:[ |
|
848 |
v doIt. |
|
849 |
] |
|
850 |
! |
|
851 |
||
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
852 |
loadFile:aFileName |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
853 |
self loadFile:aFileName encoding:nil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
854 |
! |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
855 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
856 |
loadFile:aFileName encoding:encodingSymbolOrNil |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
857 |
|lbl| |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
858 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
859 |
lbl := aFileName asFilename withoutSuffix baseName. |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
860 |
self loadFile:aFileName encoding:encodingSymbolOrNil label:lbl. |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
861 |
! |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
862 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
863 |
loadFile:aFileName encoding:encodingSymbolOrNil label:label |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
864 |
|file ws| |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
865 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
866 |
file := aFileName asFilename. |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
867 |
ws := self selectedWorkspacesTextView. |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
868 |
[ |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
869 |
|contents| |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
870 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
871 |
contents := file contents. |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
872 |
encodingSymbolOrNil notNil ifTrue:[ |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
873 |
contents := contents encodeFrom:encodingSymbolOrNil into:#'unicode'. |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
874 |
ws externalEncoding:encodingSymbolOrNil. |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
875 |
]. |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
876 |
ws contents:contents. |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
877 |
ws defaultFileNameForFileDialog:file pathName. |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
878 |
] on:StreamError do:[:ex| |
8368 | 879 |
Dialog warn:(resources stringWithCRs:'Cannot open "%1":\\%2' with:file asString with:ex description). |
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
880 |
^ self |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
881 |
]. |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
882 |
ws modified:false. |
8033 | 883 |
self setLabel:label. |
7475
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 |
|
7745 | 886 |
loadFile:aFileName label:lbl |
887 |
|encoding| |
|
888 |
||
889 |
encoding := CharacterEncoder guessEncodingOfFile:aFileName. |
|
890 |
(encoding == #'iso8859-1' or:[encoding == #'ascii']) ifTrue:[ |
|
891 |
encoding := nil |
|
892 |
]. |
|
893 |
self loadFile:aFileName encoding:encoding label:lbl. |
|
894 |
||
895 |
"Created: / 15-03-2007 / 11:52:21 / cg" |
|
896 |
! |
|
897 |
||
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
898 |
menuLoad |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
899 |
|file| |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
900 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
901 |
(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
|
902 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
903 |
file := Dialog |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
904 |
requestFileName:(resources string:'Load file') |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
905 |
default:(self defaultFileNameForLoad) |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
906 |
pattern:(self defaultPatternLoad). |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
907 |
file size ~~ 0 ifTrue:[ |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
908 |
self loadFile:file |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
909 |
] |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
910 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
911 |
"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
|
912 |
! |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
913 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
914 |
menuPrint |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
915 |
|ws| |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
916 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
917 |
ws := self selectedWorkspacesTextView. |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
918 |
ws doPrint |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
919 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
920 |
"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
|
921 |
! |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
922 |
|
5302 | 923 |
menuSaveAllAs |
924 |
self |
|
925 |
askForFile:'Save all Buffers into:' |
|
8196 | 926 |
default:(self defaultFileNameForSaveAll) |
5302 | 927 |
thenDo:[:file :doAppend | |
928 |
|ws append| |
|
929 |
||
930 |
append := doAppend. |
|
931 |
workspaces do:[:subView | |
|
932 |
|ws| |
|
933 |
||
934 |
ws := self workspaceViewOfView:subView. |
|
935 |
ws notNil ifTrue:[ |
|
936 |
ws saveAs:file doAppend:append. |
|
937 |
ws modified:false. |
|
938 |
]. |
|
939 |
append := true. |
|
940 |
]. |
|
941 |
] |
|
942 |
! |
|
943 |
||
944 |
menuSaveAs |
|
945 |
self |
|
6408
e0f701a20cae
remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents:
6354
diff
changeset
|
946 |
askForFile:'Save Buffer into:' |
e0f701a20cae
remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents:
6354
diff
changeset
|
947 |
default:(self defaultFileNameForSave) |
5302 | 948 |
thenDo:[:file :doAppend | |
8033 | 949 |
|ws lbl| |
5302 | 950 |
|
951 |
ws := self selectedWorkspacesTextView. |
|
952 |
ws saveAs:file doAppend:doAppend. |
|
953 |
ws modified:false. |
|
8395
3596ebae2d90
changed #defaultFileNameForSave
Claus Gittinger <cg@exept.de>
parents:
8368
diff
changeset
|
954 |
"/ ws defaultFileNameForFileDialog:file asFilename baseName. |
8033 | 955 |
|
956 |
lbl := file asFilename withoutSuffix baseName. |
|
957 |
self setLabel:lbl. |
|
5302 | 958 |
] |
959 |
! |
|
960 |
||
961 |
newWorkspace |
|
6863 | 962 |
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
|
963 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
964 |
"Modified: / 25-10-2006 / 14:39:15 / cg" |
5302 | 965 |
! |
966 |
||
8576 | 967 |
printIt |
968 |
! |
|
969 |
||
5302 | 970 |
removeWorkspace |
971 |
self removeWorkspace:(self selectedWorkspaceIndexHolder value) |
|
972 |
! |
|
973 |
||
974 |
removeWorkspace:wsIndex |
|
975 |
|tabList newWsIndex| |
|
976 |
||
977 |
wsIndex == self selectedWorkspaceIndexHolder value ifTrue:[ |
|
6509 | 978 |
(self askIfModified:'Text was modified. Remove buffer anyway ?' yesButton:'Remove Buffer') ifFalse:[ |
5302 | 979 |
^ self |
980 |
]. |
|
981 |
]. |
|
982 |
||
983 |
tabList := self tabList. |
|
984 |
||
985 |
wsIndex == tabList size ifTrue:[ |
|
986 |
newWsIndex := wsIndex - 1. |
|
987 |
] ifFalse:[ |
|
988 |
newWsIndex := wsIndex. |
|
989 |
]. |
|
990 |
||
991 |
tabList removeIndex:wsIndex. |
|
992 |
(workspaces at:wsIndex) destroy. |
|
993 |
workspaces removeIndex:wsIndex. |
|
994 |
||
995 |
tabList size == 1 ifTrue:[ |
|
996 |
self window label:(tabList at:1). |
|
997 |
tabList removeIndex:1 |
|
998 |
]. |
|
999 |
||
1000 |
workspaceHolder value:(workspaces at:newWsIndex). |
|
1001 |
self selectedWorkspaceIndexHolder value:newWsIndex. |
|
1002 |
"/ to force change (update workspaceHolder - even if same index) |
|
1003 |
self selectedWorkspaceIndexHolder changed:#value. |
|
1004 |
! |
|
1005 |
||
1006 |
renameWorkspace |
|
1007 |
self renameWorkspace:(self selectedWorkspaceIndexHolder value) |
|
1008 |
! |
|
1009 |
||
1010 |
renameWorkspace:wsIndex |
|
1011 |
|tabList oldName newName| |
|
1012 |
||
1013 |
tabList := self tabList. |
|
1014 |
tabList isEmpty ifTrue:[ |
|
1015 |
oldName := self window label |
|
1016 |
] ifFalse:[ |
|
1017 |
oldName := tabList at:wsIndex. |
|
1018 |
]. |
|
1019 |
newName := Dialog request:(resources string:'New Name for %1:' with:oldName) initialAnswer:oldName. |
|
1020 |
newName size == 0 ifTrue:[ ^ self]. |
|
1021 |
||
1022 |
self renameWorkspace:wsIndex to:newName. |
|
1023 |
! |
|
1024 |
||
1025 |
renameWorkspace:wsIndex to:newName |
|
1026 |
|tabList| |
|
1027 |
||
1028 |
tabList := self tabList. |
|
1029 |
tabList notEmpty ifTrue:[ |
|
1030 |
tabList at:wsIndex put:newName. |
|
1031 |
]. |
|
1032 |
wsIndex == self selectedWorkspaceIndexHolder value ifTrue:[ |
|
1033 |
self window label:newName. |
|
1034 |
]. |
|
1035 |
! ! |
|
1036 |
||
1037 |
!MultiViewToolApplication methodsFor:'menu-actions-editing'! |
|
1038 |
||
1039 |
copySelection |
|
8498 | 1040 |
|v| |
1041 |
||
1042 |
(v := self selectedWorkspacesTextView) notNil ifTrue:[ |
|
1043 |
v copySelection |
|
1044 |
] |
|
5302 | 1045 |
! |
1046 |
||
1047 |
cutSelection |
|
8498 | 1048 |
|v| |
1049 |
||
1050 |
(v := self selectedWorkspacesTextView) notNil ifTrue:[ |
|
1051 |
v cutSelection |
|
1052 |
]. |
|
5302 | 1053 |
! |
1054 |
||
1055 |
paste |
|
8498 | 1056 |
|v| |
1057 |
||
1058 |
(v := self selectedWorkspacesTextView) notNil ifTrue:[ |
|
1059 |
v paste |
|
1060 |
] |
|
5302 | 1061 |
! |
1062 |
||
1063 |
paste:aString |
|
1064 |
self selectedWorkspacesTextView paste:aString. |
|
1065 |
! |
|
1066 |
||
8509 | 1067 |
redo |
1068 |
|v| |
|
1069 |
||
1070 |
(v := self selectedWorkspacesTextView) notNil ifTrue:[ |
|
1071 |
v redo. |
|
1072 |
] |
|
1073 |
! |
|
1074 |
||
8498 | 1075 |
search |
1076 |
|v| |
|
1077 |
||
1078 |
(v := self selectedWorkspacesTextView) notNil ifTrue:[ |
|
1079 |
v search. |
|
1080 |
] |
|
1081 |
! |
|
1082 |
||
5302 | 1083 |
selectAll |
8498 | 1084 |
|v| |
1085 |
||
1086 |
(v := self selectedWorkspacesTextView) notNil ifTrue:[ |
|
1087 |
v selectAll. |
|
1088 |
] |
|
8509 | 1089 |
! |
1090 |
||
1091 |
undo |
|
1092 |
|v| |
|
1093 |
||
1094 |
(v := self selectedWorkspacesTextView) notNil ifTrue:[ |
|
1095 |
v undo. |
|
1096 |
] |
|
5302 | 1097 |
! ! |
1098 |
||
1099 |
!MultiViewToolApplication methodsFor:'private'! |
|
1100 |
||
6408
e0f701a20cae
remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents:
6354
diff
changeset
|
1101 |
askForFile:question default:defaultFilename thenDo:aBlock |
5302 | 1102 |
Dialog |
1103 |
requestSaveFileName:(resources string:question) |
|
6408
e0f701a20cae
remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents:
6354
diff
changeset
|
1104 |
default:defaultFilename |
5302 | 1105 |
fromDirectory:nil |
1106 |
action:[:fileName | aBlock value:fileName value:false] |
|
1107 |
appendAction:[:fileName | aBlock value:fileName value:true] |
|
1108 |
||
1109 |
"/ |file doAppend| |
|
1110 |
"/ |
|
1111 |
"/ doAppend := false. |
|
1112 |
"/ Dialog aboutToOpenBoxNotificationSignal handle:[:n | |
|
1113 |
"/ |box| |
|
1114 |
"/ |
|
1115 |
"/ box := n parameter. |
|
1116 |
"/ box addButton:(Button label:'Append' action:[doAppend := true. box okPressed]). |
|
1117 |
"/ n proceed. |
|
1118 |
"/ ] do:[ |
|
1119 |
"/ file := Dialog requestFileName:question default:'file.wsp'. |
|
1120 |
"/ ]. |
|
1121 |
"/ file isEmptyOrNil ifFalse:[ |
|
1122 |
"/ aBlock value:file value:doAppend |
|
1123 |
"/ ]. |
|
1124 |
! |
|
1125 |
||
6408
e0f701a20cae
remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents:
6354
diff
changeset
|
1126 |
askForFile:question thenDo:aBlock |
e0f701a20cae
remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents:
6354
diff
changeset
|
1127 |
^ self |
e0f701a20cae
remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents:
6354
diff
changeset
|
1128 |
askForFile:question default:'file.wsp' thenDo:aBlock |
e0f701a20cae
remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents:
6354
diff
changeset
|
1129 |
! |
e0f701a20cae
remember last-saved fileName for next default
Claus Gittinger <cg@exept.de>
parents:
6354
diff
changeset
|
1130 |
|
5302 | 1131 |
askIfAnyModified:arg1 yesButton:arg2 |
1132 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1133 |
||
1134 |
^ self subclassResponsibility |
|
1135 |
! |
|
1136 |
||
1137 |
askIfModified:question yesButton:yesButtonText |
|
1138 |
"tell user, that code has been modified - let her confirm" |
|
1139 |
||
1140 |
|textView| |
|
1141 |
||
1142 |
textView := self selectedWorkspace. |
|
1143 |
(self isModifiedWorkspace:textView) ifFalse:[^ true]. |
|
1144 |
||
1145 |
(Dialog |
|
6354 | 1146 |
confirm:(resources stringWithCRs:question) |
6634 | 1147 |
yesLabel:(resources string:yesButtonText) |
1148 |
noLabel:(resources string:'Cancel')) |
|
5302 | 1149 |
ifTrue:[ |
1150 |
"/ reset modified flag so question is asked only once |
|
1151 |
textView modified:false. |
|
1152 |
^ true |
|
1153 |
]. |
|
1154 |
^ false |
|
1155 |
||
1156 |
"Modified: 2.10.1997 / 14:23:47 / stefan" |
|
1157 |
! |
|
1158 |
||
1159 |
createWorkspace |
|
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1160 |
|ws| |
5302 | 1161 |
|
7475
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1162 |
ws := (HVScrollableView for:EditTextView). |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1163 |
^ ws |
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1164 |
|
54b889153fc7
refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents:
6863
diff
changeset
|
1165 |
"Modified: / 25-10-2006 / 14:34:19 / cg" |
5302 | 1166 |
! |
1167 |
||
1168 |
isModifiedWorkspace:aView |
|
1169 |
self subclassResponsibility |
|
1170 |
! |
|
1171 |
||
1172 |
selectedWorkspacesTextView |
|
1173 |
^ self workspaceViewOfView:(self selectedWorkspace) |
|
1174 |
! |
|
1175 |
||
8033 | 1176 |
setLabel:label |
1177 |
tabList size > 1 ifTrue:[ |
|
1178 |
tabList at:self selectedWorkspaceIndexHolder value put:label |
|
1179 |
]. |
|
1180 |
self window label:label. |
|
1181 |
! |
|
1182 |
||
5302 | 1183 |
workspaceSelectionChanged |
1184 |
|wsIndex windowLabel v| |
|
1185 |
||
1186 |
"/ self selected |
|
1187 |
self workspaceHolder value:(v := self selectedWorkspace). |
|
1188 |
wsIndex := self selectedWorkspaceIndexHolder value. |
|
1189 |
||
1190 |
wsIndex ~~ 0 ifTrue:[ |
|
1191 |
windowLabel := tabList at:wsIndex ifAbsent:nil. |
|
1192 |
windowLabel notNil ifTrue:[self window label:windowLabel]. |
|
1193 |
]. |
|
1194 |
! |
|
1195 |
||
1196 |
workspaceViewOfView:aView |
|
1197 |
|view| |
|
1198 |
||
1199 |
view := aView. |
|
7663 | 1200 |
|
5302 | 1201 |
(view isScrollWrapper) ifTrue:[ |
1202 |
view := view scrolledView. |
|
1203 |
view isNil ifTrue:[^ nil]. |
|
1204 |
]. |
|
7663 | 1205 |
|
5302 | 1206 |
(view isTextView) ifFalse:[ |
7663 | 1207 |
(view isKindOf:InspectorView) ifTrue:[ |
1208 |
view := view workspace. |
|
1209 |
(view isScrollWrapper) ifTrue:[ |
|
1210 |
view := view scrolledView |
|
1211 |
]. |
|
5302 | 1212 |
]. |
1213 |
]. |
|
7663 | 1214 |
(view isTextView) ifTrue:[^ view]. |
1215 |
^ view allSubViewsDetect:[:v| v name = #Workspace] ifNone:nil. |
|
5302 | 1216 |
! ! |
1217 |
||
7650 | 1218 |
!MultiViewToolApplication methodsFor:'user actions'! |
1219 |
||
8497 | 1220 |
hideEditToolbar |
1221 |
self editToolBarVisibleHolder value:false |
|
1222 |
! |
|
1223 |
||
7650 | 1224 |
hideToolbar |
1225 |
self toolBarVisibleHolder value:false |
|
1226 |
||
1227 |
"Created: / 18-02-2007 / 14:55:54 / cg" |
|
1228 |
! ! |
|
1229 |
||
5302 | 1230 |
!MultiViewToolApplication class methodsFor:'documentation'! |
1231 |
||
1232 |
version |
|
8615 | 1233 |
^ '$Header: /cvs/stx/stx/libtool/MultiViewToolApplication.st,v 1.31 2009-05-10 09:32:56 cg Exp $' |
5302 | 1234 |
! ! |