Initial commit.
This commit is contained in:
commit
59c6161fdb
134 changed files with 4751 additions and 0 deletions
37
src/windows/managers/WindowManager.cpp
Normal file
37
src/windows/managers/WindowManager.cpp
Normal file
|
@ -0,0 +1,37 @@
|
|||
#include "WindowManager.h"
|
||||
|
||||
WindowManager::WindowManager()
|
||||
: mWindows()
|
||||
{
|
||||
AddWindow(mt::Window::Create());
|
||||
}
|
||||
|
||||
WindowManager::~WindowManager()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void WindowManager::OnPaintEvent(PaintEventPtr event)
|
||||
{
|
||||
GetMainWindow()->OnPaint(event);
|
||||
}
|
||||
|
||||
void WindowManager::OnMouseEvent(MouseEventPtr event)
|
||||
{
|
||||
GetMainWindow()->OnMouseEvent(event);
|
||||
}
|
||||
|
||||
void WindowManager::AddWindow(WindowPtr window)
|
||||
{
|
||||
mWindows.push_back(window);
|
||||
}
|
||||
|
||||
std::shared_ptr<WindowManager> WindowManager::Create()
|
||||
{
|
||||
return std::make_shared<WindowManager>();
|
||||
}
|
||||
|
||||
WindowPtr WindowManager::GetMainWindow()
|
||||
{
|
||||
return mWindows[0];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue