1 /* 2 * $Id: ox11menu.h,v 1.7 2003/02/16 12:43:37 isizaka Exp isizaka $ 3 * 4 * This file is part of "Ngraph for X11". 5 * 6 * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp 7 * 8 * "Ngraph for X11" is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU General Public License 10 * as published by the Free Software Foundation; either version 2 11 * of the License, or (at your option) any later version. 12 * 13 * "Ngraph for X11" is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 * 22 */ 23 24 /** 25 * 26 * $Log: ox11menu.h,v $ 27 * Revision 1.7 2003/02/16 12:43:37 isizaka 28 * for release 6.13.18 29 * 30 * Revision 1.6 2002/07/06 08:57:25 isizaka 31 * change to GPL. 32 * 33 * Revision 1.5 2001/07/14 17:44:50 isizaka 34 * for 6.03.14 35 * 36 * Revision 1.4 2001/03/23 12:17:43 isizaka 37 * for 6.3.13 38 * 39 * Revision 1.3 1999/04/15 12:14:26 isizaka 40 * for release 6.03.01 41 * 42 * Revision 1.2 1999/03/20 12:32:54 isizaka 43 * minor change 44 * 45 * Revision 1.1 1999/03/17 13:28:24 isizaka 46 * Initial revision 47 * 48 * 49 **/ 50 51 #define LINETOLIMIT 500 52 #define X11FONTCASH 20 /* must be greater than 1 */ 53 #define X11COLORDEPTH 2 54 55 #define CW_USEDEFAULT -100000 56 57 #define ERRRUN 100 58 #define ERRCMAP 101 59 #define ERRFONT 102 60 61 #define ISOOTHER 0 62 #define ISO8859 1 63 #define ISO10646 2 64 65 extern int globallock; 66 extern struct savedstdio x11iosave; 67 68 extern void mx11displaydialog(char *str); 69 extern void mx11displaystatus(char *str); 70 extern int mx11putstderr(char *s); 71 extern int mx11printfstderr(char *fmt,...); 72 extern int mx11interrupt(void); 73 extern int mx11inputyn(char *mes); 74 75 struct extprinter { 76 char *name; 77 char *driver; 78 char *ext; 79 char *option; 80 struct extprinter *next; 81 }; 82 83 struct prnprinter { 84 char *name; 85 char *driver; 86 char *option; 87 char *prn; 88 struct prnprinter *next; 89 }; 90 91 struct script { 92 char *name; 93 char *script; 94 char *option; 95 struct script *next; 96 }; 97 98 struct fontlocal { 99 char *fontalias; 100 Font font; 101 XFontStruct *fontstruct; 102 int fontsize,fonttype,fontdir; 103 int iso; 104 }; 105 106 struct mxlocal { 107 Drawable win; 108 GC gc; 109 int scrollx,scrolly; 110 int autoredraw,redrawf,ruler,backingstore; 111 int windpi; 112 int grid; 113 Colormap cmap; 114 int privatecolor,cdepth; 115 double pixel_dot; 116 int offsetx,offsety; 117 int cpx,cpy; 118 struct fontmap *fontmaproot; 119 int loadfont; 120 int loadfontf; 121 char *fontalias; 122 double fontsize,fontspace,fontcos,fontsin; 123 struct fontlocal font[X11FONTCASH]; 124 XPoint points[LINETOLIMIT]; 125 Region region; 126 int linetonum; 127 int lock; 128 int minus_hyphen; 129 int font_slant; 130 }; 131 132 struct menulocal { 133 char *editor; 134 char *browser; 135 char *gpl; 136 struct objlist *obj; 137 char *inst; 138 struct objlist *outputobj; 139 int output; 140 struct objlist *GRAobj; 141 int GRAoid; 142 char *GRAinst; 143 int GC; 144 int PaperWidth,PaperHeight; 145 int LeftMargin,TopMargin; 146 int PaperZoom; 147 struct narray drawrable; 148 struct extprinter *extprinterroot; 149 struct prnprinter *prnprinterroot; 150 struct script *scriptroot; 151 int menuheight,menuwidth,menux,menuy; 152 int fileheight,filewidth,filex,filey,fileopen; 153 int axisheight,axiswidth,axisx,axisy,axisopen; 154 int legendheight,legendwidth,legendx,legendy,legendopen; 155 int mergeheight,mergewidth,mergex,mergey,mergeopen; 156 int dialogheight,dialogwidth,dialogx,dialogy,dialogopen; 157 int coordheight,coordwidth,coordx,coordy,coordopen; 158 int exwindpi,exwinwidth,exwinheight,exwinbackingstore; 159 int framex,framey; 160 char *fileopendir; 161 char *graphloaddir; 162 char *expanddir; 163 int expand; 164 int ignorepath; 165 int expandtofullpath; 166 int changedirectory; 167 int savehistory; 168 int savepath,savewithdata,savewithmerge; 169 struct narray *mathlist; 170 struct narray *ngpfilelist; 171 struct narray *ngpdirlist; 172 struct narray *datafilelist; 173 int scriptconsole,addinconsole; 174 int mouseclick; 175 int statusb; 176 int showtip; 177 int movechild; 178 }; 179 180 enum {NORMAL=0,BOLD,ITALIC,BOLDITALIC}; 181 182 struct fontmap; 183 184 struct fontmap { 185 char *fontalias; 186 char *fontname; 187 int type; 188 int twobyte; 189 struct fontmap *next; 190 }; 191 192 extern struct menulocal menulocal; 193 extern struct mxlocal *mxlocal; 194 extern int menulock; 195 struct fontmap; 196 197 void initwindowconfig(); 198 int mx11windowconfig(); 199 int mxd2p(int r); 200 int mxd2px(int x); 201 int mxd2py(int y); 202 int mxp2d(int r); 203 unsigned long RGB(int R,int G,int B); 204 void mxsaveGC(GC gc,Drawable d,int scrollx,int scrolly, 205 struct mxlocal *mxsave,int dpi, 206 Region region); 207 void mxrestoreGC(struct mxlocal *mxsave); 208 void mx_redraw(struct objlist *obj,char *inst); 209 void mx_inslist(struct objlist *obj,char *inst, 210 struct objlist *aobj,char *ainst,char *afield,int addn); 211 void mx_dellist(struct objlist *obj,char *inst,int deln); 212 void menuadddrawrable(struct objlist *parent,struct narray *drawrable); 213