C4 Engine
C4 Engine API Documentation

class ListWidget

Defined in:  C4Widgets.h
The ListWidget class represents an interface widget that displays a list box.
Definition

class ListWidget : public RenderableWidget

Member Functions
ListWidget::GetListFlags Returns the list flags.
ListWidget::SetListFlags Sets the list flags.
ListWidget::GetItemSpacing Returns the vertical list item spacing.
ListWidget::SetItemSpacing Sets the vertical list item spacing.
ListWidget::GetNaturalListItemSize Returns the natural size for a list item.
 
ListWidget::GetListItemCount Returns the number of items in a list.
ListWidget::GetListItem Returns the list item with a specific index.
ListWidget::GetFirstListItem Returns the first item in a list.
ListWidget::GetLastListItem Returns the last item in a list.
ListWidget::SetDisplayIndex Scrolls a list widget so that a specific item is displayed at the top.
ListWidget::RevealListItem Scrolls a list widget to reveal a specific item.
 
ListWidget::GetSelectedListItemCount Returns the number of items that are currently selected in a list.
ListWidget::GetSelectedListItem Returns the selected list item with a specific index.
ListWidget::GetFirstSelectedListItem Returns the first selected item in a list.
ListWidget::GetLastSelectedListItem Returns the last selected item in a list.
ListWidget::GetPreviousSelectedListItem Returns the previous selected item in a list.
ListWidget::GetNextSelectedListItem Returns the next selected item in a list.
ListWidget::SelectListItem Selects an item in a list.
ListWidget::UnselectListItem Unselects an item in a list.
ListWidget::SelectAllListItems Selects all items in a list.
ListWidget::UnselectAllListItems Unselects all items in a list.
 
ListWidget::PrependListItem Adds an item to the beginning of a list.
ListWidget::AppendListItem Adds an item to the end of a list.
Constructor

ListWidget(const Vector2D& size, float spacing = 13.0F, const char *font = "font/Regular", float em = kDefaultFontSize);

Parameters
size The size of the list box, in pixels.
spacing The vertical distance from between one list item and the next.
font The name of the font in which text-only list items are displayed.
em The em size of the font, in pixels.
Description
The ListWidget class is used to display a box that contains a scrollable list of other widgets.

The default widget color corresponds to the kWidgetColorBorder color type and determines the color of the list's border. Other color types supported by the list widget are kWidgetColorBackground and kWidgetColorHilite. If a highlight color has not been explicitly specified, then the Interface Manager's global highlight color is used.
Base Classes
RenderableWidget All rendered interface widgets are subclasses of RenderableWidget.
See Also

TreeWidget

TableWidget

Wiki Articles

List Widget