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
CEGUITitlebar.h
1
/***********************************************************************
2
filename: CEGUITitlebar.h
3
created: 25/4/2004
4
author: Paul D Turner
5
6
purpose: Interface for a Titlebar 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 _CEGUITitlebar_h_
31
#define _CEGUITitlebar_h_
32
33
#include "../CEGUIWindow.h"
34
#include "CEGUITitlebarProperties.h"
35
36
37
#if defined(_MSC_VER)
38
# pragma warning(push)
39
# pragma warning(disable : 4251)
40
#endif
41
42
43
// Start of CEGUI namespace section
44
namespace
CEGUI
45
{
46
52
class
CEGUIEXPORT
Titlebar
:
public
Window
53
{
54
public
:
55
static
const
String
EventNamespace
;
56
static
const
String
WidgetTypeName
;
57
65
bool
isDraggingEnabled(
void
)
const
;
66
67
78
void
setDraggingEnabled(
bool
setting);
79
80
81
/*************************************************************************
82
Construction / Destruction
83
*************************************************************************/
88
Titlebar
(
const
String
& type,
const
String
& name);
89
90
95
virtual
~
Titlebar
(
void
);
96
97
98
protected
:
99
/*************************************************************************
100
Overridden event handler functions
101
*************************************************************************/
102
virtual
void
onMouseMove(
MouseEventArgs
& e);
103
virtual
void
onMouseButtonDown(
MouseEventArgs
& e);
104
virtual
void
onMouseButtonUp(
MouseEventArgs
& e);
105
virtual
void
onMouseDoubleClicked(
MouseEventArgs
& e);
106
virtual
void
onCaptureLost(
WindowEventArgs
& e);
107
virtual
void
onFontChanged(
WindowEventArgs
&e);
108
109
110
/*************************************************************************
111
New event handlers for title bar
112
*************************************************************************/
120
virtual
void
onDraggingModeChanged
(
WindowEventArgs
&) {}
121
122
123
/*************************************************************************
124
Implementation Functions
125
*************************************************************************/
136
virtual
bool
testClassName_impl(
const
String
& class_name)
const
137
{
138
if
(class_name==
"Titlebar"
)
return
true
;
139
return
Window::testClassName_impl
(class_name);
140
}
141
142
143
/*************************************************************************
144
Implementation Data
145
*************************************************************************/
146
bool
d_dragging
;
147
Point
d_dragPoint
;
148
bool
d_dragEnabled
;
149
150
Rect
d_oldCursorArea
;
151
152
private
:
153
/*************************************************************************
154
Static Properties for this class
155
*************************************************************************/
156
static
TitlebarProperties::DraggingEnabled
d_dragEnabledProperty;
157
158
159
/*************************************************************************
160
Private methods
161
*************************************************************************/
162
void
addTitlebarProperties(
void
);
163
};
164
165
}
// End of CEGUI namespace section
166
167
#if defined(_MSC_VER)
168
# pragma warning(pop)
169
#endif
170
171
#endif // end of guard _CEGUITitlebar_h_
cegui
include
elements
CEGUITitlebar.h
Generated by
1.8.3.1