text-context.h revision 851352c059212fb89b24a36de4bcb9c7d0a13212
d064fef06dcbcb5f6c1be03e286b1a3433d6dfd7Sumit Bose * SPTextContext
d064fef06dcbcb5f6c1be03e286b1a3433d6dfd7Sumit Bose * Lauris Kaplinski <lauris@kaplinski.com>
d064fef06dcbcb5f6c1be03e286b1a3433d6dfd7Sumit Bose * bulia byak <buliabyak@users.sf.net>
d064fef06dcbcb5f6c1be03e286b1a3433d6dfd7Sumit Bose * Copyright (C) 1999-2005 authors
d064fef06dcbcb5f6c1be03e286b1a3433d6dfd7Sumit Bose * Copyright (C) 2001 Ximian, Inc.
d064fef06dcbcb5f6c1be03e286b1a3433d6dfd7Sumit Bose * Released under GNU GPL, read the file 'COPYING' for more information
d064fef06dcbcb5f6c1be03e286b1a3433d6dfd7Sumit Bose/* #include <gdk/gdkic.h> */
d064fef06dcbcb5f6c1be03e286b1a3433d6dfd7Sumit Bose#define SP_TYPE_TEXT_CONTEXT (sp_text_context_get_type ())
d064fef06dcbcb5f6c1be03e286b1a3433d6dfd7Sumit Bose#define SP_TEXT_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_TEXT_CONTEXT, SPTextContext))
d064fef06dcbcb5f6c1be03e286b1a3433d6dfd7Sumit Bose#define SP_TEXT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_TEXT_CONTEXT, SPTextContextClass))
d064fef06dcbcb5f6c1be03e286b1a3433d6dfd7Sumit Bose#define SP_IS_TEXT_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_TEXT_CONTEXT))
d064fef06dcbcb5f6c1be03e286b1a3433d6dfd7Sumit Bose#define SP_IS_TEXT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_TEXT_CONTEXT))
d064fef06dcbcb5f6c1be03e286b1a3433d6dfd7Sumit Bose SPItem *text; // the text we're editing, or NULL if none selected
9d17f436795a36b1b1126f444923aa847fd0f93aPavel Reichl /* Text item position in root coordinates */
d064fef06dcbcb5f6c1be03e286b1a3433d6dfd7Sumit Bose /* Insertion point position */
d064fef06dcbcb5f6c1be03e286b1a3433d6dfd7Sumit Bose SPCanvasItem *frame; // hiliting the first frame of flowtext; FIXME: make this a list to accommodate arbitrarily many chained shapes
4e5e846de22407f825fe3b4040d79606818a2419Jakub Hrozek guint nascent_object : 1; // true if we're clicked on canvas to put cursor, but no text typed yet so ->text is still NULL
d064fef06dcbcb5f6c1be03e286b1a3433d6dfd7Sumit Bose guint over_text : 1; // true if cursor is over a text object
d064fef06dcbcb5f6c1be03e286b1a3433d6dfd7Sumit Bose guint dragging : 2; // dragging selection over text
d064fef06dcbcb5f6c1be03e286b1a3433d6dfd7Sumit Bose guint creating : 1; // dragging rubberband to create flowtext
d064fef06dcbcb5f6c1be03e286b1a3433d6dfd7Sumit Bose SPCanvasItem *grabbed; // we grab while we are creating, to get events even if the mouse goes out of the window
d064fef06dcbcb5f6c1be03e286b1a3433d6dfd7Sumit Bose Geom::Point p0; // initial point if the flowtext rect
d064fef06dcbcb5f6c1be03e286b1a3433d6dfd7Sumit Bose /* Preedit String */
d064fef06dcbcb5f6c1be03e286b1a3433d6dfd7Sumit Bose/* Standard Gtk function */
d064fef06dcbcb5f6c1be03e286b1a3433d6dfd7Sumit BoseGlib::ustring sp_text_get_selected_text(SPEventContext const *ec);
4e5e846de22407f825fe3b4040d79606818a2419Jakub HrozekSPCSSAttr *sp_text_get_style_at_cursor(SPEventContext const *ec);
8babbeee01e67893af4828ddfc922ecac0be4197Pavel Reichlbool sp_text_delete_selection(SPEventContext *ec);
d064fef06dcbcb5f6c1be03e286b1a3433d6dfd7Sumit Bosevoid sp_text_context_place_cursor (SPTextContext *tc, SPObject *text, Inkscape::Text::Layout::iterator where);
d064fef06dcbcb5f6c1be03e286b1a3433d6dfd7Sumit Bosevoid sp_text_context_place_cursor_at (SPTextContext *tc, SPObject *text, Geom::Point const p);