#include <filelistboxdataitem.h>
Public Member Functions | |
FileListBoxDataItem (const char *text, const u32 value, const u16 normalTextColour, const u16 normalBackColour, const u16 selectedTextColour, const u16 selectedBackColour, const bool isDirectory) | |
const bool | isDirectory () const |
virtual s8 | compareTo (const ListDataItem *item) const |
Class representing a data item within a file requester list.
WoopsiUI::FileListBoxDataItem::FileListBoxDataItem | ( | const char * | text, | |
const u32 | value, | |||
const u16 | normalTextColour, | |||
const u16 | normalBackColour, | |||
const u16 | selectedTextColour, | |||
const u16 | selectedBackColour, | |||
const bool | isDirectory | |||
) |
Constructor.
text | The text to display in the item. | |
value | The value of the item. | |
normalTextColour | Colour to draw the text with when not selected. | |
normalBackColour | Colour to draw the background with when not selected. | |
selectedTextColour | Colour to draw the text with when selected. | |
selectedBackColour | Colour to draw the background with when selected. | |
isDirectory | True indicates that the item is a directory; false indicates that it is a file. |
virtual s8 WoopsiUI::FileListBoxDataItem::compareTo | ( | const ListDataItem * | item | ) | const [virtual] |
Compare the item with another. Comparison is based on the type of the item - directories come before files. If the two items are of the same type, the default text-based comparison is used. 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 from WoopsiUI::ListDataItem.
const bool WoopsiUI::FileListBoxDataItem::isDirectory | ( | ) | const [inline] |
Check if the item is a directory.