mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 02:56:35 +01:00
Separate DSP load indicator into generic gauge widget
This commit is contained in:
parent
ef1301759d
commit
b0c5005cec
5 changed files with 225 additions and 100 deletions
|
|
@ -21,25 +21,25 @@
|
|||
|
||||
#include <pangomm.h>
|
||||
|
||||
#include "gtkmm2ext/cairo_widget.h"
|
||||
#include "ardour_gauge.h"
|
||||
|
||||
class DspLoadIndicator : public CairoWidget
|
||||
class DspLoadIndicator : public ArdourGauge
|
||||
{
|
||||
public:
|
||||
public:
|
||||
DspLoadIndicator ();
|
||||
~DspLoadIndicator ();
|
||||
|
||||
void set_xrun_count (const unsigned int xruns);
|
||||
void set_dsp_load (const double load);
|
||||
|
||||
protected:
|
||||
bool alert () const;
|
||||
ArdourGauge::Status indicator () const;
|
||||
float level () const;
|
||||
std::string tooltip_text ();
|
||||
|
||||
private:
|
||||
void on_size_request (Gtk::Requisition*);
|
||||
void render (Cairo::RefPtr<Cairo::Context> const&, cairo_rectangle_t*);
|
||||
bool on_button_release_event (GdkEventButton*);
|
||||
|
||||
void update_tooltip ();
|
||||
|
||||
Glib::RefPtr<Pango::Layout> _layout;
|
||||
float _dsp_load;
|
||||
unsigned int _xrun_count;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue