Crazy Eddie's GUI System  0.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
RenderingWindow.h
1 /***********************************************************************
2  filename: CEGUIRenderingWindow.h
3  created: Mon Jan 12 2009
4  author: Paul D Turner
5 *************************************************************************/
6 /***************************************************************************
7  * Copyright (C) 2004 - 2011 Paul D Turner & The CEGUI Development Team
8  *
9  * Permission is hereby granted, free of charge, to any person obtaining
10  * a copy of this software and associated documentation files (the
11  * "Software"), to deal in the Software without restriction, including
12  * without limitation the rights to use, copy, modify, merge, publish,
13  * distribute, sublicense, and/or sell copies of the Software, and to
14  * permit persons to whom the Software is furnished to do so, subject to
15  * the following conditions:
16  *
17  * The above copyright notice and this permission notice shall be
18  * included in all copies or substantial portions of the Software.
19  *
20  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23  * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
24  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26  * OTHER DEALINGS IN THE SOFTWARE.
27  ***************************************************************************/
28 #ifndef _CEGUIRenderingWindow_h_
29 #define _CEGUIRenderingWindow_h_
30 
31 #include "CEGUI/RenderingSurface.h"
32 #include "CEGUI/Vector.h"
33 #include "CEGUI/Quaternion.h"
34 #include "CEGUI/Size.h"
35 #include "CEGUI/Rect.h"
36 
37 #if defined(_MSC_VER)
38 # pragma warning(push)
39 # pragma warning(disable : 4251)
40 #endif
41 
42 // Start of CEGUI namespace section
43 namespace CEGUI
44 {
51 class CEGUIEXPORT RenderingWindow : public RenderingSurface
52 {
53 public:
72 
74  ~RenderingWindow();
75 
95  void setClippingRegion(const Rectf& region);
96 
111  void setPosition(const Vector2f& position);
112 
121  void setSize(const Sizef& size);
122 
131  void setRotation(const Quaternion& rotation);
132 
142  void setPivot(const Vector3f& pivot);
143 
157  const Vector2f& getPosition() const;
158 
166  const Sizef& getSize() const;
167 
175  const Quaternion& getRotation()const;
176 
185  const Vector3f& getPivot() const;
186 
197  const TextureTarget& getTextureTarget() const;
198  TextureTarget& getTextureTarget();
199 
212  void update(const float elapsed);
213 
224  void setRenderEffect(RenderEffect* effect);
225 
236  RenderEffect* getRenderEffect();
237 
248  void realiseGeometry();
249 
260  void invalidateGeometry();
261 
272  const RenderingSurface& getOwner() const;
273  RenderingSurface& getOwner();
274 
280  void unprojectPoint(const Vector2f& p_in, Vector2f& p_out);
281 
282  // overrides from base
283  void draw();
284  void invalidate();
285  bool isRenderingWindow() const;
286 
287 protected:
289  virtual void realiseGeometry_impl();
290 
292  void setOwner(RenderingSurface& owner);
293  // friend is so that RenderingSurface can call setOwner to xfer ownership.
295 
314 };
315 
316 } // End of CEGUI namespace section
317 
318 #if defined(_MSC_VER)
319 # pragma warning(pop)
320 #endif
321 
322 #endif // end of guard _CEGUIRenderingWindow_h_