Ardour  8.12
editor_cursors.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010-2012 Carl Hetherington <carl@carlh.net>
3  * Copyright (C) 2012-2014 David Robillard <d@drobilla.net>
4  * Copyright (C) 2012-2017 Paul Davis <paul@linuxaudiosystems.com>
5  * Copyright (C) 2014-2019 Robin Gareus <robin@gareus.org>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, write to the Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  */
21 
22 #ifndef __gtk_ardour_editor_cursors_h__
23 #define __gtk_ardour_editor_cursors_h__
24 
25 #include "pbd/signals.h"
26 #include "ardour/types.h"
27 
28 #include "canvas/arrow.h"
29 #include "canvas/line.h"
30 #include "canvas/types.h"
31 
32 class Editor;
33 
35 {
36 public:
37  EditorCursor (Editor&, bool (Editor::*)(GdkEvent*,ArdourCanvas::Item*), std::string const &);
38  EditorCursor (Editor&, std::string const &);
40 
42 
43 
44  void show ();
45  void hide ();
47  void set_sensitive (bool);
48 
50  return _current_sample;
51  }
52 
54  return *_track_canvas_item;
55  }
56 
57  PBD::Signal1<void, samplepos_t> PositionChanged;
58 
59 private:
63 };
64 
65 #endif // __gtk_ardour_editor_cursors_h__
Declaration of the Arrow canvas object.
EditorCursor(Editor &, std::string const &)
ArdourCanvas::Arrow * _track_canvas_item
void set_color(Gtkmm2ext::Color)
PBD::Signal1< void, samplepos_t > PositionChanged
ArdourCanvas::Arrow & track_canvas_item()
EditorCursor(Editor &, bool(Editor::*)(GdkEvent *, ArdourCanvas::Item *), std::string const &)
Editor & _editor
void set_position(samplepos_t)
void set_sensitive(bool)
samplepos_t current_sample() const
samplepos_t _current_sample
Definition: editor.h:158
Temporal::samplepos_t samplepos_t
uint32_t Color
Definition: colors.h:33