Ardour  9.0-pre0-1159-gcb8dd39f31
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 
69  enum DragStatus {
73  DragRange
74  };
75 
76  const float _dB_range = 86; // +6 .. -80 dB
77  const float _dB_span = 24;
78  const float _dB_min = -80;
79 
87  Cairo::RefPtr<Cairo::ImageSurface> _grid;
88  bool _visible;
89  std::vector<std::string> _speed_strings;
90  std::vector<std::string> _warp_strings;
91  std::map<int, float> _xpos;
95  int _margin;
96  float _uiscale;
97  int _min_dB;
98  int _max_dB;
105 
107 };
const float _dB_range
Definition: rta_window.h:76
PBD::ScopedConnectionList _rta_connections
Definition: rta_window.h:106
void set_session(ARDOUR::Session *)
std::vector< std::string > _speed_strings
Definition: rta_window.h:89
bool darea_button_press_event(GdkEventButton *)
Gtk::Label _pointer_info
Definition: rta_window.h:83
bool _visible
Definition: rta_window.h:88
Cairo::RefPtr< Cairo::ImageSurface > _grid
Definition: rta_window.h:87
ArdourWidgets::ArdourDropdown _warp_dropdown
Definition: rta_window.h:86
Gtk::HBox _ctrlbox
Definition: rta_window.h:81
void pause_toggled()
const float _dB_min
Definition: rta_window.h:78
bool _hovering_dB
Definition: rta_window.h:99
Gtkmm2ext::Color _textc
Definition: rta_window.h:94
int _min_dB
Definition: rta_window.h:97
const float _dB_span
Definition: rta_window.h:77
int _max_dB
Definition: rta_window.h:98
void session_going_away()
int _cursor_y
Definition: rta_window.h:104
std::map< int, float > _xpos
Definition: rta_window.h:91
Gtkmm2ext::Color _basec
Definition: rta_window.h:92
int _cursor_x
Definition: rta_window.h:103
Gtk::VBox _vpacker
Definition: rta_window.h:80
XMLNode & get_state() const
bool darea_expose_event(GdkEventExpose *)
bool darea_scroll_event(GdkEventScroll *)
bool darea_button_release_event(GdkEventButton *)
void darea_size_request(Gtk::Requisition *)
int _margin
Definition: rta_window.h:95
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:101
DragStatus _dragging_dB
Definition: rta_window.h:100
float _uiscale
Definition: rta_window.h:96
float _dragstart_dB
Definition: rta_window.h:102
bool darea_grab_broken_event(GdkEventGrabBroken *)
void update_title()
void set_rta_warp(ARDOUR::DSP::PerceptualAnalyzer::Warp)
Gtkmm2ext::Color _gridc
Definition: rta_window.h:93
ArdourWidgets::ArdourDropdown _speed_dropdown
Definition: rta_window.h:85
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:84
std::vector< std::string > _warp_strings
Definition: rta_window.h:90
Gtk::DrawingArea _darea
Definition: rta_window.h:82
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