Crazy Eddies GUI System: CEGUIComboDropList.h Source File

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

# CEGUIComboDropList.h

    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 CEGUIEXPORT 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
    00165         virtual bool    testClassName_impl(const String& class_name) const
    00166         {
    00167                 if (class_name==(const utf8*)"ComboDropList")   return true;
    00168                 return Listbox::testClassName_impl(class_name);
    00169         }
    00170
    00171         /*************************************************************************
    00172                 New event handlers
    00173         *************************************************************************/
    00178         void    onListSelectionAccepted(WindowEventArgs& e);
    00179
    00180
    00181         /*************************************************************************
    00182                 Overridden Event handling
    00183         *************************************************************************/
    00184         virtual void    onMouseMove(MouseEventArgs& e);
    00185         virtual void    onMouseButtonDown(MouseEventArgs& e);
    00186         virtual void    onMouseButtonUp(MouseEventArgs& e);
    00187         virtual void    onCaptureLost(WindowEventArgs& e);
    00188         virtual void    onActivated(ActivationEventArgs& e);
    00189
    00190
    00191         /*************************************************************************
    00192                 Implementation Data
    00193         *************************************************************************/
    00194         bool    d_autoArm;
    00195         bool    d_armed;
    00196 };
    00197
    00198 } // End of  CEGUI namespace section
    00199
    00200 #if defined(_MSC_VER)
    00201 #       pragma warning(pop)
    00202 #endif
    00203
    00204 #endif  // end of guard _CEGUIComboDropList_h_