mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 01:29:08 +02:00
add set_rc_name to every CreateHandle
git-svn-id: trunk@13545 -
This commit is contained in:
parent
680bf80d1b
commit
dc2f654a2b
@ -101,6 +101,7 @@ begin
|
||||
Allocation.Height := AParams.Height;
|
||||
gtk_widget_size_allocate(PGtkWidget(Result), @Allocation);
|
||||
|
||||
Set_RC_Name(AWinControl, EventBox);
|
||||
SetCallBacks(EventBox, WidgetInfo);
|
||||
end;
|
||||
|
||||
|
@ -171,6 +171,7 @@ begin
|
||||
Allocation.Height := AParams.Height;
|
||||
gtk_widget_size_allocate(PGtkWidget(Result), @Allocation);
|
||||
|
||||
Set_RC_Name(AWinControl, PGtkWidget(Result));
|
||||
SetCallbacks(PGtkWidget(Result), WidgetInfo);
|
||||
end;
|
||||
|
||||
|
@ -103,6 +103,7 @@ begin
|
||||
Allocation.Height := AParams.Height;
|
||||
gtk_widget_size_allocate(PGtkWidget(Result), @Allocation);
|
||||
|
||||
Set_RC_Name(AWinControl, FrameWidget);
|
||||
SetCallBacks(FrameWidget, WidgetInfo);
|
||||
end;
|
||||
|
||||
|
@ -96,6 +96,8 @@ begin
|
||||
WidgetInfo^.CoreWidget := CList;
|
||||
TGtkWidgetSet(WidgetSet).SetSelectionMode(AWinControl, Widget,
|
||||
CListBox.MultiSelect, CListBox.ExtendedSelect);
|
||||
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
SetCallbacks(Widget, WidgetInfo);
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
@ -267,6 +267,7 @@ begin
|
||||
DebugGtkWidgets.MarkCreated(Widget, dbgsName(AWinControl));
|
||||
{$ENDIF}
|
||||
WidgetInfo := CreateWidgetInfo(Pointer(Result), AWinControl, AParams);
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
SetCallbacks(Widget, WidgetInfo);
|
||||
end;
|
||||
|
||||
@ -398,6 +399,7 @@ begin
|
||||
DebugGtkWidgets.MarkCreated(Widget, dbgsName(AWinControl));
|
||||
{$ENDIF}
|
||||
WidgetInfo := CreateWidgetInfo(Pointer(Result), AWinControl, AParams);
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
SetCallbacks(Widget, WidgetInfo);
|
||||
end;
|
||||
|
||||
@ -475,6 +477,7 @@ begin
|
||||
DebugGtkWidgets.MarkCreated(Widget, dbgsName(AWinControl));
|
||||
{$ENDIF}
|
||||
WidgetInfo := CreateWidgetInfo(Pointer(Result), AWinControl, AParams);
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
SetCallbacks(Widget, WidgetInfo);
|
||||
end;
|
||||
|
||||
|
@ -857,6 +857,7 @@ begin
|
||||
Allocation.Width := AParams.Width;
|
||||
Allocation.Height := AParams.Height;
|
||||
gtk_widget_size_allocate(Widget, @Allocation);
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
|
||||
// SetCallbacks isn't called here, it should be done in the 'derived' class
|
||||
end;
|
||||
@ -905,8 +906,6 @@ begin
|
||||
DebugGtkWidgets.MarkCreated(Widget, dbgsName(AWinControl));
|
||||
{$ENDIF}
|
||||
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
|
||||
Result := THandle(PtrUInt(Widget));
|
||||
if Result = 0 then Exit;
|
||||
|
||||
@ -922,6 +921,7 @@ begin
|
||||
Allocation.Height := AParams.Height;
|
||||
gtk_widget_size_allocate(Widget, @Allocation);
|
||||
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
SetCCCallbacks(Widget, WidgetInfo);
|
||||
end;
|
||||
|
||||
|
@ -934,6 +934,7 @@ begin
|
||||
// set allocation
|
||||
// already created in TGtkWSBaseScrollingWinControl
|
||||
|
||||
Set_RC_Name(AWinControl, PGtkWidget(ScrollWidget));
|
||||
SetCallbacks(PGtkWidget(ScrollWidget), PGtkWidget(CListWidget), WidgetInfo);
|
||||
end;
|
||||
|
||||
|
@ -272,6 +272,7 @@ begin
|
||||
WidgetInfo^.ExStyle := AParams.ExStyle;
|
||||
WidgetInfo^.WndProc := PtrUInt(AParams.WindowClass.lpfnWndProc);
|
||||
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
SetCallBacks(Widget, WidgetInfo);
|
||||
end;
|
||||
|
||||
@ -314,6 +315,7 @@ begin
|
||||
|
||||
gtk_notebook_set_tab_pos(AWidget, GtkPositionTypeMap[TCustomNotebook(AWinControl).TabPosition]);
|
||||
Result := TLCLIntfHandle(PtrUInt(AWidget));
|
||||
Set_RC_Name(AWinControl, PGtkWidget(AWidget));
|
||||
SetCallBacks(PGtkWidget(AWidget), WidgetInfo);
|
||||
end;
|
||||
|
||||
@ -578,6 +580,7 @@ begin
|
||||
DebugGtkWidgets.MarkCreated(Widget, dbgsName(AWinControl));
|
||||
{$ENDIF}
|
||||
Result := TLCLIntfHandle(PtrUInt(Widget));
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
SetCallBacks(Widget, WidgetInfo);
|
||||
end;
|
||||
|
||||
|
@ -183,6 +183,7 @@ begin
|
||||
SetMainWidget(Frame, Layout);
|
||||
|
||||
Result := TLCLIntfHandle(PtrUInt(Frame));
|
||||
Set_RC_Name(AWinControl, PGtkWidget(Frame));
|
||||
SetCallBacks(PGtkWidget(Frame), WidgetInfo);
|
||||
end;
|
||||
|
||||
@ -370,6 +371,7 @@ begin
|
||||
DebugGtkWidgets.MarkCreated(P, dbgsName(AWinControl));
|
||||
{$ENDIF}
|
||||
Result := TLCLIntfHandle(PtrUInt(P));
|
||||
Set_RC_Name(AWinControl, P);
|
||||
SetCallbacks(P, WidgetInfo);
|
||||
end;
|
||||
|
||||
@ -509,6 +511,7 @@ begin
|
||||
DebugGtkWidgets.MarkCreated(P,dbgsName(AWinControl));
|
||||
{$ENDIF}
|
||||
Result := TLCLIntfHandle(PtrUInt(P));
|
||||
Set_RC_Name(AWinControl, P);
|
||||
SetCallbacks(P, WidgetInfo);
|
||||
end;
|
||||
|
||||
|
@ -103,6 +103,7 @@ begin
|
||||
|
||||
WidgetInfo := CreateWidgetInfo(Widget, AWinControl, AParams);
|
||||
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
SetCallBacks(Widget, WidgetInfo);
|
||||
end;
|
||||
|
||||
@ -176,6 +177,7 @@ begin
|
||||
WidgetInfo^.ExStyle := AParams.ExStyle;
|
||||
WidgetInfo^.WndProc := PtrUInt(AParams.WindowClass.lpfnWndProc);
|
||||
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
SetCallBacks(Widget, WidgetInfo);
|
||||
end;
|
||||
|
||||
|
@ -181,6 +181,7 @@ begin
|
||||
{$ENDIF}
|
||||
Result := TLCLIntfHandle(PtrUInt(Widget));
|
||||
WidgetInfo := CreateWidgetInfo(Widget, AWinControl, AParams);
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
SetCallbacks(Widget, WidgetInfo);
|
||||
end;
|
||||
|
||||
|
@ -418,6 +418,7 @@ begin
|
||||
DebugGtkWidgets.MarkCreated(Widget, dbgsName(AWinControl));
|
||||
{$ENDIF}
|
||||
WidgetInfo := CreateWidgetInfo(Pointer(Result), AWinControl, AParams);
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
SetCallbacks(Widget, WidgetInfo);
|
||||
end;
|
||||
|
||||
@ -481,6 +482,7 @@ begin
|
||||
{$IFDEF DebugLCLComponents}
|
||||
DebugGtkWidgets.MarkCreated(Widget, dbgsName(AWinControl));
|
||||
{$ENDIF}
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
SetCallbacks(Widget, WidgetInfo);
|
||||
end;
|
||||
|
||||
@ -928,8 +930,9 @@ begin
|
||||
Allocation.Y := AParams.Y;
|
||||
Allocation.Width := AParams.Width;
|
||||
Allocation.Height := AParams.Height;
|
||||
gtk_widget_size_allocate(PGtkWidget(Result), @Allocation);
|
||||
gtk_widget_size_allocate(Widget, @Allocation);
|
||||
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
SetCallbacks(Widget, WidgetInfo);
|
||||
end;
|
||||
|
||||
@ -1126,6 +1129,7 @@ begin
|
||||
if Result = 0 then
|
||||
Exit;
|
||||
WidgetInfo := CreateWidgetInfo(Pointer(Result), AWinControl, AParams);
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
SetCallbacks(Widget, WidgetInfo);
|
||||
end;
|
||||
|
||||
@ -1301,6 +1305,7 @@ begin
|
||||
Allocation.Height := AParams.Height;
|
||||
gtk_widget_size_allocate(PGtkWidget(Result), @Allocation);
|
||||
|
||||
Set_RC_Name(AWinControl, PGtkWidget(Result));
|
||||
SetCallbacks(PGtkWidget(Result), WidgetInfo);
|
||||
end;
|
||||
|
||||
@ -1443,6 +1448,7 @@ begin
|
||||
Allocation.Height := AParams.Height;
|
||||
gtk_widget_size_allocate(PGtkWidget(Result), @Allocation);
|
||||
|
||||
Set_RC_Name(AWinControl, PGtkWidget(Result));
|
||||
SetCallbacks(PGtkWidget(Result), WidgetInfo);
|
||||
end;
|
||||
|
||||
@ -1581,6 +1587,7 @@ begin
|
||||
Allocation.Height := AParams.Height;
|
||||
gtk_widget_size_allocate(PGtkWidget(Result), @Allocation);
|
||||
|
||||
Set_RC_Name(AWinControl, PGtkWidget(Result));
|
||||
SetCallbacks(PGtkWidget(Result), WidgetInfo);
|
||||
end;
|
||||
|
||||
@ -1711,6 +1718,7 @@ begin
|
||||
{$ENDIF}
|
||||
Result := TLCLIntfHandle(PtrUInt(P));
|
||||
//DebugLn(['TGtkWSCustomMemo.CreateHandle ']);
|
||||
Set_RC_Name(AWinControl, P);
|
||||
SetCallbacks(P, WidgetInfo);
|
||||
end;
|
||||
|
||||
@ -1911,9 +1919,10 @@ begin
|
||||
Allocation.Y := AParams.Y;
|
||||
Allocation.Width := AParams.Width;
|
||||
Allocation.Height := AParams.Height;
|
||||
gtk_widget_size_allocate(PGtkWidget(Result), @Allocation);
|
||||
gtk_widget_size_allocate(P, @Allocation);
|
||||
|
||||
SetCallbacks(PGtkWidget(Result), WidgetInfo);
|
||||
Set_RC_Name(AWinControl, P);
|
||||
SetCallbacks(P, WidgetInfo);
|
||||
end;
|
||||
|
||||
class procedure TGtkWSCustomGroupBox.GetPreferredSize(const AWinControl: TWinControl;
|
||||
@ -1995,9 +2004,10 @@ begin
|
||||
Allocation.Y := AParams.Y;
|
||||
Allocation.Width := AParams.Width;
|
||||
Allocation.Height := AParams.Height;
|
||||
gtk_widget_size_allocate(PGtkWidget(Result), @Allocation);
|
||||
gtk_widget_size_allocate(Widget, @Allocation);
|
||||
|
||||
TGtkWSCustomCheckBox.SetCallbacks(PGtkWidget(Result), WidgetInfo);
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
TGtkWSCustomCheckBox.SetCallbacks(Widget, WidgetInfo);
|
||||
end;
|
||||
|
||||
{ TGtkWSToggleBox }
|
||||
@ -2020,9 +2030,10 @@ begin
|
||||
Allocation.Y := AParams.Y;
|
||||
Allocation.Width := AParams.Width;
|
||||
Allocation.Height := AParams.Height;
|
||||
gtk_widget_size_allocate(PGtkWidget(Result), @Allocation);
|
||||
gtk_widget_size_allocate(Widget, @Allocation);
|
||||
|
||||
TGtkWSCustomCheckBox.SetCallbacks(PGtkWidget(Result), WidgetInfo);
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
TGtkWSCustomCheckBox.SetCallbacks(Widget, WidgetInfo);
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
@ -187,6 +187,8 @@ begin
|
||||
True : gtk_tree_selection_set_mode(Selection, GTK_SELECTION_MULTIPLE);
|
||||
False: gtk_tree_selection_set_mode(Selection, GTK_SELECTION_SINGLE);
|
||||
end;
|
||||
|
||||
Set_RC_Name(AWinControl, P);
|
||||
SetCallbacks(p, WidgetInfo);
|
||||
end;
|
||||
|
||||
|
@ -133,6 +133,7 @@ begin
|
||||
|
||||
gtk_widget_show_all(Widget);
|
||||
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
SetCallbacks(Widget, WidgetInfo);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user