Planeshift
Public Member Functions | Protected Member Functions | Protected Attributes

pawsMoney Class Reference

pawsMoney is widget that holds four items slots - for each coin. More...

#include <pawsmoney.h>

List of all members.

Public Member Functions

void Drag (bool dragOn)
void Draw ()
 Draws the widget and all of it's children.
int Get (int coinType)
psMoney Get ()
void Get (int &circles, int &octas, int &hexas, int &trias)
int GetAmount ()
 Returns the amount of money in trias.
bool IsNoAmount ()
 Tells if the amount of money is Zero (null)
void OnUpdateData (const char *dataname, PAWSData &value)
 pawsMoney ()
virtual bool PostSetup ()
 This is called after the widget and all of it's children have been created.
void Set (const psMoney &money)
void Set (int coinType, int count)
void Set (int circles, int octas, int hexas, int trias)
 Get and set amounts of different coins.
void SetContainer (int containerID)
virtual bool Setup (iDocumentNode *node)
 Setup this widget.

Protected Member Functions

bool CreateGUI ()
 Loads pawsMoney widget content from file.
void RecalculateAmount ()
 Called when amount of a coin (hexa, octa ... ) is changed.

Protected Attributes

int amount
 The total amount of money in trias.
bool border
 should the slot widgets have border ?
pawsSlotcircles
pawsSlothexas
pawsSlotoctas
int spacing
 distance between slots
pawsSlottrias

Detailed Description

pawsMoney is widget that holds four items slots - for each coin.

It is connected to drag'n'drop system.

Definition at line 36 of file pawsmoney.h.


Constructor & Destructor Documentation

pawsMoney::pawsMoney ( )

Member Function Documentation

bool pawsMoney::CreateGUI ( ) [protected]

Loads pawsMoney widget content from file.

void pawsMoney::Drag ( bool  dragOn)
void pawsMoney::Draw ( ) [virtual]

Draws the widget and all of it's children.

Remarks:
Uses clipping rect of it's parent to define drawing area. If the drawing area defined is empty it returns.

Reimplemented from pawsWidget.

psMoney pawsMoney::Get ( )
void pawsMoney::Get ( int circles,
int octas,
int hexas,
int trias 
)
int pawsMoney::Get ( int  coinType)
int pawsMoney::GetAmount ( ) [inline]

Returns the amount of money in trias.

Definition at line 53 of file pawsmoney.h.

bool pawsMoney::IsNoAmount ( )

Tells if the amount of money is Zero (null)

void pawsMoney::OnUpdateData ( const char *  dataname,
PAWSData value 
) [virtual]

Reimplemented from pawsWidget.

virtual bool pawsMoney::PostSetup ( ) [virtual]

This is called after the widget and all of it's children have been created.

Remarks:
This can be useful for widgets that want to get pointers to some of it's children for quick access.

Reimplemented from pawsWidget.

void pawsMoney::RecalculateAmount ( ) [protected]

Called when amount of a coin (hexa, octa ... ) is changed.

void pawsMoney::Set ( int  circles,
int  octas,
int  hexas,
int  trias 
)

Get and set amounts of different coins.

void pawsMoney::Set ( const psMoney money)
void pawsMoney::Set ( int  coinType,
int  count 
)
void pawsMoney::SetContainer ( int  containerID)
virtual bool pawsMoney::Setup ( iDocumentNode *  ) [virtual]

Setup this widget.

Reimplemented from pawsWidget.


Member Data Documentation

int pawsMoney::amount [protected]

The total amount of money in trias.

Definition at line 73 of file pawsmoney.h.

bool pawsMoney::border [protected]

should the slot widgets have border ?

Reimplemented from pawsWidget.

Definition at line 70 of file pawsmoney.h.

Definition at line 75 of file pawsmoney.h.

pawsSlot* pawsMoney::hexas [protected]

Definition at line 77 of file pawsmoney.h.

pawsSlot* pawsMoney::octas [protected]

Definition at line 76 of file pawsmoney.h.

int pawsMoney::spacing [protected]

distance between slots

Definition at line 71 of file pawsmoney.h.

pawsSlot* pawsMoney::trias [protected]

Definition at line 78 of file pawsmoney.h.


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