52 lines
1002 B
C++
52 lines
1002 B
C++
#ifndef MATRIX_H
|
|
#define MATRIX_H
|
|
|
|
#include <gtkmm.h>
|
|
#include <list>
|
|
#include "rect.h"
|
|
|
|
#define BACK_COLOUR 0.1020, 0.1059, 0.1059
|
|
#define MIDI_COLOUR 0.3098, 0.1882, 0.1882
|
|
#define AUDIO_COLOUR 0.1608, 0.2510, 0.3373
|
|
#define GROUP_COLOUR 0.1608, 0.3373, 0.1647
|
|
|
|
#define GRID_CLIENT 0.00, 0.00, 0.00
|
|
#define GRID_GROUP 0.10, 0.10, 0.10
|
|
#define GRID_PORT 0.20, 0.20, 0.20
|
|
|
|
typedef std::list<Base *> BaseList;
|
|
|
|
class Matrix : public Gtk::DrawingArea
|
|
{
|
|
private:
|
|
int m_client_width;
|
|
int m_client_height;
|
|
int m_port_width;
|
|
int m_port_height;
|
|
int m_separation;
|
|
int m_padding;
|
|
int m_width;
|
|
int m_height;
|
|
|
|
int m_font_size;
|
|
std::string m_typeface;
|
|
|
|
BaseList across;
|
|
BaseList down;
|
|
|
|
public:
|
|
Matrix();
|
|
virtual ~Matrix();
|
|
|
|
void Refresh();
|
|
|
|
Gtk::Window *parent;
|
|
|
|
protected:
|
|
void Box(Cairo::RefPtr<Cairo::Context> cr, float r, float g, float b, Rect &rect);
|
|
virtual bool on_expose_event(GdkEventExpose *event);
|
|
virtual bool on_button_press_event(GdkEventButton *event);
|
|
};
|
|
|
|
#endif // MATRIX_H
|