Mercurial > cpython-lru_cache-weakref
annotate Mac/Tools/twit/mactwit_stack.py @ 5817:48b94de85bf3 legacy-trunk
Extensive changes by AMK.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 17 Jul 1997 16:29:42 +0000 |
| parents | 0f7515ebe3bf |
| children |
| rev | line source |
|---|---|
|
4331
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1 # A stab at a python debugger |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2 import Res |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3 import Qd |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
4 import Dlg |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
5 import Win |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
6 import FrameWork |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
7 import EasyDialogs |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
8 import sys |
|
4336
4dbfd4dfe281
- Simplified inheritance structure (still not good enough)
Jack Jansen <jack.jansen@cwi.nl>
parents:
4331
diff
changeset
|
9 import TwitCore |
|
4331
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
10 from mac_widgets import MT_AnyList, MT_IndexList, MT_IconTextWidget |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
11 |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
12 # Our dialogs |
|
4817
0f7515ebe3bf
Moved resources around to forestall conflicts with debuggee
Jack Jansen <jack.jansen@cwi.nl>
parents:
4387
diff
changeset
|
13 ID_STACK=501 |
|
4331
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
14 I_STACK_TITLE=1 |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
15 I_STACK=2 |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
16 I_VARS_TITLE=3 |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
17 I_VARS=4 |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
18 I_SOURCE_TITLE=5 |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
19 I_SOURCE=6 |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
20 I_EXC_TITLE=7 |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
21 I_EXC=8 |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
22 I_EXCVALUE_TITLE=9 |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
23 I_EXCVALUE=10 |
|
4336
4dbfd4dfe281
- Simplified inheritance structure (still not good enough)
Jack Jansen <jack.jansen@cwi.nl>
parents:
4331
diff
changeset
|
24 I_BROWSE=11 |
|
4dbfd4dfe281
- Simplified inheritance structure (still not good enough)
Jack Jansen <jack.jansen@cwi.nl>
parents:
4331
diff
changeset
|
25 I_RULER1=12 |
|
4dbfd4dfe281
- Simplified inheritance structure (still not good enough)
Jack Jansen <jack.jansen@cwi.nl>
parents:
4331
diff
changeset
|
26 I_RULER2=13 |
|
4dbfd4dfe281
- Simplified inheritance structure (still not good enough)
Jack Jansen <jack.jansen@cwi.nl>
parents:
4331
diff
changeset
|
27 I_STATE_TITLE=14 |
|
4dbfd4dfe281
- Simplified inheritance structure (still not good enough)
Jack Jansen <jack.jansen@cwi.nl>
parents:
4331
diff
changeset
|
28 I_STATE=15 |
|
4dbfd4dfe281
- Simplified inheritance structure (still not good enough)
Jack Jansen <jack.jansen@cwi.nl>
parents:
4331
diff
changeset
|
29 I_SHOW_COMPLEX=16 |
|
4dbfd4dfe281
- Simplified inheritance structure (still not good enough)
Jack Jansen <jack.jansen@cwi.nl>
parents:
4331
diff
changeset
|
30 I_SHOW_SYSTEM=17 |
|
4dbfd4dfe281
- Simplified inheritance structure (still not good enough)
Jack Jansen <jack.jansen@cwi.nl>
parents:
4331
diff
changeset
|
31 I_EDIT=18 |
|
4331
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
32 |
|
4336
4dbfd4dfe281
- Simplified inheritance structure (still not good enough)
Jack Jansen <jack.jansen@cwi.nl>
parents:
4331
diff
changeset
|
33 class StackBrowser(FrameWork.DialogWindow, TwitCore.StackBrowser): |
|
4331
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
34 """The stack-browser dialog - mac-dependent part""" |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
35 def open(self): |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
36 FrameWork.DialogWindow.open(self, ID_STACK) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
37 self.SetPort() |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
38 Qd.TextFont(3) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
39 Qd.TextSize(9) |
|
4387
2e272bf5a43e
Prepared for Tk windowing implementation
Jack Jansen <jack.jansen@cwi.nl>
parents:
4336
diff
changeset
|
40 |
|
4331
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
41 tp, h, rect = self.wid.GetDialogItem(I_STACK) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
42 self.stack = MT_IndexList(self.wid, rect, 2) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
43 tp, h, rect = self.wid.GetDialogItem(I_VARS) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
44 self.vars = MT_AnyList(self.wid, rect, 2) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
45 tp, h, rect = self.wid.GetDialogItem(I_SOURCE) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
46 self.source = MT_IconTextWidget(self.wid, rect) |
|
4387
2e272bf5a43e
Prepared for Tk windowing implementation
Jack Jansen <jack.jansen@cwi.nl>
parents:
4336
diff
changeset
|
47 |
|
2e272bf5a43e
Prepared for Tk windowing implementation
Jack Jansen <jack.jansen@cwi.nl>
parents:
4336
diff
changeset
|
48 self.mi_open() |
|
4331
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
49 |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
50 def setsource(self, msg): |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
51 tp, h, rect = self.wid.GetDialogItem(I_SOURCE_TITLE) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
52 if self.cur_source: |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
53 Dlg.SetDialogItemText(h, self.cur_source) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
54 else: |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
55 Dlg.SetDialogItemText(h, msg) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
56 self.source.setcontent(self.cur_source) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
57 |
|
4387
2e272bf5a43e
Prepared for Tk windowing implementation
Jack Jansen <jack.jansen@cwi.nl>
parents:
4336
diff
changeset
|
58 def source_setbreaks(self, list): |
|
2e272bf5a43e
Prepared for Tk windowing implementation
Jack Jansen <jack.jansen@cwi.nl>
parents:
4336
diff
changeset
|
59 self.source.setbreaks(list) |
|
2e272bf5a43e
Prepared for Tk windowing implementation
Jack Jansen <jack.jansen@cwi.nl>
parents:
4336
diff
changeset
|
60 |
|
2e272bf5a43e
Prepared for Tk windowing implementation
Jack Jansen <jack.jansen@cwi.nl>
parents:
4336
diff
changeset
|
61 def source_setline(self, lineno, icon): |
|
2e272bf5a43e
Prepared for Tk windowing implementation
Jack Jansen <jack.jansen@cwi.nl>
parents:
4336
diff
changeset
|
62 self.source.setcurline(lineno, icon) |
|
2e272bf5a43e
Prepared for Tk windowing implementation
Jack Jansen <jack.jansen@cwi.nl>
parents:
4336
diff
changeset
|
63 |
|
2e272bf5a43e
Prepared for Tk windowing implementation
Jack Jansen <jack.jansen@cwi.nl>
parents:
4336
diff
changeset
|
64 def source_select(self, lineno): |
|
2e272bf5a43e
Prepared for Tk windowing implementation
Jack Jansen <jack.jansen@cwi.nl>
parents:
4336
diff
changeset
|
65 self.source.select(lineno) |
|
2e272bf5a43e
Prepared for Tk windowing implementation
Jack Jansen <jack.jansen@cwi.nl>
parents:
4336
diff
changeset
|
66 |
|
2e272bf5a43e
Prepared for Tk windowing implementation
Jack Jansen <jack.jansen@cwi.nl>
parents:
4336
diff
changeset
|
67 def stack_setcontent(self, names, locations): |
|
2e272bf5a43e
Prepared for Tk windowing implementation
Jack Jansen <jack.jansen@cwi.nl>
parents:
4336
diff
changeset
|
68 self.stack.setcontent(names, locations) |
|
2e272bf5a43e
Prepared for Tk windowing implementation
Jack Jansen <jack.jansen@cwi.nl>
parents:
4336
diff
changeset
|
69 |
|
2e272bf5a43e
Prepared for Tk windowing implementation
Jack Jansen <jack.jansen@cwi.nl>
parents:
4336
diff
changeset
|
70 def stack_select(self, number): |
|
2e272bf5a43e
Prepared for Tk windowing implementation
Jack Jansen <jack.jansen@cwi.nl>
parents:
4336
diff
changeset
|
71 self.stack.select(number) |
|
2e272bf5a43e
Prepared for Tk windowing implementation
Jack Jansen <jack.jansen@cwi.nl>
parents:
4336
diff
changeset
|
72 |
|
2e272bf5a43e
Prepared for Tk windowing implementation
Jack Jansen <jack.jansen@cwi.nl>
parents:
4336
diff
changeset
|
73 def setvars(self): |
|
2e272bf5a43e
Prepared for Tk windowing implementation
Jack Jansen <jack.jansen@cwi.nl>
parents:
4336
diff
changeset
|
74 self.vars.setcontent(self.cont_varnames, self.cont_varvalues) |
|
2e272bf5a43e
Prepared for Tk windowing implementation
Jack Jansen <jack.jansen@cwi.nl>
parents:
4336
diff
changeset
|
75 |
|
4331
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
76 def setexception(self, name, value): |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
77 if name == None: |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
78 self.wid.HideDialogItem(I_EXC) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
79 self.wid.HideDialogItem(I_EXC_TITLE) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
80 value = None |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
81 else: |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
82 self.wid.ShowDialogItem(I_EXC) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
83 self.wid.ShowDialogItem(I_EXC_TITLE) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
84 tp, h, rect = self.wid.GetDialogItem(I_EXC) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
85 Dlg.SetDialogItemText(h, name) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
86 if value == None: |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
87 self.wid.HideDialogItem(I_EXCVALUE) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
88 self.wid.HideDialogItem(I_EXCVALUE_TITLE) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
89 else: |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
90 self.wid.ShowDialogItem(I_EXCVALUE) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
91 self.wid.ShowDialogItem(I_EXCVALUE_TITLE) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
92 tp, h, rect = self.wid.GetDialogItem(I_EXCVALUE) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
93 Dlg.SetDialogItemText(h, value) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
94 |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
95 def setprogramstate(self, msg): |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
96 tp, h, rect = self.wid.GetDialogItem(I_STATE) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
97 Dlg.SetDialogItemText(h, msg) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
98 |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
99 def do_itemhit(self, item, event): |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
100 (what, message, when, where, modifiers) = event |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
101 Qd.SetPort(self.wid) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
102 where = Qd.GlobalToLocal(where) |
|
4336
4dbfd4dfe281
- Simplified inheritance structure (still not good enough)
Jack Jansen <jack.jansen@cwi.nl>
parents:
4331
diff
changeset
|
103 |
|
4331
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
104 if item == I_STACK: |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
105 new_stackitem, double = self.stack.click(where, 0) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
106 self.click_stack(new_stackitem) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
107 elif item == I_VARS: |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
108 new_var, double = self.vars.click(where, 0) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
109 if double: |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
110 self.click_var(new_var) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
111 elif item == I_SOURCE: |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
112 lineno, inborder = self.source.click(where, 0) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
113 if lineno <> None and lineno >= 0: |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
114 self.click_source(lineno, inborder) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
115 elif item == I_BROWSE: |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
116 self.click_browse() |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
117 elif item == I_SHOW_COMPLEX: |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
118 self.show_complex = not self.show_complex |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
119 self.setup_frame() |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
120 elif item == I_SHOW_SYSTEM: |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
121 self.show_system = not self.show_system |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
122 self.setup_frame() |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
123 elif item == I_EDIT: |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
124 self.click_edit() |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
125 |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
126 def set_var_buttons(self): |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
127 tp, h, rect = self.wid.GetDialogItem(I_SHOW_COMPLEX) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
128 h.as_Control().SetControlValue(self.show_complex) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
129 tp, h, rect = self.wid.GetDialogItem(I_SHOW_SYSTEM) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
130 h.as_Control().SetControlValue(self.show_system) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
131 |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
132 def do_rawupdate(self, window, event): |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
133 Qd.SetPort(self.wid) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
134 rgn = self.wid.GetWindowPort().visRgn |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
135 tp, h, rect = self.wid.GetDialogItem(I_RULER1) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
136 Qd.MoveTo(rect[0], rect[1]) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
137 Qd.LineTo(rect[2], rect[1]) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
138 tp, h, rect = self.wid.GetDialogItem(I_RULER2) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
139 Qd.MoveTo(rect[0], rect[1]) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
140 Qd.LineTo(rect[2], rect[1]) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
141 self.stack.update(rgn) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
142 self.vars.update(rgn) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
143 self.source.update(rgn) |
|
4336
4dbfd4dfe281
- Simplified inheritance structure (still not good enough)
Jack Jansen <jack.jansen@cwi.nl>
parents:
4331
diff
changeset
|
144 |
|
4dbfd4dfe281
- Simplified inheritance structure (still not good enough)
Jack Jansen <jack.jansen@cwi.nl>
parents:
4331
diff
changeset
|
145 def force_redraw(self): |
|
4dbfd4dfe281
- Simplified inheritance structure (still not good enough)
Jack Jansen <jack.jansen@cwi.nl>
parents:
4331
diff
changeset
|
146 Qd.SetPort(self.wid) |
|
4dbfd4dfe281
- Simplified inheritance structure (still not good enough)
Jack Jansen <jack.jansen@cwi.nl>
parents:
4331
diff
changeset
|
147 Win.InvalRgn(self.wid.GetWindowPort().visRgn) |
|
4331
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
148 |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
149 def do_activate(self, activate, event): |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
150 self.stack.activate(activate) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
151 self.vars.activate(activate) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
152 self.source.activate(activate) |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
153 |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
154 def close(self): |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
155 self.source.close() |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
156 del self.stack |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
157 del self.vars |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
158 del self.source |
|
c2eb38b674f3
The Window Independent Tracer (which will probably move elsewhere once
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
159 self.do_postclose() |
