mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-03 11:20:23 +02:00
add platform independent winapi function IsWindowEnabled
git-svn-id: trunk@6738 -
This commit is contained in:
parent
506413781c
commit
ed63005188
@ -1253,9 +1253,9 @@ begin
|
||||
if Result then
|
||||
exit;
|
||||
end;
|
||||
// TODO: only send shortcuts to main form if no form is showing modal
|
||||
// only send shortcuts to main form if no form is showing modal
|
||||
// or otherwise disabling the main form
|
||||
if Assigned(FMainForm) {and IsWindowEnabled(FMainForm.Handle)} then
|
||||
if Assigned(FMainForm) and IsWindowEnabled(FMainForm.Handle) then
|
||||
Result := FMainForm.IsShortcut(Message);
|
||||
end;
|
||||
|
||||
@ -1356,6 +1356,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.96 2005/02/05 09:05:50 micha
|
||||
add platform independent winapi function IsWindowEnabled
|
||||
|
||||
Revision 1.95 2005/02/03 15:10:23 micha
|
||||
implement shortcut handling, tcustomlabel accelerator focuscontrol functionality
|
||||
|
||||
|
@ -982,6 +982,11 @@ begin
|
||||
Result := false;
|
||||
end;
|
||||
|
||||
function TWidgetSet.IsWindowEnabled(handle: HWND): boolean;
|
||||
begin
|
||||
Result := false;
|
||||
end;
|
||||
|
||||
function TWidgetSet.IsWindowVisible(handle: HWND): boolean;
|
||||
begin
|
||||
Result := false;
|
||||
@ -1415,6 +1420,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.18 2005/02/05 09:05:50 micha
|
||||
add platform independent winapi function IsWindowEnabled
|
||||
|
||||
Revision 1.17 2005/01/16 11:40:10 mattias
|
||||
fixed TGtkWidgetSet.ExtSelectClipRGN for DCOrigin
|
||||
|
||||
|
@ -510,6 +510,11 @@ begin
|
||||
Result := InterfaceObject.IsDBCSLeadByte(TestChar);
|
||||
end;
|
||||
|
||||
function IsWindowEnabled(handle: HWND): boolean;
|
||||
begin
|
||||
Result := InterfaceObject.IsWindowEnabled(Handle);
|
||||
end;
|
||||
|
||||
function IsWindowVisible(handle: HWND): boolean;
|
||||
begin
|
||||
Result := InterfaceObject.IsWindowVisible(Handle);
|
||||
@ -1325,6 +1330,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.117 2005/02/05 09:05:50 micha
|
||||
add platform independent winapi function IsWindowEnabled
|
||||
|
||||
Revision 1.116 2005/01/08 11:03:18 mattias
|
||||
implemented TPen.Mode=pmXor from Jesus
|
||||
|
||||
|
@ -153,6 +153,7 @@ Function InvalidateRect(aHandle : HWND; ARect : pRect; bErase : Boolean) : Boole
|
||||
//function IsCharAlphaNumeric --> independent
|
||||
function IsDBCSLeadByte(TestChar: Byte): boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
//function IsRectEmpty --> independent
|
||||
function IsWindowEnabled(handle: HWND): boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
function IsWindowVisible(handle: HWND): boolean; {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
|
||||
Procedure LeaveCriticalSection(var CritSection: TCriticalSection); {$IFDEF IF_BASE_MEMBER}virtual;{$ENDIF}
|
||||
@ -299,6 +300,9 @@ function RGB(R, G, B : Byte) : TColorRef;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.104 2005/02/05 09:05:50 micha
|
||||
add platform independent winapi function IsWindowEnabled
|
||||
|
||||
Revision 1.103 2005/01/08 11:03:18 mattias
|
||||
implemented TPen.Mode=pmXor from Jesus
|
||||
|
||||
|
@ -5956,6 +5956,16 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
function TGtkWidgetSet.IsWindowEnabled(handle: HWND): boolean;
|
||||
|
||||
------------------------------------------------------------------------------}
|
||||
function TGtkWidgetSet.IsWindowEnabled(handle: HWND): boolean;
|
||||
begin
|
||||
{ TODO: implement me! }
|
||||
Result := false;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
function TGtkWidgetSet.IsWindowVisible(handle: HWND): boolean;
|
||||
|
||||
@ -8862,6 +8872,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.392 2005/02/05 09:05:50 micha
|
||||
add platform independent winapi function IsWindowEnabled
|
||||
|
||||
Revision 1.391 2005/02/04 01:04:41 mattias
|
||||
fixed gtk intf Arc
|
||||
|
||||
|
@ -135,6 +135,7 @@ function HideCaret(hWnd: HWND): Boolean; override;
|
||||
Procedure InitializeCriticalSection(var CritSection: TCriticalSection); Override;
|
||||
function IntersectClipRect(dc: hdc; Left, Top, Right, Bottom: Integer): Integer; override;
|
||||
function InvalidateRect(aHandle : HWND; Rect : pRect; bErase : Boolean) : Boolean; override;
|
||||
function IsWindowEnabled(handle: HWND): boolean; override;
|
||||
function IsWindowVisible(handle: HWND): boolean; override;
|
||||
|
||||
Procedure LeaveCriticalSection(var CritSection: TCriticalSection); Override;
|
||||
@ -214,6 +215,9 @@ Function WindowFromPoint(Point : TPoint) : HWND; override;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.93 2005/02/05 09:05:51 micha
|
||||
add platform independent winapi function IsWindowEnabled
|
||||
|
||||
Revision 1.92 2005/01/16 11:40:11 mattias
|
||||
fixed TGtkWidgetSet.ExtSelectClipRGN for DCOrigin
|
||||
|
||||
|
@ -2120,6 +2120,16 @@ begin
|
||||
Result := Windows.IntersectClipRect(DC, Left, Top, Right, Bottom);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: IsWindowEnabled
|
||||
Params: handle - window handle
|
||||
Returns: true if window is enabled, false otherwise
|
||||
------------------------------------------------------------------------------}
|
||||
function TWin32WidgetSet.IsWindowEnabled(handle: HWND): boolean;
|
||||
begin
|
||||
Result := Boolean(Windows.IsWindowEnabled(handle));
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: IsWindowVisible
|
||||
Params: handle - window handle
|
||||
@ -3067,6 +3077,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.134 2005/02/05 09:05:51 micha
|
||||
add platform independent winapi function IsWindowEnabled
|
||||
|
||||
Revision 1.133 2005/01/21 22:07:10 micha
|
||||
simpler overlay window
|
||||
|
||||
|
@ -123,6 +123,7 @@ Function HideCaret(HWnd: HWND): Boolean; Override;
|
||||
|
||||
function IntersectClipRect(dc: hdc; Left, Top, Right, Bottom: Integer): Integer; override;
|
||||
Function InvalidateRect(AHandle: HWND; Rect: PRect; BErase: Boolean): Boolean; Override;
|
||||
function IsWindowEnabled(handle: HWND): boolean; override;
|
||||
function IsWindowVisible(handle: HWND): boolean; override;
|
||||
|
||||
Function LineTo(DC: HDC; X, Y: Integer): Boolean; Override;
|
||||
@ -193,6 +194,9 @@ Procedure DeleteCriticalSection(var CritSection: TCriticalSection); Override;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.52 2005/02/05 09:05:51 micha
|
||||
add platform independent winapi function IsWindowEnabled
|
||||
|
||||
Revision 1.51 2005/01/08 11:03:18 mattias
|
||||
implemented TPen.Mode=pmXor from Jesus
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user