From: Mikko Rasa Date: Tue, 27 Nov 2007 10:59:42 +0000 (+0000) Subject: Add a missing colon to button.h X-Git-Tag: 0.9~24 X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=1fde94c15fc65e85f5931a9daf74dd8806e682e0;p=libs%2Fgltk.git Add a missing colon to button.h Mark virtual functions in derived classes --- diff --git a/source/button.h b/source/button.h index bd81841..55cb2b0 100644 --- a/source/button.h +++ b/source/button.h @@ -28,7 +28,7 @@ public: Button &get_object() const; }; -private +private: std::string text; bool pressed; @@ -37,13 +37,13 @@ public: Button(const Resources &, const std::string & =std::string()); void set_text(const std::string &); - void button_press(int, int, unsigned); - void button_release(int, int, unsigned); - void pointer_enter(); - void pointer_leave(); + virtual void button_press(int, int, unsigned); + virtual void button_release(int, int, unsigned); + virtual void pointer_enter(); + virtual void pointer_leave(); private: - const char *get_class() const { return "button"; } - void render_part(const Part &) const; + virtual const char *get_class() const { return "button"; } + virtual void render_part(const Part &) const; }; } // namespace GLtk diff --git a/source/entry.h b/source/entry.h index bd986c2..4cbb2a9 100644 --- a/source/entry.h +++ b/source/entry.h @@ -33,12 +33,12 @@ public: void set_text(const std::string &); const std::string &get_text() const { return text; } - void key_press(unsigned, unsigned, wchar_t); - void focus_in(); - void focus_out(); + virtual void key_press(unsigned, unsigned, wchar_t); + virtual void focus_in(); + virtual void focus_out(); private: - const char *get_class() const { return "entry"; } - void render_part(const Part &) const; + virtual const char *get_class() const { return "entry"; } + virtual void render_part(const Part &) const; }; } // namespace GLtk diff --git a/source/hslider.h b/source/hslider.h index 0ce6377..4f05d6d 100644 --- a/source/hslider.h +++ b/source/hslider.h @@ -26,12 +26,12 @@ private: public: HSlider(const Resources &); - void button_press(int, int, unsigned); - void button_release(int, int, unsigned); - void pointer_motion(int, int); + virtual void button_press(int, int, unsigned); + virtual void button_release(int, int, unsigned); + virtual void pointer_motion(int, int); private: - const char *get_class() const { return "hslider"; } - void render_part(const Part &) const; + virtual const char *get_class() const { return "hslider"; } + virtual void render_part(const Part &) const; unsigned get_slider_width() const; }; diff --git a/source/indicator.h b/source/indicator.h index dd8a26e..69e488f 100644 --- a/source/indicator.h +++ b/source/indicator.h @@ -22,7 +22,7 @@ public: Indicator(const Resources &); void set_active(bool); private: - const char *get_class() const { return "indicator"; } + virtual const char *get_class() const { return "indicator"; } }; } // namespace GLtk diff --git a/source/label.h b/source/label.h index 373e4e4..0bd326f 100644 --- a/source/label.h +++ b/source/label.h @@ -34,8 +34,8 @@ public: void set_text(const std::string &); private: - const char *get_class() const { return "label"; } - void render_part(const Part &) const; + virtual const char *get_class() const { return "label"; } + virtual void render_part(const Part &) const; }; } // namespace GLtk diff --git a/source/panel.h b/source/panel.h index b4fc023..7279d78 100644 --- a/source/panel.h +++ b/source/panel.h @@ -51,15 +51,15 @@ public: void add(Widget &); - void button_press(int, int, unsigned); - void button_release(int, int, unsigned); - void pointer_motion(int, int); - void key_press(unsigned, unsigned, wchar_t); - void key_release(unsigned, unsigned); - void focus_out(); + virtual void button_press(int, int, unsigned); + virtual void button_release(int, int, unsigned); + virtual void pointer_motion(int, int); + virtual void key_press(unsigned, unsigned, wchar_t); + virtual void key_release(unsigned, unsigned); + virtual void focus_out(); private: - const char *get_class() const { return "panel"; } - void render_part(const Part &) const; + virtual const char *get_class() const { return "panel"; } + virtual void render_part(const Part &) const; void set_pointer_focus(Widget *); void set_input_focus(Widget *); Widget *get_child_at(int, int); diff --git a/source/root.h b/source/root.h index 863f1f7..0d30951 100644 --- a/source/root.h +++ b/source/root.h @@ -28,7 +28,7 @@ private: public: Root(Resources &, Window &); private: - const char *get_class() const { return "root"; } + virtual const char *get_class() const { return "root"; } void button_press_event(int, int, unsigned, unsigned); void button_release_event(int, int, unsigned, unsigned); void pointer_motion_event(int, int);