Crazy Eddie's GUI System  0.8.2
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
SequentialLayoutContainer.h
1 /***********************************************************************
2  filename: CEGUISequentialLayoutContainer.h
3  created: 02/8/2010
4  author: Martin Preisler
5 
6  purpose: Defines abstract base class for layout containers
7 *************************************************************************/
8 /***************************************************************************
9  * Copyright (C) 2004 - 2010 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 _CEGUISequentialLayoutContainer_h_
31 #define _CEGUISequentialLayoutContainer_h_
32 
33 #include "./LayoutContainer.h"
34 
35 #if defined(_MSC_VER)
36 # pragma warning(push)
37 # pragma warning(disable : 4251)
38 #endif
39 
40 // Start of CEGUI namespace section
41 namespace CEGUI
42 {
43 
52 class CEGUIEXPORT SequentialLayoutContainer : public LayoutContainer
53 {
54 public:
55  /*************************************************************************
56  Event name constants
57  *************************************************************************/
59  static const String EventNamespace;
60 
63 
74  SequentialLayoutContainer(const String& type, const String& name);
75 
80  virtual ~SequentialLayoutContainer(void);
81 
86  size_t getPositionOfChild(Window* wnd) const;
87 
92  size_t getPositionOfChild(const String& wnd) const;
93 
98  Window* getChildAtPosition(size_t position) const;
99 
104  virtual void swapChildPositions(size_t wnd1, size_t wnd2);
105 
110  void swapChildren(Window* wnd1, Window* wnd2);
111 
116  void swapChildren(const String& wnd1, Window* wnd2);
117 
122  void swapChildren(Window* wnd1, const String& wnd2);
123 
128  void swapChildren(const String& wnd1, const String& wnd2);
129 
137  virtual void moveChildToPosition(Window* wnd, size_t position);
138 
146  void moveChildToPosition(const String& wnd, size_t position);
147 
157  void moveChild(Window* window, int delta = 1);
158 
163  void addChildToPosition(Window* window, size_t position);
164 
169  void removeChildFromPosition(size_t position);
170 
171 protected:
180  virtual void onChildOrderChanged(WindowEventArgs& e);
181 };
182 
183 } // End of CEGUI namespace section
184 
185 #if defined(_MSC_VER)
186 # pragma warning(pop)
187 #endif
188 
189 #endif // end of guard _CEGUISequentialLayoutContainer_h_
190