Ardour  9.0-pre0-1320-gf48fe3f740
prh.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2009 David Robillard <d@drobilla.net>
3  * Copyright (C) 2010-2012 Paul Davis <paul@linuxaudiosystems.com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #pragma once
21 
22 #include "canvas/rectangle.h"
23 
24 #include "prh_base.h"
25 
26 namespace ArdourCanvas {
27 
29  public:
31 
32  void size_request (double& w, double& h) const;
33  void resize ();
34  void redraw ();
35  void redraw (double x, double y, double w, double h);
36  double height() const;
37  double width() const;
38  double event_y_to_y (double evy) const;
39  void draw_transform (double& x, double& y) const;
40  void event_transform (double& x, double& y) const;
41  void _queue_resize () { queue_resize(); }
44  Glib::RefPtr<Gdk::Window> cursor_window();
45  std::shared_ptr<ARDOUR::MidiTrack> midi_track();
46 
47  void render (ArdourCanvas::Rect const & area, Cairo::RefPtr<Cairo::Context>) const;
48 
49 
50  private:
53 };
54 
55 }
56 
PBD::ScopedConnection height_connection
Definition: prh.h:51
bool event_handler(GdkEvent *)
void size_request(double &w, double &h) const
std::shared_ptr< ARDOUR::MidiTrack > midi_track()
void redraw(double x, double y, double w, double h)
double event_y_to_y(double evy) const
void render(ArdourCanvas::Rect const &area, Cairo::RefPtr< Cairo::Context >) const
Glib::RefPtr< Gdk::Window > cursor_window()
PianoRollHeader(ArdourCanvas::Item *parent, MidiViewBackground &)
void event_transform(double &x, double &y) const
void draw_transform(double &x, double &y) const