--------------------------------- EditorApp::CreateMainWindow Create the main window for the synth application
| 110 | // Create the main window for the synth application |
| 111 | // |
| 112 | EditorAppWindow* EditorApp::CreateMainWindow() |
| 113 | { |
| 114 | EditorAppWindow* appwindow = EditorAppWindow::create(this); |
| 115 | |
| 116 | // Make sure that the application runs for as long this window is still open. |
| 117 | add_window(*appwindow); |
| 118 | |
| 119 | // Gtk::Application::add_window() connects a signal handler to the window's |
| 120 | // signal_hide(). That handler removes the window from the application. |
| 121 | // If it's the last window to be removed, the application stops running. |
| 122 | // Gtk::Window::set_application() does not connect a signal handler, but is |
| 123 | // otherwise equivalent to Gtk::Application::add_window(). |
| 124 | |
| 125 | // Delete the window when it is hidden. |
| 126 | appwindow->signal_hide().connect(sigc::bind<Gtk::Window*>(sigc::mem_fun(*this, &EditorApp::OnHideWindow), appwindow)); |
| 127 | |
| 128 | return appwindow; |
| 129 | } |
| 130 | |
| 131 | //--------------------------------- |
| 132 | // EditorApp::OnHideWindow |
nothing calls this directly
no outgoing calls
no test coverage detected