summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/spin-slider.h
blob: 50bd1dc04c5584f695d080f064ca498d360f4765 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/**
 * \brief Groups an HScale and a SpinButton together using the same Adjustment
 *
 * Author:
 *   Nicholas Bishop <nicholasbishop@gmail.com>
 *
 * Copyright (C) 2007 Author
 *
 * Released under GNU GPL.  Read the file 'COPYING' for more information.
 */

#ifndef INKSCAPE_UI_WIDGET_SPIN_SLIDER_H
#define INKSCAPE_UI_WIDGET_SPIN_SLIDER_H

#include <gtkmm/adjustment.h>
#include <gtkmm/box.h>
#include <gtkmm/scale.h>
#include <gtkmm/spinbutton.h>

namespace Inkscape {
namespace UI {
namespace Widget {

class SpinSlider : public Gtk::HBox
{
public:
    SpinSlider(double value, double lower, double upper, double step_inc,
	       double climb_rate, int digits);

    // Shortcuts to _adjustment
    Glib::SignalProxy0<void> signal_value_changed();
    double get_value() const;
    void set_value(const double);

    const Gtk::Adjustment& get_adjustment() const;
    Gtk::Adjustment& get_adjustment();
    
    const Gtk::HScale& get_scale() const;
    Gtk::HScale& get_scale();

    const Gtk::SpinButton& get_spin_button() const;
    Gtk::SpinButton& get_spin_button();
private:
    Gtk::Adjustment _adjustment;
    Gtk::HScale _scale;
    Gtk::SpinButton _spin;
};

} // namespace Widget
} // namespace UI
} // namespace Inkscape

#endif // INKSCAPE_UI_WIDGET_SPIN_SLIDER_H

/* 
  Local Variables:
  mode:c++
  c-file-style:"stroustrup"
  c-file-offsets:((innamespace . 0)(inline-open . 0))
  indent-tabs-mode:nil
  fill-column:99
  End:
*/
// vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :