eb05362005-11-05Henrik Grubbström (Grubba) /* -*- C -*- */
f284492006-08-03Lance Dillon not gtk210;
a9e4522005-11-08Henrik Grubbström (Grubba) require gnomeui;
1a05542005-07-28Martin Nilsson  class Gnome2.DruidPageStandard; inherit Gnome2.DruidPage; //! Properties: //! string background //! GDK2.Color background-gdk //! int background-set //! string contents-background //! GDK2.Color contents-background-gdk //! int contents-background-set //! GDK2.Pixbuf logo //! string logo-background //! GDK2.Color logo-background-gdk //! int logo-background-set //! string title //! string title-foreground //! GDK2.Color title-foreground-gdk //! int title-foreground-set //! GDK2.Pixbuf top-watermark void create(?string title, ?GDK2.Pixbuf logo, ?GDK2.Pixbuf top_watermark) //! Construct a new Gnome2.DruidPageStandard. {
ba9e802006-02-27Martin Stjernholm  pgtk2_verify_not_inited(); pgtk2_verify_setup();
1a05542005-07-28Martin Nilsson  if (args) {
535ddd2005-12-18Marcus Comstedt  struct pike_string *title;
1a05542005-07-28Martin Nilsson  struct object *o1,*o2;
3d76632005-11-03Lance Dillon  GtkWidget *gps;
96f5f42018-08-05Martin Nilsson  get_all_args(NULL,args,"%t%o%o",&title,&o1,&o2);
535ddd2005-12-18Marcus Comstedt  ref_push_string(title); f_string_to_utf8(1);
5e55d32006-01-03Marcus Comstedt  gps=gnome_druid_page_standard_new_with_vals(GSTR0(Pike_sp[-1].u.string),
1a05542005-07-28Martin Nilsson  GDK_PIXBUF(get_gobject(o1)),
3d76632005-11-03Lance Dillon  GDK_PIXBUF(get_gobject(o2)));
535ddd2005-12-18Marcus Comstedt  pop_stack();
3d76632005-11-03Lance Dillon  THIS->obj=G_OBJECT(gps);
ba9e802006-02-27Martin Stjernholm  pgtk2_pop_n_elems(args);
1a05542005-07-28Martin Nilsson  } else {
3d76632005-11-03Lance Dillon  GtkWidget *gps; gps=gnome_druid_page_standard_new(); THIS->obj=G_OBJECT(gps);
1a05542005-07-28Martin Nilsson  }
ba9e802006-02-27Martin Stjernholm  pgtk2__init_this_object();
1a05542005-07-28Martin Nilsson } void set_title(string title); //! Sets the title. void set_logo(?GDK2.Pixbuf logo) //! Sets a GDK2.Pixbuf as the logo in the top right corner. If omitted, then //! no logo will be displayed. {
ba9e802006-02-27Martin Stjernholm  pgtk2_verify_inited();
1a05542005-07-28Martin Nilsson  if (args) { struct object *o1;
96f5f42018-08-05Martin Nilsson  get_all_args(NULL,args,"%o",&o1);
1a05542005-07-28Martin Nilsson  gnome_druid_page_standard_set_logo(GNOME_DRUID_PAGE_STANDARD(THIS->obj), GDK_PIXBUF(get_gobject(o1))); } else gnome_druid_page_standard_set_logo( GNOME_DRUID_PAGE_STANDARD(THIS->obj),NULL); RETURN_THIS(); } void set_top_watermark(?GDK2.Pixbuf watermark) //! Sets a GDK2.Pixbuf as the watermark on top of the top strip on the druid. //! If watermark is omitted, it is reset to the normal color. {
ba9e802006-02-27Martin Stjernholm  pgtk2_verify_inited();
1a05542005-07-28Martin Nilsson  if (args) { struct object *o1;
96f5f42018-08-05Martin Nilsson  get_all_args(NULL,args,"%o",&o1);
1a05542005-07-28Martin Nilsson  gnome_druid_page_standard_set_top_watermark( GNOME_DRUID_PAGE_STANDARD(THIS->obj), GDK_PIXBUF(get_gobject(o1))); } else gnome_druid_page_standard_set_top_watermark( GNOME_DRUID_PAGE_STANDARD(THIS->obj),NULL); RETURN_THIS(); } void set_title_foreground(GDK2.Color color) //! Sets the title text to the specified color. {
ba9e802006-02-27Martin Stjernholm  pgtk2_verify_inited();
1a05542005-07-28Martin Nilsson  { struct object *o1; GdkColor *color;
96f5f42018-08-05Martin Nilsson  get_all_args(NULL,args,"%o",&o1);
1a05542005-07-28Martin Nilsson  color=(GdkColor *)get_gdkobject(o1,color); gnome_druid_page_standard_set_title_foreground( GNOME_DRUID_PAGE_STANDARD(THIS->obj),color); } RETURN_THIS(); } void set_background(GDK2.Color color) //! Sets the background color of the top section. {
ba9e802006-02-27Martin Stjernholm  pgtk2_verify_inited();
1a05542005-07-28Martin Nilsson  { struct object *o1; GdkColor *color;
96f5f42018-08-05Martin Nilsson  get_all_args(NULL,args,"%o",&o1);
1a05542005-07-28Martin Nilsson  color=(GdkColor *)get_gdkobject(o1,color); gnome_druid_page_standard_set_background( GNOME_DRUID_PAGE_STANDARD(THIS->obj),color); } RETURN_THIS(); } void set_logo_background(GDK2.Color color) //! Sets the background color of the logo. {
ba9e802006-02-27Martin Stjernholm  pgtk2_verify_inited();
1a05542005-07-28Martin Nilsson  { struct object *o1; GdkColor *color;
96f5f42018-08-05Martin Nilsson  get_all_args(NULL,args,"%o",&o1);
1a05542005-07-28Martin Nilsson  color=(GdkColor *)get_gdkobject(o1,color); gnome_druid_page_standard_set_logo_background( GNOME_DRUID_PAGE_STANDARD(THIS->obj),color); } RETURN_THIS(); } void set_contents_background(GDK2.Color color) //! Sets the color of the main contents section's background. {
ba9e802006-02-27Martin Stjernholm  pgtk2_verify_inited();
1a05542005-07-28Martin Nilsson  { struct object *o1; GdkColor *color;
96f5f42018-08-05Martin Nilsson  get_all_args(NULL,args,"%o",&o1);
1a05542005-07-28Martin Nilsson  color=(GdkColor *)get_gdkobject(o1,color); gnome_druid_page_standard_set_contents_background( GNOME_DRUID_PAGE_STANDARD(THIS->obj),color); } RETURN_THIS(); } void append_item(string question, GTK2.Widget item, string additional_info); //! Convenience function to add a GTK2.Widget to the vbox. This function //! creates a new contents section that has the question text followed by the //! item widget and then the additional_info text, all stacked vertically from //! top to bottom. //! <p> //! The item widget could be something like a set of radio checkbuttons //! requesting a choice from the user.
f284492006-08-03Lance Dillon endrequire; endnot;