From c31a8b5290eb4968b1be38e01cf37ca68e59e46e Mon Sep 17 00:00:00 2001 From: fluxgen Date: Fri, 25 Apr 2003 17:29:58 +0000 Subject: fixed listen to window state --- src/WinButton.hh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/WinButton.hh b/src/WinButton.hh index 49504e5..207ecb9 100644 --- a/src/WinButton.hh +++ b/src/WinButton.hh @@ -19,25 +19,29 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -/// $Id: WinButton.hh,v 1.2 2003/03/22 11:38:24 fluxgen Exp $ +/// $Id: WinButton.hh,v 1.3 2003/04/25 17:29:58 fluxgen Exp $ #include "Button.hh" +#include "Observer.hh" + +class FluxboxWindow; /// draws and handles basic window button graphic -/** - window button - */ -class WinButton:public FbTk::Button { +class WinButton:public FbTk::Button, public FbTk::Observer { public: /// draw type for the button enum Type {MAXIMIZE, MINIMIZE, SHADE, STICK, CLOSE}; - WinButton(Type buttontype, const FbTk::FbWindow &parent, int x, int y, + WinButton(const FluxboxWindow &listen_to, + Type buttontype, const FbTk::FbWindow &parent, int x, int y, unsigned int width, unsigned int height); /// override for drawing void exposeEvent(XExposeEvent &event); + void buttonReleaseEvent(XButtonEvent &event); /// override for redrawing void clear(); + void update(FbTk::Subject *subj); private: void drawType(); Type m_type; ///< the button type + const FluxboxWindow &m_listen_to; }; -- cgit v0.11.2