wgraph.h

Go to the documentation of this file.
00001 /*-----------------------------------------------------------------------------------*/
00002 /*******************************************
00003  * Original source : GNUPLOT - win/wgraph.c
00004  * modified for Scilab 
00005  *******************************************
00006  *
00007  * Copyright (C) 1992   Maurice Castro, Russell Lang
00008  *
00009  * Permission to use, copy, and distribute this software and its
00010  * documentation for any purpose with or without fee is hereby granted, 
00011  * provided that the above copyright notice appear in all copies and 
00012  * that both that copyright notice and this permission notice appear 
00013  * in supporting documentation.
00014  *
00015  * Permission to modify the software is granted, but not the right to
00016  * distribute the modified code.  Modifications are to be distributed 
00017  * as patches to released version.
00018  *  
00019  * This software is provided "as is" without express or implied warranty.
00020  * 
00021  * AUTHORS (GNUPLOT) 
00022  *   Maurice Castro
00023  *   Russell Lang
00024  *
00025  * Modifications for Scilab 
00026  *   Jean-Philipe Chancelier 
00027  *   CORNET Allan 2004
00028  *   Bugs and mail : Scilab@inria.fr 
00029  */
00030 /*-----------------------------------------------------------------------------------*/
00031 #ifndef __WGRAPH__
00032 #define __WGRAPH__
00033 
00034 #ifndef STRICT
00035 #define STRICT
00036 #endif
00037 
00038 
00039 #define MAXPRINTF 512
00040 
00041 /*-----------------------------------------------------------------------------------*/
00042 #include <windows.h>
00043 #include <windowsx.h>
00044 #include <commdlg.h>
00045 #include <shellapi.h>
00046 
00047 #include <string.h>
00048 #include <stdlib.h>
00049 #include <ctype.h>
00050 #include <stdarg.h>
00051 
00052 #include "version.h"
00053 #include "wresource.h"
00054 #include "wcommon.h"
00055 #include "scigraphic.h"
00056 
00057 #include "DestroyObjects.h"
00058 #include "GetProperty.h"
00059 #include "DrawObjects.h"
00060 #include "Events.h"
00061 #include "Xcall1.h"
00062 
00063 
00064 /*-----------------------------------------------------------------------------------*/
00065 void scig_replay_hdc (char c, integer win_num, HDC hdc, int width, int height, int scale);
00066 void set_delete_win_mode();
00067 int C2F (deletewin) (integer * number);
00068 void CopyToClipboardEMF (struct BCG *ScilabGC);
00069 void CopyToClipboardBitmap (struct BCG *ScilabGC);
00070 void SciViewportMove (ScilabGC, x, y);
00071 void SciViewportGet (ScilabXgc, x, y);
00072 void GPopupResize (struct BCG * ScilabXgc,int * width,int * height);
00073 static void ScilabPaintWithBitmap(HWND hwnd,HDC hdc , struct BCG *ScilabGC);
00074 static void sci_extra_margin(HDC hdc_c , struct BCG *ScilabGC);
00075 static void ScilabPaintWithBitmap(HWND hwnd,HDC hdc , struct BCG *ScilabGC);
00076 static void sci_extra_margin(HDC hdc_c , struct BCG *ScilabGC);
00077 void ScilabPaint (HWND hwnd, struct BCG *ScilabGC);
00078 static void ScilabNoPaint (HWND hwnd, struct BCG *ScilabGC);
00079 int ScilabGResize (HWND hwnd, struct BCG *ScilabGC, WPARAM wParam);
00080 void scig_replay_hdc (char c, integer win_num, HDC hdc, int width,int height,  int scale);
00081 /*-----------------------------------------------------------------------------------*/
00082 
00083 
00084 /* if thid flag is set to one then a pixmap is used 
00085  * when painting for windows with CurPixmapStatus==0.
00086  */ 
00087 static int emulate_backing_store = 1; /* to use  ScilabPaintWithBitmap*/
00088 /* static COLORREF DefaultBackground = RGB(255,255,255); define in periwin.c */
00089 
00090 void HideGraphToolBar(struct BCG * ScilabGC);
00091 void ShowGraphToolBar(struct BCG * ScilabGC);
00092 
00093 int GetScreenProperty(char *prop, char *value);
00094 
00095 integer GetCurrentFigureWindows(void);
00096 void SetCurrentFigureWindows(integer win);
00097 
00098 HDC TryToGetDC(HWND hWnd);
00099 
00100 int Interface_XS2BMP(int figurenum,char *filename);
00101 int Interface_XS2EMF(int figurenum,char *filename);
00102 
00103 extern HDC GetPrinterDC(void);
00104 
00105 #endif /* __WGRAPH__ */
00106 /*-----------------------------------------------------------------------------------*/

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