mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 06:09:29 +02:00
carbon: fixed compilation after adding Move() to carbon strings (TCheckListBox). issue #20589
git-svn-id: trunk@33178 -
This commit is contained in:
parent
cfde01b99c
commit
d52f647d9a
lcl/interfaces/carbon
@ -59,12 +59,13 @@ type
|
||||
TCarbonListBoxStrings = class(TStringList)
|
||||
private
|
||||
FOwner: TCarbonListBox; // Carbon list box control owning strings
|
||||
FWinControl: TWinControl;
|
||||
protected
|
||||
procedure Put(Index: Integer; const S: string); override;
|
||||
procedure InsertItem(Index: Integer; const S: string); override;
|
||||
procedure InsertItem(Index: Integer; const S: string; O: TObject); override;
|
||||
public
|
||||
constructor Create(AOwner: TCarbonListBox);
|
||||
constructor Create(AOwner: TCarbonListBox; AWinControl: TWinControl);
|
||||
procedure Clear; override;
|
||||
procedure Delete(Index: Integer); override;
|
||||
procedure Move(CurIndex, NewIndex: Integer); override;
|
||||
@ -258,10 +259,11 @@ end;
|
||||
|
||||
Creates new strings for Carbon list box items
|
||||
------------------------------------------------------------------------------}
|
||||
constructor TCarbonListBoxStrings.Create(AOwner: TCarbonListBox);
|
||||
constructor TCarbonListBoxStrings.Create(AOwner: TCarbonListBox; AWinControl: TWinControl);
|
||||
begin
|
||||
inherited Create;
|
||||
FOwner := AOwner;
|
||||
FWinControl := AWinControl;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -293,13 +295,13 @@ procedure TCarbonListBoxStrings.Move(CurIndex, NewIndex: Integer);
|
||||
var
|
||||
AState: TCheckBoxState;
|
||||
begin
|
||||
if Owner is TCustomCheckListBox then
|
||||
AState := TCarbonWSCustomCheckListBox.GetState(TCustomCheckListBox(Owner), CurIndex);
|
||||
if FWinControl is TCustomCheckListBox then
|
||||
AState := TCarbonWSCustomCheckListBox.GetState(TCustomCheckListBox(FWinControl), CurIndex);
|
||||
|
||||
inherited Move(CurIndex, NewIndex);
|
||||
|
||||
if Owner is TCustomCheckListBox then
|
||||
TCarbonWSCustomCheckListBox.SetState(TCustomCheckListBox(Owner), NewIndex, AState);
|
||||
if FWinControl is TCustomCheckListBox then
|
||||
TCarbonWSCustomCheckListBox.SetState(TCustomCheckListBox(FWinControl), NewIndex, AState);
|
||||
|
||||
end;
|
||||
|
||||
|
@ -593,7 +593,7 @@ begin
|
||||
Result := nil;
|
||||
if not CheckHandle(ACustomListBox, Self, 'GetStrings') then Exit;
|
||||
|
||||
Result := TCarbonListBoxStrings.Create(TCarbonListBox(ACustomListBox.Handle));
|
||||
Result := TCarbonListBoxStrings.Create(TCarbonListBox(ACustomListBox.Handle), ACustomListBox);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user