Enabled cursor property + property editor.

git-svn-id: trunk@929 -
This commit is contained in:
lazarus 2002-02-09 01:47:24 +00:00
parent 131edf2a5f
commit 01a76018b7

View File

@ -1188,24 +1188,26 @@ var
AWidget, FixWidget: PGtkWidget; AWidget, FixWidget: PGtkWidget;
AWindow: PGdkWindow; AWindow: PGdkWindow;
begin begin
// If not (AWinControl is TWinControl)
// or (not AWinControl.HandleAllocated)
if not ((AWinControl is TWinControl) and AWinControl.HandleAllocated) if not ((AWinControl is TWinControl) and AWinControl.HandleAllocated)
then exit; then exit;
AWidget:=PGtkWidget(AWinControl.Handle); AWidget:= PGtkWidget(AWinControl.Handle);
if csDesigning in AWinControl.ComponentState then begin if csDesigning in AWinControl.ComponentState then begin
AWindow:=AWidget^.Window; AWindow:=AWidget^.Window;
if AWindow=nil then exit; if AWindow=nil then exit;
SetDesigningCursor(AWindow); SetDesigningCursor(AWindow);
end else begin end else begin
FixWidget:=GetFixedWidget(AWidget); // FixWidget:=GetFixedWidget(AWidget);
if FixWidget<>nil then // if FixWidget<>nil then
AWindow:=FixWidget^.Window // AWindow:=FixWidget^.Window
else // else
AWindow:=AWidget^.Window; // AWindow:=AWidget^.Window;
// FixWidget:= GetWidgetInfo(AWidget, true)^.ImplementationWidget;
FixWidget:= GetMainWidget(AWidget);
AWindow:= FixWidget^.Window;
if AWindow=nil then exit; if AWindow=nil then exit;
case AWinControl.Cursor of case AWinControl.Cursor of
@ -1213,6 +1215,7 @@ begin
crArrow : DoSetCursor (AWindow, Cursor_Arrow); crArrow : DoSetCursor (AWindow, Cursor_Arrow);
crCross : DoSetCursor (AWindow, Cursor_Cross); crCross : DoSetCursor (AWindow, Cursor_Cross);
crHandPoint: DoSetCursor (AWindow, Cursor_hand1); crHandPoint: DoSetCursor (AWindow, Cursor_hand1);
crHelp : DoSetCursor (AWindow, Cursor_Help);
crIBeam : DoSetCursor (AWindow, Cursor_XTerm); crIBeam : DoSetCursor (AWindow, Cursor_XTerm);
crHourGlass: DoSetCursor (AWindow, Cursor_Watch); crHourGlass: DoSetCursor (AWindow, Cursor_Watch);
crDefault : DoSetCursor (AWindow, Cursor_StdArrow); crDefault : DoSetCursor (AWindow, Cursor_StdArrow);
@ -1222,13 +1225,10 @@ begin
crSizeNS : DoSetCursor (AWindow, Cursor_SizeNS); crSizeNS : DoSetCursor (AWindow, Cursor_SizeNS);
crSizeNESW : DoSetCursor (AWindow, Cursor_SizeNESW); crSizeNESW : DoSetCursor (AWindow, Cursor_SizeNESW);
crSizeWE : DoSetCursor (AWindow, Cursor_SizeWE); crSizeWE : DoSetCursor (AWindow, Cursor_SizeWE);
else
Exit;
end; end;
end; end;
end; end;
{------------------------------------------------------------------------------- {-------------------------------------------------------------------------------
procedure ConnectSignal(const AnObject:gtk_Object; const ASignal: PChar; procedure ConnectSignal(const AnObject:gtk_Object; const ASignal: PChar;
const ACallBackProc: Pointer; const ReqSignalMask: TGdkEventMask; const ACallBackProc: Pointer; const ReqSignalMask: TGdkEventMask;
@ -2742,6 +2742,9 @@ end;
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.93 2002/09/06 22:32:21 lazarus
Enabled cursor property + property editor.
Revision 1.92 2002/09/06 19:45:11 lazarus Revision 1.92 2002/09/06 19:45:11 lazarus
Cleanups plus a fix to TPanel parent/drawing problem. Cleanups plus a fix to TPanel parent/drawing problem.