13
0

and a few more Editor lua bindings

This commit is contained in:
Robin Gareus 2016-04-09 15:42:48 +02:00
parent ac7765bceb
commit e25dce8849
2 changed files with 26 additions and 4 deletions

View File

@ -33,6 +33,8 @@
#include "region_selection.h"
#include "luainstance.h"
#include "luasignal.h"
#include "time_axis_view.h"
#include "selection.h"
#include "script_selector.h"
#include "i18n.h"
@ -223,6 +225,24 @@ LuaInstance::register_classes (lua_State* L)
.addFunction ("n_midi_regions", &RegionSelection::n_midi_regions)
.endClass ()
.beginClass <AxisView> ("AxisView")
.endClass ()
.deriveClass <TimeAxisView, AxisView> ("TimeAxisView")
.endClass ()
.deriveClass <RouteTimeAxisView, TimeAxisView> ("RouteTimeAxisView")
.endClass ()
.beginClass <Selection> ("Selection")
.addFunction ("clear", &Selection::clear)
.addFunction ("clear_all", &Selection::clear_all)
.endClass ()
.beginClass <TrackViewList> ("TrackViewList")
.endClass ()
.deriveClass <TrackSelection, TrackViewList> ("TrackSelection")
.endClass ()
.beginClass <ArdourMarker> ("ArdourMarker")
.endClass ()
@ -245,12 +265,9 @@ LuaInstance::register_classes (lua_State* L)
.addFunction ("pixel_to_sample", &PublicEditor::pixel_to_sample)
.addFunction ("sample_to_pixel", &PublicEditor::sample_to_pixel)
#if 0 // Selection is not yet exposed
.addFunction ("get_selection", &PublicEditor::get_selection)
.addFunction ("get_cut_buffer", &PublicEditor::get_cut_buffer)
.addFunction ("track_mixer_selection", &PublicEditor::track_mixer_selection)
.addFunction ("extend_selection_to_track", &PublicEditor::extend_selection_to_track)
#endif
.addRefFunction ("get_selection_extents", &PublicEditor::get_selection_extents)
.addFunction ("play_selection", &PublicEditor::play_selection)
.addFunction ("play_with_preroll", &PublicEditor::play_with_preroll)
@ -264,6 +281,9 @@ LuaInstance::register_classes (lua_State* L)
.addFunction ("show_measures", &PublicEditor::show_measures)
.addFunction ("remove_tracks", &PublicEditor::remove_tracks)
.addFunction ("set_loop_range", &PublicEditor::set_loop_range)
.addFunction ("set_punch_range", &PublicEditor::set_punch_range)
.addFunction ("effective_mouse_mode", &PublicEditor::effective_mouse_mode)
.addRefFunction ("do_import", &PublicEditor::do_import)

View File

@ -212,6 +212,8 @@ class PublicEditor : public Gtkmm2ext::Tabbable {
virtual void set_show_measures (bool yn) = 0;
virtual bool show_measures () const = 0;
virtual void remove_tracks () = 0;
virtual void set_loop_range (framepos_t start, framepos_t end, std::string cmd) = 0;
virtual void set_punch_range (framepos_t start, framepos_t end, std::string cmd) = 0;
virtual Editing::MouseMode effective_mouse_mode () const = 0;