diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-17 18:43:03 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-17 18:45:18 +0300 |
commit | a3eae284bfdb06ea5501230705f19e75e6a0173d (patch) | |
tree | ce5c7bbd965b2cea59c7d3cae7921eaf8b22d11e /src/gui/fonts/font.h | |
parent | 9f3eddda4befaf04c0c1a08983f210ee7c77b8ea (diff) | |
download | plus-a3eae284bfdb06ea5501230705f19e75e6a0173d.tar.gz plus-a3eae284bfdb06ea5501230705f19e75e6a0173d.tar.bz2 plus-a3eae284bfdb06ea5501230705f19e75e6a0173d.tar.xz plus-a3eae284bfdb06ea5501230705f19e75e6a0173d.zip |
Move textchunksmall into separate file.
Diffstat (limited to 'src/gui/fonts/font.h')
-rw-r--r-- | src/gui/fonts/font.h | 47 |
1 files changed, 17 insertions, 30 deletions
diff --git a/src/gui/fonts/font.h b/src/gui/fonts/font.h index f6a64a2d8..551800bdb 100644 --- a/src/gui/fonts/font.h +++ b/src/gui/fonts/font.h @@ -69,6 +69,8 @@ #include "gui/color.h" +#include "gui/fonts/textchunksmall.h" + #include <SDL_ttf.h> #include <map> @@ -82,33 +84,18 @@ class Image; const unsigned int CACHES_NUMBER = 256; -class SDLTextChunkSmall -{ - public: - SDLTextChunkSmall(const std::string &text0, const Color &color0, - const Color &color1); - - SDLTextChunkSmall(const SDLTextChunkSmall &old); - - bool operator==(const SDLTextChunkSmall &chunk) const; - bool operator<(const SDLTextChunkSmall &chunk) const; - - std::string text; - Color color; - Color color2; -}; - -class SDLTextChunk final +class TextChunk final { public: - SDLTextChunk(const std::string &text0, const Color &color0, - const Color &color1); + TextChunk(const std::string &text0, + const Color &color0, + const Color &color1); - A_DELETE_COPY(SDLTextChunk) + A_DELETE_COPY(TextChunk) - ~SDLTextChunk(); + ~TextChunk(); - bool operator==(const SDLTextChunk &chunk) const; + bool operator==(const TextChunk &chunk) const; void generate(TTF_Font *const font, const float alpha); @@ -116,8 +103,8 @@ class SDLTextChunk final std::string text; Color color; Color color2; - SDLTextChunk *prev; - SDLTextChunk *next; + TextChunk *prev; + TextChunk *next; }; @@ -128,9 +115,9 @@ class TextChunkList final A_DELETE_COPY(TextChunkList) - void insertFirst(SDLTextChunk *const item); + void insertFirst(TextChunk *const item); - void moveToFirst(SDLTextChunk *const item); + void moveToFirst(TextChunk *const item); void removeBack(); @@ -138,11 +125,11 @@ class TextChunkList final void clear(); - SDLTextChunk *start; - SDLTextChunk *end; + TextChunk *start; + TextChunk *end; uint32_t size; - std::map<SDLTextChunkSmall, SDLTextChunk*> search; - std::map<std::string, SDLTextChunk*> searchWidth; + std::map<TextChunkSmall, TextChunk*> search; + std::map<std::string, TextChunk*> searchWidth; }; /** |