Woopsi 1.0
GUI Framework for Nintendo DS Homebrew
|
#include <listdataitem.h>
Public Member Functions | |
ListDataItem (const WoopsiString &text, const u32 value) | |
virtual | ~ListDataItem () |
const WoopsiString & | getText () const |
const u32 | getValue () const |
const bool | isSelected () const |
void | setSelected (bool selected) |
virtual s8 | compareTo (const ListDataItem *item) const |
Class representing a data item within a list. Intended for use within the ListData class.
WoopsiUI::ListDataItem::ListDataItem | ( | const WoopsiString & | text, |
const u32 | value | ||
) |
Constructor.
text | The text to display in the item. |
value | The value of the item. |
virtual WoopsiUI::ListDataItem::~ListDataItem | ( | ) | [virtual] |
Destructor.
virtual s8 WoopsiUI::ListDataItem::compareTo | ( | const ListDataItem * | item | ) | const [virtual] |
Compare the item with another. Comparison is based on the text of the item. Returns 0 if the text in the two items is the same, a value less than 0 if this item is less than the argument, and a value greater than 0 if this item is greater than the argument.
item | An item to compare this object with. |
Reimplemented in WoopsiUI::FileListBoxDataItem.
const WoopsiString& WoopsiUI::ListDataItem::getText | ( | ) | const [inline] |
Get the item's text.
const u32 WoopsiUI::ListDataItem::getValue | ( | ) | const [inline] |
Get the item's value.
const bool WoopsiUI::ListDataItem::isSelected | ( | ) | const [inline] |
Get the item's selection state.
void WoopsiUI::ListDataItem::setSelected | ( | bool | selected | ) | [inline] |
Set the item's selection state.
selected | True to select the item; false to deselect it. |