Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ae8a68f

Browse files
committed
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
1 parent c7cfb95 commit ae8a68f

16 files changed

Lines changed: 462 additions & 280 deletions

File tree

Mac/Lib/test/progressbar.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Progress dialog
22

33
from addpack import addpack
4-
addpack('Demo')
4+
addpack('Tools')
55
addpack('bgen')
66
addpack('dlg')
77
addpack('evt')
88

9-
from Dlg import GetNewDialog, ModalDialog, SetIText
9+
from Dlg import GetNewDialog, ModalDialog, SetDialogItemText
1010

1111
count = 0
1212

@@ -17,12 +17,12 @@ def filter(d, e):
1717

1818
def main():
1919
d = GetNewDialog(256, -1)
20-
tp, h, rect = d.GetDItem(2)
21-
SetIText(h, "Progress...")
20+
tp, h, rect = d.GetDialogItem(2)
21+
SetDialogItemText(h, "Progress...")
2222
for i in range(100):
2323
if i%10 == 0:
2424
str = "Progress...%d" % i
25-
SetIText(h, str)
25+
SetDialogItemText(h, str)
2626
ModalDialog(filter)
2727
for j in range(100): pass
2828

Mac/Lib/test/tctl.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@
55
from Win import *
66
from Evt import *
77
import time
8+
import sys
89

910
def main():
1011
r = (40, 40, 400, 300)
1112
w = NewWindow(r, "The Spanish Inquisition", 1, 0, -1, 1, 0x55555555)
1213
w.DrawGrowIcon()
1314
r = (40, 40, 100, 60)
1415
c = NewControl(w, r, "SPAM!", 1, 0, 0, 1, 0, 0)
16+
print 'Ok, try it...'
17+
sys.exit(1) # So we can see what happens...
1518

1619

1720
main()

Mac/Lib/test/tdlg.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# Python library.
44
# The ID can be overridden by passing a second parameter.
55

6+
import addpack
7+
addpack.addpack(':Tools:bgen:evt')
8+
69
from Dlg import *
710
from Events import *
811
import string
@@ -17,8 +20,8 @@ def f(d, event):
1720

1821
def message(str = "Hello, world!", id = ID):
1922
d = GetNewDialog(id, -1)
20-
tp, h, rect = d.GetDItem(2)
21-
SetIText(h, str)
23+
tp, h, rect = d.GetDialogItem(2)
24+
SetDialogItemText(h, str)
2225
while 1:
2326
n = ModalDialog(f)
2427
if n == 1: break

Mac/Lib/toolbox/Controls.py

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,49 @@
1-
# Generated from 'D:Development:THINK C:Mac #includes:Apple #includes:Controls.h'
1+
# Generated from 'Moes:CW5 GOLD \304:Metrowerks C/C++ \304:Headers \304:Universal Headers 2.0a3 \304:Controls.h'
22

33
pushButProc = 0
44
checkBoxProc = 1
55
radioButProc = 2
6-
useWFont = 8
76
scrollBarProc = 16
7+
popupMenuProc = 1008
8+
useWFont = 8
9+
inLabel = 1
10+
inMenu = 2
11+
inTriangle = 4
812
inButton = 10
913
inCheckBox = 11
1014
inUpButton = 20
1115
inDownButton = 21
1216
inPageUp = 22
1317
inPageDown = 23
1418
inThumb = 129
15-
popupMenuProc = 1008
16-
inLabel = 1
17-
inMenu = 2
18-
inTriangle = 4
19+
kNoHiliteControlPart = 0
20+
kInLabelControlPart = 1
21+
kInMenuControlPart = 2
22+
kInTriangleControlPart = 4
23+
kInButtonControlPart = 10
24+
kInCheckBoxControlPart = 11
25+
kInUpButtonControlPart = 20
26+
kInDownButtonControlPart = 21
27+
kInPageUpControlPart = 22
28+
kInPageDownControlPart = 23
29+
kInIndicatorControlPart = 129
30+
kReservedControlPart = 254
31+
kControlInactiveControlPart = 255
32+
popupFixedWidth = 1 << 0
33+
popupVariableWidth = 1 << 1
34+
popupUseAddResMenu = 1 << 2
1935
popupUseWFont = 1 << 3
36+
popupTitleBold = 1 << 8
37+
popupTitleItalic = 1 << 9
38+
popupTitleUnderline = 1 << 10
2039
popupTitleOutline = 1 << 11
40+
popupTitleShadow = 1 << 12
41+
popupTitleCondense = 1 << 13
2142
popupTitleExtend = 1 << 14
43+
popupTitleNoStyle = 1 << 15
2244
popupTitleLeftJust = 0x00000000
2345
popupTitleCenterJust = 0x00000001
2446
popupTitleRightJust = 0x000000FF
25-
noConstraint = 0
2647
hAxisOnly = 1
2748
vAxisOnly = 2
2849
drawCntl = 0
@@ -36,6 +57,7 @@
3657
autoTrack = 8
3758
calcCntlRgn = 10
3859
calcThumbRgn = 11
60+
drawThumbOutline = 12
3961
cFrameColor = 0
4062
cBodyColor = 1
4163
cTextColor = 2

Mac/Lib/toolbox/Dialogs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Generated from 'D:Development:THINK C:Mac #includes:Apple #includes:Dialogs.h'
1+
# Generated from 'Moes:CW5 GOLD \304:Metrowerks C/C++ \304:Headers \304:Universal Headers 2.0a3 \304:Dialogs.h'
22

33
ctrlItem = 4
44
btnCtrl = 0
@@ -16,6 +16,7 @@
1616
stopIcon = 0
1717
noteIcon = 1
1818
cautionIcon = 2
19+
kIDODialogItem = 24
1920
overlayDITL = 0
2021
appendDITLRight = 1
2122
appendDITLBottom = 2

0 commit comments

Comments
 (0)