torque Torque Game Engine Documentation
TGE Version 1.5.2

GuiControlProfile Class Reference

#include <guiTypes.h>

Inheritance diagram for GuiControlProfile:

Inheritance graph
[legend]

Detailed Description

A GuiControlProfile is used by every GuiObject and is akin to a datablock.

It is used to control information that does not change or is unlikely to change during execution of a program. It is also a level of abstraction between script and GUI control so that you can use the same control, say a button, and have it look completly different just with a different profile.


Public Types

enum  {
  BaseColor = 0,
  ColorHL,
  ColorNA,
  ColorSEL,
  ColorUser0,
  ColorUser1,
  ColorUser2,
  ColorUser3,
  ColorUser4,
  ColorUser5
}
enum  AlignmentType {
  LeftJustify,
  RightJustify,
  CenterJustify
}

Public Member Functions

 DECLARE_CONOBJECT (GuiControlProfile)
 GuiControlProfile ()
 ~GuiControlProfile ()
bool onAdd ()
 Called when the object is added to the sim.
S32 constructBitmapArray ()
 This method creates an array of bitmaps from one single bitmap with seperator color.
void incRefCount ()
void decRefCount ()

Static Public Member Functions

static void initPersistFields ()
 Register dynamic fields in a subclass of ConsoleObject.

Data Fields

S32 mRefCount
 Used to determine if any controls are using this profile.
bool mTabable
 True if this object is accessable from using the tab key.
bool mCanKeyFocus
 True if the object can be given keyboard focus (in other words, made a first responder.
bool mModal
 True if this is a Modeless dialog meaning it will pass input through instead of taking it all.
bool mOpaque
 True if this object is not translucent.
ColorI mFillColor
 Fill color, this is used to fill the bounds of the control if it is opaque.
ColorI mFillColorHL
 This is used insetead of mFillColor if the object is highlited.
ColorI mFillColorNA
 This is used to instead of mFillColor if the object is not active or disabled.
S32 mBorder
 For most controls, if mBorder is > 0 a border will be drawn, some controls use this to draw different types of borders however.
S32 mBorderThickness
 Border thickness.
ColorI mBorderColor
 Border color, used to draw a border around the bounds if border is enabled.
ColorI mBorderColorHL
 Used instead of mBorderColor when the object is highlited.
ColorI mBorderColorNA
 Used instead of mBorderColor when the object is not active or disabled.
ColorI mBevelColorHL
 Used for the high-light part of the bevel.
ColorI mBevelColorLL
 Used for the low-light part of the bevel.
StringTableEntry mFontType
 Font face name for the control.
S32 mFontSize
 Font size for the control.
ColorI mFontColors [10]
 Array of font colors used for drawText with escape characters for changing color mid-string.
ColorImFontColor
 Main font color.
ColorImFontColorHL
 Highlited font color.
ColorImFontColorNA
 Font color when object is not active/disabled.
ColorImFontColorSEL
 Font color when object/text is selected.
FontCharset mFontCharset
 Font character set.
Resource< GFontmFont
 Font resource.
AlignmentType mAlignment
 Horizontal text alignment.
bool mAutoSizeWidth
 Auto-size the width-bounds of the control to fit it's contents.
bool mAutoSizeHeight
 Auto-size the height-bounds of the control to fit it's contents.
bool mReturnTab
 Used in GuiTextEditCtrl to specify if a tab-event should be simulated when return is pressed.
bool mNumbersOnly
 For text controls, true if this should only accept numerical data.
bool mMouseOverSelected
 True if this object should be "selected" while the mouse is over it.
ColorI mCursorColor
 Color for the blinking cursor in text fields (for example).
Point2I mTextOffset
 Text offset for the control.
StringTableEntry mBitmapName
 Bitmap file name for the bitmap of the control.
TextureHandle mTextureHandle
 Texture handle for the control.
Vector< RectImBitmapArrayRects
 Used for controls which use an array of bitmaps such as checkboxes.
AudioProfilemSoundButtonDown
 Sound played when the object is "down" ie a button is pushed.
AudioProfilemSoundButtonOver
 Sound played when the mouse is over the object.
GuiControlProfilemProfileForChildren
 Profile used with children controls (such as the scroll bar on a popup menu) when defined.

Static Public Attributes

static StringTableEntry sFontCacheDirectory

Private Types

typedef SimObject Parent


Member Typedef Documentation

Reimplemented from SimObject.


Member Enumeration Documentation

anonymous enum

Enumerator:
BaseColor 
ColorHL 
ColorNA 
ColorSEL 
ColorUser0 
ColorUser1 
ColorUser2 
ColorUser3 
ColorUser4 
ColorUser5 

Enumerator:
LeftJustify 
RightJustify 
CenterJustify 


Constructor & Destructor Documentation

GuiControlProfile::GuiControlProfile (  ) 

GuiControlProfile::~GuiControlProfile (  ) 


Member Function Documentation

GuiControlProfile::DECLARE_CONOBJECT ( GuiControlProfile   ) 

static void GuiControlProfile::initPersistFields (  )  [static]

Register dynamic fields in a subclass of ConsoleObject.

See also:
addField(), addFieldV(), addDepricatedField(), addGroup(), endGroup()

Reimplemented from SimObject.

bool GuiControlProfile::onAdd (  )  [virtual]

Called when the object is added to the sim.

Reimplemented from SimObject.

S32 GuiControlProfile::constructBitmapArray (  ) 

This method creates an array of bitmaps from one single bitmap with seperator color.

The seperator color is whatever color is in pixel 0,0 of the bitmap. For an example see darkWindow.png and some of the other UI textures. It returns the number of bitmaps in the array it created It also stores the sizes in the mBitmapArrayRects vector.

void GuiControlProfile::incRefCount (  ) 

void GuiControlProfile::decRefCount (  ) 


Field Documentation

Used to determine if any controls are using this profile.

True if this object is accessable from using the tab key.

True if the object can be given keyboard focus (in other words, made a first responder.

See also:
GuiControl)

True if this is a Modeless dialog meaning it will pass input through instead of taking it all.

True if this object is not translucent.

Fill color, this is used to fill the bounds of the control if it is opaque.

This is used insetead of mFillColor if the object is highlited.

This is used to instead of mFillColor if the object is not active or disabled.

For most controls, if mBorder is > 0 a border will be drawn, some controls use this to draw different types of borders however.

See also:
guiDefaultControlRender.cc

Border color, used to draw a border around the bounds if border is enabled.

Used instead of mBorderColor when the object is highlited.

Used instead of mBorderColor when the object is not active or disabled.

Used for the high-light part of the bevel.

Used for the low-light part of the bevel.

Font face name for the control.

Font size for the control.

Array of font colors used for drawText with escape characters for changing color mid-string.

Highlited font color.

Font color when object is not active/disabled.

Font color when object/text is selected.

Horizontal text alignment.

Auto-size the width-bounds of the control to fit it's contents.

Auto-size the height-bounds of the control to fit it's contents.

Used in GuiTextEditCtrl to specify if a tab-event should be simulated when return is pressed.

For text controls, true if this should only accept numerical data.

True if this object should be "selected" while the mouse is over it.

Color for the blinking cursor in text fields (for example).

Text offset for the control.

Bitmap file name for the bitmap of the control.

Texture handle for the control.

Used for controls which use an array of bitmaps such as checkboxes.

Sound played when the object is "down" ie a button is pushed.

Sound played when the mouse is over the object.

Profile used with children controls (such as the scroll bar on a popup menu) when defined.




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen