13
0
Commit Graph

88 Commits

Author SHA1 Message Date
728b53fa09
Expose mixer window screenshot method as Lua binding 2019-07-18 01:31:30 +02:00
1173ca8d34
Prefer dedicated c-pointer bindings (can be const) 2019-05-17 12:09:08 +02:00
31815b5f26
NO-OP: whitespace
This fixes mostly <tab> after <space> and similar <tab> not used
for indenting as well as some related code alignment issues.
2019-04-13 17:57:46 +02:00
51df70b405 ActionManager::get_all_actions() no longer includes <Actions> in the paths it returns, part 3 (GUI) 2019-03-20 11:15:47 -07:00
23a98e5f4d remove references to "Editor_menus" which is an action that no longer exists 2019-02-16 13:12:45 -07:00
fc83d044f8 use ActionManager namespace, rather than ActionMap objects, and remove all per-context action maps 2018-12-10 08:34:01 -05:00
821ab4aae2 Add a 1Hz Lua Callback Signal 2018-11-17 00:12:10 +01:00
848187b264 Fix load/save Lua Editor scripts
* callbacks are unregistered during session-deletion, skip saving them
  during session destruction.
* prevent duplicate state restore, re-load script with the session, not
  window instance.
2018-11-12 02:30:46 +01:00
9e20a24db0 Fix saving Lua Callbacks when un/register succeeds
This fix an issue introduce in 9971e718
2018-11-12 02:06:23 +01:00
9971e718fe Save Lua UI scripts separately
Previously EditorAction and ExitorHook scripts were saved with
instant.xml. The were saved with each session and in the config
dir (for new sessions). This allowed inconsistent UI setups, especially
when loading old sessions that had no or different scripts.

Now Editor scripts (actions and hooks) are saved in a dedicated file,
session-independently. This goes along with ui_config in general
e.g. action-table-columns

The scripts are not saved with ui_config file for two reasons:
ui_config settings related to built-in  ui_config_vars.h,
and in the future there may be further indirection like "ui-rc-file".

Note: previously loaded editor scripts are lost with this change.
2018-11-04 18:47:14 +01:00
4d3cd732c9 Unhardcode and increase bindable Lua-script-action count 2018-10-04 03:57:09 +02:00
fc4a0a9852 Move static function out of header-file, fix -Wunused-function 2018-07-12 03:28:38 +02:00
f448041ec0 no error logging for CURL HTTP requests; future callers can request it if necessary 2018-06-02 13:24:31 -04:00
dc61256466 new_grid: Rewrite of Snap and Grid. (squashed commit)
Separate Snap from Grid.  Lots of naming changes.
Multiple simultaneous snap options allowed. Grid is one of the possible Snap options.
Grid uses the same data as the rulers.  Replace complicated tempo_lines with simple grid_lines.
The Grid is zoom-scale-sensitive along with the rulers.  If you are zoomed out, grid becomes coarser.
2018-02-09 09:59:39 -06:00
c6eab71435 new_snap: Snapped Cursor ( squashed commit )
Snapped Cursor is a line that follows the edit point, and indicates where the operation will occur.
This replaces and extends the line that appears with the Cut tool.
New associated preferences:  snap_threshold and show_snap_cursor.
2018-02-09 08:21:45 -06:00
0772513499 LuaInstance: prepare for 3 argument signal/slot callbacks 2018-01-30 01:33:40 +01:00
efc858dc81 Drop the "Lua" in Lua Action Buttons:
Removed the term "Lua", because users were turned off by something they didn't understand.
A special-case Lua script ("Shortcut") allows the user to select an arbitrary Action.
The "Shortcut" script is selected by default, and in this case there is no "Type" or "Author" displayed.
Action-Buttons may still trigger Lua scripts, as a secondary function.
2017-12-07 11:08:26 -06:00
d96c516ae9 Add Lua binding to query action-list 2017-12-05 01:55:38 +01:00
f3be5bb421 Lua Script-Selector update
* register bindings for action_param
 * honor pre-seeded value (don't ask)
 * allow to pre-seed a script-name
 * allow to cancel interactive script load at parameter-stage
2017-12-05 01:55:38 +01:00
12a5102713 Catch exceptions by const reference 2017-11-23 10:38:52 +01:00
eb928b05e9 More s/frame/sample/ -- Lua Scripts
Sadly this breaks existing loaded scripts. C'est la vie.
2017-09-27 05:03:10 +02:00
30b087ab3d globally change all use of "frame" to refer to audio into "sample".
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode
and video in order to keep the legible
2017-09-18 12:39:17 -04:00
68e57101ad fully remove diskstream code 2017-09-18 11:40:53 -04:00
8c556fcbdc Fix too restrictive Lua sandbox
Don't limit the environment when evaluating bytecode (factory function).
2017-08-26 15:42:14 +02:00
05247255fe Add Lua bindings for ArdourUI's translate_order()
e.g. calculate the route insert position:
print (ArdourUI.translate_order (ArdourUI.InsertAt.BeforeSelection))
2017-08-22 03:12:07 +02:00
2cc32456ab Lua may call C++ functions with throw. Catch them 2017-08-19 01:06:44 +02:00
7d48e80e5f Fix MSVC builds (binding external static members)
This Revert "Lua GUI Instance update: prepare for template scripts"
commit c37cdf548d.
2017-08-11 18:01:28 +02:00
418570b041 Update Lua os.exec, SystemExec API
We can't use Lua to construct a PBD::SystemExec Obejct. Lifetime of the
object is bound to the Lua interpreter or local function scope.
Destroying the C++ object terminates the process.

Additionally to adding a dedicated method, we also override the existing
os.execute Lua libary method with a rt-save (vfork, close filedescriptors)
wrapper.
2017-08-10 02:26:11 +02:00
c37cdf548d Lua GUI Instance update: prepare for template scripts 2017-08-10 02:26:05 +02:00
8eb3b9d34b Add a Lua SetSession signal/hook 2017-08-10 02:25:58 +02:00
d0553753af Lua Script Sandbox - GUI part 2017-08-10 02:25:54 +02:00
cba622cdce Add Lua bindings to set toggle-actions 2017-08-09 16:29:24 +02:00
0c4e0503b4 SystemExec Lua bindings (vfork, fire+forget) 2017-08-08 23:27:47 +02:00
ffcb0af8bc Fix Windows builds (amend 7009ff03) 2017-08-07 13:58:56 +02:00
7009ff0300 Update Selection API to include all Stripables 2017-08-06 22:17:58 +02:00
9a70e72f3d Expose editor-vertical zoom lua bindings 2017-07-19 22:15:22 +02:00
4e385b44a6 Remove LocaleGuards from LuaInstance state methods
There are no float <=> string conversions in these methods and g_base64_encode
etc functions are not affected by locale.
2017-06-22 10:48:38 +10:00
8bb26628e3 Skip script-setup if there are no parameters (and name is unique) 2017-04-26 19:45:22 +02:00
f5995661d0 Lua: Action Script Dialog & MessageBox 2017-04-25 14:01:22 +02:00
4bf8f9f1a8 Use XMLNode::set_property API in LuaInstance class
Didn't seem worth converting from XMLNode::property API to
XMLNode::get_property and there may be some ordering issues.
2017-04-19 09:36:56 +10:00
c3f2cff8bc optimize LuaInstance::get_action_state, LuaInstance::get_hook_state
Lua serialize() is called recursively and concatenates strings.
(in Lua that results in a new string on the stack, with 2 unused old
strings). Collecting garbage every time becomes expensive, so do it
only once at the end. GUI scripts are not memory limited anyway.
2017-03-27 04:59:20 +02:00
b83ea5bd49 Save Lua script file origin (for later updates) -- GUI+Session plugin 2017-02-24 16:10:14 +01:00
9e543beb56 Add some convenient public editor methods (for lua-bindings)
and s/get// in the old API for consistency.
2017-02-24 16:10:14 +01:00
3780a9526e re-order inheritance
LuaBridge only allows one parent class, others need explicit casts.
Allowing RoutUI to be passed as Selectable argument is handy.
2017-02-24 16:10:14 +01:00
1e4e97019d Lua bindings to access editor selection + region selection bindings 2017-02-23 22:32:32 +01:00
2157cd0e94 Lua binding for pango_cairo_layout_path (text outlines) 2017-02-20 03:56:32 +01:00
a732c7c9fa Allow to un/load Lua Session Scripts in the Script Manager 2017-02-19 01:29:08 +01:00
2d50871034 Remove LuaCairo.color_to_rgba (now Ardour.LuaAPI.color_to_rgba) 2017-02-18 16:13:49 +01:00
3bbb4b76f7 Add Lua API to convert Canvas::Color to Cairo RGBA 2017-02-17 23:28:03 +01:00
472f14c803 Allow Lua action scripts to provide a button icon 2017-02-17 18:58:11 +01:00