basic skeleton for clip editor bindings
This commit is contained in:
parent
ef07d47bf8
commit
02026c98ff
|
@ -42,6 +42,7 @@
|
||||||
#include "actions.h"
|
#include "actions.h"
|
||||||
#include "ardour_message.h"
|
#include "ardour_message.h"
|
||||||
#include "ardour_ui.h"
|
#include "ardour_ui.h"
|
||||||
|
#include "audio_clip_editor.h"
|
||||||
#include "public_editor.h"
|
#include "public_editor.h"
|
||||||
#include "meterbridge.h"
|
#include "meterbridge.h"
|
||||||
#include "luainstance.h"
|
#include "luainstance.h"
|
||||||
|
@ -92,6 +93,7 @@ ARDOUR_UI::we_have_dependents ()
|
||||||
ProcessorBox::register_actions ();
|
ProcessorBox::register_actions ();
|
||||||
StepEntry::setup_actions_and_bindings ();
|
StepEntry::setup_actions_and_bindings ();
|
||||||
TriggerBoxUI::setup_actions_and_bindings ();
|
TriggerBoxUI::setup_actions_and_bindings ();
|
||||||
|
ClipEditorBox::init ();
|
||||||
|
|
||||||
/* Global, editor, mixer, processor box actions are defined now. Link
|
/* Global, editor, mixer, processor box actions are defined now. Link
|
||||||
them with any bindings, so that GTK does not get a chance to define
|
them with any bindings, so that GTK does not get a chance to define
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
#include "pbd/i18n.h"
|
#include "pbd/i18n.h"
|
||||||
|
|
||||||
using namespace Gtk;
|
using namespace Gtk;
|
||||||
|
using namespace Gtkmm2ext;
|
||||||
using namespace ARDOUR;
|
using namespace ARDOUR;
|
||||||
using namespace ArdourCanvas;
|
using namespace ArdourCanvas;
|
||||||
using namespace ArdourWaveView;
|
using namespace ArdourWaveView;
|
||||||
|
@ -58,6 +59,31 @@ using namespace ArdourWidgets;
|
||||||
using std::min;
|
using std::min;
|
||||||
using std::max;
|
using std::max;
|
||||||
|
|
||||||
|
|
||||||
|
Glib::RefPtr<Gtk::ActionGroup> ClipEditorBox::clip_editor_actions;
|
||||||
|
|
||||||
|
void
|
||||||
|
ClipEditorBox::init ()
|
||||||
|
{
|
||||||
|
Bindings* bindings = Bindings::get_bindings (X_("Clip Editing"));
|
||||||
|
|
||||||
|
register_clip_editor_actions (bindings);
|
||||||
|
|
||||||
|
//_track_canvas_viewport->canvas()->set_data ("ardour-bindings",
|
||||||
|
//midi_bindings);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ClipEditorBox::register_clip_editor_actions (Bindings* clip_editor_bindings)
|
||||||
|
{
|
||||||
|
clip_editor_actions = ActionManager::create_action_group (clip_editor_bindings, X_("ClipEditing"));
|
||||||
|
|
||||||
|
/* two versions to allow same action for Delete and Backspace */
|
||||||
|
|
||||||
|
// ActionManager::register_action (clip_editor_actions, X_("zoom-in"), _("Zoom In"), sigc::mem_fun (*this, &ClipEditorBox::zoom_in));
|
||||||
|
// ActionManager::register_action (clip_editor_actions, X_("zoom-in"), _("Zoom In"), sigc::mem_fun (*this, &ClipEditorBox::zoom_out));
|
||||||
|
}
|
||||||
|
|
||||||
/* ------------ */
|
/* ------------ */
|
||||||
|
|
||||||
AudioClipEditor::AudioClipEditor ()
|
AudioClipEditor::AudioClipEditor ()
|
||||||
|
@ -125,6 +151,10 @@ AudioClipEditor::line_event_handler (GdkEvent* ev, ArdourCanvas::Line* l)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
case GDK_KEY_PRESS:
|
||||||
|
return key_press (&ev->key);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -132,6 +162,12 @@ AudioClipEditor::line_event_handler (GdkEvent* ev, ArdourCanvas::Line* l)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
AudioClipEditor::key_press (GdkEventKey* ev)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioClipEditor::position_lines ()
|
AudioClipEditor::position_lines ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -65,6 +65,19 @@ public:
|
||||||
~ClipEditorBox () {}
|
~ClipEditorBox () {}
|
||||||
|
|
||||||
virtual void set_region (boost::shared_ptr<ARDOUR::Region>) =0;
|
virtual void set_region (boost::shared_ptr<ARDOUR::Region>) =0;
|
||||||
|
|
||||||
|
static void init ();
|
||||||
|
static void register_clip_editor_actions (Gtkmm2ext::Bindings*);
|
||||||
|
static Glib::RefPtr<Gtk::ActionGroup> clip_editor_actions;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ClipEditor
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~ClipEditor() {}
|
||||||
|
|
||||||
|
virtual void zoom_in () = 0;
|
||||||
|
virtual void zoom_out () = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class AudioClipEditor : public ArdourCanvas::GtkCanvas
|
class AudioClipEditor : public ArdourCanvas::GtkCanvas
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
<Bindings name="Clip Editing">
|
||||||
|
<Press>
|
||||||
|
<Binding key="equal" action="ClipEditing/zoom-in"/>
|
||||||
|
<Binding key="minus" action="ClipEditing/zoom-in"/>
|
||||||
|
</Press>
|
||||||
|
</Bindings>
|
|
@ -926,7 +926,7 @@ def build(bld):
|
||||||
for b in [ 'ardour' ] :
|
for b in [ 'ardour' ] :
|
||||||
obj = bld(
|
obj = bld(
|
||||||
target = b + '.keys',
|
target = b + '.keys',
|
||||||
source = [ b + '.keys.in', 'mixer.bindings', 'processor_box.bindings', 'step_editing.bindings', 'monitor.bindings', 'trigger.bindings' ],
|
source = [ b + '.keys.in', 'mixer.bindings', 'processor_box.bindings', 'step_editing.bindings', 'monitor.bindings', 'trigger.bindings', 'clip_editor.bindings' ],
|
||||||
rule = a_rule
|
rule = a_rule
|
||||||
)
|
)
|
||||||
obj.install_path = bld.env['CONFDIR']
|
obj.install_path = bld.env['CONFDIR']
|
||||||
|
|
|
@ -334,7 +334,7 @@ if ($make_accelmap) {
|
||||||
# merge in the "fixed" bindings that are not defined by the argument given to this program
|
# merge in the "fixed" bindings that are not defined by the argument given to this program
|
||||||
# this covers things like the step editor, monitor and processor box bindings
|
# this covers things like the step editor, monitor and processor box bindings
|
||||||
|
|
||||||
foreach $hardcoded_bindings ("mixer.bindings", "step_editing.bindings", "monitor.bindings", "processor_box.bindings", "trigger.bindings") {
|
foreach $hardcoded_bindings ("mixer.bindings", "step_editing.bindings", "monitor.bindings", "processor_box.bindings", "trigger.bindings", 'clip_editor.bindings') {
|
||||||
$path = File::Spec->catfile (dirname ($ARGV[0]), $hardcoded_bindings);
|
$path = File::Spec->catfile (dirname ($ARGV[0]), $hardcoded_bindings);
|
||||||
open HARDCODED, "<", $path or die $!;
|
open HARDCODED, "<", $path or die $!;
|
||||||
while (<HARDCODED>) {
|
while (<HARDCODED>) {
|
||||||
|
|
Loading…
Reference in New Issue