From 55b451bf382e0c3d5ed8728e42fbb535acfa8a33 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Thu, 7 Nov 2013 21:44:00 +0100 Subject: First step of moving tools into appropriate namespaces. (bzr r12782) --- src/text-context.h | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) (limited to 'src/text-context.h') 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 @@ -23,15 +23,19 @@ #include <2geom/point.h> #include "libnrtype/Layout-TNG.h" -#define SP_TEXT_CONTEXT(obj) (dynamic_cast((SPEventContext*)obj)) -#define SP_IS_TEXT_CONTEXT(obj) (dynamic_cast((const SPEventContext*)obj) != NULL) +#define SP_TEXT_CONTEXT(obj) (dynamic_cast((Inkscape::UI::Tools::ToolBase*)obj)) +#define SP_IS_TEXT_CONTEXT(obj) (dynamic_cast((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 -- cgit v1.2.3