static --------------------------------- EditorAppWindow::create Create a editor app window from the generated source in window.ui
| 107 | // Create a editor app window from the generated source in window.ui |
| 108 | // |
| 109 | EditorAppWindow* EditorAppWindow::create(EditorApp *const editorApp) |
| 110 | { |
| 111 | // Load the Builder file and instantiate its widgets. |
| 112 | Glib::RefPtr<Gtk::Builder> refBuilder = Gtk::Builder::create_from_resource("/com/leah-lindner/editor/ui/editorWindow.ui"); |
| 113 | |
| 114 | // get the toplevel element |
| 115 | EditorAppWindow* window = nullptr; |
| 116 | refBuilder->get_widget_derived("app_window", window); |
| 117 | if (!window) |
| 118 | { |
| 119 | throw std::runtime_error("No 'app_window' object in editorWindow.ui"); |
| 120 | } |
| 121 | |
| 122 | window->Init(editorApp); |
| 123 | |
| 124 | return window; |
| 125 | } |
| 126 | |
| 127 | //--------------------------------- |
| 128 | // EditorAppWindow::Init |