ManaPlus
|
#include <textmanager.h>
Public Member Functions | |
TextManager () | |
~TextManager () | |
void | addText (Text *const text) |
void | moveText (Text *const text, const int x, const int y) const |
void | removeText (const Text *const text) |
void | draw (Graphics *const graphics, const int xOff, const int yOff) |
Private Types | |
typedef std::list< Text * > | TextList |
Private Member Functions | |
void | place (const Text *const textObj, const Text *const omit, const int &x, int &y, const int h) const |
Private Attributes | |
TextList | mTextList |
Definition at line 33 of file textmanager.h.
|
private |
The container type
Definition at line 77 of file textmanager.h.
TextManager::TextManager | ( | ) |
Constructor
Definition at line 35 of file textmanager.cpp.
TextManager::~TextManager | ( | ) |
void TextManager::addText | ( | Text *const | text | ) |
Add text to the manager
Definition at line 40 of file textmanager.cpp.
References Text::mHeight, mTextList, Text::mX, Text::mY, and place().
Referenced by Text::Text().
void TextManager::draw | ( | Graphics *const | graphics, |
const int | xOff, | ||
const int | yOff | ||
) |
Draw the text
Definition at line 74 of file textmanager.cpp.
References BLOCK_END, BLOCK_START, FOR_EACH, and mTextList.
void TextManager::moveText | ( | Text *const | text, |
const int | x, | ||
const int | y | ||
) | const |
Move the text around the screen
Definition at line 48 of file textmanager.cpp.
References Text::mHeight, Text::mX, Text::mY, place(), x, and y.
Referenced by Text::adviseXY().
|
private |
Position the text so as to avoid conflict
Definition at line 83 of file textmanager.cpp.
References Text::mHeight, mTextList, Text::mWidth, Text::mX, Text::mY, Actions::ok(), VirtFs::seek(), and y.
Referenced by addText(), and moveText().
void TextManager::removeText | ( | const Text *const | text | ) |
Remove the text from the manager
Definition at line 58 of file textmanager.cpp.
References FOR_EACH, and mTextList.
Referenced by Text::~Text().
|
private |
The container
Definition at line 78 of file textmanager.h.
Referenced by addText(), draw(), place(), and removeText().