From 2c9e58763b15c193436fa1dd4f2e451716dc536d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Tue, 18 Aug 2020 01:24:49 -0300 Subject: [PATCH] Fixed FileInfo::isHidden. clang formated files. --- include/eepp/audio/soundfilewriter.hpp | 2 +- include/eepp/audio/soundmanager.hpp | 4 +- include/eepp/core/string.hpp | 4 +- include/eepp/graphics/scrollparallax.hpp | 10 +-- include/eepp/graphics/texturepacker.hpp | 18 ++--- include/eepp/math/interpolation1d.hpp | 2 +- include/eepp/math/perlinnoise.hpp | 6 +- include/eepp/network/http.hpp | 2 +- include/eepp/physics/physicsmanager.hpp | 10 +-- include/eepp/scene/scenemanager.hpp | 2 +- include/eepp/system/inifile.hpp | 2 +- include/eepp/system/packmanager.hpp | 20 ++--- .../eepp/thirdparty/PlusCallback/callback.hpp | 80 +++++++++---------- include/eepp/ui/css/drawableimageparser.hpp | 4 +- include/eepp/ui/doc/textdocumentline.hpp | 2 +- include/eepp/ui/doc/textrange.hpp | 8 +- include/eepp/ui/models/itemlistmodel.hpp | 2 +- .../eepp/ui/models/modeleditingdelegate.hpp | 2 +- include/eepp/ui/tools/textureatlaseditor.hpp | 2 +- include/eepp/ui/uiscrollview.hpp | 2 +- include/eepp/ui/uislider.hpp | 2 +- include/eepp/ui/uitextview.hpp | 1 + include/eepp/window/inputevent.hpp | 6 +- include/eepp/window/inputtextbuffer.hpp | 3 +- include/eepp/window/window.hpp | 2 +- projects/linux/ee.creator.user | 2 +- src/eepp/graphics/globaltextureatlas.cpp | 3 +- src/eepp/graphics/texturepacker.cpp | 8 +- .../maps/mapeditor/maplayerproperties.hpp | 2 +- .../maps/mapeditor/mapobjectproperties.hpp | 2 +- src/eepp/maps/mapeditor/tilemapproperties.hpp | 2 +- src/eepp/scene/actions/spawn.cpp | 2 +- src/eepp/system/filesystem.cpp | 4 +- src/eepp/system/lua-str.cpp | 2 +- src/eepp/system/platform/platformimpl.hpp | 8 +- src/eepp/ui/css/mediaquery.cpp | 9 +-- src/eepp/ui/css/stylesheetspecification.cpp | 11 ++- src/eepp/ui/tools/textureatlaseditor.cpp | 4 +- src/eepp/ui/tools/textureatlasnew.cpp | 4 +- src/eepp/ui/tools/textureatlasnew.hpp | 8 +- src/eepp/ui/uidropdownlist.cpp | 6 +- src/eepp/ui/uimenubar.cpp | 2 +- src/eepp/ui/uimenusubmenu.cpp | 2 +- src/eepp/ui/uiselectbutton.cpp | 2 +- src/eepp/ui/uisplitter.cpp | 22 +++-- src/eepp/ui/uisprite.cpp | 9 ++- src/eepp/ui/uitextinput.cpp | 11 +-- src/eepp/ui/uitextinputpassword.cpp | 10 +-- src/eepp/ui/uitextureregion.cpp | 10 +-- src/eepp/ui/uitextview.cpp | 5 +- src/eepp/ui/uitooltip.cpp | 5 +- .../backend/SDL2/displaymanagersdl2.cpp | 12 +-- .../backend/SDL2/displaymanagersdl2.hpp | 4 +- src/eepp/window/backend/SDL2/windowsdl2.cpp | 4 +- src/eepp/window/backend/SDL2/wminfo.cpp | 2 +- src/tests/ui_perf_test/ui_perf_test.cpp | 10 +-- src/tools/texturepacker/texturepacker.cpp | 3 +- 57 files changed, 186 insertions(+), 202 deletions(-) diff --git a/include/eepp/audio/soundfilewriter.hpp b/include/eepp/audio/soundfilewriter.hpp index ffc64d791..4bf7f750e 100644 --- a/include/eepp/audio/soundfilewriter.hpp +++ b/include/eepp/audio/soundfilewriter.hpp @@ -65,7 +65,7 @@ class EE_API SoundFileWriter { /// } /// /// virtual bool open(const std::string& filename, unsigned int sampleRate, unsigned int -///channelCount) +/// channelCount) /// { /// // open the file 'filename' for writing, /// // write the given sample rate and channel count to the file header diff --git a/include/eepp/audio/soundmanager.hpp b/include/eepp/audio/soundmanager.hpp index fd399c274..b378a8a4f 100644 --- a/include/eepp/audio/soundmanager.hpp +++ b/include/eepp/audio/soundmanager.hpp @@ -41,7 +41,7 @@ template class tSoundManager { SoundBuffer& getBuffer( const T& id ); /** Play the sound. This method will open a new channel if the channel seted for the sound is - *already playing. * @param id The sound id to play */ + *already playing. * @param id The sound id to play */ Sound* play( const T& id ); /** Remove a sound from the sound manager. @@ -52,7 +52,7 @@ template class tSoundManager { Sound& operator[]( const T& id ); /** @brief Search for the sound id, and return a sound that is not playing, if all the sounds - *are playing, creates a new sound. * @return The sound */ + *are playing, creates a new sound. * @return The sound */ Sound& getFreeSound( const T& id ); ~tSoundManager(); diff --git a/include/eepp/core/string.hpp b/include/eepp/core/string.hpp index 48b725527..d94e243db 100644 --- a/include/eepp/core/string.hpp +++ b/include/eepp/core/string.hpp @@ -40,8 +40,8 @@ class EE_API String { static const OccTable createOccTable( const unsigned char* needle, size_t needleLength ); /** @returns haystackLength if not found, otherwise the position */ - static size_t search( const unsigned char* haystack, size_t haystackLength, const unsigned char* needle, - const size_t needleLength, + static size_t search( const unsigned char* haystack, size_t haystackLength, + const unsigned char* needle, const size_t needleLength, const OccTable& occ ); /** @returns -1 if not found otherwise the position */ diff --git a/include/eepp/graphics/scrollparallax.hpp b/include/eepp/graphics/scrollparallax.hpp index 21c5e4ce4..f325301ac 100644 --- a/include/eepp/graphics/scrollparallax.hpp +++ b/include/eepp/graphics/scrollparallax.hpp @@ -11,11 +11,11 @@ using namespace EE::System; namespace EE { namespace Graphics { /** @brief The scroll parallax renders a TextureRegion to the screen from a position and a size -*specified. If the size is bigger than the TextureRegion, the TextureRegion is rendered as a -*repeated TextureRegion until it covers all the size of the parallax, adding movement to more than -*one Scroll Parallax will generate the ilusion of depth. * More info in wikipedia: -*http://en.wikipedia.org/wiki/Parallax_scrolling -*/ + *specified. If the size is bigger than the TextureRegion, the TextureRegion is rendered as a + *repeated TextureRegion until it covers all the size of the parallax, adding movement to more than + *one Scroll Parallax will generate the ilusion of depth. * More info in wikipedia: + *http://en.wikipedia.org/wiki/Parallax_scrolling + */ class EE_API ScrollParallax { public: ScrollParallax(); diff --git a/include/eepp/graphics/texturepacker.hpp b/include/eepp/graphics/texturepacker.hpp index 0be4b2c19..8614d7070 100644 --- a/include/eepp/graphics/texturepacker.hpp +++ b/include/eepp/graphics/texturepacker.hpp @@ -70,13 +70,11 @@ class EE_API TexturePacker { *is not compatible with eepp ( since it can't flip the textures back to the original *orientation ). So avoid it for eepp. */ - static TexturePacker* - New( const Uint32& maxWidth, const Uint32& maxHeight, - const Float& pixelDensity = 1, - const bool& forcePowOfTwo = true, const bool& scalableSVG = false, - const Uint32& pixelBorder = 2, - const Texture::Filter& textureFilter = Texture::Filter::Linear, - const bool& allowChilds = false, const bool& allowFlipping = false ); + static TexturePacker* New( const Uint32& maxWidth, const Uint32& maxHeight, + const Float& pixelDensity = 1, const bool& forcePowOfTwo = true, + const bool& scalableSVG = false, const Uint32& pixelBorder = 2, + const Texture::Filter& textureFilter = Texture::Filter::Linear, + const bool& allowChilds = false, const bool& allowFlipping = false ); /** Creates a new texture packer ( you will need to call SetOptions before adding any texture or * image ). */ @@ -102,8 +100,7 @@ class EE_API TexturePacker { *is not compatible with eepp ( since it can't flip the textures back to the original *orientation ). So avoid it for eepp. */ - TexturePacker( const Uint32& maxWidth, const Uint32& maxHeight, - const Float& pixelDensity = 1, + TexturePacker( const Uint32& maxWidth, const Uint32& maxHeight, const Float& pixelDensity = 1, const bool& forcePowOfTwo = true, const bool& scalableSVG = false, const Uint32& pixelBorder = 2, const Texture::Filter& textureFilter = Texture::Filter::Linear, @@ -168,8 +165,7 @@ class EE_API TexturePacker { *is not compatible with eepp ( since it can't flip the textures back to the original *orientation ). So avoid it for eepp. */ - void setOptions( const Uint32& maxWidth, const Uint32& maxHeight, - const Float& pixelDensity = 1, + void setOptions( const Uint32& maxWidth, const Uint32& maxHeight, const Float& pixelDensity = 1, const bool& forcePowOfTwo = true, const bool& scalableSVG = false, const Uint32& pixelBorder = 2, const Texture::Filter& textureFilter = Texture::Filter::Linear, diff --git a/include/eepp/math/interpolation1d.hpp b/include/eepp/math/interpolation1d.hpp index 7b1751ae0..52b3f7a7c 100644 --- a/include/eepp/math/interpolation1d.hpp +++ b/include/eepp/math/interpolation1d.hpp @@ -143,7 +143,7 @@ class EE_API Interpolation1d { /** @return The current progress porcentage of the current interpolation. * This is the partial progress, not the global of the whole interpolation. - */ + */ Float getPartialCurrentProgress(); protected: diff --git a/include/eepp/math/perlinnoise.hpp b/include/eepp/math/perlinnoise.hpp index f366da637..c1736b682 100644 --- a/include/eepp/math/perlinnoise.hpp +++ b/include/eepp/math/perlinnoise.hpp @@ -12,9 +12,9 @@ And for the C++ implementation of Henrik Krysell. namespace EE { namespace Math { /** @brief Perlin noise can be used to generate gradients, textures and effects. For more -*information go to http://en.wikipedia.org/wiki/Perlin_noise * To get a better understanding of -*the variables to generate the noise, visit -*http://freespace.virgin.net/hugo.elias/models/m_perlin.htm */ + *information go to http://en.wikipedia.org/wiki/Perlin_noise * To get a better understanding of + *the variables to generate the noise, visit + *http://freespace.virgin.net/hugo.elias/models/m_perlin.htm */ class EE_API PerlinNoise { public: PerlinNoise(); diff --git a/include/eepp/network/http.hpp b/include/eepp/network/http.hpp index 382f00ce6..ab8db51b9 100644 --- a/include/eepp/network/http.hpp +++ b/include/eepp/network/http.hpp @@ -171,7 +171,7 @@ class EE_API Http : NonCopyable { ///< target resource. Patch, ///< The PATCH method is used to apply partial modifications to a resource. Connect ///< The CONNECT method starts two-way communications with the requested - ///< resource. It can be used to open a tunnel. + ///< resource. It can be used to open a tunnel. }; /** @brief Enumerate the available states for a request */ diff --git a/include/eepp/physics/physicsmanager.hpp b/include/eepp/physics/physicsmanager.hpp index 37210aa13..45121e6d7 100644 --- a/include/eepp/physics/physicsmanager.hpp +++ b/include/eepp/physics/physicsmanager.hpp @@ -41,11 +41,11 @@ class EE_API PhysicsManager { ~PhysicsManager(); /** The Memory Manager will keep track of all the allocations from Space, Body, Shape and - *Constraint and will release any non-released pointer. - *** This is a lazy deallocation for the lazy programmers. It is disabled by default. - *** To work properly set as active before allocating anything, activate it just after the - *singleton instantiation. - */ + *Constraint and will release any non-released pointer. + *** This is a lazy deallocation for the lazy programmers. It is disabled by default. + *** To work properly set as active before allocating anything, activate it just after the + *singleton instantiation. + */ void setMemoryManager( bool memoryManager ); const bool& isMemoryManagerEnabled() const; diff --git a/include/eepp/scene/scenemanager.hpp b/include/eepp/scene/scenemanager.hpp index 77036d559..37912dba2 100644 --- a/include/eepp/scene/scenemanager.hpp +++ b/include/eepp/scene/scenemanager.hpp @@ -23,7 +23,7 @@ class EE_API SceneManager { ~SceneManager(); - SceneNode* add(SceneNode* sceneNode ); + SceneNode* add( SceneNode* sceneNode ); bool remove( SceneNode* sceneNode ); diff --git a/include/eepp/system/inifile.hpp b/include/eepp/system/inifile.hpp index bbb564868..2664549bf 100644 --- a/include/eepp/system/inifile.hpp +++ b/include/eepp/system/inifile.hpp @@ -211,7 +211,7 @@ class EE_API IniFile { /** Delete all header comments. */ void deleteHeaderComments() { mComments.clear(); } - std::map getKeyMap( const unsigned & keyID ) const; + std::map getKeyMap( const unsigned& keyID ) const; std::map getKeyMap( const std::string& keyname ) const; diff --git a/include/eepp/system/packmanager.hpp b/include/eepp/system/packmanager.hpp index 4121a7c3d..ed71c3d27 100644 --- a/include/eepp/system/packmanager.hpp +++ b/include/eepp/system/packmanager.hpp @@ -17,8 +17,8 @@ class EE_API PackManager : protected Container { virtual ~PackManager(); /** @brief Searchs for the filepath in the packs, if the file is found it will return the pack - *that belongs to. * @return The pack where the file exists. If the file is not found, returns - *NULL. * @param path The file path to search. */ + *that belongs to. * @return The pack where the file exists. If the file is not found, + *returns NULL. * @param path The file path to search. */ Pack* exists( std::string& path ); /** @brief Search for a pack by its path. @@ -30,14 +30,14 @@ class EE_API PackManager : protected Container { const bool& isFallbackToPacksActive() const; /** @brief Sets if the files that failed to be loaded from the file system should try to be - *loaded from the currently open packs. - ** For example if you try to load a texture from the file system a fails it will search the - *same path in the opened packs, and load it from there. * - *TextureFactory::instance()->loadFromFile( "mytexture.png" ); - ** If the file is not in the file system, it will be searched in the opened packs, and - *loaded if is found. * In case that the process path is appended to the path... like - *Sys::GetProcessPath() + "mytexture.png", the process path will be removed from the file path. - */ + *loaded from the currently open packs. + ** For example if you try to load a texture from the file system a fails it will search the + *same path in the opened packs, and load it from there. * + *TextureFactory::instance()->loadFromFile( "mytexture.png" ); + ** If the file is not in the file system, it will be searched in the opened packs, and + *loaded if is found. * In case that the process path is appended to the path... like + *Sys::GetProcessPath() + "mytexture.png", the process path will be removed from the file path. + */ void setFallbackToPacks( const bool& fallback ); protected: diff --git a/include/eepp/thirdparty/PlusCallback/callback.hpp b/include/eepp/thirdparty/PlusCallback/callback.hpp index 1e368cf6c..0ac84483b 100644 --- a/include/eepp/thirdparty/PlusCallback/callback.hpp +++ b/include/eepp/thirdparty/PlusCallback/callback.hpp @@ -59,8 +59,8 @@ template class Callback0 { public: /// Constructs the callback to a specific object and member function. ///\param object Pointer to the object to call upon. Care should be taken that this object - ///remains valid as long as the callback may be invoked. \param function Member function address - ///to call. + /// remains valid as long as the callback may be invoked. \param function Member function + /// address to call. template Callback0( C* object, R ( C::*function )() ) : mCallback( new ( &mMem ) ChildMethod( object, function ) ) {} @@ -93,8 +93,8 @@ template class Callback0 { /// Sets the callback to a specific object and member function. ///\param object Pointer to the object to call upon. Care should be taken that this object - ///remains valid as long as the callback may be invoked. \param function Member function address - ///to call. + /// remains valid as long as the callback may be invoked. \param function Member function + /// address to call. template void Reset( C* object, R ( C::*function )() ) { mCallback = new ( &mMem ) ChildMethod( object, function ); } @@ -240,8 +240,8 @@ template class Callback1 { public: /// Constructs the callback to a specific object and member function. ///\param object Pointer to the object to call upon. Care should be taken that this object - ///remains valid as long as the callback may be invoked. \param function Member function address - ///to call. + /// remains valid as long as the callback may be invoked. \param function Member function + /// address to call. template Callback1( C* object, R ( C::*function )( T0 t0 ) ) : mCallback( new ( &mMem ) ChildMethod( object, function ) ) {} @@ -274,8 +274,8 @@ template class Callback1 { /// Sets the callback to a specific object and member function. ///\param object Pointer to the object to call upon. Care should be taken that this object - ///remains valid as long as the callback may be invoked. \param function Member function address - ///to call. + /// remains valid as long as the callback may be invoked. \param function Member function + /// address to call. template void Reset( C* object, R ( C::*function )( T0 t0 ) ) { mCallback = new ( &mMem ) ChildMethod( object, function ); } @@ -422,8 +422,8 @@ template class Callback2 { public: /// Constructs the callback to a specific object and member function. ///\param object Pointer to the object to call upon. Care should be taken that this object - ///remains valid as long as the callback may be invoked. \param function Member function address - ///to call. + /// remains valid as long as the callback may be invoked. \param function Member function + /// address to call. template Callback2( C* object, R ( C::*function )( T0 t0, T1 t1 ) ) : mCallback( new ( &mMem ) ChildMethod( object, function ) ) {} @@ -457,8 +457,8 @@ template class Callback2 { /// Sets the callback to a specific object and member function. ///\param object Pointer to the object to call upon. Care should be taken that this object - ///remains valid as long as the callback may be invoked. \param function Member function address - ///to call. + /// remains valid as long as the callback may be invoked. \param function Member function + /// address to call. template void Reset( C* object, R ( C::*function )( T0 t0, T1 t1 ) ) { mCallback = new ( &mMem ) ChildMethod( object, function ); } @@ -609,8 +609,8 @@ template class Callback3 { public: /// Constructs the callback to a specific object and member function. ///\param object Pointer to the object to call upon. Care should be taken that this object - ///remains valid as long as the callback may be invoked. \param function Member function address - ///to call. + /// remains valid as long as the callback may be invoked. \param function Member function + /// address to call. template Callback3( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2 ) ) : mCallback( new ( &mMem ) ChildMethod( object, function ) ) {} @@ -644,8 +644,8 @@ template class Callback3 { /// Sets the callback to a specific object and member function. ///\param object Pointer to the object to call upon. Care should be taken that this object - ///remains valid as long as the callback may be invoked. \param function Member function address - ///to call. + /// remains valid as long as the callback may be invoked. \param function Member function + /// address to call. template void Reset( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2 ) ) { mCallback = new ( &mMem ) ChildMethod( object, function ); } @@ -796,8 +796,8 @@ template class public: /// Constructs the callback to a specific object and member function. ///\param object Pointer to the object to call upon. Care should be taken that this object - ///remains valid as long as the callback may be invoked. \param function Member function address - ///to call. + /// remains valid as long as the callback may be invoked. \param function Member function + /// address to call. template Callback4( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2, T3 t3 ) ) : mCallback( new ( &mMem ) ChildMethod( object, function ) ) {} @@ -831,8 +831,8 @@ template class /// Sets the callback to a specific object and member function. ///\param object Pointer to the object to call upon. Care should be taken that this object - ///remains valid as long as the callback may be invoked. \param function Member function address - ///to call. + /// remains valid as long as the callback may be invoked. \param function Member function + /// address to call. template void Reset( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2, T3 t3 ) ) { mCallback = new ( &mMem ) ChildMethod( object, function ); @@ -987,8 +987,8 @@ class Callback5 { public: /// Constructs the callback to a specific object and member function. ///\param object Pointer to the object to call upon. Care should be taken that this object - ///remains valid as long as the callback may be invoked. \param function Member function address - ///to call. + /// remains valid as long as the callback may be invoked. \param function Member function + /// address to call. template Callback5( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2, T3 t3, T4 t4 ) ) : mCallback( new ( &mMem ) ChildMethod( object, function ) ) {} @@ -1022,8 +1022,8 @@ class Callback5 { /// Sets the callback to a specific object and member function. ///\param object Pointer to the object to call upon. Care should be taken that this object - ///remains valid as long as the callback may be invoked. \param function Member function address - ///to call. + /// remains valid as long as the callback may be invoked. \param function Member function + /// address to call. template void Reset( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2, T3 t3, T4 t4 ) ) { mCallback = new ( &mMem ) ChildMethod( object, function ); @@ -1181,8 +1181,8 @@ class Callback6 { public: /// Constructs the callback to a specific object and member function. ///\param object Pointer to the object to call upon. Care should be taken that this object - ///remains valid as long as the callback may be invoked. \param function Member function address - ///to call. + /// remains valid as long as the callback may be invoked. \param function Member function + /// address to call. template Callback6( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5 ) ) : mCallback( new ( &mMem ) ChildMethod( object, function ) ) {} @@ -1216,8 +1216,8 @@ class Callback6 { /// Sets the callback to a specific object and member function. ///\param object Pointer to the object to call upon. Care should be taken that this object - ///remains valid as long as the callback may be invoked. \param function Member function address - ///to call. + /// remains valid as long as the callback may be invoked. \param function Member function + /// address to call. template void Reset( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5 ) ) { mCallback = new ( &mMem ) ChildMethod( object, function ); @@ -1379,8 +1379,8 @@ class Callback7 { public: /// Constructs the callback to a specific object and member function. ///\param object Pointer to the object to call upon. Care should be taken that this object - ///remains valid as long as the callback may be invoked. \param function Member function address - ///to call. + /// remains valid as long as the callback may be invoked. \param function Member function + /// address to call. template Callback7( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6 ) ) : mCallback( new ( &mMem ) ChildMethod( object, function ) ) {} @@ -1414,8 +1414,8 @@ class Callback7 { /// Sets the callback to a specific object and member function. ///\param object Pointer to the object to call upon. Care should be taken that this object - ///remains valid as long as the callback may be invoked. \param function Member function address - ///to call. + /// remains valid as long as the callback may be invoked. \param function Member function + /// address to call. template void Reset( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6 ) ) { mCallback = new ( &mMem ) ChildMethod( object, function ); @@ -1579,8 +1579,8 @@ class Callback8 { public: /// Constructs the callback to a specific object and member function. ///\param object Pointer to the object to call upon. Care should be taken that this object - ///remains valid as long as the callback may be invoked. \param function Member function address - ///to call. + /// remains valid as long as the callback may be invoked. \param function Member function + /// address to call. template Callback8( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7 ) ) : @@ -1615,8 +1615,8 @@ class Callback8 { /// Sets the callback to a specific object and member function. ///\param object Pointer to the object to call upon. Care should be taken that this object - ///remains valid as long as the callback may be invoked. \param function Member function address - ///to call. + /// remains valid as long as the callback may be invoked. \param function Member function + /// address to call. template void Reset( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7 ) ) { @@ -1781,8 +1781,8 @@ class Callback9 { public: /// Constructs the callback to a specific object and member function. ///\param object Pointer to the object to call upon. Care should be taken that this object - ///remains valid as long as the callback may be invoked. \param function Member function address - ///to call. + /// remains valid as long as the callback may be invoked. \param function Member function + /// address to call. template Callback9( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8 ) ) : @@ -1817,8 +1817,8 @@ class Callback9 { /// Sets the callback to a specific object and member function. ///\param object Pointer to the object to call upon. Care should be taken that this object - ///remains valid as long as the callback may be invoked. \param function Member function address - ///to call. + /// remains valid as long as the callback may be invoked. \param function Member function + /// address to call. template void Reset( C* object, R ( C::*function )( T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8 ) ) { diff --git a/include/eepp/ui/css/drawableimageparser.hpp b/include/eepp/ui/css/drawableimageparser.hpp index a252aac9f..5e9160a45 100644 --- a/include/eepp/ui/css/drawableimageparser.hpp +++ b/include/eepp/ui/css/drawableimageparser.hpp @@ -20,8 +20,8 @@ using namespace EE::System; namespace EE { namespace UI { namespace CSS { -typedef std::function +typedef std::function DrawableImageParserFunc; class EE_API DrawableImageParser { diff --git a/include/eepp/ui/doc/textdocumentline.hpp b/include/eepp/ui/doc/textdocumentline.hpp index d48bd44fa..83912871f 100644 --- a/include/eepp/ui/doc/textdocumentline.hpp +++ b/include/eepp/ui/doc/textdocumentline.hpp @@ -62,6 +62,6 @@ class EE_API TextDocumentLine { void updateHash() { mHash = mText.getHash(); } }; -}}} +}}} // namespace EE::UI::Doc #endif // EE_UI_DOC_TEXTDOCUMENTLINE_HPP diff --git a/include/eepp/ui/doc/textrange.hpp b/include/eepp/ui/doc/textrange.hpp index ac01a4d31..72fe969b7 100644 --- a/include/eepp/ui/doc/textrange.hpp +++ b/include/eepp/ui/doc/textrange.hpp @@ -54,13 +54,9 @@ class EE_API TextRange { return true; } - bool hasSelection() const { - return isValid() && mStart != mEnd; - } + bool hasSelection() const { return isValid() && mStart != mEnd; } - bool inSameLine() const { - return isValid() && mStart.line() == mEnd.line(); - } + bool inSameLine() const { return isValid() && mStart.line() == mEnd.line(); } std::string toString() { return String::format( "%s - %s", mStart.toString().c_str(), mEnd.toString().c_str() ); diff --git a/include/eepp/ui/models/itemlistmodel.hpp b/include/eepp/ui/models/itemlistmodel.hpp index 5e9258fcc..7dce1217a 100644 --- a/include/eepp/ui/models/itemlistmodel.hpp +++ b/include/eepp/ui/models/itemlistmodel.hpp @@ -23,7 +23,7 @@ template class ItemListModel final : public Model { virtual Variant data( const ModelIndex& index, Role role = Role::Display ) const { if ( role == Role::Display ) - return Variant( mData[ index.row() ] ); + return Variant( mData[index.row()] ); return {}; } diff --git a/include/eepp/ui/models/modeleditingdelegate.hpp b/include/eepp/ui/models/modeleditingdelegate.hpp index 6205aa61a..5b3ea5f6e 100644 --- a/include/eepp/ui/models/modeleditingdelegate.hpp +++ b/include/eepp/ui/models/modeleditingdelegate.hpp @@ -43,6 +43,6 @@ class EE_API ModelEditingDelegate { UIWidget* mWidget; }; -}}} // namespace EE::UI::Model +}}} // namespace EE::UI::Models #endif // EE_UI_MODELEDITINGDELEGATE_HPP diff --git a/include/eepp/ui/tools/textureatlaseditor.hpp b/include/eepp/ui/tools/textureatlaseditor.hpp index 05d9ed0d5..ce36f73cc 100644 --- a/include/eepp/ui/tools/textureatlaseditor.hpp +++ b/include/eepp/ui/tools/textureatlaseditor.hpp @@ -9,9 +9,9 @@ #include #include #include +#include #include #include -#include namespace EE { namespace UI { namespace Tools { diff --git a/include/eepp/ui/uiscrollview.hpp b/include/eepp/ui/uiscrollview.hpp index 241635f13..3fe67bb30 100644 --- a/include/eepp/ui/uiscrollview.hpp +++ b/include/eepp/ui/uiscrollview.hpp @@ -59,7 +59,7 @@ class EE_API UIScrollView : public UITouchDraggableWidget { virtual void onAlphaChange(); - virtual void onChildCountChange( Node * child, const bool& removed ); + virtual void onChildCountChange( Node* child, const bool& removed ); virtual void onPaddingChange(); diff --git a/include/eepp/ui/uislider.hpp b/include/eepp/ui/uislider.hpp index ccba994c6..b887a9334 100644 --- a/include/eepp/ui/uislider.hpp +++ b/include/eepp/ui/uislider.hpp @@ -102,7 +102,7 @@ class EE_API UISlider : public UIWidget { virtual void onPaddingChange(); - virtual Uint32 onMouseDown( const Vector2i& position, const Uint32& flags );; + virtual Uint32 onMouseDown( const Vector2i& position, const Uint32& flags ); void fixSliderPos(); diff --git a/include/eepp/ui/uitextview.hpp b/include/eepp/ui/uitextview.hpp index de38eacc1..52b56dfb4 100644 --- a/include/eepp/ui/uitextview.hpp +++ b/include/eepp/ui/uitextview.hpp @@ -87,6 +87,7 @@ class EE_API UITextView : public UIWidget { const Uint32& propertyIndex = 0 ); void setTextAlign( const Uint32& align ); + protected: Text* mTextCache; String mString; diff --git a/include/eepp/window/inputevent.hpp b/include/eepp/window/inputevent.hpp index e4cfce963..422584094 100644 --- a/include/eepp/window/inputevent.hpp +++ b/include/eepp/window/inputevent.hpp @@ -41,9 +41,9 @@ class InputEvent { struct KeySym { Scancode scancode; /**< physical key code - see ::Scancode for details */ - Keycode sym; /**< virtual key code - see ::Keycode for details */ - Uint32 mod; /** current key modifiers */ - Uint32 unicode; /** translated character */ + Keycode sym; /**< virtual key code - see ::Keycode for details */ + Uint32 mod; /** current key modifiers */ + Uint32 unicode; /** translated character */ }; /** Application visibility event structure */ diff --git a/include/eepp/window/inputtextbuffer.hpp b/include/eepp/window/inputtextbuffer.hpp index 7850274a7..22cc15a37 100644 --- a/include/eepp/window/inputtextbuffer.hpp +++ b/include/eepp/window/inputtextbuffer.hpp @@ -141,6 +141,7 @@ class EE_API InputTextBuffer { void setSelectionChangeCallback( const SelectionChangeCallback& selectionChangeCallback ); void selectAll(); + protected: enum Flags { SUPPORT_NEW_LINE = 0, @@ -188,7 +189,7 @@ class EE_API InputTextBuffer { bool isIgnoredChar( const String::StringBaseType& c ); - bool validChar(const String::StringBaseType& c ); + bool validChar( const String::StringBaseType& c ); void tryAddChar( const String::StringBaseType& c ); diff --git a/include/eepp/window/window.hpp b/include/eepp/window/window.hpp index 651016f3c..ce06c59c4 100644 --- a/include/eepp/window/window.hpp +++ b/include/eepp/window/window.hpp @@ -460,7 +460,7 @@ class EE_API Window { const Sizei& getLastWindowedSize() const; - protected: + protected: friend class Engine; friend class Input; diff --git a/projects/linux/ee.creator.user b/projects/linux/ee.creator.user index 27d8c0d51..01630547a 100644 --- a/projects/linux/ee.creator.user +++ b/projects/linux/ee.creator.user @@ -1,6 +1,6 @@ - + EnvironmentId diff --git a/src/eepp/graphics/globaltextureatlas.cpp b/src/eepp/graphics/globaltextureatlas.cpp index d363c91a7..94f63ee7e 100644 --- a/src/eepp/graphics/globaltextureatlas.cpp +++ b/src/eepp/graphics/globaltextureatlas.cpp @@ -7,7 +7,6 @@ SINGLETON_DECLARE_IMPLEMENTATION( GlobalTextureAtlas ) GlobalTextureAtlas::GlobalTextureAtlas() : TextureAtlas( "global" ) {} -GlobalTextureAtlas::~GlobalTextureAtlas() { -} +GlobalTextureAtlas::~GlobalTextureAtlas() {} }} // namespace EE::Graphics diff --git a/src/eepp/graphics/texturepacker.cpp b/src/eepp/graphics/texturepacker.cpp index 2f81e4cbc..7bb0e0de7 100644 --- a/src/eepp/graphics/texturepacker.cpp +++ b/src/eepp/graphics/texturepacker.cpp @@ -16,8 +16,8 @@ TexturePacker* TexturePacker::New() { TexturePacker* TexturePacker::New( const Uint32& maxWidth, const Uint32& maxHeight, const Float& pixelDensity, const bool& forcePowOfTwo, const bool& scalableSVG, const Uint32& pixelBorder, - const Texture::Filter& textureFilter, - const bool& allowChilds, const bool& allowFlipping ) { + const Texture::Filter& textureFilter, const bool& allowChilds, + const bool& allowFlipping ) { return eeNew( TexturePacker, ( maxWidth, maxHeight, pixelDensity, forcePowOfTwo, scalableSVG, pixelBorder, textureFilter, allowChilds, allowFlipping ) ); } @@ -136,8 +136,8 @@ Uint32 TexturePacker::getAtlasNumChannels() { void TexturePacker::setOptions( const Uint32& maxWidth, const Uint32& maxHeight, const Float& pixelDensity, const bool& forcePowOfTwo, const bool& scalableSVG, const Uint32& pixelBorder, - const Texture::Filter& textureFilter, - const bool& allowChilds, const bool& allowFlipping ) { + const Texture::Filter& textureFilter, const bool& allowChilds, + const bool& allowFlipping ) { if ( !mTextures.size() ) { // only can change the dimensions before adding any texture mMaxSize.x = maxWidth; mMaxSize.y = maxHeight; diff --git a/src/eepp/maps/mapeditor/maplayerproperties.hpp b/src/eepp/maps/mapeditor/maplayerproperties.hpp index 77a773954..cc0c5fdd2 100644 --- a/src/eepp/maps/mapeditor/maplayerproperties.hpp +++ b/src/eepp/maps/mapeditor/maplayerproperties.hpp @@ -4,8 +4,8 @@ #include #include #include -#include #include +#include #include using namespace EE::UI; diff --git a/src/eepp/maps/mapeditor/mapobjectproperties.hpp b/src/eepp/maps/mapeditor/mapobjectproperties.hpp index cc5441d89..9958416a1 100644 --- a/src/eepp/maps/mapeditor/mapobjectproperties.hpp +++ b/src/eepp/maps/mapeditor/mapobjectproperties.hpp @@ -4,8 +4,8 @@ #include #include #include -#include #include +#include #include using namespace EE::UI; diff --git a/src/eepp/maps/mapeditor/tilemapproperties.hpp b/src/eepp/maps/mapeditor/tilemapproperties.hpp index 6682e31f8..732488de7 100644 --- a/src/eepp/maps/mapeditor/tilemapproperties.hpp +++ b/src/eepp/maps/mapeditor/tilemapproperties.hpp @@ -4,8 +4,8 @@ #include #include #include -#include #include +#include #include using namespace EE::UI; diff --git a/src/eepp/scene/actions/spawn.cpp b/src/eepp/scene/actions/spawn.cpp index dd1c7a9bd..8eb4c7df8 100644 --- a/src/eepp/scene/actions/spawn.cpp +++ b/src/eepp/scene/actions/spawn.cpp @@ -98,7 +98,7 @@ Time Spawn::getTotalTime() { max = eemax( max, spawn->getTotalTime().asMicroseconds() ); } - return Microseconds(max); + return Microseconds( max ); } Action* Spawn::clone() const { diff --git a/src/eepp/system/filesystem.cpp b/src/eepp/system/filesystem.cpp index 03e218bef..2556db76d 100644 --- a/src/eepp/system/filesystem.cpp +++ b/src/eepp/system/filesystem.cpp @@ -233,10 +233,10 @@ bool FileSystem::fileCanWrite( const std::string& filepath ) { bool FileSystem::fileIsHidden( const std::string& filepath ) { #if EE_PLATFORM == EE_PLATFORM_WIN #if UNICODE - return 0 == ( GetFileAttributes( String::fromUtf8( filepath ).toWideString().c_str() ) & + return 0 != ( GetFileAttributes( String::fromUtf8( filepath ).toWideString().c_str() ) & FILE_ATTRIBUTE_HIDDEN ); #else - return 0 == ( GetFileAttributes( (LPCTSTR)filepath.c_str() ) & FILE_ATTRIBUTE_HIDDEN ); + return 0 != ( GetFileAttributes( (LPCTSTR)filepath.c_str() ) & FILE_ATTRIBUTE_HIDDEN ); #endif #else std::string filename( fileNameFromPath( filepath ) ); diff --git a/src/eepp/system/lua-str.cpp b/src/eepp/system/lua-str.cpp index 17a3d4fb7..92bdd1de5 100644 --- a/src/eepp/system/lua-str.cpp +++ b/src/eepp/system/lua-str.cpp @@ -363,7 +363,7 @@ init: /* using goto's to optimize tail recursion */ } case '+': /* 1 or more repetitions */ s++; /* 1 match already done */ - /* go through */ + /* go through */ case '*': /* 0 or more repetitions */ s = max_expand( ms, s, p, ep ); break; diff --git a/src/eepp/system/platform/platformimpl.hpp b/src/eepp/system/platform/platformimpl.hpp index c9502675d..cc27edd9a 100644 --- a/src/eepp/system/platform/platformimpl.hpp +++ b/src/eepp/system/platform/platformimpl.hpp @@ -4,16 +4,16 @@ #include #if defined( EE_PLATFORM_POSIX ) -#include -#include #include #include +#include +#include #include #elif EE_PLATFORM == EE_PLATFORM_WIN -#include -#include #include #include +#include +#include #include #else #error Threads, mutexes, conditions, timers and thread local storage not implemented for this platform. diff --git a/src/eepp/ui/css/mediaquery.cpp b/src/eepp/ui/css/mediaquery.cpp index fb1b43d26..8a5ef7b9e 100644 --- a/src/eepp/ui/css/mediaquery.cpp +++ b/src/eepp/ui/css/mediaquery.cpp @@ -10,7 +10,7 @@ namespace EE { namespace UI { namespace CSS { #define MediaOrientationStrings "portrait;landscape" -#define MediaFeatureStrings \ +#define MediaFeatureStrings \ "none;width;min-width;max-width;height;min-height;max-height;device-width;min-device-" \ "width;max-device-width;device-height;min-device-height;max-device-height;orientation;" \ "aspect-ratio;min-aspect-ratio;max-aspect-ratio;device-aspect-ratio;min-device-aspect-" \ @@ -18,8 +18,7 @@ namespace EE { namespace UI { namespace CSS { "color-index;monochrome;min-monochrome;max-monochrome;resolution;min-resolution;max-" \ "resolution" -#define MediaTypeStrings \ - "none;all;screen;print;braille;embossed;handheld;projection;speech;tty;tv" +#define MediaTypeStrings "none;all;screen;print;braille;embossed;handheld;projection;speech;tty;tv" MediaQuery::MediaQuery() { mMediaType = media_type_all; @@ -56,8 +55,8 @@ MediaQuery::ptr MediaQuery::parse( const std::string& str ) { if ( !exprTokens.empty() ) { String::trimInPlace( exprTokens[0] ); - expr.feature = (MediaFeature)String::valueIndex( - exprTokens[0], MediaFeatureStrings, media_feature_none ); + expr.feature = (MediaFeature)String::valueIndex( exprTokens[0], MediaFeatureStrings, + media_feature_none ); if ( expr.feature != media_feature_none ) { if ( exprTokens.size() == 1 ) { diff --git a/src/eepp/ui/css/stylesheetspecification.cpp b/src/eepp/ui/css/stylesheetspecification.cpp index 252629278..b78ff21f4 100644 --- a/src/eepp/ui/css/stylesheetspecification.cpp +++ b/src/eepp/ui/css/stylesheetspecification.cpp @@ -432,9 +432,13 @@ void StyleSheetSpecification::registerDefaultNodeSelectors() { return NULL != node->getParent() && node->getParent()->getFirstChild() == node; }; mNodeSelectors["enabled"] = []( const UIWidget* node, int a, int b, - const FunctionString& data ) -> bool { return node->isEnabled(); }; + const FunctionString& data ) -> bool { + return node->isEnabled(); + }; mNodeSelectors["disabled"] = []( const UIWidget* node, int a, int b, - const FunctionString& data ) -> bool { return !node->isEnabled(); }; + const FunctionString& data ) -> bool { + return !node->isEnabled(); + }; mNodeSelectors["first-of-type"] = []( const UIWidget* node, int a, int b, const FunctionString& data ) -> bool { Node* child = NULL != node->getParent() ? node->getParent()->getFirstChild() : NULL; @@ -506,7 +510,8 @@ void StyleSheetSpecification::registerDefaultNodeSelectors() { const FunctionString& data ) -> bool { return 0 != ( node->getFlags() & UI_CHECKED ); }; - mNodeSelectors["not"] = []( const UIWidget* node, int a, int b, const FunctionString& data ) -> bool { + mNodeSelectors["not"] = []( const UIWidget* node, int a, int b, + const FunctionString& data ) -> bool { if ( !data.isEmpty() && !data.getParameters().empty() && data.getName() == "not" ) { for ( const auto& param : data.getParameters() ) { if ( !param.empty() ) { diff --git a/src/eepp/ui/tools/textureatlaseditor.cpp b/src/eepp/ui/tools/textureatlaseditor.cpp index 7a64c6205..217f4cdfd 100644 --- a/src/eepp/ui/tools/textureatlaseditor.cpp +++ b/src/eepp/ui/tools/textureatlaseditor.cpp @@ -333,8 +333,8 @@ void TextureAtlasEditor::onTextureFilterChange( const Event* ) { return; Texture::Filter textureFilter = mTextureFilterList->getText() == "Nearest" - ? Texture::Filter::Nearest - : Texture::Filter::Linear; + ? Texture::Filter::Nearest + : Texture::Filter::Linear; mTextureAtlasLoader->setTextureFilter( textureFilter ); } diff --git a/src/eepp/ui/tools/textureatlasnew.cpp b/src/eepp/ui/tools/textureatlasnew.cpp index 27815cec1..257c59fc6 100644 --- a/src/eepp/ui/tools/textureatlasnew.cpp +++ b/src/eepp/ui/tools/textureatlasnew.cpp @@ -164,8 +164,8 @@ void TextureAtlasNew::textureAtlasSave( const Event* Event ) { bool Res2 = String::fromString( h, mComboHeight->getText() ); b = static_cast( mPixelSpace->getValue() ); Texture::Filter textureFilter = mTextureFilter->getText() == "Nearest" - ? Texture::Filter::Nearest - : Texture::Filter::Linear; + ? Texture::Filter::Nearest + : Texture::Filter::Linear; if ( Res1 && Res2 ) { TexturePacker* texturePacker = TexturePacker::New( diff --git a/src/eepp/ui/tools/textureatlasnew.hpp b/src/eepp/ui/tools/textureatlasnew.hpp index ee7c43154..4b4d2cef2 100644 --- a/src/eepp/ui/tools/textureatlasnew.hpp +++ b/src/eepp/ui/tools/textureatlasnew.hpp @@ -30,10 +30,10 @@ class EE_API TextureAtlasNew { UIDropDownList* mSaveFileType; UIDropDownList* mPixelDensity; UIDropDownList* mTextureFilter; - UICheckBox * mForcePow2; - UICheckBox * mScalableSVG; - UICheckBox * mSaveExtensions; - UICheckBox * mAllowChilds; + UICheckBox* mForcePow2; + UICheckBox* mScalableSVG; + UICheckBox* mSaveExtensions; + UICheckBox* mAllowChilds; void windowClose( const Event* Event ); diff --git a/src/eepp/ui/uidropdownlist.cpp b/src/eepp/ui/uidropdownlist.cpp index d0eeded20..dcac7b1da 100644 --- a/src/eepp/ui/uidropdownlist.cpp +++ b/src/eepp/ui/uidropdownlist.cpp @@ -44,8 +44,7 @@ UIDropDownList::UIDropDownList( const std::string& tag ) : mListBox->addEventListener( Event::OnItemKeyDown, cb::Make1( this, &UIDropDownList::onItemKeyDown ) ); mListBox->addEventListener( Event::KeyDown, cb::Make1( this, &UIDropDownList::onItemKeyDown ) ); - mListBox->addEventListener( Event::OnClear, - cb::Make1( this, &UIDropDownList::onWidgetClear ) ); + mListBox->addEventListener( Event::OnClear, cb::Make1( this, &UIDropDownList::onWidgetClear ) ); } UIDropDownList::~UIDropDownList() { @@ -277,8 +276,7 @@ void UIDropDownList::hide() { if ( NULL != getUISceneNode() && getUISceneNode()->getUIThemeManager()->getDefaultEffectsEnabled() ) { mListBox->runAction( Actions::Sequence::New( - Actions::FadeOut::New( - getUISceneNode()->getUIThemeManager()->getWidgetsFadeOutTime() ), + Actions::FadeOut::New( getUISceneNode()->getUIThemeManager()->getWidgetsFadeOutTime() ), Actions::Spawn::New( Actions::Disable::New(), Actions::Visible::New( false ) ) ) ); } else { mListBox->setEnabled( false ); diff --git a/src/eepp/ui/uimenubar.cpp b/src/eepp/ui/uimenubar.cpp index 97a5f3424..689177fdd 100644 --- a/src/eepp/ui/uimenubar.cpp +++ b/src/eepp/ui/uimenubar.cpp @@ -74,7 +74,7 @@ void UIMenuBar::addMenuButton( const String& buttonText, UIPopUpMenu* menu ) { button->unselect(); } } ); - menu->addEventListener( Event::OnItemClicked, [&] ( const Event* ) { + menu->addEventListener( Event::OnItemClicked, [&]( const Event* ) { mWaitingUp = nullptr; mCurrentMenu = nullptr; } ); diff --git a/src/eepp/ui/uimenusubmenu.cpp b/src/eepp/ui/uimenusubmenu.cpp index 7e5986cc5..86fac9a9c 100644 --- a/src/eepp/ui/uimenusubmenu.cpp +++ b/src/eepp/ui/uimenusubmenu.cpp @@ -125,7 +125,7 @@ Uint32 UIMenuSubMenu::onMouseLeave( const Vector2i& pos, const Uint32& flags ) { } Uint32 UIMenuSubMenu::onMouseClick( const Vector2i&, const Uint32& flags ) { - if ( (flags & EE_BUTTON_LMASK) && !mSubMenu->isVisible() ) + if ( ( flags & EE_BUTTON_LMASK ) && !mSubMenu->isVisible() ) showSubMenu(); return 1; } diff --git a/src/eepp/ui/uiselectbutton.cpp b/src/eepp/ui/uiselectbutton.cpp index 37bbda397..649eeb50a 100644 --- a/src/eepp/ui/uiselectbutton.cpp +++ b/src/eepp/ui/uiselectbutton.cpp @@ -1,6 +1,6 @@ +#include #include #include -#include namespace EE { namespace UI { diff --git a/src/eepp/ui/uisplitter.cpp b/src/eepp/ui/uisplitter.cpp index 4708945fb..cee6db12b 100644 --- a/src/eepp/ui/uisplitter.cpp +++ b/src/eepp/ui/uisplitter.cpp @@ -234,8 +234,7 @@ void UISplitter::updateFromDrag() { mFirstWidget->setPixelsPosition( mPaddingPx.Left, mPaddingPx.Top ); if ( UIOrientation::Horizontal == mOrientation ) { mFirstWidget->setPixelsSize( mSplitter->getPixelsPosition().x - mPaddingPx.Left, - mSize.getHeight() - mPaddingPx.Top - - mPaddingPx.Bottom ); + mSize.getHeight() - mPaddingPx.Top - mPaddingPx.Bottom ); } else { mFirstWidget->setPixelsSize( mSize.getWidth() - mPaddingPx.Left - mPaddingPx.Right, mSplitter->getPixelsPosition().y - mPaddingPx.Top ); @@ -247,10 +246,10 @@ void UISplitter::updateFromDrag() { mLastWidget->setPixelsPosition( mSplitter->getPixelsPosition().x + mSplitter->getPixelsSize().getWidth(), mPaddingPx.Top ); - mLastWidget->setPixelsSize( - mSize.getWidth() - mPaddingPx.Right - mSplitter->getPixelsPosition().x - - mSplitter->getPixelsSize().getWidth(), - mSize.getHeight() - mPaddingPx.Top - mPaddingPx.Bottom ); + mLastWidget->setPixelsSize( mSize.getWidth() - mPaddingPx.Right - + mSplitter->getPixelsPosition().x - + mSplitter->getPixelsSize().getWidth(), + mSize.getHeight() - mPaddingPx.Top - mPaddingPx.Bottom ); } else { mLastWidget->setPixelsPosition( mPaddingPx.Left, mSplitter->getPixelsPosition().y + @@ -327,8 +326,7 @@ void UISplitter::updateLayout() { if ( mFirstWidget ) { mFirstWidget->setPixelsPosition( mPaddingPx.Left, mPaddingPx.Top ); mFirstWidget->setPixelsSize( mSize.getWidth() - mPaddingPx.Left - mPaddingPx.Right, - mSize.getHeight() - mPaddingPx.Top - - mPaddingPx.Bottom ); + mSize.getHeight() - mPaddingPx.Top - mPaddingPx.Bottom ); } mDirtyLayout = false; @@ -358,8 +356,8 @@ void UISplitter::updateLayout() { firstSplit = eemax( firstSplit, fMinSize ); secondSplit = totalSpace - firstSplit; - mFirstWidget->setPixelsSize( firstSplit, mSize.getHeight() - mPaddingPx.Top - - mPaddingPx.Bottom ); + mFirstWidget->setPixelsSize( firstSplit, + mSize.getHeight() - mPaddingPx.Top - mPaddingPx.Bottom ); mSplitter->setPixelsPosition( mFirstWidget->getPixelsPosition().x + mFirstWidget->getPixelsSize().getWidth(), @@ -389,8 +387,8 @@ void UISplitter::updateLayout() { mLastWidget->setPixelsPosition( mSplitter->getPixelsPosition().x + mSplitter->getPixelsSize().getWidth(), mPaddingPx.Top ); - mLastWidget->setPixelsSize( secondSplit, mSize.getHeight() - mPaddingPx.Top - - mPaddingPx.Bottom ); + mLastWidget->setPixelsSize( secondSplit, + mSize.getHeight() - mPaddingPx.Top - mPaddingPx.Bottom ); } else { mLastWidget->setPixelsPosition( mPaddingPx.Left, mSplitter->getPixelsPosition().y + diff --git a/src/eepp/ui/uisprite.cpp b/src/eepp/ui/uisprite.cpp index 245e813ef..2736f31e6 100644 --- a/src/eepp/ui/uisprite.cpp +++ b/src/eepp/ui/uisprite.cpp @@ -137,14 +137,15 @@ void UISprite::updateSize() { if ( NULL != mSprite->getCurrentTextureRegion() ) { if ( mWidthPolicy == SizePolicy::WrapContent ) { - setInternalPixelsWidth( mSprite->getCurrentTextureRegion()->getPixelsSize().getWidth() + - mPaddingPx.Left + mPaddingPx.Right ); + setInternalPixelsWidth( + mSprite->getCurrentTextureRegion()->getPixelsSize().getWidth() + + mPaddingPx.Left + mPaddingPx.Right ); } if ( mHeightPolicy == SizePolicy::WrapContent ) { setInternalPixelsHeight( - mSprite->getCurrentTextureRegion()->getPixelsSize().getHeight() + mPaddingPx.Top + - mPaddingPx.Bottom ); + mSprite->getCurrentTextureRegion()->getPixelsSize().getHeight() + + mPaddingPx.Top + mPaddingPx.Bottom ); } } } diff --git a/src/eepp/ui/uitextinput.cpp b/src/eepp/ui/uitextinput.cpp index 7843a8cea..05c147dfa 100644 --- a/src/eepp/ui/uitextinput.cpp +++ b/src/eepp/ui/uitextinput.cpp @@ -100,9 +100,8 @@ void UITextInput::onCursorPosChange() { void UITextInput::drawWaitingCursor() { if ( mVisible && hasFocus() && mShowingWait && mAllowEditing ) { - Vector2f cursor( - eefloor( mScreenPos.x + mRealAlignOffset.x + mCurPos.x + mPaddingPx.Left ), - mScreenPos.y + mRealAlignOffset.y + mCurPos.y + mPaddingPx.Top ); + Vector2f cursor( eefloor( mScreenPos.x + mRealAlignOffset.x + mCurPos.x + mPaddingPx.Left ), + mScreenPos.y + mRealAlignOffset.y + mCurPos.y + mPaddingPx.Top ); Primitives primitives; primitives.setColor( Color( mFontStyleConfig.FontColor ).blendAlpha( mAlpha ) ); @@ -138,8 +137,7 @@ void UITextInput::draw() { } mTextCache->setAlign( getFlags() ); - mTextCache->draw( (Float)mScreenPosi.x + (int)mRealAlignOffset.x + - (int)mPaddingPx.Left, + mTextCache->draw( (Float)mScreenPosi.x + (int)mRealAlignOffset.x + (int)mPaddingPx.Left, mFontLineCenter + (Float)mScreenPosi.y + (int)mRealAlignOffset.y + (int)mPaddingPx.Top, Vector2f::One, 0.f, getBlendMode() ); @@ -154,8 +152,7 @@ void UITextInput::draw() { mSize.getHeight() - mPaddingPx.Top - mPaddingPx.Bottom ); } - mHintCache->draw( (Float)mScreenPosi.x + (int)mRealAlignOffset.x + - (int)mPaddingPx.Left, + mHintCache->draw( (Float)mScreenPosi.x + (int)mRealAlignOffset.x + (int)mPaddingPx.Left, mFontLineCenter + (Float)mScreenPosi.y + (int)mRealAlignOffset.y + (int)mPaddingPx.Top, Vector2f::One, 0.f, getBlendMode() ); diff --git a/src/eepp/ui/uitextinputpassword.cpp b/src/eepp/ui/uitextinputpassword.cpp index b42483b00..88b65d06b 100644 --- a/src/eepp/ui/uitextinputpassword.cpp +++ b/src/eepp/ui/uitextinputpassword.cpp @@ -36,10 +36,9 @@ void UITextInputPassword::draw() { } mPassCache->setAlign( getFlags() ); - mPassCache->draw( - (Float)mScreenPosi.x + (int)mRealAlignOffset.x + (int)mPaddingPx.Left, - (Float)mScreenPosi.y + (int)mRealAlignOffset.y + (int)mPaddingPx.Top, - Vector2f::One, 0.f, getBlendMode() ); + mPassCache->draw( (Float)mScreenPosi.x + (int)mRealAlignOffset.x + (int)mPaddingPx.Left, + (Float)mScreenPosi.y + (int)mRealAlignOffset.y + (int)mPaddingPx.Top, + Vector2f::One, 0.f, getBlendMode() ); if ( isClipped() ) { clipSmartDisable(); @@ -51,8 +50,7 @@ void UITextInputPassword::draw() { mSize.getHeight() - mPaddingPx.Top - mPaddingPx.Bottom ); } - mHintCache->draw( (Float)mScreenPosi.x + (int)mHintAlignOffset.x + - (int)mPaddingPx.Left, + mHintCache->draw( (Float)mScreenPosi.x + (int)mHintAlignOffset.x + (int)mPaddingPx.Left, mFontLineCenter + (Float)mScreenPosi.y + (int)mHintAlignOffset.y + (int)mPaddingPx.Top, Vector2f::One, 0.f, getBlendMode() ); diff --git a/src/eepp/ui/uitextureregion.cpp b/src/eepp/ui/uitextureregion.cpp index ca9389fff..cdde8e623 100644 --- a/src/eepp/ui/uitextureregion.cpp +++ b/src/eepp/ui/uitextureregion.cpp @@ -56,8 +56,8 @@ void UITextureRegion::onAutoSize() { if ( mWidthPolicy == SizePolicy::WrapContent || mHeightPolicy == SizePolicy::WrapContent ) { if ( mWidthPolicy == SizePolicy::WrapContent ) { - setInternalPixelsWidth( mTextureRegion->getPixelsSize().getWidth() + mPaddingPx.Left + - mPaddingPx.Right ); + setInternalPixelsWidth( mTextureRegion->getPixelsSize().getWidth() + + mPaddingPx.Left + mPaddingPx.Right ); } if ( mHeightPolicy == SizePolicy::WrapContent ) { @@ -92,10 +92,8 @@ void UITextureRegion::draw() { mTextureRegion->setOffset( Vector2i( 0, 0 ) ); Sizef pxSize = mTextureRegion->getPixelsSize(); - Float Scale1 = - ( mSize.x - mPaddingPx.Left - mPaddingPx.Right ) / (Float)pxSize.x; - Float Scale2 = - ( mSize.y - mPaddingPx.Top - mPaddingPx.Bottom ) / (Float)pxSize.y; + Float Scale1 = ( mSize.x - mPaddingPx.Left - mPaddingPx.Right ) / (Float)pxSize.x; + Float Scale2 = ( mSize.y - mPaddingPx.Top - mPaddingPx.Bottom ) / (Float)pxSize.y; if ( Scale1 < 1 || Scale2 < 1 ) { if ( Scale2 < Scale1 ) diff --git a/src/eepp/ui/uitextview.cpp b/src/eepp/ui/uitextview.cpp index 4ea469db9..621bde976 100644 --- a/src/eepp/ui/uitextview.cpp +++ b/src/eepp/ui/uitextview.cpp @@ -84,8 +84,7 @@ void UITextView::draw() { } mTextCache->setAlign( getFlags() ); - mTextCache->draw( (Float)mScreenPosi.x + (int)mRealAlignOffset.x + - (int)mPaddingPx.Left, + mTextCache->draw( (Float)mScreenPosi.x + (int)mRealAlignOffset.x + (int)mPaddingPx.Left, mFontLineCenter + (Float)mScreenPosi.y + (int)mRealAlignOffset.y + (int)mPaddingPx.Top, Vector2f::One, 0.f, getBlendMode() ); @@ -704,7 +703,7 @@ std::string UITextView::getPropertyString( const PropertyDefinition* propertyDef } void UITextView::setTextAlign( const Uint32& align ) { - mFlags &= ~(UI_HALIGN_CENTER|UI_HALIGN_RIGHT); + mFlags &= ~( UI_HALIGN_CENTER | UI_HALIGN_RIGHT ); mFlags |= align; onAlignChange(); } diff --git a/src/eepp/ui/uitooltip.cpp b/src/eepp/ui/uitooltip.cpp index decc1df27..72aca94f5 100644 --- a/src/eepp/ui/uitooltip.cpp +++ b/src/eepp/ui/uitooltip.cpp @@ -20,7 +20,6 @@ UITooltip::UITooltip() : mTextCache = Text::New(); mEnabled = false; - UITheme* theme = getUISceneNode()->getUIThemeManager()->getDefaultTheme(); if ( NULL != theme && NULL != theme->getDefaultFont() ) { @@ -186,8 +185,8 @@ void UITooltip::autoAlign() { switch ( Font::getHorizontalAlign( getFlags() ) ) { case UI_HALIGN_CENTER: - mAlignOffset.x = mPaddingPx.Left + - ( Float )( ( Int32 )( Width - mTextCache->getTextWidth() ) / 2 ); + mAlignOffset.x = + mPaddingPx.Left + ( Float )( ( Int32 )( Width - mTextCache->getTextWidth() ) / 2 ); break; case UI_HALIGN_RIGHT: mAlignOffset.x = diff --git a/src/eepp/window/backend/SDL2/displaymanagersdl2.cpp b/src/eepp/window/backend/SDL2/displaymanagersdl2.cpp index fe3c598a8..2821c7467 100644 --- a/src/eepp/window/backend/SDL2/displaymanagersdl2.cpp +++ b/src/eepp/window/backend/SDL2/displaymanagersdl2.cpp @@ -15,8 +15,8 @@ void DisplayManagerSDL2::setDPIAwareness() { if ( DISPLAY_REQUEST_DPI_AWARENESS ) { void* user32 = Sys::loadObject( "user32.dll" ); if ( user32 ) { - int (*SetProcessDPIAware)() = - (int (*)()) Sys::loadFunction( user32, "SetProcessDPIAware" ); + int ( *SetProcessDPIAware )() = + (int ( * )())Sys::loadFunction( user32, "SetProcessDPIAware" ); if ( SetProcessDPIAware ) { SetProcessDPIAware(); DISPLAY_REQUEST_DPI_AWARENESS = false; @@ -43,9 +43,9 @@ Float DisplaySDL2::getDPI() { #if EE_PLATFORM == EE_PLATFORM_EMSCRIPTEN return 96.f * emscripten_get_device_pixel_ratio(); #else - #if EE_PLATFORM == EE_PLATFORM_WIN +#if EE_PLATFORM == EE_PLATFORM_WIN DisplayManagerSDL2::setDPIAwareness(); - #endif +#endif float ddpi, hdpi, vdpi; if ( 0 == SDL_GetDisplayDPI( 0, &ddpi, &hdpi, &vdpi ) ) return ddpi; @@ -110,9 +110,9 @@ Rect DisplaySDL2::getUsableBounds() { } int DisplayManagerSDL2::getDisplayCount() { - #if EE_PLATFORM == EE_PLATFORM_WIN +#if EE_PLATFORM == EE_PLATFORM_WIN setDPIAwareness(); - #endif +#endif if ( !SDL_WasInit( SDL_INIT_VIDEO ) ) SDL_Init( SDL_INIT_VIDEO ); return SDL_GetNumVideoDisplays(); diff --git a/src/eepp/window/backend/SDL2/displaymanagersdl2.hpp b/src/eepp/window/backend/SDL2/displaymanagersdl2.hpp index 127e9897c..171262aef 100644 --- a/src/eepp/window/backend/SDL2/displaymanagersdl2.hpp +++ b/src/eepp/window/backend/SDL2/displaymanagersdl2.hpp @@ -28,9 +28,9 @@ class EE_API DisplaySDL2 : public Display { class EE_API DisplayManagerSDL2 : public DisplayManager { public: - #if EE_PLATFORM == EE_PLATFORM_WIN +#if EE_PLATFORM == EE_PLATFORM_WIN static void setDPIAwareness(); - #endif +#endif int getDisplayCount(); diff --git a/src/eepp/window/backend/SDL2/windowsdl2.cpp b/src/eepp/window/backend/SDL2/windowsdl2.cpp index 7115eeb41..c5d93cf0c 100644 --- a/src/eepp/window/backend/SDL2/windowsdl2.cpp +++ b/src/eepp/window/backend/SDL2/windowsdl2.cpp @@ -215,9 +215,9 @@ WindowSDL::~WindowSDL() { } bool WindowSDL::create( WindowSettings Settings, ContextSettings Context ) { - #if EE_PLATFORM == EE_PLATFORM_WIN +#if EE_PLATFORM == EE_PLATFORM_WIN DisplayManagerSDL2::setDPIAwareness(); - #endif +#endif if ( mWindow.Created ) return false; diff --git a/src/eepp/window/backend/SDL2/wminfo.cpp b/src/eepp/window/backend/SDL2/wminfo.cpp index 5425ccb15..8b0cce5a5 100644 --- a/src/eepp/window/backend/SDL2/wminfo.cpp +++ b/src/eepp/window/backend/SDL2/wminfo.cpp @@ -18,7 +18,7 @@ namespace EE { namespace Window { namespace Backend { namespace SDL2 { #ifdef EE_WMINFO -WMInfo::WMInfo( SDL_Window* win ) : mWMInfo( eeMalloc( sizeof(SDL_SysWMinfo) ) ) { +WMInfo::WMInfo( SDL_Window* win ) : mWMInfo( eeMalloc( sizeof( SDL_SysWMinfo ) ) ) { SDL_SysWMinfo* info = static_cast( mWMInfo ); SDL_VERSION( &info->version ); SDL_GetWindowWMInfo( win, info ); diff --git a/src/tests/ui_perf_test/ui_perf_test.cpp b/src/tests/ui_perf_test/ui_perf_test.cpp index 149f50a1c..57850c2c7 100644 --- a/src/tests/ui_perf_test/ui_perf_test.cpp +++ b/src/tests/ui_perf_test/ui_perf_test.cpp @@ -164,8 +164,8 @@ EE_MAIN_FUNC int main( int argc, char* argv[] ) { addIcon( "tree-expanded", 0xea50 ); addIcon( "tree-contracted", 0xea54 ); addIcon( "file", 0xecc3 ); - //addIcon( "arrow-up", 0xea78 ); - //addIcon( "arrow-down", 0xea4e ); + // addIcon( "arrow-up", 0xea78 ); + // addIcon( "arrow-down", 0xea4e ); UISceneNode* uiSceneNode = UISceneNode::New(); SceneManager::instance()->add( uiSceneNode ); uiSceneNode->getUIThemeManager()->setDefaultFont( font ); @@ -194,16 +194,16 @@ EE_MAIN_FUNC int main( int argc, char* argv[] ) { Clock clock; auto model = FileSystemModel::New( "." ); // std::make_shared(); - //UITreeView* view = UITreeView::New(); + // UITreeView* view = UITreeView::New(); UITableView* view = UITableView::New(); - //view->setExpanderIconSize( PixelDensity::dpToPx( 20 ) ); + // view->setExpanderIconSize( PixelDensity::dpToPx( 20 ) ); view->setId( "treeview" ); /*view->setExpandedIcon( open ); view->setContractedIcon( closed );*/ view->setLayoutSizePolicy( SizePolicy::MatchParent, SizePolicy::MatchParent ); view->setParent( vlay ); view->setModel( SortingProxyModel::New( model ) ); - //view->setModel( model ); + // view->setModel( model ); eePRINTL( "Total time: %.2fms", clock.getElapsedTime().asMilliseconds() ); UIWindow* uiWin = UIWindow::NewOpt( UIWindow::LINEAR_LAYOUT ); diff --git a/src/tools/texturepacker/texturepacker.cpp b/src/tools/texturepacker/texturepacker.cpp index 0323cb11b..4a68b17cc 100644 --- a/src/tools/texturepacker/texturepacker.cpp +++ b/src/tools/texturepacker/texturepacker.cpp @@ -71,8 +71,7 @@ EE_MAIN_FUNC int main( int argc, char* argv[] ) { parser, "texture-filter", "Texture filter to use with the texture atlas. Available filters: \"linear\" or " "\"nearest\".", - {"texture-filter"}, textureFilterMap, Texture::Filter::Linear, - args::Options::Single ); + {"texture-filter"}, textureFilterMap, Texture::Filter::Linear, args::Options::Single ); try { parser.ParseCLI( argc, argv );