author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 13 Mar 2019 13:54:14 +0000 | |
changeset 148 | 7d2d523173af |
parent 124 | 3cce4791af34 |
child 151 | bc7626f46210 |
permissions | -rw-r--r-- |
49
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
46
diff
changeset
|
1 |
" |
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
46
diff
changeset
|
2 |
jv:vdb - Visual / VM Debugger |
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
46
diff
changeset
|
3 |
Copyright (C) 2015-now Jan Vrany |
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
46
diff
changeset
|
4 |
|
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
46
diff
changeset
|
5 |
This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License' |
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
46
diff
changeset
|
6 |
|
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
46
diff
changeset
|
7 |
You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/ |
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
46
diff
changeset
|
8 |
" |
0 | 9 |
"{ Package: 'jv:vdb' }" |
10 |
||
40
d766d4c854a2
Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
11 |
"{ NameSpace: Smalltalk }" |
d766d4c854a2
Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
12 |
|
0 | 13 |
ApplicationModel subclass:#VDBAbstractApplication |
124
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
14 |
instanceVariableNames:'window windowVisible debuggerHolder debugger titleHolder' |
94
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
15 |
classVariableNames:'DefaultTextFont DefaultMenuFont' |
0 | 16 |
poolDictionaries:'' |
17 |
category:'VDB-UI-Abstract' |
|
18 |
! |
|
19 |
||
49
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
46
diff
changeset
|
20 |
!VDBAbstractApplication class methodsFor:'documentation'! |
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
46
diff
changeset
|
21 |
|
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
46
diff
changeset
|
22 |
copyright |
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
46
diff
changeset
|
23 |
" |
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
46
diff
changeset
|
24 |
jv:vdb - Visual / VM Debugger |
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
46
diff
changeset
|
25 |
Copyright (C) 2015-now Jan Vrany |
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
46
diff
changeset
|
26 |
|
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
46
diff
changeset
|
27 |
This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License' |
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
46
diff
changeset
|
28 |
|
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
46
diff
changeset
|
29 |
You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/ |
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
46
diff
changeset
|
30 |
" |
2ec7f7ed9242
License this package under 'Creative Commons Attribution-NonCommercial 4.0 International License'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
46
diff
changeset
|
31 |
! ! |
16
fc1898815ab6
Temporary commit: some more work on displaying source code.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13
diff
changeset
|
32 |
|
94
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
33 |
!VDBAbstractApplication class methodsFor:'accessing - defaults'! |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
34 |
|
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
35 |
defaultMenuFont |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
36 |
"Return a default font to be used in list and text views. VDB UI is designed |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
37 |
so that it expects thos font to be monospaced but does not enforce it." |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
38 |
|
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
39 |
DefaultMenuFont isNil ifTrue:[ ^ MenuPanel defaultFont asSize: self defaultTextFont size ]. |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
40 |
^ DefaultMenuFont |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
41 |
|
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
42 |
"Created: / 31-08-2018 / 08:41:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
43 |
! |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
44 |
|
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
45 |
defaultTextFont |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
46 |
"Return a default font to be used in list and text views. VDB UI is designed |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
47 |
so that it expects thos font to be monospaced but does not enforce it." |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
48 |
|
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
49 |
DefaultTextFont isNil ifTrue:[ ^ CodeView defaultFont ]. |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
50 |
^ DefaultTextFont |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
51 |
|
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
52 |
"Created: / 20-08-2018 / 10:49:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
53 |
! |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
54 |
|
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
55 |
defaultTextFont: aFont |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
56 |
"Set a default font to be used in list and text views. VDB UI is designed |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
57 |
so that it expects thos font to be monospaced but does not enforce it." |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
58 |
|
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
59 |
DefaultTextFont := aFont |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
60 |
|
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
61 |
"Created: / 20-08-2018 / 10:54:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
115
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
62 |
! |
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
63 |
|
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
64 |
defaultWindowTitle |
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
65 |
"Returns default window title for this application. By default, |
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
66 |
extracts the title from #windowSpec. |
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
67 |
|
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
68 |
Subclasses may (must) override this method." |
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
69 |
|
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
70 |
| m | |
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
71 |
|
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
72 |
m := self class lookupMethodFor: #windowSpec. |
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
73 |
m mclass theNonMetaclass isAbstract ifTrue:[ |
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
74 |
self subclassResponsibility: 'Override #defaultWindowTitle in concrete classes'. |
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
75 |
]. |
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
76 |
^ (self defaultWindowTitleFromSpec: self windowSpec) ? (self name) |
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
77 |
|
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
78 |
"Created: / 03-10-2018 / 15:36:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
79 |
! |
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
80 |
|
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
81 |
defaultWindowTitleFromSpec: spec |
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
82 |
"Given a window spec, return the specified (window) label. |
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
83 |
If no window label is specified, retun `nil`" |
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
84 |
|
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
85 |
spec do: [:e | |
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
86 |
(e isArray and:[ e first == #WindowSpec ]) ifTrue:[ |
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
87 |
^ self resources string: (e at: 3) |
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
88 |
] |
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
89 |
]. |
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
90 |
^ nil |
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
91 |
|
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
92 |
"Created: / 03-10-2018 / 15:44:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
94
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
93 |
! ! |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
94 |
|
0 | 95 |
!VDBAbstractApplication class methodsFor:'interface opening'! |
96 |
||
97 |
openFor: debugger |
|
98 |
self new |
|
99 |
debugger: debugger; |
|
100 |
open. |
|
101 |
||
102 |
"Created: / 06-06-2014 / 21:35:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
103 |
! ! |
|
104 |
||
40
d766d4c854a2
Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
105 |
!VDBAbstractApplication class methodsFor:'interface specs'! |
d766d4c854a2
Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
106 |
|
d766d4c854a2
Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
107 |
windowSpec |
d766d4c854a2
Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
108 |
self subclassResponsibility |
d766d4c854a2
Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
109 |
|
d766d4c854a2
Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
110 |
"Created: / 01-06-2017 / 12:14:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
d766d4c854a2
Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
111 |
! ! |
d766d4c854a2
Cleanup in debugger and inferior console applications to catch up changes in `jv:libgdbs`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
112 |
|
0 | 113 |
!VDBAbstractApplication class methodsFor:'plugin spec'! |
114 |
||
115 |
aspectSelectors |
|
116 |
^ #( |
|
117 |
debuggerHolder |
|
118 |
) |
|
119 |
||
120 |
"Created: / 06-06-2014 / 21:47:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
121 |
! ! |
|
122 |
||
1
09b3ef5606e7
Added simple event log application. Initial stub for application containers (docking panels)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
123 |
!VDBAbstractApplication class methodsFor:'testing'! |
09b3ef5606e7
Added simple event log application. Initial stub for application containers (docking panels)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
124 |
|
09b3ef5606e7
Added simple event log application. Initial stub for application containers (docking panels)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
125 |
isAbstract |
09b3ef5606e7
Added simple event log application. Initial stub for application containers (docking panels)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
126 |
^ self == VDBAbstractApplication |
09b3ef5606e7
Added simple event log application. Initial stub for application containers (docking panels)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
127 |
! ! |
09b3ef5606e7
Added simple event log application. Initial stub for application containers (docking panels)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
128 |
|
0 | 129 |
!VDBAbstractApplication methodsFor:'acessing'! |
130 |
||
131 |
debugger |
|
132 |
^ debugger |
|
133 |
||
134 |
"Created: / 06-06-2014 / 21:37:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
135 |
! |
|
136 |
||
137 |
debugger: dbg |
|
138 |
self debuggerHolder value: dbg |
|
139 |
||
140 |
"Created: / 06-06-2014 / 21:36:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
141 |
! |
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
142 |
|
13
d06924d8ca0a
Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12
diff
changeset
|
143 |
masterApplication: anApplicationModel |
d06924d8ca0a
Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12
diff
changeset
|
144 |
super masterApplication: anApplicationModel. |
d06924d8ca0a
Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12
diff
changeset
|
145 |
(anApplicationModel isKindOf: VDBAbstractApplication) ifTrue:[ |
d06924d8ca0a
Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12
diff
changeset
|
146 |
self debuggerHolder: anApplicationModel debuggerHolder. |
d06924d8ca0a
Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12
diff
changeset
|
147 |
]. |
d06924d8ca0a
Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12
diff
changeset
|
148 |
|
d06924d8ca0a
Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12
diff
changeset
|
149 |
"Created: / 17-09-2014 / 22:45:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
d06924d8ca0a
Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12
diff
changeset
|
150 |
! |
d06924d8ca0a
Minor fixes in UI - allow to open stack window as floating tool window.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12
diff
changeset
|
151 |
|
94
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
152 |
menuFont |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
153 |
"Return a Font to be used in pinned menu panels. Default value |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
154 |
is to use menu's default font at the same size at #textFont" |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
155 |
|
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
156 |
^ self class defaultMenuFont |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
157 |
|
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
158 |
"Created: / 31-08-2018 / 08:38:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
159 |
! |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
160 |
|
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
161 |
textFont |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
162 |
"Return a Font to be used in list and text views. VDB UI is designed |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
163 |
so that it expects thos font to be monospaced but does not enforce it." |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
164 |
|
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
165 |
^ self class defaultTextFont |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
166 |
|
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
167 |
"Created: / 20-08-2018 / 10:14:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
168 |
! |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
169 |
|
5
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
170 |
title |
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
171 |
^ self titleHolder value |
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
172 |
|
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
173 |
"Created: / 10-06-2014 / 14:53:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
174 |
! |
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
175 |
|
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
176 |
title: aString |
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
177 |
self titleHolder value: aString |
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
178 |
|
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
179 |
"Created: / 10-06-2014 / 14:53:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
0 | 180 |
! ! |
181 |
||
182 |
!VDBAbstractApplication methodsFor:'aspects'! |
|
183 |
||
184 |
debuggerHolder |
|
185 |
"return/create the 'debuggerHolder' value holder (automatically generated)" |
|
186 |
||
187 |
debuggerHolder isNil ifTrue:[ |
|
188 |
debuggerHolder := ValueHolder new. |
|
189 |
debuggerHolder addDependent:self. |
|
190 |
]. |
|
191 |
^ debuggerHolder |
|
192 |
! |
|
193 |
||
194 |
debuggerHolder:aValueModel |
|
195 |
"set the 'debuggerHolder' value holder (automatically generated)" |
|
196 |
||
197 |
|oldValue newValue| |
|
198 |
||
199 |
debuggerHolder notNil ifTrue:[ |
|
200 |
oldValue := debuggerHolder value. |
|
201 |
debuggerHolder removeDependent:self. |
|
202 |
]. |
|
203 |
debuggerHolder := aValueModel. |
|
204 |
debuggerHolder notNil ifTrue:[ |
|
205 |
debuggerHolder addDependent:self. |
|
206 |
]. |
|
207 |
newValue := debuggerHolder value. |
|
208 |
oldValue ~~ newValue ifTrue:[ |
|
209 |
self update:#value with:newValue from:debuggerHolder. |
|
210 |
]. |
|
5
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
211 |
! |
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
212 |
|
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
213 |
titleHolder |
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
214 |
"return/create the 'titleHolder' value holder (automatically generated)" |
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
215 |
|
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
216 |
titleHolder isNil ifTrue:[ |
115
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
217 |
titleHolder := ValueHolder with: self class defaultWindowTitle |
5
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
218 |
]. |
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
219 |
^ titleHolder |
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
220 |
|
115
0dd989ce3ae7
Cleanup default window titles
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
113
diff
changeset
|
221 |
"Modified: / 03-10-2018 / 15:36:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
0 | 222 |
! ! |
223 |
||
63
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
224 |
!VDBAbstractApplication methodsFor:'binding access'! |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
225 |
|
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
226 |
menuExtendersFor: key do: block |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
227 |
"Evaluates a block for each selector that extends particular menu. |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
228 |
Extender methods have to be annotated by <menuextension: key> annotation |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
229 |
and must take one argument (an instance of Menu that the menu extension |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
230 |
extends." |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
231 |
|
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
232 |
| cls | |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
233 |
|
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
234 |
cls := self class. |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
235 |
[ cls notNil ] whileTrue:[ |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
236 |
cls selectorsAndMethodsDo:[ :selector :method | |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
237 |
method annotationsAt: #menuextension: do: [ :annotation | |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
238 |
annotation arguments first == key ifTrue:[ |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
239 |
block value: selector |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
240 |
]. |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
241 |
] |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
242 |
]. |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
243 |
cls := cls superclass. |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
244 |
]. |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
245 |
|
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
246 |
"Created: / 25-01-2014 / 12:40:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
247 |
"Modified: / 24-02-2014 / 22:44:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
248 |
! |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
249 |
|
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
250 |
menuFor:key |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
251 |
| menu | |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
252 |
|
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
253 |
menu := super menuFor: key. |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
254 |
thisContext isRecursive ifFalse:[ |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
255 |
self menuExtendersFor: key do:[:each | |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
256 |
self perform: each with: menu |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
257 |
]. |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
258 |
]. |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
259 |
|
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
260 |
^ menu |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
261 |
|
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
262 |
"Modified: / 18-06-1998 / 20:33:56 / cg" |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
263 |
"Modified (comment): / 06-02-2018 / 20:35:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
264 |
! ! |
b8c6b168d25f
Introduced menu extension points
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
62
diff
changeset
|
265 |
|
0 | 266 |
!VDBAbstractApplication methodsFor:'change & update'! |
267 |
||
58
df46b9c82b38
Variable objects: highlight values that have changed since last "view"
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
50
diff
changeset
|
268 |
enqueueDelayedUpdate: selector |
113
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
269 |
"Arrange for and update to be processed 'later' some time. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
270 |
There's no time guarantee on when it'd be processed but |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
271 |
if if more updates are delayed, they're guaranteed to |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
272 |
process in order." |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
273 |
|
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
274 |
| w wg | |
59
e7d0453109a1
Variable objects: splitted `VDBFrameApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
58
diff
changeset
|
275 |
|
113
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
276 |
|
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
277 |
"/ Technicallly, this is done by pushing an user event onto |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
278 |
"/ and event queue and leting window's event dispatcher to |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
279 |
"/ trigger the update. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
280 |
"/ |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
281 |
"/ However, the complication comes when updated is enqueued |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
282 |
"/ for application which is is not fully initialized or it is |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
283 |
"/ not shown (such as in tab which is not visible). In that |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
284 |
"/ case there's no sensor (event queue) associated with |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
285 |
"/ application's (sub) window. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
286 |
"/ |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
287 |
"/ Since these updates re often equeued from an GDB event handler |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
288 |
"/ and since they often involve sending more commands to GDB, we |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
289 |
"/ really need them to be processed within an window event queue - |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
290 |
"/ sending commands from GDB event dispatch process is not permitted |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
291 |
"/ by GDB API. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
292 |
"/ |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
293 |
"/ Hence, if there's no sensor already set up for the window, use |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
294 |
"/ `WindowGroup activeGroup sensor`. In most cases that'd be the |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
295 |
"/ "right" one. If it's not, it should not harm. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
296 |
"/ |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
297 |
"/ If there's no active window group, then process the |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
298 |
"/ udate in special separate thread. This should be rare. |
59
e7d0453109a1
Variable objects: splitted `VDBFrameApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
58
diff
changeset
|
299 |
w := self window. |
113
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
300 |
w notNil ifTrue:[ |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
301 |
wg := w windowGroup. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
302 |
]. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
303 |
wg isNil ifTrue:[ |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
304 |
wg := WindowGroup activeGroup |
59
e7d0453109a1
Variable objects: splitted `VDBFrameApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
58
diff
changeset
|
305 |
]. |
113
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
306 |
wg notNil ifTrue:[ |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
307 |
wg sensor pushUserEvent: selector for:self |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
308 |
] ifFalse:[ |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
309 |
[ self perform: selector ] fork. |
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
310 |
] |
58
df46b9c82b38
Variable objects: highlight values that have changed since last "view"
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
50
diff
changeset
|
311 |
|
df46b9c82b38
Variable objects: highlight values that have changed since last "view"
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
50
diff
changeset
|
312 |
"Created: / 17-01-2018 / 06:50:29 / jv" |
113
1a40f33af921
UI: Show disassembly along with source code
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
112
diff
changeset
|
313 |
"Modified (format): / 03-10-2018 / 15:22:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
58
df46b9c82b38
Variable objects: highlight values that have changed since last "view"
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
50
diff
changeset
|
314 |
! |
df46b9c82b38
Variable objects: highlight values that have changed since last "view"
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
50
diff
changeset
|
315 |
|
df46b9c82b38
Variable objects: highlight values that have changed since last "view"
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
50
diff
changeset
|
316 |
enqueueDelayedUpdate: selector with: argument |
59
e7d0453109a1
Variable objects: splitted `VDBFrameApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
58
diff
changeset
|
317 |
| w | |
e7d0453109a1
Variable objects: splitted `VDBFrameApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
58
diff
changeset
|
318 |
|
e7d0453109a1
Variable objects: splitted `VDBFrameApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
58
diff
changeset
|
319 |
w := self window. |
e7d0453109a1
Variable objects: splitted `VDBFrameApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
58
diff
changeset
|
320 |
w notNil ifTrue:[ |
e7d0453109a1
Variable objects: splitted `VDBFrameApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
58
diff
changeset
|
321 |
self window sensor pushUserEvent: selector for:self withArgument: argument |
e7d0453109a1
Variable objects: splitted `VDBFrameApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
58
diff
changeset
|
322 |
] ifFalse:[ |
e7d0453109a1
Variable objects: splitted `VDBFrameApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
58
diff
changeset
|
323 |
self perform: selector with: argument |
e7d0453109a1
Variable objects: splitted `VDBFrameApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
58
diff
changeset
|
324 |
]. |
58
df46b9c82b38
Variable objects: highlight values that have changed since last "view"
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
50
diff
changeset
|
325 |
|
df46b9c82b38
Variable objects: highlight values that have changed since last "view"
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
50
diff
changeset
|
326 |
"Created: / 17-01-2018 / 06:50:39 / jv" |
59
e7d0453109a1
Variable objects: splitted `VDBFrameApplication`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
58
diff
changeset
|
327 |
"Modified: / 03-02-2018 / 08:10:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
58
df46b9c82b38
Variable objects: highlight values that have changed since last "view"
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
50
diff
changeset
|
328 |
! |
df46b9c82b38
Variable objects: highlight values that have changed since last "view"
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
50
diff
changeset
|
329 |
|
124
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
330 |
update:aspect with:aParameter from:changedObject |
0 | 331 |
"Invoked when an object that I depend upon sends a change notification." |
332 |
||
333 |
changedObject == debuggerHolder ifTrue:[ |
|
334 |
debuggerHolder value == debugger ifFalse:[ |
|
335 |
debugger notNil ifTrue:[ |
|
336 |
self unsubscribe. |
|
337 |
]. |
|
338 |
debugger := debuggerHolder value. |
|
339 |
debugger notNil ifTrue:[ |
|
340 |
self subscribe. |
|
341 |
]. |
|
342 |
]. |
|
343 |
^ self. |
|
344 |
]. |
|
124
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
345 |
changedObject == window ifTrue:[ |
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
346 |
aspect == #visibility ifTrue:[ |
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
347 |
windowVisible ~~ window shown ifTrue:[ |
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
348 |
windowVisible := window shown. |
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
349 |
self updateAfterWindowVisibilityChanged. |
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
350 |
]. |
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
351 |
|
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
352 |
]. |
0 | 353 |
|
124
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
354 |
]. |
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
355 |
|
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
356 |
super update:aspect with:aParameter from:changedObject |
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
357 |
|
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
358 |
"Modified: / 07-10-2018 / 22:51:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
359 |
! |
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
360 |
|
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
361 |
updateAfterWindowVisibilityChanged |
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
362 |
"/ Nothing by default, to be overriden by subclasses. |
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
363 |
|
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
364 |
"Created: / 07-10-2018 / 22:51:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
0 | 365 |
! ! |
366 |
||
367 |
!VDBAbstractApplication methodsFor:'dependents access'! |
|
368 |
||
369 |
release |
|
370 |
"remove all dependencies from the receiver" |
|
371 |
||
372 |
super release. |
|
373 |
self unsubscribe |
|
374 |
||
375 |
"Created: / 06-06-2014 / 22:13:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
376 |
! ! |
|
377 |
||
46
6b857f3cec8c
Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
378 |
!VDBAbstractApplication methodsFor:'hooks'! |
6b857f3cec8c
Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
379 |
|
124
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
380 |
commonPostBuild |
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
381 |
builder window isApplicationSubView ifTrue:[ |
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
382 |
window := builder window. |
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
383 |
windowVisible := window shown. |
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
384 |
window addDependent: self. |
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
385 |
]. |
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
386 |
|
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
387 |
"Created: / 07-10-2018 / 21:09:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
388 |
! |
3cce4791af34
Send `#updateAfterVisitiblityChanged` to an application when visibility of its window changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
389 |
|
46
6b857f3cec8c
Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
390 |
postBuildWith:aBuilder |
6b857f3cec8c
Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
391 |
super postBuildWith: aBuilder. |
6b857f3cec8c
Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
392 |
(aBuilder window respondsTo: #labelChannel:) ifTrue:[ |
6b857f3cec8c
Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
393 |
aBuilder window labelChannel: self titleHolder. |
6b857f3cec8c
Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
394 |
]. |
6b857f3cec8c
Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
395 |
|
6b857f3cec8c
Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
396 |
"Created: / 11-07-2017 / 16:33:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6b857f3cec8c
Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
397 |
"Modified: / 11-07-2017 / 19:37:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6b857f3cec8c
Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
398 |
! ! |
6b857f3cec8c
Initial support for breakpoints
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
399 |
|
0 | 400 |
!VDBAbstractApplication methodsFor:'initialization & release'! |
401 |
||
402 |
subscribe |
|
403 |
"Register for debugger events. To be overrided by subclasses" |
|
404 |
||
405 |
"Created: / 06-06-2014 / 21:26:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
406 |
! |
|
407 |
||
408 |
unsubscribe |
|
409 |
"Unsubscribe myself fo debugger events" |
|
41
25d1418e3316
Close debugger window when debugger quits.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
40
diff
changeset
|
410 |
(debugger notNil and:[debugger isConnected]) ifTrue:[ |
5
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
411 |
debugger announcer unsubscribe: self. |
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
412 |
]. |
0 | 413 |
|
414 |
"Created: / 06-06-2014 / 21:26:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
41
25d1418e3316
Close debugger window when debugger quits.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
40
diff
changeset
|
415 |
"Modified: / 01-06-2017 / 13:43:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
0 | 416 |
! ! |
417 |
||
12
b17ffe0604f0
Added debug menu to VDBDebuggerApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
418 |
!VDBAbstractApplication methodsFor:'menu actions'! |
b17ffe0604f0
Added debug menu to VDBDebuggerApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
419 |
|
62
8a52495c2108
UI: avoid flickering when updating variable object list
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
59
diff
changeset
|
420 |
doInspectApplication |
8a52495c2108
UI: avoid flickering when updating variable object list
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
59
diff
changeset
|
421 |
self inspect |
8a52495c2108
UI: avoid flickering when updating variable object list
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
59
diff
changeset
|
422 |
|
8a52495c2108
UI: avoid flickering when updating variable object list
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
59
diff
changeset
|
423 |
"Created: / 06-02-2018 / 12:54:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
8a52495c2108
UI: avoid flickering when updating variable object list
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
59
diff
changeset
|
424 |
! |
8a52495c2108
UI: avoid flickering when updating variable object list
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
59
diff
changeset
|
425 |
|
12
b17ffe0604f0
Added debug menu to VDBDebuggerApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
426 |
doInspectDebugger |
b17ffe0604f0
Added debug menu to VDBDebuggerApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
427 |
debugger inspect |
b17ffe0604f0
Added debug menu to VDBDebuggerApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
428 |
|
b17ffe0604f0
Added debug menu to VDBDebuggerApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
429 |
"Modified: / 09-09-2014 / 00:09:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
b17ffe0604f0
Added debug menu to VDBDebuggerApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
430 |
! |
b17ffe0604f0
Added debug menu to VDBDebuggerApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
431 |
|
b17ffe0604f0
Added debug menu to VDBDebuggerApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
432 |
doInspectSessionRecord |
b17ffe0604f0
Added debug menu to VDBDebuggerApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
433 |
(debugger instVarNamed:#connection) recorder inspect |
b17ffe0604f0
Added debug menu to VDBDebuggerApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
434 |
|
b17ffe0604f0
Added debug menu to VDBDebuggerApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
435 |
"Created: / 09-09-2014 / 00:12:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
66
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
436 |
! |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
437 |
|
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
438 |
doOpenToolApplication:application |
84
74080a37751a
UI: fixed bug when clofing a tool window closed the whole debugger
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
66
diff
changeset
|
439 |
application allButOpen. |
74080a37751a
UI: fixed bug when clofing a tool window closed the whole debugger
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
66
diff
changeset
|
440 |
application masterApplication: self topMasterApplication. |
66
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
441 |
self doOpenToolWindow: application window |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
442 |
|
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
443 |
"Created: / 11-06-2017 / 20:21:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
84
74080a37751a
UI: fixed bug when clofing a tool window closed the whole debugger
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
66
diff
changeset
|
444 |
"Modified: / 29-07-2018 / 16:30:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
66
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
445 |
! |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
446 |
|
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
447 |
doOpenToolApplicationClass:applicationClassName |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
448 |
| applicationClass application | |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
449 |
|
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
450 |
applicationClass := Smalltalk at:applicationClassName asSymbol. |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
451 |
applicationClass isNil ifTrue:[ |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
452 |
Dialog |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
453 |
warn:('No application class named %1' bindWith:applicationClassName). |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
454 |
^ self. |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
455 |
]. |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
456 |
application := applicationClass new. |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
457 |
application debuggerHolder:self debuggerHolder. |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
458 |
self doOpenToolApplication:application |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
459 |
|
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
460 |
"Created: / 11-06-2017 / 20:21:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
461 |
! |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
462 |
|
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
463 |
doOpenToolWindow:window |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
464 |
| screen | |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
465 |
|
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
466 |
window realize. |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
467 |
"/ On X11, use ICCCM hints to tell the WM about a transient tool window |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
468 |
"/ and let WM to handle this according to DE standards. It has the nice |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
469 |
"/ side effect (on most modern WM) that these windows don't show up in |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
470 |
"/ pager / task list and go away when browser's main window is minimuzed |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
471 |
screen := Screen current. |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
472 |
(screen notNil and:[ screen platformName == #X11 ]) ifTrue:[ |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
473 |
screen setTransient:window topView id for:self window topView id. |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
474 |
"/ Also, use EWMH hint to tell the WM that the window is |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
475 |
"/ a sort of floating tool so WM can decorate it according to |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
476 |
"/ DE standards. |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
477 |
screen setWindowType:#'_NET_WM_WINDOW_TYPE_UTILITY' |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
478 |
in:window topView id |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
479 |
]. |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
480 |
window openInGroup: self window windowGroup. |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
481 |
|
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
482 |
"Created: / 14-03-2018 / 09:47:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
483 |
! |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
484 |
|
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
485 |
doPinMenuAs: label item: tearOffMenuItem |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
486 |
| menu window panel | |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
487 |
|
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
488 |
menu := tearOffMenuItem menuPanel asMenu. |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
489 |
|
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
490 |
"/ Remove the 'Tear Off' menu item... |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
491 |
|
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
492 |
menu items last value = #doPinMenuAs:item: ifTrue:[ |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
493 |
menu items removeLast. |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
494 |
|
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
495 |
"/ And possible separator above it... |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
496 |
|
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
497 |
(menu items last value isNil and:[ menu items last label = '-' ]) ifTrue:[ |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
498 |
menu items removeLast. |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
499 |
]. |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
500 |
]. |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
501 |
window := StandardSystemView new. |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
502 |
window label: (resources string: label). |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
503 |
panel := MenuPanel in:window. |
94
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
504 |
panel |
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
505 |
font: self menuFont; |
66
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
506 |
originator: self; |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
507 |
layout: (0.0 @ 0.0 corner:1.0 @ 1.0) asLayout; |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
508 |
verticalLayout:true. |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
509 |
panel |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
510 |
menu:menu; |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
511 |
receiver:self. |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
512 |
window extent:panel preferredExtent. |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
513 |
self doOpenToolWindow:window |
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
514 |
|
a6439bb6d8bc
UI: add support to "pin" menus, i.e., turn them into a floating toolboxes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
515 |
"Created: / 16-03-2018 / 10:20:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
94
e76206d071fc
UX: Allow to set a font for text, list views and pinned menus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
84
diff
changeset
|
516 |
"Modified: / 31-08-2018 / 08:38:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
12
b17ffe0604f0
Added debug menu to VDBDebuggerApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
517 |
! ! |
b17ffe0604f0
Added debug menu to VDBDebuggerApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
518 |
|
0 | 519 |
!VDBAbstractApplication methodsFor:'startup & release'! |
520 |
||
521 |
releaseAsSubCanvas |
|
522 |
"a subcanvas is closed or switching to a new application. |
|
523 |
Can be redefined to perform a self release in this case." |
|
524 |
||
525 |
self release |
|
526 |
||
527 |
"Created: / 06-06-2014 / 22:12:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
528 |
! ! |
|
529 |
||
16
fc1898815ab6
Temporary commit: some more work on displaying source code.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13
diff
changeset
|
530 |
!VDBAbstractApplication class methodsFor:'documentation'! |
fc1898815ab6
Temporary commit: some more work on displaying source code.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13
diff
changeset
|
531 |
|
fc1898815ab6
Temporary commit: some more work on displaying source code.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13
diff
changeset
|
532 |
version_HG |
fc1898815ab6
Temporary commit: some more work on displaying source code.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13
diff
changeset
|
533 |
|
fc1898815ab6
Temporary commit: some more work on displaying source code.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13
diff
changeset
|
534 |
^ '$Changeset: <not expanded> $' |
fc1898815ab6
Temporary commit: some more work on displaying source code.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13
diff
changeset
|
535 |
! ! |
fc1898815ab6
Temporary commit: some more work on displaying source code.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13
diff
changeset
|
536 |