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
49c7bc41
Commit
49c7bc41
authored
Mar 11, 1999
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
This file was never supposed to be part of IDLE.
parent
b62e8776
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
46 deletions
+0
-46
Tools/idle/Outline.py
Tools/idle/Outline.py
+0
-46
No files found.
Tools/idle/Outline.py
deleted
100644 → 0
View file @
b62e8776
from
Tkinter
import
*
class
Outline
:
def
__init__
(
self
,
root
=
None
):
if
not
root
:
import
Tkinter
root
=
Tkinter
.
_default_root
if
not
root
:
root
=
top
=
Tk
()
else
:
top
=
Toplevel
(
root
)
top
.
wm_title
(
"Outline"
)
self
.
canvas
=
canvas
=
Canvas
(
top
,
width
=
400
,
height
=
300
,
borderwidth
=
2
,
relief
=
"sunken"
,
background
=
"#FFBBBB"
)
canvas
.
pack
(
expand
=
1
,
fill
=
"both"
)
self
.
items
=
[]
def
additem
(
self
,
level
,
open
,
label
):
x
=
15
*
level
+
5
y
=
15
*
len
(
self
.
items
)
+
5
if
open
:
id1
=
self
.
canvas
.
create_polygon
(
x
+
3
,
y
+
3
,
x
+
13
,
y
+
3
,
x
+
8
,
y
+
8
,
outline
=
"black"
,
fill
=
"green"
)
else
:
id1
=
self
.
canvas
.
create_polygon
(
x
+
3
,
y
+
4
,
x
+
7
,
y
+
8
,
x
+
3
,
y
+
12
,
outline
=
"black"
,
fill
=
"red"
)
w
=
Entry
(
self
.
canvas
,
borderwidth
=
0
,
background
=
"#FFBBBB"
,
width
=
0
)
w
.
insert
(
"end"
,
label
)
id2
=
self
.
canvas
.
create_window
(
x
+
15
,
y
,
anchor
=
"nw"
,
window
=
w
)
self
.
items
.
append
((
level
,
open
,
label
,
id1
,
w
,
id2
))
def
main
():
o
=
Outline
()
o
.
additem
(
0
,
1
,
"hello world"
)
o
.
additem
(
1
,
0
,
"sub1"
)
o
.
additem
(
1
,
1
,
"sub2"
)
o
.
additem
(
2
,
0
,
"sub2.a"
)
o
.
additem
(
2
,
0
,
"sub2.b"
)
o
.
additem
(
1
,
0
,
"sub3"
)
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