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
49
class
TransformDialog
:
public
ArdourDialog
50
{
51
public
:
52
TransformDialog
();
53
54
ARDOUR::Transform::Program
get
();
55
56
private
:
57
typedef
ARDOUR::MidiModel::NoteDiffCommand::Property
Property
;
58
typedef
ARDOUR::Transform::Value
Value
;
59
typedef
ARDOUR::Transform::Value::Source
Source
;
60
typedef
ARDOUR::Transform::Operation::Operator
Operator
;
61
typedef
ARDOUR::Transform::Operation
Operation
;
62
63
struct
SourceCols
:
public
Gtk::TreeModelColumnRecord
{
64
SourceCols
() {
add
(
source
);
add
(
label
); }
65
66
Gtk::TreeModelColumn<Source>
source
;
67
Gtk::TreeModelColumn<std::string>
label
;
68
};
69
70
struct
PropertyCols
:
public
Gtk::TreeModelColumnRecord
{
71
PropertyCols
() {
add
(
property
);
add
(
label
); }
72
73
Gtk::TreeModelColumn<Property>
property
;
74
Gtk::TreeModelColumn<std::string>
label
;
75
};
76
77
struct
OperatorCols
:
public
Gtk::TreeModelColumnRecord
{
78
OperatorCols
() {
add
(
op
);
add
(
label
); }
79
80
Gtk::TreeModelColumn<Operator>
op
;
81
Gtk::TreeModelColumn<std::string>
label
;
82
};
83
84
struct
Model
{
85
Model
();
86
87
SourceCols
source_cols
;
88
Glib::RefPtr<Gtk::ListStore>
source_list
;
89
PropertyCols
property_cols
;
90
Glib::RefPtr<Gtk::ListStore>
property_list
;
91
OperatorCols
operator_cols
;
92
Glib::RefPtr<Gtk::ListStore>
operator_list
;
93
};
94
95
struct
ValueChooser
:
public
Gtk::HBox
{
96
ValueChooser
(
const
Model
&
model
);
97
99
void
get
(std::list<Operation>& ops);
100
101
void
set_target_property
(
Property
prop);
102
void
source_changed
();
103
104
double
get_value
()
const
;
105
double
get_max
()
const
;
106
107
const
Model
&
model
;
108
Property
target_property
;
109
Gtk::ComboBox
source_combo
;
110
Gtk::ComboBox
property_combo
;
111
Gtk::SpinButton
value_spinner
;
112
Gtk::Label
to_label
;
113
Gtk::SpinButton
max_spinner
;
114
};
115
116
struct
OperationChooser
:
public
Gtk::HBox
{
117
OperationChooser
(
const
Model
&
model
);
118
120
void
get
(std::list<Operation>& ops);
121
122
void
remove_clicked
();
123
124
const
Model
&
model
;
125
Gtk::ComboBox
operator_combo
;
126
ValueChooser
value_chooser
;
127
Gtk::Button
remove_button
;
128
};
129
130
void
property_changed
();
131
void
add_clicked
();
132
133
Model
_model
;
134
Gtk::ComboBox
_property_combo
;
135
ValueChooser
*
_seed_chooser
;
136
Gtk::VBox
_operations_box
;
137
Gtk::Button
_add_button
;
138
};
139
types.h
ardour_dialog.h
ARDOUR::MidiModel::NoteDiffCommand::Property
Property
Definition:
midi_model.h:96
ArdourDialog
Definition:
ardour_dialog.h:40
Gtk::Button
Definition:
tk/ytkmm/ytkmm/gtkmm/button.h:60
Gtk::ComboBox
Definition:
combobox.h:72
Gtk::HBox
Definition:
tk/ytkmm/ytkmm/gtkmm/box.h:588
Gtk::Label
Definition:
label.h:55
Gtk::SpinButton
Definition:
spinbutton.h:127
Gtk::TreeModelColumnRecord
Definition:
treemodelcolumn.h:71
Gtk::TreeModelColumnRecord::add
void add(TreeModelColumnBase &column)
Gtk::TreeModelColumn< Source >
Gtk::VBox
Definition:
tk/ytkmm/ytkmm/gtkmm/box.h:505
TransformDialog
Definition:
transform_dialog.h:50
TransformDialog::Property
ARDOUR::MidiModel::NoteDiffCommand::Property Property
Definition:
transform_dialog.h:57
TransformDialog::_property_combo
Gtk::ComboBox _property_combo
Definition:
transform_dialog.h:134
TransformDialog::get
ARDOUR::Transform::Program get()
TransformDialog::Value
ARDOUR::Transform::Value Value
Definition:
transform_dialog.h:58
TransformDialog::Operation
ARDOUR::Transform::Operation Operation
Definition:
transform_dialog.h:61
TransformDialog::_seed_chooser
ValueChooser * _seed_chooser
Definition:
transform_dialog.h:135
TransformDialog::TransformDialog
TransformDialog()
TransformDialog::add_clicked
void add_clicked()
TransformDialog::Source
ARDOUR::Transform::Value::Source Source
Definition:
transform_dialog.h:59
TransformDialog::_add_button
Gtk::Button _add_button
Definition:
transform_dialog.h:137
TransformDialog::_operations_box
Gtk::VBox _operations_box
Definition:
transform_dialog.h:136
TransformDialog::property_changed
void property_changed()
TransformDialog::_model
Model _model
Definition:
transform_dialog.h:133
TransformDialog::Operator
ARDOUR::Transform::Operation::Operator Operator
Definition:
transform_dialog.h:60
combobox.h
liststore.h
midi_model.h
spinbutton.h
ARDOUR::Transform::Operation
Definition:
transform.h:102
ARDOUR::Transform::Operation::Operator
Operator
Definition:
transform.h:103
ARDOUR::Transform::Program
Definition:
transform.h:126
ARDOUR::Transform::Value
Definition:
transform.h:70
ARDOUR::Transform::Value::Source
Source
Definition:
transform.h:74
TransformDialog::Model
Definition:
transform_dialog.h:84
TransformDialog::Model::property_cols
PropertyCols property_cols
Definition:
transform_dialog.h:89
TransformDialog::Model::property_list
Glib::RefPtr< Gtk::ListStore > property_list
Definition:
transform_dialog.h:90
TransformDialog::Model::source_cols
SourceCols source_cols
Definition:
transform_dialog.h:87
TransformDialog::Model::operator_cols
OperatorCols operator_cols
Definition:
transform_dialog.h:91
TransformDialog::Model::Model
Model()
TransformDialog::Model::operator_list
Glib::RefPtr< Gtk::ListStore > operator_list
Definition:
transform_dialog.h:92
TransformDialog::Model::source_list
Glib::RefPtr< Gtk::ListStore > source_list
Definition:
transform_dialog.h:88
TransformDialog::OperationChooser
Definition:
transform_dialog.h:116
TransformDialog::OperationChooser::remove_button
Gtk::Button remove_button
Definition:
transform_dialog.h:127
TransformDialog::OperationChooser::remove_clicked
void remove_clicked()
TransformDialog::OperationChooser::value_chooser
ValueChooser value_chooser
Definition:
transform_dialog.h:126
TransformDialog::OperationChooser::operator_combo
Gtk::ComboBox operator_combo
Definition:
transform_dialog.h:125
TransformDialog::OperationChooser::OperationChooser
OperationChooser(const Model &model)
TransformDialog::OperationChooser::get
void get(std::list< Operation > &ops)
TransformDialog::OperationChooser::model
const Model & model
Definition:
transform_dialog.h:124
TransformDialog::OperatorCols
Definition:
transform_dialog.h:77
TransformDialog::OperatorCols::op
Gtk::TreeModelColumn< Operator > op
Definition:
transform_dialog.h:80
TransformDialog::OperatorCols::OperatorCols
OperatorCols()
Definition:
transform_dialog.h:78
TransformDialog::OperatorCols::label
Gtk::TreeModelColumn< std::string > label
Definition:
transform_dialog.h:81
TransformDialog::PropertyCols
Definition:
transform_dialog.h:70
TransformDialog::PropertyCols::PropertyCols
PropertyCols()
Definition:
transform_dialog.h:71
TransformDialog::PropertyCols::label
Gtk::TreeModelColumn< std::string > label
Definition:
transform_dialog.h:74
TransformDialog::PropertyCols::property
Gtk::TreeModelColumn< Property > property
Definition:
transform_dialog.h:73
TransformDialog::SourceCols
Definition:
transform_dialog.h:63
TransformDialog::SourceCols::source
Gtk::TreeModelColumn< Source > source
Definition:
transform_dialog.h:66
TransformDialog::SourceCols::SourceCols
SourceCols()
Definition:
transform_dialog.h:64
TransformDialog::SourceCols::label
Gtk::TreeModelColumn< std::string > label
Definition:
transform_dialog.h:67
TransformDialog::ValueChooser
Definition:
transform_dialog.h:95
TransformDialog::ValueChooser::source_changed
void source_changed()
TransformDialog::ValueChooser::model
const Model & model
Models for combo boxes.
Definition:
transform_dialog.h:107
TransformDialog::ValueChooser::source_combo
Gtk::ComboBox source_combo
Value source chooser.
Definition:
transform_dialog.h:109
TransformDialog::ValueChooser::value_spinner
Gtk::SpinButton value_spinner
Value or minimum for RANDOM.
Definition:
transform_dialog.h:111
TransformDialog::ValueChooser::get_value
double get_value() const
TransformDialog::ValueChooser::get
void get(std::list< Operation > &ops)
TransformDialog::ValueChooser::property_combo
Gtk::ComboBox property_combo
Property chooser.
Definition:
transform_dialog.h:110
TransformDialog::ValueChooser::max_spinner
Gtk::SpinButton max_spinner
Maximum for RANDOM.
Definition:
transform_dialog.h:113
TransformDialog::ValueChooser::set_target_property
void set_target_property(Property prop)
TransformDialog::ValueChooser::ValueChooser
ValueChooser(const Model &model)
TransformDialog::ValueChooser::get_max
double get_max() const
TransformDialog::ValueChooser::target_property
Property target_property
Property on source.
Definition:
transform_dialog.h:108
TransformDialog::ValueChooser::to_label
Gtk::Label to_label
"to" label for RANDOM
Definition:
transform_dialog.h:112
transform.h
treemodel.h
gtk2_ardour
transform_dialog.h
Generated on Wed Dec 25 2024 05:44:53 for Ardour by
1.9.1