Index: user/09_appendix/action_reference.html =================================================================== --- user/09_appendix/action_reference.html (revision 936) +++ user/09_appendix/action_reference.html (revision 937) @@ -30,11 +30,13 @@ ChkModeReturn 1 if the currently selected mode is the expected_modeChkMode(expected_mode) cli_MessageBoxIntenal: CLI frontend action. Do not use directly. cli_PromptForIntenal: CLI frontend action. Do not use directly. +ColorLayerChange the color of a layer addressed (@ for current). Not affected by ResetLayer(). Colorstr shall be #rrggbb with hex components.ColorLayer(@|last|idx, colorstr) CommandDisplays the command line input in the status area.Command()lib_hid_common plugin confPerform various operations on the configuration tree.conf(set, path, value, [role], [policy]) - change a config setting to an absolute value
conf(delta, path, value, [role], [policy]) - change a config setting by a delta value (numerics-only)
conf(toggle, path, [role]) - invert boolean value of a flag; if no role given, overwrite the highest prio config
conf(reset, role) - reset the in-memory lihata of a role
conf(iseq, path, value) - returns whether the value of a conf item matches value (for menu checked's) +confgetReturn conf node value or property from the merged in-memory/native storage. Returns nil if node is unset (for value query) or not found. Intended for scripting.ConfGet(path, [value]) - return the value of a conf node; units, colors and lists are returned as string.
ConfGet(path, desc) - return the human readable description
ConfGet(path, ArraySize) - number of elements
ConfGet(path, ReadOnly) - returns 1 if node is read-only, 0 otherwise
ConfGet(path, ConfRev) - conf (merge) rev number the value last changed CreateMenuCreates a new menu, popup (only path specified) or submenu (at least path and action are specified)CreateMenu(path)
CreateMenu(path, action, tooltip, cookie, [accel]) Cursor (RND)Move the cursor.Cursor(Type,DeltaUp,DeltaRight,Units) -dadManipulate Dynamic Attribute Dialogsdad(dlgname, new) - create new dialog
dad(dlgname, label, text) - append a label widget
dad(dlgname, button, text) - append a button widget
dad(dlgname, button_closes, label, retval, ...) - standard close buttons
dad(dlgname, enum, choices) - append an enum (combo box) widget; choices is a tab separated list
dad(dlgname, bool) - append an checkbox widget (default off)
dad(dlgname, integer|real|coord, min, max) - append an input field
dad(dlgname, string) - append a single line text input field
dad(dlgname, default, val) - set the default value of a widet while creating the dialog
dad(dlgname, help, tooltip) - set the help (tooltip) text for the current widget
dad(dlgname, progress) - append a progress bar (set to 0)
dad(dlgname, preview, cb_act_prefix, minsize_x, minsize_y, [ctx]) - append a preview with a viewbox of 10*10mm, minsize in pixels
dad(dlgname, tree, cols, istree, [header]) - append tree-table widget; header is like enum values
dad(dlgname, tree_append, row, cells) - append after row (0 means last item of the root); cells is like enum values; returns a row pointer
dad(dlgname, tree_append_under, row, cells) - append at the end of the list under row (0 means last item of the root); cells is like enum values; returns a row pointer
dad(dlgname, tree_insert, row, cells) - insert before row (0 means first item of the root); cells is like enum values; returns a row pointer
dad(dlgname, begin_hbox) - begin horizontal box
dad(dlgname, begin_vbox) - begin vertical box
dad(dlgname, begin_hpane) - begin horizontal paned box
dad(dlgname, begin_vpane) - begin vertical paned box
dad(dlgname, begin_table, cols) - begin table layout box
dad(dlgname, begin_tabbed, tabnames) - begin a view with tabs; tabnames are like choices in an enum; must have as many children widgets as many names it has
dad(dlgname, end) - end the last begin
dad(dlgname, flags, flg1, flg2, ...) - change the flags of the last created widget
dad(dlgname, onchange, action) - set the action to be called on widget change
dad(dlgname, run, title) - present dlgname as a non-modal dialog
dad(dlgname, run_modal, title) - present dlgname as a modal dialog
dad(dlgname, exists) - returns wheter the named dialog exists (0 or 1)
dad(dlgname, set, widgetID, val) - changes the value of a widget in a running dialog
dad(dlgname, get, widgetID, [unit]) - return the current value of a widgetlib_hid_common plugin +dadManipulate Dynamic Attribute Dialogsdad(dlgname, new) - create new dialog
dad(dlgname, label, text) - append a label widget
dad(dlgname, button, text) - append a button widget
dad(dlgname, button_closes, label, retval, ...) - standard close buttons
dad(dlgname, enum, choices) - append an enum (combo box) widget; choices is a tab separated list
dad(dlgname, bool) - append an checkbox widget (default off)
dad(dlgname, integer|real|coord, min, max) - append an input field
dad(dlgname, string) - append a single line text input field
dad(dlgname, default, val) - set the default value of a widet while creating the dialog
dad(dlgname, help, tooltip) - set the help (tooltip) text for the current widget
dad(dlgname, progress) - append a progress bar (set to 0)
dad(dlgname, preview, cb_act_prefix, minsize_x, minsize_y, [ctx]) - append a preview with a viewbox of 10*10mm, minsize in pixels
dad(dlgname, tree, cols, istree, [header]) - append tree-table widget; header is like enum values
dad(dlgname, tree_append, row, cells) - append after row (0 means last item of the root); cells is like enum values; returns a row pointer
dad(dlgname, tree_append_under, row, cells) - append at the end of the list under row (0 means last item of the root); cells is like enum values; returns a row pointer
dad(dlgname, tree_insert, row, cells) - insert before row (0 means first item of the root); cells is like enum values; returns a row pointer
dad(dlgname, begin_hbox) - begin horizontal box
dad(dlgname, begin_vbox) - begin vertical box
dad(dlgname, begin_hpane) - begin horizontal paned box
dad(dlgname, begin_vpane) - begin vertical paned box
dad(dlgname, begin_table, cols) - begin table layout box
dad(dlgname, begin_tabbed, tabnames) - begin a view with tabs; tabnames are like choices in an enum; must have as many children widgets as many names it has
dad(dlgname, end) - end the last begin
dad(dlgname, flags, flg1, flg2, ...) - change the flags of the last created widget
dad(dlgname, onchange, action) - set the action to be called on widget change
dad(dlgname, run, title) - present dlgname as a non-modal dialog
dad(dlgname, run_modal, title) - present dlgname as a modal dialog
dad(dlgname, exists) - returns wheter the named dialog exists (0 or 1)
dad(dlgname, set, widgetID, val) - changes the value of a widget in a running dialog
dad(dlgname, get, widgetID, [unit]) - return the current value of a widget
dad(dlgname, iterate) - runs a global GUI iteration (event dispatch, redraw)
dad(dlgname, raise) - pops up window in front
dad(dlgname, close) - close the dialog (and return 0 from modal run)lib_hid_common plugin dlg_confval_editPresent a dialog box for editing the value of a conf node at path.dlg_confval_edit(path, idx, role, [modal])lib_hid_common plugin duktapeExecute a script one-liner using a specific languageOneliner(lang, script)script plugin DumpActionsDump all actions available.DumpActions() @@ -45,19 +47,23 @@ estutterExecute a script one-liner using a specific languageOneliner(lang, script)script plugin EvalConfPerform various operations on the configuration tree.EvalConf(path) - evaluate a config path in different config sources to figure how it ended up in the native databasediag_rnd ExecActionFileRun actions from the given file.ExecuteFile(filename) +ExecuteFileRun actions from the given file.ExecuteFile(filename) ExportDialogOpen the export dialog.ExportDialog()lib_hid_common plugin fawkExecute a script one-liner using a specific languageOneliner(lang, script)script plugin fbasExecute a script one-liner using a specific languageOneliner(lang, script)script plugin fpasExecute a script one-liner using a specific languageOneliner(lang, script)script plugin +FsdSimpleFile selection dialog, simplified API; for meaning of the arguments, see the HID API doc.FsdSimple(title, descr, default_file, default_ext, history_tag, [read])lib_hid_common plugin FsdTestCentral, DAD based File Selection Dialog demoFsdTest()lib_hid_common plugin FullScreenHide widgets to get edit area full screenFullScreen(on|off|toggle) GetXY (RND)Get a coordinate. If x or y specified, the return value of the action is the x or y coordinate.GetXY([message, [x|y]]) GridSet the grid.grid(set, [name:]size[@offs][!unit])
grid(+|up)
grid(-|down)
grid(#N)
grid(idx, N)
grid(get)
grid(ask) +GroupLoadStarts or ends a group load of files.GroupLoad(begin|end)plug_io_act gui_FallbackColorPickIntenal: GUI frontend action. Do not use directly.lib_hid_common plugin gui_MayOverwriteFileIntenal: GUI frontend action. Do not use directly.lib_hid_common plugin gui_MessageBoxIntenal: GUI frontend action. Do not use directly.lib_hid_common plugin gui_PromptForIntenal: GUI frontend action. Do not use directly.lib_hid_common plugin HelpOn-line action helpHelp() +InvertLayerInverts the layer addressed (@ for current). Not affected by ResetLayer().InvertLayer(@|last|idx) ircnon-modal, single-instance, single-server, single-channel irc window for online supportirc()irc plugin javascriptExecute a script one-liner using a specific languageOneliner(lang, script)script plugin jsExecute a script one-liner using a specific languageOneliner(lang, script)script plugin @@ -109,7 +115,7 @@ RedrawRedraw the entire screenRedraw() ReloadScript (RND)Reload a fungw scriptReloadScript(id)script plugin RemoveMenuRecursively removes a new menu, popup (only path specified) or submenu. RemoveMenu(path, cookie) -ResetLayerReset the transformation matrix of the layer.ResetLayer(@|idx, sx[, sy]) +ResetLayerReset the transformation matrix of the layer.ResetLayer(@|last|idx, sx[, sy]) rnd_acosscript plugin rnd_asinscript plugin rnd_atan2script plugin @@ -124,9 +130,33 @@ rnd_toolbar_initFor ringdove apps: initialize the toolbar.lib_hid_common plugin rnd_toolbar_uninitFor ringdove apps: uninitialize the toolbar.lib_hid_common plugin rnd_zoomChange zoom level (relative, absolute, window, ...)Zoom()
Zoom([+|-|=]factor)
Zoom(x1, y1, x2, y2)
Zoom(?)
Zoom(get)lib_hid_common plugin -RotateLayerRotates the layer addressed (@ for current) by deg degrees CCW. (The transformation is added to the current transformation matrix of the layer.)RotateLayer(@|idx, [deg]) +RotateLayerRotates the layer addressed (@ for current) by deg degrees CCW. (The transformation is added to the current transformation matrix of the layer.)RotateLayer(@|last|idx, [deg]) rubyExecute a script one-liner using a specific languageOneliner(lang, script)script plugin -ScaleLayerScales the layer addressed (@ for current) by the factor of sx and sy. If only sx is specified, it is used as sy as well. (The transformation is added to the current transformation matrix of the layer.)ScaleLayer(@|idx, [sx, [sy]]) +SafeFsclearerrSame as clearerr(3)SafeFsclearerr(f) +SafeFsFcloseCloses a file previously open using SafeFsFopen()SafeFsFclose(f) +SafeFsFeofReturns 1 if file has reached EOF, 0 otherwiseSafeFsFeof(f) +SafeFsFerrorReturns 1 if file had errors, 0 otherwiseSafeFsFerror(f) +SafeFsFgetsReads and returns a line from f (open with SafeFsFopen()). Stops reading after maxlen (subsequent call will continue reading the same line). Returns nil on error or eof or empty line. Maxlen is 64k by default. Note: string heap allocation is made for maxlen.SafeFsFgets(f, [maxlen]) +SafeFsFileMtimeReturn the last modification time of a file, from Epoch, or -1 on error.SafeFsFileMtime(path) +SafeFsFileSizeReturn the size of a file in bytes, or -1 on error.SafeFsFileSize(path) +SafeFsFopenOpens a file using fopen, returns FILE *. If mode is not specified, r is assumed. Returns nil on error.SafeFsFopen(path, [mode]) +SafeFsFputsWrites str to file f (previously opne with SafeFsFopen))SafeFsFputs(f, str) +SafeFsFreadReads and returns at most len bytes from a file (open with SafeFsFopen()). Returns nil on error or eof or empty line.SafeFsFread(f, len) +SafeFsFreadSepReads characters that are either all non-seps or all seps. Reads at most maxlen bytes. Returns the string read or nil on eof or error. Seps is a string that contains every separator character. Maxlen is 64k by default.SafeFsFreadSep(f, seps, [maxlen]) +SafeFsFseekSame as fseek(3); whence is a string, one of set, cur or end not specified (set is used when not specified)SafeFsFseek(f, offs, [whence]) +SafeFsFtellSame as ftell(3).SafeFsFtell(f) +SafeFsIsDirReturn 1 if path exists and is a directory, else return 0.SafeFsIsDir(path) +SafeFsMkdirMkdir a file from the file system. If mode is a string, it is converted from octal. Return value is the same as mkdir(2)'sSafeFsMkdir(path, mode) +SafeFsPathSepReturn the system dependet path separator character (normally slash).SafeFsPathSep(path) +SafeFsReadFileReads a text file into one long string, returned, but at most maxlen bytes. If maxlen is not specified, 64k is used. Returns nil on error or empty file.SafeFsReadFile(path, [maxlen]) +SafeFsRealPathReturns the realpath(3) of path, or NULL on error.SafeFsRealPath(path) +SafeFsRemoveRemove an object from the file system. Return value is the same as remove(3)'sSafeFsRemove(path) +SafeFsRenameRename an object on the file system. Return value is the same as rename(2)'sSafeFsRename(old_path, new_path) +SafeFsRewindSame as rewind(3)SafeFsRewind(f) +SafeFsSystemRuns cmdline with a shell using librnd safe_fs. Return value is the same integer as system()'sSafeFsSystem(cmdline) +SafeFsUnlinkUnlink a file from the file system. Return value is the same as unlink(2)'sSafeFsUnlink(path) +SaveToSave design to a file.SaveTo(design, filename[,format])plug_io_act +ScaleLayerScales the layer addressed (@ for current) by the factor of sx and sy. If only sx is specified, it is used as sy as well. (The transformation is added to the current transformation matrix of the layer.)ScaleLayer(@|last|idx, [sx, [sy]]) ScriptCookie (RND)Return a cookie specific to the current script instance during script initializationScriptCookie()script plugin ScriptPersistency (RND)Read or remove script persistency data savd on preunloadScriptPersistency(read|remove)script plugin Scroll (RND)Scroll the viewport.Scroll(up|down|left|right, [pixels])lib_hid_common plugin @@ -138,8 +168,10 @@ SystemRun shell commandSystem(shell_cmd) tclExecute a script one-liner using a specific languageOneliner(lang, script)script plugin Tool (RND)Change or use the tool mode.Tool(Arc|Arrow|Copy|InsertPoint|Line|Lock|Move|None|PasteBuffer)
Tool(Poly|Rectangle|Remove|Rotate|Text|Thermal|Via)
Tool(Press|Release|Cancel|Stroke)
Tool(Save|Restore) -TranslateLayerTranslates (moves) the layer addressed (@ for current) by dx and dy. (The transformation is added to the current transformation matrix of the layer.)TranslateLayer(@|idx, dx, dy) +TranslateLayerTranslates (moves) the layer addressed (@ for current) by dx and dy. (The transformation is added to the current transformation matrix of the layer.)TranslateLayer(@|last|idx, dx, dy) UnloadScript (RND)Unload a fungw scriptUnloadScript(id)script plugin +ViewPortDialogBring up a viewport dialog copying the current design/zoom/pan of the main window. Optionally sets window title.ViewPortDialog([title])camv_dialogs +VisLayerChange the visibility of a layer addressed (@ for current). Not affected by ResetLayer().VisLayer(@|last|idx, [0|1|toggle]) ZoomGUI zoomZoom()
Zoom([+|-|=]factor)
Zoom(x1, y1, x2, y2)
Zoom(?)
Zoom(get)
Zoom(auto_first)

RND: this action comes from librnd and is common to all ringdove applications.