1 /*************************************<+>*************************************
2 *****************************************************************************
8 ** Description: Private include file for TextEdit widget ascii sink
10 *****************************************************************************
12 ** Copyright (c) 1988 by Hewlett-Packard Company
13 ** Copyright (c) 1987, 1988 by Digital Equipment Corporation, Maynard,
14 ** Massachusetts, and the Massachusetts Institute of Technology,
15 ** Cambridge, Massachusetts
17 ** Permission to use, copy, modify, and distribute this software
18 ** and its documentation for any purpose and without fee is hereby
19 ** granted, provided that the above copyright notice appear in all
20 ** copies and that both that copyright notice and this permission
21 ** notice appear in supporting documentation, and that the names of
22 ** Hewlett-Packard, Digital or M.I.T. not be used in advertising or
23 ** publicity pertaining to distribution of the software without
24 ** written prior permission.
26 ** DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
27 ** ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
28 ** DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
29 ** ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30 ** WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
31 ** ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
34 *****************************************************************************
35 *************************************<+>*************************************/
38 #ifndef _XwTextEditDisplayPrivate_h
39 #define _XwTextEditDisplayPrivate_h
41 /*****************************************************************************
45 *****************************************************************************/
47 #define INFINITE_WIDTH 32767
49 #define applyDisplay(method) (*(self->text.sink->method))
51 /*****************************************************************************
53 * Displayable text management data structures (LineTable)
55 *****************************************************************************/
57 #define RequiredCursorMargin 3
60 XwTextPosition position
, drawPos
;
63 } XwLineTableEntry
, *XwLineTableEntryPtr
;
65 /* Line Tables are n+1 long - last position displayed is in last lt entry */
67 XwTextPosition top
; /* Top of the displayed text. */
68 XwTextPosition lines
; /* How many lines in this table. */
69 XwLineTableEntry
*info
; /* A dynamic array, one entry per line */
70 } XwLineTable
, *XwLineTablePtr
;
72 typedef enum {XwisOn
, XwisOff
} XwInsertState
;
74 typedef enum {XwselectNull
, XwselectPosition
, XwselectChar
, XwselectWord
,
75 XwselectLine
, XwselectParagraph
, XwselectAll
} XwSelectType
;
77 typedef enum {XwsmTextSelect
, XwsmTextExtend
} XwSelectionMode
;
79 typedef enum {XwactionStart
, XwactionAdjust
, XwactionEnd
} XwSelectionAction
;
82 XwTextPosition left
, right
;
86 #define IsPositionVisible(ctx, pos)\
87 (pos >= ctx->text.lt.info[0].position && \
88 pos <= ctx->text.lt.info[ctx->text.lt.lines].position)
92 /* DON'T ADD STUFF AFTER THIS #endif */