Header file for footprint preview widget functions. More...
Go to the source code of this file.
Data Structures | |
| struct | preview_arc |
| Struct containing all data to draw an arc on the preview canvas. More... | |
| struct | preview_line |
| Struct containing all data to draw a line on the preview canvas. More... | |
| struct | preview_polygon |
| Struct containing all data to draw a polygon on the preview canvas. More... | |
| struct | preview_rectangle |
| Struct containing all data to draw a rectangle on the preview canvas. More... | |
Typedefs | |
| typedef struct preview_arc * | preview_arc |
| Struct containing all data to draw an arc on the preview canvas. | |
| typedef struct preview_line * | preview_line |
| Struct containing all data to draw a line on the preview canvas. | |
| typedef struct preview_polygon * | preview_polygon |
| Struct containing all data to draw a polygon on the preview canvas. | |
| typedef struct preview_rectangle * | preview_rectangle |
| Struct containing all data to draw a rectangle on the preview canvas. | |
Functions | |
| static void | preview_close_cb (GtkWidget *widget, GtkWidget *preview_window) |
| static gboolean | preview_configure_event (GtkWidget *widget, GdkEventConfigure *event) |
| void | preview_delete_event (GtkWidget *widget, GdkEvent *event) |
| Delete the window. | |
| int | preview_set_fg_color (GdkGC *gc, const char *color_name) |
| Set the foreground color of the Graphics Context. | |
| int | preview_set_fill_mode (GdkGC *gc, GdkFill fill_mode) |
| Set the fill mode of the Graphics Context. | |
| int | preview_set_line_cap (GdkGC *gc, GdkCapStyle line_cap) |
| Set the line capsulation of the Graphics Context. | |
| int | preview_set_line_style (GdkGC *gc, GdkLineStyle line_style) |
| Set the line style of the Graphics Context. | |
| int | preview_set_line_width (GdkGC *gc, gint line_width) |
| Set the line width of the Graphics Context. | |
| int | preview_use_gc (GdkDrawable *drawable, GdkGC *gc, const char *color_name, gint line_width, GdkCapStyle line_cap, GdkLineStyle line_style, GdkFill fill_mode) |
| Use a Graphics Context when drawing entities. | |
| static void | preview_draw_arc (GtkWidget *widget, preview_arc arc) |
| static void | preview_draw_background (GtkWidget *widget, gdouble x, gdouble y) |
| static void | preview_draw_line (GtkWidget *widget, preview_line line) |
| static void | preview_draw_pad (GtkWidget *widget) |
| static void | preview_draw_pin (GtkWidget *widget) |
| static void | preview_draw_polygon (GtkWidget *widget, preview_polygon polygon) |
| static void | preview_draw_rectangle (GtkWidget *widget, preview_rectangle rectangle) |
| static gboolean | preview_expose_event (GtkWidget *widget, GdkEventExpose *event) |
| int | preview_create_window (gchar *footprint_name, gint width, gint height) |
| Create a preview window containing a pixmap with the footprint. | |
Variables | |
| GdkPixmap * | pixmap = NULL |
Header file for footprint preview widget functions.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Definition in file preview.h.
| typedef struct preview_arc * preview_arc |
Struct containing all data to draw an arc on the preview canvas.
| typedef struct preview_line * preview_line |
Struct containing all data to draw a line on the preview canvas.
| typedef struct preview_polygon * preview_polygon |
Struct containing all data to draw a polygon on the preview canvas.
| typedef struct preview_rectangle * preview_rectangle |
Struct containing all data to draw a rectangle on the preview canvas.
| int preview_create_window | ( | gchar * | footprint_name, | |
| gint | width, | |||
| gint | height | |||
| ) |
Create a preview window containing a pixmap with the footprint.
The footprint_name variable is used in the dialog title.
The footprint_name variable is used in the dialog title.
| footprint_name | : is the footprint type. | |
| width | : is width of the pixmap. | |
| height | : is height of the pixmap. |
Definition at line 679 of file preview_dialog.c.
References preview_close_cb(), preview_configure_event(), preview_delete_event(), and preview_expose_event().

| void preview_delete_event | ( | GtkWidget * | widget, | |
| GdkEvent * | event | |||
| ) |
Delete the window.
| widget | : is the widget to be deleted. | |
| event | : is the delete event passed from the caller. |
Definition at line 85 of file preview_dialog.c.
Referenced by preview_create_window().
| int preview_set_fg_color | ( | GdkGC * | gc, | |
| const char * | color_name | |||
| ) |
Set the foreground color of the Graphics Context.
EXIT_SUCCESS when function is completed, EXIT_FAILURE when an eror occurred. | gc | : is the Graphics Context. | |
| color_name | : is a NULL terminated color name. |
Definition at line 104 of file preview_dialog.c.
Referenced by preview_use_gc().
| int preview_set_fill_mode | ( | GdkGC * | gc, | |
| GdkFill | fill_mode | |||
| ) |
Set the fill mode of the Graphics Context.
EXIT_SUCCESS when function is completed, EXIT_FAILURE when an eror occurred. | gc | : is the Graphics Context. | |
| fill_mode | : determines how primitives are drawn. Valid values are:
|
Definition at line 140 of file preview_dialog.c.
Referenced by preview_use_gc().
| int preview_set_line_cap | ( | GdkGC * | gc, | |
| GdkCapStyle | line_cap | |||
| ) |
Set the line capsulation of the Graphics Context.
EXIT_SUCCESS when function is completed, EXIT_FAILURE when an eror occurs. | gc | : is the Graphics Context. | |
| line_cap | : determines how the end of lines are drawn. Valid values are:
|
Definition at line 190 of file preview_dialog.c.
Referenced by preview_use_gc().
| int preview_set_line_style | ( | GdkGC * | gc, | |
| GdkLineStyle | line_style | |||
| ) |
Set the line style of the Graphics Context.
EXIT_SUCCESS when function is completed, EXIT_FAILURE when an eror occurs. | gc | : is the Graphics Context. | |
| line_style | : determines how lines are drawn. Valid values are:
|
Definition at line 245 of file preview_dialog.c.
Referenced by preview_use_gc().
| int preview_set_line_width | ( | GdkGC * | gc, | |
| gint | line_width | |||
| ) |
Set the line width of the Graphics Context.
EXIT_SUCCESS when function is completed, EXIT_FAILURE when an eror occurs. | gc | : is the Graphics Context. | |
| line_width | : is the line width in pixels [px]. |
Definition at line 297 of file preview_dialog.c.
Referenced by preview_use_gc().
| int preview_use_gc | ( | GdkDrawable * | drawable, | |
| GdkGC * | gc, | |||
| const char * | color_name, | |||
| gint | line_width, | |||
| GdkCapStyle | line_cap, | |||
| GdkLineStyle | line_style, | |||
| GdkFill | fill_mode | |||
| ) |
Use a Graphics Context when drawing entities.
If the passed Graphics Context is NULL , create a Graphics Context.
EXIT_SUCCESS when function is completed, EXIT_FAILURE when an eror occurs. | drawable | : is an opaque structure representing an object that can be drawn onto. This can be a GdkPixmap, a GdkBitmap, or a GdkWindow. | |
| gc | : is the Graphics Context. | |
| color_name | : is a NULL terminated color name. | |
| line_width | : is the line width in pixels [px]. | |
| line_cap | : determines how the end of lines are drawn. Valid values are:
| |
| line_style | : determines how lines are drawn. Valid values are:
| |
| fill_mode | : determines how primitives are drawn. Valid values are:
|
Definition at line 346 of file preview_dialog.c.
References preview_set_fg_color(), preview_set_fill_mode(), preview_set_line_cap(), preview_set_line_style(), and preview_set_line_width().

1.7.1