Main controller for the application. More...
#include <controller.h>
Public Member Functions | |
bool | IsActive () const |
absl::Status | OnEntry (std::string filename="") |
void | OnInput () |
absl::Status | OnLoad () |
void | DoRender () const |
void | OnExit () |
auto | window () -> SDL_Window * |
void | set_active (bool active) |
auto | active () const |
Private Member Functions | |
friend | int::main (int argc, char **argv) |
Private Attributes | |
bool | active_ = false |
core::Window | window_ |
editor::EditorManager | editor_manager_ |
Main controller for the application.
This class is responsible for managing the main window and the main editor. It is the main entry point for the application.
Definition at line 23 of file controller.h.
|
inline |
Definition at line 25 of file controller.h.
References active_.
Referenced by yaze::test::RunIntegrationTest().
absl::Status yaze::core::Controller::OnEntry | ( | std::string | filename = "" | ) |
Definition at line 15 of file controller.cc.
References active_, yaze::core::CreateWindow(), editor_manager_, RETURN_IF_ERROR, and window_.
void yaze::core::Controller::OnInput | ( | ) |
Definition at line 24 of file controller.cc.
References yaze::core::HandleEvents(), PRINT_IF_ERROR, and window_.
Referenced by yaze::test::RunIntegrationTest().
absl::Status yaze::core::Controller::OnLoad | ( | ) |
Definition at line 28 of file controller.cc.
References active_, editor_manager_, RETURN_IF_ERROR, and window_.
void yaze::core::Controller::DoRender | ( | ) | const |
Definition at line 70 of file controller.cc.
References yaze::core::Renderer::Get().
Referenced by yaze::test::RunIntegrationTest().
void yaze::core::Controller::OnExit | ( | ) |
Definition at line 78 of file controller.cc.
References PRINT_IF_ERROR, yaze::core::ShutdownWindow(), and window_.
Referenced by yaze::test::RunIntegrationTest().
|
inline |
Definition at line 32 of file controller.h.
References window_.
Referenced by yaze::test::RunIntegrationTest().
|
inline |
Definition at line 33 of file controller.h.
References active(), and active_.
Referenced by yaze::test::RunIntegrationTest().
|
inline |
|
private |
|
private |
Definition at line 39 of file controller.h.
Referenced by active(), IsActive(), OnEntry(), OnLoad(), and set_active().
|
private |
|
private |
Definition at line 41 of file controller.h.