home *** CD-ROM | disk | FTP | other *** search
/ Encyclopedia of Graphics File Formats Companion / GFF_CD.ISO / software / unix / saoimage / sao1_07.tar / hfiles / edit.h < prev    next >
C/C++ Source or Header  |  1989-11-09  |  2KB  |  72 lines

  1. #ifndef lint
  2. static char SccsEditId[] = "%W%  %G%";
  3. #endif
  4.  
  5. /* Module:    Edit.h
  6.  * Purpose:    Define the structs for text input edit sessions
  7.  * Modified:    {0} Michael VanHilst    initial version          7 July 1989
  8.  *        {n} <who> -- <does what> -- <when>
  9.  */
  10.  
  11. #define STACK_SZ 5
  12.  
  13. typedef struct _editstring {
  14.   int char_cnt;            /* number of characters in string */
  15.   int oversize;            /* string-too-long-to-show-all */
  16.   int *charsz;            /* array of character widths */
  17.   char *string;            /* character string */
  18. } EditString;
  19.  
  20. /* structure for an editor session's string info and buffers */
  21. typedef struct _editstruct {
  22.   Display *display;        /* display in which to write */
  23.   Window ID;            /* window in which to write */
  24.   XFontStruct *fontstruct;    /* info about font to use */
  25.   Font font;            /* font for gc */
  26.   GC gc;            /* drawing gc */
  27.   int space_width;        /* width of space character in this font */
  28.   unsigned long foreground;    /* text foreground color */
  29.   unsigned long background;    /* text (and window?) background color */
  30.   int x, y;            /* beginning coordinate of line */
  31.   int oversize;            /* string-is-too-long-to-show-all-of-it */
  32.   int first_char_shown;        /* first character in section shown */
  33.   int last_char_shown;
  34.   int last_x_shown;
  35.   int left_mark_drawn;        /* left-overflow-mark-drawn */
  36.   int right_mark_drawn;        /* right-overflow-mark-drawn */
  37.   int area_y;
  38.   int area_height;
  39.   int max_pixlen;        /* maximum length of line in pixels */
  40.   int max_char_cnt;        /* maximum number of characters in buffer */
  41.   int active_position;        /* current text cursor position */
  42.   int char_cnt;            /* number of characters in string */
  43.   int *charsz;            /* array of character widths */
  44.   char *string;            /* character string */
  45.   int *pixlen;            /* pixel offset of beginning of each char */
  46.   int stack_index;        /* last referenced stored line */
  47.   int stack_cnt;        /* number of lines stored */
  48.   int pad;            /* 28th int for even number */
  49.   EditString buf[STACK_SZ];    /* line storage ring */
  50. } EditStruct;
  51.  
  52. /* stucture for info about the popup window */
  53. struct popRec {
  54.   Display *display;
  55.   Window ID;
  56.   unsigned long foreground;
  57.   unsigned long background;
  58.   XFontStruct *fontstruct;
  59.   Font font;
  60.   int ref_width;        /* reference by which dimensions are set */
  61.   int ref_height;
  62.   int pointer_x, pointer_y;    /* position of pointer before popwin mapped */
  63.   int width;
  64.   int height;
  65.   int font_height;
  66.   int one_y;
  67.   int two_y1;
  68.   int two_y2;
  69.   int prompt_x;
  70.   int prompt_y;
  71. };
  72.