Index: trunk/doc/developer/packaging.txt =================================================================== --- trunk/doc/developer/packaging.txt (revision 21065) +++ trunk/doc/developer/packaging.txt (revision 21066) @@ -10,8 +10,9 @@ processing. There are different graphical frontends - pcb-rnd does not depend on gtk or motif, the specific frontend modules may depend on them. -Pcb-rnd is scriptable if libgpmi is available. Since libgpmi is not -a mainstream library for the scripting feature it should also be packaged. +Pcb-rnd is scriptable if system installed libfungw is available. Since +libfungw is not a mainstream library, it is most probably not already +present in your distro and it should also be packaged too. Pcb-rnd is intended for UNIX-fans. It is heavily keyboard-oriented and it doesn't assume its users don't want to understand or learn how it works. Index: trunk/doc/plan.txt =================================================================== --- trunk/doc/plan.txt (revision 21065) +++ trunk/doc/plan.txt (revision 21066) @@ -62,7 +62,6 @@ fab layer in some exports yes, buildin [draw_fab] font selection GUI yes, buildin [draw_fontsel] font editor yes, buildin [fontmode] - GPMI scripting yes, buildin [gpmi] y push lines out of the way yes, buildin [jostle] diagnostics: log HID calls no [loghid] calculate toolpath for milling no [millpath] Index: trunk/doc/user/06_feature/gpmi/scripting_intro.html =================================================================== --- trunk/doc/user/06_feature/gpmi/scripting_intro.html (revision 21065) +++ trunk/doc/user/06_feature/gpmi/scripting_intro.html (nonexistent) @@ -1,235 +0,0 @@ - - -
-This plugin is deprecated and will be soon removed. Please use -fungw scripting instead. - -
-The scope of the document is to describe the relations between pcb-rnd, -hids, GPMI, glue packages and scripts. Details on how specific glue -packages access pcb-rnd internals (or how those internals work) are -described in other documents. - -
-Note 1: at the moment GUI hids can not be plugins or buildins.
-
-Note 2: plugins/buildins are always exporter HIDs technically, but in practice
-they do not have to offer exporting. This means such a HID plugin is loaded
-and registered as an exporter on paper, but it doesn't really create a
-new export facility, just sits there, interacting with pcb-rnd (creating
-menus, actions, etc). Most script plugins do this.
-
-When the pcb-rnd executable is compiled, the core, the default GUI and exporter HIDs -and buildins are compiled into the executable. Later on -
-The GPMI hid is an optional plugin that, by compile-time choice -of the user, can be: -
-GUI menus are configured to execute actions too. This also means it is impossible -to realize an user-accessible functionality that can be triggered from -the GUI command line, menu or batch input without making it an action. -
-The only exception, where new functionality is not behind a new action is -exporters. An exporter is a structured dialog box of options and a set of -callback functions implementing a drawing API. Exporting works by the following -steps: -
-GPMI is a plugin/buildin HID. Instead of doing actual work, it loads scripts
-and provides a glue layer between pcb-rnd and the scripts. The actual work
-is performed by the scripts.
-The glue layer comes in two kinds:
-
|
-Each time a script needs to be loaded, first a module is loaded and the name
-of the script is passed to the module. During module initialization, the module
-sets up a script interpreter and script context and loads the script into the
-context.
- -If there are 3 separate lua scripts running in pcb-rnd, there are 3 separate -lua modules loaded, each dealing with one of the scripts. The process of -loading a script is illustrated by highlighting the relevant paths with red -for step 1 and green for step 2. - -Step 0: the GPMI HID finds a script has to be loaded. The idea comes -from the config file (pcb-rnd-gpmi.conf) or from the GUI (manage scripts) -or as a request from a script already loaded. - -Step 1: the GPMI HID loads the corresponding module which in turns -loads the script. The script has a "main" part that is run on load. For -most languages this is the global code sections; in some languages it is -a specific function, usually called main. A few basic glue packages -are already loaded before the script. - -Step 2: the script can load glue packages. This usually happens -from the on-load main part from the script. The actual mechanism is to -call PkgLoad() from a glue package that was automatically loaded in -Step 1. The green arrows represent this path: the script executes PkgLoad() -which in turns loads other package(s) into the GPMI hid. - -Packages are loaded only once and are globally accessible for multiple modules. - |
-Binding an event in a script is done by calling the Bind() function
-(this is implemented in a package automatically loaded). The first
-argument is the name of the event, the second argument is the name of
-the script function that should be called when the event is triggered. Both
-arguments are strings. The event binding mechanism is shown in red in the
-map to the right.
- -The script can create new actions using the action_register() function -(the actions package needs to be loaded first). A script may register multiple -actions. This call is marked with green in the above map. -If any of the actions registered by the script is called, the event "ACTE_action" -is generated. This has two implications: -
|
-Menus are created using the create_menu() call. Menus can be
-created only when the GUI is already set up - this may happen only
-after some of the scripts are already loaded. Thus scripts shall
-create menus from an event handler bound to the ACTE_gui_init event.
-This event is triggered right after the GUI has been set up.
-On the map to the right the red arrows represent the path of ACTE_gui_init;
-the green arrows represent the reaction of the script, creating the new
-menu.
- - |
-Exporter scripts first have to set up an exporter hid. This typically
-happens from their on-load main part. Related calls are in the hid
-package. The following map shows this process with red arrows:
- -When the user chooses to use the exporter, among the green arrows, -a series of events are triggered and the script can generate output -directly to a file from event handlers bound to these exporting events. - |
-If gpmi is a plugin, gpmi_plugin.so (or gpmi_plugin.dll) needs to be -copied in one of the plugin directories pcb-rnd is looking into on startup: -
path | purpose - |
---|---|
- | |
$prefix/lib/pcb-rnd/plugins/$arch/ | system plugins, multihost - |
$prefix/lib/pcb-rnd/plugins/ | system plugins - |
~/.pcb/plugins/$arch/ | user plugins, multihost - |
~/.pcb/plugins/ | user plugins - |
./plugins/$arch/ | project plugins, multihost - |
./plugins/ | project plugins - |
-Script load lines contain two words separated by a space: a module name -and a script name. Relative paths in the the script name are relative to -the directory the config file is found in. -
-Example config: -
-# load the carc script (written in lua) from next to the config file: -lua carc.lua - -# load foo.awk, which is a mawk script, from its installation path -mawk /usr/lib/foo/foo.awk -Index: trunk/doc/user/06_feature/gpmi/rosetta/90_clock/ex.html =================================================================== --- trunk/doc/user/06_feature/gpmi/rosetta/90_clock/ex.html (revision 21065) +++ trunk/doc/user/06_feature/gpmi/rosetta/90_clock/ex.html (nonexistent) @@ -1,49 +0,0 @@ -Animated clock on an UI layer. -
-
-Set up an exporter hid, storing the handle of each object created in -a global variable: -
-Set up global state variables: -
-Define a make_gc callback. It is called when a new graphic -context is created (e.g. for layers). An exporter is sort of a drawing -backend: pcb-rnd sets up gc's and draws on them. The first gc set up -should open the output file, the last gc closed should flush/close the file. -Define a destroy_gc callback for the latter. GCs are -destroyed at the end of the export process. Use global variable channel -to make sure the file is open/close only once (see TODO script context). -
-Define a set_layer callback that sets green_light to true if -layer name is "topasssembly", false otherwise. -
-Callback fill_circle is the workhorse: check if we have the green -light to emit lines, then convert coordinates and diameter to mm and -decide what format to use for printing a line for each filled circle. -
-Finally, bind all four callbacks to exporter events. - - Index: trunk/doc/user/06_feature/gpmi/rosetta/90_clock/ID.desc =================================================================== --- trunk/doc/user/06_feature/gpmi/rosetta/90_clock/ID.desc (revision 21065) +++ trunk/doc/user/06_feature/gpmi/rosetta/90_clock/ID.desc (nonexistent) @@ -1 +0,0 @@ -Create and animate an analog clock on a dedicated UI layer. Index: trunk/doc/user/06_feature/gpmi/rosetta/90_clock/index.html =================================================================== --- trunk/doc/user/06_feature/gpmi/rosetta/90_clock/index.html (revision 21065) +++ trunk/doc/user/06_feature/gpmi/rosetta/90_clock/index.html (nonexistent) @@ -1,69 +0,0 @@ - - -
--
Set up an exporter hid, storing the handle of each object created in a global variable: -
Set up global state variables: -
Define a -make_gc - callback. It is called when a new graphic context is created (e.g. for layers). An exporter is sort of a drawing backend: pcb-rnd sets up gc's and draws on them. The first gc set up should open the output file, the last gc closed should flush/close the file. Define a -destroy_gc - callback for the latter. GCs are destroyed at the end of the export process. Use global variable -channel - to make sure the file is open/close only once (see TODO -script context -). -
Define a -set_layer - callback that sets green_light to true if layer name is "topasssembly", false otherwise. -
Callback -fill_circle - is the workhorse: check if we have the green light to emit lines, then convert coordinates and diameter to mm and decide what format to use for printing a line for each filled circle. -
Finally, bind all four callbacks to exporter events. - - Index: trunk/doc/user/06_feature/gpmi/rosetta/90_clock/ID.name =================================================================== --- trunk/doc/user/06_feature/gpmi/rosetta/90_clock/ID.name (revision 21065) +++ trunk/doc/user/06_feature/gpmi/rosetta/90_clock/ID.name (nonexistent) @@ -1 +0,0 @@ -animated clock on a UI layer Index: trunk/doc/user/06_feature/gpmi/rosetta/90_clock/ex.awk =================================================================== --- trunk/doc/user/06_feature/gpmi/rosetta/90_clock/ex.awk (revision 21065) +++ trunk/doc/user/06_feature/gpmi/rosetta/90_clock/ex.awk (nonexistent) @@ -1,126 +0,0 @@ -BEGIN { - PkgLoad("pcb-rnd-gpmi/actions", 0); - PkgLoad("pcb-rnd-gpmi/dialogs", 0); - PkgLoad("pcb-rnd-gpmi/layout", 0); - pi=3.141592654 -} - -# the clock coordinate system -function clock_cos(a) -{ - return cos((a-15)*6/180*pi) -} -function clock_sin(a) -{ - return sin((a-15)*6/180*pi) -} - -# draw the labels -function draw_dial(ui, cx, cy, r ,flg,w,cl,a,l,x1,y1,x2,y2) -{ - flg = "FL_NONE" - w = int(0.5 * mm) - cl = int(1 * mm) - - for(a = 0; a < 60; a++) { - tw = w - if (a == 0) - l = 4*mm - else if (a % 5 == 0) - l = 2*mm - else { - l = 1*mm - tw = w / 2 - } - - x1 = int(cx + clock_cos(a) * r) - y1 = int(cy + clock_sin(a) * r) - x2 = int(cx + clock_cos(a) * (r-l)) - y2 = int(cy + clock_sin(a) * (r-l)) - layout_create_line("", ui, x1, y1, x2, y2, tw, cl, flg) - - - if ((a % 5) == 0) { - x2 = int(cx + clock_cos(a) * (r-6*mm)) - 0.25*mm - y2 = int(cy + clock_sin(a) * (r-6*mm)) - layout_create_text("", ui, x2, y2, 0, 100, ((a == 0) ? "12" : a/5), flg) - } - } - - hlen[0] = 0.95 - hlen[1] = 0.9 - hlen[2] = 0.6 - - x2 = int(cx + clock_cos(a) * (r * hlen[0])) - y2 = int(cy + clock_sin(a) * (r * hlen[0])) - hand_sec = layout_create_line("hands", ui, cx, cy, x2, y2, 0.2*mm, cl, flg) - - x2 = int(cx + clock_cos(a) * (r * hlen[1])) - y2 = int(cy + clock_sin(a) * (r * hlen[1])) - hand_min = layout_create_line("hands", ui, cx, cy, x2, y2, 0.5*mm, cl, flg) - - x2 = int(cx + clock_cos(a) * (r * hlen[2])) - y2 = int(cy + clock_sin(a) * (r * hlen[2])) - hand_hour = layout_create_line("hands", ui, cx, cy, x2, y2, 2*mm, cl, flg) - - clock_cx = cx - clock_cy = cy - clock_r = r -} - - -function ev_action(id, name, argc, x, y) -{ - ui = int(uilayer_alloc("clock", "#DD33DD")) - mm = mm2pcb_multiplier(); - AddTimer(0, 10, "ev_second", ""); - draw_dial(ui, 50*mm, 50*mm, 30*mm) - - clock_sec = 12 - clock_min = 33 - clock_hour = 9 - set_hands() -} - -function set_hand(obj, idx, at ,ox2,oy2,x2,y2) -{ - ox2 = layout_obj_coord(obj, "OC_P2X") - oy2 = layout_obj_coord(obj, "OC_P2Y") - - x2 = int(clock_cx + clock_cos(at) * (clock_r * hlen[idx])) - y2 = int(clock_cy + clock_sin(at) * (clock_r * hlen[idx])) - - layout_obj_move(obj, "OC_P2", x2-ox2, y2-oy2); -} - -function set_hands() -{ - set_hand(hand_hour, 2, (clock_hour + clock_min/60 + clock_sec/3600)*5) - set_hand(hand_min, 1, clock_min + clock_sec/60) - set_hand(hand_sec, 0, clock_sec) -} - - -function ev_second(timer_data) -{ - if (hand_sec != "") { - clock_sec++; - if (clock_sec >= 60) { - clock_sec = 0 - clock_min++ - if (clock_min >= 60) { - clock_min = 0 - clock_hour++ - if (clock_hour >= 12) - clock_hour = 0; - } - } - set_hands() - } -} - -BEGIN { - layout_search_empty("hands") - Bind("ACTE_action", "ev_action"); - action_register("clock", "", "animate an analog clock on a debug layer", "clock()"); -} Index: trunk/doc/user/06_feature/gpmi/rosetta/10_hello/ex.html =================================================================== --- trunk/doc/user/06_feature/gpmi/rosetta/10_hello/ex.html (revision 21065) +++ trunk/doc/user/06_feature/gpmi/rosetta/10_hello/ex.html (nonexistent) @@ -1,25 +0,0 @@ -Load packages the script depends on: -
--Create a function ev_action that will be called when any of -the actions registered by the script is executed. The script registers -only one action, so it does not need to check which action caused -the function to be called. -
-When the action event is called, use dialog_log to append -a log message. -
-In the "main" section of the script, bind event ACTE_action to -our local function ev_action - this gets ev_action to -be called when any of the actions registered by this script is executed. -
-Finally use action_register to register the action: -
Create a function -ev_action - that will be called when any of the actions registered by the script is executed. The script registers only one action, so it does not need to check which action caused the function to be called. -
When the action event is called, use -dialog_log - to append a log message. -
In the "main" section of the script, bind event -ACTE_action - to our local function -ev_action - - this gets -ev_action - to be called when any of the actions registered by this script is executed. -
Finally use -action_register - to register the action: -
-Create a function ev_action that will be called when any of -the actions registered by the script is executed. The script registers -only one action, so it does not need to check which action caused -the function to be called. -
-When the action event is called, use dialog_report to pop -up a report dialog. First argument donates the name (title) of the window, -the second is the text printed in the window. -
-In the "main" section of the script, bind event ACTE_action to -our local function ev_action - this gets ev_action to -be called when any of the actions registered by this script is executed. -
-Finally use action_register to register the action: -
Create a function -ev_action - that will be called when any of the actions registered by the script is executed. The script registers only one action, so it does not need to check which action caused the function to be called. -
When the action event is called, use -dialog_report - to pop up a report dialog. First argument donates the name (title) of the window, the second is the text printed in the window. -
In the "main" section of the script, bind event -ACTE_action - to our local function -ev_action - - this gets -ev_action - to be called when any of the actions registered by this script is executed. -
Finally use -action_register - to register the action: -
-Create a function ev_action that will be called when any of -the actions registered by the script is executed. The script registers -only one action, so it does not need to check which action caused -the function to be called. -
-When the action event is called, first set up: -
- -In the "main" section of the script, bind event ACTE_action to -our local function ev_action - this gets ev_action to -be called when any of the actions registered by this script is executed. -
-Finally use action_register to register the action: -
Create a function -ev_action - that will be called when any of the actions registered by the script is executed. The script registers only one action, so it does not need to check which action caused the function to be called. -
When the action event is called, first set up: -
In the "main" section of the script, bind event -ACTE_action - to our local function -ev_action - - this gets -ev_action - to be called when any of the actions registered by this script is executed. -
Finally use -action_register - to register the action: -
-Create a function ev_action that will be called when any of -the actions registered by the script is executed. The script registers -only one action, so it does not need to check which action caused -the function to be called. -
-When the action event is called, use dialog_report to pop -up a report dialog. First argument donates the name (title) of the window, -the second is the text printed in the window. -
-Create a function ev_gui_init that will be called when the -gui has been initialized - this is the right moment to register -new menus in the GUI. Put the new menu item in the -"Plugins/GPMI scripting/" menu by convention, and set hot key to ctrl+w. -The menu should execute action hello(). -
-In the "main" section of the script, bind event ACTE_action to -our local function ev_action - this gets ev_action to -be called when any of the actions registered by this script is executed. -Also bind ev_gui_init so that the new menu can be safely created. -
-Finally use action_register to register the action: -
Create a function -ev_action - that will be called when any of the actions registered by the script is executed. The script registers only one action, so it does not need to check which action caused the function to be called. -
When the action event is called, use -dialog_report - to pop up a report dialog. First argument donates the name (title) of the window, the second is the text printed in the window. -
Create a function -ev_gui_init - that will be called when the gui has been initialized - this is the right moment to register new menus in the GUI. Put the new menu item in the "Plugins/GPMI scripting/" menu by convention, and set hot key to ctrl+w. The menu should execute action hello(). -
In the "main" section of the script, bind event -ACTE_action - to our local function -ev_action - - this gets -ev_action - to be called when any of the actions registered by this script is executed. Also bind ev_gui_init so that the new menu can be safely created. -
Finally use -action_register - to register the action: -
-Each example comes with an explanation, written in plain English about what the -scripts do, step by step. Instead of trying to exploit powerful features -of the language, example implementations try to be simple. -
-The list below is ordered from the least complex to the most complex examples. -Column lvl is the complexity score. The less the score is, the simpler -the example is. - - -
lvl | example | languages | description - |
---|---|---|---|
10 - | hello world (text, log) - | awk bash lua perl python ruby scheme stutter tcl - | Create a new action hello() that prints "Hello world!" in the message log. - |
10 - | hello world (popup window) - | awk bash lua perl python ruby scheme stutter tcl - | Create a new action hello() that prints "Hello world!" in a popup window. - |
12 - | hello world (popup window + submenu) - | awk bash lua perl python ruby scheme stutter tcl - | Create a new action hello() that prints "Hello world!" in a popup window, create a menu (under "Plugins/GPMI scripting/") that executes the action. - |
30 - | action: move selected objects - | awk bash lua perl python ruby scheme stutter tcl - | Create a new action mv(dx,dy) that moves selected objects relative by dx and dy mm. - |
35 - | drill list exporter - | awk lua tcl - | Create a new exporter that prints a list of drills in x,y,dia table in CSV, TSV or text format - |
90 - | animated clock on a UI layer - | awk - | Create and animate an analog clock on a dedicated UI layer. - |
-Each example comes with an explanation, written in plain English about what the -scripts do, step by step. Instead of trying to exploit powerful features -of the language, example implementations try to be simple. -
-The list below is ordered from the least complex to the most complex examples. -Column lvl is the complexity score. The less the score is, the simpler -the example is. - - -
-An exporter is sort of a drawing backend: pcb-rnd sets up graphic contexts -(gc for short) and draws on them. The first gc set up should open the -output file, the last gc closed should flush/close the file. -
-
-Set up an exporter hid, storing the handle of each object created in -a global variable: -
-Set up global state variables: -
-Define a make_gc callback. It is called when a new graphic -context is created (e.g. for layers). An exporter is sort of a drawing -backend: pcb-rnd sets up gc's and draws on them. The first gc set up -should open the output file, the last gc closed should flush/close the file. -Define a destroy_gc callback for the latter. GCs are -destroyed at the end of the export process. Use global variable channel -to make sure the file is open/close only once (see TODO script context). -
-Define a set_layer callback that sets green_light to true if -layer name is "topasssembly", false otherwise. -
-Callback fill_circle is the workhorse: check if we have the green -light to emit lines, then convert coordinates and diameter to mm and -decide what format to use for printing a line for each filled circle. -
-Finally, bind all four callbacks to exporter events. - - Index: trunk/doc/user/06_feature/gpmi/rosetta/35_export_drill/ID.desc =================================================================== --- trunk/doc/user/06_feature/gpmi/rosetta/35_export_drill/ID.desc (revision 21065) +++ trunk/doc/user/06_feature/gpmi/rosetta/35_export_drill/ID.desc (nonexistent) @@ -1 +0,0 @@ -Create a new exporter that prints a list of drills in x,y,dia table in CSV, TSV or text format Index: trunk/doc/user/06_feature/gpmi/rosetta/35_export_drill/index.html =================================================================== --- trunk/doc/user/06_feature/gpmi/rosetta/35_export_drill/index.html (revision 21065) +++ trunk/doc/user/06_feature/gpmi/rosetta/35_export_drill/index.html (nonexistent) @@ -1,79 +0,0 @@ - - -
-An exporter is sort of a drawing backend: pcb-rnd sets up graphic contexts (gc for short) and draws on them. The first gc set up should open the output file, the last gc closed should flush/close the file. -
-
Set up an exporter hid, storing the handle of each object created in a global variable: -
Set up global state variables: -
Define a -make_gc - callback. It is called when a new graphic context is created (e.g. for layers). An exporter is sort of a drawing backend: pcb-rnd sets up gc's and draws on them. The first gc set up should open the output file, the last gc closed should flush/close the file. Define a -destroy_gc - callback for the latter. GCs are destroyed at the end of the export process. Use global variable -channel - to make sure the file is open/close only once (see TODO -script context -). -
Define a -set_layer - callback that sets green_light to true if layer name is "topasssembly", false otherwise. -
Callback -fill_circle - is the workhorse: check if we have the green light to emit lines, then convert coordinates and diameter to mm and decide what format to use for printing a line for each filled circle. -
Finally, bind all four callbacks to exporter events.
-
-
Index: trunk/doc/user/06_feature/gpmi/rosetta/35_export_drill/ID.name
===================================================================
--- trunk/doc/user/06_feature/gpmi/rosetta/35_export_drill/ID.name (revision 21065)
+++ trunk/doc/user/06_feature/gpmi/rosetta/35_export_drill/ID.name (nonexistent)
@@ -1 +0,0 @@
-drill list exporter
Index: trunk/doc/user/06_feature/gpmi/rosetta/35_export_drill/ex.lua
===================================================================
--- trunk/doc/user/06_feature/gpmi/rosetta/35_export_drill/ex.lua (revision 21065)
+++ trunk/doc/user/06_feature/gpmi/rosetta/35_export_drill/ex.lua (nonexistent)
@@ -1,65 +0,0 @@
-PkgLoad("pcb-rnd-gpmi/hid", 0)
-PkgLoad("pcb-rnd-gpmi/layout", 0)
-PkgLoad("pcb-rnd-gpmi/dialogs", 0)
-
-hid = hid_create("drill", "drill list export")
-attr_path = hid_add_attribute(hid, "filename", "name of the output file", "HIDA_Path", 0, 0, "drill.txt")
-attr_format = hid_add_attribute(hid, "format", "file format", "HIDA_Enum", 0, 0, "CSV|TSV|text")
-hid_register(hid)
-
-fmt = 0
-conv = mm2pcb_multiplier()
-channel = nil
-green_light = 0
-
-function make_gc(event_id, hid, gc)
- if channel == nil
- then
- channel = io.open(hid_get_attribute(hid, attr_path), "w")
- if channel == nil
- then
- dialog_report("Error exporting drill", "Could not open file [hid_get_attribute $hid $attr_path] for\nwriting, exporting drill failed.")
- return
- end
- fmt = hid_get_attribute(hid, attr_format)
- end
-end
-
-function destroy_gc(event_id, hid, gc)
- if channel ~= nil
- then
- channel:close()
- channel = nil
- end
-end
-
-function set_layer_group(event_id, hid, group, layer, flags, empty)
- if (layer_flag_is_set(flags, "LYT_ASSY") == "1") and (layer_flag_is_set(flags, "LYT_TOP") == "1")
- then
- green_light = 1
- else
- green_light = 0
- end
-end
-
-function fill_circle(event_id, hid, gc, cx, cy, r)
- if green_light == 1
- then
- cx = cx / conv
- cy = cy / conv
- local dia = r / conv * 2
-
- if fmt == "CSV" then
- channel:write(cx .. "," .. cy .. "," .. dia .. "\n")
- elseif (fmt == "TSV") then
- channel:write(cx .. "\t" .. cy .. "\t" .. dia .. "\n")
- elseif (fmt == "text") then
- channel:write(cx .. " " .. cy .. " " .. dia .. "\n")
- end
- end
-end
-
-Bind("HIDE_make_gc", "make_gc")
-Bind("HIDE_destroy_gc", "destroy_gc")
-Bind("HIDE_set_layer_group", "set_layer_group")
-Bind("HIDE_fill_circle", "fill_circle")
Index: trunk/doc/user/06_feature/gpmi/rosetta/35_export_drill/ex.tcl
===================================================================
--- trunk/doc/user/06_feature/gpmi/rosetta/35_export_drill/ex.tcl (revision 21065)
+++ trunk/doc/user/06_feature/gpmi/rosetta/35_export_drill/ex.tcl (nonexistent)
@@ -1,65 +0,0 @@
-PkgLoad pcb-rnd-gpmi/hid 0
-PkgLoad pcb-rnd-gpmi/layout 0
-PkgLoad pcb-rnd-gpmi/dialogs 0
-
-set hid [hid_create "drill" "drill list export"]
-set attr_path [hid_add_attribute $hid "filename" "name of the output file" "HIDA_Path" 0 0 "drill.txt"]
-set attr_format [hid_add_attribute $hid "format" "file format" "HIDA_Enum" 0 0 "CSV|TSV|text"]
-hid_register $hid
-
-set fmt 0
-set conv [mm2pcb_multiplier]
-set channel -1
-set green_light 0
-
-proc make_gc {event_id hid gc} {
- global channel attr_path attr_format fmt
-
- if {$channel == -1} {
- if {[catch {open [hid_get_attribute $hid $attr_path] "w"} channel]} {
- dialog_report "Error exporting drill" "Could not open file [hid_get_attribute $hid $attr_path] for\nwriting, exporting drill failed."
- return
- }
- set fmt [hid_get_attribute $hid $attr_format]
- }
-}
-
-proc destroy_gc {event_id hid gc} {
- global channel
-
- if {$channel > -1} {
- close $channel
- set channel -1
- }
-}
-
-proc set_layer_group {event_id hid group layer flags empty} {
- global green_light
-
- if { [layer_flag_is_set $flags "LYT_ASSY"] && [layer_flag_is_set $flags "LYT_TOP"] } { set green_light 1; puts "!!!!!!!!!!!!!!!"} { set green_light 0 }
-}
-
-proc fill_circle {event_id hid gc cx cy r} {
- global channel conv fmt green_light
-
- if {$green_light} {
- set cx [expr $cx / $conv]
- set cy [expr $cy / $conv]
- set dia [expr $r / $conv * 2]
-
- if {$fmt eq "CSV"} {
- puts $channel "$cx,$cy,$dia"
- } elseif {$fmt eq "TSV"} {
- puts $channel "$cx $cy $dia"
- } elseif {$fmt eq "text"} {
- puts $channel "$cx $cy $dia"
- }
- }
-}
-
-Bind HIDE_make_gc make_gc
-Bind HIDE_destroy_gc destroy_gc
-Bind HIDE_set_layer_group set_layer_group
-Bind HIDE_fill_circle fill_circle
-
-puts "NA?"
Index: trunk/doc/user/06_feature/gpmi/rosetta/35_export_drill/ex.awk
===================================================================
--- trunk/doc/user/06_feature/gpmi/rosetta/35_export_drill/ex.awk (revision 21065)
+++ trunk/doc/user/06_feature/gpmi/rosetta/35_export_drill/ex.awk (nonexistent)
@@ -1,60 +0,0 @@
-BEGIN {
- PkgLoad("pcb-rnd-gpmi/hid", 0)
- PkgLoad("pcb-rnd-gpmi/layout", 0)
- PkgLoad("pcb-rnd-gpmi/dialogs", 0)
-
- hid = hid_create("drill", "drill list export")
- attr_path = hid_add_attribute(hid, "filename", "name of the output file", "HIDA_Path", 0, 0, "drill.txt")
- attr_format = hid_add_attribute(hid, "format", "file format", "HIDA_Enum", 0, 0, "CSV|TSV|text")
- hid_register(hid)
-
- fmt = 0
- conv = mm2pcb_multiplier()
- channel = ""
- green_light = 0
-}
-
-function make_gc(event_id, hid, gc) {
- if (channel == "") {
- channel = hid_get_attribute(hid, attr_path)
-# awk: can't check whether the file can be open here
- fmt = hid_get_attribute(hid, attr_format)
- }
-}
-
-function destroy_gc(event_id, hid, gc) {
- if (channel != "") {
- close(channel)
- channel = ""
- }
-}
-
-function set_layer(event_id, hid, group, layer, flags, empty) {
- if ((layer_flag_is_set(flags, "LYT_ASSY") == "1") && (layer_flag_is_set(flags, "LYT_TOP") == "1"))
- green_light = 1
- else
- green_light = 0
-}
-
-function fill_circle(event_id, hid, gc, cx, cy, r ,dia) {
- if (green_light) {
- cx = cx / conv
- cy = cy / conv
- dia = r / conv * 2
-
- if (fmt == "CSV") {
- print cx "," cy "," dia > channel
- } else if (fmt == "TSV") {
- print cx "\t" cy "\t" dia > channel
- } else if (fmt == "text") {
- print cx " " cy " " dia > channel
- }
- }
-}
-
-BEGIN {
- Bind("HIDE_make_gc", "make_gc")
- Bind("HIDE_destroy_gc", "destroy_gc")
- Bind("HIDE_set_layer_group", "set_layer_group")
- Bind("HIDE_fill_circle", "fill_circle")
-}
Index: trunk/doc/user/06_feature/gpmi/gpmi_flow_exp.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/doc/user/06_feature/gpmi/gpmi_flow_exp.png
===================================================================
--- trunk/doc/user/06_feature/gpmi/gpmi_flow_exp.png (revision 21065)
+++ trunk/doc/user/06_feature/gpmi/gpmi_flow_exp.png (nonexistent)
Property changes on: trunk/doc/user/06_feature/gpmi/gpmi_flow_exp.png
___________________________________________________________________
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: trunk/doc/user/06_feature/gpmi/Porting
===================================================================
--- trunk/doc/user/06_feature/gpmi/Porting (revision 21065)
+++ trunk/doc/user/06_feature/gpmi/Porting (nonexistent)
@@ -1,5 +0,0 @@
-Currently the project works on Linux only. GPMI is portable, so we need
-only Makefile tweakings on pcb-gpmi to be able to compile it anywhere
-where GPMI compiles. However, first I want to see some test results
-from Linux users.
-
Index: trunk/doc/user/06_feature/gpmi/gpmi_flow_exp.dot
===================================================================
--- trunk/doc/user/06_feature/gpmi/gpmi_flow_exp.dot (revision 21065)
+++ trunk/doc/user/06_feature/gpmi/gpmi_flow_exp.dot (nonexistent)
@@ -1,65 +0,0 @@
-digraph g {
- rankdir=LR
- splines="polyline"
-# nodesep=1
-# ranksep=1.5
-
- subgraph cluster_0 {
- label="pcb-rnd"
-# core [label="pcb-rnd core|{{ This plugin is deprecated and will be soon removed. Please use
-fungw scripting instead.
-
-
- Events do not have return value. The first argument is always the even id. Event handlers defined in scripts get all event arguments converted to string (types below are informational).
-
- The following functions are registered in script context.
-
-
-
-
- TODO: validity of a list in time
-
-Once the search list is ready, the script can iterate over it and resolve
-the object handle of each object found, using layout_search_get(). Having
-an object handle, The layout_obj_*() functions may be used by the script
-to access fields of an object structure.
-
-
-
-The case described above (dispatcher in the event handler) is rare.
-Most users will bind one event to one function and can safely ignore this
-argument. Nevertheless it must present as the first argument
-on the event handler's argument list.
-
-
-
Index: trunk/doc/user/06_feature/gpmi/packages/dialogs_ref.html
===================================================================
--- trunk/doc/user/06_feature/gpmi/packages/dialogs_ref.html (revision 21065)
+++ trunk/doc/user/06_feature/gpmi/packages/dialogs_ref.html (nonexistent)
@@ -1,105 +0,0 @@
-
- Enum values should be passed on as strings.
-
- The following functions are registered in script context.
-
-
-The process of binding an action:
-
-When the script is unloaded all actions the script registered
-are removed from pcb-rnd automatically.
-
-
-The above script registers a new action called untwo(). When untwo() is executed,
-it executes action undo() twice.
-
-
-
-The first argument of create_menu() is the menu path. The path is a list
-of visible menu names separated by slashes (e.g. "/main_menu/File/Save as..." means
-"File" menu, "Save as..." submenu).
-
-Paths are interpreted as menu paths, which are a slightly simplified version
-of lihata paths found in menu.lht. Basically there's a main directory directly
-under root that determines the type of the menu:
-
-
-The simplification compared to lihata paths is that only menu and submenu
-names are on the path, so lihata nodes like "li:submenu" should be ignored.
-In other words, the path represents how the menus can be reached from the user
-interface, plus a "main menu type prefix" as discussed above.
-
-By convention, scripts should
-create new menu items under the "/main_menu/Plugins/" menu.
-
-The following example lua script registers a new menu item
-
-When the user clicks on the menu, the action script specified in the second argument
-of create_menu() is executed. Thus the script usually registers a new action
-first then registers one or more menu items executing those actions.
-
-
-
Index: trunk/doc/user/06_feature/gpmi/packages/hid_ref.html
===================================================================
--- trunk/doc/user/06_feature/gpmi/packages/hid_ref.html (revision 21065)
+++ trunk/doc/user/06_feature/gpmi/packages/hid_ref.html (nonexistent)
@@ -1,205 +0,0 @@
-
- Enum values should be passed on as strings.
-
- Events do not have return value. The first argument is always the even id. Event handlers defined in scripts get all event arguments converted to string (types below are informational).
-
- The following functions are registered in script context.
-
-
- The only exception is dialog_progress(), which opens or
- updates or closes the already open progress dialog box, and
- returns immediately (even when the box is left open).
-
-
- When the script needs a custom, dynamic dialog box, it needs to
- create an attribute dialog. The script sets up a HID
- structure using the hid package, builds up all the input fields
- then calls dialog_attribute() with the hid.
-
-
- After the process has finished, a call with so_far=total+1 should be
- made to make sure the window is closed. If the call returns non-zero,
- the process should be cancelled.
-
-
-
Index: trunk/doc/user/06_feature/gpmi/packages/hid.html
===================================================================
--- trunk/doc/user/06_feature/gpmi/packages/hid.html (revision 21065)
+++ trunk/doc/user/06_feature/gpmi/packages/hid.html (nonexistent)
@@ -1,76 +0,0 @@
-
-
-The process of building a dialog box is closed by a call to
- Enum values should be passed on as strings.
-
- The following functions are registered in script context.
-
- pcb-rnd GPMI scripting - TOC
-
- Installation, configuration
-
-
-
-
- High level docs
-
-
- Glue layer documentation
-
-
-
- Authors, credits, misc
-
-
-
-
Index: trunk/doc/user/06_feature/gpmi/util/rosetta_genpages.sh
===================================================================
--- trunk/doc/user/06_feature/gpmi/util/rosetta_genpages.sh (revision 21065)
+++ trunk/doc/user/06_feature/gpmi/util/rosetta_genpages.sh (nonexistent)
@@ -1,182 +0,0 @@
-#!/bin/sh
-
-clean_id()
-{
- tr "\r\n" "~" | sed '
-s/~*$//;
-s/|/\&pipe;/g;
-s/&/\&/g;
-s/\</g;
-s/>/\>/g;
-s/"/\"/g;
-s/'\''/\'/g;
-s/~\+/
/g;
-'
- echo ""
-}
-
-genpage()
-{
- local dir scripts name desc
-
- dir="$1"
- scripts="$2"
-
- name=`cat $dir/ID.name`
- desc=`cat $dir/ID.desc`
- ./tags < "$dir/ex.html" | awk -v "fn_ref=../packages/XREF" -v "scripts=$scripts" -v "name=$name" -v "desc=$desc" '
- BEGIN {
- while((getline < fn_ref) > 0) {
- REF[$2] = $3
- }
- print ""
- print ""
- print ""
- print " " name "
"
- print desc
-
- print " Example implementations
"
- v = split(scripts, S, "[\r\n]+")
- for(n = 1; n <= v; n++) {
- lang=S[n]
- sub("^ex[.]", "", lang)
- if (n != 1)
- print " | "
- print "" lang ""
- }
-
- print " Explanation, step by step
"
- }
- /^/ {
- gsub("?ref>", "", $0)
- name=$0
- gsub("[ \t]*", "", name)
- if (name in REF) {
- link_begin=""
- link_end = ""
- }
- else {
- link_begin=""
- link_end=""
- }
- print "" link_begin $0 link_end ""
- next
- }
-
- { print $0 }
-
- END {
- print ""
- print ""
- }
-
- ' > "$dir/index.html"
-}
-
-gen_index()
-{
-
- awk -v "template=$1" '
- BEGIN {
- FS="[|]"
- q = "\""
- LANGS["rb"] = "ruby"
- LANGS["pl"] = "perl"
- LANGS["py"] = "python"
- LANGS["stt"] = "stutter"
- LANGS["scm"] = "scheme"
- }
-
- ($1 == "scripts") {
- s = $3
- gsub("ex[.]", "", s)
- v = split(s, S, " ")
- s = ""
- for(n = 1; n <= v; n++) {
- if (S[n] in LANGS)
- s = s " " LANGS[S[n]]
- else
- s = s " " S[n]
- }
- DATA[$2, $1] = s
- next
- }
-
- ($1 == "name") {
- if (names == "")
- names = $2
- else
- names = names "|" $2
- }
-
-
- {
- # DATA[script, name] = "hello world"
- DATA[$2, $1] = $3
- }
-
- function generate(cmd ,N,n,v,name,level) {
- if (cmd == "index") {
- print ""
- print "
"
- }
- else
- print "Do not know how to generate " cmd > "/dev/stderr"
- }
-
- END {
- FS=""
- while((getline < template) > 0) {
- if (match($0, "lvl example languages description"
- v = split(names, N, "[|]")
- for(n = 1; n <= v; n++) {
- name = N[n]
- level = name
- sub("_.*", "", level)
- if (level ~ "[^0-9]")
- level = "n/a"
- print " "
- print " " level
- print " " DATA[name, "name"] ""
- print " " DATA[name, "scripts"]
- print " " DATA[name, "desc"]
- }
- print " PCB GPMI
-Reference manual for package actions
-Automatically generated from actions.h
-
- Events
-
-
- ACTE_action(int event_id, const char* name, int argc, int x, int y)
-
- Generated when an action registered by the script is executed.
- Arguments:
- name: name of the action (as registered using function action_register())
- argc: number of arguments. Arguments can be accessed using function action_arg
- x, y: optional coords, if need_xy was not empty at action_register
-
-
- ACTE_gui_init(int event_id, int argc, char** argv)
-
- Generated right after gui initialization, before the gui main loop.
- Arguments:
- argc: number of arguments the gui was initialized with.
- argv[]: arguments the gui was initialized with - unaccessible for the scripts.
-
-
- ACTE_unload(int event_id, const char* conffile)
-
- Generated right before unloading a script to give the script a chance
- to clean up.
- Arguments:
- conffile: the name of the config file that originally triggered loading the script, or empty if the script was loaded from the gui.
-
- Functions
-
-
-
-
-
-
Index: trunk/doc/user/06_feature/gpmi/packages/layout.html
===================================================================
--- trunk/doc/user/06_feature/gpmi/packages/layout.html (revision 21065)
+++ trunk/doc/user/06_feature/gpmi/packages/layout.html (nonexistent)
@@ -1,58 +0,0 @@
-
-
- int action_register(const char* name, const char* need_xy, const char* description, const char* syntax)
-
- Register an action in PCB - when the action is executed, event
- ACTE_action is generated with the action name.
- Multiple actions can be registered. Any action registered by the script
- will trigger an ACTE_event sent to the script.
- Arguments:
- name: name of the action
- need_xy: the question the user is asked when he needs to choose a coordinate; if empty, no coordinate is asked
- description: description of the action (for the help)
- syntax: syntax of the action (for the help)
- Returns 0 on success.
-
-
-
- const char* action_arg(int argn)
-
- extract the (argn)th event argument for the current action (makes sense only in an ACTE_action event handler
-
-
- int action(const char* cmdline)
-
- call an existing action using PCB syntax (e.g. foo(1, 2, 3))
- Returns non-zero on error; generally returns value of the action
- (which is also non-zero on error).
-
-
- void create_menu(const char* path, const char* action, const char* mnemonic, const char* hotkey, const char* tooltip)
-
- Create a new menu or submenu at path. Missing parents are created
- automatically with empty action, mnemonic, hotkey and tooltip.
- Arguments:
- path: the full path of the new menu
- action: this action is executed when the user clicks on the menu
- mnemonic: which letter to underline in the menu text (will be the fast-jump-there key once the menu is open)
- hotkey: when this key is pressed in the main gui, the action is also triggered; the format is modifiers<Key>letter, where modifiers is Alt, Shift or Ctrl. This is the same syntax that is used in the .res files.
- tooltip: short help text
-
- layout package
-
-Layout package searches and manipulates the current layout. Dimension units
-are in nanometer unless otherwise mentioned.
-
- Page: board dimensions
- Functions used to query or set width and height of the drawing:
-
-
-
- Layer manipulation
-Most functions perform operations similar to user commands affecting
-the current layer.
-The following few calls can change the current layer. Warning: this is the
-same current layer as the user's; the script most probably wants to save
-the current layer before changing it and then restore it after the operation.
-
-
- Object searches
- Search results are collected on lists identified by their name (search_ID).
- If a new search is done with the same name, old search results for that
- name are discarded.
- Search functions return the number of objects found (size of the list) that can
- be then used while querying the results using layout_search_get().
- Results should be freed using layout_search_free() when they are no
- longer needed.
- Create new objects
- The layout_create_*() calls are used to create new objects on the current
- layer (set by layout_switch_to_layer()).
-
-
- API reference - page, units and coordinates
-(angles are in radian)
-TODO
-
- API reference - debug draw
-TODO
-
-
-
Index: trunk/doc/user/06_feature/gpmi/packages/event_id.html
===================================================================
--- trunk/doc/user/06_feature/gpmi/packages/event_id.html (revision 21065)
+++ trunk/doc/user/06_feature/gpmi/packages/event_id.html (nonexistent)
@@ -1,20 +0,0 @@
-
-
- event_id
-
-The first argument passed to an event handler is always the event ID.
-It is useful if there are several GPMI events with the same arguments and
-the script wants to bind them all to the same event handler. In that case
-using event_id the event handler can determine which event triggered the
-call. This design is similar to the signal handler documented in
-signal(2).
-
-PCB GPMI
-Reference manual for package dialogs
-Automatically generated from dialogs.h
-
- Enums
-
-
- dialog_fileselect_e
-
- Filter on what files a file select dialog should list
-
-
-
-value meaning
- FS_NONE none of the below
- FS_READ when the selected file will be read, not written (HID_FILESELECT_READ)
- FS_NOT_EXIST the function calling hid->fileselect will deal with the case when the selected file already exists. If not given, then the gui will prompt with an "overwrite?" prompt. Only used when writing. (HID_FILESELECT_MAY_NOT_EXIST)
- FS_TEMPLATE the call is supposed to return a file template (for gerber output for example) instead of an actual file. Only used when writing. (HID_FILESELECT_IS_TEMPLATE)
- Functions
-
-
-
-
-
-
Index: trunk/doc/user/06_feature/gpmi/packages/actions.html
===================================================================
--- trunk/doc/user/06_feature/gpmi/packages/actions.html (revision 21065)
+++ trunk/doc/user/06_feature/gpmi/packages/actions.html (nonexistent)
@@ -1,123 +0,0 @@
-
-
- void dialog_log(const char* msg)
-
- Append a msg to the log (log window and/or stderr).
-
-
- int dialog_confirm(const char* msg, const char* ok, const char* cancel)
-
- Ask the user for confirmation (usually using a popup). Returns 0 for
- cancel and 1 for ok.
- Arguments:
- msg: message to the user
- ok: label of the OK button
- cancel: label of the cancel button
- Arguments "ok" and "cancel" may be empty (or NULL) in which
- case the GUI will use the default (perhaps localized) labels for
- those buttons.
-
-
- void dialog_report(const char* title, const char* msg)
-
- Pop up a report dialog.
- Arguments:
- title: title of the window
- msg: message
-
-
- char* dialog_prompt(const char* msg, const char* default_)
-
- Ask the user to input a string (usually in a popup).
- Arguments:
- msg: message or question text
- default_: default answer (this may be filled in on start)
- Returns the answer.
-
-
- char* dialog_fileselect(const char* title, const char* descr, char* default_file_, char* default_ext, const char* history_tag, dialog_fileselect_t flags)
-
- Pops up a file selection dialog.
- Arguments:
- title: window title
- descr: description
- default_file_
- default_ext: default file name extension
- history_tag
- flags: one or more flags (see below)
- Returns the selected file or NULL (empty).
-
-
- void dialog_beep(void)
-
- Audible beep
-
-
- int dialog_progress(int so_far, int total, const char* message)
-
- Request the GUI hid to draw a progress bar.
- Arguments:
- int so_far: achieved state
- int total: maximum state
- const char *message: informs the users what they are waiting for
- If so_far is bigger than total, the progress bar is closed.
- Returns nonzero if the user wishes to cancel the operation.
-
-
-
- int dialog_attribute(hid_t* hid, const char* title, const char* descr)
-
- Pop up an attribute dialog; content (widgets) of the dialog box are coming
- from hid (see the hid package).
- Arguments:
- hid: widgets
- title: title of the window
- descr: description printed in the dialog
-
- The actions package
-
-The action package is used to register actions and menus in PCB and
-to execute existing actions. In PCB actions
-are generated when the user selects a menu, presses a key or issues a
-command on the PCB command line.
-
- Registration of new actions
-The script may register new actions
-using arbitrary action names. If any of the registered actions is
-detected, an ACTE_action event is sent to the script. If multiple
-actions are used in a script, argument name of the event handler
-can be used to identify the triggering action. (This may be time consuming
-in scripting languages (a series of string comparison) - those scripts
-binding to frequent actions should not bind to too many different actions.)
-pcb-gpmi guarantees that the event handler of a script is triggered only
-when an action is caught that previously was registered by the same script.
-
-
-
-Example (written in lua):
-
--- load the package
-PkgLoad("pcb-gpmi/actions", 0);
-
--- action callback
-function ev_action(id, name, argc, x, y)
- if name == "cake" then
- size = action_arg(1);
- -- put cake drawing code here
- else
- -- must be candy
- amount = action_arg(1);
- -- put candy drawing code here
- end
-end
-
--- register and bind action
-action_register("cake", "cake center xy?", "cake service", "cake(size)", "");
-action_register("candy", "candy cloud center xy?", "cake service", "candy(amount)", "");
-Bind("ACTE_action", "ev_action");
-
- Executing actions
-An existing action can be executed using the action() call. The only one
-argument is a command line string. The syntax is the same as in pcb
-command line.
-
-Example (written in lua):
-
-PkgLoad("pcb-rnd-gpmi/actions", 0);
-
-function ev_action1(id, name, argc, x, y)
- action("undo()")
- action("undo()")
-end
-
--- register and bind action
-action_register("untwo", "", "undo twice", "untwo()", "CONTEXT!");
-
- Creating menus
-It is possible to insert menus and submenus runtime, using the call
-create_menu(). The script should do this only after the gui has been initialized.
-The most common way is to create all menus from the ACTE_gui_init event,
-which is called after the gui finished setting up.
-
-
-
-PkgLoad("pcb-rnd-gpmi/actions", 0);
-
-function ev_gui_init(argc, argv)
- create_menu("/main_menu/Plugins/foo", "undo()", "o", "Ctrl<Key>o", "tooltip for foo");
-end
-
--- register and bind action
-Bind("ACTE_gui_init", "ev_gui_init");
-
-PCB GPMI
-Reference manual for package hid
-Automatically generated from hid.h
-
- Enums
-
-
- hid_attr_type_e
-
- Type of an HID attribute (usually a widget on an attribute dialog box)
-
-
-
-
-value meaning
- HIDA_Label non-editable label displayed on the GUI
- HIDA_Integer a signed integer value
- HIDA_Real a floating point value
- HIDA_String one line textual input
- HIDA_Boolean true/false boolean value
- HIDA_Enum select an item of a predefined list
- HIDA_Mixed TODO
- HIDA_Path path to a file or directory
- HIDA_Unit select a dimension unit
- HIDA_Coord enter a coordinate
- EndCapStyle_e
-
- Line or arc ending style
-
-
-
-value meaning
- Trace_Cap filled circle (trace drawing)
- Square_Cap rectangular lines (square pad)
- Round_Cap round pins or round-ended pads, thermals
- Beveled_Cap octagon pins or bevel-cornered pads
- Events
-
-
- HIDE_get_export_options(int event_id, void* hid)
-
- Called before get_exporter_options returns the option list to the GUI hid
-
-
- HIDE_do_export_start(int event_id, void* hid)
-
- Called before export redraw starts
-
-
- HIDE_do_export_finish(int event_id, void* hid)
-
- Called after export redraw finished
-
-
- HIDE_set_layer(int event_id, void* hid, const char* name, int group, int empty)
-
- PCB callback events for drawing: change layer
-
-
- HIDE_set_color(int event_id, void* hid, void* gc, const char* name)
-
- PCB callback events for drawing: change drawing color
-
-
- HIDE_set_line_cap(int event_id, void* hid, void* gc, EndCapStyle style)
-
- PCB callback events for drawing: change drawing line cap style
-
-
- HIDE_set_line_width(int event_id, void* hid, void* gc, int width)
-
- PCB callback events for drawing: change drawing line width
-
-
- HIDE_set_draw_xor(int event_id, void* hid, void* gc, int xor)
-
- PCB callback events for drawing: toggle xor drawing method
-
-
- HIDE_set_draw_faded(int event_id, void* hid, void* gc, int faded)
-
- PCB callback events for drawing: toggle faded drawing method
-
-
- HIDE_draw_line(int event_id, void* hid, void* gc, int x1, int y1, int x2, int y2)
-
- PCB callback events for drawing: draw a line
-
-
- HIDE_draw_arc(int event_id, void* hid, void* gc, int cx, int cy, int xradius, int yradius, double start_angle, double delta_angle)
-
- PCB callback events for drawing: draw an arc from center cx;cy
-
-
- HIDE_draw_rect(int event_id, void* hid, void* gc, int x1, int y1, int x2, int y2)
-
- PCB callback events for drawing: draw a rectangle
-
-
- HIDE_fill_circle(int event_id, void* hid, void* gc, int cx, int cy, int radius)
-
- PCB callback events for drawing: draw a filled circle
-
-
- HIDE_fill_polygon(int event_id, void* hid, void* gc, int n_coords, int* x, int* y)
-
- PCB callback events for drawing: draw a filled polygon
-
-
- HIDE_fill_rect(int event_id, void* hid, void* gc, int x1, int y1, int x2, int y2)
-
- PCB callback events for drawing: draw a filled rectangle
-
-
- HIDE_use_mask(int event_id, void* hid, int use_it)
-
- PCB callback events for drawing: TODO
-
-
- HIDE_make_gc(int event_id, void* hid, void* gc)
-
- PCB callback events for drawing: create a new graphical context
-
-
- HIDE_destroy_gc(int event_id, void* hid, void* gc)
-
- PCB callback events for drawing: destroy a graphical context
-
-
- HIDE_fill_pcb_pv(int event_id, void* hid, void* fg_gc, void* bg_gc, void* pad, int drawHole, int mask)
-
- PCB callback events for drawing: TODO
-
-
- HIDE_fill_pcb_pad(int event_id, void* hid, void* pad, int clear, int mask)
-
- PCB callback events for drawing: TODO
-
- Functions
-
-
-
-
-
-
Index: trunk/doc/user/06_feature/gpmi/packages/XREF
===================================================================
--- trunk/doc/user/06_feature/gpmi/packages/XREF (revision 21065)
+++ trunk/doc/user/06_feature/gpmi/packages/XREF (nonexistent)
@@ -1,85 +0,0 @@
-event ACTE_action ../packages/actions_ref.html#ACTE_action
-event ACTE_gui_init ../packages/actions_ref.html#ACTE_gui_init
-event ACTE_unload ../packages/actions_ref.html#ACTE_unload
-function action_register ../packages/actions_ref.html#action_register
-function action_arg ../packages/actions_ref.html#action_arg
-function action ../packages/actions_ref.html#action
-function create_menu ../packages/actions_ref.html#create_menu
-enum dialog_fileselect_e ../packages/dialogs_ref.html#dialog_fileselect_e
-function dialog_log ../packages/dialogs_ref.html#dialog_log
-function dialog_confirm ../packages/dialogs_ref.html#dialog_confirm
-function dialog_report ../packages/dialogs_ref.html#dialog_report
-function dialog_prompt ../packages/dialogs_ref.html#dialog_prompt
-function dialog_fileselect ../packages/dialogs_ref.html#dialog_fileselect
-function dialog_beep ../packages/dialogs_ref.html#dialog_beep
-function dialog_progress ../packages/dialogs_ref.html#dialog_progress
-function dialog_attribute ../packages/dialogs_ref.html#dialog_attribute
-enum hid_attr_type_e ../packages/hid_ref.html#hid_attr_type_e
-enum EndCapStyle_e ../packages/hid_ref.html#EndCapStyle_e
-event HIDE_get_export_options ../packages/hid_ref.html#HIDE_get_export_options
-event HIDE_do_export_start ../packages/hid_ref.html#HIDE_do_export_start
-event HIDE_do_export_finish ../packages/hid_ref.html#HIDE_do_export_finish
-event HIDE_set_layer ../packages/hid_ref.html#HIDE_set_layer
-event HIDE_set_color ../packages/hid_ref.html#HIDE_set_color
-event HIDE_set_line_cap ../packages/hid_ref.html#HIDE_set_line_cap
-event HIDE_set_line_width ../packages/hid_ref.html#HIDE_set_line_width
-event HIDE_set_draw_xor ../packages/hid_ref.html#HIDE_set_draw_xor
-event HIDE_set_draw_faded ../packages/hid_ref.html#HIDE_set_draw_faded
-event HIDE_draw_line ../packages/hid_ref.html#HIDE_draw_line
-event HIDE_draw_arc ../packages/hid_ref.html#HIDE_draw_arc
-event HIDE_draw_rect ../packages/hid_ref.html#HIDE_draw_rect
-event HIDE_fill_circle ../packages/hid_ref.html#HIDE_fill_circle
-event HIDE_fill_polygon ../packages/hid_ref.html#HIDE_fill_polygon
-event HIDE_fill_rect ../packages/hid_ref.html#HIDE_fill_rect
-event HIDE_use_mask ../packages/hid_ref.html#HIDE_use_mask
-event HIDE_make_gc ../packages/hid_ref.html#HIDE_make_gc
-event HIDE_destroy_gc ../packages/hid_ref.html#HIDE_destroy_gc
-event HIDE_fill_pcb_pv ../packages/hid_ref.html#HIDE_fill_pcb_pv
-event HIDE_fill_pcb_pad ../packages/hid_ref.html#HIDE_fill_pcb_pad
-function hid_create ../packages/hid_ref.html#hid_create
-function hid_add_attribute ../packages/hid_ref.html#hid_add_attribute
-function hid_get_attribute ../packages/hid_ref.html#hid_get_attribute
-function hid_register ../packages/hid_ref.html#hid_register
-function hid_gpmi_data_set ../packages/hid_ref.html#hid_gpmi_data_set
-function hid_gpmi_data_get ../packages/hid_ref.html#hid_gpmi_data_get
-function hid_string2val ../packages/hid_ref.html#hid_string2val
-enum layout_object_mask_e ../packages/layout_ref.html#layout_object_mask_e
-enum layout_object_coord_e ../packages/layout_ref.html#layout_object_coord_e
-enum layout_flag_e ../packages/layout_ref.html#layout_flag_e
-enum layer_field_e ../packages/layout_ref.html#layer_field_e
-function layout_search_box ../packages/layout_ref.html#layout_search_box
-function layout_search_selected ../packages/layout_ref.html#layout_search_selected
-function layout_search_found ../packages/layout_ref.html#layout_search_found
-function layout_search_get ../packages/layout_ref.html#layout_search_get
-function layout_search_free ../packages/layout_ref.html#layout_search_free
-function layout_obj_coord ../packages/layout_ref.html#layout_obj_coord
-function layout_obj_type ../packages/layout_ref.html#layout_obj_type
-function layout_obj_move ../packages/layout_ref.html#layout_obj_move
-function layout_arc_angles ../packages/layout_ref.html#layout_arc_angles
-function layout_create_line ../packages/layout_ref.html#layout_create_line
-function layout_create_via ../packages/layout_ref.html#layout_create_via
-function layout_create_arc ../packages/layout_ref.html#layout_create_arc
-function layout_switch_to_layer ../packages/layout_ref.html#layout_switch_to_layer
-function layout_get_current_layer ../packages/layout_ref.html#layout_get_current_layer
-function layout_resolve_layer ../packages/layout_ref.html#layout_resolve_layer
-function layout_get_max_possible_layer ../packages/layout_ref.html#layout_get_max_possible_layer
-function layout_get_max_copper_layer ../packages/layout_ref.html#layout_get_max_copper_layer
-function layout_get_max_layer ../packages/layout_ref.html#layout_get_max_layer
-function layout_layer_name ../packages/layout_ref.html#layout_layer_name
-function layout_layer_color ../packages/layout_ref.html#layout_layer_color
-function layout_layer_field ../packages/layout_ref.html#layout_layer_field
-function layout_get_page_width ../packages/layout_ref.html#layout_get_page_width
-function layout_get_page_height ../packages/layout_ref.html#layout_get_page_height
-function layout_set_page_size ../packages/layout_ref.html#layout_set_page_size
-function mil2pcb_multiplier ../packages/layout_ref.html#mil2pcb_multiplier
-function mm2pcb_multiplier ../packages/layout_ref.html#mm2pcb_multiplier
-function current_grid_unit ../packages/layout_ref.html#current_grid_unit
-function debug_draw_request ../packages/layout_ref.html#debug_draw_request
-function debug_draw_flush ../packages/layout_ref.html#debug_draw_flush
-function debug_draw_finish ../packages/layout_ref.html#debug_draw_finish
-function debug_draw_dctx ../packages/layout_ref.html#debug_draw_dctx
-function draw_set_color ../packages/layout_ref.html#draw_set_color
-function draw_set_line_width ../packages/layout_ref.html#draw_set_line_width
-function draw_set_draw_xor ../packages/layout_ref.html#draw_set_draw_xor
-function draw_set_draw_faded ../packages/layout_ref.html#draw_set_draw_faded
-function draw_line ../packages/layout_ref.html#draw_line
Index: trunk/doc/user/06_feature/gpmi/packages/dialogs.html
===================================================================
--- trunk/doc/user/06_feature/gpmi/packages/dialogs.html (revision 21065)
+++ trunk/doc/user/06_feature/gpmi/packages/dialogs.html (nonexistent)
@@ -1,47 +0,0 @@
-
-
- hid_t* hid_create(char* hid_name, char* description)
-
- Creates a new hid context. Name and description matters only if the hid is
-registered as an exporter later.
-
-
- int hid_add_attribute(hid_t* hid, char* attr_name, char* help, hid_attr_type_t type, int min, int max, char* default_val)
-
- Append an attribute in a hid previously created using hid_create().
- Arguments:
- hid: hid_t previously created using hid_create()
- attr_name: name of the attribute
- help: help text for the attribute
- type: type of the attribute (input widget type)
- min: minimum value of the attribute, if type is integer or real)
- max: maximum value of the attribute, if type is integer or real)
- default_val: default value of the attribute
- Returns an unique ID of the attribute the caller should store for
- later reference. For example this ID is used when retrieving the
- value of the attribute after the user finished entering data in
- the dialog.
-
-
- char* hid_get_attribute(hid_t* hid, int attr_id)
-
- Query an attribute from the hid after dialog_attributes() returned.
- Arguments:
- hid: hid_t previously created using hid_create()
- attr_id: the unique ID of the attribute (returned by hid_add_attribute())
- Returns the value (converted to string) set by the user.
-
-
- int hid_register(hid_t* hid)
-
- Register the hid; call it after a hid is created and its attributes
- are all set up
-
-
- void hid_gpmi_data_set(hid_t* h, void* data)
-
- For internal use
-
-
- hid_t* hid_gpmi_data_get(HID* h)
-
- For internal use
-
-
- HID_Attr_Val hid_string2val(const hid_attr_type_t type, const char* str)
-
- For internal use
-
- dialogs package
- The purpose of this package is to expose the dialog box handling interface
- of the active GUI hid. Using this package scripts can pop up dialog boxes
- to inform or ask the user. If there is no active GUI, call logs are dumped
- on stderr. Note: message arguments usually may contain newline (\n) characters
- to split the message.
-
- Common conventions
- Dialog boxes are blocking calls to the GUI HID: when the script
- calls a dialog box, the script is suspended until the dialog box
- is closed by the user. In other words, dialog boxes behave
- as regular function calls from the scripts: when they return,
- the dialog is over and the result is known.
- Simple dialogs vs. custom dialogs
- Most of the calls will pop up a static dialog box. Static means
- that widgets are predefined by the GUI HID. The script
- is free to fill in data, but can not change the basic structure of
- the dialog box. For example dialog_confirm(), dialog_prompt(),
- dialog_fileselect() are static.
- Progress dialogs
-
- The script should call dialog_progress() periodically from a process that
- runs time consuming calculations and check the return value and break
- the loop on cancel. The process should have an idea of how long it
- will take. This is passed on in argument total. As long as
- argument so_far is less than total, the dialog is
- open.
- 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().
-
-
-
- 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:
-
-
-
- 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:
-
-
-
-
-
Index: trunk/doc/user/06_feature/gpmi/packages/layout_ref.html
===================================================================
--- trunk/doc/user/06_feature/gpmi/packages/layout_ref.html (revision 21065)
+++ trunk/doc/user/06_feature/gpmi/packages/layout_ref.html (nonexistent)
@@ -1,300 +0,0 @@
-
-
-PCB GPMI
-Reference manual for package layout
-Automatically generated from layout.h
-
- Enums
-
-
- layout_object_mask_e
-
- Object type search mask bits
-
-
-
-
-value meaning
- OM_LINE lines (traces, silk lines, not font)
- OM_TEXT text written using the font
- OM_POLYGON polygons, including rectangles
- OM_ARC arcs, circles
- OM_VIA vias and holes which are not part of a footprint
- OM_PIN pins/pads of a footprint
- OM_ANY shorthand for "find anything"
- layout_object_coord_e
-
- Which coordinate of the object is referenced
-
-
-
-
-value meaning
- OC_BX1 bounding box X1
- OC_BX2 bounding box X2
- OC_BY1 bounding box Y1
- OC_BY2 bounding box Y2
- OC_P1X point 1 X
- OC_P2X point 2 X
- OC_P1Y point 1 Y
- OC_P2Y point 2 Y
- OC_OBJ the whole object
- OC_P1 point 1 is P1X
- OC_P2 point 2 is P2X
- layout_flag_e
-
- of layout_object_coord_t
-
-
-
-
-value meaning
- FL_NONE <comment missing in the header>
- FL_SHOWNUMBER <comment missing in the header>
- FL_LOCALREF <comment missing in the header>
- FL_CHECKPLANS <comment missing in the header>
- FL_SHOWDRC <comment missing in the header>
- FL_RUBBERBAND <comment missing in the header>
- FL_DESCRIPTION <comment missing in the header>
- FL_NAMEONPCB <comment missing in the header>
- FL_AUTODRC <comment missing in the header>
- FL_ALLDIRECTION <comment missing in the header>
- FL_SWAPSTARTDIR <comment missing in the header>
- FL_UNIQUENAME <comment missing in the header>
- FL_CLEARNEW <comment missing in the header>
- FL_SNAPPIN <comment missing in the header>
- FL_SHOWMASK <comment missing in the header>
- FL_THINDRAW <comment missing in the header>
- FL_ORTHOMOVE <comment missing in the header>
- FL_LIVEROUTE <comment missing in the header>
- FL_THINDRAWPOLY <comment missing in the header>
- FL_LOCKNAMES <comment missing in the header>
- FL_ONLYNAMES <comment missing in the header>
- FL_NEWFULLPOLY <comment missing in the header>
- FL_HIDENAMES <comment missing in the header>
- FL_THERMALSTYLE1 <comment missing in the header>
- FL_THERMALSTYLE2 <comment missing in the header>
- FL_THERMALSTYLE3 <comment missing in the header>
- FL_THERMALSTYLE4 <comment missing in the header>
- FL_THERMALSTYLE5 <comment missing in the header>
- layer_field_e
-
- Field name of the layer structure
-
-
-
-value meaning
- LFLD_NUM_LINES number of lines on the layer
- LFLD_NUM_TEXTS number of texts on the layer
- LFLD_NUM_POLYS number of polygons on the layer
- LFLD_NUM_ARCS number of arcs on the layer
- LFLD_VISIBLE non-zero if the layer is visible
- LFLD_NODRC non-zero if the layer doesn't use DRC
- Functions
-
-
-
-
-
-
Index: trunk/doc/user/06_feature/gpmi/packages/Makefile
===================================================================
--- trunk/doc/user/06_feature/gpmi/packages/Makefile (revision 21065)
+++ trunk/doc/user/06_feature/gpmi/packages/Makefile (nonexistent)
@@ -1,15 +0,0 @@
-ROOT=../../../../..
-GPMIDIR=$(ROOT)/src_plugins/gpmi/pcb-gpmi
-ALL= actions dialogs hid layout
-
-all: XREF $(ALL:%=%_ref.html)
-
-include $(GPMIDIR)/Makefile.config
-
-%_ref.html REF.% : $(GPMIDIR)/gpmi_plugin/gpmi_pkg/%.h
- $(ROOT)/util/genref.sh "$^" "$(ROOT)" "../packages/$*_ref.html" $(PCB_CFLAGS) >$*_ref.html
-
-XREF: $(ALL:%=REF.%)
- cat $^ > $@
-
-
Index: trunk/doc/user/06_feature/index.html
===================================================================
--- trunk/doc/user/06_feature/index.html (revision 21065)
+++ trunk/doc/user/06_feature/index.html (revision 21066)
@@ -21,7 +21,6 @@
int layout_search_box(const char* search_ID, layout_object_mask_t obj_types, int x1, int y1, int x2, int y2)
-
- creates a new search and adds all objects that matches obj_types mask within the given rectangle on the current layer
- Arguments:
- search_ID: unique name of the search (overwrites existing search on the same name)
- obj_types: on or more object types
- x1, y1, x2, y2: box the search is done within (PCB coords)
- Returns the number of object on the search list.
-
-
- int layout_search_selected(const char* search_ID, layout_object_mask_t obj_types)
-
- creates a new search and adds all selected objects
- Arguments:
- search_ID: unique name of the search (overwrites existing search on the same name)
- obj_types: on or more object types
- Returns the number of object on the search list.
-
-
- int layout_search_found(const char* search_ID, layout_object_mask_t obj_types)
-
- creates a new search and adds all found objects (the green highlight)
- Arguments:
- search_ID: unique name of the search (overwrites existing search on the same name)
- obj_types: on or more object types
- Returns the number of object on the search list.
-
-
- layout_object_t* layout_search_get(const char* search_ID, int n)
-
- Returns the nth object from a search list (or NULL pointer if n is beyond the list)
-
-
- int layout_search_free(const char* search_ID)
-
- Frees all memory related to a search. Returns 0 on success.
- Argument:
- search_ID: unique name of the search (requires an existing search)
-
-
- int layout_obj_coord(layout_object_t* obj, layout_object_coord_t coord)
-
- Return the requested coord of an object; except for the bounding box
- coordinates, the meaning of coordinates are object-specific.
- Point 1 and point 2 are usually endpoints of the object (line, arc),
- "the whole object" coordinate is a central point.
-
-
- layout_object_mask_t layout_obj_type(layout_object_t* obj)
-
- Return the type of an object (always a single bit)
-
-
- int layout_obj_move(layout_object_t* obj, layout_object_coord_t coord, int dx, int dy)
-
- Change location of an object or parts of the object (like move endpoint of a line);
- Arguments:
- obj: the object
- coord: which coordinate to drag (e.g. move only the endpoint)
- dx, dy: relative x and y coordinates the selected coordinate is displaced by
- Returns 0 on success
-
-
- int layout_arc_angles(layout_object_t* obj, int relative, int start, int delta)
-
- change angles of an arc; start and delta are relative if relative is non-zero; returns 0 on success
-
-
- int layout_create_line(int x1, int y1, int x2, int y2, int thickness, int clearance, layout_flag_t flags)
-
- create a line
-
-
- int layout_create_via(int x, int y, int thickness, int clearance, int mask, int hole, const char* name, layout_flag_t flags)
-
- create a named via
-
-
- int layout_create_arc(int x, int y, int width, int height, int sa, int dir, int thickness, int clearance, layout_flag_t flags)
-
- create a new arc; sa is start angle, dir is delta angle
-
-
- void layout_switch_to_layer(int layer)
-
- switch to layer (further layer-specific actions will take place there)
-
-
- int layout_get_current_layer()
-
- returns the number of the current layer
-
-
- int layout_resolve_layer(const char* name)
-
- resolve layer number by name (case sensitive); returns negative number if not found
-
-
- int layout_get_max_possible_layer()
-
- return the theoretical number of layers supported by PCB
-
-
- int layout_get_max_layer()
-
- return the actual number of layers on the current design
-
-
- const char* layout_layer_name(int layer)
-
- return the name of a layer
-
-
- const char* layout_layer_color(int layer)
-
- return the color of a layer
-
-
- int layout_layer_field(int layer, layer_field_t fld)
-
- return an integer field of a layer
-
-
- int layout_get_page_width()
-
- query or set width and height of the drawing
-
-
- int layout_get_page_height()
-
-<comment missing in the header>
-
-
- void layout_set_page_size(int width, int height)
-
-<comment missing in the header>
-
-
- double mil2pcb_multiplier()
-
- -- coordinate system -- (coord.c)
-
-
- double mm2pcb_multiplier()
-
-<comment missing in the header>
-
-
- const char* current_grid_unit()
-
-<comment missing in the header>
-
-
- int debug_draw_request(void)
-
- Initialize debug drawing; returns 1 if worked, 0 if denied
-
-
- void debug_draw_flush(void)
-
- Flush the drawing
-
-
- void debug_draw_finish(dctx_t* ctx)
-
- Finish (close) drawing
-
-
- dctx_t* debug_draw_dctx(void)
-
- Get the draw context of debug draw
-
-
- void draw_set_color(dctx_t* ctx, const char* name)
-
- Debug draw style: set drawing color
-
-
- void draw_set_line_width(dctx_t* ctx, int width)
-
- Debug draw style: set line width
-
-
- void draw_set_draw_xor(dctx_t* ctx, int xor)
-
- Debug draw style: set whether drawing should happen in xor
-
-
- void draw_set_draw_faded(dctx_t* ctx, int faded)
-
- Debug draw style: set whether drawing should happen in faded mode
-
-
- void draw_line(dctx_t* ctx, int x1_, int y1_, int x2_, int y2_)
-
- Debug draw: draw a line using the current style settings
-
- Action Reference
Action Description Syntax Plugin
About Present the about box About() dialogs plugin
@@ -242,7 +242,6 @@
extedit extedit(object|selected, [interactive|method]) Invoke an external program to edit a specific part of the current board. extedit plugin
forcecolor change selected objects' color to #RRGGBB, reset if does not start with '#' forcecolor(#RRGGBB) diag plugin
fp_rehash Flush the library index; rescan all library search paths and rebuild the library index. Useful if there are changes in the library during a pcb-rnd session. fp_rehash()
- gpmi_scripts Manage gpmi scripts TODO GPMI plugin cookie
h Print a help message for commands. h shand_cmd plugin
integrity perform integrirty check on the current board and generate errors if needed integrity() diag plugin
javascript Execute a script one-liner using a specific language Oneliner(lang, script) script plugin
@@ -271,7 +270,6 @@
q Quits the application after confirming. q shand_cmd plugin
query Perform various queries on PCB data. query(dump, expr) - dry run: compile and dump an expression
regpoly Generate regular polygon. Where is x;y and radius is either r or rx;ry. Rotation is in degrees. regpoly([where,] corners, radius [,rotation]) shape plugin
-rehash Reload all gpmi scripts TODO GPMI plugin cookie
rn Reads netlist. rn [name] shand_cmd plugin
roundrect Generate a rectangle with round corners roundrect([where,] width[;height] [,rx[;ry] [,rotation]]) shape plugin
ruby Execute a script one-liner using a specific language Oneliner(lang, script) script plugin
Index: trunk/doc/user/Makefile.inst
===================================================================
--- trunk/doc/user/Makefile.inst (revision 21065)
+++ trunk/doc/user/Makefile.inst (revision 21066)
@@ -89,114 +89,6 @@
$(SCCBOX) $(HOW) 06_feature/djopt/viatrim.pcb $(USERDIR)/06_feature/djopt/viatrim.pcb
$(SCCBOX) $(HOW) 06_feature/djopt/viatrim.png $(USERDIR)/06_feature/djopt/viatrim.png
$(SCCBOX) $(HOW) 06_feature/djopt/viatrim.txt $(USERDIR)/06_feature/djopt/viatrim.txt
- $(SCCBOX) mkdir -p $(USERDIR)/06_feature/gpmi
- $(SCCBOX) $(HOW) 06_feature/gpmi/Credits $(USERDIR)/06_feature/gpmi/Credits
- $(SCCBOX) $(HOW) 06_feature/gpmi/History $(USERDIR)/06_feature/gpmi/History
- $(SCCBOX) $(HOW) 06_feature/gpmi/Makefile $(USERDIR)/06_feature/gpmi/Makefile
- $(SCCBOX) $(HOW) 06_feature/gpmi/Porting $(USERDIR)/06_feature/gpmi/Porting
- $(SCCBOX) $(HOW) 06_feature/gpmi/gpmi_flow.dot $(USERDIR)/06_feature/gpmi/gpmi_flow.dot
- $(SCCBOX) $(HOW) 06_feature/gpmi/gpmi_flow.png $(USERDIR)/06_feature/gpmi/gpmi_flow.png
- $(SCCBOX) $(HOW) 06_feature/gpmi/gpmi_flow_exp.dot $(USERDIR)/06_feature/gpmi/gpmi_flow_exp.dot
- $(SCCBOX) $(HOW) 06_feature/gpmi/gpmi_flow_exp.png $(USERDIR)/06_feature/gpmi/gpmi_flow_exp.png
- $(SCCBOX) $(HOW) 06_feature/gpmi/gpmi_flow_load.dot $(USERDIR)/06_feature/gpmi/gpmi_flow_load.dot
- $(SCCBOX) $(HOW) 06_feature/gpmi/gpmi_flow_load.png $(USERDIR)/06_feature/gpmi/gpmi_flow_load.png
- $(SCCBOX) $(HOW) 06_feature/gpmi/gpmi_flow_menu.dot $(USERDIR)/06_feature/gpmi/gpmi_flow_menu.dot
- $(SCCBOX) $(HOW) 06_feature/gpmi/gpmi_flow_menu.png $(USERDIR)/06_feature/gpmi/gpmi_flow_menu.png
- $(SCCBOX) $(HOW) 06_feature/gpmi/gpmi_flow_reg.dot $(USERDIR)/06_feature/gpmi/gpmi_flow_reg.dot
- $(SCCBOX) $(HOW) 06_feature/gpmi/gpmi_flow_reg.png $(USERDIR)/06_feature/gpmi/gpmi_flow_reg.png
- $(SCCBOX) $(HOW) 06_feature/gpmi/gpmi_temp_inst.txt $(USERDIR)/06_feature/gpmi/gpmi_temp_inst.txt
- $(SCCBOX) $(HOW) 06_feature/gpmi/index.html $(USERDIR)/06_feature/gpmi/index.html
- $(SCCBOX) mkdir -p $(USERDIR)/06_feature/gpmi/packages
- $(SCCBOX) $(HOW) 06_feature/gpmi/packages/Makefile $(USERDIR)/06_feature/gpmi/packages/Makefile
- $(SCCBOX) $(HOW) 06_feature/gpmi/packages/XREF $(USERDIR)/06_feature/gpmi/packages/XREF
- $(SCCBOX) $(HOW) 06_feature/gpmi/packages/actions.html $(USERDIR)/06_feature/gpmi/packages/actions.html
- $(SCCBOX) $(HOW) 06_feature/gpmi/packages/actions_ref.html $(USERDIR)/06_feature/gpmi/packages/actions_ref.html
- $(SCCBOX) $(HOW) 06_feature/gpmi/packages/dialogs.html $(USERDIR)/06_feature/gpmi/packages/dialogs.html
- $(SCCBOX) $(HOW) 06_feature/gpmi/packages/dialogs_ref.html $(USERDIR)/06_feature/gpmi/packages/dialogs_ref.html
- $(SCCBOX) $(HOW) 06_feature/gpmi/packages/event_id.html $(USERDIR)/06_feature/gpmi/packages/event_id.html
- $(SCCBOX) $(HOW) 06_feature/gpmi/packages/hid.html $(USERDIR)/06_feature/gpmi/packages/hid.html
- $(SCCBOX) $(HOW) 06_feature/gpmi/packages/hid_ref.html $(USERDIR)/06_feature/gpmi/packages/hid_ref.html
- $(SCCBOX) $(HOW) 06_feature/gpmi/packages/layout.html $(USERDIR)/06_feature/gpmi/packages/layout.html
- $(SCCBOX) $(HOW) 06_feature/gpmi/packages/layout_ref.html $(USERDIR)/06_feature/gpmi/packages/layout_ref.html
- $(SCCBOX) mkdir -p $(USERDIR)/06_feature/gpmi/rosetta/10_hello
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello/ID.desc $(USERDIR)/06_feature/gpmi/rosetta/10_hello/ID.desc
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello/ID.name $(USERDIR)/06_feature/gpmi/rosetta/10_hello/ID.name
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello/ex.awk $(USERDIR)/06_feature/gpmi/rosetta/10_hello/ex.awk
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello/ex.bash $(USERDIR)/06_feature/gpmi/rosetta/10_hello/ex.bash
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello/ex.html $(USERDIR)/06_feature/gpmi/rosetta/10_hello/ex.html
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello/ex.lua $(USERDIR)/06_feature/gpmi/rosetta/10_hello/ex.lua
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello/ex.pl $(USERDIR)/06_feature/gpmi/rosetta/10_hello/ex.pl
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello/ex.py $(USERDIR)/06_feature/gpmi/rosetta/10_hello/ex.py
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello/ex.rb $(USERDIR)/06_feature/gpmi/rosetta/10_hello/ex.rb
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello/ex.scm $(USERDIR)/06_feature/gpmi/rosetta/10_hello/ex.scm
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello/ex.stt $(USERDIR)/06_feature/gpmi/rosetta/10_hello/ex.stt
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello/ex.tcl $(USERDIR)/06_feature/gpmi/rosetta/10_hello/ex.tcl
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello/index.html $(USERDIR)/06_feature/gpmi/rosetta/10_hello/index.html
- $(SCCBOX) mkdir -p $(USERDIR)/06_feature/gpmi/rosetta/10_hello_gui
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello_gui/ID.desc $(USERDIR)/06_feature/gpmi/rosetta/10_hello_gui/ID.desc
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello_gui/ID.name $(USERDIR)/06_feature/gpmi/rosetta/10_hello_gui/ID.name
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello_gui/ex.awk $(USERDIR)/06_feature/gpmi/rosetta/10_hello_gui/ex.awk
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello_gui/ex.bash $(USERDIR)/06_feature/gpmi/rosetta/10_hello_gui/ex.bash
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello_gui/ex.html $(USERDIR)/06_feature/gpmi/rosetta/10_hello_gui/ex.html
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello_gui/ex.lua $(USERDIR)/06_feature/gpmi/rosetta/10_hello_gui/ex.lua
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello_gui/ex.pl $(USERDIR)/06_feature/gpmi/rosetta/10_hello_gui/ex.pl
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello_gui/ex.py $(USERDIR)/06_feature/gpmi/rosetta/10_hello_gui/ex.py
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello_gui/ex.rb $(USERDIR)/06_feature/gpmi/rosetta/10_hello_gui/ex.rb
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello_gui/ex.scm $(USERDIR)/06_feature/gpmi/rosetta/10_hello_gui/ex.scm
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello_gui/ex.stt $(USERDIR)/06_feature/gpmi/rosetta/10_hello_gui/ex.stt
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello_gui/ex.tcl $(USERDIR)/06_feature/gpmi/rosetta/10_hello_gui/ex.tcl
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/10_hello_gui/index.html $(USERDIR)/06_feature/gpmi/rosetta/10_hello_gui/index.html
- $(SCCBOX) mkdir -p $(USERDIR)/06_feature/gpmi/rosetta/12_hello_menu
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/12_hello_menu/ID.desc $(USERDIR)/06_feature/gpmi/rosetta/12_hello_menu/ID.desc
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/12_hello_menu/ID.name $(USERDIR)/06_feature/gpmi/rosetta/12_hello_menu/ID.name
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/12_hello_menu/ex.awk $(USERDIR)/06_feature/gpmi/rosetta/12_hello_menu/ex.awk
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/12_hello_menu/ex.bash $(USERDIR)/06_feature/gpmi/rosetta/12_hello_menu/ex.bash
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/12_hello_menu/ex.html $(USERDIR)/06_feature/gpmi/rosetta/12_hello_menu/ex.html
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/12_hello_menu/ex.lua $(USERDIR)/06_feature/gpmi/rosetta/12_hello_menu/ex.lua
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/12_hello_menu/ex.pl $(USERDIR)/06_feature/gpmi/rosetta/12_hello_menu/ex.pl
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/12_hello_menu/ex.py $(USERDIR)/06_feature/gpmi/rosetta/12_hello_menu/ex.py
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/12_hello_menu/ex.rb $(USERDIR)/06_feature/gpmi/rosetta/12_hello_menu/ex.rb
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/12_hello_menu/ex.scm $(USERDIR)/06_feature/gpmi/rosetta/12_hello_menu/ex.scm
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/12_hello_menu/ex.stt $(USERDIR)/06_feature/gpmi/rosetta/12_hello_menu/ex.stt
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/12_hello_menu/ex.tcl $(USERDIR)/06_feature/gpmi/rosetta/12_hello_menu/ex.tcl
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/12_hello_menu/index.html $(USERDIR)/06_feature/gpmi/rosetta/12_hello_menu/index.html
- $(SCCBOX) mkdir -p $(USERDIR)/06_feature/gpmi/rosetta/30_move
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/30_move/ID.desc $(USERDIR)/06_feature/gpmi/rosetta/30_move/ID.desc
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/30_move/ID.name $(USERDIR)/06_feature/gpmi/rosetta/30_move/ID.name
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/30_move/ex.awk $(USERDIR)/06_feature/gpmi/rosetta/30_move/ex.awk
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/30_move/ex.bash $(USERDIR)/06_feature/gpmi/rosetta/30_move/ex.bash
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/30_move/ex.html $(USERDIR)/06_feature/gpmi/rosetta/30_move/ex.html
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/30_move/ex.lua $(USERDIR)/06_feature/gpmi/rosetta/30_move/ex.lua
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/30_move/ex.pl $(USERDIR)/06_feature/gpmi/rosetta/30_move/ex.pl
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/30_move/ex.py $(USERDIR)/06_feature/gpmi/rosetta/30_move/ex.py
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/30_move/ex.rb $(USERDIR)/06_feature/gpmi/rosetta/30_move/ex.rb
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/30_move/ex.scm $(USERDIR)/06_feature/gpmi/rosetta/30_move/ex.scm
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/30_move/ex.stt $(USERDIR)/06_feature/gpmi/rosetta/30_move/ex.stt
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/30_move/ex.tcl $(USERDIR)/06_feature/gpmi/rosetta/30_move/ex.tcl
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/30_move/index.html $(USERDIR)/06_feature/gpmi/rosetta/30_move/index.html
- $(SCCBOX) mkdir -p $(USERDIR)/06_feature/gpmi/rosetta/35_export_drill
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/35_export_drill/ID.desc $(USERDIR)/06_feature/gpmi/rosetta/35_export_drill/ID.desc
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/35_export_drill/ID.name $(USERDIR)/06_feature/gpmi/rosetta/35_export_drill/ID.name
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/35_export_drill/ex.awk $(USERDIR)/06_feature/gpmi/rosetta/35_export_drill/ex.awk
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/35_export_drill/ex.html $(USERDIR)/06_feature/gpmi/rosetta/35_export_drill/ex.html
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/35_export_drill/ex.lua $(USERDIR)/06_feature/gpmi/rosetta/35_export_drill/ex.lua
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/35_export_drill/ex.tcl $(USERDIR)/06_feature/gpmi/rosetta/35_export_drill/ex.tcl
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/35_export_drill/index.html $(USERDIR)/06_feature/gpmi/rosetta/35_export_drill/index.html
- $(SCCBOX) mkdir -p $(USERDIR)/06_feature/gpmi/rosetta/90_clock
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/90_clock/ID.desc $(USERDIR)/06_feature/gpmi/rosetta/90_clock/ID.desc
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/90_clock/ID.name $(USERDIR)/06_feature/gpmi/rosetta/90_clock/ID.name
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/90_clock/ex.awk $(USERDIR)/06_feature/gpmi/rosetta/90_clock/ex.awk
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/90_clock/ex.html $(USERDIR)/06_feature/gpmi/rosetta/90_clock/ex.html
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/90_clock/index.html $(USERDIR)/06_feature/gpmi/rosetta/90_clock/index.html
- $(SCCBOX) mkdir -p $(USERDIR)/06_feature/gpmi/rosetta
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/Makefile $(USERDIR)/06_feature/gpmi/rosetta/Makefile
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/index.html $(USERDIR)/06_feature/gpmi/rosetta/index.html
- $(SCCBOX) $(HOW) 06_feature/gpmi/rosetta/index.templ.html $(USERDIR)/06_feature/gpmi/rosetta/index.templ.html
- $(SCCBOX) $(HOW) 06_feature/gpmi/scripting_intro.html $(USERDIR)/06_feature/gpmi/scripting_intro.html
- $(SCCBOX) mkdir -p $(USERDIR)/06_feature/gpmi/util
- $(SCCBOX) $(HOW) 06_feature/gpmi/util/Makefile $(USERDIR)/06_feature/gpmi/util/Makefile
- $(SCCBOX) $(HOW) 06_feature/gpmi/util/rosetta_genpages.sh $(USERDIR)/06_feature/gpmi/util/rosetta_genpages.sh
- $(SCCBOX) $(HOW) 06_feature/gpmi/util/tags $(USERDIR)/06_feature/gpmi/util/tags
$(SCCBOX) mkdir -p $(USERDIR)/06_feature
$(SCCBOX) $(HOW) 06_feature/index.html $(USERDIR)/06_feature/index.html
$(SCCBOX) mkdir -p $(USERDIR)/06_feature/query