The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Namespaces | Enumerations | Functions
sdl_ttf.hpp File Reference
#include "constants.hpp"
#include "font_id.hpp"
#include "font_description.hpp"
#include "color.hpp"
#include <string>
#include <SDL_ttf.h>
Include dependency graph for sdl_ttf.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  font::sdl_ttf
 

Namespaces

 font
 Note: Specific to sdl_ttf.
 

Enumerations

enum  font::CACHE { font::CACHE_LOBBY, font::CACHE_GAME }
 

Functions

surface font::get_rendered_text (const std::string &str, int size, const color_t &color, int style)
 
SDL_Rect font::draw_text_line (surface &gui_surface, const SDL_Rect &area, int size, const color_t &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. More...
 
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. More...
 
std::string font::make_text_ellipsis (const std::string &text, int font_size, int max_width, int style=TTF_STYLE_NORMAL)
 If the text exceeds the specified max width, end it with an ellipsis (...) More...
 
void font::cache_mode (CACHE mode)