summaryrefslogtreecommitdiffstats
path: root/Mac/Lib
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1995-06-06 12:55:40 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1995-06-06 12:55:40 (GMT)
commitae8a68f40cd56aa952520260970ebd5b9d3fb95c (patch)
treee1d470857f4a2fb83fe4fae48509f0babb93852c /Mac/Lib
parentc7cfb9555974e2e3789a629f1b7509eaa73ee2c6 (diff)
downloadcpython-ae8a68f40cd56aa952520260970ebd5b9d3fb95c.zip
cpython-ae8a68f40cd56aa952520260970ebd5b9d3fb95c.tar.gz
cpython-ae8a68f40cd56aa952520260970ebd5b9d3fb95c.tar.bz2
Trying again to check it in. Changes to:
- Use Universal Headers as input - Change addpack calls to not depend on Guido's disklayout - Checkge testprograms to use new names for some functions
Diffstat (limited to 'Mac/Lib')
-rw-r--r--Mac/Lib/test/progressbar.py10
-rw-r--r--Mac/Lib/test/tctl.py3
-rw-r--r--Mac/Lib/test/tdlg.py7
-rw-r--r--Mac/Lib/toolbox/Controls.py36
-rw-r--r--Mac/Lib/toolbox/Dialogs.py3
5 files changed, 44 insertions, 15 deletions
diff --git a/Mac/Lib/test/progressbar.py b/Mac/Lib/test/progressbar.py
index 59e0cc1..e165061 100644
--- a/Mac/Lib/test/progressbar.py
+++ b/Mac/Lib/test/progressbar.py
@@ -1,12 +1,12 @@
# Progress dialog
from addpack import addpack
-addpack('Demo')
+addpack('Tools')
addpack('bgen')
addpack('dlg')
addpack('evt')
-from Dlg import GetNewDialog, ModalDialog, SetIText
+from Dlg import GetNewDialog, ModalDialog, SetDialogItemText
count = 0
@@ -17,12 +17,12 @@ def filter(d, e):
def main():
d = GetNewDialog(256, -1)
- tp, h, rect = d.GetDItem(2)
- SetIText(h, "Progress...")
+ tp, h, rect = d.GetDialogItem(2)
+ SetDialogItemText(h, "Progress...")
for i in range(100):
if i%10 == 0:
str = "Progress...%d" % i
- SetIText(h, str)
+ SetDialogItemText(h, str)
ModalDialog(filter)
for j in range(100): pass
diff --git a/Mac/Lib/test/tctl.py b/Mac/Lib/test/tctl.py
index 862eeb5..a255c56 100644
--- a/Mac/Lib/test/tctl.py
+++ b/Mac/Lib/test/tctl.py
@@ -5,6 +5,7 @@ from Ctl import *
from Win import *
from Evt import *
import time
+import sys
def main():
r = (40, 40, 400, 300)
@@ -12,6 +13,8 @@ def main():
w.DrawGrowIcon()
r = (40, 40, 100, 60)
c = NewControl(w, r, "SPAM!", 1, 0, 0, 1, 0, 0)
+ print 'Ok, try it...'
+ sys.exit(1) # So we can see what happens...
main()
diff --git a/Mac/Lib/test/tdlg.py b/Mac/Lib/test/tdlg.py
index d6fdd97..654a9a5 100644
--- a/Mac/Lib/test/tdlg.py
+++ b/Mac/Lib/test/tdlg.py
@@ -3,6 +3,9 @@
# Python library.
# The ID can be overridden by passing a second parameter.
+import addpack
+addpack.addpack(':Tools:bgen:evt')
+
from Dlg import *
from Events import *
import string
@@ -17,8 +20,8 @@ def f(d, event):
def message(str = "Hello, world!", id = ID):
d = GetNewDialog(id, -1)
- tp, h, rect = d.GetDItem(2)
- SetIText(h, str)
+ tp, h, rect = d.GetDialogItem(2)
+ SetDialogItemText(h, str)
while 1:
n = ModalDialog(f)
if n == 1: break
diff --git a/Mac/Lib/toolbox/Controls.py b/Mac/Lib/toolbox/Controls.py
index 0686580..af1747f 100644
--- a/Mac/Lib/toolbox/Controls.py
+++ b/Mac/Lib/toolbox/Controls.py
@@ -1,10 +1,14 @@
-# Generated from 'D:Development:THINK C:Mac #includes:Apple #includes:Controls.h'
+# Generated from 'Moes:CW5 GOLD \304:Metrowerks C/C++ \304:Headers \304:Universal Headers 2.0a3 \304:Controls.h'
pushButProc = 0
checkBoxProc = 1
radioButProc = 2
-useWFont = 8
scrollBarProc = 16
+popupMenuProc = 1008
+useWFont = 8
+inLabel = 1
+inMenu = 2
+inTriangle = 4
inButton = 10
inCheckBox = 11
inUpButton = 20
@@ -12,17 +16,34 @@ inDownButton = 21
inPageUp = 22
inPageDown = 23
inThumb = 129
-popupMenuProc = 1008
-inLabel = 1
-inMenu = 2
-inTriangle = 4
+kNoHiliteControlPart = 0
+kInLabelControlPart = 1
+kInMenuControlPart = 2
+kInTriangleControlPart = 4
+kInButtonControlPart = 10
+kInCheckBoxControlPart = 11
+kInUpButtonControlPart = 20
+kInDownButtonControlPart = 21
+kInPageUpControlPart = 22
+kInPageDownControlPart = 23
+kInIndicatorControlPart = 129
+kReservedControlPart = 254
+kControlInactiveControlPart = 255
+popupFixedWidth = 1 << 0
+popupVariableWidth = 1 << 1
+popupUseAddResMenu = 1 << 2
popupUseWFont = 1 << 3
+popupTitleBold = 1 << 8
+popupTitleItalic = 1 << 9
+popupTitleUnderline = 1 << 10
popupTitleOutline = 1 << 11
+popupTitleShadow = 1 << 12
+popupTitleCondense = 1 << 13
popupTitleExtend = 1 << 14
+popupTitleNoStyle = 1 << 15
popupTitleLeftJust = 0x00000000
popupTitleCenterJust = 0x00000001
popupTitleRightJust = 0x000000FF
-noConstraint = 0
hAxisOnly = 1
vAxisOnly = 2
drawCntl = 0
@@ -36,6 +57,7 @@ dragCntl = 7
autoTrack = 8
calcCntlRgn = 10
calcThumbRgn = 11
+drawThumbOutline = 12
cFrameColor = 0
cBodyColor = 1
cTextColor = 2
diff --git a/Mac/Lib/toolbox/Dialogs.py b/Mac/Lib/toolbox/Dialogs.py
index c31bfbe..66fea6b 100644
--- a/Mac/Lib/toolbox/Dialogs.py
+++ b/Mac/Lib/toolbox/Dialogs.py
@@ -1,4 +1,4 @@
-# Generated from 'D:Development:THINK C:Mac #includes:Apple #includes:Dialogs.h'
+# Generated from 'Moes:CW5 GOLD \304:Metrowerks C/C++ \304:Headers \304:Universal Headers 2.0a3 \304:Dialogs.h'
ctrlItem = 4
btnCtrl = 0
@@ -16,6 +16,7 @@ cancel = 2
stopIcon = 0
noteIcon = 1
cautionIcon = 2
+kIDODialogItem = 24
overlayDITL = 0
appendDITLRight = 1
appendDITLBottom = 2