00001 /************************************************************************ 00002 filename: CEGUIComboDropList.h 00003 created: 13/6/2004 00004 author: Paul D Turner 00005 00006 purpose: Interface for the Combobox Drop-List widget base class 00007 *************************************************************************/ 00008 /************************************************************************* 00009 Crazy Eddie's GUI System (http://www.cegui.org.uk) 00010 Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk) 00011 00012 This library is free software; you can redistribute it and/or 00013 modify it under the terms of the GNU Lesser General Public 00014 License as published by the Free Software Foundation; either 00015 version 2.1 of the License, or (at your option) any later version. 00016 00017 This library is distributed in the hope that it will be useful, 00018 but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00020 Lesser General Public License for more details. 00021 00022 You should have received a copy of the GNU Lesser General Public 00023 License along with this library; if not, write to the Free Software 00024 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00025 *************************************************************************/ 00026 #ifndef _CEGUIComboDropList_h_ 00027 #define _CEGUIComboDropList_h_ 00028 00029 #include "elements/CEGUIListbox.h" 00030 00031 00032 #if defined(_MSC_VER) 00033 # pragma warning(push) 00034 # pragma warning(disable : 4251) 00035 #endif 00036 00037 00038 // Start of CEGUI namespace section 00039 namespace CEGUI 00040 { 00045 class CEGUIBASE_API ComboDropList : public Listbox 00046 { 00047 public: 00048 static const String EventNamespace; 00049 00050 00051 /************************************************************************* 00052 Constants 00053 *************************************************************************/ 00054 // Event names 00055 static const String EventListSelectionAccepted; 00056 00057 00068 virtual void initialise(void); 00069 00070 00089 void setArmed(bool setting) { d_armed = setting; } 00090 00091 00102 bool isArmed(void) const { return d_armed; } 00103 00104 00116 void setAutoArmEnabled(bool setting) { d_autoArm = setting; } 00117 00118 00127 bool isAutoArmEnabled(void) const { return d_autoArm; } 00128 00129 00130 /************************************************************************* 00131 Constructor & Destructor 00132 *************************************************************************/ 00137 ComboDropList(const String& type, const String& name); 00138 00139 00144 virtual ~ComboDropList(void); 00145 00146 00147 protected: 00152 void addComboDropListEvents(void); 00153 00154 00155 /************************************************************************* 00156 New event handlers 00157 *************************************************************************/ 00162 void onListSelectionAccepted(WindowEventArgs& e); 00163 00164 00165 /************************************************************************* 00166 Overridden Event handling 00167 *************************************************************************/ 00168 virtual void onMouseMove(MouseEventArgs& e); 00169 virtual void onMouseButtonDown(MouseEventArgs& e); 00170 virtual void onMouseButtonUp(MouseEventArgs& e); 00171 virtual void onCaptureLost(WindowEventArgs& e); 00172 virtual void onActivated(ActivationEventArgs& e); 00173 00174 00175 /************************************************************************* 00176 Implementation Data 00177 *************************************************************************/ 00178 bool d_autoArm; 00179 bool d_armed; 00180 }; 00181 00182 } // End of CEGUI namespace section 00183 00184 #if defined(_MSC_VER) 00185 # pragma warning(pop) 00186 #endif 00187 00188 #endif // end of guard _CEGUIComboDropList_h_