ThemeManager Class Reference
[User interfaceSingle inited classes]

Handles themes (the look and feel). More...

#include <thememanager.h>

Collaboration diagram for ThemeManager:

Collaboration graph
[legend]
List of all members.

Public Types

enum  LoadScheme { lsOnAppStart, lsOnActivate }

Public Member Functions

DECLSPEC ThemeManager (LoadScheme ls)
DECLSPEC bool setActiveTheme (UiTheme *t, bool hidden)
DECLSPEC void setLoadScheme (LoadScheme ls)
UiThemegetActiveTheme ()
DECLSPEC UiThemegetThemeByName (const char *name)

Static Public Member Functions

static DECLSPEC ThemeManagergetThe ()

Static Public Attributes

static ThemeManagerthe

Friends

class UiTheme

Detailed Description

Handles themes (the look and feel).

Using themes makes it easier to change the look and feel of an application. ThemeManager is the central for all used themes. Every variable of a class derved from UiTheme will be registered here and can become active when required.

This class can only be used in one variable at a time. So do not initialize it more than once, but it is required once, if you use themes.


Member Enumeration Documentation

enum ThemeManager::LoadScheme

lsOnAppStart: Theme will be loaded, when it is created (usually at app-start), so starting the app will take longer lsOnActivate: Theme will be loaded, directly before it becomes active, so activating a theme will take longer


Constructor & Destructor Documentation

ThemeManager::ThemeManager ( LoadScheme  ls  ) 

Constructor

Parameters:
ls specifies, when to load the themes' data


Member Function Documentation

bool ThemeManager::setActiveTheme ( UiTheme t,
bool  hidden 
)

Activates a theme

Parameters:
t The theme to activate
hidden if true, there is no progress shown to the user; if false, a progressbar may be shown

void ThemeManager::setLoadScheme ( LoadScheme  ls  ) 

Change the load scheme of themes

Parameters:
ls specifies, when to load the themes' data, if ls is lsOnAppStart, then all themes will be loaded immediatelly if it is lsOnActivate, there will be probably no changes, because all themes have already been loaded; this makes sense only, if a theme is created afterwards

UiTheme* ThemeManager::getActiveTheme (  )  [inline]

Use this function in GUI or UI classes, to get the look and feel for your element

Returns:
the currently active theme

UiTheme * ThemeManager::getThemeByName ( const char *  name  ) 

Parameters:
name the name of the theme as returned by UiTheme::getName()
Returns:
the theme with the specified name

ThemeManager * ThemeManager::getThe (  )  [static]

Returns:
a pointer to the ThemeManager-variable, or NULL if not initialized. (There is only one ThemeManager-variable allowed in an application)
Every netrinjo-class that can only exist once at a time, has this static function.
See also:
Single inited classes


Member Data Documentation

ThemeManager * ThemeManager::the [static]

only accessible in Linux, and equals the result of getThe()


The documentation for this class was generated from the following files:
Generated on Wed May 9 17:36:34 2007 for netrinjo by  doxygen 1.5.1