diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-03-20 12:50:26 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-03-20 12:50:26 +0000 |
commit | 90e5ce7e958418f0d39d38112d33d3190a78baea (patch) | |
tree | 012150b22e971e44d0f7e795ef48384e15392940 /src/gui/window.h | |
parent | 9ca202ae89bbe60f2cd1c8e3249a4fe3f8972a2b (diff) | |
download | mana-90e5ce7e958418f0d39d38112d33d3190a78baea.tar.gz mana-90e5ce7e958418f0d39d38112d33d3190a78baea.tar.bz2 mana-90e5ce7e958418f0d39d38112d33d3190a78baea.tar.xz mana-90e5ce7e958418f0d39d38112d33d3190a78baea.zip |
TMW now uses latest Guichan CVS, and doesn't work with Guichan 0.2.0 anymore!
Also fixed a crash on clicking wallpaper in login phase.
Diffstat (limited to 'src/gui/window.h')
-rw-r--r-- | src/gui/window.h | 39 |
1 files changed, 9 insertions, 30 deletions
diff --git a/src/gui/window.h b/src/gui/window.h index deb00583..2b98bebf 100644 --- a/src/gui/window.h +++ b/src/gui/window.h @@ -35,21 +35,13 @@ * * \ingroup GUI */ -class Window : public gcn::Container, public gcn::MouseListener +class Window : public gcn::Window { protected: gcn::Container *chrome; /**< Contained container */ Window *parent; /**< The parent window */ - std::string caption; /**< Title bar caption */ - int z; /**< Z position of the window */ - int mousePX; /**< Mouse down location */ - int mousePY; /**< Mouse down location */ int snapSize; /**< Snap distance to window edge */ - bool mouseDown; /**< Mouse button state */ bool modal; /**< Window is modal */ - gcn::Color titlebarColor; /**< Title bar color */ - int titlebarHeight; /**< Height of title bar */ - int padding; /**< Space between contents and border */ float guiAlpha; /**< Opacity of GUI windows */ Image *dBackground; /**< Left side of title bar */ @@ -71,7 +63,7 @@ class Window : public gcn::Container, public gcn::MouseListener * this one in the window hiearchy. When reordering, * a window will never go below its parent window. */ - Window(const std::string& text = "Window", bool modal = false, + Window(const std::string &caption = "Window", bool modal = false, Window *parent = NULL); /** @@ -100,24 +92,14 @@ class Window : public gcn::Container, public gcn::MouseListener void add(gcn::Widget *w, int x, int y); /** - * Sets the title of the window. - */ - void setTitle(const std::string& text); - - /** - * Sets the dimension of the window contents. - */ - void setDimension(const gcn::Rectangle& dimension); - - /** * Sets the width of the window contents. */ - void setWidth(int width); + void setContentWidth(int width); /** * Sets the height of the window contents. */ - void setHeight(int height); + void setContentHeight(int height); /** * Sets the location relative to the given widget. @@ -127,7 +109,7 @@ class Window : public gcn::Container, public gcn::MouseListener /** * Sets the size of this window. */ - void setSize(int width, int height); + void setContentSize(int width, int height); /** * Returns the parent window. @@ -142,14 +124,11 @@ class Window : public gcn::Container, public gcn::MouseListener */ bool isModal(); - // Mouse handling - - void mousePress(int mx, int my, int button); - void mouseRelease(int mx, int my, int button); + /** + * Window dragging. This method also makes sure the window is not + * dragged outside of the screen. + */ void mouseMotion(int mx, int my); - void mouseOut(); - - void _mouseInputMessage(const gcn::MouseInput &mouseInput); }; #endif |