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 
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:
47 
48 private:
49  int _steps;
50  std::vector<bool> active;
51  float width;
54 };
55 
56 
57 } /* namespace */
std::vector< bool > active
Definition: bracelet.h:50
void render(Cairo::RefPtr< Cairo::Context > const &, cairo_rectangle_t *)
int steps() const
Definition: bracelet.h:38
void on_size_allocate(Gtk::Allocation &)
This is a default handler for the signal signal_size_allocate().
void fill(std::vector< int > const &steps)
#define LIBWIDGETS_API