Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef __GCW_H__
00026 #define __GCW_H__
00027
00028 #include "plDevs.h"
00029 #include "plplotP.h"
00030 #include "drivers.h"
00031
00032 #include <math.h>
00033 #include <stdio.h>
00034 #include <sys/stat.h>
00035
00036 #include <glib.h>
00037 #include <gtk/gtk.h>
00038 #include <libgnomecanvas/libgnomecanvas.h>
00039 #include <libart_lgpl/libart.h>
00040 #include <libgnomeprint/gnome-print.h>
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 typedef struct
00052 {
00053 GnomeCanvas * canvas;
00054 GdkPixmap * background;
00055 GdkGC * gc;
00056
00057 GnomeCanvasGroup* group_visible;
00058 GnomeCanvasGroup* group_hidden;
00059 GnomeCanvasGroup* group_persistent;
00060
00061 gboolean use_persistence;
00062
00063
00064
00065
00066 GtkWidget * window;
00067 GtkWidget * notebook;
00068 GtkWidget * statusbar;
00069 GtkWidget * filew;
00070
00071 guint32 color;
00072 GdkColor bgcolor;
00073 GdkColormap* colormap;
00074
00075 PLINT width;
00076 PLINT height;
00077
00078 PLINT pen_color;
00079 PLINT pen_width;
00080
00081 gboolean use_pixmap;
00082 gboolean pixmap_has_data;
00083
00084 gboolean plstate_width;
00085 gboolean plstate_color0;
00086 gboolean plstate_color1;
00087
00088 gboolean allow_resize;
00089 } GcwPLdev;
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103 #define VSCALE ( 32. )
00104
00105
00106 #define DEVICE_PIXELS_PER_MM ( 3.4 )
00107 #define VIRTUAL_PIXELS_PER_MM ( DEVICE_PIXELS_PER_MM * VSCALE )
00108
00109
00110 #define MM_PER_IN ( 25.4 )
00111
00112
00113 #define DEVICE_PIXELS_PER_IN ( DEVICE_PIXELS_PER_MM * MM_PER_IN )
00114 #define VIRTUAL_PIXELS_PER_IN ( VIRTUAL_PIXELS_PER_MM * MM_PER_IN )
00115
00116
00117 #define CANVAS_WIDTH ( 10. )
00118 #define CANVAS_HEIGHT ( 7.5 )
00119
00120
00121 #define ZOOM100 ( 1.0 )
00122 #define ZOOMSTEP ( 1.25 )
00123
00124
00125
00126
00127
00128
00129
00130 void gcw_use_text( PLINT use_text );
00131 void gcw_use_pixmap( PLINT use_pixmap );
00132 void gcw_use_hrshsym( PLINT use_hrshsym );
00133
00134
00135
00136 void gcw_debug( char* msg );
00137 PLDLLIMPEXP_GNOME2 void gcw_set_gdk_color();
00138 PLDLLIMPEXP_GNOME2 void gcw_clear_background();
00139 PLDLLIMPEXP_GNOME2 void gcw_init_canvas( GnomeCanvas* canvas );
00140 PLDLLIMPEXP_GNOME2 void gcw_install_canvas( GnomeCanvas *canvas );
00141 PLDLLIMPEXP_GNOME2 void gcw_set_device_size( PLINT width, PLINT height );
00142 void gcw_set_canvas_size( GnomeCanvas* canvas, PLINT width, PLINT height );
00143 void gcw_set_canvas_zoom( GnomeCanvas* canvas, PLFLT magnification );
00144 void gcw_use_persistence( PLINT use_persistence );
00145
00146 #endif // __GCW_H__