Crazy Eddies GUI System
0.7.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
cegui
include
CEGUIWindowRenderer.h
1
/***********************************************************************
2
filename: CEGUIWindowRenderer.h
3
created: Jan 11 2006
4
author: Tomas Lindquist Olsen
5
6
purpose: Defines interface for the WindowRenderer base class
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 _CEGUIWindowRenderer_h_
31
#define _CEGUIWindowRenderer_h_
32
33
#include "CEGUIWindow.h"
34
#include "CEGUIProperty.h"
35
#include <vector>
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
{
50
class
CEGUIEXPORT
WindowRenderer
51
{
52
public
:
53
/*************************************************************************
54
Constructor / Destructor
55
**************************************************************************/
67
WindowRenderer
(
const
String
& name,
const
String
& class_name=
"Window"
);
68
73
virtual
~
WindowRenderer
();
74
75
/*************************************************************************
76
Public interface
77
**************************************************************************/
86
virtual
void
render() = 0;
87
92
const
String
&
getName
()
const
{
return
d_name;}
93
98
Window
*
getWindow
()
const
{
return
d_window;}
99
104
const
String
&
getClass
()
const
{
return
d_class;}
105
110
const
WidgetLookFeel
& getLookNFeel()
const
;
111
117
virtual
Rect
getUnclippedInnerRect()
const
;
118
124
virtual
void
performChildWindowLayout
() {}
125
131
virtual
void
getRenderingContext(
RenderingContext
& ctx)
const
;
132
134
virtual
void
update
(
float
/*elapsed*/
) {}
135
136
protected
:
137
/*************************************************************************
138
Implementation methods
139
**************************************************************************/
149
void
registerProperty(
Property
* property);
150
155
virtual
void
onAttach();
156
161
virtual
void
onDetach();
162
167
virtual
void
onLookNFeelAssigned
() {}
168
173
virtual
void
onLookNFeelUnassigned
() {}
174
175
void
operator=(
const
WindowRenderer
&) {}
176
177
/*************************************************************************
178
Implementation data
179
**************************************************************************/
180
Window
*
d_window
;
181
const
String
d_name
;
182
const
String
d_class
;
183
184
typedef
std::vector<Property*> PropertyList;
185
PropertyList
d_properties
;
186
187
// Window is friend so it can manipulate our 'd_window' member directly.
188
// We don't want users fiddling with this so no public interface.
189
friend
class
Window
;
190
};
191
196
class
CEGUIEXPORT
WindowRendererFactory
197
{
198
public
:
206
WindowRendererFactory
(
const
String
& name) : d_factoryName(name) {}
207
212
virtual
~WindowRendererFactory
() {}
213
218
const
String
&
getName
()
const
{
return
d_factoryName;}
219
224
virtual
WindowRenderer
* create() = 0;
225
230
virtual
void
destroy(
WindowRenderer
* wr) = 0;
231
232
protected
:
233
String
d_factoryName
;
234
};
235
236
}
// End of CEGUI namespace
237
238
#if defined(_MSC_VER)
239
# pragma warning(pop)
240
#endif
241
242
#endif // _CEGUIWindowRenderer_h_
Generated by
1.8.3.1