Crazy Eddies GUI System
0.7.9
Main Page
Related Pages
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Pages
CEGUITabButton.h
1
/***********************************************************************
2
filename: CEGUITabButton.h
3
created: 8/8/2004
4
author: Steve Streeting
5
6
purpose: Interface to base class for TabButton 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 _CEGUITabButton_h_
31
#define _CEGUITabButton_h_
32
33
#include "../CEGUIBase.h"
34
#include "CEGUIButtonBase.h"
35
36
// Start of CEGUI namespace section
37
namespace
CEGUI
38
{
45
class
CEGUIEXPORT
TabButton
:
public
ButtonBase
46
{
47
public
:
48
static
const
String
EventNamespace
;
49
static
const
String
WidgetTypeName
;
50
51
/*************************************************************************
52
Event name constants
53
*************************************************************************/
54
// generated internally by Window
59
static
const
String
EventClicked
;
65
static
const
String
EventDragged
;
70
static
const
String
EventScrolled
;
71
72
/*************************************************************************
73
Construction and Destruction
74
*************************************************************************/
79
TabButton
(
const
String
& type,
const
String
& name);
80
81
86
virtual
~
TabButton
(
void
);
87
92
virtual
void
setSelected
(
bool
selected) { d_selected = selected; invalidate(); }
93
98
bool
isSelected
(
void
)
const
{
return
d_selected; }
99
100
106
void
setTargetWindow(
Window
* wnd);
112
Window
*
getTargetWindow
(
void
) {
return
d_targetWindow; }
113
114
protected
:
115
/*************************************************************************
116
Implementation Data
117
*************************************************************************/
118
bool
d_selected
;
119
bool
d_dragging
;
120
Window
*
d_targetWindow
;
121
/*************************************************************************
122
New Event Handlers
123
*************************************************************************/
128
virtual
void
onClicked(
WindowEventArgs
& e);
129
130
131
/*************************************************************************
132
Overridden Event Handlers
133
*************************************************************************/
134
virtual
void
onMouseButtonUp(
MouseEventArgs
& e);
135
virtual
void
onMouseButtonDown(
MouseEventArgs
& e);
136
virtual
void
onMouseWheel(
MouseEventArgs
& e);
137
virtual
void
onMouseMove(
MouseEventArgs
& e);
138
139
/*************************************************************************
140
Implementation Functions
141
*************************************************************************/
152
virtual
bool
testClassName_impl(
const
String
& class_name)
const
153
{
154
if
(class_name==
"TabButton"
)
return
true
;
155
return
ButtonBase::testClassName_impl
(class_name);
156
}
157
};
158
159
160
}
// End of CEGUI namespace section
161
162
163
#endif // end of guard _CEGUITabButton_h_
cegui
include
elements
CEGUITabButton.h
Generated by
1.8.3.1