Code

trivial: ui/widget/*, ui/dialog/*: svn propset svn:eol-style native *.h *.cpp.
[inkscape.git] / src / ui / widget / random.h
1 /**
2  * \brief Random Scalar Widget - A labelled text box, with spin buttons and optional
3  *        icon or suffix, for entering arbitrary number values and generating a random number from it.
4  *
5  * Authors:
6  *  Johan Engelen <j.b.c.engelen@ewi.utwente.nl>
7  *
8  * Copyright (C) 2007 Author
9  *
10  * Released under GNU GPL.  Read the file 'COPYING' for more information.
11  */
13 #ifndef INKSCAPE_UI_WIDGET_RANDOM_H
14 #define INKSCAPE_UI_WIDGET_RANDOM_H
16 #include "scalar.h"
18 namespace Inkscape {
19 namespace UI {
20 namespace Widget {
22 class Random : public Scalar
23 {
24 public:
25     Random(Glib::ustring const &label,
26            Glib::ustring const &tooltip,
27            Glib::ustring const &suffix = "",
28            Glib::ustring const &icon = "",
29            bool mnemonic = true);
30     Random(Glib::ustring const &label,
31            Glib::ustring const &tooltip,
32            unsigned digits,
33            Glib::ustring const &suffix = "",
34            Glib::ustring const &icon = "",
35            bool mnemonic = true);
36     Random(Glib::ustring const &label,
37            Glib::ustring const &tooltip,
38            Gtk::Adjustment &adjust,
39            unsigned digits = 0,
40            Glib::ustring const &suffix = "",
41            Glib::ustring const &icon = "",
42            bool mnemonic = true);
44     long getStartSeed() const;
45     void setStartSeed(long newseed);
47     sigc::signal <void> signal_reseeded;
49 protected:
50     long startseed;
52 private:
53     void addReseedButton();
54     void onReseedButtonClick();
55 };
57 } // namespace Widget
58 } // namespace UI
59 } // namespace Inkscape
61 #endif // INKSCAPE_UI_WIDGET_RANDOM_H
63 /*
64   Local Variables:
65   mode:c++
66   c-file-style:"stroustrup"
67   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
68   indent-tabs-mode:nil
69   fill-column:99
70   End:
71 */
72 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :