--------------------------------- EditorApp::on_activate When the Gtk::Application gets activated we create a window and present it
| 187 | // When the Gtk::Application gets activated we create a window and present it |
| 188 | // |
| 189 | void EditorApp::on_activate() |
| 190 | { |
| 191 | // The application has been started, so let's show a window. |
| 192 | try |
| 193 | { |
| 194 | m_AppWindow = CreateMainWindow(); |
| 195 | m_AppWindow->present(); |
| 196 | m_AppWindow->AddEditor(new SceneEditor()); |
| 197 | } |
| 198 | // If create_appwindow() throws an exception (perhaps from Gtk::Builder), |
| 199 | // no window has been created, no window has been added to the application, |
| 200 | // and therefore the application will stop running. |
| 201 | catch (Glib::Error const& ex) |
| 202 | { |
| 203 | LOG("EditorApp::on_activate > " + std::string(ex.what().c_str()), core::LogLevel::Error); |
| 204 | } |
| 205 | catch (std::exception const& ex) |
| 206 | { |
| 207 | LOG("EditorApp::on_activate > " + std::string(ex.what()), core::LogLevel::Error); |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | //--------------------------------- |
| 212 | // EditorApp::InitializeUtilities |