1
  
2
  
3
  
4
  
5
  
6
  
7
  
8
  
9
  
10
  
11
  
12
  
13
  
14
  
15
  
16
  
17
  
18
  
19
  
20
  
21
  
22
  
23
  
24
  
25
  
26
  
27
  
28
  
29
  
30
  
31
  
32
  
33
  
34
  
35
  
36
  
37
  
38
  
39
  
40
  
41
  
42
  
43
  
44
  
45
  
46
  
47
  
48
  
49
  
50
  
51
  
52
  
53
  
54
  
55
  
56
  
57
  
58
  
59
  
60
  
61
  
62
  
63
  
64
  
65
  
66
  
67
  
68
  
69
  
70
  
71
  
72
  
73
  
74
  
75
  
76
  
77
  
78
  
79
  
80
  
81
  
require gtk24; 
 
class GTK2.ToolButton; 
inherit GTK2.ToolItem; 
 
//! Properties that can be notified: 
//! icon-widget 
//! label 
//! label-widget 
//! stock-id 
//! use-underline 
 
signal clicked; 
 
void create(GTK2.Widget|string icon, ?string label) 
//! Create a new GTK2.ToolButton. 
//! If icon is a string, label should be omitted.  If it isn't, 
//! it will be ignored.  The result will be a button from 
//! a stock item, one of CONST(GTK_STOCK). 
//! If icon is a GTK2.Widget, it will be used as the icon, and label 
//! will be the label.  The label must exists if that is the case. 
{ 
  pgtk_verify_not_inited(); 
  pgtk_verify_setup(); 
  { 
    const gchar *s; 
    if (args==1 || Pike_sp[-args].type==PIKE_T_STRING) { 
      get_all_args("create",args,"%s",&s); 
      if (s) 
        THIS->obj=G_OBJECT(gtk_tool_button_new_from_stock(s)); 
      else 
        Pike_error("Invalid argument 1\n"); 
    } else { 
      const gchar *s; 
      struct object *o1; 
      get_all_args("create",args,"%o%s",&o1,&s); 
      if (s && o1) 
        THIS->obj=G_OBJECT(gtk_tool_button_new(GTK_WIDGET(get_gobject(o1)),s)); 
      else 
        Pike_error("Invalid arguments\n"); 
    } 
  } 
  my_pop_n_elems(args); 
  pgtk__init_this_object(); 
} 
 
void set_label(string label); 
//! Sets label as the label used for the tool button. 
 
string get_label(); 
//! Returns the label used by the tool button, or empty if 
//! the tool button doesn't have a label. 
 
void set_use_underline(int use_underline); 
//! If set, an underline in the label property indicates that 
//! the next character should be used for the mnemonic 
//! accelerator key in the overflow menu. 
 
int get_use_underline(); 
//! Returns whether underscores in the label property are used 
//! as mnemonics on menu items on the overflow menu. 
 
void set_stock_id(string stock_id); 
//! Sets the name of the stock item. 
 
string get_stock_id(); 
//! Returns the name of the stock item. 
 
void set_icon_widget(GTK2.Widget icon_widget); 
//! Sets icon_widget as the widget used as the icon on the button. 
 
GTK2.Widget get_icon_widget(); 
//! Returns the widget used as the icon widget. 
 
void set_label_widget(GTK2.Widget label_widget); 
//! Sets label_widget as the widget used as the label. 
 
GTK2.Widget get_label_widget(); 
//! Returns the widget used as the label. 
endrequire;