00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef multilistboxH
00018 #define multilistboxH
00019
00020 #include <pgwidget.h>
00021 #include <pglistbox.h>
00022 #include <pglistboxitem.h>
00023
00024 template<typename T>
00025 class PG_ListBoxDataItem : public PG_ListBoxItem {
00026 public:
00027 typedef T DataType;
00028 private:
00029 T my_data;
00030 public:
00031 PG_ListBoxDataItem( PG_Widget *parent, int height, const std::string &text, const T& data, SDL_Surface *icon=NULL ) : PG_ListBoxItem( parent, height, text, icon ), my_data(data) {};
00032 T getData() { return my_data; };
00033 };
00034
00035
00036
00037 class MultiListBox : public PG_Widget {
00038 PG_ListBox* listbox;
00039 public:
00040 MultiListBox (PG_Widget *parent, const PG_Rect &r );
00041 PG_ListBox* getListBox() { return listbox; };
00042 bool all();
00043 bool none();
00044 };
00045
00046
00047 #endif