diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-07-25 22:27:32 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-07-25 22:27:41 +0200 |
commit | 8331284990b8d998a7e323e6fcf3c25f2f7d60d8 (patch) | |
tree | 168cf7bdc4cc4e8d93c8072ded3c4a1246c12e64 /src/gui/widgets/container.h | |
parent | f0d0f33c8fa4910040204ea3023cd08b4660f56f (diff) | |
download | mana-8331284990b8d998a7e323e6fcf3c25f2f7d60d8.tar.gz mana-8331284990b8d998a7e323e6fcf3c25f2f7d60d8.tar.bz2 mana-8331284990b8d998a7e323e6fcf3c25f2f7d60d8.tar.xz mana-8331284990b8d998a7e323e6fcf3c25f2f7d60d8.zip |
Reduced the height of the Setup window
Also 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.
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 |