PCB-FPW developer documentation based on version: 0.0.11

Functions | Variables

callbacks.c File Reference

Callback functions for the pcb footprintwizard (pcb-gfpw). More...

Go to the source code of this file.

Functions

int all_entries_need_updated (GtkWidget *widget)
 All entries need to be updated.
int all_entries_to_default_sensitivity (GtkWidget *widget)
 Set all entries widgets to default sensitivity.
int change_main_window_title (GtkWidget *widget, gchar *main_window_title)
 Change the main window title.
int entry_has_changed (GtkWidget *widget)
 The value in one of the entries in the GUI has changed.
int gui_constraints_disable_heel_and_toe_goals_tab_widgets (GtkWidget *widget)
 Set GUI constraints: disable the entries in the "Heel and Toe goals" tab.
int gui_constraints_disable_thermal_tab_widgets (GtkWidget *widget)
 Set GUI constraints: disable the entries in the "Thermal Pad" tab.
int message_to_statusbar (GtkWidget *widget, gchar *message)
 Send a message to the statusbar.
int number_of_pins_has_changed (GtkWidget *widget)
 Update the value in the "number_total_pins" entry.
void on_C1_entry_changed (GtkEditable *editable, gpointer user_data)
 The "top to bottom pads/pins center-center distance (C1)" entry is changed.
void on_C1_radiobutton_toggled (GtkToggleButton *togglebutton, gpointer user_data)
 The "top to bottom pads/pins center-center distance (C1)" radiobutton is clicked.
void on_C2_entry_changed (GtkEditable *editable, gpointer user_data)
 The "left to right pads/pins center-center distance (C2)" entry is changed.
void on_C2_radiobutton_toggled (GtkToggleButton *togglebutton, gpointer user_data)
 The "left to right pads/pins center-center distance (C2)" radiobutton is clicked.
void on_G1_entry_changed (GtkEditable *editable, gpointer user_data)
 The top to bottom pads/pins inner-inner distance (G1) entry is changed.
void on_G1_radiobutton_toggled (GtkToggleButton *togglebutton, gpointer user_data)
 The top to bottom pads/pins inner-inner distance (G1) radiobutton is clicked.
void on_G2_entry_changed (GtkEditable *editable, gpointer user_data)
 The left to right pads/pins inner-inner distance (G2) entry is changed.
void on_G2_radiobutton_toggled (GtkToggleButton *togglebutton, gpointer user_data)
 The left to right pads/pins inner-inner distance (G2) radiobutton is clicked.
void on_Z1_entry_changed (GtkEditable *editable, gpointer user_data)
 The top to bottom pads/pins outer-outer distance (Z1) entry is changed.
void on_Z1_radiobutton_toggled (GtkToggleButton *togglebutton, gpointer user_data)
 The top to bottom pads/pins outer-outer (Z1) radiobutton is clicked.
void on_Z2_entry_changed (GtkEditable *editable, gpointer user_data)
 The left to right pads/pins outer-outer distance (Z2) entry is changed.
void on_Z2_radiobutton_toggled (GtkToggleButton *togglebutton, gpointer user_data)
 The left to right pads/pins outer-outer (Z2) radiobutton is clicked.
void on_about_dialog_close (GtkDialog *dialog, gint response_id, gpointer user_data)
 The close button of the about dialog is clicked.
void on_about_dialog_destroy (GtkObject *object, gpointer user_data)
 The destroy button of the about dialog is clicked.
void on_add_attribs_checkbutton_toggled (GtkToggleButton *togglebutton, gpointer user_data)
 The "add attributes to footprint" checkbutton is toggled.
void on_add_license_checkbutton_toggled (GtkToggleButton *togglebutton, gpointer user_data)
 The "add a license text to footprint" checkbutton is toggled.
void on_clear_button_clicked (GtkButton *button, gpointer user_data)
 The "Clear" button is clicked.
void on_close_button_clicked (GtkButton *button, gpointer user_data)
 The "Close" button is clicked.
void on_count_x_entry_changed (GtkEditable *editable, gpointer user_data)
 The "Count X-direction" entry is changed.
void on_count_y_entry_changed (GtkEditable *editable, gpointer user_data)
 The "Count Y-direction" entry is changed.
void on_courtyard_checkbutton_toggled (GtkToggleButton *togglebutton, gpointer user_data)
 The "courtyard" checkbutton is toggled.
void on_courtyard_clearance_with_package_entry_changed (GtkEditable *editable, gpointer user_data)
 The "courtyard clearance with package" entry is changed.
void on_courtyard_length_entry_changed (GtkEditable *editable, gpointer user_data)
 The "length of the courtyard (X)" entry is changed.
void on_courtyard_line_width_entry_changed (GtkEditable *editable, gpointer user_data)
 The "courtyard line width" entry is changed.
void on_courtyard_width_entry_changed (GtkEditable *editable, gpointer user_data)
 The "width of the courtyard (Y)" entry is changed.
void on_dimensions_button_clicked (GtkButton *button, gpointer user_data)
 The "Dimensions" button is clicked.
void on_fiducial_checkbutton_toggled (GtkToggleButton *togglebutton, gpointer user_data)
 The "fiducial" checkbutton is toggled.
void on_fiducial_pad_clearance_entry_changed (GtkEditable *editable, gpointer user_data)
 The "fiducial pad clearance" entry is changed.
void on_fiducial_pad_diameter_entry_changed (GtkEditable *editable, gpointer user_data)
 The "fiducial pad diameter (D)" entry is changed.
void on_fiducial_pad_solder_mask_clearance_entry_changed (GtkEditable *editable, gpointer user_data)
 The "fiducial pad solder mask clearance" entry is changed.
void on_filechooser_dialog_cancel_button_clicked (GtkButton *button, gpointer user_data)
 The file chooser dialog "Cancel" button is clicked.
void on_filechooser_dialog_close (GtkDialog *dialog, gpointer user_data)
 The file chooser dialog "close" signal is emitted.
void on_filechooser_dialog_current_folder_changed (GtkFileChooser *filechooser, gpointer user_data)
 The file chooser dialog "current folder changed" signal is emitted.
void on_filechooser_dialog_open_button_clicked (GtkButton *button, gpointer user_data)
 The file chooser dialog "Open" button is clicked.
void on_filechooser_dialog_selection_changed (GtkFileChooser *filechooser, gpointer user_data)
 The file chooser dialog "selection changed" signal is emitted.
void on_filechooser_dialog_update_preview (GtkFileChooser *filechooser, gpointer user_data)
 The file chooser dialog "update preview" signal is emitted.
void on_footprint_author_entry_changed (GtkEditable *editable, gpointer user_data)
 The "footprint author name" entry is changed.
void on_footprint_button_clicked (GtkButton *button, gpointer user_data)
 The "Footprint" button is clicked.
void on_footprint_dist_license_entry_changed (GtkEditable *editable, gpointer user_data)
 The "footprint distribution license" entry is changed.
void on_footprint_name_entry_changed (GtkEditable *editable, gpointer user_data)
 The "footprint name" entry is changed.
void on_footprint_refdes_entry_changed (GtkEditable *editable, gpointer user_data)
 The "footprint refdes prefix" entry is changed.
void on_footprint_status_entry_changed (GtkComboBox *combobox, gpointer user_data)
 The "footprint status" entry is changed.
void on_footprint_type_entry_changed (GtkComboBox *combobox, gpointer user_data)
 The "footprint type" entry is changed.
void on_footprint_units_entry_changed (GtkComboBox *combobox, gpointer user_data)
 The "footprint units" entry is changed.
void on_footprint_use_license_entry_changed (GtkEditable *editable, gpointer user_data)
 The "footprint usage license" entry is changed.
void on_footprint_value_entry_changed (GtkEditable *editable, gpointer user_data)
 The "footprint value" entry is changed.
void on_number_1_position_entry_changed (GtkComboBox *combobox, gpointer user_data)
 The "position of number 1 pad/pin" entry is changed.
void on_number_of_columns_entry_changed (GtkEditable *editable, gpointer user_data)
 The "number of columns" entry is changed.
void on_number_of_rows_entry_changed (GtkEditable *editable, gpointer user_data)
 The "number of rows" entry is changed.
void on_number_total_pins_entry_changed (GtkEditable *editable, gpointer user_data)
 The "number of pads/pins" entry is changed.
void on_open_button_clicked (GtkButton *button, gpointer user_data)
 The "Open" button is clicked.
void on_package_body_height_entry_changed (GtkEditable *editable, gpointer user_data)
 The "package body height" entry is changed.
void on_package_body_length_entry_changed (GtkEditable *editable, gpointer user_data)
 The "package body length" entry is changed.
void on_package_body_width_entry_changed (GtkEditable *editable, gpointer user_data)
 The "package body width" entry is changed.
void on_package_is_radial_checkbutton_toggled (GtkToggleButton *togglebutton, gpointer user_data)
 The "package is radial" checkbutton is toggled.
void on_pad_clearance_entry_changed (GtkEditable *editable, gpointer user_data)
 The "pad clearance" entry is changed.
void on_pad_diameter_entry_changed (GtkEditable *editable, gpointer user_data)
 The "diameter of the pad (D)" entry is changed.
void on_pad_length_entry_changed (GtkEditable *editable, gpointer user_data)
 The "length of the pads (X)" entry is changed.
void on_pad_shape_entry_changed (GtkComboBox *combobox, gpointer user_data)
 The "shape of pads" entry is changed.
void on_pad_solder_mask_clearance_entry_changed (GtkEditable *editable, gpointer user_data)
 The "pad solder mask clearance" entry is changed.
void on_pad_width_entry_changed (GtkEditable *editable, gpointer user_data)
 The "width of the pads (Y)" entry is changed.
void on_pcb_gfpw_destroy (GtkObject *object, gpointer user_data)
 The top-right "X" is clicked.
void on_pin_drill_diameter_entry_changed (GtkEditable *editable, gpointer user_data)
 The "diameter of the drill holes (d)" entry is changed.
void on_pin_pad_exceptions_button_clicked (GtkButton *button, gpointer user_data)
 The "Pin/Pad exceptions" button is clicked.
void on_pin_pad_exceptions_entry_changed (GtkEditable *editable, gpointer user_data)
 The "pin/pad exceptions" entry is changed.
void on_pin_square_checkbutton_toggled (GtkToggleButton *togglebutton, gpointer user_data)
 The "pin #1 square" checkbutton is toggled.
void on_pitch_x_entry_changed (GtkEditable *editable, gpointer user_data)
 The "Pitch X-direction" entry is changed.
void on_pitch_y_entry_changed (GtkEditable *editable, gpointer user_data)
 The "Pitch Y-direction" entry is changed.
void on_preview_button_clicked (GtkButton *button, gpointer user_data)
 The "Preview" button is clicked.
void on_refresh_button_clicked (GtkButton *button, gpointer user_data)
 The "Refresh" button is clicked.
void on_save_button_clicked (GtkButton *button, gpointer user_data)
 The "Save" button is clicked.
void on_silkscreen_indicate_1_checkbutton_toggled (GtkToggleButton *togglebutton, gpointer user_data)
 The "indicate pin/pad number 1" checkbutton is toggled.
void on_silkscreen_line_width_entry_changed (GtkEditable *editable, gpointer user_data)
 The "silkscreen line width" entry is changed.
void on_silkscreen_package_outline_checkbutton_toggled (GtkToggleButton *togglebutton, gpointer user_data)
 The "package outline" checkbutton is toggled.
void on_thermal_checkbutton_toggled (GtkToggleButton *togglebutton, gpointer user_data)
 The "thermal pad" checkbutton is toggled.
void on_thermal_clearance_entry_changed (GtkEditable *editable, gpointer user_data)
 The "thermal pad clearance" entry is changed.
void on_thermal_length_entry_changed (GtkEditable *editable, gpointer user_data)
 The "thermal pad length" entry is changed.
void on_thermal_nopaste_checkbutton_toggled (GtkToggleButton *togglebutton, gpointer user_data)
 The "thermal pad no paste" checkbutton is clicked.
void on_thermal_solder_mask_clearance_entry_changed (GtkEditable *editable, gpointer user_data)
 The "thermal pad solder mask clearance" entry is changed.
void on_thermal_width_entry_changed (GtkEditable *editable, gpointer user_data)
 The "thermal pad width" entry is changed.

Variables

gboolean main_window_title_has_asterisk = FALSE
gboolean fpw_file_saved = FALSE
gchar * temp_dir = NULL
gchar * work_dir = NULL

Detailed Description

Callback functions for the pcb footprintwizard (pcb-gfpw).

Author:
Copyright 2007, 2008, 2009, 2010 by Bert Timmerman <bert.timmerman@xs4all.nl>

pcb-gfpw (GtkFootPrintWizard) is a program for the creation of footprint files to be used by the pcb layout application (see http://pcb.gpleda.org) for the placement of parts in a pcb layout.

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 gtk/callbacks.c.


Function Documentation

int all_entries_need_updated ( GtkWidget *  widget  ) 

All entries need to be updated.

For some reason (e.g. loading a fpw-file or looking a pre-defined package for instance) the entry fields, combo boxes and check buttons need to be updated to be in sync with the global variables (which are considered leading over the actual values shown in the GUI in this case). This function is to be called on one of the following events:

  • The "refresh" button is clicked.
  • The "footprint name" entry has changed.
  • The "open" button of the file chooser is clicked and new values are loaded successfull.

Parameters: *widget is the caller widget.

Returns: none.

Definition at line 82 of file gtk/callbacks.c.

References attributes_in_footprint, c1, c2, count_x, count_y, courtyard_clearance_with_package, courtyard_length, courtyard_line_width, courtyard_width, fiducial, fiducial_pad_clearance, fiducial_pad_diameter, fiducial_pad_solder_mask_clearance, footprint_author, footprint_dist_license, footprint_name, footprint_refdes, footprint_status, footprint_type, footprint_units, footprint_use_license, footprint_value, g1, g2, license_in_footprint, number_of_columns, number_of_pins, number_of_pins_has_changed(), number_of_rows, package_body_height, package_body_length, package_body_width, package_is_radial, package_type, pad_clearance, pad_diameter, pad_length, pad_shape, pad_shapes_type, pad_solder_mask_clearance, pad_width, pin1_location, pin1_square, pin_1_position, pin_drill_diameter, pin_pad_exceptions_string, pitch_x, pitch_y, silkscreen_indicate_1, silkscreen_package_outline, status_type, thermal, thermal_clearance, thermal_length, thermal_nopaste, thermal_solder_mask_clearance, thermal_width, units_type, update_location_variables(), update_pad_shapes_variables(), update_units_variables(), z1, and z2.

Here is the call graph for this function:

int all_entries_to_default_sensitivity ( GtkWidget *  widget  ) 

Set all entries widgets to default sensitivity.

Parameters: *widget is the caller widget.

Returns: none.

Definition at line 595 of file gtk/callbacks.c.

int change_main_window_title ( GtkWidget *  widget,
gchar *  main_window_title 
)

Change the main window title.

Parameters: *widget is the caller widget.

Parameters: *main_window_title is the string containing the new title.

Returns: none.

Definition at line 808 of file gtk/callbacks.c.

References main_window.

int entry_has_changed ( GtkWidget *  widget  ) 

The value in one of the entries in the GUI has changed.

Add an asterix between brackets [*] before the current window title.

Parameters: *widget is the caller widget.

Returns: none.

Definition at line 827 of file gtk/callbacks.c.

References change_main_window_title(), fpw_file_saved, main_window, and main_window_title_has_asterisk.

Here is the call graph for this function:

int gui_constraints_disable_heel_and_toe_goals_tab_widgets ( GtkWidget *  widget  ) 

Set GUI constraints: disable the entries in the "Heel and Toe goals" tab.

Parameters: *widget is the caller widget.

Returns: none.

Definition at line 867 of file gtk/callbacks.c.

int gui_constraints_disable_thermal_tab_widgets ( GtkWidget *  widget  ) 

Set GUI constraints: disable the entries in the "Thermal Pad" tab.

Parameters: *widget is the caller widget.

Returns: none.

Definition at line 929 of file gtk/callbacks.c.

int message_to_statusbar ( GtkWidget *  widget,
gchar *  message 
)

Send a message to the statusbar.

Parameters: *widget is the caller widget.

Parameters: *message is the string containing the new message for the statusbar.

Returns: none.

Definition at line 985 of file gtk/callbacks.c.

int number_of_pins_has_changed ( GtkWidget *  widget  ) 

Update the value in the "number_total_pins" entry.

This function is to be called on one of the following events:

  • Number of columns entry is changed: number_of_columns changes.
  • Number of rows entry is changed: number_of_rows changes.
  • Count of pin/pads (on a row) in the X-direction entry is changed: count_x changes.
  • Count of pin/pads (on a column) in the Y-direction entry is changed: count_y changes.
  • The thermal pad button is toggled: thermal changes.

Parameters: *widget is the caller widget.

Returns: none.

Definition at line 1014 of file gtk/callbacks.c.

References get_total_number_of_pins(), and number_of_pins.

Here is the call graph for this function:

void on_about_dialog_close ( GtkDialog *  dialog,
gint  response_id,
gpointer  user_data 
)

The close button of the about dialog is clicked.

Parameters: *dialog is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1397 of file gtk/callbacks.c.

References about_dialog.

void on_about_dialog_destroy ( GtkObject *  object,
gpointer  user_data 
)

The destroy button of the about dialog is clicked.

Parameters: *object is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1417 of file gtk/callbacks.c.

References about_dialog.

void on_add_attribs_checkbutton_toggled ( GtkToggleButton *  togglebutton,
gpointer  user_data 
)

The "add attributes to footprint" checkbutton is toggled.

  • get active state.
  • store in the attributes_in_footprint variable (global).

Parameters: *togglebutton is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1441 of file gtk/callbacks.c.

References attributes_in_footprint.

void on_add_license_checkbutton_toggled ( GtkToggleButton *  togglebutton,
gpointer  user_data 
)

The "add a license text to footprint" checkbutton is toggled.

  • get active state.
  • store in the license_in_footprint variable (global).

Parameters: *togglebutton is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1463 of file gtk/callbacks.c.

References license_in_footprint.

void on_C1_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "top to bottom pads/pins center-center distance (C1)" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the c1 variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1043 of file gtk/callbacks.c.

References c1, and entry_has_changed().

Here is the call graph for this function:

void on_C1_radiobutton_toggled ( GtkToggleButton *  togglebutton,
gpointer  user_data 
)

The "top to bottom pads/pins center-center distance (C1)" radiobutton is clicked.

  • set the "center-center distance (C1)" entry to sensitive.
  • set the "inner-inner distance (G1)" entry to insensitive.
  • set the "outer-outer distance (Z1)" entry to insensitive.

Parameters: *togglebutton is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1072 of file gtk/callbacks.c.

References c1_state, g1_state, and z1_state.

void on_C2_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "left to right pads/pins center-center distance (C2)" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the c2 variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1103 of file gtk/callbacks.c.

References c2, and entry_has_changed().

Here is the call graph for this function:

void on_C2_radiobutton_toggled ( GtkToggleButton *  togglebutton,
gpointer  user_data 
)

The "left to right pads/pins center-center distance (C2)" radiobutton is clicked.

  • set the "center-center distance (C2)" entry to sensitive.
  • set the "inner-inner distance (G2)" entry to insensitive.
  • set the "outer-outer distance (Z2)" entry to insensitive.

Parameters: *togglebutton is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1132 of file gtk/callbacks.c.

References c2_state, g2_state, and z2_state.

void on_clear_button_clicked ( GtkButton *  button,
gpointer  user_data 
)

The "Clear" button is clicked.

  • clear all entries or set entries which have a default values to that value,
  • set all togglebuttons to the initial state.
Todo:
Combobox entries to be stripped of characters with something like gtk_combo_box_remove_text ().

Parameters: *button is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1489 of file gtk/callbacks.c.

References entry_has_changed().

Here is the call graph for this function:

void on_close_button_clicked ( GtkButton *  button,
gpointer  user_data 
)

The "Close" button is clicked.

Close the application.

Parameters: *button is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1692 of file gtk/callbacks.c.

void on_count_x_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "Count X-direction" entry is changed.

  • get the chars from the entry.
  • convert to an integer and store in the count_x variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1715 of file gtk/callbacks.c.

References count_x, entry_has_changed(), and number_of_pins_has_changed().

Here is the call graph for this function:

void on_count_y_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "Count Y-direction" entry is changed.

  • get the chars from the entry.
  • convert to an integer and store in the count_y variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1744 of file gtk/callbacks.c.

References count_y, entry_has_changed(), and number_of_pins_has_changed().

Here is the call graph for this function:

void on_courtyard_checkbutton_toggled ( GtkToggleButton *  togglebutton,
gpointer  user_data 
)

The "courtyard" checkbutton is toggled.

  • get active state.
  • store in the courtyard variable (global).

Parameters: *togglebutton is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1772 of file gtk/callbacks.c.

References courtyard, and entry_has_changed().

Here is the call graph for this function:

void on_courtyard_clearance_with_package_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "courtyard clearance with package" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the courtyard_clearance_with_package variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1809 of file gtk/callbacks.c.

References courtyard_clearance_with_package, and entry_has_changed().

Here is the call graph for this function:

void on_courtyard_length_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "length of the courtyard (X)" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the courtyard_length variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1837 of file gtk/callbacks.c.

References courtyard_length, and entry_has_changed().

Here is the call graph for this function:

void on_courtyard_line_width_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "courtyard line width" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the courtyard_line_width variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1865 of file gtk/callbacks.c.

References courtyard_line_width, and entry_has_changed().

Here is the call graph for this function:

void on_courtyard_width_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "width of the courtyard (Y)" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the courtyard_width variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1893 of file gtk/callbacks.c.

References courtyard_width, and entry_has_changed().

Here is the call graph for this function:

void on_dimensions_button_clicked ( GtkButton *  button,
gpointer  user_data 
)

The "Dimensions" button is clicked.

Create a window with a pixmap of the dimensions of the current footprint type (based on the value in the entry widget).

Parameters: *button is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1918 of file gtk/callbacks.c.

References dimensions_create_window(), footprint_type, and verbose.

Here is the call graph for this function:

void on_fiducial_checkbutton_toggled ( GtkToggleButton *  togglebutton,
gpointer  user_data 
)

The "fiducial" checkbutton is toggled.

  • get active state.
  • store in the fiducial variable (global).
  • set pad diameter and pad solder mask clearance entries to the corresponding sensitive state.
  • set fpw entries have changed marker.

Parameters: *togglebutton is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1961 of file gtk/callbacks.c.

References entry_has_changed(), and fiducial.

Here is the call graph for this function:

void on_fiducial_pad_clearance_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "fiducial pad clearance" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the fiducial_pad_clearance variable (global).
  • set the fpw entries have changed marker "[*]" in the title bar.

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1994 of file gtk/callbacks.c.

References entry_has_changed(), and fiducial_pad_clearance.

Here is the call graph for this function:

void on_fiducial_pad_diameter_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "fiducial pad diameter (D)" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the fiducial_pad_diameter variable (global).
  • set fpw entries have changed marker.

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 2025 of file gtk/callbacks.c.

References entry_has_changed(), and fiducial_pad_diameter.

Here is the call graph for this function:

void on_fiducial_pad_solder_mask_clearance_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "fiducial pad solder mask clearance" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the fiducial_pad_solder_mask_clearance variable (global).
  • set fpw entries have changed marker.

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 2056 of file gtk/callbacks.c.

References entry_has_changed(), and fiducial_pad_solder_mask_clearance.

Here is the call graph for this function:

void on_filechooser_dialog_cancel_button_clicked ( GtkButton *  button,
gpointer  user_data 
)

The file chooser dialog "Cancel" button is clicked.

  • lookup the dialog widget.
  • destroy the file chooser widget.
Todo:
  • maybe restore the preview widget ?

Parameters: *button is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 2090 of file gtk/callbacks.c.

void on_filechooser_dialog_close ( GtkDialog *  dialog,
gpointer  user_data 
)

The file chooser dialog "close" signal is emitted.

  • lookup the dialog widget.
  • destroy the file chooser widget.

Parameters: *dialog is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 2114 of file gtk/callbacks.c.

void on_filechooser_dialog_current_folder_changed ( GtkFileChooser *  filechooser,
gpointer  user_data 
)

The file chooser dialog "current folder changed" signal is emitted.

  • lookup the dialog widget.
  • get the current folder.
  • test the current folder for null pointer or empty string and if true, please log a message and return.
  • store the (new) current folder name in temp_dir.

Parameters: *filechooser is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 2143 of file gtk/callbacks.c.

References temp_dir, and verbose.

void on_filechooser_dialog_open_button_clicked ( GtkButton *  button,
gpointer  user_data 
)

The file chooser dialog "Open" button is clicked.

  • lookup the dialog widget.
  • get the selected filename.
  • test the selected filename for null pointer or empty string and if true, please log a message.
  • test if the selected filename is not a directory and if true, please log a message.
  • store the selected filename in fpw_filename.
  • duplicate the (new) current directory name from temp_dir into work_dir.
  • read new global values from the selected footprintwizard file.
  • update the entry widgets to reflect the changes.

Parameters: *button is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 2207 of file gtk/callbacks.c.

References all_entries_need_updated(), read_footprintwizard_file(), temp_dir, verbose, and work_dir.

Here is the call graph for this function:

void on_filechooser_dialog_selection_changed ( GtkFileChooser *  filechooser,
gpointer  user_data 
)

The file chooser dialog "selection changed" signal is emitted.

Todo:
  • store the selected filename in temp_fpw_filename.

- read the values from the selected footprintwizard file in a temporary set of variables temp_*.

- generate a new preview image.

- update the preview widget.

Parameters: *filechooser is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 2305 of file gtk/callbacks.c.

void on_filechooser_dialog_update_preview ( GtkFileChooser *  filechooser,
gpointer  user_data 
)

The file chooser dialog "update preview" signal is emitted.

Todo:
  • generate a new preview image.

- update the preview widget.

Parameters: *filechooser is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 2325 of file gtk/callbacks.c.

void on_footprint_author_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "footprint author name" entry is changed.

Store in the footprint_author variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 2344 of file gtk/callbacks.c.

References entry_has_changed(), and footprint_author.

Here is the call graph for this function:

void on_footprint_button_clicked ( GtkButton *  button,
gpointer  user_data 
)

The "Footprint" button is clicked.

  • check for null pointer and empty string in footprint_name.
  • determine the name of the footprintwizard filename.
  • determine the name of the footprint filename.
  • invoke the write_footprint() function to write the footprint file.
  • if the footprint file is written successfull reflect this in the statusbar.

Parameters: *button is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 2374 of file gtk/callbacks.c.

References footprint_filename, footprint_name, fp_suffix, message_to_statusbar(), and write_footprint().

Here is the call graph for this function:

void on_footprint_dist_license_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "footprint distribution license" entry is changed.

Store in the footprint_dist_license variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 2441 of file gtk/callbacks.c.

References entry_has_changed(), and footprint_dist_license.

Here is the call graph for this function:

void on_footprint_name_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "footprint name" entry is changed.

Store in the footprint_name variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 2463 of file gtk/callbacks.c.

References all_entries_need_updated(), BGA, bga_get_default_footprint_values(), CAPA, capa_get_default_footprint_values(), CAPC, capc_get_default_footprint_values(), CAPM, capm_get_default_footprint_values(), CAPMP, capmp_get_default_footprint_values(), CAPPR, cappr_get_default_footprint_values(), CON_DIL, con_dil_get_default_footprint_values(), CON_DIP, con_dip_get_default_footprint_values(), CON_HDR, con_hdr_get_default_footprint_values(), con_sil_get_default_footprint_values(), DIOM, diom_get_default_footprint_values(), DIOMELF, diomelf_get_default_footprint_values(), DIP, dip_get_default_footprint_values(), DIPS, dips_get_default_footprint_values(), entry_has_changed(), footprint_name, INDC, indc_get_default_footprint_values(), INDM, indm_get_default_footprint_values(), INDP, indp_get_default_footprint_values(), message_to_statusbar(), package_type, PGA, pga_get_default_footprint_values(), PLCC, plcc_get_default_footprint_values(), RES, res_get_default_footprint_values(), RESC, resc_get_default_footprint_values(), RESM, resm_get_default_footprint_values(), RESMELF, resmelf_get_default_footprint_values(), SIL, sil_get_default_footprint_values(), SIP, sip_get_default_footprint_values(), SOT, sot_get_default_footprint_values(), TO, and to_get_default_footprint_values().

Here is the call graph for this function:

void on_footprint_refdes_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "footprint refdes prefix" entry is changed.

Store in the footprint_refdes variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 2677 of file gtk/callbacks.c.

References entry_has_changed(), and footprint_refdes.

Here is the call graph for this function:

void on_footprint_status_entry_changed ( GtkComboBox *  combobox,
gpointer  user_data 
)

The "footprint status" entry is changed.

Store in the footprint_status variable (global).

Parameters: *combobox is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 2698 of file gtk/callbacks.c.

References entry_has_changed(), footprint_status, get_status_type(), and verbose.

Here is the call graph for this function:

void on_footprint_type_entry_changed ( GtkComboBox *  combobox,
gpointer  user_data 
)

The "footprint type" entry is changed.

  • test if the footprint name is equal with the footprint type or has a null pointer or is an empty string, if so copy the footprint type into the footprint name entry.
  • store the new value in the footprint_type variable (global).

Parameters: *combobox is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 2736 of file gtk/callbacks.c.

References all_entries_to_default_sensitivity(), BGA, bga_set_gui_constraints(), CAPA, capa_set_gui_constraints(), CAPC, capc_set_gui_constraints(), CAPM, capm_set_gui_constraints(), CAPMP, capmp_set_gui_constraints(), CAPPR, cappr_set_gui_constraints(), CON_DIL, con_dil_set_gui_constraints(), CON_DIP, con_dip_set_gui_constraints(), CON_HDR, con_hdr_set_gui_constraints(), con_sil_set_gui_constraints(), DIL, DIOM, diom_set_gui_constraints(), DIOMELF, diomelf_set_gui_constraints(), DIP, dip_set_gui_constraints(), DIPS, dips_set_gui_constraints(), entry_has_changed(), footprint_name, footprint_type, get_package_type(), INDC, indc_set_gui_constraints(), INDM, indm_set_gui_constraints(), INDP, indp_set_gui_constraints(), message_to_statusbar(), package_type, PGA, pga_set_gui_constraints(), PLCC, plcc_set_gui_constraints(), QFN, QFP, RES, res_set_gui_constraints(), RESC, resc_set_gui_constraints(), RESM, resm_set_gui_constraints(), RESMELF, resmelf_set_gui_constraints(), SIL, sil_set_gui_constraints(), SIP, sip_set_gui_constraints(), SO, SOT, sot_set_gui_constraints(), TO220, TO220S, TO220SW, TO220W, TO92, to_set_gui_constraints(), verbose, and widget.

Here is the call graph for this function:

void on_footprint_units_entry_changed ( GtkComboBox *  combobox,
gpointer  user_data 
)

The "footprint units" entry is changed.

  • store in the footprint_units variable (global).
  • check for null pointer and empty string.

Parameters: *combobox is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3015 of file gtk/callbacks.c.

References entry_has_changed(), footprint_units, message_to_statusbar(), and update_units_variables().

Here is the call graph for this function:

void on_footprint_use_license_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "footprint usage license" entry is changed.

Store in the footprint_use_license variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3064 of file gtk/callbacks.c.

References entry_has_changed(), and footprint_use_license.

Here is the call graph for this function:

void on_footprint_value_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "footprint value" entry is changed.

Store in the footprint_value variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3086 of file gtk/callbacks.c.

References entry_has_changed(), and footprint_value.

Here is the call graph for this function:

void on_G1_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The top to bottom pads/pins inner-inner distance (G1) entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the g1 variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1163 of file gtk/callbacks.c.

References entry_has_changed(), and g1.

Here is the call graph for this function:

void on_G1_radiobutton_toggled ( GtkToggleButton *  togglebutton,
gpointer  user_data 
)

The top to bottom pads/pins inner-inner distance (G1) radiobutton is clicked.

  • set the inner-inner (G1) entry to sensitive.
  • set the center-center (C1) entry to insensitive.
  • set the outer-outer (Z1) entry to insensitive.

Parameters: *togglebutton is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1192 of file gtk/callbacks.c.

References c1_state, g1_state, and z1_state.

void on_G2_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The left to right pads/pins inner-inner distance (G2) entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the g2 variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1223 of file gtk/callbacks.c.

References entry_has_changed(), and g2.

Here is the call graph for this function:

void on_G2_radiobutton_toggled ( GtkToggleButton *  togglebutton,
gpointer  user_data 
)

The left to right pads/pins inner-inner distance (G2) radiobutton is clicked.

  • set the inner-inner (G2) entry to sensitive.
  • set the center-centr (C2) entry to insensitive.
  • set the outer-outer (Z2) entry to insensitive.

Parameters: *togglebutton is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1252 of file gtk/callbacks.c.

References c2_state, g2_state, and z2_state.

void on_number_1_position_entry_changed ( GtkComboBox *  combobox,
gpointer  user_data 
)

The "position of number 1 pad/pin" entry is changed.

Store in the n1_pos variable (global).

Parameters: *combobox is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3109 of file gtk/callbacks.c.

References entry_has_changed(), and pin_1_position.

Here is the call graph for this function:

void on_number_of_columns_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "number of columns" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the n_col variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3132 of file gtk/callbacks.c.

References entry_has_changed(), number_of_columns, and number_of_pins_has_changed().

Here is the call graph for this function:

void on_number_of_rows_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "number of rows" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the n_row variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3160 of file gtk/callbacks.c.

References entry_has_changed(), number_of_pins_has_changed(), and number_of_rows.

Here is the call graph for this function:

void on_number_total_pins_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "number of pads/pins" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the n variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3188 of file gtk/callbacks.c.

References entry_has_changed(), and number_of_pins.

Here is the call graph for this function:

void on_open_button_clicked ( GtkButton *  button,
gpointer  user_data 
)

The "Open" button is clicked.

  • create a file chooser dialog.
  • create and set a file filter "*.fpw" and add to the file chooser.
  • show the file chooser widget to let the user select a .fpw file.

Parameters: *button is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3216 of file gtk/callbacks.c.

References create_filechooser_dialog().

Here is the call graph for this function:

void on_package_body_height_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "package body height" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the package_body_height variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3245 of file gtk/callbacks.c.

References entry_has_changed(), and package_body_height.

Here is the call graph for this function:

void on_package_body_length_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "package body length" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the package_body_length variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3273 of file gtk/callbacks.c.

References entry_has_changed(), and package_body_length.

Here is the call graph for this function:

void on_package_body_width_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "package body width" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the package_body_width variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3301 of file gtk/callbacks.c.

References entry_has_changed(), and package_body_width.

Here is the call graph for this function:

void on_package_is_radial_checkbutton_toggled ( GtkToggleButton *  togglebutton,
gpointer  user_data 
)

The "package is radial" checkbutton is toggled.

Store the state of the checkbutton in the package_is_radial variable (global).

Parameters: *togglebutton is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3327 of file gtk/callbacks.c.

References entry_has_changed(), and package_is_radial.

Here is the call graph for this function:

void on_pad_clearance_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "pad clearance" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the pad_clearance variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3351 of file gtk/callbacks.c.

References entry_has_changed(), and pad_clearance.

Here is the call graph for this function:

void on_pad_diameter_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "diameter of the pad (D)" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the d_pad variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3378 of file gtk/callbacks.c.

References entry_has_changed(), and pad_diameter.

Here is the call graph for this function:

void on_pad_length_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "length of the pads (X)" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the pad_length variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3406 of file gtk/callbacks.c.

References entry_has_changed(), and pad_length.

Here is the call graph for this function:

void on_pad_shape_entry_changed ( GtkComboBox *  combobox,
gpointer  user_data 
)

The "shape of pads" entry is changed.

  • store in the pad_shape variable (global).
  • check for null pointer and empty string.

Parameters: *combobox is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3433 of file gtk/callbacks.c.

References entry_has_changed(), message_to_statusbar(), pad_shape, and update_pad_shapes_variables().

Here is the call graph for this function:

void on_pad_solder_mask_clearance_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "pad solder mask clearance" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the solder_mask_clearance variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3487 of file gtk/callbacks.c.

References entry_has_changed(), and pad_solder_mask_clearance.

Here is the call graph for this function:

void on_pad_width_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "width of the pads (Y)" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the pad_with variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3515 of file gtk/callbacks.c.

References entry_has_changed(), and pad_width.

Here is the call graph for this function:

void on_pcb_gfpw_destroy ( GtkObject *  object,
gpointer  user_data 
)

The top-right "X" is clicked.

Close the application.

Parameters: *object is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3539 of file gtk/callbacks.c.

void on_pin_drill_diameter_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "diameter of the drill holes (d)" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the pin_drill_diameter variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3562 of file gtk/callbacks.c.

References entry_has_changed(), and pin_drill_diameter.

Here is the call graph for this function:

void on_pin_pad_exceptions_button_clicked ( GtkButton *  button,
gpointer  user_data 
)

The "Pin/Pad exceptions" button is clicked.

  • check if a (valid) footprint type has been selected and if a valid number of rows and a valid number of columns is selected:
    • if non valid values have been selected (or not selected yet) log a warning and let this occurance pass.
    • if valid values have been selected create a seperate window with radio buttons depicting the package leads.

Parameters: *button is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3595 of file gtk/callbacks.c.

References SelectionButtonSet::active, get_pin_pad_exception(), SelectionButtonSet::id, message_to_statusbar(), SelectionButtonSet::name, number_of_columns, number_of_rows, row_letters, and select_exceptions_create_window().

Here is the call graph for this function:

void on_pin_pad_exceptions_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "pin/pad exceptions" entry is changed.

  • get the chars from the entry.
  • store the contents in the pin_pad_exception_string variable (global) for processing while generating a footprint or preview.

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3666 of file gtk/callbacks.c.

References entry_has_changed(), and pin_pad_exceptions_string.

Here is the call graph for this function:

void on_pin_square_checkbutton_toggled ( GtkToggleButton *  togglebutton,
gpointer  user_data 
)

The "pin #1 square" checkbutton is toggled.

Save the state of the checkbutton in the pin1_square variable (global).

Parameters: *togglebutton is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3689 of file gtk/callbacks.c.

References entry_has_changed(), and pin1_square.

Here is the call graph for this function:

void on_pitch_x_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "Pitch X-direction" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the pitch_x variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3712 of file gtk/callbacks.c.

References entry_has_changed(), and pitch_x.

Here is the call graph for this function:

void on_pitch_y_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "Pitch Y-direction" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the pitch_y variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3739 of file gtk/callbacks.c.

References entry_has_changed(), and pitch_y.

Here is the call graph for this function:

void on_preview_button_clicked ( GtkButton *  button,
gpointer  user_data 
)

The "Preview" button is clicked.

Create a pixmap of the footprint based on the values in the entry widgets.

Todo:
  • create and (re)load the preview image.

There are several ways to create a preview image of the footprint based on the values entered in the entries:

  1. Copy the method as in the pcb pinout preview.
    Advantage: proven functionality in pcb.
    Disadvantage: this means including a lot of code from pcb.
  2. Invoke pcb to create a picture, and subsequent load that picture into the preview drawing area.
    Advantage: proven functionality in pcb.
    Disadvantage: this will make the user wait, and this will eventually become a showstopper.
  3. Change pcb-fpw into a plug-in.
    Advantage: all pcb functionality is at hand.
    Disadvantage: the gtk approach will not work on the lesstif GUI.
  4. Make an inbuilt renderer for drawing footprints inside pcb-fpw.
    Advantage: a renderer would keep pcb-fpw independant of whatever GUI is used in pcb itself, actually pcb-fpw itself would have to draw on a canvas, regardless if pcb is installed/available or not.
    Disadvantage: a lot of code to duplicate, modify and maintain.

Parameters: *button is the caller widget.

Parameters: user_data.

Returns: none.

Bug:
Invoking preview_create_window (footprint_name, 300, 200); gives an error by ld.

Definition at line 3787 of file gtk/callbacks.c.

void on_refresh_button_clicked ( GtkButton *  button,
gpointer  user_data 
)

The "Refresh" button is clicked.

Refresh all the entries in the GUI.

Parameters: *button is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3808 of file gtk/callbacks.c.

References all_entries_need_updated().

Here is the call graph for this function:

void on_save_button_clicked ( GtkButton *  button,
gpointer  user_data 
)

The "Save" button is clicked.

  • check for null pointer and empty string in footprint_name.
  • determine the name of the footprintwizard filename.
  • determine the name of the footprint filename.
  • invoke the write_footprintwizard_file() to write the global variables to the footprintwizard file, with a .fpw suffix, for debugging and other (future) purposes.
  • if the footprint wizard file is written successfull change the title of the main window with the latest filename.
  • invoke the write_footprint() function to write the actual footprint file.
  • if the footprint file is written successfull reflect this in the statusbar.

Parameters: *button is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3839 of file gtk/callbacks.c.

References change_main_window_title(), footprint_filename, footprint_name, fp_suffix, fpw_file_saved, fpw_suffix, main_window_title_has_asterisk, message_to_statusbar(), and write_footprintwizard_file().

Here is the call graph for this function:

void on_silkscreen_indicate_1_checkbutton_toggled ( GtkToggleButton *  togglebutton,
gpointer  user_data 
)

The "indicate pin/pad number 1" checkbutton is toggled.

Store the state of the checkbutton in the silkscreen_indicate_1 variable (global).

Parameters: *togglebutton is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3934 of file gtk/callbacks.c.

References entry_has_changed(), and silkscreen_indicate_1.

Here is the call graph for this function:

void on_silkscreen_line_width_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "silkscreen line width" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the silkscreen_line_thickness variable (global).

Parameters: *ediatble is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3958 of file gtk/callbacks.c.

References entry_has_changed(), and silkscreen_line_width.

Here is the call graph for this function:

void on_silkscreen_package_outline_checkbutton_toggled ( GtkToggleButton *  togglebutton,
gpointer  user_data 
)

The "package outline" checkbutton is toggled.

  • save the state of the checkbutton in the silkscreen_package_outline variable (global).
  • if the "package outline" checkbutton is not "checked", set the linewidth entry to insensitive.
  • if the "package outline" checkbutton is "checked", set the line width entry to sensitive.

Parameters: *togglebutton is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 3990 of file gtk/callbacks.c.

References entry_has_changed(), and silkscreen_package_outline.

Here is the call graph for this function:

void on_thermal_checkbutton_toggled ( GtkToggleButton *  togglebutton,
gpointer  user_data 
)

The "thermal pad" checkbutton is toggled.

  • save the state of the checkbutton in the thermal variable (global).
  • if the "thermal pad" checkbutton is not "checked", set the length and width entries to insensitive.
  • if the "thermal pad" checkbutton is "checked", set the length and width entries to sensitive.
  • if the "thermal pad" checkbutton is "checked", set the no paste checkbutton to sensitive and active (on).

Parameters: *togglebutton is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 4025 of file gtk/callbacks.c.

References entry_has_changed(), number_of_pins_has_changed(), and thermal.

Here is the call graph for this function:

void on_thermal_clearance_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "thermal pad clearance" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the thermal_clearance variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 4074 of file gtk/callbacks.c.

References entry_has_changed(), and thermal_clearance.

Here is the call graph for this function:

void on_thermal_length_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "thermal pad length" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the thermal_length variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 4102 of file gtk/callbacks.c.

References entry_has_changed(), and thermal_length.

Here is the call graph for this function:

void on_thermal_nopaste_checkbutton_toggled ( GtkToggleButton *  togglebutton,
gpointer  user_data 
)

The "thermal pad no paste" checkbutton is clicked.

Store the state of the checkbutton in the thermal_nopaste variable (global).

Parameters: *togglebutton is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 4127 of file gtk/callbacks.c.

References entry_has_changed(), and thermal_nopaste.

Here is the call graph for this function:

void on_thermal_solder_mask_clearance_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "thermal pad solder mask clearance" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the thermal_solder_clearance variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 4152 of file gtk/callbacks.c.

References entry_has_changed(), and thermal_solder_mask_clearance.

Here is the call graph for this function:

void on_thermal_width_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The "thermal pad width" entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the thermal_width variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 4180 of file gtk/callbacks.c.

References entry_has_changed(), and thermal_width.

Here is the call graph for this function:

void on_Z1_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The top to bottom pads/pins outer-outer distance (Z1) entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the z1 variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1283 of file gtk/callbacks.c.

References entry_has_changed(), and z1.

Here is the call graph for this function:

void on_Z1_radiobutton_toggled ( GtkToggleButton *  togglebutton,
gpointer  user_data 
)

The top to bottom pads/pins outer-outer (Z1) radiobutton is clicked.

  • set the outer-outer (Z1) entry to sensitive.
  • set the center-center (C1) entry to insensitive.
  • set the inner-inner (G1) entry to insensitive.

Parameters: *togglebutton is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1312 of file gtk/callbacks.c.

References c1_state, g1_state, and z1_state.

void on_Z2_entry_changed ( GtkEditable *  editable,
gpointer  user_data 
)

The left to right pads/pins outer-outer distance (Z2) entry is changed.

  • get the chars from the entry.
  • convert to a double and store in the z2 variable (global).

Parameters: *editable is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1343 of file gtk/callbacks.c.

References entry_has_changed(), and z2.

Here is the call graph for this function:

void on_Z2_radiobutton_toggled ( GtkToggleButton *  togglebutton,
gpointer  user_data 
)

The left to right pads/pins outer-outer (Z2) radiobutton is clicked.

  • set the "outer-outer distance (Z2)" entry to sensitive.
  • set the "center-center distance (C2)" entry to insensitive.
  • set the "inner-inner distance (G2)" entry to insensitive.

Parameters: *togglebutton is the caller widget.

Parameters: user_data.

Returns: none.

Definition at line 1372 of file gtk/callbacks.c.

References c2_state, g2_state, and z2_state.


Variable Documentation

gboolean fpw_file_saved = FALSE

Keep track whether the FootPrintWizard file is saved, and thus has a valid filename.

Definition at line 53 of file gtk/callbacks.c.

Keep track whether the main window title has an asterisk between brackets or not.

Definition at line 50 of file gtk/callbacks.c.

gchar* temp_dir = NULL

Temporary directory from the GUI filechooser.

Definition at line 56 of file gtk/callbacks.c.

gchar* work_dir = NULL

Working directory.

Definition at line 58 of file gtk/callbacks.c.