summaryrefslogtreecommitdiffstats
path: root/generic/tkText.h
diff options
context:
space:
mode:
authorhobbs <hobbs>1999-12-14 06:52:24 (GMT)
committerhobbs <hobbs>1999-12-14 06:52:24 (GMT)
commitb6b6ff8f0eee42e270a45b019789faa444ed4dad (patch)
tree5b5ddecf0f3677601c5511eaded466191ef3ba8a /generic/tkText.h
parent9b37fa05b11850066aed28ed447109e55708bce0 (diff)
downloadtk-b6b6ff8f0eee42e270a45b019789faa444ed4dad.zip
tk-b6b6ff8f0eee42e270a45b019789faa444ed4dad.tar.gz
tk-b6b6ff8f0eee42e270a45b019789faa444ed4dad.tar.bz2
* generic/tkStubInit.c:
* generic/tkDecls.h: * generic/tkIntXlibDecls.h: * generic/tkInt.decls: added XSetDashes and XWarpPointer * generic/tk.decls: added Tk_CreateSmoothMethod, and reserved two spots * generic/tk.h: added Tk_SmoothMethod struct, state item to canvas record, #defines for item state, support for using old char*-based canvas item C creation procedures with -DUSE_OLD_CANVAS, Tk_Dash, Tk_TSOffset (-offsets) & Tk_Outline structs and #defs, decls for dash, outline and postscript routines * generic/tkBind.c: added support for Quadruple clicks, and added the -warp option to 'event' with pointer warping routines * xlib/xgc.c: * generic/tkRectOval.c: * generic/tkCanvArc.c: * generic/tkCanvBmap.c: * generic/tkCanvImg.c: * generic/tkCanvLine.c: * generic/tkCanvPoly.c: * generic/tkCanvPs.c: * generic/tkCanvText.c: * generic/tkCanvUtil.c: * generic/tkCanvWind.c: * generic/tkCanvas.c: * generic/tkCanvas.h: Canvas and items received overhaul to with the addition of the dash patch (Nijtmans, et al) This includes objectification of the 'canvas' command, as well as support for (where appropriate) dashes in items, extended stipple support, state for all items, and postscript generation of images and windows. See the new canvas man page for related docs. * generic/tkEntry.c: added entry widget validation, see entry.n * generic/tkEvent.c: on simulated events, ButtonPress should be matched with ButtonRelease to be correct * generic/tkFont.c: corrected possible null reference * generic/tkFrame.c: made frame a Tcl_Obj based command * generic/tkGet.c: added TkGetDoublePixels * generic/tkImage.c: bug fixes from Img patch and new Tk_PostscriptImage and Tk_SetTSOrigin functions * generic/tkImgBmap.c: new ImgBmapPostscript function * generic/tkImgPhoto.c: new Tk_CreatePhotoOption, Tk_DitherPhoto * generic/tkInt.h: declarations for some new functions * generic/tkMessage.c: reworked relief drawing * generic/tkOldConfig.c: added TK_CONFIG_OBJS so old style ConfigureWidget calls can pass in Tcl_Obj arrays * generic/tkScrollbar.c: * generic/tkScrollbar.h: made -orient use an option table * generic/tkText.c: * generic/tkText.h: made -wrap and -state use option tables * generic/tkTextBTree.c: * generic/tkTextDisp.c: * generic/tkTextImage.c: * generic/tkTextMark.c: * generic/tkTextTag.c: * generic/tkTextWind.c: added support for -elide and -state hidden * generic/tkTrig.c: changed TkMakeBezierCurve to support returning the upper limit of points needed for spline * generic/tkUtil.c: new option table parsing routines * generic/tkWindow.c: init'ing of warp stuff, mouseButtonState
Diffstat (limited to 'generic/tkText.h')
-rw-r--r--generic/tkText.h38
1 files changed, 22 insertions, 16 deletions
diff --git a/generic/tkText.h b/generic/tkText.h
index 807295b..bec8ef7 100644
--- a/generic/tkText.h
+++ b/generic/tkText.h
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkText.h,v 1.5 1999/06/17 19:58:00 surles Exp $
+ * RCS: @(#) $Id: tkText.h,v 1.6 1999/12/14 06:52:32 hobbs Exp $
*/
#ifndef _TKTEXT
@@ -274,6 +274,12 @@ struct TkTextDispChunk {
* referred to in other structures.
*/
+typedef enum { TEXT_WRAPMODE_NULL, TEXT_WRAPMODE_NONE,
+ TEXT_WRAPMODE_CHAR, TEXT_WRAPMODE_WORD
+} TkWrapMode;
+
+EXTERN Tk_CustomOption textWrapModeOption;
+
typedef struct TkTextTag {
char *name; /* Name of this tag. This field is actually
* a pointer to the key from the entry in
@@ -371,13 +377,16 @@ typedef struct TkTextTag {
int underline; /* Non-zero means draw underline underneath
* text. Only valid if underlineString is
* non-NULL. */
- Tk_Uid wrapMode; /* How to handle wrap-around for this tag.
- * Must be tkTextCharUid, tkTextNoneUid,
- * tkTextWordUid, or NULL to use wrapMode
- * for whole widget. */
+ TkWrapMode wrapMode; /* How to handle wrap-around for this tag.
+ * Must be TEXT_WRAPMODE_CHAR,
+ * TEXT_WRAPMODE_NONE, TEXT_WRAPMODE_WORD,
+ * or TEXT_WRAPMODE_NULL to use wrapmode for
+ * whole widget. */
int affectsDisplay; /* Non-zero means that this tag affects the
* way information is displayed on the screen
* (so need to redisplay if tag changes). */
+ int state; /* Must be STATE_NULL, STATE_NORMAL,
+ * STATE_HIDDEN or STATE_DISABLED. */
} TkTextTag;
#define TK_TAG_AFFECTS_DISPLAY 0x1
@@ -475,7 +484,7 @@ typedef struct TkText {
* image segment doesn't yet have an
* associated image, there is no entry for
* it here. */
- Tk_Uid state; /* Either normal or disabled. A text
+ int state; /* Either STATE_NORMAL or STATE_DISABLED. A text
* widget is read-only when disabled. */
/*
@@ -518,9 +527,9 @@ typedef struct TkText {
* Additional information used for displaying:
*/
- Tk_Uid wrapMode; /* How to handle wrap-around. Must be
- * tkTextCharUid, tkTextNoneUid, or
- * tkTextWordUid. */
+ TkWrapMode wrapMode; /* How to handle wrap-around. Must be
+ * TEXT_WRAPMODE_CHAR, TEXT_WRAPMODE_NONE, or
+ * TEXT_WRAPMODE_WORD. */
int width, height; /* Desired dimensions for window, measured
* in characters. */
int setGrid; /* Non-zero means pass gridding information
@@ -657,7 +666,7 @@ typedef void Tk_SegLineChangeProc _ANSI_ARGS_((
typedef int Tk_SegLayoutProc _ANSI_ARGS_((struct TkText *textPtr,
struct TkTextIndex *indexPtr, TkTextSegment *segPtr,
int offset, int maxX, int maxChars,
- int noCharsYet, Tk_Uid wrapMode,
+ int noCharsYet, TkWrapMode wrapMode,
struct TkTextDispChunk *chunkPtr));
typedef void Tk_SegCheckProc _ANSI_ARGS_((TkTextSegment *segPtr,
TkTextLine *linePtr));
@@ -716,15 +725,10 @@ typedef struct Tk_SegType {
EXTERN int tkBTreeDebug;
EXTERN int tkTextDebug;
EXTERN Tk_SegType tkTextCharType;
-EXTERN Tk_Uid tkTextCharUid;
-EXTERN Tk_Uid tkTextDisabledUid;
EXTERN Tk_SegType tkTextLeftMarkType;
-EXTERN Tk_Uid tkTextNoneUid;
-EXTERN Tk_Uid tkTextNormalUid;
EXTERN Tk_SegType tkTextRightMarkType;
EXTERN Tk_SegType tkTextToggleOnType;
EXTERN Tk_SegType tkTextToggleOffType;
-EXTERN Tk_Uid tkTextWordUid;
/*
* Declarations for procedures that are used by the text-related files
@@ -775,7 +779,7 @@ EXTERN int TkTextCharBbox _ANSI_ARGS_((TkText *textPtr,
EXTERN int TkTextCharLayoutProc _ANSI_ARGS_((TkText *textPtr,
TkTextIndex *indexPtr, TkTextSegment *segPtr,
int offset, int maxX, int maxChars, int noBreakYet,
- Tk_Uid wrapMode, TkTextDispChunk *chunkPtr));
+ TkWrapMode wrapMode, TkTextDispChunk *chunkPtr));
EXTERN void TkTextCreateDInfo _ANSI_ARGS_((TkText *textPtr));
EXTERN int TkTextDLineInfo _ANSI_ARGS_((TkText *textPtr,
TkTextIndex *indexPtr, int *xPtr, int *yPtr,
@@ -816,6 +820,8 @@ EXTERN void TkTextLostSelection _ANSI_ARGS_((
EXTERN TkTextIndex * TkTextMakeCharIndex _ANSI_ARGS_((TkTextBTree tree,
int lineIndex, int charIndex,
TkTextIndex *indexPtr));
+extern int TkTextIsElided _ANSI_ARGS_((TkText *textPtr,
+ TkTextIndex *indexPtr));
EXTERN TkTextIndex * TkTextMakeByteIndex _ANSI_ARGS_((TkTextBTree tree,
int lineIndex, int byteIndex,
TkTextIndex *indexPtr));