Crazy Eddies GUI System  0.7.9
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
CEGUIComboDropList.h
1 /***********************************************************************
2  filename: CEGUIComboDropList.h
3  created: 13/6/2004
4  author: Paul D Turner
5 
6  purpose: Interface for the Combobox Drop-List widget base class
7 *************************************************************************/
8 /***************************************************************************
9  * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
10  *
11  * Permission is hereby granted, free of charge, to any person obtaining
12  * a copy of this software and associated documentation files (the
13  * "Software"), to deal in the Software without restriction, including
14  * without limitation the rights to use, copy, modify, merge, publish,
15  * distribute, sublicense, and/or sell copies of the Software, and to
16  * permit persons to whom the Software is furnished to do so, subject to
17  * the following conditions:
18  *
19  * The above copyright notice and this permission notice shall be
20  * included in all copies or substantial portions of the Software.
21  *
22  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
25  * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
26  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
27  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
28  * OTHER DEALINGS IN THE SOFTWARE.
29  ***************************************************************************/
30 #ifndef _CEGUIComboDropList_h_
31 #define _CEGUIComboDropList_h_
32 
33 #include "CEGUIListbox.h"
34 
35 
36 #if defined(_MSC_VER)
37 # pragma warning(push)
38 # pragma warning(disable : 4251)
39 #endif
40 
41 
42 // Start of CEGUI namespace section
43 namespace CEGUI
44 {
49 class CEGUIEXPORT ComboDropList : public Listbox
50 {
51 public:
52  static const String EventNamespace;
53  static const String WidgetTypeName;
54 
55 
56  /*************************************************************************
57  Constants
58  *************************************************************************/
59  // Event names
66 
67 
78  virtual void initialiseComponents(void);
79 
80 
99  void setArmed(bool setting) { d_armed = setting; }
100 
101 
112  bool isArmed(void) const { return d_armed; }
113 
114 
126  void setAutoArmEnabled(bool setting) { d_autoArm = setting; }
127 
128 
137  bool isAutoArmEnabled(void) const { return d_autoArm; }
138 
139 
140  /*************************************************************************
141  Constructor & Destructor
142  *************************************************************************/
147  ComboDropList(const String& type, const String& name);
148 
149 
154  virtual ~ComboDropList(void);
155 
156 
157 protected:
168  virtual bool testClassName_impl(const String& class_name) const
169  {
170  if (class_name=="ComboDropList") return true;
171  return Listbox::testClassName_impl(class_name);
172  }
173 
174  /*************************************************************************
175  New event handlers
176  *************************************************************************/
181  void onListSelectionAccepted(WindowEventArgs& e);
182 
183 
184  /*************************************************************************
185  Overridden Event handling
186  *************************************************************************/
187  virtual void onMouseMove(MouseEventArgs& e);
188  virtual void onMouseButtonDown(MouseEventArgs& e);
189  virtual void onMouseButtonUp(MouseEventArgs& e);
190  virtual void onCaptureLost(WindowEventArgs& e);
191  virtual void onActivated(ActivationEventArgs& e);
192  virtual void onListContentsChanged(WindowEventArgs& e);
193  virtual void onSelectionChanged(WindowEventArgs& e);
194 
195  /*************************************************************************
196  Implementation Data
197  *************************************************************************/
198  bool d_autoArm;
199  bool d_armed;
201 };
202 
203 } // End of CEGUI namespace section
204 
205 #if defined(_MSC_VER)
206 # pragma warning(pop)
207 #endif
208 
209 #endif // end of guard _CEGUIComboDropList_h_