Ardour
9.0-pre0-1320-gf48fe3f740
piano_roll_header.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 <
ytkmm/drawingarea.h
>
23
24
#include "
prh_base.h
"
25
26
class
PianoRollHeader
:
public
Gtk::DrawingArea
,
public
PianoRollHeaderBase
{
27
public
:
28
PianoRollHeader
(
MidiViewBackground
&);
29
30
bool
on_expose_event
(
GdkEventExpose
*);
31
bool
on_motion_notify_event
(
GdkEventMotion
*);
32
bool
on_button_press_event
(
GdkEventButton
*);
33
bool
on_button_release_event
(
GdkEventButton
*);
34
bool
on_scroll_event
(
GdkEventScroll
*);
35
bool
on_enter_notify_event
(
GdkEventCrossing
*);
36
bool
on_leave_notify_event
(
GdkEventCrossing
*);
37
38
void
on_size_request
(
Gtk::Requisition
*);
39
void
redraw
();
40
void
redraw
(
double
x,
double
y,
double
w,
double
h);
41
double
height
()
const
;
42
double
width
()
const
;
43
double
event_y_to_y
(
double
evy)
const
{
return
evy; }
44
void
draw_transform
(
double
& x,
double
& y)
const
{}
45
void
event_transform
(
double
& x,
double
& y)
const
{}
46
void
_queue_resize
() {
queue_resize
(); }
47
void
do_grab
() {
add_modal_grab
(); }
48
void
do_ungrab
() {
remove_modal_grab
(); }
49
Glib::RefPtr<Gdk::Window>
cursor_window
();
50
std::shared_ptr<ARDOUR::MidiTrack>
midi_track
();
51
52
void
instrument_info_change
();
53
54
private
:
55
MidiStreamView
*
stream_view
;
56
};
57
Gtk::DrawingArea
Definition:
drawingarea.h:51
Gtk::Widget::remove_modal_grab
void remove_modal_grab()
Gtk::Widget::add_modal_grab
void add_modal_grab()
Gtk::Widget::queue_resize
void queue_resize()
MidiStreamView
Definition:
midi_streamview.h:61
MidiViewBackground
Definition:
midi_view_background.h:56
PianoRollHeaderBase
Definition:
prh_base.h:43
PianoRollHeader
Definition:
piano_roll_header.h:26
PianoRollHeader::on_enter_notify_event
bool on_enter_notify_event(GdkEventCrossing *)
This is a default handler for the signal signal_enter_notify_event().
PianoRollHeader::midi_track
std::shared_ptr< ARDOUR::MidiTrack > midi_track()
PianoRollHeader::redraw
void redraw()
PianoRollHeader::cursor_window
Glib::RefPtr< Gdk::Window > cursor_window()
PianoRollHeader::width
double width() const
PianoRollHeader::draw_transform
void draw_transform(double &x, double &y) const
Definition:
piano_roll_header.h:44
PianoRollHeader::on_size_request
void on_size_request(Gtk::Requisition *)
This is a default handler for the signal signal_size_request().
PianoRollHeader::on_scroll_event
bool on_scroll_event(GdkEventScroll *)
This is a default handler for the signal signal_scroll_event().
PianoRollHeader::redraw
void redraw(double x, double y, double w, double h)
PianoRollHeader::event_y_to_y
double event_y_to_y(double evy) const
Definition:
piano_roll_header.h:43
PianoRollHeader::height
double height() const
PianoRollHeader::on_button_release_event
bool on_button_release_event(GdkEventButton *)
This is a default handler for the signal signal_button_release_event().
PianoRollHeader::stream_view
MidiStreamView * stream_view
Definition:
piano_roll_header.h:55
PianoRollHeader::event_transform
void event_transform(double &x, double &y) const
Definition:
piano_roll_header.h:45
PianoRollHeader::_queue_resize
void _queue_resize()
Definition:
piano_roll_header.h:46
PianoRollHeader::on_leave_notify_event
bool on_leave_notify_event(GdkEventCrossing *)
This is a default handler for the signal signal_leave_notify_event().
PianoRollHeader::PianoRollHeader
PianoRollHeader(MidiViewBackground &)
PianoRollHeader::on_expose_event
bool on_expose_event(GdkEventExpose *)
This is a default handler for the signal signal_expose_event().
PianoRollHeader::on_button_press_event
bool on_button_press_event(GdkEventButton *)
This is a default handler for the signal signal_button_press_event().
PianoRollHeader::instrument_info_change
void instrument_info_change()
PianoRollHeader::do_ungrab
void do_ungrab()
Definition:
piano_roll_header.h:48
PianoRollHeader::on_motion_notify_event
bool on_motion_notify_event(GdkEventMotion *)
This is a default handler for the signal signal_motion_notify_event().
PianoRollHeader::do_grab
void do_grab()
Definition:
piano_roll_header.h:47
drawingarea.h
prh_base.h
_GdkEventButton
Definition:
gdkevents.h:321
_GdkEventCrossing
Definition:
gdkevents.h:383
_GdkEventExpose
Definition:
gdkevents.h:281
_GdkEventMotion
Definition:
gdkevents.h:306
_GdkEventScroll
Definition:
gdkevents.h:351
_GtkRequisition
Definition:
gtkwidget.h:520
gtk2_ardour
piano_roll_header.h
Generated on Mon Jun 16 2025 02:06:53 for Ardour by
1.9.1