MG: in design mode the mouse cursor is now also set for hidden gdkwindows

git-svn-id: trunk@1757 -
This commit is contained in:
lazarus 2002-06-21 17:54:23 +00:00
parent 1eac5a958a
commit 1673cf67bc
3 changed files with 39 additions and 15 deletions

View File

@ -32,8 +32,6 @@
ToDo:
-Add recursion needed for frames.
-activate SetDesigning in TJITForm.Create when LCL is ready for components
in designing state
}
unit JITForms;
@ -136,8 +134,7 @@ end;
constructor TJITForm.Create(AOwner: TComponent);
begin
// XXX ToDo: uncomment this when LCL is ready for csDesigning
//SetDesigning(true);
SetDesigning(true);
inherited Create(AOwner);
end;

View File

@ -1707,7 +1707,6 @@ Procedure TMainIDE.SetDesigning(Control : TComponent; Value : Boolean);
Begin
Control.SetDesigning(Value);
if Value then CNSendMessage(LM_SETDESIGNING, Control, nil);
end;
{------------------------------------------------------------------------------}
@ -6503,6 +6502,9 @@ end.
{ =============================================================================
$Log$
Revision 1.315 2002/06/21 17:54:22 lazarus
MG: in design mode the mouse cursor is now also set for hidden gdkwindows
Revision 1.314 2002/06/19 19:46:05 lazarus
MG: Form Editing: snapping, guidelines, modified on move/resize, creating components in csDesigning, ...

View File

@ -74,15 +74,43 @@ end;
Params: Widget: PGtkWidget; Data: Pointer
Result: GBoolean
GTKRealizeCB is called by the gtk, whenever a widget is realized (ie mapped).
That means that the gdk window on the xserver has been created. This function
is used for the second part of the initialization of a widget.
GTKRealizeCB is called by the gtk, whenever a widget is realized (ie mapped),
but before the widget itself got the realize signal.
That means that the gdk window on the xserver has been created.
-------------------------------------------------------------------------------}
function GTKRealizeCB(Widget: PGtkWidget; Data: Pointer): GBoolean; cdecl;
begin
EventTrace('realize', nil);
if Data<>nil then begin
if TObject(Data) is TCustomForm then begin
if TCustomForm(Data).BorderStyle=bsNone then begin
// remove window decorations
gdk_window_set_decorations(Widget^.Window,0);
end;
end;
end;
Result := True;
end;
{-------------------------------------------------------------------------------
function GTKRealizeAfterCB
Params: Widget: PGtkWidget; Data: Pointer
Result: GBoolean
GTKRealizeCB is called by the gtk, whenever a widget is realized (ie mapped),
and after the widget itself got the realize signal.
That means that the gdk window on the xserver has been created and the widget
has initialized the gdkwindow. This function is used for the second part of
the initialization of a widget.
-------------------------------------------------------------------------------}
function GTKRealizeAfterCB(Widget: PGtkWidget; Data: Pointer): GBoolean; cdecl;
var
WinWidgetInfo: PWinWidgetInfo;
begin
EventTrace('realize', nil);
// set extra signal masks after the widget window is created
// define extra events we're interrested in
WinWidgetInfo:=GetWidgetInfo(Widget,true);
@ -91,16 +119,10 @@ begin
if Data<>nil then begin
if TObject(Data) is TWinControl then begin
if TWinControl(Data) is TCustomForm then begin
if TCustomForm(Data).BorderStyle=bsNone then begin
// remove window decorations
gdk_window_set_decorations(Widget^.Window,0);
end;
end;
SetCursor(TWinControl(Data));
end;
end;
Result := True;
end;
@ -2035,6 +2057,9 @@ end;
{ =============================================================================
$Log$
Revision 1.87 2002/06/21 17:54:23 lazarus
MG: in design mode the mouse cursor is now also set for hidden gdkwindows
Revision 1.86 2002/06/21 16:59:15 lazarus
MG: TControl.Cursor is now set, reduced auto reaction of widgets in design mode