Crazy Eddie's GUI System 0.8.7
Loading...
Searching...
No Matches
widgets/TabButton.h
1/***********************************************************************
2 created: 8/8/2004
3 author: Steve Streeting
4
5 purpose: Interface to base class for TabButton widget
6*************************************************************************/
7/***************************************************************************
8 * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
9 *
10 * Permission is hereby granted, free of charge, to any person obtaining
11 * a copy of this software and associated documentation files (the
12 * "Software"), to deal in the Software without restriction, including
13 * without limitation the rights to use, copy, modify, merge, publish,
14 * distribute, sublicense, and/or sell copies of the Software, and to
15 * permit persons to whom the Software is furnished to do so, subject to
16 * the following conditions:
17 *
18 * The above copyright notice and this permission notice shall be
19 * included in all copies or substantial portions of the Software.
20 *
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
25 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
26 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 * OTHER DEALINGS IN THE SOFTWARE.
28 ***************************************************************************/
29#ifndef _CEGUITabButton_h_
30#define _CEGUITabButton_h_
31
32#include "../Base.h"
33#include "./ButtonBase.h"
34
35// Start of CEGUI namespace section
36namespace CEGUI
37{
44class CEGUIEXPORT TabButton : public ButtonBase
45{
46public:
47 static const String EventNamespace;
48 static const String WidgetTypeName;
49
50 /*************************************************************************
51 Event name constants
52 *************************************************************************/
53 // generated internally by Window
58 static const String EventClicked;
64 static const String EventDragged;
69 static const String EventScrolled;
70
71 /*************************************************************************
72 Construction and Destruction
73 *************************************************************************/
78 TabButton(const String& type, const String& name);
79
80
85 virtual ~TabButton(void);
86
91 virtual void setSelected(bool selected) { d_selected = selected; invalidate(); }
92
97 bool isSelected(void) const { return d_selected; }
98
99
111 Window* getTargetWindow(void) { return d_targetWindow; }
112
113protected:
114 /*************************************************************************
115 Implementation Data
116 *************************************************************************/
120 /*************************************************************************
121 New Event Handlers
122 *************************************************************************/
128
129
130 /*************************************************************************
131 Overridden Event Handlers
132 *************************************************************************/
137};
138
139
140} // End of CEGUI namespace section
141
142
143#endif // end of guard _CEGUITabButton_h_
Base class for all the 'button' type widgets (push button, radio button, check-box,...
Definition ButtonBase.h:51
EventArgs based class that is used for objects passed to input event handlers concerning mouse input.
Definition InputEvent.h:281
String class used within the GUI system.
Definition String.h:64
Base class for TabButtons. A TabButton based class is used internally as the button that appears at t...
Definition widgets/TabButton.h:45
static const String EventScrolled
Definition widgets/TabButton.h:69
static const String EventDragged
Definition widgets/TabButton.h:64
void setTargetWindow(Window *wnd)
Set the target window which is the content pane which this button is covering.
bool isSelected(void) const
Return whether this tab button is selected or not.
Definition widgets/TabButton.h:97
virtual void setSelected(bool selected)
Set whether this tab button is selected or not.
Definition widgets/TabButton.h:91
static const String EventClicked
Definition widgets/TabButton.h:58
static const String EventNamespace
Namespace for global events.
Definition widgets/TabButton.h:47
Window * d_targetWindow
The target window which this button is representing.
Definition widgets/TabButton.h:119
Window * getTargetWindow(void)
Get the target window which is the content pane which this button is covering.
Definition widgets/TabButton.h:111
virtual void onMouseWheel(MouseEventArgs &e)
Handler called when the mouse wheel (z-axis) position changes within this window's area.
virtual void onMouseMove(MouseEventArgs &e)
Handler called when the mouse cursor has been moved within this window's area.
virtual ~TabButton(void)
Destructor for TabButton class.
bool d_dragging
In drag mode or not.
Definition widgets/TabButton.h:118
virtual void onMouseButtonUp(MouseEventArgs &e)
Handler called when a mouse button has been released within this window's area.
bool d_selected
Is this button selected?
Definition widgets/TabButton.h:117
virtual void onClicked(WindowEventArgs &e)
handler invoked internally when the button is clicked.
virtual void onMouseButtonDown(MouseEventArgs &e)
Handler called when a mouse button has been depressed within this window's area.
TabButton(const String &type, const String &name)
Constructor for base TabButton class.
static const String WidgetTypeName
Window factory name.
Definition widgets/TabButton.h:48
base class for properties able to do native set/get
Definition TypedProperty.h:50
EventArgs based class that is used for objects passed to handlers triggered for events concerning som...
Definition InputEvent.h:252
An abstract base class providing common functionality and specifying the required interface for deriv...
Definition Window.h:151
Main namespace for Crazy Eddie's GUI Library.
Definition arch_overview.dox:1