--------------------------------- EditorApp::c-tor
| 41 | // EditorApp::c-tor |
| 42 | // |
| 43 | EditorApp::EditorApp() |
| 44 | : Gtk::Application("com.leah-lindner.editor", Gio::APPLICATION_HANDLES_OPEN) |
| 45 | , m_CmdArguments(CommandlineArguments()) |
| 46 | { |
| 47 | RegisterAsTriggerer(); |
| 48 | |
| 49 | core::Logger::Initialize();//Init logger first because all output depends on it from the start |
| 50 | |
| 51 | LOG(FS("E.T.Editor")); |
| 52 | LOG(FS("//////////")); |
| 53 | LOG(""); |
| 54 | LOG(FS(" - version: %s", et::build::Version::s_Name.c_str())); |
| 55 | LOG(""); |
| 56 | |
| 57 | InitializeUtilities(); |
| 58 | |
| 59 | // Allow updating every frame in a gameloop style - called as quickly as possible |
| 60 | Glib::signal_idle().connect(sigc::mem_fun(*this, &EditorApp::OnTick)); |
| 61 | |
| 62 | // Initialize commandline arguments for later |
| 63 | auto onCommandLine = [this](const Glib::RefPtr<Gio::ApplicationCommandLine>& command_line) -> int32 |
| 64 | { |
| 65 | int argc; |
| 66 | char **argv = command_line->get_arguments(argc); |
| 67 | m_CmdArguments = CommandlineArguments(argc, argv); |
| 68 | return 0; |
| 69 | }; |
| 70 | signal_command_line().connect(onCommandLine, false); |
| 71 | |
| 72 | // when we press close the last window |
| 73 | signal_shutdown().connect( |
| 74 | [this]() |
| 75 | { |
| 76 | core::InputManager::GetInstance()->Quit(); |
| 77 | OnActionQuit(); |
| 78 | }); |
| 79 | } |
| 80 | |
| 81 | //--------------------------------- |
| 82 | // EditorApp::d-tor |
nothing calls this directly
no test coverage detected