Code

Fix #1740146.
[inkscape.git] / src / ui / widget / spin-slider.h
1 /**
2  * \brief Groups an HScale and a SpinButton together using the same Adjustment
3  *
4  * Author:
5  *   Nicholas Bishop <nicholasbishop@gmail.com>
6  *
7  * Copyright (C) 2007 Author
8  *
9  * Released under GNU GPL.  Read the file 'COPYING' for more information.
10  */
12 #ifndef INKSCAPE_UI_WIDGET_SPIN_SLIDER_H
13 #define INKSCAPE_UI_WIDGET_SPIN_SLIDER_H
15 #include <gtkmm/adjustment.h>
16 #include <gtkmm/box.h>
17 #include <gtkmm/scale.h>
18 #include <gtkmm/spinbutton.h>
20 namespace Inkscape {
21 namespace UI {
22 namespace Widget {
24 class SpinSlider : public Gtk::HBox
25 {
26 public:
27     SpinSlider(double value, double lower, double upper, double step_inc,
28                double climb_rate, int digits);
30     // Shortcuts to _adjustment
31     Glib::SignalProxy0<void> signal_value_changed();
32     double get_value() const;
33     void set_value(const double);
35     const Gtk::Adjustment& get_adjustment() const;
36     Gtk::Adjustment& get_adjustment();
37     
38     const Gtk::HScale& get_scale() const;
39     Gtk::HScale& get_scale();
41     const Gtk::SpinButton& get_spin_button() const;
42     Gtk::SpinButton& get_spin_button();
43 private:
44     Gtk::Adjustment _adjustment;
45     Gtk::HScale _scale;
46     Gtk::SpinButton _spin;
47 };
49 } // namespace Widget
50 } // namespace UI
51 } // namespace Inkscape
53 #endif // INKSCAPE_UI_WIDGET_SPIN_SLIDER_H
55 /* 
56   Local Variables:
57   mode:c++
58   c-file-style:"stroustrup"
59   c-file-offsets:((innamespace . 0)(inline-open . 0))
60   indent-tabs-mode:nil
61   fill-column:99
62   End:
63 */
64 // vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :