GuiGameListMenuProfile Class Reference

#include <guiGameListMenuCtrl.h>

Inheritance diagram for GuiGameListMenuProfile:

Inheritance graph
[legend]
List of all members.

Detailed Description

A gui profile with additional fields specific to GuiGameListMenuCtrl.


Public Types

 TEX_NORMAL = 0
 texture index for a normal, unselected row
 TEX_SELECTED = 1
 texture index for a selected row
 TEX_HIGHLIGHT = 2
 texture index for a highlighted row (moused over, not selected)
 TEX_DISABLED = 3
 texture index for a disabled row
 TEX_L_ARROW_OFF = 4
 texture index for the left arrow of an unselected row
 TEX_L_ARROW_ON = 5
 texture index for the left arrow of a selected row
 TEX_R_ARROW_OFF = 6
 texture index for the right arrow of an unselected row
 TEX_R_ARROW_ON = 7
 texture index for the right arrow of a selected row
 TEX_FIRST_ARROW = 4
 texture index for the first arrow
 TEX_FIRST_ICON = 8
 texture index for the first row marker icon
enum  {
  TEX_NORMAL = 0,
  TEX_SELECTED = 1,
  TEX_HIGHLIGHT = 2,
  TEX_DISABLED = 3,
  TEX_L_ARROW_OFF = 4,
  TEX_L_ARROW_ON = 5,
  TEX_R_ARROW_OFF = 6,
  TEX_R_ARROW_ON = 7,
  TEX_FIRST_ARROW = 4,
  TEX_FIRST_ICON = 8
}

Public Member Functions

virtual void enforceConstraints ()
 Enforces range constraints on all required fields.
S32 getRowHeight ()
 Get the height of rows in this profile.
S32 getRowWidth ()
 Get the width of rows in this profile.
const Point2FgetRowScale () const
 Row scale is the ratio between the defined row size and the raw size of the bitmap.
Point2I getIconExtent ()
 Gets the extent of icons for this profile.
Point2I getArrowExtent ()
 Gets the extent of arrows for this profile.
Point2I getHitAreaExtent ()
 Gets the extent of the defined hit area for this profile.
bool hasArrows ()
 Determines if this profile has textures for the left and right arrows.
bool onAdd ()
 Callback when the object is registered with the sim.
 GuiGameListMenuProfile ()
 DECLARE_CONOBJECT (GuiGameListMenuProfile)

Static Public Member Functions

static void initPersistFields ()
 Initializes fields accessible through the console.

Public Attributes

Point2I mHitAreaUpperLeft
 Offset for the upper left corner of the hit area.
Point2I mHitAreaLowerRight
 Offset for the lower right corner of the hit area.
Point2I mIconOffset
 Offset for a row's extra icon.
Point2I mRowSize
 The base size of a row.

Private Types

typedef GuiControlProfile Parent

Private Attributes

Point2F mRowScale
 Ratio of row size to actual bitmap size.


Member Typedef Documentation

Reimplemented from GuiControlProfile.

Reimplemented in GuiGameListOptionsProfile.


Member Enumeration Documentation

anonymous enum

Enumerator:
TEX_NORMAL  texture index for a normal, unselected row
TEX_SELECTED  texture index for a selected row
TEX_HIGHLIGHT  texture index for a highlighted row (moused over, not selected)
TEX_DISABLED  texture index for a disabled row
TEX_L_ARROW_OFF  texture index for the left arrow of an unselected row
TEX_L_ARROW_ON  texture index for the left arrow of a selected row
TEX_R_ARROW_OFF  texture index for the right arrow of an unselected row
TEX_R_ARROW_ON  texture index for the right arrow of a selected row
TEX_FIRST_ARROW  texture index for the first arrow
TEX_FIRST_ICON  texture index for the first row marker icon


Constructor & Destructor Documentation

GuiGameListMenuProfile::GuiGameListMenuProfile (  ) 


Member Function Documentation

virtual void GuiGameListMenuProfile::enforceConstraints (  )  [virtual]

Enforces range constraints on all required fields.

Reimplemented in GuiGameListOptionsProfile.

S32 GuiGameListMenuProfile::getRowHeight (  )  [inline]

Get the height of rows in this profile.

All rows are considered to be the same base height. Rows can have an extra amount of y padding defined when they are added to the control.

Returns:
The height of rows in this profile.

S32 GuiGameListMenuProfile::getRowWidth (  )  [inline]

Get the width of rows in this profile.

All rows are considered to be the same width.

Returns:
The width of rows in this profile.

const Point2F& GuiGameListMenuProfile::getRowScale (  )  const [inline]

Row scale is the ratio between the defined row size and the raw size of the bitmap.

Returns:
The row scale.

Point2I GuiGameListMenuProfile::getIconExtent (  ) 

Gets the extent of icons for this profile.

If there are no icons you will get a point of (0, 0);

Returns:
The extent of icons or (0, 0) if there aren't any.

Point2I GuiGameListMenuProfile::getArrowExtent (  ) 

Gets the extent of arrows for this profile.

If there are no arrows you will get a point of (0, 0).

Returns:
The extent of icons or (0, 0) if there aren't any.

Point2I GuiGameListMenuProfile::getHitAreaExtent (  ) 

Gets the extent of the defined hit area for this profile.

If the hit area is not defined then it defaults to the full size of a row.

Returns:
The extents of the defined hit area or the full size of the row.

bool GuiGameListMenuProfile::hasArrows (  )  [inline]

Determines if this profile has textures for the left and right arrows.

Returns:
True if the profile's bitmap has textures for the arrows, false otherwise.

bool GuiGameListMenuProfile::onAdd (  )  [virtual]

Callback when the object is registered with the sim.

Returns:
True if the profile was successfully added, false otherwise.

Reimplemented from GuiControlProfile.

GuiGameListMenuProfile::DECLARE_CONOBJECT ( GuiGameListMenuProfile   ) 

static void GuiGameListMenuProfile::initPersistFields (  )  [static]

Initializes fields accessible through the console.

Reimplemented from GuiControlProfile.

Reimplemented in GuiGameListOptionsProfile.


Member Data Documentation

Offset for the upper left corner of the hit area.

Offset for the lower right corner of the hit area.

Offset for a row's extra icon.

The base size of a row.

Ratio of row size to actual bitmap size.