Ardour  9.0-pre0-582-g084a23a80d
transform_dialog.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014-2015 David Robillard <d@drobilla.net>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #pragma once
20 
21 #include <list>
22 #include <string>
23 
24 #include <gtkmm/combobox.h>
25 #include <gtkmm/liststore.h>
26 #include <gtkmm/treemodel.h>
27 #include <gtkmm/spinbutton.h>
28 
29 #include "ardour/midi_model.h"
30 #include "ardour/transform.h"
31 #include "ardour/types.h"
32 
33 #include "ardour_dialog.h"
34 
50 {
51 public:
53 
55 
56 private:
62 
65 
68  };
69 
72 
75  };
76 
79 
82  };
83 
84  struct Model {
85  Model();
86 
88  Glib::RefPtr<Gtk::ListStore> source_list;
90  Glib::RefPtr<Gtk::ListStore> property_list;
92  Glib::RefPtr<Gtk::ListStore> operator_list;
93  };
94 
95  struct ValueChooser : public Gtk::HBox {
97 
99  void get(std::list<Operation>& ops);
100 
103 
104  double get_value () const;
105  double get_max () const;
106 
107  const Model& model;
114  };
115 
116  struct OperationChooser : public Gtk::HBox {
118 
120  void get(std::list<Operation>& ops);
121 
123 
124  const Model& model;
128  };
129 
131  void add_clicked();
132 
138 };
139 
void add(TreeModelColumnBase &column)
ARDOUR::MidiModel::NoteDiffCommand::Property Property
Gtk::ComboBox _property_combo
ARDOUR::Transform::Program get()
ARDOUR::Transform::Value Value
ARDOUR::Transform::Operation Operation
ValueChooser * _seed_chooser
ARDOUR::Transform::Value::Source Source
Gtk::Button _add_button
Gtk::VBox _operations_box
void property_changed()
ARDOUR::Transform::Operation::Operator Operator
Glib::RefPtr< Gtk::ListStore > property_list
Glib::RefPtr< Gtk::ListStore > operator_list
Glib::RefPtr< Gtk::ListStore > source_list
OperationChooser(const Model &model)
void get(std::list< Operation > &ops)
Gtk::TreeModelColumn< Operator > op
Gtk::TreeModelColumn< std::string > label
Gtk::TreeModelColumn< std::string > label
Gtk::TreeModelColumn< Property > property
Gtk::TreeModelColumn< Source > source
Gtk::TreeModelColumn< std::string > label
const Model & model
Models for combo boxes.
Gtk::ComboBox source_combo
Value source chooser.
Gtk::SpinButton value_spinner
Value or minimum for RANDOM.
void get(std::list< Operation > &ops)
Gtk::ComboBox property_combo
Property chooser.
Gtk::SpinButton max_spinner
Maximum for RANDOM.
void set_target_property(Property prop)
ValueChooser(const Model &model)
Property target_property
Property on source.
Gtk::Label to_label
"to" label for RANDOM