Skeleton for trigger clip file dialog

This commit is contained in:
Robin Gareus
2021-12-12 14:25:49 +01:00
parent 8bb0e18f3f
commit be7882d7a7
5 changed files with 74 additions and 8 deletions

View File

@@ -0,0 +1,33 @@
/*
* Copyright (C) 2019-2021 Robin Gareus <robin@gareus.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "gtkmm2ext/utils.h"
#include "trigger_clip_picker.h"
TriggerClipPicker::TriggerClipPicker ()
: _fc (Gtk::FILE_CHOOSER_ACTION_OPEN)
{
Gtkmm2ext::add_volume_shortcuts (_fc);
pack_start (_fc);
_fc.show ();
}
TriggerClipPicker::~TriggerClipPicker ()
{
}

View File

@@ -0,0 +1,35 @@
/*
* Copyright (C) 2021 Robin Gareus <robin@gareus.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __gtk_ardour_trigger_clip_picker_h__
#define __gtk_ardour_trigger_clip_picker_h__
#include <gtkmm/box.h>
#include <gtkmm/filechooserwidget.h>
class TriggerClipPicker : public Gtk::VBox
{
public:
TriggerClipPicker ();
~TriggerClipPicker ();
private:
Gtk::FileChooserWidget _fc;
};
#endif

View File

@@ -117,11 +117,6 @@ TriggerPage::TriggerPage ()
_parameter_box.pack_start (*table);
#if 1 /* Placeholders */
_browser_box.pack_start (*Gtk::manage (new Gtk::Label ("File Browser")));
_browser_box.show_all ();
#endif
/* Upper pane (slot | strips | file browser) */
_strip_scroller.add (_strip_packer);
@@ -136,7 +131,7 @@ TriggerPage::TriggerPage ()
_strip_group_box.pack_start (_strip_scroller, true, true);
_pane_upper.add (_strip_group_box);
_pane_upper.add (_browser_box);
_pane_upper.add (_trigger_clip_picker);
/* Top-level Layout */
_pane.add (_pane_upper);
@@ -152,7 +147,7 @@ TriggerPage::TriggerPage ()
_strip_scroller.show ();
_strip_packer.show ();
_slot_area_box.show_all ();
_browser_box.show ();
_trigger_clip_picker.show ();
/* setup keybidings */
_content.set_data ("ardour-bindings", bindings);

View File

@@ -30,6 +30,7 @@
#include "widgets/tabbable.h"
#include "fitted_canvas_widget.h"
#include "trigger_clip_picker.h"
class TriggerStrip;
class CueMaster;
@@ -86,9 +87,10 @@ private:
Gtk::HBox _strip_packer;
Gtk::EventBox _no_strips;
Gtk::VBox _slot_area_box;
Gtk::VBox _browser_box;
Gtk::HBox _parameter_box;
TriggerClipPicker _trigger_clip_picker;
FittedCanvasWidget _master_widget;
CueMaster* _master;

View File

@@ -308,6 +308,7 @@ gtk2_ardour_sources = [
'transport_control_ui.cc',
'transport_masters_dialog.cc',
'transpose_dialog.cc',
'trigger_clip_picker.cc',
'trigger_page.cc',
'trigger_strip.cc',
'trigger_master.cc',