Ardour  9.0-pre0-582-g084a23a80d
gtk2_ardour/note.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013-2018 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 <iostream>
22 
23 #include "canvas/rectangle.h"
24 
25 #include "note_base.h"
26 #include "midi_util.h"
27 
28 namespace ArdourCanvas {
29  class Container;
30  class Note;
31 }
32 
33 class Note : public NoteBase
34 {
35 public:
37 
39  ArdourCanvas::Item* parent,
40  const std::shared_ptr<NoteType> note = std::shared_ptr<NoteType>(),
41  bool with_events = true);
42 
43  ~Note ();
44 
49 
55 
57  void set_outline_all ();
58 
59  void set_outline_color (uint32_t);
60  void set_fill_color (uint32_t);
61 
62  void show ();
63  void hide ();
64 
65  void set_ignore_events (bool);
66 
67  /* Just changes the visual display of velocity during a drag */
68  void set_velocity (double);
69  double visual_velocity () const;
70  void move_event (double dx, double dy);
71 
72 private:
74 };
75 
const std::shared_ptr< NoteType > note() const
Definition: note_base.h:116
void set_outline_what(ArdourCanvas::Rectangle::What)
void set_outline_all()
ArdourCanvas::Coord y0() const
void set(ArdourCanvas::Rect)
void set_y1(ArdourCanvas::Coord)
void set_x0(ArdourCanvas::Coord)
void set_fill_color(uint32_t)
void set_outline_color(uint32_t)
void set_velocity(double)
void set_x1(ArdourCanvas::Coord)
Note(MidiView &region, ArdourCanvas::Item *parent, const std::shared_ptr< NoteType > note=std::shared_ptr< NoteType >(), bool with_events=true)
void set_y0(ArdourCanvas::Coord)
void hide()
ArdourCanvas::Coord y1() const
void show()
ArdourCanvas::Coord x0() const
void move_event(double dx, double dy)
void set_ignore_events(bool)
Evoral::Note< Temporal::Beats > NoteType
ArdourCanvas::Note * _visual_note
double visual_velocity() const
ArdourCanvas::Coord x1() const
PBD::PropertyDescriptor< bool > region