mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 03:29:28 +02:00
fixed TCarbonWSCustomComboBox, adding Get-SetDroppedDown method. ComboBoxDropDown removed from carbon widgetset
git-svn-id: trunk@22286 -
This commit is contained in:
parent
b89b28de7c
commit
97e87ee11f
@ -223,27 +223,6 @@ begin
|
|||||||
TCarbonRegion(Dest). CombineWith(TCarbonRegion(Src2), fnCombineMode);
|
TCarbonRegion(Dest). CombineWith(TCarbonRegion(Src2), fnCombineMode);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
|
||||||
Method: ComboBoxDropDown
|
|
||||||
Params: Handle - Handle to combo box
|
|
||||||
DropDown - Show list
|
|
||||||
Returns: If the function succeeds
|
|
||||||
|
|
||||||
Shows or hides the combo box list
|
|
||||||
------------------------------------------------------------------------------}
|
|
||||||
function TCarbonWidgetSet.ComboBoxDropDown(Handle: HWND; DropDown: boolean): boolean;
|
|
||||||
begin
|
|
||||||
Result := False;
|
|
||||||
|
|
||||||
{$IFDEF VerboseWinAPI}
|
|
||||||
DebugLn('TCarbonWidgetSet.ComboBoxDropDown Handle: ' + DbgS(Handle) + ' Drop: ' + DbgS(DropDown));
|
|
||||||
{$ENDIF}
|
|
||||||
|
|
||||||
if not CheckWidget(Handle, 'ComboBoxDropDown', TCarbonComboBox) then Exit;
|
|
||||||
|
|
||||||
Result := TCarbonComboBox(Handle).DropDown(DropDown);
|
|
||||||
end;
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: CreateBitmap
|
Method: CreateBitmap
|
||||||
Params: Width - Bitmap width, in pixels
|
Params: Width - Bitmap width, in pixels
|
||||||
|
@ -50,7 +50,6 @@ function ClipboardGetOwnerShip(ClipboardType: TClipboardType;
|
|||||||
function ClipboardRegisterFormat(const AMimeType: string): TClipboardFormat; override;
|
function ClipboardRegisterFormat(const AMimeType: string): TClipboardFormat; override;
|
||||||
|
|
||||||
function CombineRgn(Dest, Src1, Src2 : HRGN; fnCombineMode : Longint) : Longint; override;
|
function CombineRgn(Dest, Src1, Src2 : HRGN; fnCombineMode : Longint) : Longint; override;
|
||||||
function ComboBoxDropDown(Handle: HWND; DropDown: boolean): boolean; override;
|
|
||||||
function CreateBitmap(Width, Height: Integer; Planes, BitCount: Longint; BitmapBits: Pointer): HBITMAP; override;
|
function CreateBitmap(Width, Height: Integer; Planes, BitCount: Longint; BitmapBits: Pointer): HBITMAP; override;
|
||||||
function CreateBrushIndirect(const LogBrush: TLogBrush): HBRUSH; override;
|
function CreateBrushIndirect(const LogBrush: TLogBrush): HBRUSH; override;
|
||||||
function CreateCaret(Handle : HWND; Bitmap : hBitmap; width, Height : Integer) : Boolean; override;
|
function CreateCaret(Handle : HWND; Bitmap : hBitmap; width, Height : Integer) : Boolean; override;
|
||||||
|
@ -82,6 +82,9 @@ type
|
|||||||
|
|
||||||
class function GetItems(const ACustomComboBox: TCustomComboBox): TStrings; override;
|
class function GetItems(const ACustomComboBox: TCustomComboBox): TStrings; override;
|
||||||
class procedure Sort(const ACustomComboBox: TCustomComboBox; AList: TStrings; IsSorted: boolean); override;
|
class procedure Sort(const ACustomComboBox: TCustomComboBox; AList: TStrings; IsSorted: boolean); override;
|
||||||
|
|
||||||
|
class function GetDroppedDown(const ACustomComboBox: TCustomComboBox): Boolean; override;
|
||||||
|
class procedure SetDroppedDown(const ACustomComboBox: TCustomComboBox; ADroppedDown: Boolean); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TCarbonWSComboBox }
|
{ TCarbonWSComboBox }
|
||||||
@ -481,6 +484,35 @@ begin
|
|||||||
TCarbonComboBoxStrings(AList).Sorted := IsSorted;
|
TCarbonComboBoxStrings(AList).Sorted := IsSorted;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{------------------------------------------------------------------------------
|
||||||
|
Method: TCarbonWSCustomComboBox.GetDroppedDown
|
||||||
|
Returns: True if the combobox is dropped down
|
||||||
|
------------------------------------------------------------------------------}
|
||||||
|
class function TCarbonWSCustomComboBox.GetDroppedDown(const ACustomComboBox: TCustomComboBox): Boolean;
|
||||||
|
begin
|
||||||
|
Result := false;
|
||||||
|
|
||||||
|
if not CheckHandle(ACustomComboBox, Self, 'GetDroppedDown') then Exit;
|
||||||
|
|
||||||
|
TCarbonComboBox(ACustomComboBox.Handle).IsDroppedDown;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{------------------------------------------------------------------------------
|
||||||
|
Method: TCarbonWSCustomComboBox.SetDroppedDown
|
||||||
|
Params: DropDown - Show list
|
||||||
|
Returns: If the function succeeds
|
||||||
|
|
||||||
|
Shows or hides the combo box list
|
||||||
|
------------------------------------------------------------------------------}
|
||||||
|
class procedure TCarbonWSCustomComboBox.SetDroppedDown(const ACustomComboBox: TCustomComboBox;
|
||||||
|
ADroppedDown: Boolean);
|
||||||
|
begin
|
||||||
|
if not CheckHandle(ACustomComboBox, Self, 'SetDroppedDown') then Exit;
|
||||||
|
|
||||||
|
TCarbonComboBox(ACustomComboBox.Handle).DropDown(ADroppedDown);
|
||||||
|
end;
|
||||||
|
|
||||||
{ TCarbonWSCustomListBox }
|
{ TCarbonWSCustomListBox }
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user