Planeshift
eeditrequestcombo.h
Go to the documentation of this file.
1 /*
2  * Author: Jorrit Tyberghein
3  *
4  * Copyright (C) 2010 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5  *
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation (version 2 of the License)
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  *
18  */
19 
20 #ifndef EEDIT_REQUESTCOMBO_HEADER
21 #define EEDIT_REQUESTCOMBO_HEADER
22 
23 #include "paws/pawsmanager.h"
24 #include "paws/pawswidget.h"
25 #include "paws/pawslistbox.h"
26 #include "paws/pawsbutton.h"
27 
32 struct iEEditRequestComboCallback : public virtual iBase
33 {
35  virtual void Select (const char* string) = 0;
36 };
37 
39 {
40 public:
42 
43  virtual bool PostSetup();
44 
45  void ClearChoices ();
46  void AddChoice (const char* choice);
48  {
49  callback = cb;
50  }
51 
52 private:
53  bool OnButtonPressed( int mouseButton, int keyModifer, pawsWidget* widget );
54 
55  pawsListBox * choicesList;
56  pawsButton * okButton;
57  pawsButton * cancelButton;
58 
59  csRef<iEEditRequestComboCallback> callback;
60 };
61 
63 
66 #endif
67 
The main base widget that all other widgets should inherit from.
Definition: pawswidget.h:116
SCF_INTERFACE(iEEditRequestComboCallback, 2, 0, 0)
void SetCallback(iEEditRequestComboCallback *cb)
A simple list box widget.
Definition: pawslistbox.h:202
A simple button widget.
Definition: pawsbutton.h:43
virtual void Select(const char *string)=0
CREATE_PAWS_FACTORY(EEditRequestCombo)