Go to the documentation of this file.00001
00023 #ifndef __PREVIEW_DIALOG_INCLUDED__
00024 #define __PREVIEW_DIALOG_INCLUDED__
00025
00026
00027 GdkPixmap *pixmap = NULL;
00034 typedef struct preview_arc
00035 {
00036 GdkDrawable *drawable;
00038 GdkGC *gc;
00040 gboolean filled;
00042 gint x;
00044 gint y;
00046 gint width;
00048 gint height;
00050 gint angle1;
00053 gint angle2;
00056 } *preview_arc;
00057
00058
00062 typedef struct preview_line
00063 {
00064 GdkDrawable *drawable;
00066 GdkGC *gc;
00068 gint x1;
00070 gint y1;
00072 gint x2;
00074 gint y2;
00076 } *preview_line;
00077
00078
00082 typedef struct preview_polygon
00083 {
00084 GdkDrawable *drawable;
00086 GdkGC *gc;
00088 gboolean filled;
00090 GdkPoint *points;
00093 gint npoints;
00095 } *preview_polygon;
00096
00097
00101 typedef struct preview_rectangle
00102 {
00103 GdkDrawable *drawable;
00105 GdkGC *gc;
00107 gboolean filled;
00111 gint x;
00113 gint y;
00115 gint width;
00117 gint height;
00119 } *preview_rectangle;
00120
00121
00122 static void preview_close_cb (GtkWidget * widget, GtkWidget *preview_window);
00123 static gboolean preview_configure_event (GtkWidget *widget, GdkEventConfigure *event);
00124 void preview_delete_event (GtkWidget *widget, GdkEvent *event);
00125 int preview_set_fg_color (GdkGC *gc, const char *color_name);
00126 int preview_set_fill_mode (GdkGC *gc, GdkFill fill_mode);
00127 int preview_set_line_cap (GdkGC *gc, GdkCapStyle line_cap);
00128 int preview_set_line_style (GdkGC *gc, GdkLineStyle line_style);
00129 int preview_set_line_width (GdkGC *gc, gint line_width);
00130 int preview_use_gc (GdkDrawable *drawable, GdkGC *gc, const char * color_name, gint line_width, GdkCapStyle line_cap, GdkLineStyle line_style, GdkFill fill_mode);
00131 static void preview_draw_arc (GtkWidget *widget, preview_arc arc);
00132 static void preview_draw_background (GtkWidget *widget, gdouble x, gdouble y);
00133 static void preview_draw_line (GtkWidget *widget, preview_line line);
00134 static void preview_draw_pad (GtkWidget *widget );
00135 static void preview_draw_pin (GtkWidget *widget );
00136 static void preview_draw_polygon (GtkWidget *widget, preview_polygon polygon);
00137 static void preview_draw_rectangle (GtkWidget *widget, preview_rectangle rectangle);
00138 static gboolean preview_expose_event (GtkWidget *widget, GdkEventExpose *event);
00139 int preview_create_window (gchar *footprint_name, gint width, gint height);
00140
00141
00142 #endif
00143
00144
00145