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
761b6095
Commit
761b6095
authored
Nov 24, 2002
by
Just van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hardcode some resources, removing annoying Widgets.rsrc dependency
parent
da302da9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
100 additions
and
15 deletions
+100
-15
Mac/Tools/IDE/Wbase.py
Mac/Tools/IDE/Wbase.py
+90
-12
Mac/Tools/IDE/Wmenus.py
Mac/Tools/IDE/Wmenus.py
+10
-3
No files found.
Mac/Tools/IDE/Wbase.py
View file @
761b6095
...
...
@@ -695,19 +695,97 @@ def HasBaseClass(obj, class_):
return
0
#
# To remove the dependence of Widgets.rsrc we hardcode the cursor
# data below.
#_cursors = {
# "watch" : Qd.GetCursor(QuickDraw.watchCursor).data,
# "arrow" : Qd.qd.arrow,
# "iBeam" : Qd.GetCursor(QuickDraw.iBeamCursor).data,
# "cross" : Qd.GetCursor(QuickDraw.crossCursor).data,
# "plus" : Qd.GetCursor(QuickDraw.plusCursor).data,
# "hand" : Qd.GetCursor(468).data,
# "fist" : Qd.GetCursor(469).data,
# "hmover" : Qd.GetCursor(470).data,
# "vmover" : Qd.GetCursor(471).data,
# "zoomin" : Qd.GetCursor(472).data,
# "zoomout" : Qd.GetCursor(473).data,
# "zoom" : Qd.GetCursor(474).data,
#}
_cursors
=
{
"watch"
:
Qd
.
GetCursor
(
QuickDraw
.
watchCursor
).
data
,
"arrow"
:
Qd
.
qd
.
arrow
,
"iBeam"
:
Qd
.
GetCursor
(
QuickDraw
.
iBeamCursor
).
data
,
"cross"
:
Qd
.
GetCursor
(
QuickDraw
.
crossCursor
).
data
,
"plus"
:
Qd
.
GetCursor
(
QuickDraw
.
plusCursor
).
data
,
"hand"
:
Qd
.
GetCursor
(
468
).
data
,
"fist"
:
Qd
.
GetCursor
(
469
).
data
,
"hmover"
:
Qd
.
GetCursor
(
470
).
data
,
"vmover"
:
Qd
.
GetCursor
(
471
).
data
,
"zoomin"
:
Qd
.
GetCursor
(
472
).
data
,
"zoomout"
:
Qd
.
GetCursor
(
473
).
data
,
"zoom"
:
Qd
.
GetCursor
(
474
).
data
,
'arrow'
:
'
\
x00
\
x00
\
x40
\
x00
\
x60
\
x00
\
x70
\
x00
\
x78
\
x00
\
x7c
\
x00
\
x7e
\
x00
\
x7f
\
x00
'
'
\
x7f
\
x80
\
x7c
\
x00
\
x6c
\
x00
\
x46
\
x00
\
x06
\
x00
\
x03
\
x00
\
x03
\
x00
\
x00
\
x00
'
'
\
xc0
\
x00
\
xe0
\
x00
\
xf0
\
x00
\
xf8
\
x00
\
xfc
\
x00
\
xfe
\
x00
\
xff
\
x00
\
xff
\
x80
'
'
\
xff
\
xc0
\
xff
\
xe0
\
xfe
\
x00
\
xef
\
x00
\
xcf
\
x00
\
x87
\
x80
\
x07
\
x80
\
x03
\
x80
'
'
\
x00
\
x01
\
x00
\
x01
'
,
'cross'
:
'
\
x04
\
x00
\
x04
\
x00
\
x04
\
x00
\
x04
\
x00
\
x04
\
x00
\
xff
\
xe0
\
x04
\
x00
\
x04
\
x00
'
'
\
x04
\
x00
\
x04
\
x00
\
x04
\
x00
\
x04
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
'
'
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
'
'
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
\
x00
'
'
\
x00
\
x05
\
x00
\
x05
'
,
'fist'
:
'
\
x00
\
x00
\
x00
\
x00
\
x0d
\
x80
\
x12
\
x70
\
x12
\
x4c
\
x12
\
x4a
\
x28
\
x0a
\
x28
\
x02
'
'
\
x48
\
x02
\
x40
\
x02
\
x20
\
x02
\
x20
\
x04
\
x10
\
x04
\
x08
\
x08
\
x04
\
x08
\
x04
\
x08
'
'
\
x00
\
x00
\
x00
\
x00
\
x0d
\
x80
\
x1f
\
xf0
\
x1f
\
xfc
\
x1f
\
xfe
\
x3f
\
xfe
\
x3f
\
xfe
'
'
\
x7f
\
xfe
\
x7f
\
xfe
\
x3f
\
xfe
\
x3f
\
xfc
\
x1f
\
xfc
\
x0f
\
xf8
\
x07
\
xf8
\
x07
\
xf8
'
'
\
x00
\
x09
\
x00
\
x08
'
,
'hand'
:
'
\
x01
\
x80
\
x1a
\
x70
\
x26
\
x48
\
x26
\
x4a
\
x12
\
x4d
\
x12
\
x49
\
x68
\
x09
\
x98
\
x01
'
'
\
x88
\
x02
\
x40
\
x02
\
x20
\
x02
\
x20
\
x04
\
x10
\
x04
\
x08
\
x08
\
x04
\
x08
\
x04
\
x08
'
'
\
x01
\
x80
\
x1b
\
xf0
\
x3f
\
xf8
\
x3f
\
xfa
\
x1f
\
xff
\
x1f
\
xff
\
x6f
\
xff
\
xff
\
xff
'
'
\
xff
\
xfe
\
x7f
\
xfe
\
x3f
\
xfe
\
x3f
\
xfc
\
x1f
\
xfc
\
x0f
\
xf8
\
x07
\
xf8
\
x07
\
xf8
'
'
\
x00
\
x09
\
x00
\
x08
'
,
'hmover'
:
'
\
x00
\
x00
\
x01
\
x80
\
x01
\
x80
\
x01
\
x80
\
x01
\
x80
\
x11
\
x88
\
x31
\
x8c
\
x7f
\
xfe
'
'
\
x31
\
x8c
\
x11
\
x88
\
x01
\
x80
\
x01
\
x80
\
x01
\
x80
\
x01
\
x80
\
x00
\
x00
\
x00
\
x00
'
'
\
x03
\
xc0
\
x03
\
xc0
\
x03
\
xc0
\
x03
\
xc0
\
x1b
\
xd8
\
x3b
\
xdc
\
x7f
\
xfe
\
xff
\
xff
'
'
\
x7f
\
xfe
\
x3b
\
xdc
\
x1b
\
xd8
\
x03
\
xc0
\
x03
\
xc0
\
x03
\
xc0
\
x03
\
xc0
\
x00
\
x00
'
'
\
x00
\
x07
\
x00
\
x07
'
,
'iBeam'
:
'
\
x0c
\
x60
\
x02
\
x80
\
x01
\
x00
\
x01
\
x00
\
x01
\
x00
\
x01
\
x00
\
x01
\
x00
\
x01
\
x00
'
'
\
x01
\
x00
\
x01
\
x00
\
x01
\
x00
\
x01
\
x00
\
x01
\
x00
\
x01
\
x00
\
x02
\
x80
\
x0c
\
x60
'
'
\
x0c
\
x60
\
x02
\
x80
\
x01
\
x00
\
x01
\
x00
\
x01
\
x00
\
x01
\
x00
\
x01
\
x00
\
x01
\
x00
'
'
\
x01
\
x00
\
x01
\
x00
\
x01
\
x00
\
x01
\
x00
\
x01
\
x00
\
x01
\
x00
\
x02
\
x80
\
x0c
\
x60
'
'
\
x00
\
x04
\
x00
\
x07
'
,
'plus'
:
'
\
x00
\
x00
\
x07
\
xc0
\
x04
\
x60
\
x04
\
x60
\
x04
\
x60
\
x7c
\
x7c
\
x43
\
x86
\
x42
\
x86
'
'
\
x43
\
x86
\
x7c
\
x7e
\
x3c
\
x7e
\
x04
\
x60
\
x04
\
x60
\
x07
\
xe0
\
x03
\
xe0
\
x00
\
x00
'
'
\
x0f
\
xc0
\
x0f
\
xe0
\
x0f
\
xf0
\
x0f
\
xf0
\
xff
\
xff
\
xff
\
xfe
\
xfc
\
x7f
\
xfc
\
x7f
'
'
\
xfc
\
x7f
\
xff
\
xff
\
x7f
\
xff
\
x7f
\
xff
\
x0f
\
xf0
\
x0f
\
xf0
\
x07
\
xf0
\
x03
\
xe0
'
'
\
x00
\
x08
\
x00
\
x08
'
,
'vmover'
:
'
\
x00
\
x00
\
x01
\
x00
\
x03
\
x80
\
x07
\
xc0
\
x01
\
x00
\
x01
\
x00
\
x01
\
x00
\
x7f
\
xfc
'
'
\
x7f
\
xfc
\
x01
\
x00
\
x01
\
x00
\
x01
\
x00
\
x07
\
xc0
\
x03
\
x80
\
x01
\
x00
\
x00
\
x00
'
'
\
x01
\
x00
\
x03
\
x80
\
x07
\
xc0
\
x0f
\
xe0
\
x0f
\
xe0
\
x03
\
x80
\
xff
\
xfe
\
xff
\
xfe
'
'
\
xff
\
xfe
\
xff
\
xfe
\
x03
\
x80
\
x0f
\
xe0
\
x0f
\
xe0
\
x07
\
xc0
\
x03
\
x80
\
x01
\
x00
'
'
\
x00
\
x07
\
x00
\
x07
'
,
'watch'
:
'
\
x3f
\
x00
\
x3f
\
x00
\
x3f
\
x00
\
x3f
\
x00
\
x40
\
x80
\
x84
\
x40
\
x84
\
x40
\
x84
\
x60
'
'
\
x9c
\
x60
\
x80
\
x40
\
x80
\
x40
\
x40
\
x80
\
x3f
\
x00
\
x3f
\
x00
\
x3f
\
x00
\
x3f
\
x00
'
'
\
x3f
\
x00
\
x3f
\
x00
\
x3f
\
x00
\
x3f
\
x00
\
x7f
\
x80
\
xff
\
xc0
\
xff
\
xc0
\
xff
\
xc0
'
'
\
xff
\
xc0
\
xff
\
xc0
\
xff
\
xc0
\
x7f
\
x80
\
x3f
\
x00
\
x3f
\
x00
\
x3f
\
x00
\
x3f
\
x00
'
'
\
x00
\
x08
\
x00
\
x08
'
,
'zoom'
:
'
\
x0f
\
x00
\
x30
\
xc0
\
x40
\
x20
\
x40
\
x20
\
x80
\
x10
\
x80
\
x10
\
x80
\
x10
\
x80
\
x10
'
'
\
x40
\
x20
\
x40
\
x20
\
x30
\
xf0
\
x0f
\
x38
\
x00
\
x1c
\
x00
\
x0e
\
x00
\
x07
\
x00
\
x02
'
'
\
x0f
\
x00
\
x3f
\
xc0
\
x7f
\
xe0
\
x7f
\
xe0
\
xff
\
xf0
\
xff
\
xf0
\
xff
\
xf0
\
xff
\
xf0
'
'
\
x7f
\
xe0
\
x7f
\
xe0
\
x3f
\
xf0
\
x0f
\
x38
\
x00
\
x1c
\
x00
\
x0e
\
x00
\
x07
\
x00
\
x02
'
'
\
x00
\
x06
\
x00
\
x06
'
,
'zoomin'
:
'
\
x0f
\
x00
\
x30
\
xc0
\
x40
\
x20
\
x46
\
x20
\
x86
\
x10
\
x9f
\
x90
\
x9f
\
x90
\
x86
\
x10
'
'
\
x46
\
x20
\
x40
\
x20
\
x30
\
xf0
\
x0f
\
x38
\
x00
\
x1c
\
x00
\
x0e
\
x00
\
x07
\
x00
\
x02
'
'
\
x0f
\
x00
\
x3f
\
xc0
\
x7f
\
xe0
\
x7f
\
xe0
\
xff
\
xf0
\
xff
\
xf0
\
xff
\
xf0
\
xff
\
xf0
'
'
\
x7f
\
xe0
\
x7f
\
xe0
\
x3f
\
xf0
\
x0f
\
x38
\
x00
\
x1c
\
x00
\
x0e
\
x00
\
x07
\
x00
\
x02
'
'
\
x00
\
x06
\
x00
\
x06
'
,
'zoomout'
:
'
\
x0f
\
x00
\
x30
\
xc0
\
x40
\
x20
\
x40
\
x20
\
x80
\
x10
\
x9f
\
x90
\
x9f
\
x90
\
x80
\
x10
'
'
\
x40
\
x20
\
x40
\
x20
\
x30
\
xf0
\
x0f
\
x38
\
x00
\
x1c
\
x00
\
x0e
\
x00
\
x07
\
x00
\
x02
'
'
\
x0f
\
x00
\
x3f
\
xc0
\
x7f
\
xe0
\
x7f
\
xe0
\
xff
\
xf0
\
xff
\
xf0
\
xff
\
xf0
\
xff
\
xf0
'
'
\
x7f
\
xe0
\
x7f
\
xe0
\
x3f
\
xf0
\
x0f
\
x38
\
x00
\
x1c
\
x00
\
x0e
\
x00
\
x07
\
x00
\
x02
'
'
\
x00
\
x06
\
x00
\
x06
'
,
}
def
SetCursor
(
what
):
...
...
Mac/Tools/IDE/Wmenus.py
View file @
761b6095
import
FrameWork
import
Wbase
,
Wcontrols
from
Carbon
import
Ctl
,
Controls
,
Qd
from
Carbon
import
Ctl
,
Controls
,
Qd
,
Res
from
types
import
*
import
Wapplication
_arrowright
=
Qd
.
GetPicture
(
472
)
_arrowdown
=
Qd
.
GetPicture
(
473
)
#_arrowright = Qd.GetPicture(472)
#_arrowdown = Qd.GetPicture(473)
_arrowright
=
Res
.
Resource
(
'
\
x00
I
\
x00
\
x00
\
x00
\
x00
\
x00
\
n
\
x00
\
n
\
x11
\
x01
\
x01
\
x00
\
n
\
x00
\
x00
\
x00
'
'
\
x00
\
x00
\
n
\
x00
\
n
\
x90
\
x00
\
x02
\
x00
\
x00
\
x00
\
x00
\
x00
\
n
\
x00
\
n
\
x00
\
x00
'
'
\
x00
\
x00
\
x00
\
n
\
x00
\
n
\
x00
\
x00
\
x00
\
x00
\
x00
\
n
\
x00
\
n
\
x00
\
x00
\
x10
\
x00
'
'
\
x18
\
x00
\
x1c
\
x00
\
x1e
\
x00
\
x1f
\
x00
\
x1f
\
x00
\
x1e
\
x00
\
x1c
\
x00
\
x18
\
x00
'
'
\
x10
\
x00
\
xff
'
)
class
PopupControl
(
Wcontrols
.
ControlWidget
):
...
...
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