Crazy Eddie's GUI System  0.8.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
LayoutCell.h
1 /***********************************************************************
2  filename: CEGUILayoutCell.h
3  created: 22/2/2011
4  author: Martin Preisler
5 
6  purpose: Defines base (and default) layout cell class
7 *************************************************************************/
8 /***************************************************************************
9  * Copyright (C) 2004 - 2011 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 _CEGUILayoutCell_h_
31 #define _CEGUILayoutCell_h_
32 
33 #include "../Window.h"
34 
35 #include <map>
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 {
45 
60 class CEGUIEXPORT LayoutCell : public Window
61 {
62 public:
63  /*************************************************************************
64  Event name constants
65  *************************************************************************/
67  static const String EventNamespace;
69  static const String WidgetTypeName;
70 
81  LayoutCell(const String& type, const String& name);
82 
87  virtual ~LayoutCell(void);
88 
89  virtual const CachedRectf& getClientChildContentArea() const;
90 
91  virtual void notifyScreenAreaChanged(bool recursive);
92 
93 protected:
95  virtual Rectf getUnclippedInnerRect_impl(bool skipAllPixelAlignment) const;
96 
97  Rectf getClientChildContentArea_impl(bool skipAllPixelAlignment) const;
98 
100  virtual void addChild_impl(Element* element);
102  virtual void removeChild_impl(Element* element);
103 
104  /*************************************************************************
105  Event trigger methods
106  *************************************************************************/
116  virtual bool handleChildSized(const EventArgs& e);
117 
127  virtual bool handleChildAdded(const EventArgs& e);
128 
138  virtual bool handleChildRemoved(const EventArgs& e);
139 
140  /*************************************************************************
141  Implementation Data
142  *************************************************************************/
143  typedef std::multimap<Window*, Event::Connection> ConnectionTracker;
145  ConnectionTracker d_eventConnections;
146 
147  CachedRectf d_clientChildContentArea;
148 };
149 
150 } // End of CEGUI namespace section
151 
152 #if defined(_MSC_VER)
153 # pragma warning(pop)
154 #endif
155 
156 #endif // end of guard _CEGUILayoutCell_h_