Ardour
9.0-pre0-582-g084a23a80d
gtk2_ardour/led.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2010-2011 Paul Davis <paul@linuxaudiosystems.com>
3
* Copyright (C) 2011 David Robillard <d@drobilla.net>
4
* Copyright (C) 2014-2017 Robin Gareus <robin@gareus.org>
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License along
17
* with this program; if not, write to the Free Software Foundation, Inc.,
18
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
*/
20
21
#ifndef __gtk2_ardour_led_h__
22
#define __gtk2_ardour_led_h__
23
24
#include <stdint.h>
25
26
#include "
gtkmm2ext/cairo_widget.h
"
27
28
class
LED
:
public
CairoWidget
29
{
30
public
:
31
LED
();
32
virtual
~LED
();
33
34
void
set_diameter
(
float
);
35
36
protected
:
37
void
render
(Cairo::RefPtr<Cairo::Context>
const
&, cairo_rectangle_t*);
38
void
on_size_request
(
Gtk::Requisition
* req);
39
void
on_realize
();
40
41
private
:
42
float
_diameter
;
43
float
_red
;
44
float
_green
;
45
float
_blue
;
46
bool
_fixed_diameter
;
47
48
void
set_colors_from_style
();
49
};
50
51
#endif
/* __gtk2_ardour_led_h__ */
cairo_widget.h
CairoWidget
Definition:
cairo_widget.h:38
LED
Definition:
gtk2_ardour/led.h:29
LED::_green
float _green
Definition:
gtk2_ardour/led.h:44
LED::_red
float _red
Definition:
gtk2_ardour/led.h:43
LED::_blue
float _blue
Definition:
gtk2_ardour/led.h:45
LED::on_size_request
void on_size_request(Gtk::Requisition *req)
This is a default handler for the signal signal_size_request().
LED::set_colors_from_style
void set_colors_from_style()
LED::LED
LED()
LED::_fixed_diameter
bool _fixed_diameter
Definition:
gtk2_ardour/led.h:46
LED::~LED
virtual ~LED()
LED::on_realize
void on_realize()
This is a default handler for the signal signal_realize().
LED::set_diameter
void set_diameter(float)
LED::_diameter
float _diameter
Definition:
gtk2_ardour/led.h:42
LED::render
void render(Cairo::RefPtr< Cairo::Context > const &, cairo_rectangle_t *)
_GtkRequisition
Definition:
gtkwidget.h:520
gtk2_ardour
led.h
Generated on Wed Dec 25 2024 05:44:33 for Ardour by
1.9.1