Index: act.c =================================================================== --- act.c (revision 29928) +++ act.c (revision 29929) @@ -80,73 +80,6 @@ return pcb_gui_act_zoom(res, argc, argv); } -const char pcb_acts_Pan[] = "Pan(Mode)"; -const char pcb_acth_Pan[] = "Start or stop panning (Mode = 1 to start, 0 to stop)\n"; -/* DOC: pan.html */ -fgw_error_t pcb_act_Pan(fgw_arg_t *res, int argc, fgw_arg_t *argv) -{ - int mode; - pcb_coord_t x, y; - - PCB_GUI_NOGUI(); - - pcb_hid_get_coords("Click on a place to pan", &x, &y, 0); - - PCB_ACT_CONVARG(1, FGW_INT, Pan, mode = argv[1].val.nat_int); - pcb_gui->pan_mode(pcb_gui, x, y, mode); - - PCB_ACT_IRES(0); - return 0; -} - -const char pcb_acts_Center[] = "Center()\n"; -const char pcb_acth_Center[] = "Moves the pointer to the center of the window."; -/* DOC: center.html */ -fgw_error_t pcb_act_Center(fgw_arg_t *res, int argc, fgw_arg_t *argv) -{ - pcb_coord_t x, y; - PCB_GUI_NOGUI(); - - pcb_hid_get_coords("Click to center", &x, &y, 0); - - if (argc != 1) - PCB_ACT_FAIL(Center); - - pcb_gui->pan(pcb_gui, x, y, 0); - - PCB_ACT_IRES(0); - return 0; -} - -const char pcb_acts_Scroll[] = "Scroll(up|down|left|right, [pixels])"; -const char pcb_acth_Scroll[] = "Scroll the viewport."; -/* DOC: scroll.html */ -fgw_error_t pcb_act_Scroll(fgw_arg_t *res, int argc, fgw_arg_t *argv) -{ - const char *op; - double dx = 0.0, dy = 0.0, pixels = 100.0; - - PCB_ACT_CONVARG(1, FGW_STR, Scroll, op = argv[1].val.str); - PCB_ACT_MAY_CONVARG(2, FGW_DOUBLE, Scroll, pixels = argv[2].val.nat_double); - - if (pcb_strcasecmp(op, "up") == 0) - dy = -pcb_gui->coord_per_pix * pixels; - else if (pcb_strcasecmp(op, "down") == 0) - dy = pcb_gui->coord_per_pix * pixels; - else if (pcb_strcasecmp(op, "right") == 0) - dx = pcb_gui->coord_per_pix * pixels; - else if (pcb_strcasecmp(op, "left") == 0) - dx = -pcb_gui->coord_per_pix * pixels; - else - PCB_ACT_FAIL(Scroll); - - pcb_gui->pan(pcb_gui, dx, dy, 1); - - PCB_ACT_IRES(0); - return 0; -} - - const char pcb_acts_SwapSides[] = "SwapSides(|v|h|r, [S])"; const char pcb_acth_SwapSides[] = "Swaps the side of the board you're looking at."; /* DOC: swapsides.html */ Index: act.h =================================================================== --- act.h (revision 29928) +++ act.h (revision 29929) @@ -2,18 +2,6 @@ extern const char pcb_acth_Zoom[]; fgw_error_t pcb_act_Zoom(fgw_arg_t *res, int argc, fgw_arg_t *argv); -extern const char pcb_acts_Pan[]; -extern const char pcb_acth_Pan[]; -fgw_error_t pcb_act_Pan(fgw_arg_t *res, int argc, fgw_arg_t *argv); - -extern const char pcb_acts_Center[]; -extern const char pcb_acth_Center[]; -fgw_error_t pcb_act_Center(fgw_arg_t *res, int argc, fgw_arg_t *argv); - -extern const char pcb_acts_Scroll[]; -extern const char pcb_acth_Scroll[]; -fgw_error_t pcb_act_Scroll(fgw_arg_t *res, int argc, fgw_arg_t *argv); - extern const char pcb_acts_SwapSides[]; extern const char pcb_acth_SwapSides[]; fgw_error_t pcb_act_SwapSides(fgw_arg_t *res, int argc, fgw_arg_t *argv); Index: lib_hid_pcbui.c =================================================================== --- lib_hid_pcbui.c (revision 29928) +++ lib_hid_pcbui.c (revision 29929) @@ -66,9 +66,6 @@ static pcb_action_t act_action_list[] = { {"Zoom", pcb_act_Zoom, pcb_acth_Zoom, pcb_acts_Zoom}, {"ZoomTo", pcb_act_Zoom, pcb_acth_Zoom, pcb_acts_Zoom}, - {"Pan", pcb_act_Pan, pcb_acth_Pan, pcb_acts_Pan}, - {"Center", pcb_act_Center, pcb_acth_Center, pcb_acts_Center}, - {"Scroll", pcb_act_Scroll, pcb_acth_Scroll, pcb_acts_Scroll}, {"SwapSides", pcb_act_SwapSides, pcb_acth_SwapSides, pcb_acts_SwapSides}, {"Command", pcb_act_Command, pcb_acth_Command, pcb_acts_Command}, {"Popup", pcb_act_Popup, pcb_acth_Popup, pcb_acts_Popup},