pcb 4.1.1
An interactive printed circuit board layout editor.

gtkhid-main.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include "action.h"
#include "crosshair.h"
#include "error.h"
#include "../hidint.h"
#include "gui.h"
#include "hid/common/hidnogui.h"
#include "hid/common/draw_helpers.h"
#include "pcb-printf.h"
Include dependency graph for gtkhid-main.c:

Go to the source code of this file.

Data Structures

struct  GuiTimer
struct  GuiWatch
struct  BlockHookSource
struct  progress_dialog
struct  AttrRow

Defines

#define ALLOW_ZOOM_OUT_BY   10

Functions

static void pan_common (GHidPort *port)
static void ghid_pan_view_abs (Coord pcb_x, Coord pcb_y, int widget_x, int widget_y)
void ghid_pan_view_rel (Coord dx, Coord dy)
static void ghid_zoom_view_abs (Coord center_x, Coord center_y, double new_zoom)
static void ghid_zoom_view_rel (Coord center_x, Coord center_y, double factor)
static void ghid_zoom_view_fit (void)
static void ghid_flip_view (Coord center_x, Coord center_y, bool flip_x, bool flip_y)
static int Zoom (int argc, char **argv, Coord x, Coord y)
void ghid_calibrate (double xval, double yval)
void ghid_notify_gui_is_up ()
int ghid_shift_is_pressed ()
int ghid_control_is_pressed ()
int ghid_mod1_is_pressed ()
void ghid_set_crosshair (int x, int y, int action)
static gboolean ghid_timer (GuiTimer *timer)
hidval ghid_add_timer (void(*func)(hidval user_data), unsigned long milliseconds, hidval user_data)
void ghid_stop_timer (hidval timer)
static gboolean ghid_watch (GIOChannel *source, GIOCondition condition, gpointer data)
hidval ghid_watch_file (int fd, unsigned int condition, void(*func)(hidval watch, int fd, unsigned int condition, hidval user_data), hidval user_data)
void ghid_unwatch_file (hidval data)
static gboolean ghid_block_hook_prepare (GSource *source, gint *timeout)
static gboolean ghid_block_hook_check (GSource *source)
static gboolean ghid_block_hook_dispatch (GSource *source, GSourceFunc callback, gpointer user_data)
static hidval ghid_add_block_hook (void(*func)(hidval data), hidval user_data)
static void ghid_stop_block_hook (hidval mlpoll)
int ghid_confirm_dialog (char *msg,...)
int ghid_close_confirm_dialog ()
void ghid_report_dialog (char *title, char *msg)
char * ghid_prompt_for (const char *msg, const char *default_string)
char * ghid_fileselect (const char *title, const char *descr, char *default_file, char *default_ext, const char *history_tag, int flags)
void ghid_show_item (void *item)
void ghid_beep ()
static void run_response_handler (GtkDialog *dialog, gint response_id, gpointer data)
static gint run_delete_handler (GtkDialog *dialog, GdkEventAny *event, gpointer data)
static void run_destroy_handler (GtkDialog *dialog, gpointer data)
static struct progress_dialogmake_progress_dialog (void)
static void destroy_progress_dialog (struct progress_dialog *pd)
static void handle_progress_dialog_events (struct progress_dialog *pd)
static int ghid_progress (int so_far, int total, const char *message)
static void attributes_delete_callback (GtkWidget *w, void *v)
static void ghid_attr_set_table_size ()
static void ghid_attributes_need_rows (int new_max)
static void ghid_attributes_revert ()
static void ghid_attributes (char *owner, AttributeListType *attrs)
HID_Attributeghid_get_export_options (int *)
static int About (int argc, char **argv, Coord x, Coord y)
static int GetXY (int argc, char **argv, Coord x, Coord y)
 Get a coordinate to be used by subsequent actions.
static int PointCursor (int argc, char **argv, Coord x, Coord y)
static int RouteStylesChanged (int argc, char **argv, Coord x, Coord y)
int PCBChanged (int argc, char **argv, Coord x, Coord y)
static int LayerGroupsChanged (int argc, char **argv, Coord x, Coord y)
static int LibraryChanged (int argc, char **argv, Coord x, Coord y)
static int Command (int argc, char **argv, Coord x, Coord y)
static int Load (int argc, char **argv, Coord x, Coord y)
static int Save (int argc, char **argv, Coord x, Coord y)
static int SwapSides (int argc, char **argv, Coord x, Coord y)
static int Print (int argc, char **argv, Coord x, Coord y)
static int PrintCalibrate (int argc, char **argv, Coord x, Coord y)
static int Export (int argc, char **argv, Coord x, Coord y)
static int Benchmark (int argc, char **argv, Coord x, Coord y)
static int Center (int argc, char **argv, Coord pcb_x, Coord pcb_y)
static int CursorAction (int argc, char **argv, Coord x, Coord y)
static int DoWindows (int argc, char **argv, Coord x, Coord y)
static int SetUnits (int argc, char **argv, Coord x, Coord y)
static int ScrollAction (int argc, char **argv, Coord x, Coord y)
static int PanAction (int argc, char **argv, Coord x, Coord y)
static int Popup (int argc, char **argv, Coord x, Coord y)
static int ImportGUI (int argc, char **argv, Coord x, Coord y)
static int Busy (int argc, char **argv, Coord x, Coord y)
 REGISTER_ACTIONS (ghid_main_action_list)
static int flag_flipy (void *data)
 REGISTER_FLAGS (ghid_main_flag_list)

Variables

static const char zoom_syntax [] = "Zoom(factor)"
static const char zoom_help []
static GSourceFuncs ghid_block_hook_funcs
static AttrRowattr_row = 0
static int attr_num_rows = 0
static int attr_max_rows = 0
static AttributeListTypeattributes_list
static GtkWidget * attributes_dialog
static GtkWidget * attr_table
HID_DRC_GUI ghid_drc_gui
static const char about_syntax [] = "About()"
static const char about_help []
static const char getxy_syntax [] = "GetXY()"
static const char getxy_help []
static const char command_syntax [] = "Command()"
static const char command_help [] = "Displays the command line input window."
static const char load_syntax [] = "Load(Layout|LayoutToBuffer|ElementToBuffer|Netlist|Revert,filename)"
static const char load_help []
static const char save_syntax [] = "Save(PasteBuffer)"
static const char save_help []
static const char swapsides_syntax [] = "SwapSides(|v|h|r)"
static const char swapsides_help []
static const char print_syntax [] = "Print()"
static const char print_help []
static HID_Attribute printer_calibrate_attrs []
static HID_Attr_Val printer_calibrate_values [3]
static const char printcalibrate_syntax [] = "PrintCalibrate()"
static const char printcalibrate_help []
static const char export_syntax [] = "Export()\n"
static const char export_help []
static const char benchmark_syntax [] = "Benchmark()\n"
static const char benchmark_help []
static const char center_syntax [] = "Center()\n"
static const char center_help []
static const char cursor_syntax [] = "Cursor(Type,DeltaUp,DeltaRight,Units)"
static const char cursor_help []
static const char dowindows_syntax [] = "DoWindows(Layout|Library|Log|Netlist|Preferences|DRC)"
static const char dowindows_help []
static const char setunits_syntax [] = "SetUnits(mm|mil)"
static const char setunits_help []
static const char scroll_syntax [] = "Scroll(up|down|left|right, [div])"
static const char scroll_help []
static const char pan_syntax [] = "Pan([thumb], Mode)"
static const char pan_help []
static const char popup_syntax [] = "Popup(MenuName, [Button])"
static const char popup_help []
static const char importgui_syntax [] = "ImportGUI()"
static const char importgui_help []
static const char busy_syntax [] = "Busy()\n"
static const char busy_help []
HID_Action ghid_main_action_list []
HID_Flag ghid_main_flag_list []

Define Documentation

#define ALLOW_ZOOM_OUT_BY   10

Definition at line 70 of file gtkhid-main.c.

Referenced by ghid_zoom_view_abs().


Function Documentation

static int About ( int  argc,
char **  argv,
Coord  x,
Coord  y 
) [static]

Definition at line 1122 of file gtkhid-main.c.

References ghid_dialog_about().

Here is the call graph for this function:

static void attributes_delete_callback ( GtkWidget *  w,
void *  v 
) [static]

Definition at line 977 of file gtkhid-main.c.

References ghid_attr_set_table_size(), and n.

Referenced by ghid_attributes_need_rows().

Here is the call graph for this function:

static int Benchmark ( int  argc,
char **  argv,
Coord  x,
Coord  y 
) [static]

Definition at line 1696 of file gtkhid-main.c.

References _, display, GHidPort::drawable, GHidPort::drawing_area, FALSE, ghid_invalidate_all(), and gport.

Here is the call graph for this function:

static int Busy ( int  argc,
char **  argv,
Coord  x,
Coord  y 
) [static]

Definition at line 2195 of file gtkhid-main.c.

References ghid_watch_cursor().

Here is the call graph for this function:

static int Center ( int  argc,
char **  argv,
Coord  pcb_x,
Coord  pcb_y 
) [static]

Definition at line 1737 of file gtkhid-main.c.

References AFAIL, display, GHidPort::drawing_area, ghid_pan_view_abs(), ghid_pcb_to_event_coords(), gport, GHidPort::height, screen, and GHidPort::width.

Here is the call graph for this function:

static int Command ( int  argc,
char **  argv,
Coord  x,
Coord  y 
) [static]

Definition at line 1306 of file gtkhid-main.c.

References ghid_handle_user_command(), and TRUE.

Here is the call graph for this function:

static int DoWindows ( int  argc,
char **  argv,
Coord  x,
Coord  y 
) [static]

Definition at line 1899 of file gtkhid-main.c.

References AFAIL, ghid_config_window_show(), ghid_drc_window_show(), ghid_library_window_show(), ghid_log_window_show(), ghid_netlist_window_show(), gport, and TRUE.

Here is the call graph for this function:

static int Export ( int  argc,
char **  argv,
Coord  x,
Coord  y 
) [static]

Definition at line 1663 of file gtkhid-main.c.

References _, PCBType::Data, ghid_dialog_export(), gui, IsDataEmpty(), hid_st::log, and PCB.

Here is the call graph for this function:

static int flag_flipy ( void *  data) [static]

Definition at line 2239 of file gtkhid-main.c.

References view_data::flip_y, gport, and GHidPort::view.

static int GetXY ( int  argc,
char **  argv,
Coord  x,
Coord  y 
) [static]

Get a coordinate to be used by subsequent actions.

Any action that always requires a point should have it's need_coord_msg field set to a message to be used when prompting the user for that point. A call to this function isn't required to obtain a coordinate for these actions when they occur in isolation, because hid_actionv() arranges to call gui->get_coords() on their behalf anyway. Actions for which a coordinate argument is optional, required only conditionally depending on other arguments, or not used at all will have their need_coord_msg field set to NULL.

GetXY() exists *only* to request a point for actions that don't always use one, or for interface elements that execute sequences of actions some of which can or must use a point. In the former case there would not be a correct coordinate available without a prior GetXY() call. In the latter case an action which only conditionally requires a point might occur earlier in the sequence than any that require a point, or the first action with a non-NULL need_coord_msg field might contain a message inappropriate for the group results of the operation, so GetXY() should be used at the start of the sequence. It works by setting the effective global point value to be used by the rest of the action sequence.

It isn't possible to use multiple GetXY() calls in a single action sequence to obtain distinct points, because all subsequent calls after the first will end up getting the first value.

Definition at line 1170 of file gtkhid-main.c.

References hid_st::get_coords, and gui.

static hidval ghid_add_block_hook ( void(*)(hidval data)  func,
hidval  user_data 
) [static]

Definition at line 545 of file gtkhid-main.c.

References BlockHookSource::func, hidval::ptr, and BlockHookSource::user_data.

Referenced by REGISTER_FLAGS().

hidval ghid_add_timer ( void(*)(hidval user_data)  func,
unsigned long  milliseconds,
hidval  user_data 
)

Definition at line 406 of file gtkhid-main.c.

References GuiTimer::func, ghid_timer(), GuiTimer::id, hidval::ptr, and GuiTimer::user_data.

Referenced by REGISTER_FLAGS().

Here is the call graph for this function:

static void ghid_attr_set_table_size ( ) [static]
static void ghid_attributes ( char *  owner,
AttributeListType attrs 
) [static]
static void ghid_attributes_need_rows ( int  new_max) [static]

Definition at line 896 of file gtkhid-main.c.

References _, attr_max_rows, attributes_delete_callback(), AttrRow::del, malloc(), realloc(), AttrRow::w_name, and AttrRow::w_value.

Referenced by ghid_attributes(), and ghid_attributes_revert().

Here is the call graph for this function:

static void ghid_attributes_revert ( ) [static]

Definition at line 949 of file gtkhid-main.c.

References ghid_attr_set_table_size(), ghid_attributes_need_rows(), AttributeListType::List, AttributeType::name, AttributeListType::Number, and AttributeType::value.

Referenced by ghid_attributes().

Here is the call graph for this function:

void ghid_beep ( )

Definition at line 679 of file gtkhid-main.c.

Referenced by REGISTER_FLAGS().

static gboolean ghid_block_hook_check ( GSource *  source) [static]

Definition at line 531 of file gtkhid-main.c.

References FALSE.

static gboolean ghid_block_hook_dispatch ( GSource *  source,
GSourceFunc  callback,
gpointer  user_data 
) [static]

Definition at line 537 of file gtkhid-main.c.

References FALSE.

static gboolean ghid_block_hook_prepare ( GSource *  source,
gint *  timeout 
) [static]

Definition at line 522 of file gtkhid-main.c.

References FALSE.

void ghid_calibrate ( double  xval,
double  yval 
)

Definition at line 225 of file gtkhid-main.c.

References _.

Referenced by REGISTER_FLAGS().

int ghid_close_confirm_dialog ( )

Definition at line 618 of file gtkhid-main.c.

References ghid_dialog_close_confirm(), GUI_DIALOG_CLOSE_CONFIRM_CANCEL, GUI_DIALOG_CLOSE_CONFIRM_NOSAVE, GUI_DIALOG_CLOSE_CONFIRM_SAVE, and hid_actionl().

Referenced by REGISTER_FLAGS().

Here is the call graph for this function:

int ghid_confirm_dialog ( char *  msg,
  ... 
)

Definition at line 570 of file gtkhid-main.c.

References _, ghid_port, GHidPort::top_window, x, and y.

Referenced by REGISTER_FLAGS().

int ghid_control_is_pressed ( void  )

Definition at line 251 of file gtkhid-main.c.

References GHidPort::drawing_area, FALSE, ghid_port, ghidgui, GhidGui::is_up, and TRUE.

Referenced by REGISTER_FLAGS().

char* ghid_fileselect ( const char *  title,
const char *  descr,
char *  default_file,
char *  default_ext,
const char *  history_tag,
int  flags 
)

Definition at line 661 of file gtkhid-main.c.

Referenced by REGISTER_FLAGS().

static void ghid_flip_view ( Coord  center_x,
Coord  center_y,
bool  flip_x,
bool  flip_y 
) [static]

Definition at line 120 of file gtkhid-main.c.

References flip_x, view_data::flip_x, flip_y, view_data::flip_y, ghid_invalidate_all(), ghid_pan_view_abs(), ghid_pcb_to_event_coords(), gport, and GHidPort::view.

Referenced by SwapSides().

Here is the call graph for this function:

HID_Attribute* ghid_get_export_options ( int *  )

Referenced by REGISTER_FLAGS().

int ghid_mod1_is_pressed ( void  )

Definition at line 265 of file gtkhid-main.c.

References GHidPort::drawing_area, FALSE, ghid_port, ghidgui, GhidGui::is_up, and TRUE.

Referenced by REGISTER_FLAGS().

void ghid_notify_gui_is_up ( void  )

Definition at line 231 of file gtkhid-main.c.

References ghidgui, and GhidGui::is_up.

Referenced by ghid_do_export().

static void ghid_pan_view_abs ( Coord  pcb_x,
Coord  pcb_y,
int  widget_x,
int  widget_y 
) [static]

Definition at line 45 of file gtkhid-main.c.

References view_data::coord_per_px, gport, pan_common(), SIDE_X, SIDE_Y, GHidPort::view, view_data::x0, and view_data::y0.

Referenced by Center(), ghid_flip_view(), ghid_set_crosshair(), and ghid_zoom_view_fit().

Here is the call graph for this function:

void ghid_pan_view_rel ( Coord  dx,
Coord  dy 
)

Definition at line 54 of file gtkhid-main.c.

References gport, pan_common(), GHidPort::view, view_data::x0, and view_data::y0.

Referenced by ghid_port_window_motion_cb(), and ScrollAction().

Here is the call graph for this function:

static int ghid_progress ( int  so_far,
int  total,
const char *  message 
) [static]
char* ghid_prompt_for ( const char *  msg,
const char *  default_string 
)

Definition at line 650 of file gtkhid-main.c.

References ghid_dialog_input().

Referenced by REGISTER_FLAGS().

Here is the call graph for this function:

void ghid_report_dialog ( char *  title,
char *  msg 
)

Definition at line 644 of file gtkhid-main.c.

References ghid_dialog_report().

Referenced by REGISTER_FLAGS().

Here is the call graph for this function:

int ghid_shift_is_pressed ( void  )

Definition at line 237 of file gtkhid-main.c.

References GHidPort::drawing_area, FALSE, ghid_port, ghidgui, GhidGui::is_up, and TRUE.

Referenced by ghid_mode_cursor(), and REGISTER_FLAGS().

void ghid_show_item ( void *  item)

Definition at line 673 of file gtkhid-main.c.

References ghid_pinout_window_show(), and ghid_port.

Referenced by REGISTER_FLAGS().

Here is the call graph for this function:

static void ghid_stop_block_hook ( hidval  mlpoll) [static]

Definition at line 563 of file gtkhid-main.c.

References hidval::ptr.

Referenced by REGISTER_FLAGS().

void ghid_stop_timer ( hidval  timer)

Definition at line 420 of file gtkhid-main.c.

References hidval::ptr, and ptr.

Referenced by REGISTER_FLAGS().

static gboolean ghid_timer ( GuiTimer timer) [static]

Definition at line 398 of file gtkhid-main.c.

References FALSE, GuiTimer::func, ghid_mode_cursor(), SettingType::Mode, Settings, and GuiTimer::user_data.

Referenced by ghid_add_timer().

Here is the call graph for this function:

void ghid_unwatch_file ( hidval  data)

Definition at line 491 of file gtkhid-main.c.

References GuiWatch::channel, hidval::ptr, and TRUE.

Referenced by REGISTER_FLAGS().

static gboolean ghid_watch ( GIOChannel *  source,
GIOCondition  condition,
gpointer  data 
) [static]
hidval ghid_watch_file ( int  fd,
unsigned int  condition,
void(*)(hidval watch, int fd, unsigned int condition, hidval user_data)  func,
hidval  user_data 
)
static void ghid_zoom_view_abs ( Coord  center_x,
Coord  center_y,
double  new_zoom 
) [static]
static void ghid_zoom_view_fit ( void  ) [static]

Definition at line 111 of file gtkhid-main.c.

References ghid_pan_view_abs(), ghid_zoom_view_abs(), gport, GHidPort::height, MAX, PCBType::MaxHeight, PCBType::MaxWidth, PCB, SIDE_X, SIDE_Y, and GHidPort::width.

Referenced by PCBChanged(), and Zoom().

Here is the call graph for this function:

static void ghid_zoom_view_rel ( Coord  center_x,
Coord  center_y,
double  factor 
) [static]

Definition at line 105 of file gtkhid-main.c.

References view_data::coord_per_px, ghid_zoom_view_abs(), gport, and GHidPort::view.

Referenced by Zoom().

Here is the call graph for this function:

static void handle_progress_dialog_events ( struct progress_dialog pd) [static]

Definition at line 817 of file gtkhid-main.c.

References FALSE, and progress_dialog::loop.

Referenced by ghid_progress().

static int ImportGUI ( int  argc,
char **  argv,
Coord  x,
Coord  y 
) [static]

Definition at line 2128 of file gtkhid-main.c.

References _, AttributePut, SettingType::FilePath, ghid_dialog_file_select_multiple(), hid_action(), PCB, and Settings.

Here is the call graph for this function:

static int LayerGroupsChanged ( int  argc,
char **  argv,
Coord  x,
Coord  y 
) [static]

Definition at line 1239 of file gtkhid-main.c.

References _.

static int LibraryChanged ( int  argc,
char **  argv,
Coord  x,
Coord  y 
) [static]

Definition at line 1248 of file gtkhid-main.c.

static int Load ( int  argc,
char **  argv,
Coord  x,
Coord  y 
) [static]

Definition at line 1335 of file gtkhid-main.c.

References _, __FUNCTION__, SettingType::FilePath, ghid_dialog_file_select_open(), hid_actionl(), hid_actionv(), SettingType::LibraryTree, Settings, and SettingType::verbose.

Here is the call graph for this function:

static int PanAction ( int  argc,
char **  argv,
Coord  x,
Coord  y 
) [static]

Definition at line 2047 of file gtkhid-main.c.

References _, AFAIL, ghidgui, gport, Message(), and GHidPort::panning.

Here is the call graph for this function:

static int PointCursor ( int  argc,
char **  argv,
Coord  x,
Coord  y 
) [static]

Definition at line 1179 of file gtkhid-main.c.

References ghid_mode_cursor(), ghid_point_cursor(), ghidgui, SettingType::Mode, and Settings.

Here is the call graph for this function:

static int Popup ( int  argc,
char **  argv,
Coord  x,
Coord  y 
) [static]

Definition at line 2091 of file gtkhid-main.c.

References _, AFAIL, GHidPort::drawing_area, GHID_MAIN_MENU, ghid_main_menu_get_popup(), ghid_port, ghidgui, GhidGui::in_popup, GhidGui::menu_bar, Message(), and TRUE.

Here is the call graph for this function:

static int Print ( int  argc,
char **  argv,
Coord  x,
Coord  y 
) [static]

Definition at line 1572 of file gtkhid-main.c.

References _, PCBType::Data, ghid_dialog_print(), gui, hid_enumerate(), IsDataEmpty(), hid_st::log, and PCB.

Here is the call graph for this function:

static int PrintCalibrate ( int  argc,
char **  argv,
Coord  x,
Coord  y 
) [static]

Definition at line 1630 of file gtkhid-main.c.

References _, hid_st::attribute_dialog, hid_st::calibrate, gui, hid_find_printer(), and printer_calibrate_attrs.

Here is the call graph for this function:

REGISTER_ACTIONS ( ghid_main_action_list  )

Definition at line 2229 of file gtkhid-main.c.

References view_data::flip_x, gport, and GHidPort::view.

REGISTER_FLAGS ( ghid_main_flag_list  )

Definition at line 2249 of file gtkhid-main.c.

References bindir, common_draw_helpers_init(), common_gui_draw_pcb_polygon(), common_nogui_init(), hid_draw_st::destroy_gc, hid_draw_st::draw_arc, hid_draw_st::draw_grid, hid_draw_st::draw_line, hid_draw_st::draw_pcb_polygon, hid_draw_st::draw_rect, hid_draw_st::fill_circle, hid_draw_st::fill_polygon, hid_draw_st::fill_rect, ghid_add_block_hook(), ghid_add_timer(), ghid_attribute_dialog(), ghid_attributes(), ghid_beep(), ghid_calibrate(), ghid_close_confirm_dialog(), ghid_confirm_dialog(), ghid_control_is_pressed(), ghid_destroy_gc(), ghid_do_export(), ghid_draw_arc(), ghid_draw_grid(), ghid_draw_line(), ghid_draw_rect(), ghid_drc_gui, ghid_fileselect(), ghid_fill_circle(), ghid_fill_polygon(), ghid_fill_rect(), ghid_finish_debug_draw(), ghid_flush_debug_draw(), ghid_get_coords(), ghid_get_export_options(), ghid_graphics, ghid_hid, ghid_invalidate_all(), ghid_invalidate_lr(), ghid_log(), ghid_logv(), ghid_make_gc(), ghid_mod1_is_pressed(), ghid_notify_crosshair_change(), ghid_notify_filename_changed(), ghid_notify_mark_change(), ghid_notify_save_pcb(), ghid_parse_arguments(), ghid_progress(), ghid_prompt_for(), ghid_report_dialog(), ghid_request_debug_draw(), ghid_set_color(), ghid_set_crosshair(), ghid_set_draw_xor(), ghid_set_layer(), ghid_set_line_cap(), ghid_set_line_width(), ghid_shift_is_pressed(), ghid_show_item(), ghid_stop_block_hook(), ghid_stop_timer(), ghid_unwatch_file(), ghid_use_mask(), ghid_watch_file(), hid_register_hid(), hid_draw_st::make_gc, malloc(), hid_draw_st::set_color, hid_draw_st::set_draw_xor, hid_draw_st::set_line_cap, hid_draw_st::set_line_width, TRUE, and hid_draw_st::use_mask.

static int RouteStylesChanged ( int  argc,
char **  argv,
Coord  x,
Coord  y 
) [static]
static gint run_delete_handler ( GtkDialog *  dialog,
GdkEventAny *  event,
gpointer  data 
) [static]

Definition at line 711 of file gtkhid-main.c.

References progress_dialog::response_id, and TRUE.

Referenced by make_progress_dialog().

static void run_destroy_handler ( GtkDialog *  dialog,
gpointer  data 
) [static]

Definition at line 723 of file gtkhid-main.c.

References progress_dialog::destroyed, and TRUE.

Referenced by make_progress_dialog().

static void run_response_handler ( GtkDialog *  dialog,
gint  response_id,
gpointer  data 
) [static]

Definition at line 701 of file gtkhid-main.c.

References progress_dialog::response_id.

Referenced by make_progress_dialog().

static int Save ( int  argc,
char **  argv,
Coord  x,
Coord  y 
) [static]

Definition at line 1409 of file gtkhid-main.c.

References _, __FUNCTION__, PCBType::Filename, SettingType::FilePath, ghid_dialog_file_select_save(), hid_actionl(), hid_actionv(), PCB, prompt, Settings, and SettingType::verbose.

Here is the call graph for this function:

static int ScrollAction ( int  argc,
char **  argv,
Coord  x,
Coord  y 
) [static]

Definition at line 2001 of file gtkhid-main.c.

References AFAIL, ghid_pan_view_rel(), ghidgui, gport, view_data::height, GHidPort::view, and view_data::width.

Here is the call graph for this function:

static int SetUnits ( int  argc,
char **  argv,
Coord  x,
Coord  y 
) [static]
static int Zoom ( int  argc,
char **  argv,
Coord  x,
Coord  y 
) [static]

Definition at line 185 of file gtkhid-main.c.

References AFAIL, ghid_zoom_view_abs(), ghid_zoom_view_fit(), and ghid_zoom_view_rel().

Here is the call graph for this function:


Variable Documentation

const char about_help[] [static]
Initial value:
N_("Tell the user about this version of PCB.")

Definition at line 1110 of file gtkhid-main.c.

const char about_syntax[] = "About()" [static]

Definition at line 1107 of file gtkhid-main.c.

int attr_max_rows = 0 [static]

Definition at line 880 of file gtkhid-main.c.

Referenced by ghid_attributes_need_rows().

int attr_num_rows = 0 [static]

Definition at line 879 of file gtkhid-main.c.

Referenced by ghid_attributes().

AttrRow* attr_row = 0 [static]

Definition at line 878 of file gtkhid-main.c.

GtkWidget * attr_table

Definition at line 882 of file gtkhid-main.c.

GtkWidget* attributes_dialog [static]

Definition at line 882 of file gtkhid-main.c.

Definition at line 881 of file gtkhid-main.c.

const char benchmark_help[] [static]
Initial value:
N_("Report the amount of redraws per second.")

Definition at line 1682 of file gtkhid-main.c.

const char benchmark_syntax[] = "Benchmark()\n" [static]

Definition at line 1679 of file gtkhid-main.c.

const char busy_help[] [static]
Initial value:
N_("Show a busy cursor.")

Definition at line 2175 of file gtkhid-main.c.

const char busy_syntax[] = "Busy()\n" [static]

Definition at line 2172 of file gtkhid-main.c.

const char center_help[] [static]
Initial value:
N_("Moves the pointer to the center of the window.")

Definition at line 1726 of file gtkhid-main.c.

const char center_syntax[] = "Center()\n" [static]

Definition at line 1723 of file gtkhid-main.c.

const char command_help[] = "Displays the command line input window." [static]

Definition at line 1261 of file gtkhid-main.c.

const char command_syntax[] = "Command()" [static]

Definition at line 1258 of file gtkhid-main.c.

const char cursor_help[] [static]
Initial value:
N_("Move the cursor.")

Definition at line 1778 of file gtkhid-main.c.

const char cursor_syntax[] = "Cursor(Type,DeltaUp,DeltaRight,Units)" [static]

Definition at line 1775 of file gtkhid-main.c.

const char dowindows_help[] [static]
Initial value:
N_("Open various GUI windows.")

Definition at line 1862 of file gtkhid-main.c.

const char dowindows_syntax[] = "DoWindows(Layout|Library|Log|Netlist|Preferences|DRC)" [static]

Definition at line 1858 of file gtkhid-main.c.

const char export_help[] [static]
Initial value:
N_("Open the Export dialog window.")

Definition at line 1650 of file gtkhid-main.c.

const char export_syntax[] = "Export()\n" [static]

Definition at line 1647 of file gtkhid-main.c.

const char getxy_help[] [static]
Initial value:
N_("Get a coordinate.")

Definition at line 1132 of file gtkhid-main.c.

const char getxy_syntax[] = "GetXY()" [static]

Definition at line 1129 of file gtkhid-main.c.

GSourceFuncs ghid_block_hook_funcs [static]
Initial value:

Definition at line 514 of file gtkhid-main.c.

Initial value:
 {
  {"About", 0, About, about_help, about_syntax},
  {"Benchmark", 0, Benchmark, benchmark_help, benchmark_syntax},
  {"Busy", 0, Busy, busy_help, busy_syntax},
  {"Center", N_("Click on a location to center"), Center, center_help, center_syntax},
  {"Command", 0, Command, command_help, command_syntax},
  {"Cursor", 0, CursorAction, cursor_help, cursor_syntax},
  {"DoWindows", 0, DoWindows, dowindows_help, dowindows_syntax},
  {"Export", 0, Export, export_help, export_syntax},
  {"GetXY", 0, GetXY, getxy_help, getxy_syntax},
  {"ImportGUI", 0, ImportGUI, importgui_help, importgui_syntax},
  {"LayerGroupsChanged", 0, LayerGroupsChanged},
  {"LibraryChanged", 0, LibraryChanged},
  {"Load", 0, Load, load_help, load_syntax},
  {"Pan", 0, PanAction, pan_help, pan_syntax},
  {"PCBChanged", 0, PCBChanged},
  {"PointCursor", 0, PointCursor},
  {"Popup", 0, Popup, popup_help, popup_syntax},
  {"Print", 0, Print, print_help, print_syntax},
  {"PrintCalibrate", 0, PrintCalibrate, printcalibrate_help, printcalibrate_syntax},
  {"RouteStylesChanged", 0, RouteStylesChanged},
  {"Save", 0, Save, save_help, save_syntax},
  {"Scroll", N_("Click on a place to scroll"), ScrollAction, scroll_help, scroll_syntax},
  {"SetUnits", 0, SetUnits, setunits_help, setunits_syntax},
  {"SwapSides", 0, SwapSides, swapsides_help, swapsides_syntax},
  {"Zoom", N_("Click on zoom focus"), Zoom, zoom_help, zoom_syntax}
}

Definition at line 2201 of file gtkhid-main.c.

Initial value:
 {
  {"flip_x", flag_flipx, NULL},
  {"flip_y", flag_flipy, NULL}
}

Definition at line 2244 of file gtkhid-main.c.

const char importgui_help[] [static]
Initial value:
N_("Asks user which schematics to import into PCB.\n")

Definition at line 2117 of file gtkhid-main.c.

const char importgui_syntax[] = "ImportGUI()" [static]

Definition at line 2114 of file gtkhid-main.c.

const char load_help[] [static]
Initial value:
N_("Load layout data from a user-selected file.")

Definition at line 1317 of file gtkhid-main.c.

const char load_syntax[] = "Load(Layout|LayoutToBuffer|ElementToBuffer|Netlist|Revert,filename)" [static]

Definition at line 1314 of file gtkhid-main.c.

const char pan_help[] [static]
Initial value:
N_("Start or stop panning (Mode = 1 to start, 0 to stop)\n"
"Optional thumb argument is ignored for now in gtk hid.\n")

Definition at line 2035 of file gtkhid-main.c.

const char pan_syntax[] = "Pan([thumb], Mode)" [static]

Definition at line 2032 of file gtkhid-main.c.

const char popup_help[] [static]
Initial value:
N_("Bring up the popup menu specified by @code{MenuName}.\n"
"If called by a mouse event then the mouse button number\n"
"must be specified as the optional second argument.")

Definition at line 2075 of file gtkhid-main.c.

const char popup_syntax[] = "Popup(MenuName, [Button])" [static]

Definition at line 2072 of file gtkhid-main.c.

const char print_help[] [static]
Initial value:
N_("Print the layout.")

Definition at line 1561 of file gtkhid-main.c.

const char print_syntax[] = "Print()" [static]

Definition at line 1558 of file gtkhid-main.c.

const char printcalibrate_help[] [static]
Initial value:
N_("Calibrate the printer.")

Definition at line 1619 of file gtkhid-main.c.

const char printcalibrate_syntax[] = "PrintCalibrate()" [static]

Definition at line 1616 of file gtkhid-main.c.

Initial value:
 {
  {N_("Enter Values here:"), "",
   HID_Label, 0, 0, {0, 0, 0}, 0, 0},
  {N_("x-calibration"), N_("X scale for calibrating your printer"),
   HID_Real, 0.5, 25, {0, 0, 1.00}, 0, 0},
  {N_("y-calibration"), N_("Y scale for calibrating your printer"),
   HID_Real, 0.5, 25, {0, 0, 1.00}, 0, 0}
}

Definition at line 1606 of file gtkhid-main.c.

Referenced by PrintCalibrate().

Definition at line 1614 of file gtkhid-main.c.

const char save_help[] [static]
Initial value:
N_("Save layout and/or element data to a user-selected file.")

Definition at line 1395 of file gtkhid-main.c.

const char save_syntax[] = "Save(PasteBuffer)" [static]

Definition at line 1389 of file gtkhid-main.c.

const char scroll_help[] [static]
Initial value:
N_("Scroll the viewport.")

Definition at line 1985 of file gtkhid-main.c.

const char scroll_syntax[] = "Scroll(up|down|left|right, [div])" [static]

Definition at line 1982 of file gtkhid-main.c.

const char setunits_help[] [static]
Initial value:
N_("Set the default measurement units.")

Definition at line 1938 of file gtkhid-main.c.

const char setunits_syntax[] = "SetUnits(mm|mil)" [static]

Definition at line 1935 of file gtkhid-main.c.

const char swapsides_help[] [static]
Initial value:
N_("Swaps the side of the board you're looking at.")

Definition at line 1470 of file gtkhid-main.c.

const char swapsides_syntax[] = "SwapSides(|v|h|r)" [static]

Definition at line 1467 of file gtkhid-main.c.

const char zoom_help[] [static]
Initial value:
N_("Various zoom factor changes.")

Definition at line 143 of file gtkhid-main.c.

const char zoom_syntax[] = "Zoom(factor)" [static]

Definition at line 138 of file gtkhid-main.c.