public:
Button(const std::string & = std::string());
- virtual const char *get_class() const { return "button"; }
+ const char *get_class() const override { return "button"; }
private:
- virtual void autosize_special(const Part &, Geometry &) const;
+ void autosize_special(const Part &, Geometry &) const override;
public:
void set_text(const std::string &);
void set_icon(const GL::Texture2D *);
private:
- virtual void rebuild_special(const Part &);
+ void rebuild_special(const Part &) override;
public:
- virtual void button_press(int, int, unsigned);
- virtual void button_release(int, int, unsigned);
- virtual void pointer_motion(int, int);
- virtual bool navigate(Navigation);
+ void button_press(int, int, unsigned) override;
+ void button_release(int, int, unsigned) override;
+ void pointer_motion(int, int) override;
+ bool navigate(Navigation) override;
private:
- virtual void on_style_change();
+ void on_style_change() override;
};
} // namespace GLtk
Column(Layout &);
private:
- virtual void finish_widget(Widget &);
+ void finish_widget(Widget &) override;
};
} // namespace GLtk
void check_animation_interval();
protected:
- virtual void rebuild_hierarchy();
+ void rebuild_hierarchy() override;
public:
- virtual void button_press(int, int, unsigned);
- virtual void button_release(int, int, unsigned);
- virtual void pointer_motion(int, int);
+ void button_press(int, int, unsigned) override;
+ void button_release(int, int, unsigned) override;
+ void pointer_motion(int, int) override;
private:
Widget *get_pointer_target(int, int, bool) const;
public:
- virtual void pointer_leave();
- virtual void touch_press(int, int, unsigned);
- virtual void touch_release(int, int, unsigned);
- virtual void touch_motion(int, int, unsigned);
- virtual bool key_press(unsigned, unsigned);
- virtual bool key_release(unsigned, unsigned);
- virtual bool character(wchar_t);
- virtual void focus_in();
- virtual void focus_out();
- virtual bool navigate(Navigation);
- virtual void animate(const Time::TimeDelta &);
+ void pointer_leave() override;
+ void touch_press(int, int, unsigned) override;
+ void touch_release(int, int, unsigned) override;
+ void touch_motion(int, int, unsigned) override;
+ bool key_press(unsigned, unsigned) override;
+ bool key_release(unsigned, unsigned) override;
+ bool character(wchar_t) override;
+ void focus_in() override;
+ void focus_out() override;
+ bool navigate(Navigation) override;
+ void animate(const Time::TimeDelta &) override;
protected:
- virtual void on_reparent();
+ void on_reparent() override;
virtual void on_child_added(Widget &) { }
virtual void on_child_removed(Widget &) { }
virtual void on_input_focus_changed(Widget *);
bool stale = false;
public:
- virtual const char *get_class() const { return "dialog"; }
+ const char *get_class() const override { return "dialog"; }
/** Adds an action button to the dialog. Pressing the button will invoke
response handlers and delete the dialog. */
away from the dialog. */
void set_modal(bool);
- virtual void button_release(int, int, unsigned);
- virtual bool key_release(unsigned, unsigned);
- virtual bool navigate(Navigation);
+ void button_release(int, int, unsigned) override;
+ bool key_release(unsigned, unsigned) override;
+ bool navigate(Navigation) override;
protected:
void response(int);
void check_stale();
int drag_y = 0;
public:
- virtual const char *get_class() const { return "draghandle"; }
+ const char *get_class() const override { return "draghandle"; }
- virtual void button_press(int, int, unsigned);
- virtual void button_release(int, int, unsigned);
- virtual void pointer_motion(int, int);
+ void button_press(int, int, unsigned) override;
+ void button_release(int, int, unsigned) override;
+ void pointer_motion(int, int) override;
private:
- virtual void on_reparent();
+ void on_reparent() override;
};
} // namespace GLtk
void init();
public:
- virtual const char *get_class() const { return "dropdown"; }
+ const char *get_class() const override { return "dropdown"; }
private:
- virtual void autosize_special(const Part &, Geometry &) const;
+ void autosize_special(const Part &, Geometry &) const override;
public:
void set_data(ListData &d) { list.set_data(d); }
int get_selected_index() const { return list.get_selected_index(); }
private:
- virtual void rebuild_special(const Part &);
- virtual void render_special(const Part &, GL::Renderer &) const;
+ void rebuild_special(const Part &) override;
+ void render_special(const Part &, GL::Renderer &) const override;
public:
- virtual void button_press(int, int, unsigned);
- virtual bool navigate(Navigation);
+ void button_press(int, int, unsigned) override;
+ bool navigate(Navigation) override;
private:
- virtual void on_size_change();
- virtual void on_style_change();
+ void on_size_change() override;
+ void on_style_change() override;
void open_list();
void close_list();
public:
Entry(const std::string & = std::string());
- virtual const char *get_class() const { return "entry"; }
+ const char *get_class() const override { return "entry"; }
private:
- virtual void autosize_special(const Part &, Geometry &) const;
+ void autosize_special(const Part &, Geometry &) const override;
public:
void set_text(const std::string &);
bool is_multiline() const { return multiline; }
private:
- virtual void rebuild_special(const Part &);
- virtual void render_special(const Part &, GL::Renderer &) const;
+ void rebuild_special(const Part &) override;
+ void render_special(const Part &, GL::Renderer &) const override;
public:
- virtual void touch_press(int, int, unsigned);
- virtual bool key_press(unsigned, unsigned);
- virtual bool character(wchar_t);
- virtual void focus_in();
- virtual void focus_out();
- virtual bool navigate(Navigation);
- virtual void animate(const Time::TimeDelta &);
+ void touch_press(int, int, unsigned) override;
+ bool key_press(unsigned, unsigned) override;
+ bool character(wchar_t) override;
+ void focus_in() override;
+ void focus_out() override;
+ bool navigate(Navigation) override;
+ void animate(const Time::TimeDelta &) override;
private:
- virtual void on_size_change();
- virtual void on_style_change();
+ void on_size_change() override;
+ void on_style_change() override;
void move_edit_position(Navigation, bool);
void adjust_edit_position_for_change(unsigned, int);
FloatingArrangement(Layout &);
private:
- virtual void process_widget(Widget &, Side, bool) { }
- virtual void finish_widget(Widget &);
- virtual void finish_slot() { }
+ void process_widget(Widget &, Side, bool) override { }
+ void finish_widget(Widget &) override;
+ void finish_slot() override { }
};
} // namespace GLtk
void next_row();
private:
- virtual void process_widget(Widget &, Side, bool);
- virtual void finish_widget(Widget &);
- virtual void finish_slot();
+ void process_widget(Widget &, Side, bool) override;
+ void finish_widget(Widget &) override;
+ void finish_slot() override;
void finish_row();
};
public:
Image(const GL::Texture2D * = nullptr);
- virtual const char *get_class() const { return "image"; }
+ const char *get_class() const override { return "image"; }
private:
- virtual void autosize_special(const Part &, Geometry &) const;
+ void autosize_special(const Part &, Geometry &) const override;
public:
void set_image(const GL::Texture2D *);
private:
void update_icon();
- virtual void rebuild_special(const Part &);
- virtual void on_style_change();
- virtual void on_reparent();
+ void rebuild_special(const Part &) override;
+ void on_style_change() override;
+ void on_reparent() override;
};
} // namespace GLtk
class MSPGLTK_API Indicator: public Widget
{
public:
- virtual const char *get_class() const { return "indicator"; }
+ const char *get_class() const override { return "indicator"; }
void set_active(bool);
};
public:
Label(const std::string & = std::string());
- virtual const char *get_class() const { return "label"; }
+ const char *get_class() const override { return "label"; }
void set_text(const std::string &);
private:
- virtual void autosize_special(const Part &, Geometry &) const;
- virtual void rebuild_special(const Part &);
+ void autosize_special(const Part &, Geometry &) const override;
+ void rebuild_special(const Part &) override;
- virtual void on_style_change();
+ void on_style_change() override;
};
} // namespace GLtk
void spacing(unsigned);
protected:
- virtual void process_widget(Widget &, Side, bool);
- virtual void finish_widget(Widget &);
- virtual void finish_slot();
+ void process_widget(Widget &, Side, bool) override;
+ void finish_widget(Widget &) override;
+ void finish_slot() override;
};
} // namespace GLtk
Item();
public:
- virtual const char *get_class() const { return "listitem"; }
+ const char *get_class() const override { return "listitem"; }
protected:
- virtual void autosize_special(const Part &, Geometry &) const;
+ void autosize_special(const Part &, Geometry &) const override;
public:
void set_active(bool);
- virtual void render_special(const Part &, GL::Renderer &) const;
+ void render_special(const Part &, GL::Renderer &) const override;
};
class SimpleItem: public Item
protected:
SimpleItem() = default;
- virtual void on_style_change();
+ void on_style_change() override;
};
class MultiColumnItem: public Item
virtual void check_widths(std::vector<unsigned> &) const;
virtual void set_widths(const std::vector<unsigned> &);
- virtual void on_style_change();
+ void on_style_change() override;
};
private:
TypedItemFactory(const ListData &d)
{ set_data(d); }
- virtual void set_data(const ListData &d)
+ void set_data(const ListData &d) override
{
if(const ListDataStore<ValueType> *ds = dynamic_cast<const ListDataStore<ValueType> *>(&d))
data = ds;
throw incompatible_data(typeid(ValueType));
}
- virtual Item *create_item(unsigned i) const
+ Item *create_item(unsigned i) const override
{
return new I(data->get(i));
}
List(ListData &);
virtual ~List();
- virtual const char *get_class() const { return "list"; }
+ const char *get_class() const override { return "list"; }
private:
- virtual void autosize_special(const Part &, Geometry &) const;
+ void autosize_special(const Part &, Geometry &) const override;
public:
void set_data(ListData &);
private:
void set_selected_item(Widget *);
- virtual void rebuild_special(const Part &);
- virtual void render_special(const Part &, GL::Renderer &) const;
+ void rebuild_special(const Part &) override;
+ void render_special(const Part &, GL::Renderer &) const override;
public:
- virtual bool key_press(unsigned, unsigned);
- virtual void button_press(int, int, unsigned);
- virtual void touch_press(int, int, unsigned);
- virtual void touch_release(int, int, unsigned);
- virtual void touch_motion(int, int, unsigned);
- virtual void focus_in();
- virtual bool navigate(Navigation);
+ bool key_press(unsigned, unsigned) override;
+ void button_press(int, int, unsigned) override;
+ void touch_press(int, int, unsigned) override;
+ void touch_release(int, int, unsigned) override;
+ void touch_motion(int, int, unsigned) override;
+ void focus_in() override;
+ bool navigate(Navigation) override;
private:
- virtual void on_style_change();
+ void on_style_change() override;
void move_focus(Navigation, bool);
void set_focus_index(int);
signal_cleared.emit();
}
- virtual unsigned size() const { return items.size(); }
+ unsigned size() const override { return items.size(); }
};
template<typename T>
public:
FunctionListData(Func f): func(f) { }
- virtual std::string get_string(unsigned i) const
+ std::string get_string(unsigned i) const override
{ return func(this->get(i)); }
};
template<typename T>
static void register_child_type(const std::string &);
- virtual const char *get_class() const { return "panel"; }
+ const char *get_class() const override { return "panel"; }
void set_layout(Layout *);
Layout *get_layout() { return layout; }
protected:
- virtual void autosize_special(const Part &, Geometry &) const;
- virtual void render_special(const Part &, GL::Renderer &) const;
+ void autosize_special(const Part &, Geometry &) const override;
+ void render_special(const Part &, GL::Renderer &) const override;
public:
- virtual bool navigate(Navigation);
+ bool navigate(Navigation) override;
protected:
Widget *find_next_child(int, int, int, int, int) const;
static int compute_delta(int, int, int, int, int);
- virtual void on_size_change();
- virtual void on_child_added(Widget &);
- virtual void on_child_removed(Widget &);
+ void on_size_change() override;
+ void on_child_added(Widget &) override;
+ void on_child_removed(Widget &) override;
};
float fraction = 0.0f;
public:
- virtual const char *get_class() const { return "progressbar"; }
+ const char *get_class() const override { return "progressbar"; }
void set_range(float);
void set_value(float);
private:
- virtual void autosize_special(const Part &, Geometry &) const;
- virtual void rebuild_special(const Part &);
+ void autosize_special(const Part &, Geometry &) const override;
+ void rebuild_special(const Part &) override;
};
} // namespace GLtk
Root(Resources &, Graphics::Window *, Input::Keyboard *, Input::Mouse *, Input::Touchscreen * = nullptr);
virtual ~Root();
- virtual const char *get_class() const { return "root"; }
+ const char *get_class() const override { return "root"; }
Resources &get_resources() const { return resources; }
virtual unsigned get_width() const { return geom.w; }
virtual unsigned get_height() const { return geom.h; }
void tick();
- virtual void setup_frame(GL::Renderer &);
- virtual void render(GL::Renderer &, GL::Tag = GL::Tag()) const;
+ void setup_frame(GL::Renderer &) override;
+ void render(GL::Renderer &, GL::Tag = GL::Tag()) const override;
private:
bool button_press_event(unsigned);
void get_touch(unsigned, int &, int &);
void update_camera();
- virtual void on_size_change();
- virtual void on_child_added(Widget &);
+ void on_size_change() override;
+ void on_child_added(Widget &) override;
};
} // namespace GLtk
Row(Layout &);
private:
- virtual void finish_widget(Widget &);
+ void finish_widget(Widget &) override;
};
} // namespace GLtk
double get_value() const { return value; }
protected:
- virtual void autosize_special(const Part &, Geometry &) const;
- virtual void rebuild_special(const Part &);
+ void autosize_special(const Part &, Geometry &) const override;
+ void rebuild_special(const Part &) override;
public:
- virtual void button_press(int, int, unsigned);
- virtual void button_release(int, int, unsigned);
- virtual void pointer_motion(int, int);
+ void button_press(int, int, unsigned) override;
+ void button_release(int, int, unsigned) override;
+ void pointer_motion(int, int) override;
protected:
- virtual void on_size_change();
- virtual void on_style_change();
+ void on_size_change() override;
+ void on_style_change() override;
};
public:
VSlider(): Slider(VERTICAL) { }
- virtual const char *get_class() const { return "vslider"; }
+ const char *get_class() const override { return "vslider"; }
};
class MSPGLTK_API HSlider: public Slider
public:
HSlider(): Slider(HORIZONTAL) { }
- virtual const char *get_class() const { return "hslider"; }
+ const char *get_class() const override { return "hslider"; }
};
} // namespace GLtk
Stack(Layout &);
private:
- virtual void process_widget(Widget &, Side, bool);
- virtual void finish_widget(Widget &);
- virtual void finish_slot() { }
+ void process_widget(Widget &, Side, bool) override;
+ void finish_widget(Widget &) override;
+ void finish_slot() override { }
};
} // namespace GLtk
public:
Loader(Toggle &);
private:
- virtual void finish();
+ void finish() override;
void text(const std::string &);
};
public:
Toggle(const std::string & = std::string());
- virtual const char *get_class() const { return "toggle"; }
+ const char *get_class() const override { return "toggle"; }
private:
- virtual void autosize_special(const Part &, Geometry &) const;
+ void autosize_special(const Part &, Geometry &) const override;
public:
void set_text(const std::string &);
bool get_value() const { return value; }
private:
- virtual void rebuild_special(const Part &);
+ void rebuild_special(const Part &) override;
public:
- virtual void button_press(int, int, unsigned);
- virtual void button_release(int, int, unsigned);
- virtual bool navigate(Navigation);
+ void button_press(int, int, unsigned) override;
+ void button_release(int, int, unsigned) override;
+ bool navigate(Navigation) override;
private:
- virtual void on_style_change();
+ void on_style_change() override;
};
} // namespace GLtk