• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List

CEGUIRenderingWindow.h

00001 /***********************************************************************
00002     filename:   CEGUIRenderingWindow.h
00003     created:    Mon Jan 12 2009
00004     author:     Paul D Turner
00005 *************************************************************************/
00006 /***************************************************************************
00007  *   Copyright (C) 2004 - 2009 Paul D Turner & The CEGUI Development Team
00008  *
00009  *   Permission is hereby granted, free of charge, to any person obtaining
00010  *   a copy of this software and associated documentation files (the
00011  *   "Software"), to deal in the Software without restriction, including
00012  *   without limitation the rights to use, copy, modify, merge, publish,
00013  *   distribute, sublicense, and/or sell copies of the Software, and to
00014  *   permit persons to whom the Software is furnished to do so, subject to
00015  *   the following conditions:
00016  *
00017  *   The above copyright notice and this permission notice shall be
00018  *   included in all copies or substantial portions of the Software.
00019  *
00020  *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00021  *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00022  *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00023  *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
00024  *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
00025  *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
00026  *   OTHER DEALINGS IN THE SOFTWARE.
00027  ***************************************************************************/
00028 #ifndef _CEGUIRenderingWindow_h_
00029 #define _CEGUIRenderingWindow_h_
00030 
00031 #include "CEGUIRenderingSurface.h"
00032 #include "CEGUIVector.h"
00033 #include "CEGUISize.h"
00034 
00035 // Start of CEGUI namespace section
00036 namespace CEGUI
00037 {
00044 class CEGUIEXPORT RenderingWindow : public RenderingSurface
00045 {
00046 public:
00064     RenderingWindow(TextureTarget& target, RenderingSurface& owner);
00065 
00067     ~RenderingWindow();
00068 
00088     void setClippingRegion(const Rect& region);
00089 
00104     void setPosition(const Vector2& position);
00105 
00114     void setSize(const Size& size);
00115 
00125     void setRotation(const Vector3& rotation);
00126 
00136     void setPivot(const Vector3& pivot);
00137 
00151     const Vector2& getPosition() const;
00152 
00160     const Size& getSize() const;
00161 
00170     const Vector3& getRotation()const;
00171 
00180     const Vector3& getPivot() const;
00181 
00192     const TextureTarget& getTextureTarget() const;
00193     TextureTarget& getTextureTarget();
00194 
00207     void update(const float elapsed);
00208 
00219     void setRenderEffect(RenderEffect* effect);
00220 
00231     RenderEffect* getRenderEffect();
00232 
00243     void realiseGeometry();
00244 
00255     void invalidateGeometry();
00256 
00267     const RenderingSurface& getOwner() const;
00268     RenderingSurface& getOwner();
00269 
00275     void unprojectPoint(const Vector2& p_in, Vector2& p_out);
00276 
00277     // overrides from base
00278     void draw();
00279     void invalidate();
00280     bool isRenderingWindow() const;
00281 
00282 protected:
00284     virtual void realiseGeometry_impl();
00285 
00287     void setOwner(RenderingSurface& owner);
00288     // friend is so that RenderingSurface can call setOwner to xfer ownership.
00289     friend void RenderingSurface::transferRenderingWindow(RenderingWindow&);
00290 
00292     Renderer& d_renderer;
00294     TextureTarget& d_textarget;
00296     RenderingSurface* d_owner;
00298     GeometryBuffer* d_geometry;
00300     bool d_geometryValid;
00302     Vector2 d_position;
00304     Size d_size;
00306     Vector3 d_rotation;
00308     Vector3 d_pivot;
00309 };
00310 
00311 } // End of  CEGUI namespace section
00312 
00313 #endif  // end of guard _CEGUIRenderingWindow_h_

Generated on Sat Sep 25 2010 02:10:34 for Crazy Eddies GUI System by  doxygen 1.7.1