newspeoplefor developersdocumentationdownloads

nGuiSkin Class Reference
[Graphical User Interface]

#include <nguiskin.h>

Inheritance diagram for nGuiSkin:

nRoot nObject nNode nReferenced nSignalEmitter List of all members.

Detailed Description

A GUI skin object holds an user-defined table of gui resources which are used by the GUI widgets to render themselves.

Each gui resource describes a rectangular texture area. That way it is possible to distribute the GUI brushes over any number of textures.

(C) 2004 RadonLabs GmbH

Definition at line 24 of file nguiskin.h.


Public Member Functions

 nGuiSkin ()
 constructor
virtual ~nGuiSkin ()
 destructor
void UnloadUntouchedGuiResources ()
 unload all gui resources which have not been rendered last frame
void SetTexturePrefix (const char *prefix)
 set texture prefix
const char * GetTexturePrefix () const
 get texture prefix
void SetTexturePostfix (const char *postfix)
 set texture postfix
const char * GetTexturePostfix () const
 get texture postfix
void SetActiveWindowColor (const vector4 &c)
 set the active window color
const vector4GetActiveWindowColor () const
 get the active window color
void SetInactiveWindowColor (const vector4 &c)
 set the inactive window color
const vector4GetInactiveWindowColor () const
 get the inactive window color
void SetTextColor (const vector4 &c)
 set the default text color
const vector4GetTextColor () const
 get the default text color
void SetButtonTextColor (const vector4 &c)
 set button text color
const vector4GetButtonTextColor () const
 get button text color
void SetTitleTextColor (const vector4 &c)
 set title text color
const vector4GetTitleTextColor () const
 get title text color
void SetLabelTextColor (const vector4 &c)
 set label text color
const vector4GetLabelTextColor () const
 get label text color
void SetEntryTextColor (const vector4 &c)
 set text entry text color
const vector4GetEntryTextColor () const
 get text entry text color
void SetMenuTextColor (const vector4 &c)
 set menu entry text color
const vector4GetMenuTextColor () const
 get menu entry text color
void SetWindowBorder (const rectangle &v)
 set window broder size
const rectangleGetWindowBorder () const
 get window border size
void SetWindowFont (const char *fnt)
 set window font
const char * GetWindowFont () const
 get window font
void SetButtonFont (const char *fnt)
 set button font
const char * GetButtonFont () const
 get button font
void SetLabelFont (const char *fnt)
 set label font
const char * GetLabelFont () const
 get label font
void BeginBrushes ()
 begin adding brushes
void AddBrush (const char *name, const char *tex, const vector2 &uvPos, const vector2 &uvSize, const vector4 &color)
 add a skin brush
void AddDynamicBrush (const char *name, int width, int height)
 Add dynamic brush with name `name'.
void EndBrushes ()
 end adding brushes
nGuiResourceFindBrush (const char *name)
 lookup gui resource for a brush
void AddSoundObject (const char *name, const char *filename)
 add a sound object
nSound3GetSoundObject (const char *name)
 get sound object
const char * GetSound (const char *name) const
 get sound filename associated with the name
void SetSoundVolume (const char *name, float volume)
 set volume for sounds objects
float GetSoundVolume (const char *name)
 get volume for sound object

Constructor & Destructor Documentation

nGuiSkin::nGuiSkin  ) 
 

constructor

Definition at line 15 of file nguiskin_main.cc.

nGuiSkin::~nGuiSkin  )  [virtual]
 

destructor

Definition at line 35 of file nguiskin_main.cc.


Member Function Documentation

void nGuiSkin::UnloadUntouchedGuiResources  ) 
 

unload all gui resources which have not been rendered last frame

Definition at line 245 of file nguiskin_main.cc.

void nGuiSkin::SetTexturePrefix const char *  prefix  )  [inline]
 

set texture prefix

Definition at line 281 of file nguiskin.h.

const char * nGuiSkin::GetTexturePrefix  )  const [inline]
 

get texture prefix

Definition at line 291 of file nguiskin.h.

void nGuiSkin::SetTexturePostfix const char *  postfix  )  [inline]
 

set texture postfix

Definition at line 301 of file nguiskin.h.

const char * nGuiSkin::GetTexturePostfix  )  const [inline]
 

get texture postfix

Definition at line 311 of file nguiskin.h.

void nGuiSkin::SetActiveWindowColor const vector4 c  )  [inline]
 

set the active window color

Definition at line 321 of file nguiskin.h.

const vector4 & nGuiSkin::GetActiveWindowColor  )  const [inline]
 

get the active window color

Definition at line 331 of file nguiskin.h.

void nGuiSkin::SetInactiveWindowColor const vector4 c  )  [inline]
 

set the inactive window color

Definition at line 341 of file nguiskin.h.

const vector4 & nGuiSkin::GetInactiveWindowColor  )  const [inline]
 

get the inactive window color

Definition at line 351 of file nguiskin.h.

void nGuiSkin::SetTextColor const vector4 c  )  [inline]
 

set the default text color

Definition at line 221 of file nguiskin.h.

const vector4 & nGuiSkin::GetTextColor  )  const [inline]
 

get the default text color

Definition at line 231 of file nguiskin.h.

void nGuiSkin::SetButtonTextColor const vector4 c  )  [inline]
 

set button text color

Definition at line 201 of file nguiskin.h.

const vector4 & nGuiSkin::GetButtonTextColor  )  const [inline]
 

get button text color

Definition at line 211 of file nguiskin.h.

void nGuiSkin::SetTitleTextColor const vector4 c  )  [inline]
 

set title text color

Definition at line 181 of file nguiskin.h.

const vector4 & nGuiSkin::GetTitleTextColor  )  const [inline]
 

get title text color

Definition at line 191 of file nguiskin.h.

void nGuiSkin::SetLabelTextColor const vector4 c  )  [inline]
 

set label text color

Definition at line 161 of file nguiskin.h.

const vector4 & nGuiSkin::GetLabelTextColor  )  const [inline]
 

get label text color

Definition at line 171 of file nguiskin.h.

void nGuiSkin::SetEntryTextColor const vector4 c  )  [inline]
 

set text entry text color

Definition at line 141 of file nguiskin.h.

const vector4 & nGuiSkin::GetEntryTextColor  )  const [inline]
 

get text entry text color

Definition at line 151 of file nguiskin.h.

void nGuiSkin::SetMenuTextColor const vector4 c  )  [inline]
 

set menu entry text color

Definition at line 241 of file nguiskin.h.

const vector4 & nGuiSkin::GetMenuTextColor  )  const [inline]
 

get menu entry text color

Definition at line 251 of file nguiskin.h.

void nGuiSkin::SetWindowBorder const rectangle v  )  [inline]
 

set window broder size

Definition at line 261 of file nguiskin.h.

const rectangle & nGuiSkin::GetWindowBorder  )  const [inline]
 

get window border size

Definition at line 271 of file nguiskin.h.

void nGuiSkin::SetWindowFont const char *  fnt  )  [inline]
 

set window font

Definition at line 361 of file nguiskin.h.

const char * nGuiSkin::GetWindowFont  )  const [inline]
 

get window font

Definition at line 372 of file nguiskin.h.

void nGuiSkin::SetButtonFont const char *  fnt  )  [inline]
 

set button font

Definition at line 382 of file nguiskin.h.

const char * nGuiSkin::GetButtonFont  )  const [inline]
 

get button font

Definition at line 393 of file nguiskin.h.

void nGuiSkin::SetLabelFont const char *  fnt  )  [inline]
 

set label font

Definition at line 403 of file nguiskin.h.

const char * nGuiSkin::GetLabelFont  )  const [inline]
 

get label font

Definition at line 414 of file nguiskin.h.

void nGuiSkin::BeginBrushes  ) 
 

begin adding brushes

Begin adding skin brushes.

Definition at line 54 of file nguiskin_main.cc.

void nGuiSkin::AddBrush const char *  name,
const char *  tex,
const vector2 uvPos,
const vector2 uvSize,
const vector4 color
 

add a skin brush

Add a new skin brush. The brush is defined by its name, the filename of a texture, and a rectangle within the texture in absolute texel coordinates. Adding 2 brushes with identical name is a fatal error.

Parameters:
name the brush name
tex path to texture
uvPos top left position of rectangle in uv space
uvSize size of rectangle in uv space
color modulation color

Definition at line 82 of file nguiskin_main.cc.

void nGuiSkin::AddDynamicBrush const char *  name,
int  width,
int  height
 

Add dynamic brush with name `name'.

Add a dynamic brush. Instead of a texture, the brush uses a render target. An outside source may render into that target (e.g. The Video Server).

Parameters:
name the brush name
width Render target width.
height Render target height.

Definition at line 115 of file nguiskin_main.cc.

void nGuiSkin::EndBrushes  ) 
 

end adding brushes

Finish adding brushes.

Definition at line 64 of file nguiskin_main.cc.

nGuiResource * nGuiSkin::FindBrush const char *  name  ) 
 

lookup gui resource for a brush

Find a brush's GUI resource by its name. Returns a 0 pointer if not found.

Definition at line 137 of file nguiskin_main.cc.

void nGuiSkin::AddSoundObject const char *  name,
const char *  filename
 

add a sound object

Get pointer to sound object, initialize sound on demand, returns 0 if sound filename not set.

Definition at line 159 of file nguiskin_main.cc.

nSound3 * nGuiSkin::GetSoundObject const char *  name  ) 
 

get sound object

Get pointer to sound object, initialize sound on demand, returns 0 if sound filename not set.

Definition at line 187 of file nguiskin_main.cc.

const char * nGuiSkin::GetSound const char *  name  )  const
 

get sound filename associated with the name

Get the filename associated with that sound name

Definition at line 211 of file nguiskin_main.cc.

void nGuiSkin::SetSoundVolume const char *  name,
float  volume
 

set volume for sounds objects

Definition at line 222 of file nguiskin_main.cc.

float nGuiSkin::GetSoundVolume const char *  name  ) 
 

get volume for sound object

Definition at line 235 of file nguiskin_main.cc.


The documentation for this class was generated from the following files:

Copyright © 1999-2005 by the contributing authors. Ideas, requests, problems: Send feedback.