Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ndk::list_box Class Reference

Inheritance diagram for ndk::list_box:

Inheritance graph
[legend]
Collaboration diagram for ndk::list_box:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 list_box (panel *parent=0)
virtual void resize (unsigned int w, unsigned int h)
unsigned int size ()
template<class U> void add (const std::string &name)
void add (const std::string &name)
void remove (unsigned int num)
void set_current (unsigned int num)
unsigned int current ()
buttoncurrent_item ()
virtual void draw ()

Private Member Functions

event::result at_system (const event &)
event::result at_mouse (const mouse &)

Private Attributes

vertical_lister lister_
v_scroll_bar bar_

Detailed Description

This is fully functional listbox widget with vertical scrollbar Note, that this widget cannot shrink items, so you need to determine appropriate size of ListBox itself

Todo:
made version with more fast drawing and correct refresh


Constructor & Destructor Documentation

list_box::list_box panel parent = 0  ) 
 


Member Function Documentation

void ndk::list_box::add const std::string &  name  )  [inline]
 

template<class U>
void ndk::list_box::add const std::string &  name  )  [inline]
 

event::result list_box::at_mouse const mouse  )  [private]
 

event::result list_box::at_system const event  )  [private]
 

Reimplemented from ndk::panel.

unsigned int list_box::current  ) 
 

Returns:
number of current item

button * list_box::current_item  ) 
 

Returns:
current item

void list_box::draw  )  [virtual]
 

draw both lister and a scrollbar

Reimplemented from ndk::panel.

void list_box::remove unsigned int  num  ) 
 

void list_box::resize unsigned int  w,
unsigned int  h
[virtual]
 

void list_box::set_current unsigned int  num  ) 
 

unsigned int list_box::size  ) 
 


Member Data Documentation

v_scroll_bar ndk::list_box::bar_ [private]
 

scrollbar

vertical_lister ndk::list_box::lister_ [private]
 

list with objects


The documentation for this class was generated from the following files:
Generated on Fri Jun 4 16:20:57 2004 for NDK++ by doxygen 1.3.6