-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMyLCL_MenuItem.inc
551 lines (487 loc) · 12.9 KB
/
MyLCL_MenuItem.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
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
//----------------------------------------
// The code is automatically generated by the GenlibLcl tool.
// Copyright © ying32. All Rights Reserved.
//
// Licensed under Lazarus.modifiedLGPL
//
//----------------------------------------
function MenuItem_Create(AOwner: TComponent): TMenuItem; extdecl;
begin
{$ifdef UsehandleException}Result := nil;{$endif}
handleExceptionBegin
Result := TMenuItem.Create(AOwner);
handleExceptionEnd
end;
procedure MenuItem_Free(AObj: TMenuItem); extdecl;
begin
handleExceptionBegin
AObj.Free;
handleExceptionEnd
end;
//CLASSMETHOD:
procedure MenuItem_Insert(AObj: TMenuItem; Index: Integer; Item: TMenuItem); extdecl;
begin
handleExceptionBegin
AObj.Insert(Index, Item);
handleExceptionEnd
end;
//CLASSMETHOD:
procedure MenuItem_Delete(AObj: TMenuItem; Index: Integer); extdecl;
begin
handleExceptionBegin
AObj.Delete(Index);
handleExceptionEnd
end;
//CLASSMETHOD:
procedure MenuItem_Clear(AObj: TMenuItem); extdecl;
begin
handleExceptionBegin
AObj.Clear;
handleExceptionEnd
end;
//CLASSMETHOD:
procedure MenuItem_Click(AObj: TMenuItem); extdecl;
begin
handleExceptionBegin
AObj.Click;
handleExceptionEnd
end;
//CLASSMETHOD:
function MenuItem_IndexOf(AObj: TMenuItem; Item: TMenuItem): Integer; extdecl;
begin
{$ifdef UsehandleException}Result := Integer(0);{$endif}
handleExceptionBegin
Result := AObj.IndexOf(Item);
handleExceptionEnd
end;
//CLASSMETHOD:
function MenuItem_HasParent(AObj: TMenuItem): LongBool; extdecl;
begin
{$ifdef UsehandleException}Result := False;{$endif}
handleExceptionBegin
Result := AObj.HasParent;
handleExceptionEnd
end;
//CLASSMETHOD:
procedure MenuItem_Add(AObj: TMenuItem; Item: TMenuItem); extdecl;
begin
handleExceptionBegin
AObj.Add(Item);
handleExceptionEnd
end;
//CLASSMETHOD:
function MenuItem_FindComponent(AObj: TMenuItem; AName: PChar): TComponent; extdecl;
begin
{$ifdef UsehandleException}Result := nil;{$endif}
handleExceptionBegin
Result := AObj.FindComponent(AName);
handleExceptionEnd
end;
//CLASSMETHOD:
function MenuItem_GetNamePath(AObj: TMenuItem): PChar; extdecl;
begin
{$ifdef UsehandleException}Result := PChar(nil);{$endif}
handleExceptionBegin
Result := PChar(AObj.GetNamePath);
handleExceptionEnd
end;
//CLASSMETHOD:
procedure MenuItem_Assign(AObj: TMenuItem; Source: TPersistent); extdecl;
begin
handleExceptionBegin
AObj.Assign(Source);
handleExceptionEnd
end;
//CLASSMETHOD:
function MenuItem_ClassType(AObj: TMenuItem): TClass; extdecl;
begin
{$ifdef UsehandleException}Result := TClass(nil);{$endif}
handleExceptionBegin
Result := AObj.ClassType;
handleExceptionEnd
end;
//CLASSMETHOD:
function MenuItem_ClassName(AObj: TMenuItem): PChar; extdecl;
begin
{$ifdef UsehandleException}Result := nil;{$endif}
handleExceptionBegin
Result := ToPChar(AObj.ClassName);
handleExceptionEnd
end;
//CLASSMETHOD:
function MenuItem_InstanceSize(AObj: TMenuItem): Integer; extdecl;
begin
{$ifdef UsehandleException}Result := Integer(0);{$endif}
handleExceptionBegin
Result := AObj.InstanceSize;
handleExceptionEnd
end;
//CLASSMETHOD:
function MenuItem_InheritsFrom(AObj: TMenuItem; AClass: TClass): LongBool; extdecl;
begin
{$ifdef UsehandleException}Result := False;{$endif}
handleExceptionBegin
Result := AObj.InheritsFrom(AClass);
handleExceptionEnd
end;
//CLASSMETHOD:
function MenuItem_Equals(AObj: TMenuItem; Obj: TObject): LongBool; extdecl;
begin
{$ifdef UsehandleException}Result := False;{$endif}
handleExceptionBegin
Result := AObj.Equals(Obj);
handleExceptionEnd
end;
//CLASSMETHOD:
function MenuItem_GetHashCode(AObj: TMenuItem): Integer; extdecl;
begin
{$ifdef UsehandleException}Result := Integer(0);{$endif}
handleExceptionBegin
Result := AObj.GetHashCode;
handleExceptionEnd
end;
//CLASSMETHOD:
function MenuItem_ToString(AObj: TMenuItem): PChar; extdecl;
begin
{$ifdef UsehandleException}Result := PChar(nil);{$endif}
handleExceptionBegin
Result := PChar(AObj.ToString);
handleExceptionEnd
end;
function MenuItem_GetHandle(AObj: TMenuItem): HMENU; extdecl;
begin
{$ifdef UsehandleException}Result := HMENU(0);{$endif}
handleExceptionBegin
Result := AObj.Handle;
handleExceptionEnd
end;
function MenuItem_GetCount(AObj: TMenuItem): Integer; extdecl;
begin
{$ifdef UsehandleException}Result := Integer(0);{$endif}
handleExceptionBegin
Result := AObj.Count;
handleExceptionEnd
end;
function MenuItem_GetParent(AObj: TMenuItem): TMenuItem; extdecl;
begin
{$ifdef UsehandleException}Result := nil;{$endif}
handleExceptionBegin
Result := AObj.Parent;
handleExceptionEnd
end;
function MenuItem_GetAction(AObj: TMenuItem): TBasicAction; extdecl;
begin
{$ifdef UsehandleException}Result := nil;{$endif}
handleExceptionBegin
Result := AObj.Action;
handleExceptionEnd
end;
procedure MenuItem_SetAction(AObj: TMenuItem; AValue: TBasicAction); extdecl;
begin
handleExceptionBegin
AObj.Action := AValue;
handleExceptionEnd
end;
function MenuItem_GetAutoCheck(AObj: TMenuItem): LongBool; extdecl;
begin
{$ifdef UsehandleException}Result := False;{$endif}
handleExceptionBegin
Result := AObj.AutoCheck;
handleExceptionEnd
end;
procedure MenuItem_SetAutoCheck(AObj: TMenuItem; AValue: LongBool); extdecl;
begin
handleExceptionBegin
AObj.AutoCheck := AValue;
handleExceptionEnd
end;
function MenuItem_GetBitmap(AObj: TMenuItem): TBitmap; extdecl;
begin
{$ifdef UsehandleException}Result := nil;{$endif}
handleExceptionBegin
Result := AObj.Bitmap;
handleExceptionEnd
end;
procedure MenuItem_SetBitmap(AObj: TMenuItem; AValue: TBitmap); extdecl;
begin
handleExceptionBegin
AObj.Bitmap := AValue;
handleExceptionEnd
end;
function MenuItem_GetCaption(AObj: TMenuItem): PChar; extdecl;
begin
{$ifdef UsehandleException}Result := PChar(nil);{$endif}
handleExceptionBegin
Result := PChar(AObj.Caption);
handleExceptionEnd
end;
procedure MenuItem_SetCaption(AObj: TMenuItem; AValue: PChar); extdecl;
begin
handleExceptionBegin
AObj.Caption := AValue;
handleExceptionEnd
end;
function MenuItem_GetChecked(AObj: TMenuItem): LongBool; extdecl;
begin
{$ifdef UsehandleException}Result := False;{$endif}
handleExceptionBegin
Result := AObj.Checked;
handleExceptionEnd
end;
procedure MenuItem_SetChecked(AObj: TMenuItem; AValue: LongBool); extdecl;
begin
handleExceptionBegin
AObj.Checked := AValue;
handleExceptionEnd
end;
function MenuItem_GetDefault(AObj: TMenuItem): LongBool; extdecl;
begin
{$ifdef UsehandleException}Result := False;{$endif}
handleExceptionBegin
Result := AObj.Default;
handleExceptionEnd
end;
procedure MenuItem_SetDefault(AObj: TMenuItem; AValue: LongBool); extdecl;
begin
handleExceptionBegin
AObj.Default := AValue;
handleExceptionEnd
end;
function MenuItem_GetEnabled(AObj: TMenuItem): LongBool; extdecl;
begin
{$ifdef UsehandleException}Result := False;{$endif}
handleExceptionBegin
Result := AObj.Enabled;
handleExceptionEnd
end;
procedure MenuItem_SetEnabled(AObj: TMenuItem; AValue: LongBool); extdecl;
begin
handleExceptionBegin
AObj.Enabled := AValue;
handleExceptionEnd
end;
function MenuItem_GetGroupIndex(AObj: TMenuItem): Byte; extdecl;
begin
{$ifdef UsehandleException}Result := Byte(0);{$endif}
handleExceptionBegin
Result := AObj.GroupIndex;
handleExceptionEnd
end;
procedure MenuItem_SetGroupIndex(AObj: TMenuItem; AValue: Byte); extdecl;
begin
handleExceptionBegin
AObj.GroupIndex := AValue;
handleExceptionEnd
end;
function MenuItem_GetHint(AObj: TMenuItem): PChar; extdecl;
begin
{$ifdef UsehandleException}Result := PChar(nil);{$endif}
handleExceptionBegin
Result := PChar(AObj.Hint);
handleExceptionEnd
end;
procedure MenuItem_SetHint(AObj: TMenuItem; AValue: PChar); extdecl;
begin
handleExceptionBegin
AObj.Hint := AValue;
handleExceptionEnd
end;
function MenuItem_GetImageIndex(AObj: TMenuItem): TImageIndex; extdecl;
begin
{$ifdef UsehandleException}Result := TImageIndex(0);{$endif}
handleExceptionBegin
Result := AObj.ImageIndex;
handleExceptionEnd
end;
procedure MenuItem_SetImageIndex(AObj: TMenuItem; AValue: TImageIndex); extdecl;
begin
handleExceptionBegin
AObj.ImageIndex := AValue;
handleExceptionEnd
end;
function MenuItem_GetRadioItem(AObj: TMenuItem): LongBool; extdecl;
begin
{$ifdef UsehandleException}Result := False;{$endif}
handleExceptionBegin
Result := AObj.RadioItem;
handleExceptionEnd
end;
procedure MenuItem_SetRadioItem(AObj: TMenuItem; AValue: LongBool); extdecl;
begin
handleExceptionBegin
AObj.RadioItem := AValue;
handleExceptionEnd
end;
function MenuItem_GetShortCut(AObj: TMenuItem): TShortCut; extdecl;
begin
{$ifdef UsehandleException}Result := TShortCut(0);{$endif}
handleExceptionBegin
Result := AObj.ShortCut;
handleExceptionEnd
end;
procedure MenuItem_SetShortCut(AObj: TMenuItem; AValue: TShortCut); extdecl;
begin
handleExceptionBegin
AObj.ShortCut := AValue;
handleExceptionEnd
end;
function MenuItem_GetVisible(AObj: TMenuItem): LongBool; extdecl;
begin
{$ifdef UsehandleException}Result := False;{$endif}
handleExceptionBegin
Result := AObj.Visible;
handleExceptionEnd
end;
procedure MenuItem_SetVisible(AObj: TMenuItem; AValue: LongBool); extdecl;
begin
handleExceptionBegin
AObj.Visible := AValue;
handleExceptionEnd
end;
//EVENT_TYPE:TNotifyEvent
procedure MenuItem_SetOnClick(AObj: TMenuItem; AEventData: Pointer); extdecl;
begin
{$DEFINE EventMethodName := OnTNotifyEvent}
{$DEFINE EventName := OnClick}
EventMethodCode
end;
//EVENT_TYPE:TMenuMeasureItemEvent
procedure MenuItem_SetOnMeasureItem(AObj: TMenuItem; AEventData: Pointer); extdecl;
begin
{$DEFINE EventMethodName := OnTMenuMeasureItemEvent}
{$DEFINE EventName := OnMeasureItem}
EventMethodCode
end;
function MenuItem_GetComponentCount(AObj: TMenuItem): Integer; extdecl;
begin
{$ifdef UsehandleException}Result := Integer(0);{$endif}
handleExceptionBegin
Result := AObj.ComponentCount;
handleExceptionEnd
end;
function MenuItem_GetComponentIndex(AObj: TMenuItem): Integer; extdecl;
begin
{$ifdef UsehandleException}Result := Integer(0);{$endif}
handleExceptionBegin
Result := AObj.ComponentIndex;
handleExceptionEnd
end;
procedure MenuItem_SetComponentIndex(AObj: TMenuItem; AValue: Integer); extdecl;
begin
handleExceptionBegin
AObj.ComponentIndex := AValue;
handleExceptionEnd
end;
function MenuItem_GetOwner(AObj: TMenuItem): TComponent; extdecl;
begin
{$ifdef UsehandleException}Result := nil;{$endif}
handleExceptionBegin
Result := AObj.Owner;
handleExceptionEnd
end;
function MenuItem_GetName(AObj: TMenuItem): PChar; extdecl;
begin
{$ifdef UsehandleException}Result := PChar(nil);{$endif}
handleExceptionBegin
Result := PChar(AObj.Name);
handleExceptionEnd
end;
procedure MenuItem_SetName(AObj: TMenuItem; AValue: PChar); extdecl;
begin
handleExceptionBegin
AObj.Name := AValue;
handleExceptionEnd
end;
function MenuItem_GetTag(AObj: TMenuItem): NativeInt; extdecl;
begin
{$ifdef UsehandleException}Result := NativeInt(0);{$endif}
handleExceptionBegin
Result := AObj.Tag;
handleExceptionEnd
end;
procedure MenuItem_SetTag(AObj: TMenuItem; AValue: NativeInt); extdecl;
begin
handleExceptionBegin
AObj.Tag := AValue;
handleExceptionEnd
end;
function MenuItem_GetItems(AObj: TMenuItem; Index: Integer): TMenuItem; extdecl;
begin
{$ifdef UsehandleException}Result := nil;{$endif}
handleExceptionBegin
Result := AObj.Items[Index];
handleExceptionEnd
end;
function MenuItem_GetComponents(AObj: TMenuItem; AIndex: Integer): TComponent; extdecl;
begin
{$ifdef UsehandleException}Result := nil;{$endif}
handleExceptionBegin
Result := AObj.Components[AIndex];
handleExceptionEnd
end;
function MenuItem_StaticClassType: TClass; extdecl;
begin
Result := TMenuItem;
end;
exports
MenuItem_Create,
MenuItem_Free,
MenuItem_Insert,
MenuItem_Delete,
MenuItem_Clear,
MenuItem_Click,
MenuItem_IndexOf,
MenuItem_HasParent,
MenuItem_Add,
MenuItem_FindComponent,
MenuItem_GetNamePath,
MenuItem_Assign,
MenuItem_ClassType,
MenuItem_ClassName,
MenuItem_InstanceSize,
MenuItem_InheritsFrom,
MenuItem_Equals,
MenuItem_GetHashCode,
MenuItem_ToString,
MenuItem_GetHandle,
MenuItem_GetCount,
MenuItem_GetParent,
MenuItem_GetAction,
MenuItem_SetAction,
MenuItem_GetAutoCheck,
MenuItem_SetAutoCheck,
MenuItem_GetBitmap,
MenuItem_SetBitmap,
MenuItem_GetCaption,
MenuItem_SetCaption,
MenuItem_GetChecked,
MenuItem_SetChecked,
MenuItem_GetDefault,
MenuItem_SetDefault,
MenuItem_GetEnabled,
MenuItem_SetEnabled,
MenuItem_GetGroupIndex,
MenuItem_SetGroupIndex,
MenuItem_GetHint,
MenuItem_SetHint,
MenuItem_GetImageIndex,
MenuItem_SetImageIndex,
MenuItem_GetRadioItem,
MenuItem_SetRadioItem,
MenuItem_GetShortCut,
MenuItem_SetShortCut,
MenuItem_GetVisible,
MenuItem_SetVisible,
MenuItem_SetOnClick,
MenuItem_SetOnMeasureItem,
MenuItem_GetComponentCount,
MenuItem_GetComponentIndex,
MenuItem_SetComponentIndex,
MenuItem_GetOwner,
MenuItem_GetName,
MenuItem_SetName,
MenuItem_GetTag,
MenuItem_SetTag,
MenuItem_GetItems,
MenuItem_GetComponents,
MenuItem_StaticClassType;