gerbv  2.10.1-dev~93f1b5
callbacks.c File Reference

Go to the source code of this file.

Functions

static gint callbacks_get_selected_row_index (void)
 
void callbacks_new_project_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void open_project (char *project_filename)
 
void open_files (GSList *filenames)
 
void callbacks_open_activate (GtkMenuItem *menuitem, gpointer user_data)
 
gerbv_image_tmerge_images (int type)
 
void callbacks_toggle_layer_visibility_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void callbacks_analyze_active_gerbers_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void callbacks_analyze_active_drill_activate (GtkMenuItem *menuitem, gpointer user_data)
 
gboolean callbacks_quit_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void callbacks_about_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void callbacks_bugs_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void callbacks_align_files_from_sel_clicked (GtkMenuItem *menu_item, gpointer user_data)
 
void callbacks_update_statusbar (void)
 

Detailed Description

Callback functions for the GUI widgets.

Definition in file callbacks.c.

Function Documentation

◆ callbacks_about_activate()

void callbacks_about_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

The help -> about menu item was selected.

Show the about dialog.

Definition at line 1647 of file callbacks.c.

◆ callbacks_align_files_from_sel_clicked()

void callbacks_align_files_from_sel_clicked ( GtkMenuItem *  menu_item,
gpointer  user_data 
)

The edit -> align layers menu item was selected.

Align first to second or second to first layers by selected elements

Definition at line 3335 of file callbacks.c.

◆ callbacks_analyze_active_drill_activate()

void callbacks_analyze_active_drill_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

The analyze -> analyze drill file menu item was selected.

Complie statistics on all open drill layers and then display them.

Definition at line 1324 of file callbacks.c.

References generate_drill_analysis().

◆ callbacks_analyze_active_gerbers_activate()

void callbacks_analyze_active_gerbers_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

The analyze -> analyze Gerbers menu item was selected.

Compile statistics on all open Gerber layers and then display them.

Definition at line 1017 of file callbacks.c.

References generate_gerber_analysis().

◆ callbacks_bugs_activate()

void callbacks_bugs_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

The help -> bugs menu item was selected.

Show the known bugs window

Definition at line 1736 of file callbacks.c.

◆ callbacks_new_project_activate()

void callbacks_new_project_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

The file -> new menu item was selected.

Create new project.

Definition at line 147 of file callbacks.c.

References interface_get_alert_dialog_response(), gerbv_project_t::last_loaded, and mainProject.

◆ callbacks_open_activate()

void callbacks_open_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

The file -> open action was selected.

Open a layer (or layers) or a project file.

Definition at line 327 of file callbacks.c.

◆ callbacks_quit_activate()

gboolean callbacks_quit_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

The file -> quit menu item was selected or the user requested the main window to be closed by other means.

Check that all changes have been saved, and then quit.

Definition at line 1583 of file callbacks.c.

References gerbv_project_t::file, interface_get_alert_dialog_response(), gerbv_project_t::last_loaded, gerbv_fileinfo_t::layer_dirty, and mainProject.

◆ callbacks_toggle_layer_visibility_activate()

void callbacks_toggle_layer_visibility_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

View/"Toggle visibility layer X" or Current layer/"Toggle visibility" menu item was activated.

Set the isVisible flag on file X and update the treeview and rendering.

Definition at line 940 of file callbacks.c.

◆ callbacks_update_statusbar()

void callbacks_update_statusbar ( void  )

Displays additional information in the statusbar.

The Statusbar is divided into three sections:
statusbar.coordstr for coords
statusbar.diststr for displaying measured distances or the designator (right click on a graphically marked and also actively selected part)
statusbar.msg for e.g. showing progress of actions

Definition at line 3531 of file callbacks.c.

◆ merge_images()

gerbv_image_t* merge_images ( int  type)

Go through each file and look at visibility, then type.

Make sure we have at least 2 files.

Definition at line 401 of file callbacks.c.

◆ open_files()

void open_files ( GSList *  filenames)

File -> open action requested or file drop event happened.

Open a layer (or layers) or one Gerbv project from the files. This function will show a question if the layer to be opened is already open.

Definition at line 214 of file callbacks.c.

References gerbv_render_zoom_to_fit_display(), mainProject, open_project(), and project_is_gerbv_project().

◆ open_project()

void open_project ( char *  project_filename)

The file -> open menu item was selected.

Open a project file.

Definition at line 180 of file callbacks.c.

References interface_get_alert_dialog_response(), gerbv_project_t::last_loaded, mainProject, and gerbv_project_t::path.

Referenced by open_files().