Files
SDLPongCPP/TrooperEngineDLL/TrooperEngine/GUIEngine/cLayout.cpp
T
2018-07-31 10:50:06 -04:00

49 lines
1.7 KiB
C++

#include "cLayout.hpp"
using GUIEngine::cLayout;
/*static*/ const cString cLayout::sNAME = "layout";
/*static*/ const GUIHelpers::eOrientation cLayout::sORIENTATION = GUIHelpers::eOrientation::VERTICAL;
cLayout::cLayout(cWindow* parent, const signed int id, const GUIHelpers::eOrientation& orientation /*= sORIENTATION*/, const GUIHelpers::eAlign& align /*= sALIGN*/,
const GUIHelpers::eLayout& layout /*= sLAYOUT*/, const GUIHelpers::Position& pos /*= sPOSITION*/, const GUIHelpers::Size& size /*= sSIZE*/,
const GUIHelpers::Padding& padding /*= sPADDING*/, const cString& name /*= sNAME*/)
{
Create(parent, id, orientation, align, layout, pos, size, padding, name);
}
/*virtual*/ cLayout::~cLayout()
{}
///Functions
/*virtual*/ void cLayout::Create(cWindow* parent, const signed int id, const GUIHelpers::eOrientation& orientation /*= sORIENTATION*/, const GUIHelpers::eAlign& align /*= sALIGN*/,
const GUIHelpers::eLayout& layout /*= sLAYOUT*/, const GUIHelpers::Position& pos /*= sPOSITION*/, const GUIHelpers::Size& size /*= sSIZE*/,
const GUIHelpers::Padding& padding/* = sPADDING*/, const cString& name /*= sNAME*/)
{
GUIHelpers::eOrientation ori = orientation;
if (ori == GUIHelpers::eOrientation::DEFAULT_ORIENTATION)
ori = sORIENTATION;
cWindow::Create(parent, id, ori, align, layout, pos, size, padding, name);
if (this->getParent() != nullptr) {
this->getParent()->AddChild(this);
}
}
/*virtual*/ void cLayout::Display()
{
cWindow::Display();
}
///Set
///Get
/*virtual*/ const GUIHelpers::eType cLayout::getType() const
{
return GUIHelpers::eType::CLAYOUT;
}
/*virtual*/ const GUIHelpers::RGBA& cLayout::getDebugColour() const
{
return GUIHelpers::BLUE;
}