eb05362005-11-05Henrik Grubbström (Grubba) /* -*- C -*- */
1a05542005-07-28Martin Nilsson require gtk24; class GTK2.Expander; inherit GTK2.Bin; //! Properties: //! int expanded //! string label //! GTK2.Widget label-widget //! int spacing //! int use-markup //! int use-underline //! <p> //! Style properties: //! int expander-size //! int expander-spacing signal activate;
3d76632005-11-03Lance Dillon void create(string|mapping(string:mixed) label)
1a05542005-07-28Martin Nilsson //! Create a new GTK2.Expander. Set mnemonic to 1 //! for a mnemonic expander, otherwise omitting it //! creates a regular expander. {
ba9e802006-02-27Martin Stjernholm  pgtk2_verify_not_inited(); pgtk2_verify_setup();
1a05542005-07-28Martin Nilsson  {
017b572011-10-28Henrik Grubbström (Grubba)  if (TYPEOF(Pike_sp[-args]) == PIKE_T_STRING) {
535ddd2005-12-18Marcus Comstedt  struct pike_string *label;
3d76632005-11-03Lance Dillon  GtkWidget *ge;
96f5f42018-08-05Martin Nilsson  get_all_args(NULL,args,"%t",&label);
535ddd2005-12-18Marcus Comstedt  ref_push_string(label); f_string_to_utf8(1);
eac9aa2005-12-18Martin Nilsson  ge=gtk_expander_new_with_mnemonic(CGSTR0(Pike_sp[-1].u.string));
535ddd2005-12-18Marcus Comstedt  pop_stack();
3d76632005-11-03Lance Dillon  THIS->obj=G_OBJECT(ge); } else { INIT_WITH_PROPS(GTK_TYPE_EXPANDER);
1a05542005-07-28Martin Nilsson  }
ba9e802006-02-27Martin Stjernholm  pgtk2_pop_n_elems(args);
1a05542005-07-28Martin Nilsson  }
ba9e802006-02-27Martin Stjernholm  pgtk2__init_this_object();
1a05542005-07-28Martin Nilsson } void set_expanded(int expanded); //! Sets the state of the expander. Set to true if you want the //! child widget to be revealed, and false if you want the child //! widget to be hidden. int get_expanded(); //! Returns true if the child widget is revealed. void set_spacing(int spacing); //! Sets the spacing field of the expander, which is the number //! of pixels to place between the expander and the child. int get_spacing(); //! Returns the spacing. void set_label(string label); //! Sets the text of the label of the expander. string get_label(); //! Fetches the text from the label of the expander. void set_use_underline(int use_underline); //! If true, an underline in the text of the label indicates //! the next character should be used for the mnemonic //! accelarator key. int get_use_underline(); //! Returns whether an embedded underline in the label //! indicates a mnemonic. void set_use_markup(int use_markup); //! Sets whether the text of the label contains markup in //! Pango's text markup language. int get_use_markup(); //! Returns whether the label's text is interpreted as marked up //! with the Pango text markup language. void set_label_widget(GTK2.Widget label); //! Set the label widget for the expander. This is the widget //! that will appear embedded alongside the expander arrow.
f284492006-08-03Lance Dillon +GTK2.Widget get_label_widget();
1a05542005-07-28Martin Nilsson //! Retrieves the label widget for the frame. endrequire;