CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

iAwsPrefManager Struct Reference
[AWS]

Interface for the preferences manager (window manager needs one.). More...

#include <aws.h>

Inheritance diagram for iAwsPrefManager:

iBase List of all members.

Public Methods

virtual bool Setup (iObjectRegistry *object_reg)=0
 Performs whatever initialization is needed.

virtual bool Load (const char *def_file)=0
 Invokes the definition parser to load definition files.

virtual unsigned long NameToId (const char *name)=0
 Maps a name to an id.

virtual bool SelectDefaultSkin (const char *skin_name)=0
 Select which skin is the default for components, the skin must be loaded.

virtual bool LookupIntKey (const char *name, int &val)=0
 Lookup the value of an int key by name (from the skin def).

virtual bool LookupIntKey (unsigned long id, int &val)=0
 Lookup the value of an int key by id (from the skin def).

virtual bool LookupStringKey (const char *name, iString *&val)=0
 Lookup the value of a string key by name (from the skin def).

virtual bool LookupStringKey (unsigned long id, iString *&val)=0
 Lookup the value of a string key by id (from the skin def).

virtual bool LookupRectKey (const char *name, csRect &rect)=0
 Lookup the value of a rect key by name (from the skin def).

virtual bool LookupRectKey (unsigned long id, csRect &rect)=0
 Lookup the value of a rect key by id (from the skin def).

virtual bool LookupRGBKey (const char *name, unsigned char &red, unsigned char &green, unsigned char &blue)=0
 Lookup the value of an RGB key by name (from the skin def).

virtual bool LookupRGBKey (unsigned long id, unsigned char &red, unsigned char &green, unsigned char &blue)=0
 Lookup the value of an RGB key by name (from the skin def).

virtual bool LookupPointKey (const char *name, csPoint &point)=0
 Lookup the value of a point key by name (from the skin def).

virtual bool LookupPointKey (unsigned long id, csPoint &point)=0
 Lookup the value of a point key by id (from the skin def).

virtual bool GetInt (iAwsComponentNode *node, const char *name, int &val)=0
 Get the an integer from a given component node.

virtual bool GetFloat (iAwsComponentNode *, const char *name, float &val)=0
 Get the float value from a given component node.

virtual bool GetRect (iAwsComponentNode *node, const char *name, csRect &rect)=0
 Get the a rect from a given component node.

virtual bool GetString (iAwsComponentNode *node, const char *name, iString *&val)=0
 Get the value of an integer from a given component node.

virtual bool GetRGB (iAwsComponentNode *node, const char *name, unsigned char &r, unsigned char &g, unsigned char &b)=0
 Get the a color from a given component node.

virtual iAwsComponentNode * FindWindowDef (const char *name)=0
 Find window definition and return the component node holding it, Null otherwise.

virtual iAwsKeyContainer * FindSkinDef (const char *name)=0
 Find skin def and return key container, Null if not found.

virtual bool RemoveWindowDef (const char *name)=0
 Completely remove a window definition (return false if not found).

virtual void RemoveAllWindowDefs ()=0
 Remove all window definitions.

virtual bool RemoveSkinDef (const char *name)=0
 Completely remove a skin definition (return false if not found).

virtual void RemoveAllSkinDefs ()=0
 Remove all skin definitions.

virtual void SetColor (int index, int color)=0
 Sets the value of a color in the global AWS palette.

virtual int GetColor (int index)=0
 Gets the value of a color from the global AWS palette.

virtual int FindColor (unsigned char r, unsigned char g, unsigned char b)=0
 Finds the closest matching color.

virtual iFont * GetDefaultFont ()=0
 Gets the current default font.

virtual iFont * GetFont (const char *filename)=0
 Gets a font. If it's not loaded, it will be. Returns 0 on error.

virtual iTextureHandle * GetTexture (const char *name, const char *filename=0)=0
 Gets a texture from the global AWS cache.

virtual iTextureHandle * GetTexture (const char *name, const char *filename, unsigned char key_r, unsigned char key_g, unsigned char key_b)=0
 Gets a texture from the global AWS cache, if its loaded for the first time then the keycolor (key_r,key_g,key_b) is set.

virtual void SetTextureManager (iTextureManager *txtmgr)=0
 Sets the texture manager that the preference manager uses.

virtual void SetFontServer (iFontServer *fntsvr)=0
 Sets the font server that the preference manager uses.

virtual void SetDefaultFont (iFont *font)=0
 Set the default font that the preference manager uses.

virtual void SetWindowMgr (iAws *wmgr)=0
 Sets the window manager that the preference manager uses.

virtual void SetupPalette ()=0
 Sets up the AWS palette so that the colors are valid reflections of user preferences.

virtual void RegisterConstant (const char *name, int value)=0
 Allows a component to specify it's own constant values for parsing.

virtual bool ConstantExists (const char *name)=0
 Returns true if the constant has been registered, false otherwise.

virtual int GetConstantValue (const char *name)=0
 Allows a component to retrieve the value of a constant, or the parser as well.

virtual iAwsKeyFactory * CreateKeyFactory ()=0
 Creates a new key factory.

virtual iAwsConnectionNodeFactory * CreateConnectionNodeFactory ()=0
 Creates a new connection node factory.


Detailed Description

Interface for the preferences manager (window manager needs one.).

Definition at line 430 of file aws.h.


Member Function Documentation

virtual bool iAwsPrefManager::ConstantExists (  const char *    name )  [pure virtual]
 

Returns true if the constant has been registered, false otherwise.

virtual iAwsConnectionNodeFactory* iAwsPrefManager::CreateConnectionNodeFactory (    )  [pure virtual]
 

Creates a new connection node factory.

virtual iAwsKeyFactory* iAwsPrefManager::CreateKeyFactory (    )  [pure virtual]
 

Creates a new key factory.

virtual int iAwsPrefManager::FindColor (  unsigned char    r,
unsigned char    g,
unsigned char    b
)  [pure virtual]
 

Finds the closest matching color.

virtual iAwsKeyContainer* iAwsPrefManager::FindSkinDef (  const char *    name )  [pure virtual]
 

Find skin def and return key container, Null if not found.

virtual iAwsComponentNode* iAwsPrefManager::FindWindowDef (  const char *    name )  [pure virtual]
 

Find window definition and return the component node holding it, Null otherwise.

virtual int iAwsPrefManager::GetColor (  int    index )  [pure virtual]
 

Gets the value of a color from the global AWS palette.

virtual int iAwsPrefManager::GetConstantValue (  const char *    name )  [pure virtual]
 

Allows a component to retrieve the value of a constant, or the parser as well.

virtual iFont* iAwsPrefManager::GetDefaultFont (    )  [pure virtual]
 

Gets the current default font.

virtual bool iAwsPrefManager::GetFloat (  iAwsComponentNode *   ,
const char *    name,
float &    val
)  [pure virtual]
 

Get the float value from a given component node.

virtual iFont* iAwsPrefManager::GetFont (  const char *    filename )  [pure virtual]
 

Gets a font. If it's not loaded, it will be. Returns 0 on error.

virtual bool iAwsPrefManager::GetInt (  iAwsComponentNode *    node,
const char *    name,
int &    val
)  [pure virtual]
 

Get the an integer from a given component node.

virtual bool iAwsPrefManager::GetRect (  iAwsComponentNode *    node,
const char *    name,
csRect &    rect
)  [pure virtual]
 

Get the a rect from a given component node.

virtual bool iAwsPrefManager::GetRGB (  iAwsComponentNode *    node,
const char *    name,
unsigned char &    r,
unsigned char &    g,
unsigned char &    b
)  [pure virtual]
 

Get the a color from a given component node.

virtual bool iAwsPrefManager::GetString (  iAwsComponentNode *    node,
const char *    name,
iString *&    val
)  [pure virtual]
 

Get the value of an integer from a given component node.

virtual iTextureHandle* iAwsPrefManager::GetTexture (  const char *    name,
const char *    filename,
unsigned char    key_r,
unsigned char    key_g,
unsigned char    key_b
)  [pure virtual]
 

Gets a texture from the global AWS cache, if its loaded for the first time then the keycolor (key_r,key_g,key_b) is set.

virtual iTextureHandle* iAwsPrefManager::GetTexture (  const char *    name,
const char *    filename = 0
)  [pure virtual]
 

Gets a texture from the global AWS cache.

virtual bool iAwsPrefManager::Load (  const char *    def_file )  [pure virtual]
 

Invokes the definition parser to load definition files.

virtual bool iAwsPrefManager::LookupIntKey (  unsigned long    id,
int &    val
)  [pure virtual]
 

Lookup the value of an int key by id (from the skin def).

virtual bool iAwsPrefManager::LookupIntKey (  const char *    name,
int &    val
)  [pure virtual]
 

Lookup the value of an int key by name (from the skin def).

virtual bool iAwsPrefManager::LookupPointKey (  unsigned long    id,
csPoint &    point
)  [pure virtual]
 

Lookup the value of a point key by id (from the skin def).

virtual bool iAwsPrefManager::LookupPointKey (  const char *    name,
csPoint &    point
)  [pure virtual]
 

Lookup the value of a point key by name (from the skin def).

virtual bool iAwsPrefManager::LookupRectKey (  unsigned long    id,
csRect &    rect
)  [pure virtual]
 

Lookup the value of a rect key by id (from the skin def).

virtual bool iAwsPrefManager::LookupRectKey (  const char *    name,
csRect &    rect
)  [pure virtual]
 

Lookup the value of a rect key by name (from the skin def).

virtual bool iAwsPrefManager::LookupRGBKey (  unsigned long    id,
unsigned char &    red,
unsigned char &    green,
unsigned char &    blue
)  [pure virtual]
 

Lookup the value of an RGB key by name (from the skin def).

virtual bool iAwsPrefManager::LookupRGBKey (  const char *    name,
unsigned char &    red,
unsigned char &    green,
unsigned char &    blue
)  [pure virtual]
 

Lookup the value of an RGB key by name (from the skin def).

virtual bool iAwsPrefManager::LookupStringKey (  unsigned long    id,
iString *&    val
)  [pure virtual]
 

Lookup the value of a string key by id (from the skin def).

virtual bool iAwsPrefManager::LookupStringKey (  const char *    name,
iString *&    val
)  [pure virtual]
 

Lookup the value of a string key by name (from the skin def).

virtual unsigned long iAwsPrefManager::NameToId (  const char *    name )  [pure virtual]
 

Maps a name to an id.

virtual void iAwsPrefManager::RegisterConstant (  const char *    name,
int    value
)  [pure virtual]
 

Allows a component to specify it's own constant values for parsing.

Referenced by awsEmbeddedComponentFactory::RegisterConstant().

virtual void iAwsPrefManager::RemoveAllSkinDefs (    )  [pure virtual]
 

Remove all skin definitions.

virtual void iAwsPrefManager::RemoveAllWindowDefs (    )  [pure virtual]
 

Remove all window definitions.

virtual bool iAwsPrefManager::RemoveSkinDef (  const char *    name )  [pure virtual]
 

Completely remove a skin definition (return false if not found).

virtual bool iAwsPrefManager::RemoveWindowDef (  const char *    name )  [pure virtual]
 

Completely remove a window definition (return false if not found).

virtual bool iAwsPrefManager::SelectDefaultSkin (  const char *    skin_name )  [pure virtual]
 

Select which skin is the default for components, the skin must be loaded.

True on success, false otherwise.

virtual void iAwsPrefManager::SetColor (  int    index,
int    color
)  [pure virtual]
 

Sets the value of a color in the global AWS palette.

virtual void iAwsPrefManager::SetDefaultFont (  iFont *    font )  [pure virtual]
 

Set the default font that the preference manager uses.

virtual void iAwsPrefManager::SetFontServer (  iFontServer *    fntsvr )  [pure virtual]
 

Sets the font server that the preference manager uses.

virtual void iAwsPrefManager::SetTextureManager (  iTextureManager *    txtmgr )  [pure virtual]
 

Sets the texture manager that the preference manager uses.

virtual bool iAwsPrefManager::Setup (  iObjectRegistry *    object_reg )  [pure virtual]
 

Performs whatever initialization is needed.

virtual void iAwsPrefManager::SetupPalette (    )  [pure virtual]
 

Sets up the AWS palette so that the colors are valid reflections of user preferences.

Although SetColor can be used, it's recommended that you do not. Colors should always be a user preference, and should be read from the window and skin definition files (as happens automatically normally.

virtual void iAwsPrefManager::SetWindowMgr (  iAws *    wmgr )  [pure virtual]
 

Sets the window manager that the preference manager uses.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.18