Ardour  9.2-654-gd2ed0bd940
chord_editor.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2026 Paul Davis <paul@linuxaudiosystems.com>
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 <string>
22 #include <vector>
23 
24 #include "ytkmm/box.h"
25 #include "ytkmm/entry.h"
26 #include "ytkmm/label.h"
27 #include "ytkmm/sizegroup.h"
28 
30 #include "widgets/ardour_button.h"
31 
32 #include "ardour/chord_provider.h"
33 
34 class EditingContext;
35 
36 class ChordEditor : public Gtk::VBox
37 {
38  public:
41 
42  void show_chord (std::vector<int> const & intervals);
43  void set_protected (bool);
44  bool is_protected () const;
46  int chord_size() const { return _chord_size; }
47 
48  private:
52 
55  Glib::RefPtr<Gtk::SizeGroup> button_sizing;
56  std::vector<ArdourWidgets::ArdourButton*> interval_buttons;
57  std::vector<Gtk::Label> labels;
58 
62 
66 
70 };
Gtk::Label other_label
Definition: chord_editor.h:69
bool is_protected() const
void set_protected(bool)
Gtk::HBox other_box
Definition: chord_editor.h:67
Glib::RefPtr< Gtk::SizeGroup > button_sizing
Definition: chord_editor.h:55
ARDOUR::ChordProvider::ChordInfo get_chord() const
Gtk::HBox canonical_box
Definition: chord_editor.h:59
Gtk::HBox short_box
Definition: chord_editor.h:63
Gtk::Entry short_entry
Definition: chord_editor.h:64
EditingContext & editing_context
Definition: chord_editor.h:49
void show_chord(std::vector< int > const &intervals)
Gtk::Label short_label
Definition: chord_editor.h:65
Gtk::Entry other_entry
Definition: chord_editor.h:68
ChordEditor(EditingContext &, ARDOUR::ChordProvider &, int chord_size)
ARDOUR::ChordProvider & chord_provider
Definition: chord_editor.h:50
Gtk::Entry canonical_entry
Definition: chord_editor.h:60
std::vector< ArdourWidgets::ArdourButton * > interval_buttons
Definition: chord_editor.h:56
Gtk::HBox lower_interval_packer
Definition: chord_editor.h:54
Gtk::HBox upper_interval_packer
Definition: chord_editor.h:53
Gtk::Label canonical_label
Definition: chord_editor.h:61
int chord_size() const
Definition: chord_editor.h:46
std::vector< Gtk::Label > labels
Definition: chord_editor.h:57