AJ: Moved form contents creation to gtkproc for code

reuse between GNOME and GTK, and to make GNOME MDI
    programming easier later on.

git-svn-id: trunk@1360 -
This commit is contained in:
lazarus 2002-02-09 01:48:19 +00:00
parent 31f1e43496
commit 06479296ac

View File

@ -233,29 +233,10 @@ begin
if ClipboardWidget=nil then
SetClipboardWidget(p);
Box := gtk_vbox_new(False, 0);
Box := CreateFormContents(P);
gnome_app_set_contents(p, Box);
gtk_widget_show(Box);
// Create the form client area
TempWidget := gtk_scrolled_window_new(nil,nil);
gtk_box_pack_end(Box, TempWidget, True, True, 0);
gtk_widget_show(TempWidget);
gtk_object_set_data(P,'scroll_area', TempWidget);
TempWidget2 := gtk_layout_new(nil, nil);
gtk_container_add(PGTKContainer(TempWidget), TempWidget2);
gtk_widget_show(TempWidget2);
SetFixedWidget(p, TempWidget2);
SetMainWidget(p, TempWidget2);
GTK_WIDGET_UNSET_FLAGS(PGtkScrolledWindow(TempWidget)^.hscrollbar, GTK_CAN_FOCUS);
GTK_WIDGET_UNSET_FLAGS(PGtkScrolledWindow(TempWidget)^.vscrollbar, GTK_CAN_FOCUS);
gtk_scrolled_window_set_policy(PGtkScrolledWindow(TempWidget),
GTK_POLICY_NEVER,
GTK_POLICY_NEVER);
//drag icons
if Drag_Icon = nil then
Drag_Icon := gdk_pixmap_colormap_create_from_xpm_d (nil,
@ -272,7 +253,7 @@ begin
if ParentForm.Menu<>TMenu(Sender) then
RaiseException('form has already a MainMenu');
gtk_widget_show(p);
gnome_app_set_menus(Pointer(ParentForm.Handle), p);
gnome_app_set_menus(Pointer(ParentForm.Handle), P);
end;
else
begin
@ -297,6 +278,11 @@ end.
{
$Log$
Revision 1.11 2002/10/25 15:27:02 lazarus
AJ: Moved form contents creation to gtkproc for code
reuse between GNOME and GTK, and to make GNOME MDI
programming easier later on.
Revision 1.10 2002/10/24 22:10:39 lazarus
AJ: More changes for better code reuse between gnome & gtk interfaces