diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1996-09-26 16:26:05 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1996-09-26 16:26:05 (GMT) |
commit | a1560cfb294f35e5d295b13f372eac0a5d7f59d7 (patch) | |
tree | b29f27df9e1c6da8a5f0248e9a4a0f0c9387b268 /Mac/Tools/twit/mac_widgets.py | |
parent | b1667ef782af47a55d438382e7e63b75f77a1054 (diff) | |
download | cpython-a1560cfb294f35e5d295b13f372eac0a5d7f59d7.zip cpython-a1560cfb294f35e5d295b13f372eac0a5d7f59d7.tar.gz cpython-a1560cfb294f35e5d295b13f372eac0a5d7f59d7.tar.bz2 |
- Simplified inheritance structure (still not good enough)
- Added menubar in stead of buttons
- (optionally) switch menubar back and forth to facilitate debugging
FrameWork applications
- Handle "Open Document" appleevent
- Fixed click in grow-box location
- Allow a new debug session after previous one has finished
Diffstat (limited to 'Mac/Tools/twit/mac_widgets.py')
-rw-r--r-- | Mac/Tools/twit/mac_widgets.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Mac/Tools/twit/mac_widgets.py b/Mac/Tools/twit/mac_widgets.py index efadef0..e2ba911 100644 --- a/Mac/Tools/twit/mac_widgets.py +++ b/Mac/Tools/twit/mac_widgets.py @@ -14,6 +14,9 @@ MARGIN=2 ICONSIZE=16 TEXTWIDTH=4096 # More-or-less random value +TEXTFONT=4 +TEXTSIZE=9 + PIC_BREAK=513 picture_cache={} @@ -26,8 +29,8 @@ class MT_TextWidget: right-(MARGIN+SCROLLBAR), bottom-(MARGIN+SCROLLBAR) dr = self.terect[0], self.terect[1], TEXTWIDTH, self.terect[3] Qd.SetPort(wid) - Qd.TextFont(4) - Qd.TextSize(9) + Qd.TextFont(TEXTFONT) + Qd.TextSize(TEXTSIZE) self.ted = TE.TENew(dr, self.terect) self.ted.TEAutoView(1) self.activate(1) @@ -130,7 +133,10 @@ class MT_TextWidget: return None, 0 off = self.ted.TEGetOffset(where) inborder = where[0] < self.terect[0] - return self.offsettoline(off), inborder + l, t, r, b = self.terect + if l <= where[0] <= r and t <= where[1] <= b or inborder: + return self.offsettoline(off), inborder + return None, 0 # In the grow box or something. def offsettoline(self, offset): for i in range(len(self.line_index)): @@ -233,7 +239,6 @@ class MT_IconTextWidget(MT_TextWidget): rect = self.rect[0]+2, boty-self.ted.lineHeight, \ self.rect[0]+ICONSIZE-2, boty if not picture_cache.has_key(which): - print 'Get picture', which picture_cache[which] = Qd.GetPicture(which) self.drawicon(rect, picture_cache[which]) |