Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | Related Pages | Examples

fgl::FGListBoxTemplate< T > Class Template Reference

#include <listbox.h>

Inheritance diagram for fgl::FGListBoxTemplate< T >:

Inheritance graph
[legend]
Collaboration diagram for fgl::FGListBoxTemplate< T >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<typename T>
class fgl::FGListBoxTemplate< T >

Common abstract template for all LISTBOX based objects. For using you must instantiate this one with particular object type - it generates object of the container type (std::vector).


Public Member Functions

 FGListBoxTemplate (int xs, int ys, int w, int h, int DropDown, FGWindow *wind, FGListBoxCallBack show_cb, void *user_ptr=0)
void DisableUpdate (void)
void Update (void)
void erase (int i)
void clear (void)
void insert (T s)
void insert (int i, T s)
void replace (int i, T s)
const T & item (int i) const

Protected Types

typedef std::vector< T
>::iterator 
Iter

Protected Member Functions

virtual void DrawItem (int x, int y, int index, int flag)

Protected Attributes

std::vector< T > items
int update
FGListBoxCallBack show
void * user_data


Constructor & Destructor Documentation

template<typename T>
fgl::FGListBoxTemplate< T >::FGListBoxTemplate int  xs,
int  ys,
int  w,
int  h,
int  DropDown,
FGWindow wind,
FGListBoxCallBack  show_cb,
void *  user_ptr = 0
[inline]
 

Create the visual container of the type T.

Parameters:
xs  x coordinate in thw window
ys  y coordinate in thw window
w  visual width
h  visual height
DropDown  number of lines
wind  parent window
show_cb  callback procedure of type FGListBoxCallBack
user_ptr  your data ptr


Member Function Documentation

template<typename T>
void fgl::FGListBoxTemplate< T >::clear void   )  [inline]
 

Set null state.

template<typename T>
void fgl::FGListBoxTemplate< T >::DisableUpdate void   )  [inline]
 

Disable visual update for of objects.

template<typename T>
void fgl::FGListBoxTemplate< T >::erase int  i  )  [inline]
 

Erase the item at index 'i' from the container.

template<typename T>
void fgl::FGListBoxTemplate< T >::insert int  i,
s
[inline]
 

Insert the item 's' at the index 'i' to the container.

template<typename T>
void fgl::FGListBoxTemplate< T >::insert s  )  [inline]
 

Insert the item 's' to the container.

template<typename T>
void fgl::FGListBoxTemplate< T >::replace int  i,
s
[inline]
 

Replace the item 's' at the index 'i' in the container.

template<typename T>
void fgl::FGListBoxTemplate< T >::Update void   )  [inline]
 

Update uncoditionally visual of objects. This method also enable visual update.


Generated on Wed Feb 9 11:31:56 2005 for OpenGUI by  doxygen 1.4.0