Planeshift
Public Member Functions | Protected Attributes

pawsSlot Class Reference

#include <pawsslot.h>

List of all members.

Public Member Functions

virtual void Clear ()
void clearBartenderAction ()
int ContainerID ()
void Draw ()
 Draws the widget and all of it's children.
void DrawStackCount (bool value)
 Sets if this widget has to draw the stack count.
csString & GetAction ()
bool GetLock ()
const char * GetMaterialName ()
const char * GetMeshFactName ()
int GetPurifyStatus ()
int ID ()
iPawsImageImage ()
const char * ImageName ()
bool IsBartender ()
bool IsDrawingStackCount ()
 Tells if this widget is currently drawing the stack count.
bool IsEmpty ()
bool OnMouseDown (int button, int modifiers, int x, int y)
 Manage mouse down event to test for and apply window changes.
void OnUpdateData (const char *dataname, PAWSData &value)
 pawsSlot ()
void PlaceItem (const char *imageName, const char *meshFactName, const char *matName=NULL, int count=0)
void Reserve ()
void ScalePurifyStatus ()
bool SelfPopulate (iDocumentNode *node)
 This function allows a widget to fill in its own contents from an xml node supplied and calls the same function for all children.
void SetBartender (bool t)
void SetBartenderAction (csString &act)
void SetContainer (int id)
void SetDrag (bool isDragDrop)
void SetEmptyOnZeroCount (bool emptyOnZeroCount)
void SetLock (bool state)
void SetPurifyStatus (int status)
void SetSlotID (int id)
void SetSlotName (const csString &name)
void SetToolTip (const char *text)
 Changes the text for a tool tip.
bool Setup (iDocumentNode *node)
 Setup this widget.
const csString & SlotName () const
void StackCount (int newCount)
int StackCount ()
 ~pawsSlot ()

Protected Attributes

csString action
 This is the action to do if this a bartender button.
int containerID
bool dragDrop
bool drawStackCount
bool empty
bool emptyOnZeroCount
 should the slot clear itself when the stackcount hits 0 ?
bool handleMouseClicks
csRef< iPawsImageimage
bool isBartender
 Flag on if this a special bartender slot.
bool locked
csString materialName
csString meshfactName
psSlotManagermgr
pawsWidgetpurifySign
int purifyStatus
bool reserved
 implemented to fix dequip behaviour. Cleared on PlaceItem and Clear
int slotID
csString slotName
int stackCount
pawsTextBoxstackCountLabel

Detailed Description

Definition at line 19 of file pawsslot.h.


Constructor & Destructor Documentation

pawsSlot::pawsSlot ( )
pawsSlot::~pawsSlot ( )

Member Function Documentation

virtual void pawsSlot::Clear ( ) [virtual]

Reimplemented in pawsGlyphSlot.

void pawsSlot::clearBartenderAction ( ) [inline]

Definition at line 88 of file pawsslot.h.

int pawsSlot::ContainerID ( ) [inline]

Definition at line 58 of file pawsslot.h.

void pawsSlot::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.

void pawsSlot::DrawStackCount ( bool  value)

Sets if this widget has to draw the stack count.

Parameters:
valueSets if the widget has to draw the stack count. True to do so.
csString& pawsSlot::GetAction ( ) [inline]

Definition at line 87 of file pawsslot.h.

bool pawsSlot::GetLock ( ) [inline]

Definition at line 90 of file pawsslot.h.

const char* pawsSlot::GetMaterialName ( ) [inline]

Definition at line 50 of file pawsslot.h.

const char* pawsSlot::GetMeshFactName ( ) [inline]

Definition at line 45 of file pawsslot.h.

int pawsSlot::GetPurifyStatus ( )
int pawsSlot::ID ( ) [inline]

Definition at line 59 of file pawsslot.h.

iPawsImage* pawsSlot::Image ( ) [inline]

Definition at line 42 of file pawsslot.h.

const char* pawsSlot::ImageName ( )
bool pawsSlot::IsBartender ( ) [inline]

Definition at line 83 of file pawsslot.h.

bool pawsSlot::IsDrawingStackCount ( ) [inline]

Tells if this widget is currently drawing the stack count.

Returns:
BOOL TRUE if the widget is drawing the stack count.

Definition at line 75 of file pawsslot.h.

bool pawsSlot::IsEmpty ( ) [inline]

Definition at line 63 of file pawsslot.h.

bool pawsSlot::OnMouseDown ( int  button,
int  modifiers,
int  x,
int  y 
) [virtual]

Manage mouse down event to test for and apply window changes.

Parameters:
buttonType of button: 1 resizable or movable, 2 context menu or config window.
modifiersUsed with PAWS_CONSTRUCTION.
xUsed to test for resize.
yUsed to test for resize.
Returns:
bool TRUE if movable or resizable.
Remarks:
calls OnMouseDown on it's parent.

Reimplemented from pawsWidget.

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

Reimplemented from pawsWidget.

void pawsSlot::PlaceItem ( const char *  imageName,
const char *  meshFactName,
const char *  matName = NULL,
int  count = 0 
)
void pawsSlot::Reserve ( ) [inline]

Definition at line 65 of file pawsslot.h.

void pawsSlot::ScalePurifyStatus ( )
bool pawsSlot::SelfPopulate ( iDocumentNode *  node) [virtual]

This function allows a widget to fill in its own contents from an xml node supplied and calls the same function for all children.

Parameters:
nodeThe xml data for the widget.
Returns:
bool TRUE if no children, FALSE if there are problems with a node.
Remarks:
User should overload this function to populate different types of widgets. Call this base class function to populate children. This is NOT the same as Setup(), which is defining height, width, styles, etc. This is data.

Reimplemented from pawsWidget.

void pawsSlot::SetBartender ( bool  t) [inline]

Definition at line 84 of file pawsslot.h.

void pawsSlot::SetBartenderAction ( csString &  act) [inline]

Definition at line 86 of file pawsslot.h.

void pawsSlot::SetContainer ( int  id) [inline]

Definition at line 28 of file pawsslot.h.

void pawsSlot::SetDrag ( bool  isDragDrop) [inline]

Definition at line 25 of file pawsslot.h.

void pawsSlot::SetEmptyOnZeroCount ( bool  emptyOnZeroCount) [inline]

Definition at line 26 of file pawsslot.h.

void pawsSlot::SetLock ( bool  state) [inline]

Definition at line 91 of file pawsslot.h.

void pawsSlot::SetPurifyStatus ( int  status)
void pawsSlot::SetSlotID ( int  id) [inline]

Definition at line 60 of file pawsslot.h.

void pawsSlot::SetSlotName ( const csString &  name) [inline]

Definition at line 56 of file pawsslot.h.

void pawsSlot::SetToolTip ( const char *  text)

Changes the text for a tool tip.

Parameters:
textThe new text.

Reimplemented from pawsWidget.

bool pawsSlot::Setup ( iDocumentNode *  ) [virtual]

Setup this widget.

Reimplemented from pawsWidget.

const csString& pawsSlot::SlotName ( ) const [inline]

Definition at line 55 of file pawsslot.h.

void pawsSlot::StackCount ( int  newCount)
int pawsSlot::StackCount ( ) [inline]

Definition at line 34 of file pawsslot.h.


Member Data Documentation

csString pawsSlot::action [protected]

This is the action to do if this a bartender button.

Definition at line 114 of file pawsslot.h.

Definition at line 97 of file pawsslot.h.

bool pawsSlot::dragDrop [protected]

Definition at line 102 of file pawsslot.h.

bool pawsSlot::drawStackCount [protected]

Definition at line 103 of file pawsslot.h.

bool pawsSlot::empty [protected]

Definition at line 101 of file pawsslot.h.

bool pawsSlot::emptyOnZeroCount [protected]

should the slot clear itself when the stackcount hits 0 ?

Definition at line 111 of file pawsslot.h.

bool pawsSlot::handleMouseClicks [protected]

Definition at line 110 of file pawsslot.h.

csRef<iPawsImage> pawsSlot::image [protected]

Definition at line 107 of file pawsslot.h.

bool pawsSlot::isBartender [protected]

Flag on if this a special bartender slot.

Definition at line 113 of file pawsslot.h.

bool pawsSlot::locked [protected]

Definition at line 105 of file pawsslot.h.

csString pawsSlot::materialName [protected]

Definition at line 95 of file pawsslot.h.

csString pawsSlot::meshfactName [protected]

Definition at line 94 of file pawsslot.h.

Definition at line 93 of file pawsslot.h.

Definition at line 108 of file pawsslot.h.

Definition at line 100 of file pawsslot.h.

bool pawsSlot::reserved [protected]

implemented to fix dequip behaviour. Cleared on PlaceItem and Clear

Definition at line 104 of file pawsslot.h.

int pawsSlot::slotID [protected]

Definition at line 98 of file pawsslot.h.

csString pawsSlot::slotName [protected]

Definition at line 96 of file pawsslot.h.

Definition at line 99 of file pawsslot.h.

Definition at line 109 of file pawsslot.h.


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