Crazy Eddies GUI System
0.6.2
Main Page
Related Pages
Namespaces
Classes
Files
File List
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
{
46
47
class
WidgetLookFeel;
48
53
class
CEGUIEXPORT
WindowRenderer
54
{
55
public
:
56
/*************************************************************************
57
Constructor / Destructor
58
**************************************************************************/
70
WindowRenderer
(
const
String
& name,
const
String
& class_name=
"Window"
);
71
76
virtual
~
WindowRenderer
();
77
78
/*************************************************************************
79
Public interface
80
**************************************************************************/
89
virtual
void
render() = 0;
90
95
const
String
&
getName
()
const
{
return
d_name;}
96
101
Window
*
getWindow
()
const
{
return
d_window;}
102
107
const
String
&
getClass
()
const
{
return
d_class;}
108
113
const
WidgetLookFeel
& getLookNFeel()
const
;
114
120
virtual
Rect
getUnclippedInnerRect()
const
;
121
127
virtual
Rect
getPixelRect()
const
;
128
134
virtual
void
performChildWindowLayout
() {}
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
/*************************************************************************
176
Implementation data
177
**************************************************************************/
178
Window
*
d_window
;
179
const
String
d_name
;
180
const
String
d_class
;
181
182
typedef
std::vector<Property*> PropertyList;
183
PropertyList
d_properties
;
184
185
// Window is friend so it can manipulate our 'd_window' member directly.
186
// We don't want users fiddling with this so no public interface.
187
friend
class
Window
;
188
};
189
194
class
CEGUIEXPORT
WindowRendererFactory
195
{
196
public
:
204
WindowRendererFactory
(
const
String
& name) : d_factoryName(name) {}
205
210
virtual
~WindowRendererFactory
() {}
211
216
const
String
&
getName
()
const
{
return
d_factoryName;}
217
222
virtual
WindowRenderer
* create() = 0;
223
228
virtual
void
destroy(
WindowRenderer
* wr) = 0;
229
230
protected
:
231
String
d_factoryName
;
232
};
233
234
}
// End of CEGUI namespace
235
236
#if defined(_MSC_VER)
237
# pragma warning(pop)
238
#endif
239
240
#endif // _CEGUIWindowRenderer_h_
Generated by
1.8.3.1