Add project files.
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
#include "cBoxSizer.hpp"
|
||||
|
||||
using GUIEngine::cBoxSizer;
|
||||
|
||||
/*static*/ const cString cBoxSizer::sNAME = "boxsizer";
|
||||
/*static*/ GUIHelpers::Size cBoxSizer::sSIZE = { 5, 5 };
|
||||
|
||||
cBoxSizer::cBoxSizer( cWindow* parent, const signed int id, 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, align, layout, pos, size, padding, name);
|
||||
}
|
||||
|
||||
/*virtual*/ cBoxSizer::~cBoxSizer()
|
||||
{}
|
||||
|
||||
///Functions
|
||||
void cBoxSizer::Create( cWindow* parent, const signed int id, 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::Size sz = size;
|
||||
if (size.x < 0)
|
||||
sz = sSIZE;
|
||||
cWindow::Create(parent, id, sORIENTATION, align, layout, pos, sz, padding, name);
|
||||
if (this->getParent() != nullptr) {
|
||||
this->getParent()->AddChild(this);
|
||||
}
|
||||
}
|
||||
|
||||
/*virtual*/ const GUIHelpers::eType cBoxSizer::getType() const
|
||||
{
|
||||
return GUIHelpers::eType::CBOXSIZER;
|
||||
}
|
||||
|
||||
/*virtual*/ const GUIHelpers::RGBA cBoxSizer::getDebugColour() const
|
||||
{
|
||||
return GUIHelpers::CYAN;
|
||||
}
|
||||
Reference in New Issue
Block a user