text-tool.h revision 5dbe34c70236c1839571e70ef67dab4e29b6067f
#ifndef __SP_TEXT_CONTEXT_H__
#define __SP_TEXT_CONTEXT_H__
/*
* TextTool
*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
* bulia byak <buliabyak@users.sf.net>
*
* Copyright (C) 1999-2005 authors
* Copyright (C) 2001 Ximian, Inc.
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include <stddef.h>
#include "ui/tools/tool-base.h"
#include "libnrtype/Layout-TNG.h"
#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;
TextTool();
/* Text item position in root coordinates */
/* Insertion point position */
bool unimode;
SPCanvasItem *frame; // hiliting the first frame of flowtext; FIXME: make this a list to accommodate arbitrarily many chained shapes
bool show;
bool phase;
bool nascent_object; // true if we're clicked on canvas to put cursor, but no text typed yet so ->text is still NULL
bool over_text; // true if cursor is over a text object
bool creating; // dragging rubberband to create flowtext
SPCanvasItem *grabbed; // we grab while we are creating, to get events even if the mouse goes out of the window
/* Preedit String */
};
void sp_text_context_place_cursor (TextTool *tc, SPObject *text, Inkscape::Text::Layout::iterator where);
Inkscape::Text::Layout::iterator *sp_text_context_get_cursor_position(TextTool *tc, SPObject *text);
}
}
}
#endif