diff options
| author | Markus Engel <markus.engel@tum.de> | 2013-11-07 20:44:00 +0000 |
|---|---|---|
| committer | Markus Engel <markus.engel@tum.de> | 2013-11-07 20:44:00 +0000 |
| commit | 55b451bf382e0c3d5ed8728e42fbb535acfa8a33 (patch) | |
| tree | 094d9faca06cfffc89a872732db4ac3ef60508d9 /src/text-context.h | |
| parent | Fix for Bug #1247985 (Incorrect implementation of plural forms). (diff) | |
| download | inkscape-55b451bf382e0c3d5ed8728e42fbb535acfa8a33.tar.gz inkscape-55b451bf382e0c3d5ed8728e42fbb535acfa8a33.zip | |
First step of moving tools into appropriate namespaces.
(bzr r12782)
Diffstat (limited to 'src/text-context.h')
| -rw-r--r-- | src/text-context.h | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/src/text-context.h b/src/text-context.h index 95b812c2b..1b618a1f0 100644 --- a/src/text-context.h +++ b/src/text-context.h @@ -2,7 +2,7 @@ #define __SP_TEXT_CONTEXT_H__ /* - * SPTextContext + * TextTool * * Authors: * Lauris Kaplinski <lauris@kaplinski.com> @@ -23,15 +23,19 @@ #include <2geom/point.h> #include "libnrtype/Layout-TNG.h" -#define SP_TEXT_CONTEXT(obj) (dynamic_cast<SPTextContext*>((SPEventContext*)obj)) -#define SP_IS_TEXT_CONTEXT(obj) (dynamic_cast<const SPTextContext*>((const SPEventContext*)obj) != NULL) +#define SP_TEXT_CONTEXT(obj) (dynamic_cast<Inkscape::UI::Tools::TextTool*>((Inkscape::UI::Tools::ToolBase*)obj)) +#define SP_IS_TEXT_CONTEXT(obj) (dynamic_cast<const Inkscape::UI::Tools::TextTool*>((const Inkscape::UI::Tools::ToolBase*)obj) != NULL) struct SPCtrlLine; -class SPTextContext : public SPEventContext { +namespace Inkscape { +namespace UI { +namespace Tools { + +class TextTool : public ToolBase { public: - SPTextContext(); - virtual ~SPTextContext(); + TextTool(); + virtual ~TextTool(); sigc::connection sel_changed_connection; sigc::connection sel_modified_connection; @@ -82,12 +86,16 @@ public: virtual const std::string& getPrefsPath(); }; -bool sp_text_paste_inline(SPEventContext *ec); -Glib::ustring sp_text_get_selected_text(SPEventContext const *ec); -SPCSSAttr *sp_text_get_style_at_cursor(SPEventContext const *ec); -bool sp_text_delete_selection(SPEventContext *ec); -void sp_text_context_place_cursor (SPTextContext *tc, SPObject *text, Inkscape::Text::Layout::iterator where); -void sp_text_context_place_cursor_at (SPTextContext *tc, SPObject *text, Geom::Point const p); -Inkscape::Text::Layout::iterator *sp_text_context_get_cursor_position(SPTextContext *tc, SPObject *text); +bool sp_text_paste_inline(ToolBase *ec); +Glib::ustring sp_text_get_selected_text(ToolBase const *ec); +SPCSSAttr *sp_text_get_style_at_cursor(ToolBase const *ec); +bool sp_text_delete_selection(ToolBase *ec); +void sp_text_context_place_cursor (TextTool *tc, SPObject *text, Inkscape::Text::Layout::iterator where); +void sp_text_context_place_cursor_at (TextTool *tc, SPObject *text, Geom::Point const p); +Inkscape::Text::Layout::iterator *sp_text_context_get_cursor_position(TextTool *tc, SPObject *text); + +} +} +} #endif |
