Crazy Eddie's GUI System  0.8.4
ClippedContainer.h
00001 /***********************************************************************
00002         created:        Sun Jun 11 2006
00003         author:         Tomas Lindquist Olsen
00004 *************************************************************************/
00005 /***************************************************************************
00006  *   Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
00007  *
00008  *   Permission is hereby granted, free of charge, to any person obtaining
00009  *   a copy of this software and associated documentation files (the
00010  *   "Software"), to deal in the Software without restriction, including
00011  *   without limitation the rights to use, copy, modify, merge, publish,
00012  *   distribute, sublicense, and/or sell copies of the Software, and to
00013  *   permit persons to whom the Software is furnished to do so, subject to
00014  *   the following conditions:
00015  *
00016  *   The above copyright notice and this permission notice shall be
00017  *   included in all copies or substantial portions of the Software.
00018  *
00019  *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00020  *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00021  *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00022  *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
00023  *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
00024  *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
00025  *   OTHER DEALINGS IN THE SOFTWARE.
00026  ***************************************************************************/
00027 #ifndef _CEGUIClippedContainer_h_
00028 #define _CEGUIClippedContainer_h_
00029 
00030 #include "../Window.h"
00031 #include "../WindowFactory.h"
00032 
00033 #if defined(_MSC_VER)
00034 #   pragma warning(push)
00035 #   pragma warning(disable : 4251)
00036 #endif
00037 
00038 // Start of CEGUI namespace section
00039 namespace CEGUI
00040 {
00053 class CEGUIEXPORT ClippedContainer : public Window
00054 {
00055 public:
00056     /*************************************************************************
00057         Constants
00058     *************************************************************************/
00059     static const String WidgetTypeName;     
00060     static const String EventNamespace;     
00061 
00062     /*************************************************************************
00063         Object construction and destruction
00064     *************************************************************************/
00069     ClippedContainer(const String& type, const String& name);
00070 
00075     ~ClippedContainer(void);
00076 
00077     /*************************************************************************
00078         Public interface methods
00079     *************************************************************************/
00087     const Rectf& getClipArea(void) const;
00088 
00093     Window* getClipperWindow(void) const;
00094 
00099     void setClipArea(const Rectf& r);
00100 
00109     void setClipperWindow(Window* w);
00110 
00111 protected:
00112     /*************************************************************************
00113         Overridden from Window.
00114     *************************************************************************/
00115     virtual Rectf getUnclippedInnerRect_impl(bool skipAllPixelAlignment) const;
00116     virtual void drawSelf(const RenderingContext&) {}
00117 
00118     /*************************************************************************
00119         Data fields
00120     *************************************************************************/
00122     Rectf d_clipArea;
00124     Window* d_clipperWindow;
00125 };
00126 
00127 } // End of  CEGUI namespace section
00128 
00129 #if defined(_MSC_VER)
00130 #   pragma warning(pop)
00131 #endif
00132 
00133 #endif  // end of guard _CEGUIClippedContainer_h_
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends