summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/unit-menu.h
diff options
context:
space:
mode:
authorMenTaLguY <mental@rydia.net>2006-01-16 02:36:01 +0000
committermental <mental@users.sourceforge.net>2006-01-16 02:36:01 +0000
commit179fa413b047bede6e32109e2ce82437c5fb8d34 (patch)
treea5a6ac2c1708bd02288fbd8edb2ff500ff2e0916 /src/ui/widget/unit-menu.h
downloadinkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.tar.gz
inkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.zip
moving trunk for module inkscape
(bzr r1)
Diffstat (limited to 'src/ui/widget/unit-menu.h')
-rw-r--r--src/ui/widget/unit-menu.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/ui/widget/unit-menu.h b/src/ui/widget/unit-menu.h
new file mode 100644
index 000000000..60a9702b4
--- /dev/null
+++ b/src/ui/widget/unit-menu.h
@@ -0,0 +1,70 @@
+/**
+ * \brief Unit Menu Widget - A drop down menu for choosing unit types.
+ *
+ * Author:
+ * Bryce Harrington <bryce@bryceharrington.org>
+ *
+ * Copyright (C) 2004 Bryce Harrington
+ *
+ * Released under GNU GPL. Read the file 'COPYING' for more information.
+ */
+
+#ifndef INKSCAPE_UI_WIDGET_UNIT_H
+#define INKSCAPE_UI_WIDGET_UNIT_H
+
+#include "combo-text.h"
+#include "util/units.h"
+
+using namespace Inkscape::Util;
+
+namespace Inkscape {
+namespace UI {
+namespace Widget {
+
+class UnitMenu : public ComboText
+{
+public:
+ UnitMenu();
+ virtual ~UnitMenu();
+
+ bool setUnitType(UnitType unit_type);
+
+ bool setUnit(Glib::ustring const &unit);
+
+ Unit getUnit() const;
+ Glib::ustring getUnitAbbr() const;
+ UnitType getUnitType() const;
+ double getUnitFactor() const;
+
+ int getDefaultDigits() const;
+ double getDefaultStep() const;
+ double getDefaultPage() const;
+
+ double getConversion(Glib::ustring const &new_unit_abbr, Glib::ustring const &old_unit_abbr = "no_unit") const;
+
+ bool isAbsolute() const;
+ bool isRadial() const;
+
+ UnitTable &getUnitTable() {return _unit_table;}
+
+protected:
+ UnitTable _unit_table;
+ UnitType _type;
+};
+
+} // namespace Widget
+} // namespace UI
+} // namespace Inkscape
+
+#endif // INKSCAPE_UI_WIDGET_UNIT_H
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :