pike.git / src / post_modules / GTK2 / source / gtkbutton.pre

version» Context lines:

pike.git/src/post_modules/GTK2/source/gtkbutton.pre:43:      void create(string|mapping|void label_or_props)   //! If a string is supplied, a W(Label) is created and added to the button.   {    pgtk_verify_not_inited();    pgtk_verify_setup();    if (args) {    if (Pike_sp[-args].type==PIKE_T_STRING) {    struct pike_string *t;    GtkWidget *gb; +  GtkStockItem item; +  int i; +     get_all_args("create",args,"%T",&t); -  if (t) { +  if (t->size_shift==0) +  t=gtk_stock_lookup(CGSTR0(t),&item); +  if (i) +  gb=gtk_button_new_from_stock(CGSTR0(t)); +  else {    ref_push_string(t);    f_string_to_utf8(1); -  gb=gtk_button_new_from_stock((char *)STR0(Pike_sp[-1].u.string)); +  +  gb=gtk_button_new_with_label(CGSTR0(Pike_sp[-1].u.string));    pop_stack();    } else    gb=gtk_button_new();    THIS->obj=G_OBJECT(gb);    } else {    INIT_WITH_PROPS(GTK_TYPE_BUTTON);    }    my_pop_n_elems(args);    } else {    GtkWidget *gb;
pike.git/src/post_modules/GTK2/source/gtkbutton.pre:115:      require gtk24;   void set_focus_on_click(int focus_on_click);   //! Sets whether the button will grab focus when it is clicked.      int get_focus_on_click();   //! Returns whether the button grabs focus when it is clicked.      void set_alignment(float xalign, float yalign);   //! Sets the alignment of the child. +  + mapping get_alignment() + //! Gets the alignment of the child. + { +  pgtk_verify_inited(); +  my_pop_n_elems(args); +  { +  gfloat xalign,yalign; +  +  gtk_button_get_alignment(GTK_BUTTON(THIS->obj),&xalign,&yalign); +  ref_push_string(_STR("xalign")); push_float(xalign); +  ref_push_string(_STR("yalign")); push_float(yalign); +  f_aggregate_mapping(4); +  } + }   endrequire;      require gtk26;   void set_image(GTK2.Widget widget);   //! Set the image of the button to the given widget. Note that it depends on   //! the gtk-button-images setting whether the image will be displayed or not.      GTK2.Widget get_image();   //! Gets the widget that is currently set as the image of the button.   endrequire;