summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/arc-tool.h
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2013-11-09 22:36:13 +0000
committerMarkus Engel <markus.engel@tum.de>2013-11-09 22:36:13 +0000
commitc04e30df241a3ee039077425bab9b9c37abe2854 (patch)
tree6b7904966a289832bca2636c3117c893592e5ddd /src/ui/tools/arc-tool.h
parentadded missing translation flags and a small text change (diff)
downloadinkscape-c04e30df241a3ee039077425bab9b9c37abe2854.tar.gz
inkscape-c04e30df241a3ee039077425bab9b9c37abe2854.zip
Moved and renamed some tool-related files.
(bzr r12785)
Diffstat (limited to 'src/ui/tools/arc-tool.h')
-rw-r--r--src/ui/tools/arc-tool.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/src/ui/tools/arc-tool.h b/src/ui/tools/arc-tool.h
new file mode 100644
index 000000000..eaa50f2b9
--- /dev/null
+++ b/src/ui/tools/arc-tool.h
@@ -0,0 +1,76 @@
+#ifndef SEEN_ARC_CONTEXT_H
+#define SEEN_ARC_CONTEXT_H
+
+/*
+ * Ellipse drawing context
+ *
+ * Authors:
+ * Mitsuru Oka
+ * Lauris Kaplinski <lauris@kaplinski.com>
+ *
+ * Copyright (C) 2000-2002 Lauris Kaplinski
+ * Copyright (C) 2000-2001 Ximian, Inc.
+ * Copyright (C) 2002 Mitsuru Oka
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
+#include <stddef.h>
+#include <sigc++/connection.h>
+
+#include <2geom/point.h>
+#include "ui/tools/tool-base.h"
+
+#include "sp-ellipse.h"
+
+#define SP_ARC_CONTEXT(obj) (dynamic_cast<Inkscape::UI::Tools::ArcTool*>((Inkscape::UI::Tools::ToolBase*)obj))
+#define SP_IS_ARC_CONTEXT(obj) (dynamic_cast<const Inkscape::UI::Tools::ArcTool*>(const Inkscape::UI::Tools::ToolBase*(obj)) != NULL)
+
+namespace Inkscape {
+namespace UI {
+namespace Tools {
+
+class ArcTool : public ToolBase {
+public:
+ ArcTool();
+ virtual ~ArcTool();
+
+ static const std::string prefsPath;
+
+ virtual void setup();
+ virtual void finish();
+ virtual bool root_handler(GdkEvent* event);
+ virtual bool item_handler(SPItem* item, GdkEvent* event);
+
+ virtual const std::string& getPrefsPath();
+
+private:
+ SPGenericEllipse *arc;
+
+ Geom::Point center;
+
+ sigc::connection sel_changed_connection;
+
+ void selection_changed(Inkscape::Selection* selection);
+
+ void drag(Geom::Point pt, guint state);
+ void finishItem();
+ void cancel();
+};
+
+}
+}
+}
+
+#endif /* !SEEN_ARC_CONTEXT_H */
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :