22 #ifndef GtkCRNApp_HEADER
23 #define GtkCRNApp_HEADER
25 #include <libgtkcrnmm_config.h>
36 #ifdef CRN_USING_GTKMM3
37 public Gtk::ApplicationWindow
62 static void show_message(
const Glib::ustring &message, Gtk::MessageType mtype);
66 static void show_exception(std::exception &ex,
bool kill_app =
true);
78 Glib::ustring
ask_for_string(
const Glib::ustring &msg,
const Glib::ustring &defval =
"");
80 #ifdef CRN_USING_GTKMM3
81 Glib::RefPtr<Gio::SimpleActionGroup>
actions;
Glib::RefPtr< Gtk::ActionGroup > actions
Glib::RefPtr< Gtk::UIManager > ui_manager
Base class to create an application.
virtual ~App()
Destructor.
static void set_main_window(Gtk::Window *win)
Sets the main window of the application to be used as parent for dialogs and messages.
static Gtk::Window *& internal_main_window()
Glib::ustring ask_for_string(const Glib::ustring &msg, const Glib::ustring &defval="")
Shows a dialog asking for a single string.
static Gtk::Window * get_main_window()
Gets a pointer to the main window.
virtual void help()
Displays help (overloadable)
static void show_message(const Glib::ustring &message, Gtk::MessageType mtype)
Displays a message.
virtual void about()
Displays credits (overloadable)
static void show_exception(crn::Exception &ex, bool kill_app=true)
Displays an exception.
App()
Constructor. Creates Actions and adds them to UI manager.
Base class for exceptions.
virtual bool ask_for_quit(GdkEventAny *event)
Callback for application quit event (overloadable)