yaze 0.2.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::core::Controller Class Reference

Main controller for the application. More...

#include <controller.h>

Collaboration diagram for yaze::core::Controller:

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_
 

Detailed Description

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.

Member Function Documentation

◆ IsActive()

bool yaze::core::Controller::IsActive ( ) const
inline

Definition at line 25 of file controller.h.

References active_.

Referenced by yaze::test::RunIntegrationTest().

◆ OnEntry()

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_.

Here is the call graph for this function:

◆ OnInput()

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().

Here is the call graph for this function:

◆ OnLoad()

absl::Status yaze::core::Controller::OnLoad ( )

Definition at line 28 of file controller.cc.

References active_, editor_manager_, RETURN_IF_ERROR, and window_.

◆ DoRender()

void yaze::core::Controller::DoRender ( ) const

Definition at line 70 of file controller.cc.

References yaze::core::Renderer::Get().

Referenced by yaze::test::RunIntegrationTest().

Here is the call graph for this function:

◆ OnExit()

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().

Here is the call graph for this function:

◆ window()

auto yaze::core::Controller::window ( ) -> SDL_Window *
inline

Definition at line 32 of file controller.h.

References window_.

Referenced by yaze::test::RunIntegrationTest().

◆ set_active()

void yaze::core::Controller::set_active ( bool active)
inline

Definition at line 33 of file controller.h.

References active(), and active_.

Referenced by yaze::test::RunIntegrationTest().

Here is the call graph for this function:

◆ active()

auto yaze::core::Controller::active ( ) const
inline

Definition at line 34 of file controller.h.

References active_.

Referenced by set_active().

◆ int::main()

yaze::core::Controller::int::main ( int argc,
char ** argv )
private

Member Data Documentation

◆ active_

bool yaze::core::Controller::active_ = false
private

Definition at line 39 of file controller.h.

Referenced by active(), IsActive(), OnEntry(), OnLoad(), and set_active().

◆ window_

core::Window yaze::core::Controller::window_
private

Definition at line 40 of file controller.h.

Referenced by OnEntry(), OnExit(), OnInput(), OnLoad(), and window().

◆ editor_manager_

editor::EditorManager yaze::core::Controller::editor_manager_
private

Definition at line 41 of file controller.h.

Referenced by OnEntry(), and OnLoad().


The documentation for this class was generated from the following files: