pcb 4.1.1
An interactive printed circuit board layout editor.

HID_Action Struct Reference

This is used to register the action callbacks (for menus and whatnot). More...

#include <hid.h>

Data Fields

char * name
const char * need_coord_msg
int(* trigger_cb )(int argc, char **argv, Coord x, Coord y)
const char * description
const char * syntax

Detailed Description

This is used to register the action callbacks (for menus and whatnot).

HID assumes the following actions are available for its use:

  • SaveAs(filename);
  • Quit();

Definition at line 124 of file hid.h.


Field Documentation

Short description that sometimes accompanies the name.

Definition at line 138 of file hid.h.

Referenced by dump_actions().

This is matched against action names in the GUI configuration

Definition at line 127 of file hid.h.

Referenced by action_search_compar(), and action_sort_compar().

If this string is non-NULL, the action needs to know the X,Y coordinates to act on, and this string may be used to prompt the user to select a coordinate. If NULL, the coordinates may be 0,0 if none are known.

Definition at line 129 of file hid.h.

Referenced by hid_actionv().

const char* HID_Action::syntax

Full allowed syntax; use \n to separate lines.

Definition at line 140 of file hid.h.

Referenced by dump_actions(), and print_actions().

int(* HID_Action::trigger_cb)(int argc, char **argv, Coord x, Coord y)

Called when the action is triggered. If this function returns non-zero, no further actions will be invoked for this key/mouse event.

Definition at line 133 of file hid.h.

Referenced by hid_actionv().


The documentation for this struct was generated from the following file: