#include "exceptions.hpp"#include "SDL_ttf.h"#include "sdl_utils.hpp"

Go to the source code of this file.
Classes | |
| struct | font::manager |
| struct | font::manager::error |
| struct | font::floating_label_context |
| structure which will hide all current floating labels, and cause floating labels instantiated after it is created to be displayed More... | |
| class | font::floating_label |
Namespaces | |
| namespace | font |
Graphical text output. | |
Enumerations | |
| enum | font::ALIGN { font::LEFT_ALIGN, font::CENTER_ALIGN, font::RIGHT_ALIGN } |
| enum | font::LABEL_SCROLL_MODE { font::ANCHOR_LABEL_SCREEN, font::ANCHOR_LABEL_MAP } |
| enum | font::CACHE { font::CACHE_LOBBY, font::CACHE_GAME } |
Functions | |
| int | font::relative_size (int size) |
| surface | font::get_rendered_text (const std::string &str, int size, const SDL_Color &color, int style) |
| SDL_Rect | font::draw_text_line (surface gui_surface, const SDL_Rect &area, int size, const SDL_Color &color, const std::string &text, int x, int y, bool use_tooltips, int style) |
| int | font::get_max_height (int size) |
| int | font::line_width (const std::string &line, int font_size, int style=TTF_STYLE_NORMAL) |
| Determine the width of a line of text given a certain font size. | |
| SDL_Rect | font::line_size (const std::string &line, int font_size, int style=TTF_STYLE_NORMAL) |
| Determine the size of a line of text given a certain font size. | |
| std::string | font::make_text_ellipsis (const std::string &text, int font_size, int max_width, int style=TTF_STYLE_NORMAL) |
| If the text excedes the specified max width, end it with an ellipsis (...). | |
| int | font::add_floating_label (const floating_label &flabel) |
| add a label floating on the screen above everything else. | |
| void | font::move_floating_label (int handle, double xmove, double ymove) |
| moves the floating label given by 'handle' by (xmove,ymove) | |
| void | font::scroll_floating_labels (double xmove, double ymove) |
| moves all floating labels that have 'scroll_mode' set to ANCHOR_LABEL_MAP | |
| void | font::remove_floating_label (int handle) |
| removes the floating label given by 'handle' from the screen | |
| void | font::show_floating_label (int handle, bool show) |
| hides or shows a floating label | |
| SDL_Rect | font::get_floating_label_rect (int handle) |
| void | font::draw_floating_labels (surface screen) |
| void | font::undraw_floating_labels (surface screen) |
| bool | font::load_font_config () |
| const t_string & | font::get_font_families () |
| Returns the currently defined fonts. | |
| void | font::cache_mode (CACHE mode) |
Variables | |
| const int | font::SIZE_NORMAL = 14 |
| const int | font::SIZE_TINY = relative_size(10) |
| const int | font::SIZE_SMALL = relative_size(12) |
| const int | font::SIZE_15 = relative_size(15) |
| const int | font::SIZE_PLUS = relative_size(16) |
| const int | font::SIZE_LARGE = relative_size(18) |
| const int | font::SIZE_XLARGE = relative_size(24) |
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:04:19 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |