1 unit CocoaWSFactory;
2
3 {$mode objfpc}{$H+}
4
5 interface
6
7 uses
8 Classes, Controls, ComCtrls, StdCtrls, Spin, PairSplitter,
9 Dialogs, ExtCtrls, Buttons, CheckLst, Forms, Menus, Calendar,
10 WSLCLClasses,
11 CocoaWSCommon,
12 CocoaWSButtons,
13 CocoaWSExtCtrls,
14 CocoaWSForms,
15 CocoaWSMenus,
16 CocoaWSStdCtrls,
17 CocoaWSComCtrls,
18 CocoaWSDialogs,
19 CocoaWSSpin,
20 CocoaWSCheckLst,
21 CocoaWSDatePicker;
22
23 // imglist
RegisterCustomImageListResolutionnull24 function RegisterCustomImageListResolution: Boolean;
25 // controls
RegisterDragImageListResolutionnull26 function RegisterDragImageListResolution: Boolean;
RegisterLazAccessibleObjectnull27 function RegisterLazAccessibleObject: Boolean;
RegisterControlnull28 function RegisterControl: Boolean;
RegisterWinControlnull29 function RegisterWinControl: Boolean;
RegisterGraphicControlnull30 function RegisterGraphicControl: Boolean;
RegisterCustomControlnull31 function RegisterCustomControl: Boolean;
32 // comctrls
RegisterStatusBarnull33 function RegisterStatusBar: Boolean;
RegisterTabSheetnull34 function RegisterTabSheet: Boolean;
RegisterPageControlnull35 function RegisterPageControl: Boolean;
RegisterCustomListViewnull36 function RegisterCustomListView: Boolean;
RegisterCustomProgressBarnull37 function RegisterCustomProgressBar: Boolean;
RegisterCustomUpDownnull38 function RegisterCustomUpDown: Boolean;
RegisterCustomToolButtonnull39 function RegisterCustomToolButton: Boolean;
RegisterToolBarnull40 function RegisterToolBar: Boolean;
RegisterCustomTrackBarnull41 function RegisterCustomTrackBar: Boolean;
RegisterCustomTreeViewnull42 function RegisterCustomTreeView: Boolean;
43 // calendar
RegisterCustomCalendarnull44 function RegisterCustomCalendar: Boolean;
45 // dialogs
RegisterCommonDialognull46 function RegisterCommonDialog: Boolean;
RegisterFileDialognull47 function RegisterFileDialog: Boolean;
RegisterOpenDialognull48 function RegisterOpenDialog: Boolean;
RegisterSaveDialognull49 function RegisterSaveDialog: Boolean;
RegisterSelectDirectoryDialognull50 function RegisterSelectDirectoryDialog: Boolean;
RegisterColorDialognull51 function RegisterColorDialog: Boolean;
RegisterColorButtonnull52 function RegisterColorButton: Boolean;
RegisterFontDialognull53 function RegisterFontDialog: Boolean;
54 // StdCtrls
RegisterCustomScrollBarnull55 function RegisterCustomScrollBar: Boolean;
RegisterCustomGroupBoxnull56 function RegisterCustomGroupBox: Boolean;
RegisterCustomComboBoxnull57 function RegisterCustomComboBox: Boolean;
RegisterCustomListBoxnull58 function RegisterCustomListBox: Boolean;
RegisterCustomEditnull59 function RegisterCustomEdit: Boolean;
RegisterCustomMemonull60 function RegisterCustomMemo: Boolean;
RegisterButtonControlnull61 function RegisterButtonControl: Boolean;
RegisterCustomButtonnull62 function RegisterCustomButton: Boolean;
RegisterCustomCheckBoxnull63 function RegisterCustomCheckBox: Boolean;
RegisterToggleBoxnull64 function RegisterToggleBox: Boolean;
RegisterRadioButtonnull65 function RegisterRadioButton: Boolean;
RegisterCustomStaticTextnull66 function RegisterCustomStaticText: Boolean;
RegisterCustomLabelnull67 function RegisterCustomLabel: Boolean;
68 // extctrls
RegisterCustomPagenull69 function RegisterCustomPage: Boolean;
RegisterCustomNotebooknull70 function RegisterCustomNotebook: Boolean;
RegisterShapenull71 function RegisterShape: Boolean;
RegisterCustomSplitternull72 function RegisterCustomSplitter: Boolean;
RegisterPaintBoxnull73 function RegisterPaintBox: Boolean;
RegisterCustomImagenull74 function RegisterCustomImage: Boolean;
RegisterBevelnull75 function RegisterBevel: Boolean;
RegisterCustomRadioGroupnull76 function RegisterCustomRadioGroup: Boolean;
RegisterCustomCheckGroupnull77 function RegisterCustomCheckGroup: Boolean;
RegisterCustomLabeledEditnull78 function RegisterCustomLabeledEdit: Boolean;
RegisterCustomPanelnull79 function RegisterCustomPanel: Boolean;
RegisterCustomTrayIconnull80 function RegisterCustomTrayIcon: Boolean;
81 //ExtDlgs
RegisterPreviewFileControlnull82 function RegisterPreviewFileControl: Boolean;
RegisterPreviewFileDialognull83 function RegisterPreviewFileDialog: Boolean;
RegisterOpenPictureDialognull84 function RegisterOpenPictureDialog: Boolean;
RegisterSavePictureDialognull85 function RegisterSavePictureDialog: Boolean;
RegisterCalculatorDialognull86 function RegisterCalculatorDialog: Boolean;
RegisterCalculatorFormnull87 function RegisterCalculatorForm: Boolean;
RegisterCalendarDialognull88 function RegisterCalendarDialog: Boolean;
89 // Buttons
RegisterCustomBitBtnnull90 function RegisterCustomBitBtn: Boolean;
RegisterCustomSpeedButtonnull91 function RegisterCustomSpeedButton: Boolean;
92 // CheckLst
RegisterCustomCheckListBoxnull93 function RegisterCustomCheckListBox: Boolean;
94 // Forms
RegisterScrollingWinControlnull95 function RegisterScrollingWinControl: Boolean;
RegisterScrollBoxnull96 function RegisterScrollBox: Boolean;
RegisterCustomFramenull97 function RegisterCustomFrame: Boolean;
RegisterCustomFormnull98 function RegisterCustomForm: Boolean;
RegisterHintWindownull99 function RegisterHintWindow: Boolean;
RegisterCustomGridnull100 function RegisterCustomGrid: Boolean;
RegisterMenuItemnull101 function RegisterMenuItem: Boolean;
RegisterMenunull102 function RegisterMenu: Boolean;
RegisterMainMenunull103 function RegisterMainMenu: Boolean;
RegisterPopupMenunull104 function RegisterPopupMenu: Boolean;
RegisterPairSplitterSidenull105 function RegisterPairSplitterSide: Boolean;
RegisterCustomPairSplitternull106 function RegisterCustomPairSplitter: Boolean;
RegisterCustomFloatSpinEditnull107 function RegisterCustomFloatSpinEdit: Boolean;
RegisterCustomRubberBandnull108 function RegisterCustomRubberBand: Boolean;
109 // LazDeviceAPIs
RegisterLazDeviceAPIsnull110 function RegisterLazDeviceAPIs: Boolean;
111
112 implementation
113
114
115
116 // imglist
RegisterCustomImageListResolutionnull117 function RegisterCustomImageListResolution: Boolean; alias : 'WSRegisterCustomImageListResolution';
118 begin
119 Result := False;
120 end;
121
122 // controls
RegisterDragImageListResolutionnull123 function RegisterDragImageListResolution: Boolean; alias : 'WSRegisterDragImageListResolution';
124 begin
125 Result := False;
126 end;
127
RegisterLazAccessibleObjectnull128 function RegisterLazAccessibleObject: Boolean; alias : 'WSRegisterLazAccessibleObject';
129 begin
130 // RegisterWSLazAccessibleObject(TGtk2WSLazAccessibleObject);
131 // Result := True;
132 Result := False;
133 end;
134
RegisterControlnull135 function RegisterControl: Boolean; alias : 'WSRegisterControl';
136 begin
137 RegisterWSComponent(TControl, TCocoaWSControl);
138 Result := True;
139 end;
140
RegisterWinControlnull141 function RegisterWinControl: Boolean; alias : 'WSRegisterWinControl';
142 begin
143 RegisterWSComponent(TWinControl, TCocoaWSWinControl);
144 Result := True;
145 end;
146
RegisterGraphicControlnull147 function RegisterGraphicControl: Boolean; alias : 'WSRegisterGraphicControl';
148 begin
149 Result := False;
150 end;
151
RegisterCustomControlnull152 function RegisterCustomControl: Boolean; alias : 'WSRegisterCustomControl';
153 begin
154 RegisterWSComponent(TCustomControl, TCocoaWSCustomControl);
155 Result := True;
156 end;
157
158 // comctrls
RegisterStatusBarnull159 function RegisterStatusBar: Boolean; alias : 'WSRegisterStatusBar';
160 begin
161 RegisterWSComponent(TStatusBar, TCocoaWSStatusBar);
162 Result := True;
163 end;
164
RegisterTabSheetnull165 function RegisterTabSheet: Boolean; alias : 'WSRegisterTabSheet';
166 begin
167 Result := False;
168 end;
169
RegisterPageControlnull170 function RegisterPageControl: Boolean; alias : 'WSRegisterPageControl';
171 begin
172 Result := False;
173 end;
174
RegisterCustomListViewnull175 function RegisterCustomListView: Boolean; alias : 'WSRegisterCustomListView';
176 begin
177 RegisterWSComponent(TCustomListView, TCocoaWSCustomListView);
178 Result := True;
179 end;
180
RegisterCustomProgressBarnull181 function RegisterCustomProgressBar: Boolean; alias : 'WSRegisterCustomProgressBar';
182 begin
183 RegisterWSComponent(TCustomProgressBar, TCocoaWSProgressBar);
184 Result := True;
185 end;
186
RegisterCustomUpDownnull187 function RegisterCustomUpDown: Boolean; alias : 'WSRegisterCustomUpDown';
188 begin
189 RegisterWSComponent(TCustomUpDown, TCocoaWSCustomUpDown);
190 Result := True;
191 end;
192
RegisterCustomToolButtonnull193 function RegisterCustomToolButton: Boolean; alias : 'WSRegisterCustomToolButton';
194 begin
195 Result := False;
196 end;
197
RegisterToolBarnull198 function RegisterToolBar: Boolean; alias : 'WSRegisterToolBar';
199 begin
200 Result := False;
201 end;
202
RegisterCustomTrackBarnull203 function RegisterCustomTrackBar: Boolean; alias : 'WSRegisterCustomTrackBar';
204 begin
205 RegisterWSComponent(TCustomTrackBar, TCocoaWSTrackBar);
206 Result := True;
207 end;
208
RegisterCustomTreeViewnull209 function RegisterCustomTreeView: Boolean; alias : 'WSRegisterCustomTreeView';
210 begin
211 Result := False;
212 end;
213
214 // calendar
RegisterCustomCalendarnull215 function RegisterCustomCalendar: Boolean; alias : 'WSRegisterCustomCalendar';
216 begin
217 RegisterWSComponent(TCustomCalendar, TCocoaWSCustomCalendar);
218 Result := True;
219 end;
220
221 // dialogs
RegisterCommonDialognull222 function RegisterCommonDialog: Boolean; alias : 'WSRegisterCommonDialog';
223 begin
224 Result := False;
225 end;
226
RegisterFileDialognull227 function RegisterFileDialog: Boolean; alias : 'WSRegisterFileDialog';
228 begin
229 RegisterWSComponent(TFileDialog, TCocoaWSFileDialog);
230 Result := True;
231 end;
232
RegisterOpenDialognull233 function RegisterOpenDialog: Boolean; alias : 'WSRegisterOpenDialog';
234 begin
235 Result := False;
236 end;
237
RegisterSaveDialognull238 function RegisterSaveDialog: Boolean; alias : 'WSRegisterSaveDialog';
239 begin
240 Result := False;
241 end;
242
RegisterSelectDirectoryDialognull243 function RegisterSelectDirectoryDialog: Boolean; alias : 'WSRegisterSelectDirectoryDialog';
244 begin
245 Result := False;
246 end;
247
RegisterColorDialognull248 function RegisterColorDialog: Boolean; alias : 'WSRegisterColorDialog';
249 begin
250 RegisterWSComponent(TColorDialog, TCocoaWSColorDialog);
251 Result := True;
252 end;
253
RegisterColorButtonnull254 function RegisterColorButton: Boolean; alias : 'WSRegisterColorButton';
255 begin
256 Result := False;
257 end;
258
RegisterFontDialognull259 function RegisterFontDialog: Boolean; alias : 'WSRegisterFontDialog';
260 begin
261 RegisterWSComponent(TFontDialog, TCocoaWSFontDialog);
262 Result := False;
263 end;
264
265 // StdCtrls
RegisterCustomScrollBarnull266 function RegisterCustomScrollBar: Boolean; alias : 'WSRegisterCustomScrollBar';
267 begin
268 RegisterWSComponent(TCustomScrollBar, TCocoaWSScrollBar);
269 Result := True;
270 end;
271
RegisterCustomGroupBoxnull272 function RegisterCustomGroupBox: Boolean; alias : 'WSRegisterCustomGroupBox';
273 begin
274 RegisterWSComponent(TCustomGroupBox, TCocoaWSCustomGroupBox);
275 Result := True;
276 end;
277
RegisterCustomComboBoxnull278 function RegisterCustomComboBox: Boolean; alias : 'WSRegisterCustomComboBox';
279 begin
280 RegisterWSComponent(TCustomComboBox, TCocoaWSCustomComboBox);
281 Result := True;
282 end;
283
RegisterCustomListBoxnull284 function RegisterCustomListBox: Boolean; alias : 'WSRegisterCustomListBox';
285 begin
286 RegisterWSComponent(TCustomListBox, TCocoaWSCustomListBox);
287 Result := True;
288 end;
289
RegisterCustomEditnull290 function RegisterCustomEdit: Boolean; alias : 'WSRegisterCustomEdit';
291 begin
292 RegisterWSComponent(TCustomEdit, TCocoaWSCustomEdit);
293 Result := True;
294 end;
295
RegisterCustomMemonull296 function RegisterCustomMemo: Boolean; alias : 'WSRegisterCustomMemo';
297 begin
298 RegisterWSComponent(TCustomMemo, TCocoaWSCustomMemo);
299 Result := True;
300 end;
301
RegisterButtonControlnull302 function RegisterButtonControl: Boolean; alias : 'WSRegisterButtonControl';
303 begin
304 Result := False;
305 end;
306
RegisterCustomButtonnull307 function RegisterCustomButton: Boolean; alias : 'WSRegisterCustomButton';
308 begin
309 RegisterWSComponent(TCustomButton, TCocoaWSButton);
310 Result := True;
311 end;
312
RegisterCustomCheckBoxnull313 function RegisterCustomCheckBox: Boolean; alias : 'WSRegisterCustomCheckBox';
314 begin
315 RegisterWSComponent(TCustomCheckBox, TCocoaWSCustomCheckBox);
316 Result := True;
317 end;
318
RegisterToggleBoxnull319 function RegisterToggleBox: Boolean; alias : 'WSRegisterToggleBox';
320 begin
321 RegisterWSComponent(TToggleBox, TCocoaWSToggleBox);
322 Result := True;
323 end;
324
RegisterRadioButtonnull325 function RegisterRadioButton: Boolean; alias : 'WSRegisterRadioButton';
326 begin
327 RegisterWSComponent(TRadioButton, TCocoaWSRadioButton);
328 Result := False;
329 end;
330
RegisterCustomStaticTextnull331 function RegisterCustomStaticText: Boolean; alias : 'WSRegisterCustomStaticText';
332 begin
333 RegisterWSComponent(TCustomStaticText, TCocoaWSCustomStaticText);
334 Result := True;
335 end;
336
RegisterCustomLabelnull337 function RegisterCustomLabel: Boolean; alias : 'WSRegisterCustomLabel';
338 begin
339 Result := False;
340 end;
341
342 // extctrls
RegisterCustomPagenull343 function RegisterCustomPage: Boolean; alias : 'WSRegisterCustomPage';
344 begin
345 RegisterWSComponent(TCustomPage, TCocoaWSCustomPage);
346 Result := True;
347 end;
348
RegisterCustomNotebooknull349 function RegisterCustomNotebook: Boolean; alias : 'WSRegisterCustomNotebook';
350 begin
351 RegisterWSComponent(TCustomTabControl, TCocoaWSCustomTabControl);
352 Result := True;
353 end;
354
RegisterShapenull355 function RegisterShape: Boolean; alias : 'WSRegisterShape';
356 begin
357 Result := False;
358 end;
359
RegisterCustomSplitternull360 function RegisterCustomSplitter: Boolean; alias : 'WSRegisterCustomSplitter';
361 begin
362 RegisterWSComponent(TCustomSplitter, TCocoaWSCustomSplitter);
363 Result := True;
364 end;
365
RegisterPaintBoxnull366 function RegisterPaintBox: Boolean; alias : 'WSRegisterPaintBox';
367 begin
368 Result := False;
369 end;
370
RegisterCustomImagenull371 function RegisterCustomImage: Boolean; alias : 'WSRegisterCustomImage';
372 begin
373 Result := False;
374 end;
375
RegisterBevelnull376 function RegisterBevel: Boolean; alias : 'WSRegisterBevel';
377 begin
378 Result := False;
379 end;
380
RegisterCustomRadioGroupnull381 function RegisterCustomRadioGroup: Boolean; alias : 'WSRegisterCustomRadioGroup';
382 begin
383 Result := False;
384 end;
385
RegisterCustomCheckGroupnull386 function RegisterCustomCheckGroup: Boolean; alias : 'WSRegisterCustomCheckGroup';
387 begin
388 Result := False;
389 end;
390
RegisterCustomLabeledEditnull391 function RegisterCustomLabeledEdit: Boolean; alias : 'WSRegisterCustomLabeledEdit';
392 begin
393 Result := False;
394 end;
395
RegisterCustomPanelnull396 function RegisterCustomPanel: Boolean; alias : 'WSRegisterCustomPanel';
397 begin
398 Result := False;
399 end;
400
RegisterCustomTrayIconnull401 function RegisterCustomTrayIcon: Boolean; alias : 'WSRegisterCustomTrayIcon';
402 begin
403 RegisterWSComponent(TCustomTrayIcon, TCocoaWSCustomTrayIcon);
404 Result := True;
405 end;
406
407 //ExtDlgs
RegisterPreviewFileControlnull408 function RegisterPreviewFileControl: Boolean; alias : 'WSRegisterPreviewFileControl';
409 begin
410 Result := False;
411 end;
412
RegisterPreviewFileDialognull413 function RegisterPreviewFileDialog: Boolean; alias : 'WSRegisterPreviewFileDialog';
414 begin
415 Result := False;
416 end;
417
RegisterOpenPictureDialognull418 function RegisterOpenPictureDialog: Boolean; alias : 'WSRegisterOpenPictureDialog';
419 begin
420 Result := False;
421 end;
422
RegisterSavePictureDialognull423 function RegisterSavePictureDialog: Boolean; alias : 'WSRegisterSavePictureDialog';
424 begin
425 Result := False;
426 end;
427
RegisterCalculatorDialognull428 function RegisterCalculatorDialog: Boolean; alias : 'WSRegisterCalculatorDialog';
429 begin
430 Result := False;
431 end;
432
RegisterCalculatorFormnull433 function RegisterCalculatorForm: Boolean; alias : 'WSRegisterCalculatorForm';
434 begin
435 Result := False;
436 end;
437
438 (*function RegisterCalendarDialogForm: Boolean; alias : 'WSRegisterCalendarDialogForm';
439 begin
440 // RegisterWSComponent(TCalendarDialogForm, TCarbonWSCalendarDialogForm);
441 Result := False;
442 end;*)
443
RegisterCalendarDialognull444 function RegisterCalendarDialog: Boolean; alias : 'WSRegisterCalendarDialog';
445 begin
446 Result := False;
447 end;
448
449 // Buttons
RegisterCustomBitBtnnull450 function RegisterCustomBitBtn: Boolean; alias : 'WSRegisterCustomBitBtn';
451 begin
452 RegisterWSComponent(TCustomBitBtn, TCocoaWSBitBtn);
453 Result := True;
454 end;
455
RegisterCustomSpeedButtonnull456 function RegisterCustomSpeedButton: Boolean; alias : 'WSRegisterCustomSpeedButton';
457 begin
458 Result := False;
459 end;
460
461 // CheckLst
RegisterCustomCheckListBoxnull462 function RegisterCustomCheckListBox: Boolean; alias : 'WSRegisterCustomCheckListBox';
463 begin
464 RegisterWSComponent(TCustomCheckListBox, TCocoaWSCustomCheckListBox);
465 Result := True;
466 end;
467
468 // Forms
RegisterScrollingWinControlnull469 function RegisterScrollingWinControl: Boolean; alias : 'WSRegisterScrollingWinControl';
470 begin
471 RegisterWSComponent(TScrollingWinControl, TCocoaWSScrollingWinControl);
472 Result := True;
473 end;
474
RegisterScrollBoxnull475 function RegisterScrollBox: Boolean; alias : 'WSRegisterScrollBox';
476 begin
477 Result := False;
478 end;
479
RegisterCustomFramenull480 function RegisterCustomFrame: Boolean; alias : 'WSRegisterCustomFrame';
481 begin
482 Result := False;
483 end;
484
RegisterCustomFormnull485 function RegisterCustomForm: Boolean; alias : 'WSRegisterCustomForm';
486 begin
487 RegisterWSComponent(TCustomForm, TCocoaWSCustomForm);
488 Result := True;
489 end;
490
RegisterHintWindownull491 function RegisterHintWindow: Boolean; alias : 'WSRegisterHintWindow';
492 begin
493 RegisterWSComponent(THintWindow, TCocoaWSHintWindow);
494 Result := True;
495 end;
496
497 // Grids
RegisterCustomGridnull498 function RegisterCustomGrid: Boolean; alias : 'WSRegisterCustomGrid';
499 begin
500 Result := False;
501 end;
502
503 // Menus
RegisterMenuItemnull504 function RegisterMenuItem: Boolean; alias : 'WSRegisterMenuItem';
505 begin
506 RegisterWSComponent(TMenuItem, TCocoaWSMenuItem);
507 Result := True;
508 end;
509
RegisterMenunull510 function RegisterMenu: Boolean; alias : 'WSRegisterMenu';
511 begin
512 RegisterWSComponent(TMenu, TCocoaWSMenu);
513 Result := True;
514 end;
515
RegisterMainMenunull516 function RegisterMainMenu: Boolean; alias : 'WSRegisterMainMenu';
517 begin
518 RegisterWSComponent(TMainMenu, TCocoaWSMainMenu);
519 Result := True;
520 end;
521
RegisterPopupMenunull522 function RegisterPopupMenu: Boolean; alias : 'WSRegisterPopupMenu';
523 begin
524 RegisterWSComponent(TPopupMenu, TCocoaWSPopupMenu);
525 Result := True;
526 end;
527
RegisterPairSplitterSidenull528 function RegisterPairSplitterSide: Boolean; alias : 'WSRegisterPairSplitterSide';
529 begin
530 Result := False;
531 end;
532
RegisterCustomPairSplitternull533 function RegisterCustomPairSplitter: Boolean; alias : 'WSRegisterCustomPairSplitter';
534 begin
535 Result := False;
536 end;
537
538 // Spin
RegisterCustomFloatSpinEditnull539 function RegisterCustomFloatSpinEdit: Boolean; alias : 'WSRegisterCustomFloatSpinEdit';
540 begin
541 RegisterWSComponent(TCustomFloatSpinEdit, TCocoaWSCustomFloatSpinEdit);
542 Result := True;
543 end;
544
545 // RubberBand
RegisterCustomRubberBandnull546 function RegisterCustomRubberBand: Boolean; alias : 'WSRegisterCustomRubberBand';
547 begin
548 Result := False;
549 end;
550
RegisterLazDeviceAPIsnull551 function RegisterLazDeviceAPIs: Boolean; alias : 'WSRegisterLazDeviceAPIs';
552 begin
553 //RegisterWSLazDeviceAPIs(TCDWSLazDeviceAPIs);
554 Result := False;
555 end;
556
557 end.
558
559