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

PG_Theme Class Reference

Theme/style definition class. More...

#include <pgtheme.h>

Inheritance diagram for PG_Theme:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual ~PG_Theme ()
virtual const std::string & FindDefaultFontName ()=0
virtual int FindDefaultFontSize ()=0
virtual PG_Font::Style FindDefaultFontStyle ()=0
virtual const std::string & FindFontName (const std::string &widgettype, const std::string &objectname)=0
virtual int FindFontSize (const std::string &widgettype, const std::string &objectname)=0
virtual PG_Font::Style FindFontStyle (const std::string &widgettype, const std::string &objectname)=0
virtual SDL_Surface * FindSurface (const std::string &widgettype, const std::string &object, const std::string &name)=0
virtual PG_GradientFindGradient (const std::string &widgettype, const std::string &object, const std::string &name)=0
virtual void GetProperty (const std::string &widgettype, const std::string &object, const std::string &name, long &prop)=0
virtual void GetProperty (const std::string &widgettype, const std::string &object, const std::string &name, Uint8 &prop)=0
virtual void GetProperty (const std::string &widgettype, const std::string &object, const std::string &name, bool &prop)=0
virtual void GetProperty (const std::string &widgettype, const std::string &object, const std::string &name, int &prop)=0
void GetProperty (const std::string &widgettype, const std::string &object, const std::string &name, Uint16 &prop)
virtual void GetProperty (const std::string &widgettype, const std::string &object, const std::string &name, PG_Draw::BkMode &prop)=0
virtual void GetAlignment (const std::string &widgettype, const std::string &object, const std::string &name, PG_Label::TextAlign &align)=0
virtual void GetColor (const std::string &widgettype, const std::string &object, const std::string &name, PG_Color &color)=0
virtual const std::string & FindString (const std::string &widgettype, const std::string &object, const std::string &name)=0

Static Public Member Functions

static PG_ThemeLoad (const std::string &xmltheme)
 Load and process a XML theme definition file.
static void Unload (PG_Theme *theme)

Detailed Description

Theme/style definition class.

Definition at line 45 of file pgtheme.h.


Constructor & Destructor Documentation

virtual PG_Theme::~PG_Theme  )  [inline, virtual]
 

Definition at line 48 of file pgtheme.h.


Member Function Documentation

virtual const std::string& PG_Theme::FindDefaultFontName  )  [pure virtual]
 

Implemented in THEME_THEME.

Referenced by PG_Application::LoadTheme().

virtual int PG_Theme::FindDefaultFontSize  )  [pure virtual]
 

Implemented in THEME_THEME.

Referenced by PG_Application::LoadTheme().

virtual PG_Font::Style PG_Theme::FindDefaultFontStyle  )  [pure virtual]
 

Implemented in THEME_THEME.

Referenced by PG_Application::LoadTheme().

virtual const std::string& PG_Theme::FindFontName const std::string &  widgettype,
const std::string &  objectname
[pure virtual]
 

Implemented in THEME_THEME.

Referenced by PG_Widget::LoadThemeStyle(), and PG_ThemeWidget::LoadThemeStyle().

virtual int PG_Theme::FindFontSize const std::string &  widgettype,
const std::string &  objectname
[pure virtual]
 

Implemented in THEME_THEME.

Referenced by PG_Widget::LoadThemeStyle(), and PG_ThemeWidget::LoadThemeStyle().

virtual PG_Font::Style PG_Theme::FindFontStyle const std::string &  widgettype,
const std::string &  objectname
[pure virtual]
 

Implemented in THEME_THEME.

Referenced by PG_Widget::LoadThemeStyle(), and PG_ThemeWidget::LoadThemeStyle().

virtual PG_Gradient* PG_Theme::FindGradient const std::string &  widgettype,
const std::string &  object,
const std::string &  name
[pure virtual]
 

Implemented in THEME_THEME.

Referenced by PG_ThemeWidget::LoadThemeStyle(), PG_ProgressBar::LoadThemeStyle(), PG_PopupMenu::LoadThemeStyle(), PG_ListBoxItem::LoadThemeStyle(), and PG_Button::LoadThemeStyle().

virtual const std::string& PG_Theme::FindString const std::string &  widgettype,
const std::string &  object,
const std::string &  name
[pure virtual]
 

Implemented in THEME_THEME.

Referenced by PG_LineEdit::LoadThemeStyle(), PG_Label::LoadThemeStyle(), and PG_Button::LoadThemeStyle().

virtual SDL_Surface* PG_Theme::FindSurface const std::string &  widgettype,
const std::string &  object,
const std::string &  name
[pure virtual]
 

Implemented in THEME_THEME.

Referenced by PG_Application::LoadTheme(), PG_ThemeWidget::LoadThemeStyle(), PG_ProgressBar::LoadThemeStyle(), PG_PopupMenu::LoadThemeStyle(), PG_ListBoxItem::LoadThemeStyle(), PG_LineEdit::LoadThemeStyle(), and PG_Button::LoadThemeStyle().

virtual void PG_Theme::GetAlignment const std::string &  widgettype,
const std::string &  object,
const std::string &  name,
PG_Label::TextAlign align
[pure virtual]
 

Implemented in THEME_THEME.

Referenced by PG_Label::LoadThemeStyle().

virtual void PG_Theme::GetColor const std::string &  widgettype,
const std::string &  object,
const std::string &  name,
PG_Color color
[pure virtual]
 

Implemented in THEME_THEME.

Referenced by PG_Application::LoadTheme(), PG_Window::LoadThemeStyle(), PG_Widget::LoadThemeStyle(), PG_ThemeWidget::LoadThemeStyle(), PG_PopupMenu::LoadThemeStyle(), PG_ListBoxItem::LoadThemeStyle(), and PG_Button::LoadThemeStyle().

virtual void PG_Theme::GetProperty const std::string &  widgettype,
const std::string &  object,
const std::string &  name,
PG_Draw::BkMode prop
[pure virtual]
 

Implemented in THEME_THEME.

void PG_Theme::GetProperty const std::string &  widgettype,
const std::string &  object,
const std::string &  name,
Uint16 &  prop
[inline]
 

Definition at line 63 of file pgtheme.h.

virtual void PG_Theme::GetProperty const std::string &  widgettype,
const std::string &  object,
const std::string &  name,
int &  prop
[pure virtual]
 

Implemented in THEME_THEME.

virtual void PG_Theme::GetProperty const std::string &  widgettype,
const std::string &  object,
const std::string &  name,
bool &  prop
[pure virtual]
 

Implemented in THEME_THEME.

virtual void PG_Theme::GetProperty const std::string &  widgettype,
const std::string &  object,
const std::string &  name,
Uint8 &  prop
[pure virtual]
 

Implemented in THEME_THEME.

virtual void PG_Theme::GetProperty const std::string &  widgettype,
const std::string &  object,
const std::string &  name,
long &  prop
[pure virtual]
 

Implemented in THEME_THEME.

Referenced by PG_Application::LoadTheme(), PG_Window::LoadThemeStyle(), PG_ThemeWidget::LoadThemeStyle(), PG_Slider::LoadThemeStyle(), PG_RadioButton::LoadThemeStyle(), PG_ProgressBar::LoadThemeStyle(), PG_PopupMenu::LoadThemeStyle(), PG_ListBoxItem::LoadThemeStyle(), and PG_Button::LoadThemeStyle().

PG_Theme * PG_Theme::Load const std::string &  xmltheme  )  [static]
 

Load and process a XML theme definition file.

Parameters:
xmltheme The file name for the theme. The extension ".theme" is assumed.
Returns:
pointer to a newly created PG_Theme object or NULL if the operation failed
Given the name of a file that contains the theme definition, it loads the Theme into ParaGUI's system

Definition at line 390 of file themeloader.cpp.

References PG_FileArchive::AddArchive(), buff, BUFFSIZE, _PARSE_INFO::depth, PG_File::eof(), PG_FileArchive::Exists(), PG_FileArchive::GetDirSeparator(), PG_FileArchive::GetLastError(), PG_FileArchive::GetRealDir(), handlerEnd(), handlerStart(), _PARSE_INFO::mode, PG_FileArchive::OpenFile(), _PARSE_INFO::p_currentObject, _PARSE_INFO::p_currentWidget, PG_LogERR(), PG_LogMSG(), PG_LogWRN(), PG_File::read(), _PARSE_INFO::theme, THEME_SUFFIX, THEMEMODE_NONE, and _PARSE_INFO::themename.

Referenced by PG_Application::LoadTheme().

void PG_Theme::Unload PG_Theme theme  )  [static]
 

Definition at line 488 of file themeloader.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Jun 24 02:19:37 2008 for Advanced Strategic Command by  doxygen 1.4.2