bcg.h

Go to the documentation of this file.
00001 /*------------------------------------------------------------------------
00002  *    Graphic library
00003  *    Copyright (C) 1998-2000 Enpc/Jean-Philippe Chancelier
00004  *    jpc@cereve.enpc.fr 
00005  --------------------------------------------------------------------------*/
00006 # ifndef __BCG__
00007 #define __BCG__
00008 
00009 #include "machine.h" /* to be sure that WITH_XXX are defined */
00010 
00011 #ifndef _MSC_VER
00012 #include <X11/Xlib.h>
00013 #include <X11/Intrinsic.h>
00014 #else
00015 #include "../../gui/src/c/wsci/wgnuplib.h"
00016 #endif 
00017 
00018 #ifndef CoordModePrevious 
00019 #define CoordModePrevious 1
00020 #define CoordModeOrigin 0
00021 #endif 
00022 
00023 #ifndef _MSC_VER
00024   #ifndef GXclear 
00025    #define GXclear 0
00026    #define GXand 1
00027    #define GXandReverse 2
00028    #define GXcopy 3
00029    #define GXandInverted 4
00030    #define GXnoop 5
00031    #define GXxor 6
00032    #define GXor 7
00033    #define GXnor 8
00034    #define GXequiv 9
00035    #define GXinvert 10
00036    #define GXorReverse 11
00037    #define GXcopyInverted 12
00038    #define GXorInverted 13
00039    #define GXnand 14
00040    #define GXset 15
00041   #endif 
00042 #endif
00043 
00047 typedef struct _menu_entry { 
00048   char *name; /* name of the entry */
00049   char *accel;/* name of accelerator */
00050   int status; /* active 1, not active 0, deleted -1*/
00051   int nsub  ; /* if menu_entry is a sub_menu nsub gives its number else its value is one */
00052   struct _menu_entry *subs; /* menu_entry has some submenus */
00053   int winid ; /* associated window */
00054   int action_type ; /* hard coded or macro */
00055   char *fname;/* name of function to be called*/
00056   struct _menu_entry *menu; /* point to the father for sub_menus */
00057   struct _menu_entry *next; /* next one .... */
00058 } menu_entry;
00059 
00060 
00061 /* #include "Entities.h" */
00062 #include "ObjectStructure.h"
00063 
00064 typedef int (*EVTHANDLER) __PARAMS((int win,int x,int y,int ibut));
00065 
00066 typedef struct BCG 
00067 { 
00068   int CurWindow ;   
00069   int CWindowWidth ; 
00070   int CWindowHeight ; 
00071   int FontSize ;
00072   int FontId ;
00073   int CurHardSymb;
00074   int CurHardSymbSize;
00075   int CurLineWidth;
00076   int CurPattern;
00077   int CurColor;
00078   int CurPixmapStatus;
00079   int CurResizeStatus;
00080   int CurVectorStyle;
00081   int CurDrawFunction;
00082   int ClipRegionSet;
00083   int CurClipRegion[4];
00084   int CurDashStyle;
00085   char CurNumberDispFormat[20]; 
00086   int CurColorStatus;
00087   int IDLastPattern; /* number of last patter or color */
00089   int CmapFlag ; /* set to 1 if the Cmap has default colors */
00090   int Numcolors; /* number of colors */
00091   float *Red; /* red value: between 0 and 1 */
00092   float *Green; /* green value: between 0 and 1 */
00093   float *Blue; /* blue value: between 0 and 1 */
00094   int NumBackground;  /* number of Background */
00095   int NumForeground; /* number of Foreground in the color table */
00096   int NumHidden3d;  /* color for hidden 3d facets **/
00097   char EventHandler[25]; /* name of window event handler */
00098   int EventHandlerType; /* does the event handler removes the normal event handling*/
00099   /* NG beg */
00100   int CWindowWidthView;  
00101   int CWindowHeightView;  
00102   sciPointObj *mafigure;  /* Entities root */
00103   /*int graphicsversion;*/ /* old style is dead */
00104   /* NG end */
00105 #ifdef _MSC_VER
00106 
00107   HWND  hWndParent;     /* parent window handle */
00108   HWND CWindow ;   
00109   HWND Statusbar;    /* status window */
00110   HDC hdcCompat ;  
00111   HBITMAP hbmCompat ;  
00112   MW  lpmw;        
00113   int in_sizemove ;   
00115   COLORREF *Colors;/* vector of colors */ 
00116   HPEN hPen ;  
00117   HBRUSH hBrush; 
00118   LPGW   lpgw; 
00119   int Inside_init; 
00121   SCROLLINFO vertsi;
00122   SCROLLINFO horzsi;
00123   HMENU hMenuRoot;
00124   int IDM_Count;
00125 #else 
00126 
00127   Drawable Cdrawable ; 
00128   int  Cdrawable_flag ; 
00129   Widget CinfoW ;  
00130   Widget Viewport; 
00131   Widget Panner ;  
00132   Widget drawbox ; 
00133   Widget popup   ; 
00134   Window CWindow ; 
00135   Window CBGWindow ; 
00136   XID FontXID;
00137   Colormap Cmap; /* color map of current graphic window */
00138   Pixel *Colors; /* vector of colors 
00139                     Note that there are 2 colors more than Numcolors,
00140                     ie black and white at the end of this vector */
00141 #endif
00142 } BCG ;
00143 
00144 
00145 extern struct BCG *GetWindowXgcNumber  (int i);
00146 
00147 #endif /* __BCG__ */

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