Ardour  9.0-pre0-1792-g9dafed2d76
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 
49 
51  void update_title ();
54 
58 
65  void darea_grab_notify (bool);
66 
69 
70  void pause_toggled ();
71  void clear_clicked ();
72 
73  enum DragStatus {
77  DragRange
78  };
79 
80  const float _dB_range = 86; // +6 .. -80 dB
81  const float _dB_span = 24;
82  const float _dB_min = -80;
83 
92  Cairo::RefPtr<Cairo::ImageSurface> _grid;
93  bool _visible;
94  std::vector<std::string> _speed_strings;
95  std::vector<std::string> _warp_strings;
96  std::map<int, float> _xpos;
100  int _margin;
101  float _uiscale;
102  int _min_dB;
103  int _max_dB;
110 
112 };
const float _dB_range
Definition: rta_window.h:80
PBD::ScopedConnectionList _rta_connections
Definition: rta_window.h:111
void set_session(ARDOUR::Session *)
bool on_key_release_event(GdkEventKey *)
This is a default handler for the signal signal_key_release_event().
std::vector< std::string > _speed_strings
Definition: rta_window.h:94
bool darea_button_press_event(GdkEventButton *)
Gtk::Label _pointer_info
Definition: rta_window.h:87
bool _visible
Definition: rta_window.h:93
Cairo::RefPtr< Cairo::ImageSurface > _grid
Definition: rta_window.h:92
ArdourWidgets::ArdourDropdown _warp_dropdown
Definition: rta_window.h:91
Gtk::HBox _ctrlbox
Definition: rta_window.h:85
void pause_toggled()
const float _dB_min
Definition: rta_window.h:82
bool _hovering_dB
Definition: rta_window.h:104
Gtkmm2ext::Color _textc
Definition: rta_window.h:99
bool on_key_press_event(GdkEventKey *)
This is a default handler for the signal signal_key_press_event().
int _min_dB
Definition: rta_window.h:102
ArdourWidgets::ArdourButton _clear
Definition: rta_window.h:89
const float _dB_span
Definition: rta_window.h:81
int _max_dB
Definition: rta_window.h:103
void session_going_away()
int _cursor_y
Definition: rta_window.h:109
std::map< int, float > _xpos
Definition: rta_window.h:96
Gtkmm2ext::Color _basec
Definition: rta_window.h:97
int _cursor_x
Definition: rta_window.h:108
Gtk::VBox _vpacker
Definition: rta_window.h:84
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:100
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:106
DragStatus _dragging_dB
Definition: rta_window.h:105
float _uiscale
Definition: rta_window.h:101
float _dragstart_dB
Definition: rta_window.h:107
bool darea_grab_broken_event(GdkEventGrabBroken *)
void update_title()
void set_rta_warp(ARDOUR::DSP::PerceptualAnalyzer::Warp)
Gtkmm2ext::Color _gridc
Definition: rta_window.h:98
ArdourWidgets::ArdourDropdown _speed_dropdown
Definition: rta_window.h:90
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:88
std::vector< std::string > _warp_strings
Definition: rta_window.h:95
Gtk::DrawingArea _darea
Definition: rta_window.h:86
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