diff options
Diffstat (limited to 'src/gui/window.h')
-rw-r--r-- | src/gui/window.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/gui/window.h b/src/gui/window.h index a09a9bbc..df756be3 100644 --- a/src/gui/window.h +++ b/src/gui/window.h @@ -30,11 +30,12 @@ #include "windowlistener.h" -class Cell; class ConfigListener; +class ContainerPlacer; class Image; class ImageRect; class Layout; +class LayoutCell; class ResizeGrip; class WindowContainer; @@ -93,12 +94,6 @@ class Window : public gcn::Window void setContentSize(int width, int height); /** - * Called when either the user or resetToDefaultSize resizes the - * windows, so that the windows can manage its widgets. - */ - virtual void updateContentSize() {} - - /** * Sets the size of this window. */ void setSize(int width, int height); @@ -292,19 +287,24 @@ class Window : public gcn::Window Layout &getLayout(); /** - * Deletes the layout handler. + * Computes the position of the widgets according to the current + * layout. Resizes the window so that the layout fits. Deletes the + * layout. + * @param w if non-zero, force the window to this width. + * @param h if non-zero, force the window to this height. + * @note This function is meant to be called with fixed-size windows. */ - void forgetLayout(); + void reflowLayout(int w = 0, int h = 0); /** - * Resizes the window after computing the position of the widgets. + * Adds a widget to the window and sets it at given cell. */ - void reflowLayout(); + LayoutCell &place(int x, int y, gcn::Widget *, int w = 1, int h = 1); /** - * Adds a widget to the window and sets it at given cell. + * Returns a proxy for adding widgets in an inner table of the layout. */ - Cell &place(int x, int y, gcn::Widget *, int w = 1, int h = 1); + ContainerPlacer getPlacer(int x, int y); private: /** |