Namespaces | Functions

marked-up_text.hpp File Reference

#include <SDL_video.h>
#include <string>
Include dependency graph for marked-up_text.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  font
 

Graphical text output.


Functions

std::string::const_iterator font::parse_markup (std::string::const_iterator i1, std::string::const_iterator i2, int *font_size, SDL_Color *color, int *style)
 Parses the markup-tags at the front of a string.
SDL_Rect font::draw_text (surface dst, const SDL_Rect &area, int size, const SDL_Color &color, const std::string &text, int x, int y, bool use_tooltips=false, int style=0)
 Function to draw text on a surface.
SDL_Rect font::draw_text (CVideo *gui, const SDL_Rect &area, int size, const SDL_Color &color, const std::string &text, int x, int y, bool use_tooltips=false, int style=0)
 wrapper of the previous function, gui can also be NULL
SDL_Rect font::text_area (const std::string &text, int size, int style=0)
 Calculate the size of a text (in pixels) if it were to be drawn.
std::string font::del_tags (const std::string &text)
 Copy string, but without tags at the beginning.
bool font::is_format_char (char c)
 Determine if char is one of the special chars used as markup.
bool font::is_cjk_char (const wchar_t ch)
 Determine if a wchar_t is a CJK character.
std::string font::color2markup (const SDL_Color &color)
 Create string of color-markup, such as "<255,255,0>" for yellow.
std::string font::color2hexa (const SDL_Color &color)
 Creates the hexadecimal string of a color, such as "#ffff00" for yellow.
std::string font::span_color (const SDL_Color &color)
 Creates pango markup of a color.
std::string font::word_wrap_text (const std::string &unwrapped_text, int font_size, int max_width, int max_height=-1, int max_lines=-1, bool partial_line=false)
 Wrap text.
SDL_Rect font::draw_wrapped_text (CVideo *gui, const SDL_Rect &area, int font_size, const SDL_Color &color, const std::string &text, int x, int y, int max_width)
 Draw text on the screen, fit text to maximum width, no markup, no tooltips.

Detailed Description

Definition in file marked-up_text.hpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:08:31 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs