From ba16cd4bd43287f7f786b4cc1a729240ffb3496b Mon Sep 17 00:00:00 2001 From: Richard Allen Date: Thu, 30 Aug 2018 10:25:29 -0400 Subject: [PATCH] cWindows removed Ref from enum gets and sets --- .../TrooperEngine/GUIEngine/cWindow.cpp | 30 +++++++++--------- .../TrooperEngine/GUIEngine/cWindow.hpp | 30 +++++++++--------- TrooperEngineTest/xml/test.bmp | Bin 58442 -> 61322 bytes 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/TrooperEngineDLL/TrooperEngine/GUIEngine/cWindow.cpp b/TrooperEngineDLL/TrooperEngine/GUIEngine/cWindow.cpp index 5da4472..392c3d7 100644 --- a/TrooperEngineDLL/TrooperEngine/GUIEngine/cWindow.cpp +++ b/TrooperEngineDLL/TrooperEngine/GUIEngine/cWindow.cpp @@ -20,8 +20,8 @@ using GUIEngine::cWindow; /*static*/ GUIHelpers::eLayout cWindow::sLAYOUT = GUIHelpers::eLayout::FILL_PARENT; /*static*/ GUIHelpers::eOrientation cWindow::sORIENTATION = GUIHelpers::eOrientation::NONE; -cWindow::cWindow( cWindow* parent /*= nullptr*/, const signed int id /*= -1*/, 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*/, +cWindow::cWindow( cWindow* parent /*= nullptr*/, const signed int id /*= -1*/, 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*/ ) : cObject(id) { @@ -37,8 +37,8 @@ cWindow::cWindow( cWindow* parent /*= nullptr*/, const signed int id /*= -1*/, c m_children.clear(); } -/*virtual*/ void cWindow::Create( cWindow* parent /*= nullptr*/, const signed int id /*= -1*/, 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*/, +/*virtual*/ void cWindow::Create( cWindow* parent /*= nullptr*/, const signed int id /*= -1*/, 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*/ ) { mp_parent = parent; @@ -119,25 +119,25 @@ const bool cWindow::RemoveChild( cWindow* obj ) sPADDING = pad; } -/*static*/ void cWindow::AlignDefault( const GUIHelpers::eAlign& align ) +/*static*/ void cWindow::AlignDefault( const GUIHelpers::eAlign align ) { if (align != GUIHelpers::eAlign::DEFAULT_ALIGN) sALIGN = align; } -/*static*/ void cWindow::LayoutDefault( const GUIHelpers::eLayout& layout ) +/*static*/ void cWindow::LayoutDefault( const GUIHelpers::eLayout layout ) { if (layout != GUIHelpers::eLayout::DEFAULT_LAYOUT) sLAYOUT = layout; } -/*static*/ void cWindow::OrientationDefault( const GUIHelpers::eOrientation& orientation ) +/*static*/ void cWindow::OrientationDefault( const GUIHelpers::eOrientation orientation ) { if (orientation != GUIHelpers::eOrientation::DEFAULT_ORIENTATION) sORIENTATION = orientation; } -void cWindow::setOrientation( const GUIHelpers::eOrientation& orientation /*= sORIENTATION*/ ) +void cWindow::setOrientation( const GUIHelpers::eOrientation orientation /*= sORIENTATION*/ ) { if (orientation == GUIHelpers::eOrientation::DEFAULT_ORIENTATION) m_orientation = cWindow::sORIENTATION; @@ -145,7 +145,7 @@ void cWindow::setOrientation( const GUIHelpers::eOrientation& orientation /*= sO m_orientation = orientation; } -void cWindow::setAlign( const GUIHelpers::eAlign& align /*= sALIGN*/ ) +void cWindow::setAlign( const GUIHelpers::eAlign align /*= sALIGN*/ ) { if (align == GUIHelpers::eAlign::DEFAULT_ALIGN) m_align = cWindow::sALIGN; @@ -154,7 +154,7 @@ void cWindow::setAlign( const GUIHelpers::eAlign& align /*= sALIGN*/ ) RebuildPos(); } -void cWindow::setLayout( const GUIHelpers::eLayout& layout /*= sLAYOUT*/ ) +void cWindow::setLayout( const GUIHelpers::eLayout layout /*= sLAYOUT*/ ) { if (layout == GUIHelpers::eLayout::DEFAULT_LAYOUT) m_layout = cWindow::sLAYOUT; @@ -214,17 +214,17 @@ const GUIHelpers::Position cWindow::getCenter( const bool pad /*= true*/ ) const return rtn; } -const GUIHelpers::eOrientation& cWindow::getOrientation() const +const GUIHelpers::eOrientation cWindow::getOrientation() const { return m_orientation; } -const GUIHelpers::eAlign& cWindow::getAlign() const +const GUIHelpers::eAlign cWindow::getAlign() const { return m_align; } -const GUIHelpers::eLayout& cWindow::getLayout() const +const GUIHelpers::eLayout cWindow::getLayout() const { if (m_layout == GUIHelpers::eLayout::MATCH_PARENT) { if (mp_parent != nullptr) @@ -343,7 +343,7 @@ const unsigned long int cWindow::getFillParentSize() RePos(); } -/*virtual*/ void cWindow::RebuildLayout( const GUIHelpers::eLayout& layout ) +/*virtual*/ void cWindow::RebuildLayout( const GUIHelpers::eLayout layout ) { GUIHelpers::Size mySize = { 0, 0 }; std::vector::iterator it; @@ -510,7 +510,7 @@ std::vector& cWindow::getChildren() } /// private -void cWindow::Rebuild(cWindow * const parent, const GUIHelpers::eLayout & layout) +void cWindow::Rebuild(cWindow * const parent, const GUIHelpers::eLayout layout) { } diff --git a/TrooperEngineDLL/TrooperEngine/GUIEngine/cWindow.hpp b/TrooperEngineDLL/TrooperEngine/GUIEngine/cWindow.hpp index 3d63dd5..75f5493 100644 --- a/TrooperEngineDLL/TrooperEngine/GUIEngine/cWindow.hpp +++ b/TrooperEngineDLL/TrooperEngine/GUIEngine/cWindow.hpp @@ -32,16 +32,16 @@ namespace GUIEngine { static GUIHelpers::eOrientation sORIENTATION; /*= GUIHelpers::eOrientation::NONE;*/ protected: - cWindow( cWindow* parent = nullptr, const signed int id = -1, 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, + cWindow( cWindow* parent = nullptr, const signed int id = -1, 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 ); public: virtual ~cWindow(); protected: - virtual void Create( cWindow* parent = nullptr, const signed int id = -1, 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, + virtual void Create( cWindow* parent = nullptr, const signed int id = -1, 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 ); public: @@ -58,13 +58,13 @@ namespace GUIEngine { static void PositionDefault( const GUIHelpers::Position& pos ); static void SizeDefault( const GUIHelpers::Size& size ); static void PaddingDefault( const GUIHelpers::Padding& pad ); - static void AlignDefault( const GUIHelpers::eAlign& align ); - static void LayoutDefault( const GUIHelpers::eLayout& layout ); - static void OrientationDefault( const GUIHelpers::eOrientation& orientation ); + static void AlignDefault( const GUIHelpers::eAlign align ); + static void LayoutDefault( const GUIHelpers::eLayout layout ); + static void OrientationDefault( const GUIHelpers::eOrientation orientation ); - void setOrientation( const GUIHelpers::eOrientation& orientation = sORIENTATION ); - void setAlign( const GUIHelpers::eAlign& align = sALIGN ); - void setLayout( const GUIHelpers::eLayout& layout = sLAYOUT ); + void setOrientation( const GUIHelpers::eOrientation orientation = sORIENTATION ); + void setAlign( const GUIHelpers::eAlign align = sALIGN ); + void setLayout( const GUIHelpers::eLayout layout = sLAYOUT ); void setPosition( const GUIHelpers::Position& pos = sPOSITION ); void setSize( const GUIHelpers::Size& size = sSIZE ); void setPadding( const GUIHelpers::Padding& padding = sPADDING ); @@ -76,9 +76,9 @@ namespace GUIEngine { /// Gets const GUIHelpers::Position getCenter( const bool pad = true ) const; - const GUIHelpers::eOrientation& getOrientation() const; - const GUIHelpers::eAlign& getAlign() const; - const GUIHelpers::eLayout& getLayout() const; + const GUIHelpers::eOrientation getOrientation() const; + const GUIHelpers::eAlign getAlign() const; + const GUIHelpers::eLayout getLayout() const; const GUIHelpers::Position getPosition( const bool pad = true ) const; const GUIHelpers::Size getSize( const bool pad = true ) const; const GUIHelpers::Padding& getPadding() const; @@ -94,7 +94,7 @@ namespace GUIEngine { virtual const GUIHelpers::eType getType() const; virtual void Resize(); - virtual void RebuildLayout( const GUIHelpers::eLayout& layout ); + virtual void RebuildLayout( const GUIHelpers::eLayout layout ); virtual void RePos(); virtual void RebuildPos(); @@ -105,7 +105,7 @@ namespace GUIEngine { std::vector& getChildren(); private: - void Rebuild( cWindow* const parent, const GUIHelpers::eLayout& layout ); + void Rebuild( cWindow* const parent, const GUIHelpers::eLayout layout ); void AddSize( const int x, const int y, GUIHelpers::Size& mySize ) const; diff --git a/TrooperEngineTest/xml/test.bmp b/TrooperEngineTest/xml/test.bmp index e696a608dc124fa778c9d475b0189a66ff78e942..c66ec80aaa7b9ce48b0ef562d5f2dd4ec6ba6396 100644 GIT binary patch delta 60 zcmX?gg1PHHvx<{%*Lwyqr~;BXKpX|ctALo1L4ko8NDI857$~yQV$#{o_k