1 // puList.hxx - a scrolling PUI list box.
12 # define PUCLASS_LIST 0x80000000 // Hopefully this value will never be used by plib
15 * A scrolling list for PUI.
17 * Believe it or not, PUI does not have one of these.
19 class puList : public puGroup
24 puArrowButton * _up_arrow;
25 puArrowButton * _down_arrow;
27 int _sw; // slider width
31 virtual void init (int w, int h, short transparent);
32 puListBox * _list_box;
35 puList (int x, int y, int w, int h, int sl_width = 20);
36 puList (int x, int y, int w, int h, char ** contents, int sl_width = 20);
39 virtual void newList (char ** contents);
41 // TODO: other string value funcs
42 virtual char * getListStringValue ();
43 virtual int getListIntegerValue();
44 virtual void setColourScheme (float r, float g, float b, float a);
45 virtual void setColour (int which, float r, float g, float b, float a);
46 virtual void setSize (int w, int h);
48 int getNumVisible ( void ) const { return _list_box->getNumVisible(); }
49 int getNumItems ( void ) const { return _list_box->getNumItems(); }
50 int getTopItem ( void ) const { return _list_box->getTopItem(); }
51 void setTopItem (int index);
55 #endif // __PULIST_HXX