Mana
Loading...
Searching...
No Matches
textmanager.h
Go to the documentation of this file.
1/*
2 * Support for non-overlapping floating text
3 * Copyright (C) 2008 Douglas Boffey <DougABoffey@netscape.net>
4 * Copyright (C) 2009-2012 The Mana Developers
5 *
6 * This file is part of The Mana Client.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#pragma once
23
24#include <list>
25
26#include "guichanfwd.h"
27
28class Text;
29
31{
32 public:
34
38 void addText(Text *text);
39
43 void moveText(Text *text, int x, int y);
44
48 void removeText(const Text *text);
49
54
58 void draw(gcn::Graphics *graphics, int xOff, int yOff);
59
60 private:
64 void place(const Text *textObj, const Text *omit,
65 int &x, int &y, int h);
66
67 std::list<Text *> mTextList;
68};
69
void addText(Text *text)
Add text to the manager.
void moveText(Text *text, int x, int y)
Move the text around the screen.
void place(const Text *textObj, const Text *omit, int &x, int &y, int h)
Position the text so as to avoid conflict.
~TextManager()
Destroy the manager.
void draw(gcn::Graphics *graphics, int xOff, int yOff)
Draw the text.
void removeText(const Text *text)
Remove the text from the manager.
std::list< Text * > mTextList
Definition textmanager.h:67
Definition text.h:34
Graphics * graphics
Definition client.cpp:104
TextManager * textManager