hid package

The hid package has two purposes:

Building a custom dialog box

First hid_create() needs to be called. It returns a new hid_t, which is an opaque structure for the package that is used to describe attributes of an attribute dialog or an exporter hid. Attributes are added using hid_add_attribute(), which returns an unique ID of the attribute. The attribute ID can be used later for querying attribute value set by the user using hid_get_attribute().

The process of building a dialog box is closed by a call to

Registering an exporter

Function hid_register() registers the hid as an exporter. Should be called after all attributes have been added using hid_add_attribute(). The export is coordinated by pcb core; when the user request an export using the exporter, a series of events are delivered to the script:
  1. envelope events to set up exporting
  2. many draw events to actually export the objects
  3. an envelope event to finish exporting

Envelope: events generated before or after exporting

Drawing: events generated during exporting

Note: there may be multiple gcs (graphic contexts), each having its own color, line properties, xor drawing and faded state. Graphic contexts are created and destroyed by the following events: Gc properties are changed by the following events: Finally, the actual drawing operations: