-
Notifications
You must be signed in to change notification settings - Fork 0
/
uPSC_buttons.pas
87 lines (68 loc) · 2.66 KB
/
uPSC_buttons.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{ Compiletime Buttons support }
unit uPSC_buttons;
{$I PascalScript.inc}
interface
uses
uPSCompiler, uPSUtils;
{
Will register files from:
Buttons
Requires
STD, classes, controls and graphics and StdCtrls
}
procedure SIRegister_Buttons_TypesAndConsts(Cl: TPSPascalCompiler);
procedure SIRegisterTSPEEDBUTTON(Cl: TPSPascalCompiler);
procedure SIRegisterTBITBTN(Cl: TPSPascalCompiler);
procedure SIRegister_Buttons(Cl: TPSPascalCompiler);
implementation
procedure SIRegisterTSPEEDBUTTON(Cl: TPSPascalCompiler);
begin
with Cl.AddClassN(cl.FindClass('TGRAPHICCONTROL'), 'TSPEEDBUTTON') do
begin
RegisterProperty('ALLOWALLUP', 'BOOLEAN', iptrw);
RegisterProperty('GROUPINDEX', 'INTEGER', iptrw);
RegisterProperty('DOWN', 'BOOLEAN', iptrw);
RegisterProperty('CAPTION', 'String', iptrw);
RegisterProperty('FONT', 'TFont', iptrw);
RegisterProperty('GLYPH', 'TBITMAP', iptrw);
RegisterProperty('LAYOUT', 'TBUTTONLAYOUT', iptrw);
RegisterProperty('MARGIN', 'INTEGER', iptrw);
RegisterProperty('NUMGLYPHS', 'BYTE', iptrw);
RegisterProperty('PARENTFONT', 'Boolean', iptrw);
RegisterProperty('PARENTSHOWHINT', 'Boolean', iptrw);
RegisterProperty('SPACING', 'INTEGER', iptrw);
RegisterProperty('ONCLICK', 'TNotifyEvent', iptrw);
RegisterProperty('ONDBLCLICK', 'TNotifyEvent', iptrw);
RegisterProperty('ONMOUSEDOWN', 'TMouseEvent', iptrw);
RegisterProperty('ONMOUSEMOVE', 'TMouseMoveEvent', iptrw);
RegisterProperty('ONMOUSEUP', 'TMouseEvent', iptrw);
end;
end;
procedure SIRegisterTBITBTN(Cl: TPSPascalCompiler);
begin
with Cl.AddClassN(cl.FindClass('TBUTTON'), 'TBITBTN') do
begin
RegisterProperty('GLYPH', 'TBITMAP', iptrw);
RegisterProperty('KIND', 'TBITBTNKIND', iptrw);
RegisterProperty('LAYOUT', 'TBUTTONLAYOUT', iptrw);
RegisterProperty('MARGIN', 'INTEGER', iptrw);
RegisterProperty('NUMGLYPHS', 'BYTE', iptrw);
RegisterProperty('STYLE', 'TBUTTONSTYLE', iptrw);
RegisterProperty('SPACING', 'INTEGER', iptrw);
end;
end;
procedure SIRegister_Buttons_TypesAndConsts(Cl: TPSPascalCompiler);
begin
Cl.AddTypeS('TButtonLayout', '(blGlyphLeft, blGlyphRight, blGlyphTop, blGlyphBottom)');
Cl.AddTypeS('TButtonState', '(bsUp, bsDisabled, bsDown, bsExclusive)');
Cl.AddTypeS('TButtonStyle', '(bsAutoDetect, bsWin31, bsNew)');
Cl.AddTypeS('TBitBtnKind', '(bkCustom, bkOK, bkCancel, bkHelp, bkYes, bkNo, bkClose, bkAbort, bkRetry, bkIgnore, bkAll)');
end;
procedure SIRegister_Buttons(Cl: TPSPascalCompiler);
begin
SIRegister_Buttons_TypesAndConsts(cl);
SIRegisterTSPEEDBUTTON(cl);
SIRegisterTBITBTN(cl);
end;
// PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl)
end.