1/* 2 3Copyright (c) 1987, 1988 X Consortium 4 5Permission is hereby granted, free of charge, to any person obtaining 6a copy of this software and associated documentation files (the 7"Software"), to deal in the Software without restriction, including 8without limitation the rights to use, copy, modify, merge, publish, 9distribute, sublicense, and/or sell copies of the Software, and to 10permit persons to whom the Software is furnished to do so, subject to 11the following conditions: 12 13The above copyright notice and this permission notice shall be included 14in all copies or substantial portions of the Software. 15 16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR 20OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22OTHER DEALINGS IN THE SOFTWARE. 23 24Except as contained in this notice, the name of the X Consortium shall 25not be used in advertising or otherwise to promote the sale, use or 26other dealings in this Software without prior written authorization 27from the X Consortium. 28 29*/ 30 31 32#ifndef _XtScrollByLinePrivate_h 33#define _XtScrollByLinePrivate_h 34 35#include <X11/Xaw/SimpleP.h> 36 37#include "ScrollByL.h" 38 39/*********************************************************************** 40 * 41 * ScrollByLine Widget Private Data 42 * 43 ***********************************************************************/ 44 45/* New fields for the ScrollByLine widget class record */ 46typedef struct { 47 int mumble; /* No new procedures */ 48} ScrollByLineClassPart; 49 50/* Full class record declaration */ 51typedef struct _ScrollByLineClassRec { 52 CoreClassPart core_class; 53 SimpleClassPart simple_class; 54 ScrollByLineClassPart scrolled_widget_class; 55} ScrollByLineClassRec; 56 57extern ScrollByLineClassRec scrollByLineClassRec; 58 59/* New fields for the ScrollByLine widget record */ 60typedef struct _ScrollByLinePart { 61 Pixel foreground; /* The color for the foreground of the text. */ 62 Boolean force_vert, /* Must have scrollbar visible */ 63 use_right; /* put scroll bar on right side of window. */ 64 FILE *file; /* The file to display. */ 65 Dimension indent; /* amount to indent the file. */ 66 XFontStruct *bold_font, /* The four fonts. */ 67 *normal_font, 68 *italic_font, 69 *symbol_font; 70 int h_width; /* Main font width */ 71 72/* variables not in resource list. */ 73 74 Widget bar; /* The scrollbar. */ 75 int font_height; /* the height of the font. */ 76 int line_pointer; /* The line that currently is at the top 77 of the window being displayed. */ 78 Dimension offset; /* Drawing offset because of scrollbar. */ 79 GC move_gc; /* GC to use when moving the text. */ 80 GC bold_gc, normal_gc, italic_gc, symbol_gc; /* gc for drawing. */ 81 82 char **top_line; /* The top line of the file. */ 83 int lines; /* Total number of line in the file. */ 84 int num_visible_lines; /* Number of lines visible */ 85} ScrollByLinePart; 86 87/**************************************************************** 88 * 89 * Full instance record declaration 90 * 91 ****************************************************************/ 92 93typedef struct _ScrollByLineRec { 94 CorePart core; 95 SimplePart simple; 96 ScrollByLinePart scroll; 97} ScrollByLineRec; 98 99#endif /* _XtScrollByLinePrivate_h --- DON'T ADD STUFF AFTER THIS LINE */ 100