71
96
class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override;
73
98
class procedure ColumnDelete(const ALV: TCustomListView; const AIndex: Integer); override;
74
class function ColumnGetWidth(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn): Integer; override;
99
class function ColumnGetWidth(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AColumn: TListColumn): Integer; override;
75
100
class procedure ColumnInsert(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn); override;
76
101
class procedure ColumnMove(const ALV: TCustomListView; const AOldIndex, ANewIndex: Integer; const AColumn: TListColumn); override;
77
class procedure ColumnSetAlignment(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AAlignment: TAlignment); override;
78
//class procedure ColumnSetAutoSize(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AAutoSize: Boolean); override;
79
class procedure ColumnSetCaption(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const ACaption: String); override;
80
class procedure ColumnSetImage(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AImageIndex: Integer); override;
81
class procedure ColumnSetMaxWidth(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AMaxWidth: Integer); override;
82
class procedure ColumnSetMinWidth(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AMinWidth: integer); override;
83
class procedure ColumnSetWidth(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AWidth: Integer); override;
84
class procedure ColumnSetVisible(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AVisible: Boolean); override;
102
class procedure ColumnSetAlignment(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AColumn: TListColumn; const AAlignment: TAlignment); override;
103
class procedure ColumnSetAutoSize(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AColumn: TListColumn; const AAutoSize: Boolean); override;
104
class procedure ColumnSetCaption(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AColumn: TListColumn; const ACaption: String); override;
105
class procedure ColumnSetImage(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AColumn: TListColumn; const AImageIndex: Integer); override;
106
class procedure ColumnSetMaxWidth(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AColumn: TListColumn; const AMaxWidth: Integer); override;
107
class procedure ColumnSetMinWidth(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AColumn: TListColumn; const AMinWidth: integer); override;
108
class procedure ColumnSetWidth(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AColumn: TListColumn; const AWidth: Integer); override;
109
class procedure ColumnSetVisible(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AColumn: TListColumn; const AVisible: Boolean); override;
87
112
class procedure ItemDelete(const ALV: TCustomListView; const AIndex: Integer); override;
88
113
class function ItemDisplayRect(const ALV: TCustomListView; const AIndex, ASubItem: Integer; ACode: TDisplayCode): TRect; override;
89
class function ItemGetChecked(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem): Boolean; override;
114
class function ItemGetChecked(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AItem: TListItem): Boolean; override;
90
115
class function ItemGetPosition(const ALV: TCustomListView; const AIndex: Integer): TPoint; override;
91
class function ItemGetState(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const AState: TListItemState; out AIsSet: Boolean): Boolean; override; // returns True if supported
92
class procedure ItemInsert(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem); override;
93
class procedure ItemSetChecked(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const AChecked: Boolean); override;
94
class procedure ItemSetImage(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const ASubIndex, AImageIndex: Integer); override;
116
class function ItemGetState(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AItem: TListItem; const AState: TListItemState; out AIsSet: Boolean): Boolean; override; // returns True if supported
117
class procedure ItemInsert(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AItem: TListItem); override;
118
class procedure ItemSetChecked(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AItem: TListItem; const AChecked: Boolean); override;
119
class procedure ItemSetImage(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AItem: TListItem; const {%H-}ASubIndex, {%H-}AImageIndex: Integer); override;
95
120
//class function ItemSetPosition(const ALV: TCustomListView; const AIndex: Integer; const ANewPosition: TPoint): Boolean; override;
96
class procedure ItemSetState(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const AState: TListItemState; const AIsSet: Boolean); override;
97
class procedure ItemSetText(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const ASubIndex: Integer; const AText: String); override;
98
class procedure ItemShow(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const PartialOK: Boolean); override;
121
class procedure ItemSetState(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AItem: TListItem; const AState: TListItemState; const AIsSet: Boolean); override;
122
class procedure ItemSetText(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AItem: TListItem; const {%H-}ASubIndex: Integer; const {%H-}AText: String); override;
123
class procedure ItemShow(const ALV: TCustomListView; const AIndex: Integer; const {%H-}AItem: TListItem; const PartialOK: Boolean); override;
101
126
//class procedure BeginUpdate(const ALV: TCustomListView); override;
254
290
TCarbonStatusBar(AStatusBar.Handle).UpdatePanel;
293
{ TCarbonWSCustomPage }
295
{------------------------------------------------------------------------------
296
Method: TCarbonWSCustomPage.CreateHandle
297
Params: AWinControl - LCL control
298
AParams - Creation parameters
299
Returns: Handle to the control in Carbon interface
301
Creates new custom page in Carbon interface with the specified parameters
302
------------------------------------------------------------------------------}
303
class function TCarbonWSCustomPage.CreateHandle(const AWinControl: TWinControl;
304
const AParams: TCreateParams): TLCLIntfHandle;
306
Result := TLCLIntfHandle(TCarbonTab.Create(AWinControl, AParams));
309
{------------------------------------------------------------------------------
310
Method: TCarbonWSCustomPage.UpdateProperties
311
Params: ACustomPage - LCL custom page
313
Update properties of the specified custom page in Carbon interface
314
------------------------------------------------------------------------------}
315
class procedure TCarbonWSCustomPage.UpdateProperties(const ACustomPage: TCustomPage);
317
if not CheckHandle(ACustomPage, Self, 'UpdateProperties') then Exit;
319
TCarbonTab(ACustomPage.Handle).UpdateTab;
322
{ TCarbonWSCustomNotebook }
324
{------------------------------------------------------------------------------
325
Method: TCarbonWSCustomNotebook.CreateHandle
326
Params: AWinControl - LCL control
327
AParams - Creation parameters
328
Returns: Handle to the control in Carbon interface
330
Creates new custom notebook in Carbon interface with the specified parameters
331
------------------------------------------------------------------------------}
332
class function TCarbonWSCustomNotebook.CreateHandle(const AWinControl: TWinControl;
333
const AParams: TCreateParams): TLCLIntfHandle;
335
if AWinControl is TTabControl then
337
Result := TLCLIntfHandle(TCarbonCustomControl.Create(AWinControl, AParams));
338
TCarbonCustomControl(Result).CarbonWidgetFlag := cwdTTabControl;
340
Result := TLCLIntfHandle(TCarbonTabsControl.Create(AWinControl, AParams));
343
{------------------------------------------------------------------------------
344
Method: TCarbonWSCustomNotebook.AddPage
345
Params: ATabControl - LCL custom notebook
347
AIndex - New tab index
349
Adds tab with the specified index in notebook in Carbon interface
350
------------------------------------------------------------------------------}
351
class procedure TCarbonWSCustomNotebook.AddPage(const ATabControl: TCustomTabControl;
352
const AChild: TCustomPage; const AIndex: integer);
354
if not CheckHandle(ATabControl, Self, 'AddPage') then Exit;
355
if AChild.HandleAllocated and not CheckHandle(AChild, Self, 'AddPage AChild') then Exit;
357
// create child handle
360
TCarbonTabsControl(ATabControl.Handle).Add(TCarbonTab(AChild.Handle), AIndex);
361
// sync PageIndex with LCL
362
TCarbonTabsControl(ATabControl.Handle).SetPageIndex(ATabControl.PageIndex);
365
{------------------------------------------------------------------------------
366
Method: TCarbonWSCustomNotebook.MovePage
367
Params: ATabControl - LCL custom notebook
369
AIndex - New tab index
371
Moves tab to the specified index in notebook in Carbon interface
372
------------------------------------------------------------------------------}
373
class procedure TCarbonWSCustomNotebook.MovePage(const ATabControl: TCustomTabControl;
374
const AChild: TCustomPage; const NewIndex: integer);
376
if not CheckHandle(ATabControl, Self, 'MovePage') then Exit;
377
if not CheckHandle(AChild, Self, 'MovePage AChild') then Exit;
379
TCarbonTabsControl(ATabControl.Handle).Remove(AChild.PageIndex);
380
TCarbonTabsControl(ATabControl.Handle).Add(TCarbonTab(AChild.Handle), NewIndex);
383
{------------------------------------------------------------------------------
384
Method: TCarbonWSCustomNotebook.RemovePage
385
Params: ATabControl - LCL custom notebook
386
AIndex - Removed tab index
388
Removes tab with the specified index from notebook in Carbon interface
389
------------------------------------------------------------------------------}
390
class procedure TCarbonWSCustomNotebook.RemovePage(const ATabControl: TCustomTabControl;
391
const AIndex: integer);
393
if not CheckHandle(ATabControl, Self, 'RemovePage') then Exit;
395
TCarbonTabsControl(ATabControl.Handle).Remove(AIndex);
396
// sync PageIndex with LCL
397
TCarbonTabsControl(ATabControl.Handle).SetPageIndex(ATabControl.PageIndex);
401
class function TCarbonWSCustomNotebook.GetTabIndexAtPos(const ATabControl: TCustomTabControl; const AClientPos: TPoint): integer;
405
if not CheckHandle(ATabControl, Self, 'GetTabIndexAtPos') then Exit;
407
inc(p.y, 35); // todo: find out why AClientPos incorrect for TNotebook
408
Result := TCarbonTabsControl(ATabControl.Handle).GetPageIndexAtCursor(p);
411
{------------------------------------------------------------------------------
412
Method: TCarbonWSCustomNotebook.SetPageIndex
413
Params: ATabControl - LCL custom notebook
414
AIndex - New tab index
416
Selects tab with the specified index in notebook in Carbon interface
417
------------------------------------------------------------------------------}
418
class procedure TCarbonWSCustomNotebook.SetPageIndex(const ATabControl: TCustomTabControl;
419
const AIndex: integer);
421
if not CheckHandle(ATabControl, Self, 'SetPageIndex') then Exit;
422
if (AIndex < 0) or (AIndex > ATabControl.PageCount - 1) then
424
TCarbonTabsControl(ATabControl.Handle).SetPageIndex(AIndex);
427
{------------------------------------------------------------------------------
428
Method: TCarbonWSCustomNotebook.SetTabPosition
429
Params: ATabControl - LCL custom notebook
430
ATabPosition - New position of tabs
432
Changes position of the tabs of notebook in Carbon interface
433
------------------------------------------------------------------------------}
434
class procedure TCarbonWSCustomNotebook.SetTabPosition(const ATabControl: TCustomTabControl;
435
const ATabPosition: TTabPosition);
437
if not CheckHandle(ATabControl, Self, 'SetTabPosition') then Exit;
439
TCarbonTabsControl(ATabControl.Handle).SetTabPosition(ATabPosition);
442
{------------------------------------------------------------------------------
443
Method: TCarbonWSCustomNotebook.ShowTabs
444
Params: ATabControl - LCL custom notebook
445
AShowTabs - Tabs visibility
447
Changes visibility of all tabs of notebook in Carbon interface
448
------------------------------------------------------------------------------}
449
class procedure TCarbonWSCustomNotebook.ShowTabs(const ATabControl: TCustomTabControl;
452
if not CheckHandle(ATabControl, Self, 'ShowTabs') then Exit;
453
if TCarbonControl(ATabControl.Handle).CarbonWidgetFlag <> cwdTTabControl then
454
TCarbonTabsControl(ATabControl.Handle).ShowTabs(AShowTabs);
257
457
{ TCarbonWSCustomListView }
259
459
{------------------------------------------------------------------------------