2
* \brief Unit Menu Widget - A drop down menu for choosing unit types.
5
* Bryce Harrington <bryce@bryceharrington.org>
7
* Copyright (C) 2004 Bryce Harrington
9
* Released under GNU GPL. Read the file 'COPYING' for more information.
12
#ifndef INKSCAPE_UI_WIDGET_UNIT_H
13
#define INKSCAPE_UI_WIDGET_UNIT_H
15
#include "combo-text.h"
16
#include "util/units.h"
18
using namespace Inkscape::Util;
24
class UnitMenu : public ComboText
30
bool setUnitType(UnitType unit_type);
32
bool setUnit(Glib::ustring const &unit);
35
Glib::ustring getUnitAbbr() const;
36
UnitType getUnitType() const;
37
double getUnitFactor() const;
39
int getDefaultDigits() const;
40
double getDefaultStep() const;
41
double getDefaultPage() const;
43
double getConversion(Glib::ustring const &new_unit_abbr, Glib::ustring const &old_unit_abbr = "no_unit") const;
45
bool isAbsolute() const;
46
bool isRadial() const;
48
UnitTable &getUnitTable() {return _unit_table;}
51
UnitTable _unit_table;
57
} // namespace Inkscape
59
#endif // INKSCAPE_UI_WIDGET_UNIT_H
64
c-file-style:"stroustrup"
65
c-file-offsets:((innamespace . 0)(inline-open . 0))
70
// vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :