19
16
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
20
#undef GTK_DISABLE_DEPRECATED
22
_CONFIGINCLUDE(gtkmmconfig.h)
22
24
#include <gtkmm/button.h>
23
25
#include <gtkmm/adjustment.h>
24
26
#include <gtkmm/enums.h>
26
28
_PINCLUDE(gtkmm/private/button_p.h)
34
35
/** A button which pops up a scale widget.
36
* This kind of widget is commonly used for volume controls in multimedia
37
* applications, and there is a Gtk::VolumeButton subclass that is tailored
37
* This kind of widget is commonly used for volume controls in multimedia
38
* applications, and there is a Gtk::VolumeButton subclass that is tailored
38
39
* for this use case.
43
44
class ScaleButton : public Button
45
46
_CLASS_GTKOBJECT(ScaleButton, GtkScaleButton, GTK_SCALE_BUTTON, Gtk::Button, GtkButton)
48
49
_WRAP_CTOR(ScaleButton(IconSize size, double min, double max, double step, const Glib::StringArrayHandle& icons), gtk_scale_button_new)
50
51
_WRAP_METHOD(void set_icons(const Glib::StringArrayHandle& icons), gtk_scale_button_set_icons)
51
52
_WRAP_METHOD(double get_value() const, gtk_scale_button_get_value)
52
53
_WRAP_METHOD(void set_value(double value), gtk_scale_button_set_value)
55
// TODO: The overload makes no sense, as the same type is returned
56
// by both methods. Also, the refreturn looks fishy to me.
53
57
_WRAP_METHOD(Gtk::Adjustment* get_adjustment(), gtk_scale_button_get_adjustment, refreturn)
54
58
_WRAP_METHOD(Gtk::Adjustment* get_adjustment() const, gtk_scale_button_get_adjustment, constversion)
55
60
_WRAP_METHOD(void set_adjustment(Gtk::Adjustment& adjustment), gtk_scale_button_set_adjustment)
62
// TODO: Should be deprecated, but we have no replacement yet.
56
63
_WRAP_METHOD(Orientation get_orientation(), gtk_scale_button_get_orientation)
57
64
_WRAP_METHOD(void set_orientation(Orientation orientation), gtk_scale_button_set_orientation)
58
66
_WRAP_METHOD(Widget* get_plus_button(), gtk_scale_button_get_plus_button)
59
67
_WRAP_METHOD(const Widget* get_plus_button() const, gtk_scale_button_get_plus_button, constversion)
60
68
_WRAP_METHOD(Widget* get_minus_button(), gtk_scale_button_get_minus_button)