29 #ifndef _CEGUIGridLayoutContainer_h_
30 #define _CEGUIGridLayoutContainer_h_
32 #include "./LayoutContainer.h"
33 #include "../WindowFactory.h"
36 # pragma warning(push)
37 # pragma warning(disable : 4251)
113 void setGridDimensions(
size_t width,
size_t height);
118 void setGrid(
const Sizef &size);
124 size_t getGridWidth()
const;
130 size_t getGridHeight()
const;
136 Sizef getGrid()
const;
160 void setNextAutoPositioningIdx(
size_t idx);
167 size_t getNextAutoPositioningIdx()
const;
173 void autoPositioningSkipCells(
size_t cells);
192 void addChildToPosition(
Window* window,
size_t gridX,
size_t gridY);
198 Window* getChildAtPosition(
size_t gridX,
size_t gridY);
207 void removeChildFromPosition(
size_t gridX,
size_t gridY);
216 virtual void swapChildPositions(
size_t wnd1,
size_t wnd2);
222 void swapChildPositions(
size_t gridX1,
size_t gridY1,
223 size_t gridX2,
size_t gridY2);
247 void moveChildToPosition(
Window* wnd,
size_t gridX,
size_t gridY);
253 void moveChildToPosition(
const String& wnd,
254 size_t gridX,
size_t gridY);
257 virtual void layout();
271 size_t mapFromGridToIdx(
size_t gridX,
size_t gridY,
272 size_t gridWidth,
size_t gridHeight)
const;
274 void mapFromIdxToGrid(
size_t idx,
size_t& gridX,
size_t& gridY,
275 size_t gridWidth,
size_t gridHeight)
const;
280 UVector2 getGridCellOffset(
const std::vector<UDim>& colSizes,
281 const std::vector<UDim>& rowSizes,
282 size_t gridX,
size_t gridY)
const;
284 USize getGridSize(
const std::vector<UDim>& colSizes,
285 const std::vector<UDim>& rowSizes)
const;
288 size_t translateAPToGridIdx(
size_t APIdx)
const;
319 bool isDummy(
Window* wnd)
const;
322 virtual void addChild_impl(
Element* element);
324 virtual void removeChild_impl(
Element* element);
327 void addGridLayoutContainerProperties(
void);
339 static const String& getDataTypeName()
341 static String type(
"AutoPositioning");
346 static return_type fromString(
const String& str)
348 if (str ==
"Disabled")
352 else if (str ==
"Top to Bottom")
362 static string_return_type toString(pass_type val)
366 return "Left to Right";
374 return "Top to Bottom";
378 assert(
false &&
"Invalid Auto Positioning");
379 return "Left to Right";
386 #if defined(_MSC_VER)
387 # pragma warning(pop)
390 #endif // end of guard _CEGUIGridLayoutContainer_h_
size_t d_nextAutoPositioningIdx
Definition: GridLayoutContainer.h:300
Definition: GridLayoutContainer.h:64
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
A positioned and sized rectangular node in a tree graph.
Definition: Element.h:242
static const String EventNamespace
Namespace for global events.
Definition: GridLayoutContainer.h:89
no auto positioning!
Definition: GridLayoutContainer.h:58
size_t d_nextDummyIdx
Definition: GridLayoutContainer.h:314
static const String EventChildOrderChanged
fired when child windows get rearranged
Definition: GridLayoutContainer.h:92
An abstract base class providing common functionality and specifying the required interface for deriv...
Definition: LayoutContainer.h:53
size_t d_gridWidth
stores grid width - amount of columns
Definition: GridLayoutContainer.h:291
static const String WidgetTypeName
The unique typename of this widget.
Definition: GridLayoutContainer.h:77
A Layout Container window layouting it's children into a grid.
Definition: GridLayoutContainer.h:47
static const String DummyName
Widget name for dummies.
Definition: GridLayoutContainer.h:83
size_t d_nextGridY
Definition: GridLayoutContainer.h:309
An abstract base class providing common functionality and specifying the required interface for deriv...
Definition: Window.h:149
Definition: GridLayoutContainer.h:70
Helper class used to convert various data types to and from the format expected in Property strings...
Definition: ForwardRefs.h:84
size_t d_nextGridX
Definition: GridLayoutContainer.h:305
EventArgs based class that is used for objects passed to handlers triggered for events concerning som...
Definition: InputEvent.h:251
AutoPositioning d_autoPositioning
stores currently used auto positioning method
Definition: GridLayoutContainer.h:296
AutoPositioning
Definition: GridLayoutContainer.h:55
String class used within the GUI system.
Definition: String.h:62
size_t d_gridHeight
stores grid height - amount of rows
Definition: GridLayoutContainer.h:293