Ardour  9.0-pre0-1699-gfaebc7ab35
rta_window.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2025 Robin Gareus <robin@gareus.org>
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 #pragma once
19 
20 #include <glibmm/thread.h>
21 
22 #include <ytkmm/box.h>
23 #include <ytkmm/drawingarea.h>
24 
25 #include "ardour/ardour.h"
26 #include "ardour/dsp_filter.h"
27 #include "ardour/session_handle.h"
28 #include "ardour/types.h"
29 
30 #include "widgets/ardour_button.h"
32 
33 #include "ardour_window.h"
34 
35 class RTAWindow : public ArdourWindow
36 {
37 public:
39 
41  XMLNode& get_state () const;
42 
43 private:
44  void on_map ();
45  void on_unmap ();
46 
48  void update_title ();
51 
55 
62  void darea_grab_notify (bool);
63 
66 
67  void pause_toggled ();
68  void clear_clicked ();
69 
70  enum DragStatus {
74  DragRange
75  };
76 
77  const float _dB_range = 86; // +6 .. -80 dB
78  const float _dB_span = 24;
79  const float _dB_min = -80;
80 
89  Cairo::RefPtr<Cairo::ImageSurface> _grid;
90  bool _visible;
91  std::vector<std::string> _speed_strings;
92  std::vector<std::string> _warp_strings;
93  std::map<int, float> _xpos;
97  int _margin;
98  float _uiscale;
99  int _min_dB;
100  int _max_dB;
107 
109 };
const float _dB_range
Definition: rta_window.h:77
PBD::ScopedConnectionList _rta_connections
Definition: rta_window.h:108
void set_session(ARDOUR::Session *)
std::vector< std::string > _speed_strings
Definition: rta_window.h:91
bool darea_button_press_event(GdkEventButton *)
Gtk::Label _pointer_info
Definition: rta_window.h:84
bool _visible
Definition: rta_window.h:90
Cairo::RefPtr< Cairo::ImageSurface > _grid
Definition: rta_window.h:89
ArdourWidgets::ArdourDropdown _warp_dropdown
Definition: rta_window.h:88
Gtk::HBox _ctrlbox
Definition: rta_window.h:82
void pause_toggled()
const float _dB_min
Definition: rta_window.h:79
bool _hovering_dB
Definition: rta_window.h:101
Gtkmm2ext::Color _textc
Definition: rta_window.h:96
int _min_dB
Definition: rta_window.h:99
ArdourWidgets::ArdourButton _clear
Definition: rta_window.h:86
const float _dB_span
Definition: rta_window.h:78
int _max_dB
Definition: rta_window.h:100
void session_going_away()
int _cursor_y
Definition: rta_window.h:106
std::map< int, float > _xpos
Definition: rta_window.h:93
Gtkmm2ext::Color _basec
Definition: rta_window.h:94
int _cursor_x
Definition: rta_window.h:105
Gtk::VBox _vpacker
Definition: rta_window.h:81
XMLNode & get_state() const
bool darea_expose_event(GdkEventExpose *)
void clear_clicked()
bool darea_scroll_event(GdkEventScroll *)
bool darea_button_release_event(GdkEventButton *)
void darea_size_request(Gtk::Requisition *)
int _margin
Definition: rta_window.h:97
bool darea_motion_notify_event(GdkEventMotion *)
void darea_grab_notify(bool)
void rta_settings_changed()
void set_rta_speed(ARDOUR::DSP::PerceptualAnalyzer::Speed)
float _dragstart_y
Definition: rta_window.h:103
DragStatus _dragging_dB
Definition: rta_window.h:102
float _uiscale
Definition: rta_window.h:98
float _dragstart_dB
Definition: rta_window.h:104
bool darea_grab_broken_event(GdkEventGrabBroken *)
void update_title()
void set_rta_warp(ARDOUR::DSP::PerceptualAnalyzer::Warp)
Gtkmm2ext::Color _gridc
Definition: rta_window.h:95
ArdourWidgets::ArdourDropdown _speed_dropdown
Definition: rta_window.h:87
void on_theme_changed()
void darea_size_allocate(Gtk::Allocation &)
void on_unmap()
This is a default handler for the signal signal_unmap().
ArdourWidgets::ArdourButton _pause
Definition: rta_window.h:85
std::vector< std::string > _warp_strings
Definition: rta_window.h:92
Gtk::DrawingArea _darea
Definition: rta_window.h:83
void on_map()
This is a default handler for the signal signal_map().
bool darea_leave_notify_event(GdkEventCrossing *)
Definition: xml++.h:114
uint32_t Color
Definition: colors.h:33