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*);
39  void on_realize ();
40 
41 private:
42  float _diameter;
43  float _red;
44  float _green;
45  float _blue;
47 
49 };
50 
51 #endif /* __gtk2_ardour_led_h__ */
float _green
float _red
float _blue
void on_size_request(Gtk::Requisition *req)
This is a default handler for the signal signal_size_request().
void set_colors_from_style()
bool _fixed_diameter
virtual ~LED()
void on_realize()
This is a default handler for the signal signal_realize().
void set_diameter(float)
float _diameter
void render(Cairo::RefPtr< Cairo::Context > const &, cairo_rectangle_t *)