gtkmm
3.97.1
|
Main application class. More...
#include <gtkmm/main.h>
Inherits trackable.
Public Member Functions | |
Main (bool set_locale=true) | |
Initialization without command-line arguments. More... | |
virtual | ~Main () |
Static Public Member Functions | |
static Gtk::Main* | instance () |
Access to the one global instance of Gtk::Main. More... | |
static void | init_gtkmm_internals () |
Initialize the table of wrap_new functions. More... | |
Protected Member Functions | |
void | init (bool set_locale) |
Main application class.
Every application must have one of these objects. It may not be global and must be the first gtkmm object created. It is a singleton so declaring more than one will simply access the first created.
You would normally use this class in your main() function to initialize gtkmm and optionally to give argc and argv to the GTK+ initialization. After calling Gtk::Main::run(), you may use Gtk::Main::quit() to exit from the application, or just pass your main window to run(), to make run() return when that window closes.
A minimal gtkmm application would be something like this:
|
explicit |
Initialization without command-line arguments.
set_locale | Passing false prevents GTK+ from automatically calling setlocale(LC_ALL, ""). You would want to pass false if you wanted to set the locale for your program to something other than the user's locale, or if you wanted to set different values for different locale categories. |
|
virtual |
|
protected |
|
static |
|
static |
Access to the one global instance of Gtk::Main.