#ifndef _CWINDOW_HPP_ #define _CWINDOW_HPP_ /*** SDL Header Files ***/ #include /*** Custom Header Files ***/ #include "GUIHelpers/cObject.hpp" #include "GUIHelpers/Enums.hpp" #include "GUIHelpers/GUIUtility.hpp" /*** DLL Header File ***/ #include "dllExport.h" /*** Custom Header Files ***/ #include "../UtilityEngine/cString.hpp" using UtilityEngine::cString; namespace GUIEngine { class EXPORT_FROM_MYDLL cWindow : public GUIHelpers::cObject { public: static const UtilityEngine::cString sNAME; /*= "windows";*/ static GUIHelpers::Position sPOSITION; /*= Position(0, 0);*/ static GUIHelpers::Size sSIZE; /*= Size(0, 0);*/ static GUIHelpers::Padding sPADDING; /*= Padding(5, 5, 5, 5);*/ static GUIHelpers::RBGA sCOLOUR; /*= { 100, 100, 100, 255 };*/ static GUIHelpers::eAlign sALIGN; /*= GUIHelpers::eAlign::CENTER;*/ static GUIHelpers::eLayout sLAYOUT; /*= FILL_PARENT*/ protected: cWindow( cWindow* parent = nullptr, const signed int id = -1, 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 ); virtual ~cWindow(); public: ///Functions virtual void Display(); const bool Inside( const MathEngine::iVector2& location ) const; void AddChild(cWindow* obj); void RemoveChild(cWindow* obj); void AddSizeX( const unsigned long int x ); void AddSizeY( const unsigned long int y ); ///Sets void setAlign( const GUIHelpers::eAlign& align = GUIHelpers::eAlign::CENTER ); void setLayout( const GUIHelpers::eLayout& layout = GUIHelpers::eLayout::FILL_PARENT ); void setPosition( const GUIHelpers::Position& pos = sPOSITION ); void setSize( const GUIHelpers::Size& size = sSIZE ); void setPadding(const GUIHelpers::Padding& padding = sPADDING); void setContentSize( const GUIHelpers::Size& content ); void setName( const cString& name = sNAME ); void setParent( cWindow* parent ); ///Gets const GUIHelpers::eAlign& getAlign() const; const GUIHelpers::eLayout& getLayout() const; const GUIHelpers::Position& getPosition() const; const GUIHelpers::Size& getSize() const; const GUIHelpers::Padding& getPadding() const; const GUIHelpers::Size& getContentSize() const; const cString& getName() const; cWindow* getParent(); virtual const GUIHelpers::eType getType() const; virtual void Resize(); virtual void RebuildLayout(const GUIHelpers::eLayout& layout); virtual void RePos(); virtual void RebuildPos(); protected: std::vector& getChildren(); private: void Rebuild( cWindow* const parent, const GUIHelpers::eLayout& layout ); private: GUIHelpers::eAlign m_align;// = GUIHelper::eAlign::CENTER; GUIHelpers::eLayout m_layout;// = GUIHelper::eLayout::FILL_PARENT; GUIHelpers::Position m_pos;// = POSITION; GUIHelpers::Size m_size;// = SIZE; GUIHelpers::Padding m_padding;// = PADDING; GUIHelpers::Size m_content;// = m_size; cString m_name;// = NAME; std::vector m_children; cWindow* mp_parent;// = nullptr; };/// END CLASS DEFINITION cBoxSizer }/// END NAMESPACE DEFINITION GUIEngine #endif/// END IFNDEF _CBOXSIZER_HPP_