47 lines
740 B
C++
47 lines
740 B
C++
#ifndef MATRIX_H
|
|
#define MATRIX_H
|
|
|
|
#include <gtkmm.h>
|
|
#include <list>
|
|
#include "rect.h"
|
|
#include "colour.h"
|
|
|
|
struct Base;
|
|
typedef std::list<Base *> BaseList;
|
|
|
|
enum PortType {
|
|
PT_ALL,
|
|
PT_AUDIO,
|
|
PT_MIDI
|
|
};
|
|
|
|
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_width;
|
|
int m_height;
|
|
|
|
PortType m_port_type;
|
|
|
|
BaseList across;
|
|
BaseList down;
|
|
|
|
public:
|
|
Matrix(PortType port_type);
|
|
virtual ~Matrix();
|
|
|
|
void Refresh();
|
|
|
|
protected:
|
|
void Box(Cairo::RefPtr<Cairo::Context> cr, Colour &c, Rect &rect);
|
|
virtual bool on_expose_event(GdkEventExpose *event);
|
|
virtual bool on_button_press_event(GdkEventButton *event);
|
|
};
|
|
|
|
#endif // MATRIX_H
|