22 #ifndef GtkCRNHelpers_HEADER
23 #define GtkCRNHelpers_HEADER
25 #include <libgtkcrnmm_config.h>
31 #ifdef CRN_USING_GTKMM3
36 template<
typename ACTIONMAPPTR>
void set_enable_action(
const ACTIONMAPPTR &grp,
const Glib::ustring &action,
bool enabled)
38 auto obj = grp->lookup_action(action);
39 auto act = Glib::RefPtr<Gio::SimpleAction>::cast_dynamic(obj);
41 act->set_enabled(enabled);
46 template<
typename ACTIONMAPPTR>
void enable_action(
const ACTIONMAPPTR &grp,
const Glib::ustring &action)
51 template<
typename ACTIONMAPPTR>
void disable_action(
const ACTIONMAPPTR &grp,
const Glib::ustring &action)
56 template<
typename ACTIONMAPPTR>
bool is_toggle_action_active(
const ACTIONMAPPTR &grp,
const Glib::ustring &action)
59 grp->lookup_action(action)->get_state(ok);
68 void set_enable_action(
const Glib::RefPtr<Gtk::ActionGroup> &grp,
const Glib::ustring &action,
bool enabled);
69 void enable_action(
const Glib::RefPtr<Gtk::ActionGroup> &grp,
const Glib::ustring &action);
70 void disable_action(
const Glib::RefPtr<Gtk::ActionGroup> &grp,
const Glib::ustring &action);
void disable_action(const Glib::RefPtr< Gtk::ActionGroup > &grp, const Glib::ustring &action)
bool is_toggle_action_active(const Glib::RefPtr< Gtk::ActionGroup > &grp, const Glib::ustring &action)
void enable_action_group(const Glib::RefPtr< Gtk::ActionGroup > &grp)
void enable_action(const Glib::RefPtr< Gtk::ActionGroup > &grp, const Glib::ustring &action)
void set_enable_action(const Glib::RefPtr< Gtk::ActionGroup > &grp, const Glib::ustring &action, bool enabled)
void set_enable_action_group(const Glib::RefPtr< Gtk::ActionGroup > &grp, bool enabled)
void disable_action_group(const Glib::RefPtr< Gtk::ActionGroup > &grp)
An item was not found in a container.