diff --git a/src/text-editing.h b/src/text-editing.h
index 7e845dbc905dff38e9d6d1b93ee341de6f727261..3d5efbbecb0e508edfc48a2c54e64fc8cdf9741f 100644 (file)
--- a/src/text-editing.h
+++ b/src/text-editing.h
-#ifndef __SP_TEXT_EDITING_H__
-#define __SP_TEXT_EDITING_H__
+#ifndef SEEN_SP_TEXT_EDITING_H
+#define SEEN_SP_TEXT_EDITING_H
/*
* Text editing functions common for for text and flowtext
#include <utility> // std::pair
#include "libnrtype/Layout-TNG.h"
#include <libnr/nr-forward.h>
+#include "text-tag-attributes.h"
class SPCSSAttr;
struct SPItem;
@@ -27,11 +28,21 @@ typedef std::pair<Inkscape::Text::Layout::iterator, Inkscape::Text::Layout::iter
Inkscape::Text::Layout const * te_get_layout (SPItem const *item);
-bool sp_te_output_is_empty (SPItem const *item);
-bool sp_te_input_is_empty (SPObject const *item);
+/** Returns true if there are no visible characters on the canvas. */
+bool sp_te_output_is_empty(SPItem const *item);
+
+/** Returns true if the user has typed nothing in the text box. */
+bool sp_te_input_is_empty(SPObject const *item);
+
+/** Recursively gets the length of all the SPStrings at or below the given
+\a item. Also adds 1 for each line break encountered. */
unsigned sp_text_get_length(SPObject const *item);
+
+/** Recursively gets the length of all the SPStrings at or below the given
+\a item, before and not including \a upto. Also adds 1 for each line break encountered. */
unsigned sp_text_get_length_upto(SPObject const *item, SPObject const *upto);
+
std::vector<Geom::Point> sp_te_create_selection_quads(SPItem const *item, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, Geom::Matrix const &transform);
Inkscape::Text::Layout::iterator sp_te_get_position_by_coords (SPItem const *item, Geom::Point const &i_p);
Glib::ustring sp_te_get_string_multiline(SPItem const *text, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end);
void sp_te_set_repr_text_multiline(SPItem *text, gchar const *str);
+TextTagAttributes*
+text_tag_attributes_at_position(SPItem *item, Inkscape::Text::Layout::iterator const &position, unsigned *char_index);
+
void sp_te_adjust_kerning_screen(SPItem *text, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, SPDesktop *desktop, Geom::Point by);
+void sp_te_adjust_dx (SPItem *item, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, SPDesktop *desktop, double delta);
+void sp_te_adjust_dy (SPItem *item, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, SPDesktop *desktop, double delta);
void sp_te_adjust_rotation_screen(SPItem *text, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, SPDesktop *desktop, gdouble pixels);
void sp_te_adjust_rotation(SPItem *text, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, SPDesktop *desktop, gdouble degrees);
+void sp_te_set_rotation(SPItem *text, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, SPDesktop *desktop, gdouble degrees);
void sp_te_adjust_tspan_letterspacing_screen(SPItem *text, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, SPDesktop *desktop, gdouble by);
void sp_te_adjust_linespacing_screen(SPItem *text, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, SPDesktop *desktop, gdouble by);
bool is_top_level_text_object (SPObject *obj);
bool has_visible_text (SPObject *obj);
-#endif
+#endif // SEEN_SP_TEXT_EDITING_H