Code

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