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
  
82
  
83
  
84
  
85
  
86
  
87
  
88
  
89
  
90
  
91
  
92
  
93
  
94
  
95
  
96
  
97
  
98
  
99
  
100
  
101
  
102
  
103
  
104
  
105
  
106
  
107
  
108
  
109
  
110
  
111
  
112
  
113
  
114
  
115
  
116
  
117
  
118
  
119
  
120
  
121
  
122
  
123
  
124
  
125
  
126
  
127
  
128
  
129
  
130
  
131
  
132
  
133
  
134
  
/* -*- C -*- */ 
class GTK2.Toolbar; 
inherit GTK2.Container; 
 
//! Toolbars are usually used to group some number of widgets in order 
//! to simplify customization of their look and layout. Typically a 
//! toolbar consists of buttons with icons, labels and tooltips, but 
//! any other widget can also be put inside a toolbar. Finally, items 
//! can be arranged horizontally or vertically and buttons can be 
//! displayed with icons, labels, or both. 
 
//! <p> 
//! Examples: 
//! IMG: GTK2.Toolbar()->insert(GTK2.ToolItem()->add(GTK2.Button("Button 1")),-1)->insert(GTK2.ToolItem()->add(GTK2.Label("     ")),-1)->insert(GTK2.ToolItem()->add(GTK2.Button("Button 2")),-1)->insert(GTK2.ToolItem()->add(GTK2.Button("Button 3")),-1) 
//! IMG: GTK2.Toolbar((["orientation":GTK2.ORIENTATION_VERTICAL]))->insert(GTK2.ToolItem()->add(GTK2.Button("Button 1")),-1)->insert(GTK2.ToolItem()->add(GTK2.Label("     ")),-1)->insert(GTK2.ToolItem()->add(GTK2.Button("Button 2")),-1)->insert(GTK2.ToolItem()->add(GTK2.Button("Button 3")),-1) 
//! </p> 
 
//! Properties: 
require gtk210; 
//! int icon-size 
//! int icon-size-set 
endrequire; 
//! int orientation 
//! int show-arrow 
//! int toolbar-style 
require gtk28; 
//! int tooltips 
endrequire; 
//! <p> 
//! Child properties: 
//! int expand 
//! int homogeneous 
//! <p> 
//! Style properties: 
//! int button-relief 
//! int internal-padding 
//! int shadow-type 
//! int space-size 
//! int space-style 
 
signal orientation_changed; 
signal popup_context_menu; 
signal style_changed; 
 
void create(?mapping(string:mixed) props) 
//! Creates a new toolbar. 
{ 
  pgtk2_verify_not_inited(); 
  pgtk2_verify_setup(); 
  if (args) { 
    INIT_WITH_PROPS(GTK_TYPE_TOOLBAR); 
    pgtk2_pop_n_elems(args); 
  } else { 
    GtkWidget *gt; 
    gt=gtk_toolbar_new(); 
    THIS->obj=G_OBJECT(gt); 
  } 
  pgtk2__init_this_object(); 
} 
 
require gtk24; 
void insert(GTK2.ToolItem item, int pos); 
//! Insert a W(ToolItem) into the toolbar at position pos.  If pos is 0 
//! the item is prepended to the start of the toolbar.  If pos is negative, 
//! the item is appended to the end of the toolbar. 
 
int get_item_index(GTK2.ToolItem item); 
//! Returns the position of item on the toolbar, starting from 0. 
 
int get_n_items(); 
//! Returns the number of items on the toolbar. 
 
+GTK2.ToolItem get_nth_item(int n); 
//! Returns the n's item on the toolbar, or empty if the toolbar does not 
//! contain an n'th item. 
 
int get_drop_index(int x, int y); 
//! Returns the position corresponding to the indicated point on the toolbar. 
//! This is useful when dragging items to the toolbar: this function returns 
//! the position a new item should be inserted. 
//! <p> 
//! x and y are in toolbar coordinates. 
 
void set_drop_highlight_item(GTK2.ToolItem item, int index); 
//! Highlights the toolbar to give an ide aof what it would like if item was 
//! added at the position indicated by index. 
//! <p> 
//! The item passed to this function must not be part of any widget hierarchy. 
//! When an item is set as drop highlight item it can not be added to any 
//! widget hierarchy or used as highlight item for another toolbar. 
 
void set_show_arrow(int show_arrow); 
//! Sets whether to show an overflow menu when the toolbar doesn't have room 
//! for all items on it.  If true, items for which there are not room are 
//! are available through an overflow menu. 
endrequire; 
 
void set_orientation(int orientation); 
//! Sets whether a toolbar should appear horizontally or vertically. 
//! One of CONST(GTK_ORIENTATION_). 
 
void set_tooltips(int enable); 
//! Sets if the tooltips should be active or not. 
 
require gtk24; 
int get_show_arrow(); 
//! Returns whether the toolbar has an overflow menu. 
endrequire; 
 
int get_orientation(); 
//! Retrieves the current orientation of the toolbar. 
 
int get_style(); 
//! Retrieves whether the toolbar has text, icons, or both.  One of 
//! CONST(GTK_TOOLBAR_); 
 
int get_icon_size(); 
//! Retrieves the icon size for the toolbar.  One of CONST(GTK_ICON_SIZE_). 
 
int get_tooltips(); 
//! Retrieves whether tooltips are enabled. 
 
require gtk24; 
int get_relief_style(); 
//! Returns the relief style of buttons. 
endrequire; 
 
void set_style(int style); 
//! Set the style, one of CONST(GTK_TOOLBAR) 
 
void unset_style(); 
//! Unsets a toolbar style, so that user preferences will be used to 
//! determine the toolbar style.