Button &get_object() const;
};
-private
+private:
std::string text;
bool pressed;
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
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
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;
};
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
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
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);
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);