749N/A/* $XConsortium: Text.h,v 1.45 94/04/17 20:13:05 kaleb Exp $ */
749N/A
749N/A/***********************************************************
749N/A
749N/ACopyright (c) 1987, 1988, 1994 X Consortium
749N/A
749N/APermission is hereby granted, free of charge, to any person obtaining a copy
749N/Aof this software and associated documentation files (the "Software"), to deal
749N/Ain the Software without restriction, including without limitation the rights
749N/Ato use, copy, modify, merge, publish, distribute, sublicense, and/or sell
749N/Acopies of the Software, and to permit persons to whom the Software is
749N/Afurnished to do so, subject to the following conditions:
749N/A
749N/AThe above copyright notice and this permission notice shall be included in
749N/Aall copies or substantial portions of the Software.
749N/A
749N/ATHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
749N/AIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
749N/AFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
749N/AX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
749N/AAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
749N/ACONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
749N/A
749N/AExcept as contained in this notice, the name of the X Consortium shall not be
749N/Aused in advertising or otherwise to promote the sale, use or other dealings
749N/Ain this Software without prior written authorization from the X Consortium.
749N/A
749N/A
749N/ACopyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
749N/A
749N/A All Rights Reserved
749N/A
749N/APermission to use, copy, modify, and distribute this software and its
749N/Adocumentation for any purpose and without fee is hereby granted,
749N/Aprovided that the above copyright notice appear in all copies and that
749N/Aboth that copyright notice and this permission notice appear in
749N/Asupporting documentation, and that the name of Digital not be
749N/Aused in advertising or publicity pertaining to distribution of the
749N/Asoftware without specific, written prior permission.
749N/A
749N/ADIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
749N/AALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
749N/ADIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
749N/AANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
749N/AWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
749N/AARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
749N/ASOFTWARE.
749N/A
749N/A******************************************************************/
749N/A
749N/A#ifndef _XawText_h
749N/A#define _XawText_h
749N/A
749N/A#include <X11/Xaw/Simple.h>
749N/A
749N/A/*
749N/A Text widget
749N/A
749N/A Class: textWidgetClass
749N/A Class Name: Text
749N/A Superclass: Simple
749N/A
749N/A Resources added by the Text widget:
749N/A
749N/A Name Class RepType Default Value
749N/A ---- ----- ------- -------------
749N/A autoFill AutoFill Boolean False
749N/A bottomMargin Margin Position 2
749N/A displayPosition TextPosition XawTextPosition 0
749N/A insertPosition TextPosition XawTextPosition 0
749N/A leftMargin Margin Position 2
749N/A resize Resize XawTextResizeMode XawTextResizeNever
749N/A rightMargin Margin Position 4
749N/A scrollHorizontal Scroll XawTextScrollMode XawtextScrollNever
749N/A scrollVertical Scroll XawTextScrollMode XawtextScrollNever
749N/A selectTypes SelectTypes Pointer see documentation
749N/A textSink TextSink Widget NULL
749N/A textSource TextSource Widget NULL
749N/A topMargin Margin Position 2
749N/A unrealizeCallback Callback Callback NULL
749N/A wrap Wrap XawTextWrapMode XawTextWrapNever
749N/A
749N/A*/
749N/A
749N/Atypedef long XawTextPosition;
749N/A
749N/Atypedef enum { XawtextScrollNever,
749N/A XawtextScrollWhenNeeded, XawtextScrollAlways} XawTextScrollMode;
749N/A
749N/Atypedef enum { XawtextWrapNever,
749N/A XawtextWrapLine, XawtextWrapWord} XawTextWrapMode;
749N/A
749N/Atypedef enum { XawtextResizeNever, XawtextResizeWidth,
749N/A XawtextResizeHeight, XawtextResizeBoth} XawTextResizeMode;
749N/A
749N/Atypedef enum {XawsdLeft, XawsdRight} XawTextScanDirection;
749N/Atypedef enum {XawtextRead, XawtextAppend, XawtextEdit} XawTextEditType;
749N/Atypedef enum {XawselectNull, XawselectPosition, XawselectChar, XawselectWord,
749N/A XawselectLine, XawselectParagraph, XawselectAll} XawTextSelectType;
749N/A
749N/Atypedef struct {
749N/A int firstPos;
749N/A int length;
749N/A char *ptr;
749N/A unsigned long format;
749N/A } XawTextBlock, *XawTextBlockPtr;
749N/A
749N/A#include <X11/Xaw/TextSink.h>
749N/A#include <X11/Xaw/TextSrc.h>
749N/A
749N/A#define XtEtextScrollNever "never"
749N/A#define XtEtextScrollWhenNeeded "whenneeded"
749N/A#define XtEtextScrollAlways "always"
749N/A
749N/A#define XtEtextWrapNever "never"
749N/A#define XtEtextWrapLine "line"
749N/A#define XtEtextWrapWord "word"
749N/A
749N/A#define XtEtextResizeNever "never"
749N/A#define XtEtextResizeWidth "width"
749N/A#define XtEtextResizeHeight "height"
749N/A#define XtEtextResizeBoth "both"
749N/A
749N/A#define XtNautoFill "autoFill"
749N/A#define XtNbottomMargin "bottomMargin"
749N/A#define XtNdialogHOffset "dialogHOffset"
749N/A#define XtNdialogVOffset "dialogVOffset"
749N/A#define XtNdisplayCaret "displayCaret"
749N/A#define XtNdisplayPosition "displayPosition"
749N/A#define XtNleftMargin "leftMargin"
749N/A#define XtNrightMargin "rightMargin"
749N/A#define XtNscrollVertical "scrollVertical"
749N/A#define XtNscrollHorizontal "scrollHorizontal"
749N/A#define XtNselectTypes "selectTypes"
749N/A#define XtNtopMargin "topMargin"
749N/A#define XtNwrap "wrap"
749N/A
749N/A#define XtCAutoFill "AutoFill"
749N/A#define XtCScroll "Scroll"
749N/A#define XtCSelectTypes "SelectTypes"
749N/A#define XtCWrap "Wrap"
749N/A
749N/A#ifndef _XtStringDefs_h_
749N/A#define XtNinsertPosition "insertPosition"
749N/A#define XtNresize "resize"
749N/A#define XtNselection "selection"
749N/A#define XtCResize "Resize"
749N/A#endif
749N/A
749N/A/* Return Error code for XawTextSearch */
749N/A
749N/A#define XawTextSearchError (-12345L)
749N/A
749N/A/* Return codes from XawTextReplace */
749N/A
749N/A#define XawReplaceError -1
749N/A#define XawEditDone 0
749N/A#define XawEditError 1
749N/A#define XawPositionError 2
749N/A
749N/Aextern unsigned long FMT8BIT;
749N/Aextern unsigned long XawFmt8Bit;
749N/Aextern unsigned long XawFmtWide;
749N/A
749N/A/* Class record constants */
749N/A
749N/Aextern WidgetClass textWidgetClass;
749N/A
749N/Atypedef struct _TextClassRec *TextWidgetClass;
749N/Atypedef struct _TextRec *TextWidget;
749N/A
749N/A_XFUNCPROTOBEGIN
749N/A
749N/Aextern XrmQuark _XawTextFormat(
749N/A#if NeedFunctionPrototypes
749N/A TextWidget /* tw */
749N/A#endif
749N/A);
749N/A
749N/Aextern void XawTextDisplay(
749N/A#if NeedFunctionPrototypes
749N/A Widget /* w */
749N/A#endif
749N/A);
749N/A
749N/Aextern void XawTextEnableRedisplay(
749N/A#if NeedFunctionPrototypes
749N/A Widget /* w */
749N/A#endif
749N/A);
749N/A
749N/Aextern void XawTextDisableRedisplay(
749N/A#if NeedFunctionPrototypes
749N/A Widget /* w */
749N/A#endif
749N/A);
749N/A
749N/Aextern void XawTextSetSelectionArray(
749N/A#if NeedFunctionPrototypes
749N/A Widget /* w */,
749N/A XawTextSelectType* /* sarray */
749N/A#endif
749N/A);
749N/A
749N/Aextern void XawTextGetSelectionPos(
749N/A#if NeedFunctionPrototypes
749N/A Widget /* w */,
749N/A XawTextPosition* /* begin_return */,
749N/A XawTextPosition* /* end_return */
749N/A#endif
749N/A);
749N/A
749N/Aextern void XawTextSetSource(
749N/A#if NeedFunctionPrototypes
749N/A Widget /* w */,
749N/A Widget /* source */,
749N/A XawTextPosition /* position */
749N/A#endif
749N/A);
749N/A
749N/Aextern int XawTextReplace(
749N/A#if NeedFunctionPrototypes
749N/A Widget /* w */,
749N/A XawTextPosition /* start */,
749N/A XawTextPosition /* end */,
749N/A XawTextBlock* /* text */
749N/A#endif
749N/A);
749N/A
749N/Aextern XawTextPosition XawTextTopPosition(
749N/A#if NeedFunctionPrototypes
749N/A Widget /* w */
749N/A#endif
749N/A);
749N/A
749N/Aextern void XawTextSetInsertionPoint(
749N/A#if NeedFunctionPrototypes
749N/A Widget /* w */,
749N/A XawTextPosition /* position */
749N/A#endif
749N/A);
749N/A
749N/Aextern XawTextPosition XawTextGetInsertionPoint(
749N/A#if NeedFunctionPrototypes
749N/A Widget /* w */
749N/A#endif
749N/A);
749N/A
749N/Aextern void XawTextUnsetSelection(
749N/A#if NeedFunctionPrototypes
749N/A Widget /* w */
749N/A#endif
749N/A);
749N/A
749N/Aextern void XawTextSetSelection(
749N/A#if NeedFunctionPrototypes
749N/A Widget /* w */,
749N/A XawTextPosition /* left */,
749N/A XawTextPosition /* right */
749N/A#endif
749N/A);
749N/A
749N/Aextern void XawTextInvalidate(
749N/A#if NeedFunctionPrototypes
749N/A Widget /* w */,
749N/A XawTextPosition /* from */,
749N/A XawTextPosition /* to */
749N/A#endif
749N/A);
749N/A
749N/Aextern Widget XawTextGetSource(
749N/A#if NeedFunctionPrototypes
749N/A Widget /* w */
749N/A#endif
749N/A);
749N/A
749N/Aextern XawTextPosition XawTextSearch(
749N/A#if NeedFunctionPrototypes
749N/A Widget /* w */,
749N/A#if NeedWidePrototypes
749N/A /* XawTextScanDirection */ int /* dir */,
749N/A#else
749N/A XawTextScanDirection /* dir */,
749N/A#endif
749N/A XawTextBlock* /* text */
749N/A#endif
749N/A);
749N/A
749N/Aextern void XawTextDisplayCaret(
749N/A#if NeedFunctionPrototypes
749N/A Widget /* w */,
749N/A#if NeedWidePrototypes
749N/A /* Boolean */ int /* visible */
749N/A#else
749N/A Boolean /* visible */
749N/A#endif
749N/A#endif
749N/A);
749N/A
749N/A_XFUNCPROTOEND
749N/A
749N/A/*
749N/A * For R3 compatability only.
749N/A */
749N/A
749N/A#include <X11/Xaw/AsciiSrc.h>
749N/A#include <X11/Xaw/AsciiSink.h>
749N/A
749N/A#endif /* _XawText_h */
749N/A/* DON'T ADD STUFF AFTER THIS #endif */