Advanced Strategic Command
dropdownselector.h
Go to the documentation of this file.
1 /***************************************************************************
2  dropdownselector
3  -------------------
4  copyright : (C) 2006 by Martin Bickel
5  email : <bickel@asc-hq.org>
6  ***************************************************************************/
7 
8 /***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
16 
17 #ifndef DROPDOWNSELECTOR_H
18 #define DROPDOWNSELECTOR_H
19 
20 #include <vector>
21 #include <pgdropdown.h>
22 #include "../ascstring.h"
23 
24 class DropDownSelector: public PG_DropDown {
25  bool first;
26  protected:
27  bool itemSelected( ); // PG_ListBoxBaseItem* i, void* p );
28  public:
29  DropDownSelector( PG_Widget *parent, const PG_Rect &r=PG_Rect::null, int id=-1, const std::string &style="DropDown");
30  DropDownSelector( PG_Widget *parent, const PG_Rect &r, int itemnum, const char** items, const std::string &style="DropDown" );
31  DropDownSelector( PG_Widget *parent, const PG_Rect &r, const std::vector<ASCString>& names, const std::string &style="DropDown" );
32  void AddItem (const std::string &text, void *userdata=NULL, Uint16 height=0);
33  sigc::signal<void, int> selectionSignal;
34 };
35 
36 #endif
sigc::signal< void, int > selectionSignal
void AddItem(const std::string &text, void *userdata=NULL, Uint16 height=0)
DropDownSelector(PG_Widget *parent, const PG_Rect &r=PG_Rect::null, int id=-1, const std::string &style="DropDown")