X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fwindow.h;h=a8ad867cca9acac780cf3f34535d69c21df286b1;hb=eb9a95ca4acbbdbc6c17acd6b8a135deab906f39;hp=6f1f0d1e26bf5cd4db7d8c32cefe86b9bb26acc1;hpb=1fbd1b60d9fffe40febe499315347762da007269;p=libs%2Fgui.git diff --git a/source/window.h b/source/window.h index 6f1f0d1..a8ad867 100644 --- a/source/window.h +++ b/source/window.h @@ -32,6 +32,8 @@ public: sigc::signal signal_pointer_motion; sigc::signal signal_key_press; sigc::signal signal_key_release; + sigc::signal signal_resize; + sigc::signal signal_close; protected: typedef ::Window Handle; @@ -39,13 +41,16 @@ protected: Display *display; DisplayOptions options; Handle window; + Atom wm_delete_window; Window(); public: - Window(unsigned, unsigned); - Window(const DisplayOptions &); + Window(unsigned w, unsigned h); + Window(const DisplayOptions &dopt); virtual ~Window(); + void set_title(const std::string &); + unsigned get_width() const { return options.width; } unsigned get_height() const { return options.height; } void show(); @@ -53,8 +58,10 @@ public: void tick(); protected: void prepare(); + void set_window(Handle wnd); void init(); - void process_event(const XEvent &); + void process_event(const XEvent &event); + virtual void on_event(const XEvent &event) { (void)event; } static int x_error_handler(Display *, XErrorEvent *); };