Ardour
9.0-pre0-582-g084a23a80d
rec_info_box.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2021 Robin Gareus <robin@gareus.org>
3
* Copyright (C) 2021 Ben Loftis <ben@harrisonconsoles.com>
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License along
16
* with this program; if not, write to the Free Software Foundation, Inc.,
17
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
*/
19
20
#ifndef _rec_info_box_h_
21
#define _rec_info_box_h_
22
23
#include "
ardour/session_handle.h
"
24
25
#include "
gtkmm2ext/cairo_widget.h
"
26
27
namespace
ARDOUR
{
28
class
Route;
29
}
30
31
class
RecInfoBox
:
public
CairoWidget
,
public
ARDOUR::SessionHandlePtr
32
{
33
public
:
34
RecInfoBox
();
35
36
virtual
void
set_session
(
ARDOUR::Session
*);
37
38
protected
:
39
virtual
void
render
(Cairo::RefPtr<Cairo::Context>
const
&, cairo_rectangle_t*) = 0;
40
virtual
void
dpi_reset
() {}
41
42
void
on_size_request
(
Gtk::Requisition
*);
43
void
on_size_allocate
(
Gtk::Allocation
&);
44
virtual
void
update
();
45
46
Glib::RefPtr<Pango::Layout>
_layout_label
;
47
Glib::RefPtr<Pango::Layout>
_layout_value
;
48
int
_width
;
49
int
_height
;
50
};
51
52
class
DurationInfoBox
:
public
RecInfoBox
53
{
54
public
:
55
virtual
void
set_session
(
ARDOUR::Session
*);
56
57
protected
:
58
void
render
(Cairo::RefPtr<Cairo::Context>
const
&, cairo_rectangle_t*);
59
void
dpi_reset
();
60
virtual
void
update
();
61
62
private
:
63
void
rec_state_changed
();
64
sigc::connection
_rectime_connection
;
65
};
66
67
class
XrunInfoBox
:
public
RecInfoBox
68
{
69
public
:
70
virtual
void
set_session
(
ARDOUR::Session
*);
71
virtual
void
update
();
72
73
protected
:
74
void
render
(Cairo::RefPtr<Cairo::Context>
const
&, cairo_rectangle_t*);
75
void
dpi_reset
();
76
};
77
78
class
RemainInfoBox
:
public
RecInfoBox
79
{
80
public
:
81
virtual
void
set_session
(
ARDOUR::Session
*);
82
83
protected
:
84
void
render
(Cairo::RefPtr<Cairo::Context>
const
&, cairo_rectangle_t*);
85
void
dpi_reset
();
86
virtual
void
update
();
87
88
private
:
89
void
count_recenabled_streams
(
ARDOUR::Route
&);
90
uint32_t
_rec_enabled_streams
;
91
sigc::connection
_diskspace_connection
;
92
};
93
94
#endif
cairo_widget.h
ARDOUR::Route
Definition:
route.h:108
ARDOUR::SessionHandlePtr
Definition:
session_handle.h:46
ARDOUR::Session
Definition:
session.h:211
CairoWidget
Definition:
cairo_widget.h:38
DurationInfoBox
Definition:
rec_info_box.h:53
DurationInfoBox::render
void render(Cairo::RefPtr< Cairo::Context > const &, cairo_rectangle_t *)
DurationInfoBox::set_session
virtual void set_session(ARDOUR::Session *)
DurationInfoBox::update
virtual void update()
DurationInfoBox::dpi_reset
void dpi_reset()
DurationInfoBox::_rectime_connection
sigc::connection _rectime_connection
Definition:
rec_info_box.h:64
DurationInfoBox::rec_state_changed
void rec_state_changed()
Gdk::Rectangle
Definition:
tk/ydkmm/ydkmm/gdkmm/rectangle.h:42
RecInfoBox
Definition:
rec_info_box.h:32
RecInfoBox::_height
int _height
Definition:
rec_info_box.h:49
RecInfoBox::set_session
virtual void set_session(ARDOUR::Session *)
RecInfoBox::on_size_allocate
void on_size_allocate(Gtk::Allocation &)
This is a default handler for the signal signal_size_allocate().
RecInfoBox::dpi_reset
virtual void dpi_reset()
Definition:
rec_info_box.h:40
RecInfoBox::update
virtual void update()
RecInfoBox::RecInfoBox
RecInfoBox()
RecInfoBox::_layout_label
Glib::RefPtr< Pango::Layout > _layout_label
Definition:
rec_info_box.h:46
RecInfoBox::_layout_value
Glib::RefPtr< Pango::Layout > _layout_value
Definition:
rec_info_box.h:47
RecInfoBox::render
virtual void render(Cairo::RefPtr< Cairo::Context > const &, cairo_rectangle_t *)=0
RecInfoBox::_width
int _width
Definition:
rec_info_box.h:48
RecInfoBox::on_size_request
void on_size_request(Gtk::Requisition *)
This is a default handler for the signal signal_size_request().
RemainInfoBox
Definition:
rec_info_box.h:79
RemainInfoBox::set_session
virtual void set_session(ARDOUR::Session *)
RemainInfoBox::_rec_enabled_streams
uint32_t _rec_enabled_streams
Definition:
rec_info_box.h:90
RemainInfoBox::_diskspace_connection
sigc::connection _diskspace_connection
Definition:
rec_info_box.h:91
RemainInfoBox::render
void render(Cairo::RefPtr< Cairo::Context > const &, cairo_rectangle_t *)
RemainInfoBox::dpi_reset
void dpi_reset()
RemainInfoBox::count_recenabled_streams
void count_recenabled_streams(ARDOUR::Route &)
RemainInfoBox::update
virtual void update()
XrunInfoBox
Definition:
rec_info_box.h:68
XrunInfoBox::render
void render(Cairo::RefPtr< Cairo::Context > const &, cairo_rectangle_t *)
XrunInfoBox::update
virtual void update()
XrunInfoBox::set_session
virtual void set_session(ARDOUR::Session *)
XrunInfoBox::dpi_reset
void dpi_reset()
ARDOUR
Definition:
analysis_window.h:44
session_handle.h
_GtkRequisition
Definition:
gtkwidget.h:520
gtk2_ardour
rec_info_box.h
Generated on Wed Dec 25 2024 05:44:45 for Ardour by
1.9.1