yaze 0.2.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
controller.h
Go to the documentation of this file.
1#ifndef YAZE_APP_CORE_CONTROLLER_H
2#define YAZE_APP_CORE_CONTROLLER_H
3
4#include <SDL.h>
5
6#include <memory>
7
8#include "absl/status/status.h"
9#include "app/core/window.h"
11
12int main(int argc, char **argv);
13
14namespace yaze {
15namespace core {
16
24 public:
25 bool IsActive() const { return active_; }
26 absl::Status OnEntry(std::string filename = "");
27 void OnInput();
28 absl::Status OnLoad();
29 void DoRender() const;
30 void OnExit();
31
32 auto window() -> SDL_Window * { return window_.window_.get(); }
33 void set_active(bool active) { active_ = active; }
34 auto active() const { return active_; }
35
36 private:
37 friend int ::main(int argc, char **argv);
38
39 bool active_ = false;
42};
43
44} // namespace core
45} // namespace yaze
46
47#endif // YAZE_APP_CORE_CONTROLLER_H
Main controller for the application.
Definition controller.h:23
absl::Status OnLoad()
Definition controller.cc:28
core::Window window_
Definition controller.h:40
auto window() -> SDL_Window *
Definition controller.h:32
auto active() const
Definition controller.h:34
bool IsActive() const
Definition controller.h:25
void set_active(bool active)
Definition controller.h:33
void DoRender() const
Definition controller.cc:70
absl::Status OnEntry(std::string filename="")
Definition controller.cc:15
editor::EditorManager editor_manager_
Definition controller.h:41
The EditorManager controls the main editor window and manages the various editor classes.
int main(int argc, char **argv)
Definition emu.cc:20
Main namespace for the application.
Definition controller.cc:12