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

# ListBox.h

Go to the documentation of this file.

    00001
    00002
    00003
    00004 #ifndef LISTBOX_H
    00005 #define LISTBOX_H
    00006
    00007 #include "Control.h"
    00008
    00009 namespace wkgl {
    00010
    00014 #define END -1
    00015
    00075 class ListBox : public Control
    00076 {
    00077   public:
    00081     ListBox( int x, int y, int w, int h,
    00082                const char *data = NULL, int ndata = 0 );
    00083
    00086     ~ListBox();
    00087
    00091     void addString( const char* text, int index = END );
    00092
    00096     void addStrings( const char* text[], int ntext, int index = END );
    00097
    00101     void removeString( int index );
    00102
    00106     char *getString( int index );
    00107
    00111     char *operator[]( int index );
    00112
    00116     int getNumberOfItems();
    00117
    00121     char* getSelectedString();
    00122
    00126     int getSelectedIndex();
    00127
    00128     virtual BOOL create( Control *parent );
    00129 };
    00130 }
    00131 #endif