48 static std::shared_ptr<Window>
Create(std::string title =
"AlgAudio",
int w = 350,
int h = 300,
bool centered =
true,
bool resizable =
true);
61 void Insert(std::shared_ptr<UIWidget> child);
75 template<
class W,
typename... Args>
76 std::shared_ptr<W>
Create(Args... args){
77 return W::Create(shared_from_this(), args...);
83 unsigned int GetID()
const {
return id;}
98 std::shared_ptr<UIWidget>
GetRoot()
const {
return child;}
100 Window(std::string title,
int w,
int h,
bool centered =
true,
bool resizable =
true);
107 SDL_Renderer* renderer;
112 bool mouse_just_entered =
false;
115 bool needs_redrawing =
true;
117 std::shared_ptr<UIWidget> child;
static std::shared_ptr< Window > Create(std::string title="AlgAudio", int w=350, int h=300, bool centered=true, bool resizable=true)
virtual LateReturn< int > ShowSimpleAlert(std::string, std::string, std::string, AlertType, Color, Color)
Definition: Window.hpp:92
unsigned int GetID() const
Definition: Window.hpp:83
void ProcessMouseButtonEvent(bool down, MouseButton button, Point2D)
Window(const Window &)=delete
Window & operator=(const Window &)=delete
void ProcessMotionEvent(Point2D)
Definition: SDLHandle.hpp:40
Definition: Alertable.hpp:58
Point2D_< int > Point2D
Definition: Utilities.hpp:35
Signal on_close
Definition: Window.hpp:80
std::shared_ptr< W > Create(Args...args)
Definition: Window.hpp:76
Definition: Signal.hpp:247
MouseButton
Definition: Utilities.hpp:190
Definition: Window.hpp:37
SDL_Window * GetWindow() const
Definition: Window.hpp:89
virtual void ProcessCloseEvent()
Definition: Alertable.hpp:50
void ProcessWheelEvent(MouseButton button)
SDL_Renderer * GetRenderer() const
Definition: Window.hpp:87
Definition: Alertable.hpp:26
void * SDL_GLContext
Definition: DrawContext.hpp:31
void ProcessResizeEvent()
Definition: Signal.hpp:145
virtual LateReturn ShowErrorAlert(std::string, std::string)
Definition: Window.hpp:94
void Insert(std::shared_ptr< UIWidget > child)
Definition: LateReturn.hpp:35
AlertType
Definition: Alertable.hpp:42
Definition: Utilities.hpp:157
Definition: Utilities.hpp:40
std::shared_ptr< UIWidget > GetRoot() const
Definition: Window.hpp:98
virtual void ProcessKeyboardEvent(KeyData data)