diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-07-25 22:27:32 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-08-05 17:16:58 +0200 |
commit | 542570896e1e0ce73ebfc442b48e741c2ea32377 (patch) | |
tree | 834b0f9c87d2aa73d22a004a103d8e615ee6d9ba /src/gui/widgets/container.h | |
parent | 1fe16bdda5fa0d7112f4568e7bcd892d01c197b9 (diff) | |
download | mana-client-542570896e1e0ce73ebfc442b48e741c2ea32377.tar.gz mana-client-542570896e1e0ce73ebfc442b48e741c2ea32377.tar.bz2 mana-client-542570896e1e0ce73ebfc442b48e741c2ea32377.tar.xz mana-client-542570896e1e0ce73ebfc442b48e741c2ea32377.zip |
Removed all the hardcoded sizes of the various setup tabs
Instead, support for dynamically adjusting layout was added to the
Container class.
Various other places were also adapted to use the new layout support in
Container.
Reviewed-by: Erik Schilling
Diffstat (limited to 'src/gui/widgets/container.h')
-rw-r--r-- | src/gui/widgets/container.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/gui/widgets/container.h b/src/gui/widgets/container.h index e582f2a8..46b719a1 100644 --- a/src/gui/widgets/container.h +++ b/src/gui/widgets/container.h @@ -24,6 +24,11 @@ #include <guichan/widgets/container.hpp> +class ContainerPlacer; +class Layout; +class LayoutCell; +class LayoutHelper; + /** * A widget container. * @@ -38,6 +43,25 @@ class Container : public gcn::Container public: Container(); ~Container(); + + protected: + /** + * Gets the layout handler for this container. + */ + Layout &getLayout(); + + /** + * Adds a widget to the container and sets it at given cell. + */ + LayoutCell &place(int x, int y, gcn::Widget *wg, int w = 1, int h = 1); + + /** + * Returns a proxy for adding widgets in an inner table of the layout. + */ + ContainerPlacer getPlacer(int x, int y); + + private: + LayoutHelper *mLayoutHelper; }; #endif |