-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathPrintDialog.inc
271 lines (227 loc) · 8.91 KB
/
PrintDialog.inc
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
//http://www.freepascal.ru/forum/viewtopic.php?f=5&t=3155&start=30
//----------------------------------------
// ´úÂëÓÉGenlibVcl¹¤¾ß×Ô¶¯Éú³É¡£
// Copyright ? ying32. All Rights Reserved.
//
//----------------------------------------
function PrintDialog_Create(AOwner: TComponent): TPrintDialog; cdecl;
begin
Result := TPrintDialog.Create(AOwner);
end;
procedure PrintDialog_Free(AObj: TPrintDialog); cdecl;
begin
AObj.Free;
end;
function PrintDialog_Execute(AObj: TPrintDialog; ParentWnd: HWND): LongBool; cdecl;
begin
//Result := AObj.Execute(ParentWnd);
Result := AObj.Execute();
end;
function PrintDialog_FindComponent(AObj: TPrintDialog; AName: PWideChar): TComponent; cdecl;
begin
Result := AObj.FindComponent(AName);
end;
function PrintDialog_GetNamePath(AObj: TPrintDialog): PWideChar; cdecl;
begin
Result := PWideChar(AObj.GetNamePath);
end;
function PrintDialog_HasParent(AObj: TPrintDialog): LongBool; cdecl;
begin
Result := AObj.HasParent;
end;
procedure PrintDialog_Assign(AObj: TPrintDialog; Source: TPersistent); cdecl;
begin
AObj.Assign(Source);
end;
function PrintDialog_ClassName(AObj: TPrintDialog): PWideChar; cdecl;
begin
Result := ShortstrToPWideChar(AObj.ClassName);
end;
function PrintDialog_Equals(AObj: TPrintDialog; Obj: TObject): LongBool; cdecl;
begin
Result := AObj.Equals(Obj);
end;
function PrintDialog_GetHashCode(AObj: TPrintDialog): Integer; cdecl;
begin
Result := AObj.GetHashCode;
end;
function PrintDialog_ToString(AObj: TPrintDialog): PWideChar; cdecl;
begin
Result := PWideChar(AObj.ToString);
end;
function PrintDialog_GetCollate(AObj: TPrintDialog): LongBool; cdecl;
begin
Result := AObj.Collate;
end;
procedure PrintDialog_SetCollate(AObj: TPrintDialog; AValue: LongBool); cdecl;
begin
AObj.Collate := AValue;
end;
function PrintDialog_GetCopies(AObj: TPrintDialog): Integer; cdecl;
begin
Result := AObj.Copies;
end;
procedure PrintDialog_SetCopies(AObj: TPrintDialog; AValue: Integer); cdecl;
begin
AObj.Copies := AValue;
end;
function PrintDialog_GetFromPage(AObj: TPrintDialog): Integer; cdecl;
begin
Result := AObj.FromPage;
end;
procedure PrintDialog_SetFromPage(AObj: TPrintDialog; AValue: Integer); cdecl;
begin
AObj.FromPage := AValue;
end;
function PrintDialog_GetMinPage(AObj: TPrintDialog): Integer; cdecl;
begin
Result := AObj.MinPage;
end;
procedure PrintDialog_SetMinPage(AObj: TPrintDialog; AValue: Integer); cdecl;
begin
AObj.MinPage := AValue;
end;
function PrintDialog_GetMaxPage(AObj: TPrintDialog): Integer; cdecl;
begin
Result := AObj.MaxPage;
end;
procedure PrintDialog_SetMaxPage(AObj: TPrintDialog; AValue: Integer); cdecl;
begin
AObj.MaxPage := AValue;
end;
function PrintDialog_GetOptions(AObj: TPrintDialog): TPrintDialogOptions; cdecl;
begin
Result := AObj.Options;
end;
procedure PrintDialog_SetOptions(AObj: TPrintDialog; AValue: TPrintDialogOptions); cdecl;
begin
AObj.Options := AValue;
end;
function PrintDialog_GetPrintToFile(AObj: TPrintDialog): LongBool; cdecl;
begin
Result := AObj.PrintToFile;
end;
procedure PrintDialog_SetPrintToFile(AObj: TPrintDialog; AValue: LongBool); cdecl;
begin
AObj.PrintToFile := AValue;
end;
function PrintDialog_GetPrintRange(AObj: TPrintDialog): TPrintRange; cdecl;
begin
Result := AObj.PrintRange;
end;
procedure PrintDialog_SetPrintRange(AObj: TPrintDialog; AValue: TPrintRange); cdecl;
begin
AObj.PrintRange := AValue;
end;
function PrintDialog_GetToPage(AObj: TPrintDialog): Integer; cdecl;
begin
Result := AObj.ToPage;
end;
procedure PrintDialog_SetToPage(AObj: TPrintDialog; AValue: Integer); cdecl;
begin
AObj.ToPage := AValue;
end;
function PrintDialog_GetHandle(AObj: TPrintDialog): HWND; cdecl;
begin
Result := AObj.Handle;
end;
procedure PrintDialog_SetOnClose(AObj: TPrintDialog; AEventId: NativeUInt); stdcall;
begin
if AEventId = 0 then
begin
AObj.OnClose := nil;
TEventClass.Remove(AObj, geClose);
Exit;
end;
AObj.OnClose := TEventClass.OnClose;
TEventClass.Add(AObj, geClose, AEventId);
end;
procedure PrintDialog_SetOnShow(AObj: TPrintDialog; AEventId: NativeUInt); stdcall;
begin
if AEventId = 0 then
begin
AObj.OnShow := nil;
TEventClass.Remove(AObj, geShow);
Exit;
end;
AObj.OnShow := TEventClass.OnShow;
TEventClass.Add(AObj, geShow, AEventId);
end;
function PrintDialog_GetComponentCount(AObj: TPrintDialog): Integer; cdecl;
begin
Result := AObj.ComponentCount;
end;
function PrintDialog_GetComponentIndex(AObj: TPrintDialog): Integer; cdecl;
begin
Result := AObj.ComponentIndex;
end;
procedure PrintDialog_SetComponentIndex(AObj: TPrintDialog; AValue: Integer); cdecl;
begin
AObj.ComponentIndex := AValue;
end;
function PrintDialog_GetOwner(AObj: TPrintDialog): TComponent; cdecl;
begin
Result := AObj.Owner;
end;
function PrintDialog_GetName(AObj: TPrintDialog): PWideChar; cdecl;
begin
Result := PWideChar(AObj.Name);
end;
procedure PrintDialog_SetName(AObj: TPrintDialog; AValue: PWideChar); cdecl;
begin
AObj.Name := AValue;
end;
function PrintDialog_GetTag(AObj: TPrintDialog): NativeInt; cdecl;
begin
Result := AObj.Tag;
end;
procedure PrintDialog_SetTag(AObj: TPrintDialog; AValue: NativeInt); cdecl;
begin
AObj.Tag := AValue;
end;
function PrintDialog_GetComponents(AObj: TPrintDialog; AIndex: Integer): TComponent; cdecl;
begin
Result := AObj.Components[AIndex];
end;
exports
PrintDialog_Create {$IFNDEF MSWINDOWS}name '_PrintDialog_Create'{$ENDIF},
PrintDialog_Free {$IFNDEF MSWINDOWS}name '_PrintDialog_Free'{$ENDIF},
PrintDialog_Execute {$IFNDEF MSWINDOWS}name '_PrintDialog_Execute'{$ENDIF},
PrintDialog_FindComponent {$IFNDEF MSWINDOWS}name '_PrintDialog_FindComponent'{$ENDIF},
PrintDialog_GetNamePath {$IFNDEF MSWINDOWS}name '_PrintDialog_GetNamePath'{$ENDIF},
PrintDialog_HasParent {$IFNDEF MSWINDOWS}name '_PrintDialog_HasParent'{$ENDIF},
PrintDialog_Assign {$IFNDEF MSWINDOWS}name '_PrintDialog_Assign'{$ENDIF},
PrintDialog_ClassName {$IFNDEF MSWINDOWS}name '_PrintDialog_ClassName'{$ENDIF},
PrintDialog_Equals {$IFNDEF MSWINDOWS}name '_PrintDialog_Equals'{$ENDIF},
PrintDialog_GetHashCode {$IFNDEF MSWINDOWS}name '_PrintDialog_GetHashCode'{$ENDIF},
PrintDialog_ToString {$IFNDEF MSWINDOWS}name '_PrintDialog_ToString'{$ENDIF},
PrintDialog_GetCollate {$IFNDEF MSWINDOWS}name '_PrintDialog_GetCollate'{$ENDIF},
PrintDialog_SetCollate {$IFNDEF MSWINDOWS}name '_PrintDialog_SetCollate'{$ENDIF},
PrintDialog_GetCopies {$IFNDEF MSWINDOWS}name '_PrintDialog_GetCopies'{$ENDIF},
PrintDialog_SetCopies {$IFNDEF MSWINDOWS}name '_PrintDialog_SetCopies'{$ENDIF},
PrintDialog_GetFromPage {$IFNDEF MSWINDOWS}name '_PrintDialog_GetFromPage'{$ENDIF},
PrintDialog_SetFromPage {$IFNDEF MSWINDOWS}name '_PrintDialog_SetFromPage'{$ENDIF},
PrintDialog_GetMinPage {$IFNDEF MSWINDOWS}name '_PrintDialog_GetMinPage'{$ENDIF},
PrintDialog_SetMinPage {$IFNDEF MSWINDOWS}name '_PrintDialog_SetMinPage'{$ENDIF},
PrintDialog_GetMaxPage {$IFNDEF MSWINDOWS}name '_PrintDialog_GetMaxPage'{$ENDIF},
PrintDialog_SetMaxPage {$IFNDEF MSWINDOWS}name '_PrintDialog_SetMaxPage'{$ENDIF},
PrintDialog_GetOptions {$IFNDEF MSWINDOWS}name '_PrintDialog_GetOptions'{$ENDIF},
PrintDialog_SetOptions {$IFNDEF MSWINDOWS}name '_PrintDialog_SetOptions'{$ENDIF},
PrintDialog_GetPrintToFile {$IFNDEF MSWINDOWS}name '_PrintDialog_GetPrintToFile'{$ENDIF},
PrintDialog_SetPrintToFile {$IFNDEF MSWINDOWS}name '_PrintDialog_SetPrintToFile'{$ENDIF},
PrintDialog_GetPrintRange {$IFNDEF MSWINDOWS}name '_PrintDialog_GetPrintRange'{$ENDIF},
PrintDialog_SetPrintRange {$IFNDEF MSWINDOWS}name '_PrintDialog_SetPrintRange'{$ENDIF},
PrintDialog_GetToPage {$IFNDEF MSWINDOWS}name '_PrintDialog_GetToPage'{$ENDIF},
PrintDialog_SetToPage {$IFNDEF MSWINDOWS}name '_PrintDialog_SetToPage'{$ENDIF},
PrintDialog_GetHandle {$IFNDEF MSWINDOWS}name '_PrintDialog_GetHandle'{$ENDIF},
PrintDialog_SetOnClose {$IFNDEF MSWINDOWS}name '_PrintDialog_SetOnClose'{$ENDIF},
PrintDialog_SetOnShow {$IFNDEF MSWINDOWS}name '_PrintDialog_SetOnShow'{$ENDIF},
PrintDialog_GetComponentCount {$IFNDEF MSWINDOWS}name '_PrintDialog_GetComponentCount'{$ENDIF},
PrintDialog_GetComponentIndex {$IFNDEF MSWINDOWS}name '_PrintDialog_GetComponentIndex'{$ENDIF},
PrintDialog_SetComponentIndex {$IFNDEF MSWINDOWS}name '_PrintDialog_SetComponentIndex'{$ENDIF},
PrintDialog_GetOwner {$IFNDEF MSWINDOWS}name '_PrintDialog_GetOwner'{$ENDIF},
PrintDialog_GetName {$IFNDEF MSWINDOWS}name '_PrintDialog_GetName'{$ENDIF},
PrintDialog_SetName {$IFNDEF MSWINDOWS}name '_PrintDialog_SetName'{$ENDIF},
PrintDialog_GetTag {$IFNDEF MSWINDOWS}name '_PrintDialog_GetTag'{$ENDIF},
PrintDialog_SetTag {$IFNDEF MSWINDOWS}name '_PrintDialog_SetTag'{$ENDIF},
PrintDialog_GetComponents {$IFNDEF MSWINDOWS}name '_PrintDialog_GetComponents'{$ENDIF};