]> git.mxchange.org Git - flightgear.git/blob - src/GUI/puList.hxx
make puListBox inherit puList colors (otherwise the GUI style isn't
[flightgear.git] / src / GUI / puList.hxx
1 // puList.hxx - a scrolling PUI list box.
2
3 #ifndef __PULIST_HXX
4 #define __PULIST_HXX 1
5
6 #ifdef HAVE_CONFIG_H
7 #  include <config.h>
8 #endif
9
10 #include <plib/pu.h>
11
12 # define PUCLASS_LIST   0x80000000  // Hopefully this value will never be used by plib
13
14 /**
15  * A scrolling list for PUI.
16  *
17  * Believe it or not, PUI does not have one of these.
18  */
19 class puList : public puGroup
20 {
21  public:
22     puList (int x, int y, int w, int h);
23     puList (int x, int y, int w, int h, char ** contents);
24     virtual ~puList ();
25
26     virtual void newList (char ** contents);
27     // TODO: other string value funcs
28     virtual char * getListStringValue ();
29     virtual int getListIntegerValue();
30     virtual void setColourScheme (float r, float g, float b, float a);
31     virtual void setColour (int which, float r, float g, float b, float a);
32
33
34  protected:
35     virtual void init (int w, int h);
36
37  private:
38     char ** _contents;
39     puFrame * _frame;
40     puListBox * _list_box;
41     puSlider * _slider;
42     puArrowButton * _up_arrow;
43     puArrowButton * _down_arrow;
44 };
45
46 #endif // __PULIST_HXX