Code-style consistency improvement:

Apply clang-format-all.sh using the _clang-format file through all the cpp/.h files.
make sure not to apply it to certain serialization structures, since some parser expects the * as part of the name, instead of type.
This commit contains no other changes aside from adding and applying clang-format-all.sh
This commit is contained in:
erwincoumans
2018-09-23 14:17:31 -07:00
parent b73b05e9fb
commit ab8f16961e
1773 changed files with 1081087 additions and 474249 deletions

View File

@@ -12,96 +12,92 @@
#include "Gwen/Controls/Base.h"
#include "Gwen/InputHandler.h"
namespace Gwen
namespace Gwen
{
namespace Controls
{
class GWEN_EXPORT Canvas : public Base
{
public:
namespace Controls
{
class GWEN_EXPORT Canvas : public Base
{
public:
typedef Controls::Base BaseClass;
typedef Controls::Base BaseClass;
Canvas(Skin::Base* pSkin);
Canvas( Skin::Base* pSkin );
//
// For additional initialization
// (which is sometimes not appropriate in the constructor)
//
virtual void Initialize(){};
//
// For additional initialization
// (which is sometimes not appropriate in the constructor)
//
virtual void Initialize(){};
//
// You should call this to render your canvas.
//
virtual void RenderCanvas();
//
// You should call this to render your canvas.
//
virtual void RenderCanvas();
//
// Call this whenever you want to process input. This
// is usually once a frame..
//
virtual void DoThink();
//
// Call this whenever you want to process input. This
// is usually once a frame..
//
virtual void DoThink();
//
// In most situations you will be rendering the canvas
// every frame. But in some situations you will only want
// to render when there have been changes. You can do this
// by checking NeedsRedraw().
//
virtual bool NeedsRedraw() { return m_bNeedsRedraw; }
virtual void Redraw() { m_bNeedsRedraw = true; }
//
// In most situations you will be rendering the canvas
// every frame. But in some situations you will only want
// to render when there have been changes. You can do this
// by checking NeedsRedraw().
//
virtual bool NeedsRedraw(){ return m_bNeedsRedraw; }
virtual void Redraw(){ m_bNeedsRedraw = true; }
// Internal. Do not call directly.
virtual void Render(Skin::Base* pRender);
// Internal. Do not call directly.
virtual void Render( Skin::Base* pRender );
// Childpanels call parent->GetCanvas() until they get to
// this top level function.
virtual Controls::Canvas* GetCanvas() { return this; }
// Childpanels call parent->GetCanvas() until they get to
// this top level function.
virtual Controls::Canvas* GetCanvas(){ return this; }
virtual void SetScale(float f);
virtual float Scale() const { return m_fScale; }
virtual void SetScale( float f );
virtual float Scale() const { return m_fScale; }
virtual void OnBoundsChanged(Gwen::Rect oldBounds);
virtual void OnBoundsChanged( Gwen::Rect oldBounds );
//
// Call this to delete the canvas, and its children
// in the right order.
//
virtual void Release();
//
// Call this to delete the canvas, and its children
// in the right order.
//
virtual void Release();
// Delayed deletes
virtual void AddDelayedDelete(Controls::Base* pControl);
virtual void ProcessDelayedDeletes();
// Delayed deletes
virtual void AddDelayedDelete( Controls::Base* pControl );
virtual void ProcessDelayedDeletes();
Controls::Base* FirstTab;
Controls::Base* NextTab;
Controls::Base* FirstTab;
Controls::Base* NextTab;
// Input
virtual bool InputMouseMoved(int x, int y, int deltaX, int deltaY);
virtual bool InputMouseButton(int iButton, bool bDown);
virtual bool InputKey(int iKey, bool bDown);
virtual bool InputCharacter(Gwen::UnicodeChar chr);
virtual bool InputMouseWheel(int val);
// Input
virtual bool InputMouseMoved( int x, int y, int deltaX, int deltaY );
virtual bool InputMouseButton( int iButton, bool bDown );
virtual bool InputKey( int iKey, bool bDown );
virtual bool InputCharacter( Gwen::UnicodeChar chr );
virtual bool InputMouseWheel( int val );
// Background
virtual void SetBackgroundColor(const Gwen::Color& color) { m_BackgroundColor = color; }
virtual void SetDrawBackground(bool bShouldDraw) { m_bDrawBackground = bShouldDraw; }
// Background
virtual void SetBackgroundColor( const Gwen::Color& color ){ m_BackgroundColor = color; }
virtual void SetDrawBackground( bool bShouldDraw ){ m_bDrawBackground = bShouldDraw; }
private:
bool m_bNeedsRedraw;
bool m_bAnyDelete;
float m_fScale;
private:
Controls::Base::List m_DeleteList;
std::set<Controls::Base*> m_DeleteSet;
friend class Controls::Base;
void PreDelete(Controls::Base*);
bool m_bNeedsRedraw;
bool m_bAnyDelete;
float m_fScale;
Controls::Base::List m_DeleteList;
std::set< Controls::Base* > m_DeleteSet;
friend class Controls::Base;
void PreDelete( Controls::Base * );
bool m_bDrawBackground;
Gwen::Color m_BackgroundColor;
};
}
}
bool m_bDrawBackground;
Gwen::Color m_BackgroundColor;
};
} // namespace Controls
} // namespace Gwen
#endif