Ardour
9.7-245-g303f7adf54
bracelet.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2026 Paul Davis <paul@linuxaudiosystems.com>
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
19
#pragma once
20
21
#include <vector>
22
23
#include "
gtkmm2ext/cairo_widget.h
"
24
25
#include "
widgets/visibility.h
"
26
27
namespace
ArdourWidgets
{
28
29
class
LIBWIDGETS_API
Bracelet
:
public
CairoWidget
{
30
public
:
31
Bracelet
(
int
points);
32
virtual
~Bracelet
();
33
34
void
fill
(
int
step);
35
void
fill
(std::vector<int>
const
& steps);
36
void
clear
();
37
38
int
steps
()
const
{
return
_steps; }
39
40
void
render
(Cairo::RefPtr<Cairo::Context>
const
&, cairo_rectangle_t*);
41
42
void
set_fill_color
(
int
);
43
void
set_outline_color
(
int
);
44
45
protected
:
46
void
on_size_allocate
(
Gtk::Allocation
&);
47
48
private
:
49
int
_steps
;
50
std::vector<bool>
active
;
51
float
width
;
52
int
fill_color
;
53
int
outline_color
;
54
};
55
56
57
}
/* namespace */
cairo_widget.h
ArdourWidgets::Bracelet
Definition:
bracelet.h:29
ArdourWidgets::Bracelet::set_fill_color
void set_fill_color(int)
ArdourWidgets::Bracelet::active
std::vector< bool > active
Definition:
bracelet.h:50
ArdourWidgets::Bracelet::fill_color
int fill_color
Definition:
bracelet.h:52
ArdourWidgets::Bracelet::width
float width
Definition:
bracelet.h:51
ArdourWidgets::Bracelet::set_outline_color
void set_outline_color(int)
ArdourWidgets::Bracelet::render
void render(Cairo::RefPtr< Cairo::Context > const &, cairo_rectangle_t *)
ArdourWidgets::Bracelet::~Bracelet
virtual ~Bracelet()
ArdourWidgets::Bracelet::clear
void clear()
ArdourWidgets::Bracelet::steps
int steps() const
Definition:
bracelet.h:38
ArdourWidgets::Bracelet::on_size_allocate
void on_size_allocate(Gtk::Allocation &)
This is a default handler for the signal signal_size_allocate().
ArdourWidgets::Bracelet::outline_color
int outline_color
Definition:
bracelet.h:53
ArdourWidgets::Bracelet::fill
void fill(int step)
ArdourWidgets::Bracelet::Bracelet
Bracelet(int points)
ArdourWidgets::Bracelet::fill
void fill(std::vector< int > const &steps)
ArdourWidgets::Bracelet::_steps
int _steps
Definition:
bracelet.h:49
CairoWidget
Definition:
cairo_widget.h:38
Gdk::Rectangle
Definition:
tk/ydkmm/ydkmm/rectangle.h:42
ArdourWidgets
Definition:
ardour_ui.h:186
visibility.h
LIBWIDGETS_API
#define LIBWIDGETS_API
Definition:
widgets/widgets/visibility.h:39
libs
widgets
widgets
bracelet.h
Generated on Sat Jul 25 2026 05:45:10 for Ardour by
1.9.1