1 |
/* -*- c++ -*- |
/* -*- c++ -*- |
2 |
* Copyright (C) 2006-2008 Andreas Persson |
* Copyright (C) 2006-2010 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 |
23 |
#include <vector> |
#include <vector> |
24 |
|
|
25 |
#include <gtkmm/drawingarea.h> |
#include <gtkmm/drawingarea.h> |
|
#include <gdkmm/colormap.h> |
|
26 |
#include <gtkmm/uimanager.h> |
#include <gtkmm/uimanager.h> |
27 |
#include <gdkmm/window.h> |
#include <gdkmm/window.h> |
28 |
#include <gtkmm/menu.h> |
#include <gtkmm/menu.h> |
79 |
Gtk::HBox m_VirtKeybPropsBox; |
Gtk::HBox m_VirtKeybPropsBox; |
80 |
|
|
81 |
protected: |
protected: |
|
virtual void on_realize(); |
|
82 |
virtual bool on_expose_event(GdkEventExpose* e); |
virtual bool on_expose_event(GdkEventExpose* e); |
83 |
virtual void on_size_request(GtkRequisition* requisition); |
virtual void on_size_request(GtkRequisition* requisition); |
84 |
virtual bool on_button_press_event(GdkEventButton* event); |
virtual bool on_button_press_event(GdkEventButton* event); |
87 |
|
|
88 |
gig::Region* get_region(int key); |
gig::Region* get_region(int key); |
89 |
|
|
|
Glib::RefPtr<Gdk::GC> gc; |
|
90 |
Gdk::Color activeKeyColor, red, grey1, white, black; |
Gdk::Color activeKeyColor, red, grey1, white, black; |
91 |
|
|
92 |
sigc::signal<void> region_selected; |
sigc::signal<void> region_selected; |
106 |
SortedRegions regions; |
SortedRegions regions; |
107 |
|
|
108 |
bool is_black_key(int key); |
bool is_black_key(int key); |
109 |
void draw_region(int from, int to, const Gdk::Color& color); |
void draw_key(int key, const Gdk::Color& color); |
110 |
void draw_digit(int key); |
void draw_digit(int key); |
111 |
void motion_resize_region(int x, int y); |
void motion_resize_region(int x, int y); |
112 |
void motion_move_region(int x, int y); |
void motion_move_region(int x, int y); |