Trait gtk::prelude::MenuToolButtonExt
source · [−]pub trait MenuToolButtonExt: 'static {
fn menu(&self) -> Option<Widget>;
fn set_arrow_tooltip_markup(&self, markup: &str);
fn set_arrow_tooltip_text(&self, text: &str);
fn set_menu(&self, menu: &impl IsA<Widget>);
fn connect_show_menu<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_menu_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
}
Expand description
Required Methods
sourcefn set_arrow_tooltip_markup(&self, markup: &str)
fn set_arrow_tooltip_markup(&self, markup: &str)
Sets the tooltip markup text to be used as tooltip for the arrow button
which pops up the menu. See ToolItemExt::set_tooltip_text()
for setting
a tooltip on the whole MenuToolButton
.
markup
markup text to be used as tooltip text for button’s arrow button
sourcefn set_arrow_tooltip_text(&self, text: &str)
fn set_arrow_tooltip_text(&self, text: &str)
Sets the tooltip text to be used as tooltip for the arrow button which
pops up the menu. See ToolItemExt::set_tooltip_text()
for setting a tooltip
on the whole MenuToolButton
.
text
text to be used as tooltip text for button’s arrow button
Sets the Menu
that is popped up when the user clicks on the arrow.
If menu
is NULL, the arrow button becomes insensitive.
menu
the Menu
associated with MenuToolButton
The ::show-menu signal is emitted before the menu is shown.
It can be used to populate the menu on demand, using
set_menu()
.
Note that even if you populate the menu dynamically in this way,
you must set an empty menu on the MenuToolButton
beforehand,
since the arrow is made insensitive if the menu is not set.