# WoopsiUI::FileListBoxDataItem Class Reference

`#include <filelistboxdataitem.h>`

Inheritance diagram for WoopsiUI::FileListBoxDataItem:

List of all members.

## 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

## Detailed Description

Class representing a data item within a file requester list.

## Constructor & Destructor Documentation

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.

Parameters:

  | 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.

## Member Function Documentation

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.

Parameters:

  | item | An item to compare this object with.

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.

Reimplemented from WoopsiUI::ListDataItem.

const bool WoopsiUI::FileListBoxDataItem::isDirectory | ( |  | ) | const`[inline]`

Check if the item is a directory.

Returns:
  True if the item is a directory; false if the item is a file.

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

- filelistboxdataitem.h