action (scripts) | 500 | using the CreateMenu() action
Index: trunk/doc/user/06_feature/autocrop/index.html
===================================================================
--- trunk/doc/user/06_feature/autocrop/index.html (revision 34890)
+++ trunk/doc/user/06_feature/autocrop/index.html (revision 34891)
@@ -20,7 +20,7 @@
Use:
-Bind autocrop to a key in the appropriate pcb-menu-*.lht for your preferred pcb-rnd gui.
+You may want to bind autocrop to a key in a menu patch.
Issues:
Autocrop will move the objects to crop the layout, and as a consequence autocrop() plugin will take time to calculate for complex layouts.
Index: trunk/scconfig/Rev.h
===================================================================
--- trunk/scconfig/Rev.h (revision 34890)
+++ trunk/scconfig/Rev.h (revision 34891)
@@ -1 +1 @@
-static const int myrev = 34772;
+static const int myrev = 34891;
Index: trunk/scconfig/Rev.tab
===================================================================
--- trunk/scconfig/Rev.tab (revision 34890)
+++ trunk/scconfig/Rev.tab (revision 34891)
@@ -1,3 +1,4 @@
+34891 configure renames for 3.0.0
34772 configure version bump to 3.0.0-dev and related API changes in librnd
34707 configure new release version
34691 configure io_pads: disable write code but enable the plugin by default
Index: trunk/src/pcb-menu-default.lht
===================================================================
--- trunk/src/pcb-menu-default.lht (revision 34890)
+++ trunk/src/pcb-menu-default.lht (nonexistent)
@@ -1,983 +0,0 @@
-ha:rnd-menu-v1 {
- li:mouse {
- li:left {
- li:press = { Tool(Press) }
- li:press-shift = { Tool(Press) }
- li:press-ctrl = { Tool(Save); Tool(arrow); Tool(Restore); Tool(Press) }
- li:release = { Tool(Release) }
- li:release-shift = { Tool(Release) }
- li:release-ctrl = { Tool(Release) }
- }
- li:middle {
- li:press = { Pan(1) }
- li:release = { Pan(0) }
- }
- li:right {
- li:press = { Tool(Stroke) }
- li:release = { Tool(Release); Popup(popup-obj, obj-type) }
- li:shift-release = { Popup(popup-obj-misc) }
- }
- li:scroll-up {
- li:press = { Zoom(0.8) }
- li:press-shift = { Scroll(up) }
- li:press-ctrl = { Scroll(left) }
- }
- li:scroll-down {
- li:press = { Zoom(1.25) }
- li:press-shift = { Scroll(down) }
- li:press-ctrl = { Scroll(right) }
- }
- }
-
- # List of tool names for the toolbar.
- # Do not specify keys here, they are specified in the menu; the GUI will
- # not pick up keys from this subtree. There's also no action here: the
- # plugin handling this subtree will always pick the tool.
- li:toolbar_static {
- ha:via {tip={place a via on the board}}
- ha:line {tip={draw a line segment (trace) on the board}}
- ha:arc {tip={draw an arc segment (trace) on the board}}
- ha:text {tip={draw text on the board}}
- ha:rectangle {tip={draw a rectangular polygon on the board}}
- ha:poly {tip={draw a polygon on the board}}
- ha:polyhole {tip={cut out a hole from existing polygons on the board}}
- ha:buffer {tip={paste the current buffer on the board}}
- ha:remove {tip={remove an object from the board}}
- ha:rotate {tip={rotate an object on the board}}
- ha:insert {tip={insert a point in a trace or polygon contour}}
- ha:thermal {tip={change thermal connectivity of a pin or via}}
- ha:arrow {tip={switch to arrow mode}}
- ha:lock {tip={lock or unlock objects on the board}}
- }
-
- li:main_menu {
-
- ha:File {
- li:submenu {
- ha:Start New Layout = { li:a={{f;n}; {Ctrln};}; action=New() }
- ha:Revert = { a={f;r}; action=Load(Revert,none); tip=Revert to the layout stored on disk }
- -
- ha:Load layout... = { li:a={{f;o};{f;l};} action=Load(Layout); tip=Load a layout from a file }
- -
- ha:Save Layout = { li:a={{f;s}; {Ctrls};}; action=Save(Layout); tip=Saves current layout }
- ha:Save Layout As... = { li:a={{f;a}; {Shift Ctrls};}; action=Save(LayoutAs); tip=Saves current layout into a new file }
- -
- ha:Import {
- li:submenu {
- ha:Import schematics... = { action=ImportSch() }
- ha:Configure import schematics... = { action=ImportSch(dialog) }
- @import_top
- ha:Import AnyLoad (or lht config) = { action=AnyLoad() }
- -
- ha:Load subcircuit data to paste-buffer = { li:action={PasteBuffer(Clear); Load(ElementTobuffer)} }
- ha:Load layout data to paste-buffer = { li:action={PasteBuffer(Clear); Load(LayoutTobuffer)} }
- ha:Load pixmap to paste-buffer gfx = { li:action={PasteBuffer(Clear); LoadPixmap(); Tool(buffer);} }
- @import_geo
- -
- @import_sch
- ha:Load netlist file = { action=Load(Netlist) }
- }
- }
- -
- ha:Save connection data of {
- li:submenu {
- ha:a single element = { li:action={ Save(ElementConnections) } }
- ha:all elements = { action=Save(AllConnections) }
- ha:unused pins = { action=Save(AllUnusedPins) }
- ha:netlist patch for back annotation = {li:a={{f;x;p}; {a;b;x};}; action=SavePatch() }
- }
- }
- ha:Print layout... = { a={f;p}; action=Print()}
- ha:Export layout... = { a={f;e}; action=ExportGUI()}
- ha:Export with CAM job...={ a={f;c}; action=cam()}
- ha:Reports {
- li:submenu {
- ha:Generate object report = { a={i;r}; action=ReportObject() }
- ha:Generate drill summary = { a={i;d}; action=Report(DrillReport) }
- ha:Report found padstacks = { a={i;f}; action=Report(FoundPins) }
- }
- }
- -
- ha:Preferences... = { a={i;c;p}; action=preferences}
- ha:Maintenance {
- li:submenu {
- ha:Re-scan the footprint library = { a={i;c;r}; action=fp_rehash() }
- ha:Data integrity check = { a={i;c;i}; action=Integrity() }
- -
- ha:Edit current font = { action=FontEdit() }
- ha:Edit on-disk font = { action={ LoadFontFrom("", 126); conf(set, design/text_font_id, 126, design); FontEdit() } }
- ha:Save font from font editor = { action=FontSave() }
- -
- ha:Undo dialog (for debugging) = { a={u;d;}; action=UndoDialog() }
- }
- }
- -
- ha:Quit Program = { li:a={{f;q}; {Ctrlq};}; action=Quit() }
- }
- } # File
-
- ha:Edit {
- li:submenu {
- ha:Undo last operation = { li:a={{u; u}; {Ctrlz};}; action=Undo() }
- ha:Redo last undone operation = { li:a={{u; r}; {Ctrly};}; action=Redo() }
- ha:Clear undo-buffer = { a={u; c}; action=Undo(ClearList) }
- -
- ha:Cut selection to buffer = { li:a={{e; x}; a=Ctrlx;}; li:action={ GetXY(Click to set the snap point for this buffer); PasteBuffer(Clear); PasteBuffer(MoveSelected); Tool(buffer) } }
- ha:Copy selection to buffer = { li:a={{e; c}; {Ctrlc;};}; li:action={ GetXY(Click to set the snap point for this buffer); PasteBuffer(Clear); PasteBuffer(AddSelected); Unselect(All); Tool(buffer) } }
- ha:Paste buffer to layout = { li:a={{e; v}; a=Ctrlv;}; action=Tool(buffer) }
- -
- ha:Remove object = { li:a={{e;d};{Delete};}; li:action={Tool(Save); Tool(remove); Tool(Press); Tool(Restore)} }
- ha:Change object {
- li:submenu {
- ha:Set Same Style = { a={e; s; s}; action=SetSame() }
- ha:Apply Pen to object = { a={e; a; p}; action=ApplyPen() }
- ha:Flip Object = { a={e; i}; action=Flip(Object) }
- ha:Move to current layer = { a={e; l}; action=MoveToCurrentLayer(Object) }
- ha:ChangeJoin Object = { a={e; j}; action=ChangeJoin(Object) }
- ha:Convert to extended object... = { a={e; s; x}; action=ExtobjConvFrom(Object, @gui) }
- ha:Geometry {
- li:submenu {
- ha:Clearance +2 mil = { a={e; g; c}; action=ChangeClearSize(Object,+2,mil) }
- ha:Clearance -2 mil = { a={e; g; Shiftc}; action=ChangeClearSize(Object,-2,mil) }
- ha:ChangeSizes to Route style = { a={e; g; y}; action=ChangeSizes(Object,style,mil) }
- ha:ChangeSize +5 mil = { a={e; g; s}; action=ChangeSize(Object,+5,mil) }
- ha:ChangeSize -5 mil = { a={e; g; Shifts}; action=ChangeSize(Object,-5,mil) }
- ha:ChangeDrill +5 mil = { a={e; g; d}; action=ChangeDrillSize(Object,+5,mil) }
- ha:ChangeDrill -5 mil = { a={e; g; Shiftd}; action=ChangeDrillSize(Object,-5,mil) }
- -
- ha:Edit padstack geometry/prototype = {a={e; g; g}; action=padstackedit }
- }
- }
- }
- } # Change object
- ha:Add/place object {
- li:submenu {
- ha:Place mark = { li:a={{a;m}; {a;w}; }; action=MarkCrosshair() }
- ha:Place via = { a={a;v}; li:action={Tool(Save); Tool(via); Tool(Press); Tool(Restore);} }
- ha:Start routing a line = { a={a;l}; li:action={Tool(Save); Tool(line); Tool(Press); } }
- ha:Start routing an arc = { a={a;a}; li:action={Tool(Save); Tool(arc); Tool(Press); } }
- }
- }
- -
- ha:Edit properties of {
- li:submenu {
- ha:Layout = { action=Propedit(board) }
- ha:Current Layer = { action={Propedit(layer)} }
- ha:Current Layer Group = { action={Propedit(layergrp)} }
- }
- }
- ha:Route Styles {
- li:submenu {
- @routestyles
- -
- ha:Edit... = { action=AdjustStyle() }
- }
- }
- ha:Board padstack prototypes... = { action=pstklib() }
- -
- ha:Subcircuit {
- li:submenu {
- ha:Layer bindings... = { a={e; s; b}; action=LayerBinding() }
- ha:External editor... = { a={e; s; e}; li:action={ GetXY(Click on the subcircuit to edit); extedit(object) } }
- ha:Refdes = { a={e; s; r}; action=ChangeName(Subc) }
- }
- }
- ha:Object flags... = { a={e; f}; action=FlagEdit() }
- ha:Object Properties... = { a={e; p}; action=PropEdit(selection) }
- }
- } # Edit
-
- ha:View {
- li:submenu {
- ha:Grid {
- li:submenu {
- ha:Enable visible grid = { a={g; v}; checked=editor/draw_grid; action=conf(toggle, editor/draw_grid, design) }
- ha:Enable local grid = { a={g; l}; checked=plugins/hid_gtk/local_grid/enable; action=conf(toggle, plugins/hid_gtk/local_grid/enable, design) }
- ha:Grid units {
- li:submenu {
- ha:mil = { a={g; i}; checked=ChkGridUnits(mil); action=SetUnits(mil); update_on={editor/grid_unit} }
- ha:mm = { a={g; m}; checked=ChkGridUnits(mm); action=SetUnits(mm); update_on={editor/grid_unit} }
- }
- }
- ha:Grid size = {
- li:submenu {
- ha:No Grid = { checked=ChkGridSize(none); action=SetGrid(1); update_on={editor/grid} }
- -
- @grid
- -
- ha:Previous grid = { li:a={{g; b};{[};}; action=Grid(down) }
- ha:Next grid = { li:a={{g; f};{]};}; action=Grid(up) }
- ha:Custom grid = { li:a={{g; c};}; action=Grid(ask) }
- -
- ha:Grid *2 = { a={g; d}; action=SetGrid(*2) }
- ha:Grid /2 = { a={g; h}; action=SetGrid(/2) }
- ha:Grid -5mil = { action=SetGrid(-5,mil) }
- ha:Grid +5mil = { action=SetGrid(+5,mil) }
- ha:Grid -0.05mm = { action=SetGrid(-0.05,mm) }
- ha:Grid +0.05mm = { action=SetGrid(+0.05,mm) }
- }
- }
- ha:Grid properties = {
- li:submenu {
- ha:Enable local grid = { checked=plugins/hid_gtk/local_grid/enable; action=conf(toggle, plugins/hid_gtk/local_grid/enable, design) }
- -
- ha:local grid radius 4 = { checked={conf(iseq, plugins/hid_gtk/local_grid/radius, 4)}; li:action={conf(set, plugins/hid_gtk/local_grid/radius, 4, design); conf(set, plugins/hid_gtk/local_grid/enable, 1, design) } update_on={} }
- ha:local grid radius 8 = { checked={conf(iseq, plugins/hid_gtk/local_grid/radius, 8)}; li:action={conf(set, plugins/hid_gtk/local_grid/radius, 8, design); conf(set, plugins/hid_gtk/local_grid/enable, 1, design) } update_on={} }
- ha:local grid radius 16 = { checked={conf(iseq, plugins/hid_gtk/local_grid/radius, 16)}; li:action={conf(set, plugins/hid_gtk/local_grid/radius, 16, design); conf(set, plugins/hid_gtk/local_grid/enable, 1, design) } update_on={} }
- ha:local grid radius 32 = { checked={conf(iseq, plugins/hid_gtk/local_grid/radius, 32)}; li:action={conf(set, plugins/hid_gtk/local_grid/radius, 32, design); conf(set, plugins/hid_gtk/local_grid/enable, 1, design) } update_on={} }
- -
- ha:sparse global grid = { checked=plugins/hid_gtk/global_grid/sparse; action=conf(toggle, plugins/hid_gtk/global_grid/sparse, design) }
- ha:global grid density 4 = { checked={conf(iseq, plugins/hid_gtk/global_grid/min_dist_px, 4)}; li:action={conf(set, plugins/hid_gtk/global_grid/min_dist_px, 4, design); conf(set, plugins/hid_gtk/local_grid/enable, 0, design) } update_on={} }
- ha:global grid density 8 = { checked={conf(iseq, plugins/hid_gtk/global_grid/min_dist_px, 8)}; li:action={conf(set, plugins/hid_gtk/global_grid/min_dist_px, 8, design); conf(set, plugins/hid_gtk/local_grid/enable, 0, design) } update_on={} }
- ha:global grid density 16 = { checked={conf(iseq, plugins/hid_gtk/global_grid/min_dist_px, 16)}; li:action={conf(set, plugins/hid_gtk/global_grid/min_dist_px, 16, design); conf(set, plugins/hid_gtk/local_grid/enable, 0, design) } update_on={} }
- }
- }
- ha:Realign grid = { a={g; r}; action={ Display(ToggleGrid) } }
- }
- }
- -
- ha:Displayed subcircuit ID {
- li:submenu {
- ha:refdes = { a={v; s; r}; checked=ChkSubcID(%a.refdes%); action=Display(SubcID, "%a.refdes%"); update_on={editor/subc_id} }
- ha:footprint = { a={v; s; f}; checked=ChkSubcID(%a.footprint%); action=Display(SubcID,"%a.footprint%"); update_on={editor/subc_id} }
- ha:value = { a={v; s; v}; checked=ChkSubcID(%a.value%); action=Display(SubcID,"%a.value%"); update_on={editor/subc_id} }
- ha:refdes+value = { a={v; s; s}; checked=ChkSubcID(%a.refdes%\\n%a.value%); action=Display(SubcID,"%a.refdes%\\\\n%a.value%"); update_on={editor/subc_id} }
- ha:user configured = { a={v; s; c}; action=Display(SubcID); }
- }
- }
- ha:Displayed terminal ID {
- li:submenu {
- ha:term = { a={v; t; t}; checked=ChkTermID(%a.term%); action=Display(TermID, "%a.term%"); update_on={editor/term_id} }
- ha:name = { a={v; t; n}; checked=ChkTermID(%a.name%); action=Display(TermID, "%a.name%"); update_on={editor/term_id} }
- ha:term+name = { a={v; t; s}; checked=ChkTermID("%a.term%,%a.name%"); action=Display(TermID, "%a.term%,%a.name%"); update_on={editor/term_id} }
- ha:user configured = { a={v; t; c}; action=Display(TermID); }
- }
- }
- ha:Zoom and side {
- li:submenu {
- ha:Zoom In 20% = { li:a={{z;z;}; {+};} action=Zoom(-1.2) }
- ha:Zoom Out 20% = { li:a={{z;x;}; {-};} action=Zoom(+1.2) }
- ha:Zoom In 2X = { action=Zoom(-2) }
- ha:Zoom Out 2X = { action=Zoom(+2) }
- ha:Zoom to 0.1mil/px = { action={Zoom(=0.1mil)} }
- ha:Zoom to 0.01mm/px = { action={Zoom(=0.01mm)} }
- ha:Zoom to 1mil/px = { action={Zoom(=1mil)} }
- ha:Zoom to 0.05mm/px = { action={Zoom(=0.05mm)} }
- ha:Zoom to 2.5mil/px = { action={Zoom(=2.5mil)} }
- ha:Zoom to 0.1mm/px = { action={Zoom(=0.1mm)} }
- ha:Zoom to 10mil/px = { action={Zoom(=10mil)} }
- ha:Zoom In 20% and center = { li:action={Zoom(-1.2); Center()} }
- ha:Zoom Out 20% and center= { li:action={Zoom(+1.2); Center()} }
- -
- ha:Zoom Extents = { li:a={{z;e;}; {v;f};}; action=Zoom() }
- ha:Zoom to selection = { a={z;s;}; action=ZoomTo(selected) }
- ha:Zoom to found = { a={z;f;}; action=ZoomTo(found) }
- -
- ha:Flip up/down = { checked=editor/view/flip_y; a=Tab; action=SwapSides(V) }
- ha:Flip left/right = { checked=editor/view/flip_x; a=ShiftTab; action=SwapSides(H) }
- ha:Spin 180 degrees = { a=CtrlTab; action=SwapSides(R) }
- ha:Swap Sides = { a=Ctrl ShiftTab; action=SwapSides() }
- -
- ha:Center cursor = { a={v; c} action=Center() }
- }
- }
- ha:Layers {
- li:submenu {
- ha:Shown Layers {
- li:submenu {
- @layerview
- -
- ha:Edit Layer Groups = { action=Preferences("layers") }
- }
- }
- ha:Current Layer {
- li:submenu {
- anon2=@layerpick
- -
- ha:Delete current layer = { action=MoveLayer(c,-1) }
- ha:Add new layer = { action=MoveLayer(-1,c) }
- ha:Move current layer up = { action=MoveLayer(c,step-) }
- ha:Move current layer down= { action=MoveLayer(c,step+) }
- }
- }
- }
- }
- ha:Show padstack numbers in a subc = { a={v; n} action=Display(PinOrPadName) }
- ha:Full screen = { checked=editor/fullscreen; a=\\; action=fullscreen(toggle) }
- ha:Reset {
- li:submenu {
- ha:Reset View = { a={v; r; v}; sy:action={/scripts/view_reset}; tip={Reset all visibility related states to make sure all objects are visible} }
- ha:Reset GUI = { a={v; r; g}; sy:action={/scripts/gui_reset}; tip={Reset all GUI related states } }
- }
- }
- }
- } # View
-
- ha:Mode = {
- li:submenu {
- ha:Routing {
- li:submenu {
- ha:'All-direction' lines = { li:a={{m; l; a}; {.};}; checked=editor/all_direction_lines; action=conf(toggle, editor/all_direction_lines, design); update_on={editor/all_direction_lines} }
- ha:Cycle line clip/refraction = { li:a={{m; l; f}; {/};}; action=Display(CycleClip) }
- ha:Auto swap line start angle = { checked=editor/swap_start_direction; action=conf(toggle, editor/swap_start_direction, design) }
- ha:Auto enforce style clearance = { a={m; l; d}; checked=editor/auto_drc; action=conf(toggle, editor/auto_drc, design) }
- ha:Automatic trace merging = { a={m; l; m}; checked=editor/trace_auto_merge; action=conf(toggle, editor/trace_auto_merge, design) }
- -
- ha:Rubber band mode = { a={m; r; r}; checked=editor/rubber_band_mode; action=conf(toggle, editor/rubber_band_mode, design) }
- ha:Rubber band keeps middle line dir= { a={m; r; m}; checked=editor/rubber_band_keep_midlinedir; action=conf(toggle, editor/rubber_band_keep_midlinedir, design) }
- -
- ha:Route radius +0.5 = { li:a={{r; r; +}; {r; r; p};}; action=conf(delta, editor/route_radius, +0.5, design); }
- ha:Route radius -0.5 = { li:a={{r; r; -}; {r; r; m};}; action=conf(delta, editor/route_radius, -0.5, design); }
- -
- ha:New lines, arcs clear polygons = { a={m; l; c}; checked=editor/clear_line; action=conf(toggle, editor/clear_line, design) }
- ha:New polygons are full ones = { a={m; p; f}; checked=editor/full_poly; action=conf(toggle, editor/full_poly, design) }
- ha:New polygons clear polygons = { a={m; p; c}; checked=editor/clear_polypoly; action=conf(toggle, editor/clear_polypoly, design) }
- ha:Polygon clip inhibit (toggle) = { a={m; |