~valavanisalex/ubuntu/precise/inkscape/fix-943984

« back to all changes in this revision

Viewing changes to inkscape-0.47pre1/src/ui/widget/random.h

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2009-07-02 17:09:45 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090702170945-nn6d6zswovbwju1t
Tags: 0.47~pre1-0ubuntu1
* New upstream release.
  - Don't constrain maximization on small resolution devices (pre0)
    (LP: #348842)
  - Fixes segfault on startup (pre0)
    (LP: #391149)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 */
 
12
 
 
13
#ifndef INKSCAPE_UI_WIDGET_RANDOM_H
 
14
#define INKSCAPE_UI_WIDGET_RANDOM_H
 
15
 
 
16
#include "scalar.h"
 
17
 
 
18
namespace Inkscape {
 
19
namespace UI {
 
20
namespace Widget {
 
21
 
 
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);
 
43
 
 
44
    long getStartSeed() const;
 
45
    void setStartSeed(long newseed);
 
46
 
 
47
    sigc::signal <void> signal_reseeded;
 
48
 
 
49
protected:
 
50
    long startseed;
 
51
 
 
52
private:
 
53
    void addReseedButton();
 
54
    void onReseedButtonClick();
 
55
};
 
56
 
 
57
} // namespace Widget
 
58
} // namespace UI
 
59
} // namespace Inkscape
 
60
 
 
61
#endif // INKSCAPE_UI_WIDGET_RANDOM_H
 
62
 
 
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 :