Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ba24ace0
Commit
ba24ace0
authored
Aug 03, 2001
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Obsolete, superseded by :Mac:Demo:TE
parent
5291fb1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
81 deletions
+0
-81
Mac/Lib/test/ttedit.py
Mac/Lib/test/ttedit.py
+0
-81
No files found.
Mac/Lib/test/ttedit.py
deleted
100644 → 0
View file @
5291fb1e
# Test TE module.
# Draw a window in which the user can type.
#
# This test expects Win, Evt and FrameWork (and anything used by those)
# to work.
#
# Actually, it is more a test of FrameWork by now....
from
FrameWork
import
*
import
Win
import
Qd
import
TE
import
os
class
TEWindow
(
Window
):
def
open
(
self
,
name
):
r
=
(
40
,
40
,
400
,
300
)
w
=
Win
.
NewWindow
(
r
,
name
,
1
,
0
,
-
1
,
1
,
0x55555555
)
r2
=
(
0
,
0
,
345
,
245
)
Qd
.
SetPort
(
w
)
self
.
ted
=
TE
.
TENew
(
r2
,
r2
)
self
.
ted
.
TEAutoView
(
1
)
w
.
DrawGrowIcon
()
self
.
wid
=
w
self
.
do_postopen
()
def
do_idle
(
self
):
self
.
ted
.
TEIdle
()
def
do_activate
(
self
,
onoff
,
evt
):
if
onoff
:
self
.
ted
.
TEActivate
()
else
:
self
.
ted
.
TEDeactivate
()
def
do_update
(
self
,
wid
,
event
):
Qd
.
EraseRect
(
wid
.
GetWindowPort
().
portRect
)
self
.
ted
.
TEUpdate
(
wid
.
GetWindowPort
().
portRect
)
def
do_contentclick
(
self
,
local
,
modifiers
,
evt
):
shifted
=
(
modifiers
&
0x200
)
self
.
ted
.
TEClick
(
local
,
shifted
)
def
do_char
(
self
,
ch
,
event
):
self
.
ted
.
TEKey
(
ord
(
ch
))
class
TestList
(
Application
):
def
__init__
(
self
):
Application
.
__init__
(
self
)
self
.
num
=
0
self
.
listoflists
=
[]
def
makeusermenus
(
self
):
self
.
filemenu
=
m
=
Menu
(
self
.
menubar
,
"File"
)
self
.
newitem
=
MenuItem
(
m
,
"New window..."
,
"O"
,
self
.
open
)
self
.
quititem
=
MenuItem
(
m
,
"Quit"
,
"Q"
,
self
.
quit
)
def
open
(
self
,
*
args
):
w
=
TEWindow
(
self
)
w
.
open
(
'Window %d'
%
self
.
num
)
self
.
num
=
self
.
num
+
1
self
.
listoflists
.
append
(
w
)
def
quit
(
self
,
*
args
):
raise
self
def
do_about
(
self
,
id
,
item
,
window
,
event
):
EasyDialogs
.
Message
(
"""Test the TextEdit interface.
Simple window in which you can type"""
)
def
do_idle
(
self
,
*
args
):
for
l
in
self
.
listoflists
:
l
.
do_idle
()
def
main
():
App
=
TestList
()
App
.
mainloop
()
if
__name__
==
'__main__'
:
main
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment