Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

themeloader.cpp File Reference

#include "paragui.h"
#include "pgcolor.h"
#include "theme_priv.h"
#include "pglog.h"
#include "pgfilearchive.h"
#include "pgdraw.h"
#include <string>
#include <expat.h>
#include <iostream>

Include dependency graph for themeloader.cpp:

Go to the source code of this file.

Defines

#define T(x)   x
#define tcscmp   strcmp
#define THEMEMODE_NONE   0
#define THEMEMODE_THEME   1
#define THEMEMODE_WIDGET   2
#define THEMEMODE_OBJECT   3
#define THEME_SUFFIX   ".theme"
#define BUFFSIZE   8192

Typedefs

typedef _PARSE_INFO PARSE_INFO

Functions

void parseGlobProps (PARSE_INFO *info, const XML_Char *name, const XML_Char **atts)
void parseThemeProps (PARSE_INFO *info, const XML_Char *prop, const XML_Char **atts)
void parseWidgetProps (PARSE_INFO *info, const XML_Char *prop, const XML_Char **atts)
void parseObjectProps (PARSE_INFO *info, const XML_Char *prop, const XML_Char **atts)
void handlerStart (void *userData, const XML_Char *name, const XML_Char **atts)
void handlerEnd (void *userData, const XML_Char *name)

Variables

static char * buff


Define Documentation

#define BUFFSIZE   8192
 

Definition at line 73 of file themeloader.cpp.

Referenced by PG_Theme::Load().

#define T  )     x
 

Definition at line 49 of file themeloader.cpp.

Referenced by ActionNameProvider(), FieldList< T >::addField(), Vehicletype::calcProductionsCost(), PG_FactoryObject< T, PT >::CreateObject(), PG_FactoryObject< T, PT >::CreateObject0(), PG_Singleton< PG_FactoryHolder< H > >::GetInstance(), handlerEnd(), PropertyTemplate< T >::operation_add(), PropertyTemplate< T >::operation_eq(), PropertyTemplate< T >::operation_mult(), PropertyTemplate< T >::operation_sub(), parseObjectProps(), parseThemeProps(), parseWidgetProps(), PG_Layout::GetParamAlign(), PG_Layout::GetParamIMode(), PG_Layout::GetParamStr(), AdaptorConvertSlot6_< R, P1, P2, P3, P4, P5, P6, T >::proxy(), AdaptorConvertSlot5_< R, P1, P2, P3, P4, P5, T >::proxy(), AdaptorConvertSlot4_< R, P1, P2, P3, P4, T >::proxy(), AdaptorConvertSlot3_< R, P1, P2, P3, T >::proxy(), AdaptorConvertSlot2_< R, P1, P2, T >::proxy(), AdaptorConvertSlot1_< R, P1, T >::proxy(), AdaptorConvertSlot0_< R, T >::proxy(), ItemRepositoryLoader< T >::read(), ItemRepositoryLoader< T >::readTextFiles(), dynamic_array< T >::resize(), swapData(), and TriggerNameProvider().

#define tcscmp   strcmp
 

Definition at line 50 of file themeloader.cpp.

Referenced by handlerEnd(), parseObjectProps(), parseThemeProps(), parseWidgetProps(), PG_Layout::GetParamAlign(), PG_Layout::GetParamIMode(), and PG_Layout::GetParamStr().

#define THEME_SUFFIX   ".theme"
 

Definition at line 71 of file themeloader.cpp.

Referenced by PG_Theme::Load().

#define THEMEMODE_NONE   0
 

Definition at line 66 of file themeloader.cpp.

Referenced by handlerEnd(), handlerStart(), and PG_Theme::Load().

#define THEMEMODE_OBJECT   3
 

Definition at line 69 of file themeloader.cpp.

Referenced by handlerStart(), and parseWidgetProps().

#define THEMEMODE_THEME   1
 

Definition at line 67 of file themeloader.cpp.

Referenced by handlerEnd(), and handlerStart().

#define THEMEMODE_WIDGET   2
 

Definition at line 68 of file themeloader.cpp.

Referenced by handlerEnd(), handlerStart(), and parseThemeProps().


Typedef Documentation

typedef struct _PARSE_INFO PARSE_INFO
 


Function Documentation

void handlerEnd void *  userData,
const XML_Char *  name
 

Definition at line 376 of file themeloader.cpp.

References _PARSE_INFO::depth, _PARSE_INFO::mode, T, tcscmp, THEMEMODE_NONE, THEMEMODE_THEME, and THEMEMODE_WIDGET.

Referenced by PG_Theme::Load().

void handlerStart void *  userData,
const XML_Char *  name,
const XML_Char **  atts
 

Definition at line 351 of file themeloader.cpp.

References _PARSE_INFO::depth, _PARSE_INFO::mode, parseGlobProps(), parseObjectProps(), parseThemeProps(), parseWidgetProps(), THEMEMODE_NONE, THEMEMODE_OBJECT, THEMEMODE_THEME, and THEMEMODE_WIDGET.

Referenced by PG_Theme::Load().

void parseGlobProps PARSE_INFO info,
const XML_Char *  name,
const XML_Char **  atts
 

Definition at line 77 of file themeloader.cpp.

References _PARSE_INFO::theme.

Referenced by handlerStart().

void parseObjectProps PARSE_INFO info,
const XML_Char *  prop,
const XML_Char **  atts
 

Definition at line 144 of file themeloader.cpp.

References atoi(), THEME_FILENAME::colorkey, PG_Gradient::colors, THEME_OBJECT::filename, THEME_OBJECT::font, THEME_OBJECT::gradient, THEME_FILENAME::hasColorKey, PG_FileArchive::LoadSurface(), PG_Color::MapRGB(), THEME_STRING::name, THEME_GRADIENT::name, THEME_PROPERTY::name, THEME_FONT::name, THEME_FILENAME::name, THEME_OBJECT::name, THEME_WIDGET::object, _PARSE_INFO::p_currentObject, _PARSE_INFO::p_currentWidget, THEME_OBJECT::property, THEME_FONT::size, PG_Draw::STRETCH, THEME_OBJECT::strings, THEME_FILENAME::surface, T, tcscmp, PG_Draw::TILE, PG_Draw::TILE3H, PG_Draw::TILE3V, PG_Draw::TILE9, THEME_OBJECT::type, THEME_STRING::value, THEME_PROPERTY::value, THEME_FONT::value, and THEME_FILENAME::value.

Referenced by handlerStart().

void parseThemeProps PARSE_INFO info,
const XML_Char *  prop,
const XML_Char **  atts
 

Definition at line 87 of file themeloader.cpp.

References atoi(), THEME_THEME::author, THEME_THEME::defaultfont, THEME_THEME::description, THEME_THEME::email, _PARSE_INFO::mode, THEME_FONT::name, _PARSE_INFO::p_currentWidget, THEME_FONT::size, T, tcscmp, _PARSE_INFO::theme, THEMEMODE_WIDGET, THEME_THEME::title, THEME_WIDGET::type, and THEME_FONT::value.

Referenced by handlerStart().

void parseWidgetProps PARSE_INFO info,
const XML_Char *  prop,
const XML_Char **  atts
 

Definition at line 127 of file themeloader.cpp.

References _PARSE_INFO::mode, THEME_OBJECT::name, _PARSE_INFO::p_currentObject, _PARSE_INFO::p_currentWidget, T, tcscmp, _PARSE_INFO::theme, THEMEMODE_OBJECT, THEME_OBJECT::type, THEME_WIDGET::type, and THEME_THEME::widget.

Referenced by handlerStart().


Variable Documentation

char* buff [static]
 

Definition at line 75 of file themeloader.cpp.

Referenced by PG_Theme::Load(), and PG_Layout::Load().


Generated on Tue Jun 24 02:12:22 2008 for Advanced Strategic Command by  doxygen 1.4.2