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

@@ -13,50 +13,47 @@
#include "Gwen/Controls/Text.h"
#include "Gwen/TextObject.h"
namespace Gwen
namespace Gwen
{
namespace Controls
namespace Controls
{
class GWEN_EXPORT RichLabel : public Controls::Base
{
public:
GWEN_CONTROL(RichLabel, Gwen::Controls::Base);
void AddLineBreak();
void AddText(const Gwen::TextObject& text, Gwen::Color color, Gwen::Font* font = NULL);
virtual bool SizeToChildren(bool w = true, bool h = true);
protected:
struct DividedText
{
class GWEN_EXPORT RichLabel : public Controls::Base
typedef std::list<DividedText> List;
DividedText()
{
public:
type = 0;
font = NULL;
}
GWEN_CONTROL( RichLabel, Gwen::Controls::Base );
void AddLineBreak();
void AddText( const Gwen::TextObject& text, Gwen::Color color, Gwen::Font* font = NULL );
unsigned char type;
Gwen::UnicodeString text;
Gwen::Color color;
Gwen::Font* font;
};
virtual bool SizeToChildren( bool w = true, bool h = true );
void Layout(Gwen::Skin::Base* skin);
void SplitLabel(const Gwen::UnicodeString& text, Gwen::Font* pFont, const DividedText& txt, int& x, int& y, int& lineheight);
void CreateNewline(int& x, int& y, int& lineheight);
void CreateLabel(const Gwen::UnicodeString& text, const DividedText& txt, int& x, int& y, int& lineheight, bool NoSplit);
void Rebuild();
protected:
void OnBoundsChanged(Gwen::Rect oldBounds);
struct DividedText
{
typedef std::list<DividedText> List;
DividedText()
{
type = 0;
font = NULL;
}
unsigned char type;
Gwen::UnicodeString text;
Gwen::Color color;
Gwen::Font* font;
};
void Layout( Gwen::Skin::Base* skin );
void SplitLabel( const Gwen::UnicodeString& text, Gwen::Font* pFont, const DividedText& txt, int& x, int& y, int& lineheight );
void CreateNewline( int& x, int& y, int& lineheight );
void CreateLabel( const Gwen::UnicodeString& text, const DividedText& txt, int& x, int& y, int& lineheight, bool NoSplit );
void Rebuild();
void OnBoundsChanged( Gwen::Rect oldBounds );
DividedText::List m_TextBlocks;
bool m_bNeedsRebuild;
};
}
}
DividedText::List m_TextBlocks;
bool m_bNeedsRebuild;
};
} // namespace Controls
} // namespace Gwen
#endif