Ardour  9.0-pre0-582-g084a23a80d
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 #pragma once
23 
24 #include "pbd/signals.h"
25 #include "ardour/types.h"
26 
27 #include "canvas/arrow.h"
28 #include "canvas/line.h"
29 #include "canvas/types.h"
30 
31 class EditingContext;
32 
34 {
35 public:
36  EditorCursor (EditingContext&, bool (EditingContext::*)(GdkEvent*,ArdourCanvas::Item*), std::string const &);
37  EditorCursor (EditingContext&, std::string const &);
39 
41 
42 
43  void show ();
44  void hide ();
46  void set_sensitive (bool);
47 
49  return _current_sample;
50  }
51 
53  return *_canvas_item;
54  }
55 
57 
58 private:
62 };
63 
Declaration of the Arrow canvas object.
EditorCursor(EditingContext &, std::string const &)
void set_color(Gtkmm2ext::Color)
EditorCursor(EditingContext &, bool(EditingContext::*)(GdkEvent *, ArdourCanvas::Item *), std::string const &)
ArdourCanvas::Arrow * _canvas_item
ArdourCanvas::Arrow & canvas_item()
PBD::Signal< void(samplepos_t)> PositionChanged
EditingContext & _editor
void set_position(samplepos_t)
void set_sensitive(bool)
samplepos_t current_sample() const
samplepos_t _current_sample
Temporal::samplepos_t samplepos_t
uint32_t Color
Definition: colors.h:33