Crazy Eddies GUI System
0.7.1
Main Page
Related Pages
Namespaces
Classes
Files
File List
cegui
include
elements
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
55
static
const
String
EventClicked
;
56
static
const
String
EventDragged
;
57
static
const
String
EventScrolled
;
58
59
/*************************************************************************
60
Construction and Destruction
61
*************************************************************************/
66
TabButton
(
const
String
& type,
const
String
& name);
67
68
73
virtual
~
TabButton
(
void
);
74
79
virtual
void
setSelected
(
bool
selected) { d_selected = selected; invalidate(); }
80
85
bool
isSelected
(
void
)
const
{
return
d_selected; }
86
87
93
void
setTargetWindow(
Window
* wnd);
99
Window
*
getTargetWindow
(
void
) {
return
d_targetWindow; }
100
101
protected
:
102
/*************************************************************************
103
Implementation Data
104
*************************************************************************/
105
bool
d_selected
;
106
bool
d_dragging
;
107
Window
*
d_targetWindow
;
108
/*************************************************************************
109
New Event Handlers
110
*************************************************************************/
115
virtual
void
onClicked(
WindowEventArgs
& e);
116
117
118
/*************************************************************************
119
Overridden Event Handlers
120
*************************************************************************/
121
virtual
void
onMouseButtonUp(
MouseEventArgs
& e);
122
virtual
void
onMouseButtonDown(
MouseEventArgs
& e);
123
virtual
void
onMouseWheel(
MouseEventArgs
& e);
124
virtual
void
onMouseMove(
MouseEventArgs
& e);
125
126
/*************************************************************************
127
Implementation Functions
128
*************************************************************************/
139
virtual
bool
testClassName_impl(
const
String
& class_name)
const
140
{
141
if
(class_name==
"TabButton"
)
return
true
;
142
return
ButtonBase::testClassName_impl
(class_name);
143
}
144
};
145
146
147
}
// End of CEGUI namespace section
148
149
150
#endif // end of guard _CEGUITabButton_h_
Generated by
1.8.3.1