C4 Engine Terathon Software C4 Engine API Documentation

• Interface Manager

API Links
Developer Links

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::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::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/Gui");

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.
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, kWidgetColorHilite, and kWidgetColorFocus. If a highlight color or focus color have not been explicitly specified, then the Interface Manager's global highlight color or focus color is used.
Base Classes
RenderableWidget All rendered interface widgets are subclasses of RenderableWidget.