Durée de vie d'une application

Most applications will have only one Window, or only one main window. These applications can use the Gtk::Application::run(Gtk::Window& window) or Gtk::Application::run(Gtk::Window& window, int argc, char** argv) overloads. They show the window and return when the window has been hidden. This might happen when the user closes the window, or when your code decides to hide() the window. You can prevent the user from closing the window (for instance, if there are unsaved changes) by overriding Gtk::Window::on_delete_event().

La plupart de nos exemples utilisent cette technique.