Use Gio::Action and Gio::SimpleAction instead, and associate actions with Gtk::Actionable widgets. Use Gio::MenuModel for creating menus with Gtk::Menu(const Glib::RefPtr<Gio::MenuModel>& model).
Some gtkmm widgets don't derive from Gtk::Actionable, although the corresponding gtk+ widgets implement the GtkActionable interface. This discrepancy can't be fixed until we can break ABI. You can sometimes work around this problem by using a widget's gobj() method and calling a gtk_actionable_*() method directly. Several examples in the Programming with gtkmm book use Gio::SimpleAction, such as the menus and toolbars examples. The online version of this tutorial describes gtkmm-4.0.
Use Gio::Action instead, and get a label from a menu item with Gio::MenuItem::get_attribute_value(). For Gtk::Actionable widgets, use the widget-specific API to get a label.
Use Gio::Action instead, and Gio::MenuItem::set_icon() to set an icon on a Gio::MenuItem associated with a Gio::Action, or Gtk::Container::add() to add a Gtk::Image to a Gtk::Button.
Use Gio::Action instead, and Gio::MenuItem::set_icon() to set an icon on a Gio::MenuItem associated with a Gio::Action, or Gtk::Container::add() to add a Gtk::Image to a Gtk::Button.
Use Gio::Action instead, and set a label on a menu item with Gio::MenuItem::set_label(). For Gtk::Actionable widgets, use the widget-specific API to set a label.
You should instead use a Gtk::Image with a suitable icon name, such as “pan-down-symbolic“. When replacing Gtk::Arrow by an image, pay attention to the fact that Gtk::Arrow automatically flips between Gtk::ARROW_LEFT and Gtk::ARROW_RIGHT, depending on the text direction. To get the same effect with an image, use the icon names “pan-start-symbolic“ and “pan-end-symbolic“, which react to the text direction instead of “pan-left-symbolic“ and “pan-right-symbolic“ which don't.
This is very specialized, lacks features to make it useful and most importantly does not fit well into modern application design. There is no replacement.
Use Gio::Action, which can be created by Gio::ActionMap::add_action_radio_string() or Gio::ActionMap::add_action_radio_integer().
Set a label on a menu item with Gio::MenuItem::set_label(). For Gtk::Actionable widgets, use the widget-specific API to set a label.
Set tooltips on associated Gtk::Actionable widgets with Gtk::Widget::set_tooltip_text().
Use Gio::Action, which can be created by Gio::ActionMap::add_action_radio_string() or Gio::ActionMap::add_action_radio_integer().
Use Gio::MenuItem::set_icon() to set an icon on a Gio::MenuItem associated with a Gio::Action, or Gtk::Container::add() to add a Gtk::Image to a Gtk::RadioButton.
Set a label on a menu item with Gio::MenuItem::set_label(). For Gtk::Actionable widgets, use the widget-specific API to set a label.
Set tooltips on associated Gtk::Actionable widgets with Gtk::Widget::set_tooltip_text().
Use Gio::Action, which can be created by Gio::ActionMap::add_action_radio_string() or Gio::ActionMap::add_action_radio_integer().
Use Gio::MenuItem::set_icon() to set an icon on a Gio::MenuItem associated with a Gio::Action, or Gtk::Container::add() to add a Gtk::Image to a Gtk::RadioButton.
Set a label on a menu item with Gio::MenuItem::set_label(). For Gtk::Actionable widgets, use the widget-specific API to set a label.
Set tooltips on associated Gtk::Actionable widgets with Gtk::Widget::set_tooltip_text().
Use render_background() instead. Note that clients still using this function are now responsible for calling this function again whenever the context is invalidated.
Use Gtk::Grid instead. It provides the same capabilities as Gtk::Table for arranging widgets in a rectangular grid, but does support height-for-width geometry management.
Use Gio::Action, which can be created by Gio::ActionMap::add_action_bool().
Set a label on a menu item with Gio::MenuItem::set_label(). For Gtk::Actionable widgets, use the widget-specific API to set a label.
Set tooltips on associated Gtk::Actionable widgets with Gtk::Widget::set_tooltip_text().
Use Gio::Action, which can be created by Gio::ActionMap::add_action_bool().
Use Gio::MenuItem::set_icon() to set an icon on a Gio::MenuItem associated with a Gio::Action, or Gtk::Container::add() to add a Gtk::Image to a Gtk::ToggleButton.
Set a label on a menu item with Gio::MenuItem::set_label(). For Gtk::Actionable widgets, use the widget-specific API to set a label.
Set tooltips on associated Gtk::Actionable widgets with Gtk::Widget::set_tooltip_text().
Use Gio::Action, which can be created by Gio::ActionMap::add_action_bool().
Use Gio::MenuItem::set_icon() to set an icon on a Gio::MenuItem associated with a Gio::Action, or Gtk::Container::add() to add a Gtk::Image to a Gtk::ToggleButton.
Set a label on a menu item with Gio::MenuItem::set_label(). For Gtk::Actionable widgets, use the widget-specific API to set a label.
Set tooltips on associated Gtk::Actionable widgets with Gtk::Widget::set_tooltip_text().
Use Gtk::Builder instead.
The menus and toolbars examples in the Programming with gtkmm book show how to construct menus and toolbars with Gtk::Builder. The online version of this tutorial describes gtkmm-4.0.
This API never really worked well and was mostly unused, now we have a more complete mechanism for composite children, see gtk_widget_class_set_template().
Application and widget code should not handle expose events directly; invalidation should use the Gtk::Widget API, and drawing should only happen inside signal_draw() implementations.
Modern composited windowing systems with pervasive transparency make it impossible to track the visibility of a window reliably, so this signal can not be guaranteed to provide useful information.
This returns a group specific to this window, created on the first call. That’s no use if you need groups that were added by other sources, e.g. by Gtk::Builder. Use get_accel_groups(), which correctly returns all groups that have been added to the window regardless of origin. If you just used get_accel_group() as a shortcut to create and add a group, you should instead create it yourself and add it with add_accel_group().