mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-07 03:20:38 +02:00
Rearchitectures LazAccessibility_SetFields in order to support TControl
git-svn-id: trunk@34688 -
This commit is contained in:
parent
4b50c275ac
commit
b3a3ec2fb9
@ -906,6 +906,9 @@ type
|
||||
|
||||
TControl = class(TLCLComponent)
|
||||
private
|
||||
FAccessibleDescription: TCaption;
|
||||
FAccessibleName: TCaption;
|
||||
FAccessibleRole: TLazAccessibilityRole;
|
||||
FActionLink: TControlActionLink;
|
||||
FAlign: TAlign;
|
||||
FAnchors: TAnchors;
|
||||
@ -1031,6 +1034,9 @@ type
|
||||
procedure DoMouseDown(var Message: TLMMouse; Button: TMouseButton;
|
||||
Shift: TShiftState);
|
||||
procedure DoMouseUp(var Message: TLMMouse; Button: TMouseButton);
|
||||
procedure SetAccessibleDescription(AValue: TCaption);
|
||||
procedure SetAccessibleName(AValue: TCaption);
|
||||
procedure SetAccessibleRole(AValue: TLazAccessibilityRole);
|
||||
procedure SetAnchorSide(Kind: TAnchorKind; AValue: TAnchorSide);
|
||||
procedure SetBorderSpacing(const AValue: TControlBorderSpacing);
|
||||
procedure SetBoundsRect(const ARect: TRect);
|
||||
@ -1431,6 +1437,9 @@ type
|
||||
procedure RemoveHandlerOnKeyDown(const OnKeyDownEvent: TKeyEvent);
|
||||
public
|
||||
// standard properties, which should be supported by all descendants
|
||||
property AccessibleDescription: TCaption read FAccessibleDescription write SetAccessibleDescription;
|
||||
property AccessibleName: TCaption read FAccessibleName write SetAccessibleName;
|
||||
property AccessibleRole: TLazAccessibilityRole read FAccessibleRole write SetAccessibleRole;
|
||||
property Action: TBasicAction read GetAction write SetAction;
|
||||
property Align: TAlign read FAlign write SetAlign default alNone;
|
||||
property Anchors: TAnchors read FAnchors write SetAnchors stored IsAnchorsStored default [akLeft, akTop];
|
||||
@ -1700,9 +1709,6 @@ type
|
||||
|
||||
TWinControl = class(TControl)
|
||||
private
|
||||
FAccessibleDescription: TCaption;
|
||||
FAccessibleName: TCaption;
|
||||
FAccessibleRole: TLazAccessibilityRole;
|
||||
FAlignOrder: TFPList; // list of TControl. Last moved (SetBounds) comes first. Used by AlignControls.
|
||||
FBorderWidth: TBorderWidth;
|
||||
FBoundsLockCount: integer;
|
||||
@ -1752,9 +1758,6 @@ type
|
||||
function GetIsResizing: boolean;
|
||||
function GetTabOrder: TTabOrder;
|
||||
function GetVisibleDockClientCount: Integer;
|
||||
procedure SetAccessibleDescription(AValue: TCaption);
|
||||
procedure SetAccessibleName(AValue: TCaption);
|
||||
procedure SetAccessibleRole(AValue: TLazAccessibilityRole);
|
||||
procedure SetChildSizing(const AValue: TControlChildSizing);
|
||||
procedure SetDockSite(const NewDockSite: Boolean);
|
||||
procedure SetHandle(NewHandle: HWND);
|
||||
@ -1938,9 +1941,6 @@ type
|
||||
property OnGetDockCaption: TGetDockCaptionEvent read FOnGetDockCaption write FOnGetDockCaption;
|
||||
public
|
||||
// properties which are supported by all descendents
|
||||
property AccessibleDescription: TCaption read FAccessibleDescription write SetAccessibleDescription;
|
||||
property AccessibleName: TCaption read FAccessibleName write SetAccessibleName;
|
||||
property AccessibleRole: TLazAccessibilityRole read FAccessibleRole write SetAccessibleRole;
|
||||
property BorderWidth: TBorderWidth read FBorderWidth write SetBorderWidth default 0;
|
||||
property BoundsLockCount: integer read FBoundsLockCount;
|
||||
property Brush: TBrush read GetBrush;
|
||||
|
@ -1337,6 +1337,24 @@ begin
|
||||
if Assigned(FOnDragDrop) then FOnDragDrop(Self, Source,X,Y);
|
||||
end;
|
||||
|
||||
procedure TControl.SetAccessibleDescription(AValue: TCaption);
|
||||
begin
|
||||
if FAccessibleDescription=AValue then Exit;
|
||||
FAccessibleDescription:=AValue;
|
||||
end;
|
||||
|
||||
procedure TControl.SetAccessibleName(AValue: TCaption);
|
||||
begin
|
||||
if FAccessibleName=AValue then Exit;
|
||||
FAccessibleName:=AValue;
|
||||
end;
|
||||
|
||||
procedure TControl.SetAccessibleRole(AValue: TLazAccessibilityRole);
|
||||
begin
|
||||
if FAccessibleRole=AValue then Exit;
|
||||
FAccessibleRole:=AValue;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
TControl Method SetColor "Sets the default color and tells the widget set"
|
||||
------------------------------------------------------------------------------}
|
||||
|
@ -529,11 +529,6 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TWidgetSet.LazAccessibility_SetFields(AHandle: HWND; const ADescription, AName: string; ARole: TLazAccessibilityRole);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TWidgetSet.LazDeviceAPIs_RequestPositionInfo(AMethod: TLazPositionMethod);
|
||||
begin
|
||||
|
||||
|
@ -361,11 +361,6 @@ begin
|
||||
WidgetSet.LazAccessibility_SendNotification(ANotification, ATextParam, AIntParam1, AIntParam2);
|
||||
end;
|
||||
|
||||
procedure LazAccessibility_SetFields(AHandle: HWND; const ADescription, AName: string; ARole: TLazAccessibilityRole);
|
||||
begin
|
||||
WidgetSet.LazAccessibility_SetFields(AHandle, ADescription, AName, ARole);
|
||||
end;
|
||||
|
||||
procedure LazDeviceAPIs_RequestPositionInfo(AMethod: TLazPositionMethod);
|
||||
begin
|
||||
Widgetset.LazDeviceAPIs_RequestPositionInfo(AMethod);
|
||||
|
@ -95,7 +95,6 @@ function IsDesignerDC(WindowHandle: HWND; DC: HDC): Boolean; {$IFDEF IF_BASE_MEM
|
||||
function IsMobilePlatform: Boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
|
||||
procedure LazAccessibility_SendNotification(ANotification: TLazAccessibilityNotification; const ATextParam: string; const AIntParam1, AIntParam2: Integer); {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
procedure LazAccessibility_SetFields(AHandle: HWND; const ADescription, AName: string; ARole: TLazAccessibilityRole); {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
procedure LazDeviceAPIs_RequestPositionInfo(AMethod: TLazPositionMethod); {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
procedure LazDeviceAPIs_SendMessage(AMsg: TLazDeviceMessage); {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
procedure LazDeviceAPIs_StartReadingAccelerometerData(); {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
|
@ -7754,24 +7754,6 @@ begin
|
||||
if TControl(FDockClients[I]).Visible then inc(Result);
|
||||
end;
|
||||
|
||||
procedure TWinControl.SetAccessibleDescription(AValue: TCaption);
|
||||
begin
|
||||
if FAccessibleDescription=AValue then Exit;
|
||||
FAccessibleDescription:=AValue;
|
||||
end;
|
||||
|
||||
procedure TWinControl.SetAccessibleName(AValue: TCaption);
|
||||
begin
|
||||
if FAccessibleName=AValue then Exit;
|
||||
FAccessibleName:=AValue;
|
||||
end;
|
||||
|
||||
procedure TWinControl.SetAccessibleRole(AValue: TLazAccessibilityRole);
|
||||
begin
|
||||
if FAccessibleRole=AValue then Exit;
|
||||
FAccessibleRole:=AValue;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
procedure TWinControl.SetChildSizing(const AValue: TControlChildSizing);
|
||||
------------------------------------------------------------------------------}
|
||||
|
@ -173,11 +173,6 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TCDWidgetSet.LazAccessibility_SetFields(AHandle: HWND; const ADescription, AName: string; ARole: TLazAccessibilityRole);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TCDWidgetSet.LazDeviceAPIs_RequestPositionInfo(AMethod: TLazPositionMethod);
|
||||
var
|
||||
lPositionMethod: jint;
|
||||
|
@ -123,11 +123,6 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TCDWidgetSet.LazAccessibility_SetFields(AHandle: HWND; const ADescription, AName: string; ARole: TLazAccessibilityRole);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TCDWidgetSet.LazDeviceAPIs_RequestPositionInfo(AMethod: TLazPositionMethod);
|
||||
begin
|
||||
|
||||
|
@ -124,11 +124,6 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TCDWidgetSet.LazAccessibility_SetFields(AHandle: HWND; const ADescription, AName: string; ARole: TLazAccessibilityRole);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TCDWidgetSet.LazDeviceAPIs_RequestPositionInfo(AMethod: TLazPositionMethod);
|
||||
begin
|
||||
|
||||
|
@ -124,11 +124,6 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TCDWidgetSet.LazAccessibility_SetFields(AHandle: HWND; const ADescription, AName: string; ARole: TLazAccessibilityRole);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TCDWidgetSet.LazDeviceAPIs_RequestPositionInfo(AMethod: TLazPositionMethod);
|
||||
begin
|
||||
|
||||
|
@ -58,7 +58,6 @@ function IsDesignerDC(WindowHandle: HWND; DC: HDC): Boolean; override;*)
|
||||
function IsMobilePlatform: Boolean; override;
|
||||
|
||||
procedure LazAccessibility_SendNotification(ANotification: TLazAccessibilityNotification; const ATextParam: string; const AIntParam1, AIntParam2: Integer); override;
|
||||
procedure LazAccessibility_SetFields(AHandle: HWND; const ADescription, AName: string; ARole: TLazAccessibilityRole); override;
|
||||
procedure LazDeviceAPIs_RequestPositionInfo(AMethod: TLazPositionMethod); override;
|
||||
procedure LazDeviceAPIs_SendMessage(AMsg: TLazDeviceMessage); override;
|
||||
procedure LazDeviceAPIs_StartReadingAccelerometerData(); override;
|
||||
|
@ -76,6 +76,7 @@ type
|
||||
class function GetDefaultColor(const AControl: TControl; const ADefaultColorType: TDefaultColorType): TColor; virtual;
|
||||
class procedure ConstraintWidth(const AControl: TControl; const AConstraints: TObject; var aWidth: integer); virtual;
|
||||
class procedure ConstraintHeight(const AControl: TControl; const AConstraints: TObject; var aHeight: integer); virtual;
|
||||
class procedure LazAccessibility_SetFields(const AControl: TControl; const ADescription, AName: string; const ARole: TLazAccessibilityRole); virtual;
|
||||
end;
|
||||
|
||||
TWSControlClass = class of TWSControl;
|
||||
@ -180,6 +181,12 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
class procedure TWSControl.LazAccessibility_SetFields(const AControl: TControl;
|
||||
const ADescription, AName: string; const ARole: TLazAccessibilityRole);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
{ TWSWinControl }
|
||||
|
||||
class procedure TWSWinControl.AdaptBounds(const AWinControl: TWinControl;
|
||||
|
Loading…
Reference in New Issue
Block a user