1 |
/* -*- c++ -*- |
/* -*- c++ -*- |
2 |
* Copyright (C) 2006-2010 Andreas Persson |
* Copyright (C) 2006-2011 Andreas Persson |
3 |
* |
* |
4 |
* This program is free software; you can redistribute it and/or |
* This program is free software; you can redistribute it and/or |
5 |
* modify it under the terms of the GNU General Public License as |
* modify it under the terms of the GNU General Public License as |
29 |
|
|
30 |
#include "dimensionmanager.h" |
#include "dimensionmanager.h" |
31 |
#include "paramedit.h" |
#include "paramedit.h" |
32 |
|
#include "compat.h" |
33 |
|
|
34 |
#include <gig.h> |
#include <gig.h> |
35 |
|
|
80 |
Gtk::HBox m_VirtKeybPropsBox; |
Gtk::HBox m_VirtKeybPropsBox; |
81 |
|
|
82 |
protected: |
protected: |
83 |
|
#if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 90) || GTKMM_MAJOR_VERSION < 2 |
84 |
virtual bool on_expose_event(GdkEventExpose* e); |
virtual bool on_expose_event(GdkEventExpose* e); |
85 |
virtual void on_size_request(GtkRequisition* requisition); |
#endif |
86 |
|
virtual bool on_draw(const Cairo::RefPtr<Cairo::Context>& cr); |
87 |
virtual bool on_button_press_event(GdkEventButton* event); |
virtual bool on_button_press_event(GdkEventButton* event); |
88 |
virtual bool on_button_release_event(GdkEventButton* event); |
virtual bool on_button_release_event(GdkEventButton* event); |
89 |
virtual bool on_motion_notify_event(GdkEventMotion* event); |
virtual bool on_motion_notify_event(GdkEventMotion* event); |
90 |
|
|
91 |
gig::Region* get_region(int key); |
gig::Region* get_region(int key); |
92 |
|
|
93 |
Gdk::Color activeKeyColor, red, grey1, white, black; |
Gdk::RGBA activeKeyColor, red, grey1, white, black; |
94 |
|
|
95 |
sigc::signal<void> region_selected; |
sigc::signal<void> region_selected; |
96 |
sigc::signal<void> instrument_changed; |
sigc::signal<void> instrument_changed; |
109 |
SortedRegions regions; |
SortedRegions regions; |
110 |
|
|
111 |
bool is_black_key(int key); |
bool is_black_key(int key); |
112 |
void draw_key(int key, const Gdk::Color& color); |
void draw_key(int key, const Gdk::RGBA& color); |
113 |
void draw_digit(int key); |
void draw_digit(int key); |
114 |
void motion_resize_region(int x, int y); |
void motion_resize_region(int x, int y); |
115 |
void motion_move_region(int x, int y); |
void motion_move_region(int x, int y); |