Lines Matching defs:text

4  *	This file implements text items for canvas widgets.
19 * One of the following structures is kept for each line of text
20 * in a text item. It contains geometry and display information
26 * line (in the "text" field of enclosing
27 * text item). */
37 int x1, y1; /* Upper-left pixel that is part of text
40 int x2, y2; /* Lower-left pixel that is part of text
46 * The structure below defines the record for each text item.
58 char *text; /* Text for item (malloc-ed). */
59 int numChars; /* Number of non-NULL characters in text. */
60 double x, y; /* Positioning point for text. */
61 Tk_Anchor anchor; /* Where to anchor text relative to (x,y). */
64 Tk_Justify justify; /* Justification mode for text. */
66 * area of text item. Used for selecting
68 XFontStruct *fontPtr; /* Font for drawing text. */
69 XColor *color; /* Color for text. */
70 Pixmap stipple; /* Stipple bitmap for text, or None. */
71 GC gc; /* Graphics context for drawing text. */
73 * individual lines of text item (malloc-ed). */
81 GC selTextGC; /* Graphics context for selected text. */
108 {TK_CONFIG_STRING, "-text", (char *) NULL, (char *) NULL,
109 "", Tk_Offset(TextItem, text), 0},
168 "text", /* name */
196 * This procedure is invoked to create a new text item
206 * A new text item is created.
234 textPtr->text = NULL;
275 * command on text items. See the user documentation for
327 * of a text item, such as its border and background colors.
368 textPtr->numChars = strlen(textPtr->text);
410 * If the text was changed, move the selection and insertion indices
442 * associated with a text item.
462 if (textPtr->text != NULL) {
463 ckfree(textPtr->text);
495 * all the pixels that may be drawn as part of a text item.
497 * used to display a text item or check for mouse hits.
533 * Work through the text computing the starting point, number of
537 p = textPtr->text;
547 (textPtr->text + textPtr->numChars) - p, 0,
570 * line of text, even if the line is empty (this can
571 * also happen if the entire text item is empty). This is
583 * of the bounding box for the text item.
701 * This procedure is invoked to draw a text item in a given
756 lineIndex = linePtr->firstChar - textPtr->text;
810 * background for the cursor before drawing the text. Note:
819 - (linePtr->firstChar - textPtr->text);
853 * Display the text in three pieces: the part before the
893 * Insert characters into a text item at a given position.
899 * The text in the given item is modified. The cursor and
908 Tk_Canvas canvas; /* Canvas containing text item. */
910 int beforeThis; /* Index of character before which text is
931 strncpy(new, textPtr->text, (size_t) beforeThis);
933 strcpy(new+beforeThis+length, textPtr->text+beforeThis);
934 ckfree(textPtr->text);
935 textPtr->text = new;
967 * Delete one or more characters from a text item.
1004 strncpy(new, textPtr->text, (size_t) first);
1005 strcpy(new+first, textPtr->text+last+1);
1006 ckfree(textPtr->text);
1007 textPtr->text = new;
1056 * text item, in canvas units.
1082 * Treat each line in the text item as a rectangle, compute the
1085 * units, since that's how the dimensions of the text are defined.
1203 * This procedure is invoked to rescale a text item.
1209 * Scales the position of the text, but not the size
1210 * of the font for the text.
1238 * This procedure is called to move a text item by a
1245 * The position of the text item is offset by (xDelta, yDelta),
1272 * Parse an index into a text item and return either its value
1294 * in itemPtr's text. */
1373 *indexPtr += linePtr->firstChar - textPtr->text;
1431 * of a text item. It is only called when this item has
1472 strncpy(buffer, textPtr->text + textInfoPtr->selectFirst + offset,
1485 * text items.
1576 * describing one line of text from a text item.