theme.cpp File Reference

#include "global.hpp"
#include "config.hpp"
#include "font.hpp"
#include "gettext.hpp"
#include "language.hpp"
#include "log.hpp"
#include "sdl_utils.hpp"
#include "theme.hpp"
#include "util.hpp"
#include "serialization/string_utils.hpp"
#include "wml_exception.hpp"
#include <cassert>
#include <cstdlib>
#include <sstream>

Include dependency graph for theme.cpp:

Go to the source code of this file.

Defines

#define DBG_DP   LOG_STREAM(debug, display)
#define LOG_DP   LOG_STREAM(info, display)
#define ERR_DP   LOG_STREAM(err, display)

Functions

static size_t compute (std::string expr, size_t ref1, size_t ref2=0)
static _rect read_rect (const config &cfg)
static SDL_Rect read_sdl_rect (const config &cfg)
static std::string resolve_rect (const std::string &rect_str)
static configfind_ref (const std::string &id, config &cfg, bool remove=false)
static void expand_partialresolution (config &dst_cfg, const config &top_cfg)
static void do_resolve_rects (const config &cfg, config &resolved_config, config *resol_cfg=NULL)

Variables

const int XDim = 1024
const int YDim = 768
const size_t DefaultFontSize = font::SIZE_NORMAL
const Uint32 DefaultFontRGB = 0x00C8C8C8
_rect ref_rect = { 0, 0, 0, 0 }
config empty_config = config()


Detailed Description

Definition in file theme.cpp.


Define Documentation

#define DBG_DP   LOG_STREAM(debug, display)

Definition at line 35 of file theme.cpp.

#define ERR_DP   LOG_STREAM(err, display)

Definition at line 37 of file theme.cpp.

#define LOG_DP   LOG_STREAM(info, display)

Definition at line 36 of file theme.cpp.


Function Documentation

static size_t compute ( std::string  expr,
size_t  ref1,
size_t  ref2 = 0 
) [static]

Definition at line 49 of file theme.cpp.

Referenced by theme::object::modify_location(), and resolve_rect().

static void do_resolve_rects ( const config cfg,
config resolved_config,
config resol_cfg = NULL 
) [static]

static void expand_partialresolution ( config dst_cfg,
const config top_cfg 
) [static]

static config& find_ref ( const std::string &  id,
config cfg,
bool  remove = false 
) [static]

static _rect read_rect ( const config cfg  )  [static]

Definition at line 62 of file theme.cpp.

References rect, utils::split(), _rect::x1, _rect::x2, _rect::y1, and _rect::y2.

Referenced by do_resolve_rects(), and read_sdl_rect().

static SDL_Rect read_sdl_rect ( const config cfg  )  [static]

Definition at line 84 of file theme.cpp.

References read_rect(), rect, _rect::x1, _rect::x2, _rect::y1, and _rect::y2.

static std::string resolve_rect ( const std::string &  rect_str  )  [static]

Definition at line 95 of file theme.cpp.

References compute(), rect, ref_rect, utils::split(), _rect::x1, _rect::x2, _rect::y1, and _rect::y2.

Referenced by do_resolve_rects().


Variable Documentation

const Uint32 DefaultFontRGB = 0x00C8C8C8 [static]

Definition at line 44 of file theme.cpp.

Referenced by theme::label::label(), and theme::status_item::status_item().

const size_t DefaultFontSize = font::SIZE_NORMAL [static]

Definition at line 43 of file theme.cpp.

Referenced by theme::label::label(), and theme::status_item::status_item().

config empty_config = config() [static]

Definition at line 123 of file theme.cpp.

Referenced by find_ref().

_rect ref_rect = { 0, 0, 0, 0 } [static]

Definition at line 46 of file theme.cpp.

Referenced by do_resolve_rects(), resolve_rect(), and theme::set_object_location().

const int XDim = 1024 [static]

Definition at line 40 of file theme.cpp.

Referenced by theme::object::location().

const int YDim = 768 [static]

Definition at line 41 of file theme.cpp.

Referenced by theme::object::location().


Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs