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

« back to all changes in this revision

Viewing changes to inkscape-0.47pre1/src/ui/widget/unit-menu.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 Unit Menu Widget - A drop down menu for choosing unit types.
 
3
 *
 
4
 * Author:
 
5
 *   Bryce Harrington <bryce@bryceharrington.org>
 
6
 *
 
7
 * Copyright (C) 2004 Bryce Harrington
 
8
 *
 
9
 * Released under GNU GPL.  Read the file 'COPYING' for more information.
 
10
 */
 
11
 
 
12
#ifndef INKSCAPE_UI_WIDGET_UNIT_H
 
13
#define INKSCAPE_UI_WIDGET_UNIT_H
 
14
 
 
15
#include "combo-text.h"
 
16
#include "util/units.h"
 
17
 
 
18
using namespace Inkscape::Util;
 
19
 
 
20
namespace Inkscape {
 
21
namespace UI {
 
22
namespace Widget {
 
23
 
 
24
class UnitMenu : public ComboText
 
25
{
 
26
public:
 
27
    UnitMenu();
 
28
    virtual ~UnitMenu();
 
29
 
 
30
    bool          setUnitType(UnitType unit_type);
 
31
 
 
32
    bool          setUnit(Glib::ustring const &unit);
 
33
 
 
34
    Unit          getUnit() const;
 
35
    Glib::ustring getUnitAbbr() const;
 
36
    UnitType      getUnitType() const;
 
37
    double        getUnitFactor() const;
 
38
 
 
39
    int           getDefaultDigits() const;
 
40
    double        getDefaultStep() const;
 
41
    double        getDefaultPage() const;
 
42
 
 
43
    double        getConversion(Glib::ustring const &new_unit_abbr, Glib::ustring const &old_unit_abbr = "no_unit") const;
 
44
 
 
45
    bool          isAbsolute() const;
 
46
    bool          isRadial() const;
 
47
 
 
48
    UnitTable     &getUnitTable() {return _unit_table;}
 
49
 
 
50
protected:
 
51
    UnitTable     _unit_table;
 
52
    UnitType          _type;
 
53
};
 
54
 
 
55
} // namespace Widget
 
56
} // namespace UI
 
57
} // namespace Inkscape
 
58
 
 
59
#endif // INKSCAPE_UI_WIDGET_UNIT_H
 
60
 
 
61
/*
 
62
  Local Variables:
 
63
  mode:c++
 
64
  c-file-style:"stroustrup"
 
65
  c-file-offsets:((innamespace . 0)(inline-open . 0))
 
66
  indent-tabs-mode:nil
 
67
  fill-column:99
 
68
  End:
 
69
*/
 
70
// vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :