cocoa: fix isEnabled, setEnabled for NSWindow

git-svn-id: trunk@34459 -
This commit is contained in:
paul 2011-12-28 05:49:29 +00:00
parent e4a811c552
commit d2f6f1cb1b
2 changed files with 21 additions and 8 deletions

View File

@ -119,6 +119,9 @@ type
LCLWindowExtension = objccategory(NSWindow) LCLWindowExtension = objccategory(NSWindow)
function lclIsVisible: Boolean; message 'lclIsVisible'; reintroduce; function lclIsVisible: Boolean; message 'lclIsVisible'; reintroduce;
function lclIsEnabled: Boolean; message 'lclIsEnabled'; reintroduce;
procedure lclSetEnabled(AEnabled: Boolean); message 'lclSetEnabled:'; reintroduce;
function lclWindowState: Integer; message 'lclWindowState'; reintroduce; function lclWindowState: Integer; message 'lclWindowState'; reintroduce;
procedure lclInvalidateRect(const r: TRect); message 'lclInvalidateRect:'; reintroduce; procedure lclInvalidateRect(const r: TRect); message 'lclInvalidateRect:'; reintroduce;
procedure lclInvalidate; message 'lclInvalidate'; reintroduce; procedure lclInvalidate; message 'lclInvalidate'; reintroduce;
@ -849,18 +852,18 @@ end;
{ LCLObjectExtension } { LCLObjectExtension }
function LCLObjectExtension.lclIsEnabled:Boolean; function LCLObjectExtension.lclIsEnabled: Boolean;
begin begin
Result := False; Result := False;
end; end;
procedure LCLObjectExtension.lclSetEnabled(AEnabled:Boolean); procedure LCLObjectExtension.lclSetEnabled(AEnabled: Boolean);
begin begin
end; end;
function LCLObjectExtension.lclIsVisible:Boolean; function LCLObjectExtension.lclIsVisible: Boolean;
begin begin
Result:=False; Result := False;
end; end;
function LCLObjectExtension.lclWindowState: Integer; function LCLObjectExtension.lclWindowState: Integer;
@ -868,7 +871,7 @@ begin
Result := SIZENORMAL; Result := SIZENORMAL;
end; end;
procedure LCLObjectExtension.lclInvalidateRect(const r:TRect); procedure LCLObjectExtension.lclInvalidateRect(const r: TRect);
begin begin
end; end;
@ -880,11 +883,11 @@ procedure LCLObjectExtension.lclUpdate;
begin begin
end; end;
procedure LCLObjectExtension.lclRelativePos(var Left,Top:Integer); procedure LCLObjectExtension.lclRelativePos(var Left,Top: Integer);
begin begin
end; end;
procedure LCLObjectExtension.lclLocalToScreen(var X,Y:Integer); procedure LCLObjectExtension.lclLocalToScreen(var X,Y: Integer);
begin begin
end; end;
@ -1095,6 +1098,16 @@ begin
Result := isVisible; Result := isVisible;
end; end;
function LCLWindowExtension.lclIsEnabled: Boolean;
begin
Result := contentView.lclIsEnabled;
end;
procedure LCLWindowExtension.lclSetEnabled(AEnabled: Boolean);
begin
contentView.lclSetEnabled(AEnabled);
end;
function LCLWindowExtension.lclWindowState: Integer; function LCLWindowExtension.lclWindowState: Integer;
begin begin
if isMiniaturized then if isMiniaturized then

View File

@ -7,7 +7,7 @@ interface
uses uses
Types, Types,
MacOSAll, CocoaAll, CocoaAll,
Classes, Controls, SysUtils, Classes, Controls, SysUtils,
// //
WSControls, LCLType, LMessages, LCLProc, Forms, WSControls, LCLType, LMessages, LCLProc, Forms,