Woopsi 1.3
Nintendo DS Gui Framework
Public Member Functions
WoopsiUI::ListBoxBase Class Reference

#include <libwoopsi/include/listboxbase.h>

Inheritance diagram for WoopsiUI::ListBoxBase:
WoopsiUI::ListBox WoopsiUI::ScrollingListBox

List of all members.

Public Member Functions

virtual void addOption (const WoopsiString &text, const u32 value)=0
virtual void addOption (ListBoxDataItem *option)=0
virtual void removeOption (const s32 index)=0
virtual void removeAllOptions ()=0
virtual void addOption (const WoopsiString &text, const u32 value, const u16 normalTextColour, const u16 normalBackColour, const u16 selectedTextColour, const u16 selectedBackColour)=0
virtual void selectOption (const s32 index)=0
virtual void deselectOption (const s32 index)=0
virtual void selectAllOptions ()=0
virtual void deselectAllOptions ()=0
virtual const s32 getSelectedIndex () const =0
virtual void setSelectedIndex (const s32 index)=0
virtual const ListBoxDataItemgetSelectedOption () const =0
virtual void setAllowMultipleSelections (const bool allowMultipleSelections)=0
virtual const bool allowsMultipleSelections () const =0
virtual const ListBoxDataItemgetOption (const s32 index)=0
virtual void sort ()=0
virtual const s32 getOptionCount () const =0
virtual const u16 getOptionHeight () const =0
virtual void setSortInsertedItems (const bool sortInsertedItems)=0
virtual ~ListBoxBase ()

Detailed Description

Defines the interface for ListBox classes.


Constructor & Destructor Documentation

virtual WoopsiUI::ListBoxBase::~ListBoxBase ( ) [inline, virtual]

Destructor.


Member Function Documentation

virtual void WoopsiUI::ListBoxBase::addOption ( const WoopsiString text,
const u32  value 
) [pure virtual]

Add a new option to the gadget using default colours.

Parameters:
textText to show in the option.
valueThe value of the option.

Implemented in WoopsiUI::ListBox, and WoopsiUI::ScrollingListBox.

virtual void WoopsiUI::ListBoxBase::addOption ( ListBoxDataItem option) [pure virtual]

Add an option to the gadget.

Parameters:
optionThe option to add.

Implemented in WoopsiUI::ListBox, and WoopsiUI::ScrollingListBox.

virtual void WoopsiUI::ListBoxBase::addOption ( const WoopsiString text,
const u32  value,
const u16  normalTextColour,
const u16  normalBackColour,
const u16  selectedTextColour,
const u16  selectedBackColour 
) [pure virtual]

Add a new option to the gadget.

Parameters:
textText to show in the option.
valueThe value of the option.
normalTextColourColour to draw the text with when not selected.
normalBackColourColour to draw the background with when not selected.
selectedTextColourColour to draw the text with when selected.
selectedBackColourColour to draw the background with when selected.

Implemented in WoopsiUI::ListBox, and WoopsiUI::ScrollingListBox.

virtual const bool WoopsiUI::ListBoxBase::allowsMultipleSelections ( ) const [pure virtual]

Sets whether multiple selections are possible or not.

Returns:
True if multiple selections are allowed.

Implemented in WoopsiUI::ListBox, and WoopsiUI::ScrollingListBox.

virtual void WoopsiUI::ListBoxBase::deselectAllOptions ( ) [pure virtual]

Deselect all options. Raises a value changed event.

Implemented in WoopsiUI::ListBox, and WoopsiUI::ScrollingListBox.

virtual void WoopsiUI::ListBoxBase::deselectOption ( const s32  index) [pure virtual]

Select an option by its index. Raises a value changed event.

Parameters:
indexThe index of the option to select.

Implemented in WoopsiUI::ListBox, and WoopsiUI::ScrollingListBox.

virtual const ListBoxDataItem* WoopsiUI::ListBoxBase::getOption ( const s32  index) [pure virtual]

Get the specified option.

Returns:
The specified option.

Implemented in WoopsiUI::ListBox, and WoopsiUI::ScrollingListBox.

virtual const s32 WoopsiUI::ListBoxBase::getOptionCount ( ) const [pure virtual]

Get the total number of options.

Returns:
The number of options.

Implemented in WoopsiUI::ListBox, and WoopsiUI::ScrollingListBox.

virtual const u16 WoopsiUI::ListBoxBase::getOptionHeight ( ) const [pure virtual]

Get the height of a single option.

Returns:
The height of an option.

Implemented in WoopsiUI::ListBox, and WoopsiUI::ScrollingListBox.

virtual const s32 WoopsiUI::ListBoxBase::getSelectedIndex ( ) const [pure virtual]

Get the selected index. Returns -1 if nothing is selected. If more than one option is selected, the index of the first selected option is returned.

Returns:
The selected index.

Implemented in WoopsiUI::ListBox, and WoopsiUI::ScrollingListBox.

virtual const ListBoxDataItem* WoopsiUI::ListBoxBase::getSelectedOption ( ) const [pure virtual]

Get the selected option. Returns NULL if nothing is selected.

Returns:
The selected option.

Implemented in WoopsiUI::ListBox, and WoopsiUI::ScrollingListBox.

virtual void WoopsiUI::ListBoxBase::removeAllOptions ( ) [pure virtual]

Remove all options from the gadget.

Implemented in WoopsiUI::ListBox, and WoopsiUI::ScrollingListBox.

virtual void WoopsiUI::ListBoxBase::removeOption ( const s32  index) [pure virtual]

Remove an option from the gadget by its index.

Parameters:
indexThe index of the option to remove.

Implemented in WoopsiUI::ListBox, and WoopsiUI::ScrollingListBox.

virtual void WoopsiUI::ListBoxBase::selectAllOptions ( ) [pure virtual]

Select all options. Does nothing if the listbox does not allow multiple selections. Raises a value changed event.

Implemented in WoopsiUI::ListBox, and WoopsiUI::ScrollingListBox.

virtual void WoopsiUI::ListBoxBase::selectOption ( const s32  index) [pure virtual]

Select an option by its index. Raises a value changed event.

Parameters:
indexThe index of the option to select.

Implemented in WoopsiUI::ListBox, and WoopsiUI::ScrollingListBox.

virtual void WoopsiUI::ListBoxBase::setAllowMultipleSelections ( const bool  allowMultipleSelections) [pure virtual]

Sets whether multiple selections are possible or not.

Parameters:
allowMultipleSelectionsTrue to allow multiple selections.

Implemented in WoopsiUI::ListBox, and WoopsiUI::ScrollingListBox.

virtual void WoopsiUI::ListBoxBase::setSelectedIndex ( const s32  index) [pure virtual]

Sets the selected index. Specify -1 to select nothing. Resets any other selected options to deselected. Raises a value changed event.

Parameters:
indexThe selected index.

Implemented in WoopsiUI::ListBox, and WoopsiUI::ScrollingListBox.

virtual void WoopsiUI::ListBoxBase::setSortInsertedItems ( const bool  sortInsertedItems) [pure virtual]

Sets whether or not items added to the list are automatically sorted on insert or not.

Parameters:
sortInsertedItemsTrue to enable sort on insertion.

Implemented in WoopsiUI::ListBox, and WoopsiUI::ScrollingListBox.

virtual void WoopsiUI::ListBoxBase::sort ( ) [pure virtual]

Sort the options alphabetically by the text of the options.

Implemented in WoopsiUI::ListBox, and WoopsiUI::ScrollingListBox.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Enumerations Enumerator