Ardour  9.2-567-gf42f34d25f
scale_dialog.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 <map>
22 
23 #include "ytkmm/label.h"
24 #include "ytkmm/entry.h"
25 #include "ytkmm/spinbutton.h"
27 
28 #include "ardour/scale.h"
29 
31 
32 #include "ardour_dialog.h"
33 
34 class ScaleDialog : public ArdourDialog
35 {
36  public:
39 
40  void set (ARDOUR::MusicalKey const &);
42 
43  private:
44  static std::map<ARDOUR::MusicalModeType,std::string> type_string_map;
45  static std::map<std::string,ARDOUR::MusicalModeType> string_type_map;
46  static void fill_maps ();
47 
49 
50  struct StepEntry : public Gtk::Entry {
51  StepEntry (int idx) : index (idx) {}
52  int index;
53  };
54 
70 
76 
77  void pack_steps ();
80 };
Gtk::Label type_label
Definition: scale_dialog.h:59
Gtk::Label name_label
Definition: scale_dialog.h:57
void pack_steps()
Gtk::SpinButton step_spinner
Definition: scale_dialog.h:63
Gtk::VBox named_scale_box
Definition: scale_dialog.h:75
void fill_dropdowns(ARDOUR::MusicalModeCulture)
ArdourWidgets::ArdourDropdown mode_dropdown
Definition: scale_dialog.h:73
Gtk::HBox name_packer
Definition: scale_dialog.h:56
Gtk::Adjustment step_adjustment
Definition: scale_dialog.h:61
ArdourWidgets::ArdourDropdown type_dropdown
Definition: scale_dialog.h:65
Gtk::HBox root_mode_box
Definition: scale_dialog.h:74
static std::map< std::string, ARDOUR::MusicalModeType > string_type_map
Definition: scale_dialog.h:45
Gtk::HBox steps_box
Definition: scale_dialog.h:64
ARDOUR::MusicalKey get() const
Gtk::HBox scala_box
Definition: scale_dialog.h:66
ArdourWidgets::ArdourDropdown root_dropdown
Definition: scale_dialog.h:72
void set(ARDOUR::MusicalKey const &)
Gtk::FileChooserButton scala_file_button
Definition: scale_dialog.h:68
Gtk::Label steps_label
Definition: scale_dialog.h:62
Gtk::VBox step_packer
Definition: scale_dialog.h:55
ARDOUR::MusicalKey _key
Definition: scale_dialog.h:48
Gtk::HBox type_box
Definition: scale_dialog.h:58
void set_type(ARDOUR::MusicalModeType)
Gtk::Label scala_label
Definition: scale_dialog.h:67
static void fill_maps()
ArdourWidgets::ArdourDropdown culture_dropdown
Definition: scale_dialog.h:71
Gtk::Button clear_button
Definition: scale_dialog.h:69
Gtk::Entry name_entry
Definition: scale_dialog.h:60
static std::map< ARDOUR::MusicalModeType, std::string > type_string_map
Definition: scale_dialog.h:44