30 #ifndef _CEGUIGridLayoutContainer_h_
31 #define _CEGUIGridLayoutContainer_h_
33 #include "CEGUILayoutContainer.h"
34 #include "../CEGUIWindowFactory.h"
35 #include "CEGUIGridLayoutContainerProperties.h"
38 # pragma warning(push)
39 # pragma warning(disable : 4251)
115 void setGridDimensions(
size_t width,
size_t height);
121 size_t getGridWidth()
const;
127 size_t getGridHeight()
const;
150 void setNextAutoPositioningIdx(
size_t idx);
157 size_t getNextAutoPositioningIdx()
const;
163 void autoPositioningSkipCells(
size_t cells);
182 void addChildWindowToPosition(
Window* window,
size_t gridX,
size_t gridY);
201 void addChildWindowToPosition(
const String& name,
size_t gridX,
size_t gridY);
207 Window* getChildWindowAtPosition(
size_t gridX,
size_t gridY);
216 void removeChildWindowFromPosition(
size_t gridX,
size_t gridY);
225 virtual void swapChildWindowPositions(
size_t wnd1,
size_t wnd2);
231 void swapChildWindowPositions(
size_t gridX1,
size_t gridY1,
232 size_t gridX2,
size_t gridY2);
244 void swapChildWindows(
Window* wnd1,
const String& wnd2);
250 void swapChildWindows(
const String& wnd1,
Window* wnd2);
256 void moveChildWindowToPosition(
Window* wnd,
size_t gridX,
size_t gridY);
262 void moveChildWindowToPosition(
const String& wnd,
263 size_t gridX,
size_t gridY);
266 virtual void layout();
280 size_t mapFromGridToIdx(
size_t gridX,
size_t gridY,
281 size_t gridWidth,
size_t gridHeight)
const;
283 void mapFromIdxToGrid(
size_t idx,
size_t& gridX,
size_t& gridY,
284 size_t gridWidth,
size_t gridHeight)
const;
289 UVector2 getGridCellOffset(
const std::vector<UDim>& colSizes,
290 const std::vector<UDim>& rowSizes,
291 size_t gridX,
size_t gridY)
const;
293 UVector2 getGridSize(
const std::vector<UDim>& colSizes,
294 const std::vector<UDim>& rowSizes)
const;
297 size_t translateAPToGridIdx(
size_t APIdx)
const;
328 bool isDummy(
Window* wnd)
const;
331 virtual void addChild_impl(
Window* wnd);
333 virtual void removeChild_impl(
Window* wnd);
346 virtual bool testClassName_impl(
const String& class_name)
const
348 if (class_name ==
"GridLayoutContainer")
return true;
360 void addGridLayoutContainerProperties(
void);
365 #if defined(_MSC_VER)
366 # pragma warning(pop)
369 #endif // end of guard _CEGUIGridLayoutContainer_h_