mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-27 20:49:22 +02:00
LCL carbon: implemented GetScrollBarVisible
git-svn-id: trunk@17346 -
This commit is contained in:
parent
1134a7832f
commit
dbeb427730
@ -104,6 +104,7 @@ type
|
||||
|
||||
function GetNextFocus(Start: TCarbonWidget; Next: Boolean): ControlRef;
|
||||
procedure GetScrollInfo(SBStyle: Integer; var ScrollInfo: TScrollInfo); virtual;
|
||||
function GetScrollbarVisible(SBStyle: Integer): Boolean; virtual;
|
||||
function GetBounds(var ARect: TRect): Boolean; virtual; abstract;
|
||||
function GetScreenBounds(var ARect: TRect): Boolean; virtual; abstract;
|
||||
function SetBounds(const ARect: TRect): Boolean; virtual; abstract;
|
||||
@ -440,9 +441,13 @@ end;
|
||||
Updates client rect of LCL object
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCarbonWidget.UpdateLCLClientRect;
|
||||
var
|
||||
R: TRect;
|
||||
begin
|
||||
//GetBounds(R);
|
||||
|
||||
//LCLObject.InvalidateClientRectCache(False);
|
||||
//LCLSendSizeMsg(LCLObject, LCLObject.Width, LCLObject.Height, Size_SourceIsInterface);
|
||||
//LCLSendSizeMsg(LCLObject, R.Right - R.Left, R.Bottom - R.Top, Size_SourceIsInterface);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -781,6 +786,12 @@ begin
|
||||
DebugLn(ClassName + '.GetScrollInfo unsupported or not implemented!');
|
||||
end;
|
||||
|
||||
function TCarbonWidget.GetScrollbarVisible(SBStyle: Integer): Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
DebugLn(ClassName + '.GetScrollbarVisible unsupported or not implemented!');
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TCarbonControl.SetChildZPosition
|
||||
Params: AChild - Child widget
|
||||
|
@ -217,6 +217,7 @@ type
|
||||
procedure SetColor(const AColor: TColor); override;
|
||||
procedure SetFont(const AFont: TFont); override;
|
||||
procedure GetScrollInfo(SBStyle: Integer; var ScrollInfo: TScrollInfo); override;
|
||||
function GetScrollbarVisible(SBStyle: Integer): Boolean; override;
|
||||
function SetScrollInfo(SBStyle: Integer; const ScrollInfo: TScrollInfo): Integer; override;
|
||||
|
||||
property TextFractional: Boolean read FTextFractional write FTextFractional;
|
||||
@ -996,6 +997,18 @@ begin
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
function TCarbonCustomControl.GetScrollbarVisible(SBStyle: Integer): Boolean;
|
||||
begin
|
||||
case SBStyle of
|
||||
SB_VERT:
|
||||
Result := FScrollPageSize.Y < (FScrollSize.Y - FScrollMin.Y);
|
||||
SB_HORZ:
|
||||
Result := FScrollPageSize.X < (FScrollSize.X - FScrollMin.X);
|
||||
else
|
||||
Result := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TCarbonScrollingWinControl }
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
@ -1682,7 +1682,18 @@ end;
|
||||
function TCarbonWidgetSet.GetScrollbarVisible(Handle: HWND; SBStyle: Integer
|
||||
): boolean;
|
||||
begin
|
||||
Result:=inherited GetScrollbarVisible(Handle, SBStyle);
|
||||
Result := False;
|
||||
|
||||
{$IFDEF VerboseWinAPI}
|
||||
DebugLn('TCarbonWidgetSet.GetScrollbarVisible Handle: ' + DbgS(Handle) +
|
||||
' SBStyle: ' + DbgS(SBStyle));
|
||||
{$ENDIF}
|
||||
|
||||
if not CheckWidget(Handle, 'GetScrollbarVisible') then Exit;
|
||||
|
||||
TCarbonWidget(Handle).GetScrollbarVisible(SBStyle);
|
||||
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user