Public Member Functions | Public Attributes

fl7::faces::ListBox Class Reference

#include <ListBox.h>

Inheritance diagram for fl7::faces::ListBox:
fl7::faces::Fusion fl7::faces::Collection fl7::faces::Face

List of all members.

Public Member Functions

 ListBox (Shell *const shell)
virtual ~ListBox (void)
bool GetMultiple () const
bool IsScrollable () const
void SetMultiple (bool multiple)
size_t GetSelectionCount () const
bool IsItemSelected (int index) const
void SelectItem (int index)
void DeselectItem (int index)
void SelectNone ()
int GetSelectedIndex () const
void SetSelectedIndex (int index)
size_t GetItemCount () const
bool ContainsItem (const items::ListItem &item) const
int FindItem (const items::ListItem &item) const
const items::ListItemGetItem (int index) const
items::ListItemGetItem (int index)
void SetItem (int index, const items::ListItem &item)
void AddItem (const items::ListItem &item)
void InsertItem (const items::ListItem &item, int index)
void RemoveItem (int index)
void ClearItems ()

Public Attributes

events::EventHandler
< events::ItemEventArgs
OnAddItemEventHandler
events::EventHandler
< events::ItemEventArgs
OnRemoveItemEventHandler
events::EventHandler
< events::ItemEventArgs
OnSetItemEventHandler
events::EventHandler
< events::ItemEventArgs
OnSelectItemEventHandler
events::EventHandler
< events::ItemEventArgs
OnDeselectItemEventHandler

Constructor & Destructor Documentation

fl7::faces::ListBox::ListBox ( Shell *const   shell  ) 

Explicit constructor.

fl7::faces::ListBox::~ListBox ( void   )  [virtual]

Destructor.


Member Function Documentation

void fl7::faces::ListBox::AddItem ( const items::ListItem item  ) 

Adds a given item to this list box.

void fl7::faces::ListBox::ClearItems (  ) 

Removes all items from this list box.

bool fl7::faces::ListBox::ContainsItem ( const items::ListItem item  )  const [inline]

Checks whether a given item is contained in this list box.

void fl7::faces::ListBox::DeselectItem ( int  index  ) 

Deselect the item identified by the given index.

int fl7::faces::ListBox::FindItem ( const items::ListItem item  )  const

Finds a given item and returns its index in this list box. The function returns -1 if the given item was not found.

Finds a given item string and returns its index in this list box. The function returns -1 if the given item string was not found.

const items::ListItem & fl7::faces::ListBox::GetItem ( int  index  )  const

Returns the item at the given index in this list box.

items::ListItem & fl7::faces::ListBox::GetItem ( int  index  ) 

Returns the item at the given index in this list box.

size_t fl7::faces::ListBox::GetItemCount (  )  const [inline]

Returns the number of items contained in this list box.

bool fl7::faces::ListBox::GetMultiple (  )  const [inline]

Returns the flag indicating whether multiple items may be selected.

int fl7::faces::ListBox::GetSelectedIndex (  )  const

Returns the index of the (first) currently selected item. If no item is selected, the function will return -1.

size_t fl7::faces::ListBox::GetSelectionCount (  )  const [inline]

Returns the number of selected items.

void fl7::faces::ListBox::InsertItem ( const items::ListItem item,
int  index 
)

Adds a given item to this list box inserting it at the given index. If the index is negative or greater than the current number of items, the function will have no effect.

bool fl7::faces::ListBox::IsItemSelected ( int  index  )  const

Checks whether the item identified by the given index is selected.

bool fl7::faces::ListBox::IsScrollable (  )  const

Returns true, if the list box is too small to display all of the contained items. The list has to be scrolled to allow access to all items.

Reimplemented from fl7::faces::Face.

void fl7::faces::ListBox::RemoveItem ( int  index  ) 

Removes the item at the given index from this list box.

void fl7::faces::ListBox::SelectItem ( int  index  ) 

Selects the item identified by the given index. If the given index is less than zero, all items will loose their selection state. If only one single item may be selected, the possibly previous selected item will loose its selection.

void fl7::faces::ListBox::SelectNone (  ) 

Deselects all items of this list box.

void fl7::faces::ListBox::SetItem ( int  index,
const items::ListItem item 
)

Updates the item at the given index in this list box. (If the given index is not valid the function has no effect).

void fl7::faces::ListBox::SetMultiple ( bool  multiple  ) 

Sets the flag indicating whether multiple items may be selected. If the flag is set to false and multiple items are selected, only the first selection remains.

void fl7::faces::ListBox::SetSelectedIndex ( int  index  )  [inline]

Sets the index of the currently selected item. If the given index is less than zero, all items will loose their selection state. If only one single item may be selected, the possibly previous selected item will loose its selection.


Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines