The-Powder-Toy/src/Activity.h
Tamás Bálint Misius 4f0c365e05
Preprocessor purge round 19: Split and minimize usage of Config.h
Also mostly banish it from other headers, and shuffle standard header includes to minimize cross-contamination between headers.
2023-01-27 09:27:32 +01:00

36 lines
529 B
C++

#pragma once
#include "gui/interface/Window.h"
class Activity
{
public:
virtual void Exit() {}
virtual void Show() {}
virtual void Hide() {}
virtual ~Activity() {}
};
class WindowActivity: public ui::Window, public Activity
{
public:
WindowActivity(ui::Point position, ui::Point size) :
ui::Window(position, size)
{
Show();
}
void Exit() override
{
Hide();
SelfDestruct();
}
void Show() override
{
MakeActiveWindow();
}
void Hide() override
{
CloseActiveWindow();
}
virtual ~WindowActivity() {}
};