Top |
GObject ╰── GInitiallyUnowned ╰── GtkObject ╰── GtkWidget ╰── GtkContainer ╰── GtkBin ╰── GtkToolItem ╰── GtkToolButton ╰── GtkMenuToolButton
GtkMenuToolButton implements AtkImplementorIface, GtkBuildable and GtkActivatable.
GtkToolItem * gtk_menu_tool_button_new (GtkWidget *icon_widget
,const gchar *label
);
Creates a new GtkMenuToolButton using icon_widget
as icon and
label
as label.
icon_widget |
a widget that will be used as icon widget, or |
[allow-none] |
label |
a string that will be used as label, or |
[allow-none] |
Since: 2.6
GtkToolItem *
gtk_menu_tool_button_new_from_stock (const gchar *stock_id
);
Creates a new GtkMenuToolButton.
The new GtkMenuToolButton will contain an icon and label from
the stock item indicated by stock_id
.
Since: 2.6
void gtk_menu_tool_button_set_menu (GtkMenuToolButton *button
,GtkWidget *menu
);
Sets the GtkMenu that is popped up when the user clicks on the arrow.
If menu
is NULL, the arrow button becomes insensitive.
Since: 2.6
GtkWidget *
gtk_menu_tool_button_get_menu (GtkMenuToolButton *button
);
Gets the GtkMenu associated with GtkMenuToolButton.
Since: 2.6
void gtk_menu_tool_button_set_arrow_tooltip (GtkMenuToolButton *button
,GtkTooltips *tooltips
,const gchar *tip_text
,const gchar *tip_private
);
gtk_menu_tool_button_set_arrow_tooltip
has been deprecated since version 2.12 and should not be used in newly-written code.
Use gtk_menu_tool_button_set_arrow_tooltip_text()
instead.
Sets the GtkTooltips object to be used for arrow button which
pops up the menu. See gtk_tool_item_set_tooltip()
for setting
a tooltip on the whole GtkMenuToolButton.
button |
||
tooltips |
the GtkTooltips object to be used |
|
tip_text |
text to be used as tooltip text for tool_item. |
[allow-none] |
tip_private |
text to be used as private tooltip text. |
[allow-none] |
Since: 2.6
void gtk_menu_tool_button_set_arrow_tooltip_text (GtkMenuToolButton *button
,const gchar *text
);
Sets the tooltip text to be used as tooltip for the arrow button which
pops up the menu. See gtk_tool_item_set_tooltip()
for setting a tooltip
on the whole GtkMenuToolButton.
Since: 2.12
void gtk_menu_tool_button_set_arrow_tooltip_markup (GtkMenuToolButton *button
,const gchar *markup
);
Sets the tooltip markup text to be used as tooltip for the arrow button
which pops up the menu. See gtk_tool_item_set_tooltip()
for setting a
tooltip on the whole GtkMenuToolButton.
Since: 2.12
“menu”
property“menu” GtkMenu *
The dropdown menu.
Owner: GtkMenuToolButton
Flags: Read / Write
“show-menu”
signalvoid user_function (GtkMenuToolButton *button, gpointer user_data)
The ::show-menu signal is emitted before the menu is shown.
It can be used to populate the menu on demand, using
gtk_menu_tool_button_get_menu()
.
Note that even if you populate the menu dynamically in this way, you must set an empty menu on the GtkMenuToolButton beforehand, since the arrow is made insensitive if the menu is not set.
button |
the object on which the signal is emitted |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First