mirror of
https://github.com/python/cpython.git
synced 2025-12-04 08:34:25 +00:00
hardcode some resources, removing annoying Widgets.rsrc dependency
This commit is contained in:
parent
da302da912
commit
761b6095bd
2 changed files with 100 additions and 15 deletions
|
|
@ -695,19 +695,97 @@ def HasBaseClass(obj, class_):
|
||||||
return 0
|
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 = {
|
_cursors = {
|
||||||
"watch" : Qd.GetCursor(QuickDraw.watchCursor).data,
|
'arrow':
|
||||||
"arrow" : Qd.qd.arrow,
|
'\x00\x00\x40\x00\x60\x00\x70\x00\x78\x00\x7c\x00\x7e\x00\x7f\x00'
|
||||||
"iBeam" : Qd.GetCursor(QuickDraw.iBeamCursor).data,
|
'\x7f\x80\x7c\x00\x6c\x00\x46\x00\x06\x00\x03\x00\x03\x00\x00\x00'
|
||||||
"cross" : Qd.GetCursor(QuickDraw.crossCursor).data,
|
'\xc0\x00\xe0\x00\xf0\x00\xf8\x00\xfc\x00\xfe\x00\xff\x00\xff\x80'
|
||||||
"plus" : Qd.GetCursor(QuickDraw.plusCursor).data,
|
'\xff\xc0\xff\xe0\xfe\x00\xef\x00\xcf\x00\x87\x80\x07\x80\x03\x80'
|
||||||
"hand" : Qd.GetCursor(468).data,
|
'\x00\x01\x00\x01',
|
||||||
"fist" : Qd.GetCursor(469).data,
|
'cross':
|
||||||
"hmover" : Qd.GetCursor(470).data,
|
'\x04\x00\x04\x00\x04\x00\x04\x00\x04\x00\xff\xe0\x04\x00\x04\x00'
|
||||||
"vmover" : Qd.GetCursor(471).data,
|
'\x04\x00\x04\x00\x04\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00'
|
||||||
"zoomin" : Qd.GetCursor(472).data,
|
'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
|
||||||
"zoomout" : Qd.GetCursor(473).data,
|
'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
|
||||||
"zoom" : Qd.GetCursor(474).data,
|
'\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):
|
def SetCursor(what):
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,18 @@
|
||||||
import FrameWork
|
import FrameWork
|
||||||
import Wbase, Wcontrols
|
import Wbase, Wcontrols
|
||||||
from Carbon import Ctl, Controls, Qd
|
from Carbon import Ctl, Controls, Qd, Res
|
||||||
from types import *
|
from types import *
|
||||||
import Wapplication
|
import Wapplication
|
||||||
|
|
||||||
_arrowright = Qd.GetPicture(472)
|
#_arrowright = Qd.GetPicture(472)
|
||||||
_arrowdown = Qd.GetPicture(473)
|
#_arrowdown = Qd.GetPicture(473)
|
||||||
|
|
||||||
|
_arrowright = Res.Resource(
|
||||||
|
'\x00I\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):
|
class PopupControl(Wcontrols.ControlWidget):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue