ShopListBox Class Reference
[Core GUI related classes (widgets)]

#include <shoplistbox.h>

Inheritance diagram for ShopListBox:

ListBox

List of all members.


Detailed Description

A list box, meant to be used inside a scroll area.

Same as the Guichan list box except this one doesn't have a background, instead completely relying on the scroll area. It also adds selection listener functionality.

Definition at line 36 of file shoplistbox.h.


Public Member Functions

 ShopListBox (gcn::ListModel *listModel)
 Constructor.
 ShopListBox (gcn::ListModel *listModel, ShopItems *shopListModel)
 Constructor with shopitems.
void draw (gcn::Graphics *graphics)
 Draws the list box.
unsigned int getRowHeight () const
 Returns the height of a row.
void setPlayersMoney (int money)
 gives information about the current player's money
void adjustSize ()
 Adjust List draw size.
void setPriceCheck (bool check)
 Set on/off the disabling of too expensive items.

Private Attributes

int mPlayerMoney
ShopItemsmShopItems
 Keeps another pointer to the same listModel, permitting to use the ShopItems specific functions.
unsigned int mRowHeight
 Row Height.
bool mPriceCheck

Static Private Attributes

static float mAlpha = 1.0

Constructor & Destructor Documentation

ShopListBox::ShopListBox ( gcn::ListModel *  listModel  ) 

Constructor.

Definition at line 37 of file shoplistbox.cpp.

ShopListBox::ShopListBox ( gcn::ListModel *  listModel,
ShopItems shopListModel 
)

Constructor with shopitems.

Definition at line 45 of file shoplistbox.cpp.


Member Function Documentation

void ShopListBox::draw ( gcn::Graphics *  graphics  ) 

Draws the list box.

Reimplemented from ListBox.

Definition at line 59 of file shoplistbox.cpp.

unsigned int ShopListBox::getRowHeight (  )  const [inline]

Returns the height of a row.

Definition at line 57 of file shoplistbox.h.

void ShopListBox::setPlayersMoney ( int  money  ) 

gives information about the current player's money

Definition at line 54 of file shoplistbox.cpp.

void ShopListBox::adjustSize (  ) 

Adjust List draw size.

Definition at line 117 of file shoplistbox.cpp.

void ShopListBox::setPriceCheck ( bool  check  ) 

Set on/off the disabling of too expensive items.

(Good for selling mode.)

Definition at line 125 of file shoplistbox.cpp.


Member Data Documentation

Definition at line 76 of file shoplistbox.h.

Keeps another pointer to the same listModel, permitting to use the ShopItems specific functions.

Definition at line 82 of file shoplistbox.h.

unsigned int ShopListBox::mRowHeight [private]

Row Height.

Definition at line 84 of file shoplistbox.h.

float ShopListBox::mAlpha = 1.0 [static, private]

Reimplemented from ListBox.

Definition at line 86 of file shoplistbox.h.

bool ShopListBox::mPriceCheck [private]

Definition at line 88 of file shoplistbox.h.


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

Generated on Sun Apr 26 17:30:44 2009 for The Mana World by  doxygen 1.5.5