Code

Merge from trunk.
[inkscape.git] / src / sp-flowtext.h
index 9e6d711fa271a535f14b6c3e2546cbda7cfe986e..3b0ce178a349002a3a77b96147a66a72569da3e8 100644 (file)
@@ -7,7 +7,7 @@
 #include "sp-item.h"
 
 #include "display/nr-arena-forward.h"
-
+#include <2geom/forward.h>
 #include "libnrtype/Layout-TNG.h"
 
 #define SP_TYPE_FLOWTEXT            (sp_flowtext_get_type ())
@@ -20,10 +20,9 @@ struct SPFlowtext : public SPItem {
     /** Completely recalculates the layout. */
     void rebuildLayout();
 
-    /** Converts the current selection (which must be a flowroot) into
-    a \<text\> tree, keeping all the formatting and positioning, but losing
-    the automatic wrapping ability. */
-    static void convert_to_text();
+    /** Converts the flowroot in into a \<text\> tree, keeping all the formatting and positioning,
+    but losing the automatic wrapping ability. */
+    Inkscape::XML::Node *getAsText();
 
     SPItem *get_frame(SPItem *after);
 
@@ -33,7 +32,9 @@ struct SPFlowtext : public SPItem {
     Inkscape::Text::Layout layout;
 
     /** discards the NRArena objects representing this text. */
-       void _clearFlow(NRArenaGroup* in_arena);
+    void _clearFlow(NRArenaGroup* in_arena);
+
+    double par_indent;
 
 private:
     /** Recursively walks the xml tree adding tags and their contents. */
@@ -46,11 +47,22 @@ private:
 };
 
 struct SPFlowtextClass {
-       SPItemClass parent_class;
+    SPItemClass parent_class;
 };
 
 GType sp_flowtext_get_type (void);
 
-SPItem *create_flowtext_with_internal_frame (SPDesktop *desktop, NR::Point p1, NR::Point p2);
+SPItem *create_flowtext_with_internal_frame (SPDesktop *desktop, Geom::Point p1, Geom::Point p2);
 
 #endif
+
+/*
+  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:fileencoding=utf-8:textwidth=99 :