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

multilistbox.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                              dropdownselector
00003                              -------------------
00004     copyright            : (C)  2006 by Martin Bickel
00005     email                : <bickel@asc-hq.org>
00006  ***************************************************************************/
00007 
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
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

Generated on Tue Jun 24 01:27:46 2008 for Advanced Strategic Command by  doxygen 1.4.2