X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgbase%2Fwindow.h;h=a390b8cf4543da9d06ac7dfda37c9e1a9a3a3d4c;hb=dce7552c5e2f64fcf5f58b0c934bb4a01f6cbcf7;hp=9dc84e4e623cd45bbf90dc08f348b7139da85c11;hpb=e9eec476bd26fb3f15d96d5bc91597770814768c;p=libs%2Fgui.git diff --git a/source/gbase/window.h b/source/gbase/window.h index 9dc84e4..a390b8c 100644 --- a/source/gbase/window.h +++ b/source/gbase/window.h @@ -1,15 +1,9 @@ -/* $Id$ - -This file is part of libmspgbase -Copyright © 2007-2008 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #ifndef MSP_GBASE_WINDOW_H_ #define MSP_GBASE_WINDOW_H_ #include #include +#include "eventsource.h" namespace Msp { namespace Graphics { @@ -26,30 +20,29 @@ struct WindowOptions WindowOptions(); }; -class Window +class Window: public EventSource { public: struct Private; struct Event; - sigc::signal signal_button_press; - sigc::signal signal_button_release; - sigc::signal signal_pointer_motion; - sigc::signal signal_key_press; - sigc::signal signal_key_release; - sigc::signal signal_resize; sigc::signal signal_close; protected: Display &display; WindowOptions options; + bool visible; bool kbd_autorepeat; + bool resizing; Private *priv; public: - Window(Display &, unsigned w, unsigned h, bool fs=false); + Window(Display &, unsigned w, unsigned h, bool fs = false); Window(Display &, const WindowOptions &); - ~Window(); +private: + void init(); +public: + virtual ~Window(); void set_title(const std::string &); void reconfigure(const WindowOptions &); @@ -60,16 +53,14 @@ public: Display &get_display() const { return display; } const WindowOptions &get_options() const { return options; } - unsigned get_width() const { return options.width; } - unsigned get_height() const { return options.height; } + virtual unsigned get_width() const { return options.width; } + virtual unsigned get_height() const { return options.height; } const Private &get_private() const { return *priv; } void show(); void hide(); bool event(const Event &evnt); -protected: - void init(); }; } // namespace Graphics