Crazy Eddies GUI System  0.6.0
CEGUIPushButton.h
1 /***********************************************************************
2  filename: CEGUIPushButton.h
3  created: 13/4/2004
4  author: Paul D Turner
5 
6  purpose: Interface to base class for PushButton widget
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 _CEGUIPushButton_h_
31 #define _CEGUIPushButton_h_
32 
33 #include "CEGUIBase.h"
34 #include "elements/CEGUIButtonBase.h"
35 
36 #if defined(_MSC_VER)
37 # pragma warning(push)
38 # pragma warning(disable : 4251)
39 #endif
40 
41 // Start of CEGUI namespace section
42 namespace CEGUI
43 {
48 class CEGUIEXPORT PushButton : public ButtonBase
49 {
50 public:
51  static const String EventNamespace;
52  static const String WidgetTypeName;
53 
54  /*************************************************************************
55  Event name constants
56  *************************************************************************/
57  // generated internally by Window
58  static const String EventClicked;
59 
60  /*************************************************************************
61  Construction and Destruction
62  *************************************************************************/
67  PushButton(const String& type, const String& name);
68 
69 
74  virtual ~PushButton(void);
75 
76 
77 protected:
78  /*************************************************************************
79  New Event Handlers
80  *************************************************************************/
85  virtual void onClicked(WindowEventArgs& e);
86 
87 
88  /*************************************************************************
89  Overridden Event Handlers
90  *************************************************************************/
91  virtual void onMouseButtonUp(MouseEventArgs& e);
92 
93 
94  /*************************************************************************
95  Implementation Functions
96  *************************************************************************/
107  virtual bool testClassName_impl(const String& class_name) const
108  {
109  if (class_name=="PushButton") return true;
110  return ButtonBase::testClassName_impl(class_name);
111  }
112 
113 };
114 
115 } // End of CEGUI namespace section
116 
117 #if defined(_MSC_VER)
118 # pragma warning(pop)
119 #endif
120 
121 #endif // end of guard _CEGUIPushButton_h_