TextSinkP.h

Go to the documentation of this file.
00001 /*
00002 * $XConsortium: TextSinkP.h,v 1.6 94/04/17 20:13:13 kaleb Exp $
00003 */
00004 
00005 
00006 /***********************************************************
00007 
00008 Copyright (c) 1987, 1988, 1994  X Consortium
00009 
00010 Permission is hereby granted, free of charge, to any person obtaining a copy
00011 of this software and associated documentation files (the "Software"), to deal
00012 in the Software without restriction, including without limitation the rights
00013 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
00014 copies of the Software, and to permit persons to whom the Software is
00015 furnished to do so, subject to the following conditions:
00016 
00017 The above copyright notice and this permission notice shall be included in
00018 all copies or substantial portions of the Software.
00019 
00020 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00021 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00022 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
00023 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
00024 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00025 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00026 
00027 Except as contained in this notice, the name of the X Consortium shall not be
00028 used in advertising or otherwise to promote the sale, use or other dealings
00029 in this Software without prior written authorization from the X Consortium.
00030 
00031 
00032 Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
00033 
00034                         All Rights Reserved
00035 
00036 Permission to use, copy, modify, and distribute this software and its 
00037 documentation for any purpose and without fee is hereby granted, 
00038 provided that the above copyright notice appear in all copies and that
00039 both that copyright notice and this permission notice appear in 
00040 supporting documentation, and that the name of Digital not be
00041 used in advertising or publicity pertaining to distribution of the
00042 software without specific, written prior permission.  
00043 
00044 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
00045 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
00046 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
00047 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
00048 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
00049 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
00050 SOFTWARE.
00051 
00052 ******************************************************************/
00053 
00054 /* 
00055  * TextSinkP.h - Private definitions for TextSink object
00056  * 
00057  */
00058 
00059 #ifndef _XawTextSinkP_h
00060 #define _XawTextSinkP_h
00061 
00062 /***********************************************************************
00063  *
00064  * TextSink Object Private Data
00065  *
00066  ***********************************************************************/
00067 
00068 #include <X11/Xaw3d/TextSink.h>
00069 #include <X11/Xaw3d/TextP.h>    /* This source works with the Text widget. */
00070 #include <X11/Xaw3d/TextSrcP.h> /* This source works with the Text Source. */
00071 
00072 /************************************************************
00073  *
00074  * New fields for the TextSink object class record.
00075  *
00076  ************************************************************/
00077 
00078 typedef struct _TextSinkClassPart {
00079   void (*DisplayText)();
00080   void (*InsertCursor)();
00081   void (*ClearToBackground)();
00082   void (*FindPosition)();
00083   void (*FindDistance)();
00084   void (*Resolve)();
00085   int  (*MaxLines)();
00086   int  (*MaxHeight)();
00087   void (*SetTabs)();            
00088   void (*GetCursorBounds)();    
00089 } TextSinkClassPart;
00090 
00091 /* Full class record declaration */
00092 typedef struct _TextSinkClassRec {
00093     ObjectClassPart     object_class;
00094     TextSinkClassPart   text_sink_class;
00095 } TextSinkClassRec;
00096 
00097 extern TextSinkClassRec textSinkClassRec;
00098 
00099 /* New fields for the TextSink object record */
00100 typedef struct {
00101     /* resources */
00102     Pixel foreground;           /* Foreground color. */
00103     Pixel background;           /* Background color. */
00104 
00105     /* private state. */
00106     Position *tabs;             /* The tab stops as pixel values. */
00107     short    *char_tabs;        /* The tabs stops as character values. */
00108     int      tab_count;         /* number of items in tabs */
00109 
00110 } TextSinkPart;
00111 
00112 /****************************************************************
00113  *
00114  * Full instance record declaration
00115  *
00116  ****************************************************************/
00117 
00118 typedef struct _TextSinkRec {
00119   ObjectPart    object;
00120   TextSinkPart  text_sink;
00121 } TextSinkRec;
00122 
00123 /************************************************************
00124  *
00125  * Private declarations.
00126  *
00127  ************************************************************/
00128 
00129 typedef int (*_XawSinkIntFunc)();
00130 typedef void (*_XawSinkVoidFunc)();
00131 
00132 #define XtInheritDisplayText          ((_XawSinkVoidFunc) _XtInherit)
00133 #define XtInheritInsertCursor         ((_XawSinkVoidFunc) _XtInherit)
00134 #define XtInheritClearToBackground    ((_XawSinkVoidFunc) _XtInherit)
00135 #define XtInheritFindPosition         ((_XawSinkVoidFunc) _XtInherit)
00136 #define XtInheritFindDistance         ((_XawSinkVoidFunc) _XtInherit)
00137 #define XtInheritResolve              ((_XawSinkVoidFunc) _XtInherit)
00138 #define XtInheritMaxLines             ((_XawSinkIntFunc) _XtInherit)
00139 #define XtInheritMaxHeight            ((_XawSinkIntFunc) _XtInherit)
00140 #define XtInheritSetTabs              ((_XawSinkVoidFunc) _XtInherit)
00141 #define XtInheritGetCursorBounds      ((_XawSinkVoidFunc) _XtInherit)
00142 
00143 #endif /* _XawTextSinkP_h */

Generated on Sun Mar 4 15:03:55 2007 for Scilab [trunk] by  doxygen 1.5.1