2009-11-25 09:22:48 +00:00
|
|
|
#ifndef GUI_H
|
|
|
|
#define GUI_H
|
|
|
|
|
|
|
|
#include <gtkmm.h>
|
2009-11-26 07:47:47 +00:00
|
|
|
#include "matrix.h"
|
2009-11-25 09:22:48 +00:00
|
|
|
|
2009-11-26 08:34:17 +00:00
|
|
|
extern Glib::RefPtr<Gtk::Builder> g_builder;
|
|
|
|
|
2009-11-25 09:22:48 +00:00
|
|
|
class Gui : public Gtk::Window
|
|
|
|
{
|
|
|
|
private:
|
2009-11-26 17:19:03 +00:00
|
|
|
Gtk::Notebook m_notebook;
|
|
|
|
Gtk::ScrolledWindow m_scrolledwindow_audio;
|
|
|
|
Gtk::ScrolledWindow m_scrolledwindow_midi;
|
|
|
|
|
|
|
|
Gtk::VBox *m_vbox;
|
|
|
|
Matrix *m_matrix_audio;
|
|
|
|
Matrix *m_matrix_midi;
|
|
|
|
|
|
|
|
bool m_closing;
|
2009-11-25 09:22:48 +00:00
|
|
|
|
|
|
|
public:
|
2009-11-26 08:34:17 +00:00
|
|
|
Gui(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &builder);
|
|
|
|
|
|
|
|
static Gui *Open();
|
2009-11-25 09:22:48 +00:00
|
|
|
virtual ~Gui();
|
|
|
|
|
2009-11-26 17:19:03 +00:00
|
|
|
void SetPortTypeSeparation();
|
2009-11-25 09:22:48 +00:00
|
|
|
void Refresh();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
bool on_idle();
|
2009-11-26 17:19:03 +00:00
|
|
|
void on_notebook_switch_page(GtkNotebookPage * /* page */, guint /* page_num */);
|
2009-11-25 09:22:48 +00:00
|
|
|
};
|
|
|
|
|
2009-11-26 10:38:37 +00:00
|
|
|
class Preferences : public Gtk::Dialog
|
|
|
|
{
|
2009-11-26 17:19:03 +00:00
|
|
|
private:
|
|
|
|
Gtk::Button *button_preferences_close;
|
|
|
|
|
|
|
|
// Grid behaviour
|
|
|
|
Gtk::CheckButton *check_separate_port_type;
|
|
|
|
Gtk::CheckButton *check_expand_clients;
|
|
|
|
Gtk::CheckButton *check_expand_groups;
|
|
|
|
|
|
|
|
// Session
|
|
|
|
Gtk::CheckButton *check_default_location;
|
|
|
|
Gtk::FileChooserButton *filechooser_custom_location;
|
|
|
|
|
|
|
|
// Connections
|
|
|
|
Gtk::CheckButton *check_activate_connections;
|
|
|
|
Gtk::TreeView *treeview_connections;
|
|
|
|
Gtk::Button *button_connections_add;
|
|
|
|
Gtk::Button *button_connections_remove;
|
|
|
|
Gtk::Button *button_connections_edit;
|
|
|
|
Gtk::Button *button_connections_up;
|
|
|
|
Gtk::Button *button_connections_down;
|
|
|
|
|
|
|
|
// Aliases
|
|
|
|
Gtk::CheckButton *check_activate_aliases;
|
|
|
|
Gtk::TreeView *treeview_aliases;
|
|
|
|
Gtk::Button *button_aliases_add;
|
|
|
|
Gtk::Button *button_aliases_remove;
|
|
|
|
Gtk::Button *button_aliases_edit;
|
|
|
|
Gtk::Button *button_aliases_up;
|
|
|
|
Gtk::Button *button_aliases_down;
|
|
|
|
|
|
|
|
// Grid layout
|
|
|
|
Gtk::FontButton *fontbutton_font;
|
|
|
|
Gtk::SpinButton *spin_cell_padding;
|
|
|
|
|
|
|
|
// Colours
|
|
|
|
Gtk::ColorButton *colour_background;
|
|
|
|
Gtk::ColorButton *colour_clients;
|
|
|
|
Gtk::ColorButton *colour_port_groups;
|
|
|
|
Gtk::ColorButton *colour_ports_audio;
|
|
|
|
Gtk::ColorButton *colour_ports_midi;
|
|
|
|
Gtk::ColorButton *colour_text;
|
|
|
|
Gtk::ColorButton *colour_grid_client;
|
|
|
|
Gtk::ColorButton *colour_grid_group;
|
|
|
|
Gtk::ColorButton *colour_grid_port;
|
|
|
|
|
2009-11-26 10:38:37 +00:00
|
|
|
public:
|
|
|
|
Preferences(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &builder);
|
|
|
|
static Preferences *Open();
|
2009-11-26 17:19:03 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void on_preferences_close_click();
|
|
|
|
|
|
|
|
void on_check_separate_port_type_click();
|
|
|
|
void on_check_expand_clients_click();
|
|
|
|
void on_check_expand_groups_click();
|
2009-11-26 10:38:37 +00:00
|
|
|
};
|
|
|
|
|
2009-11-26 17:19:03 +00:00
|
|
|
extern Gui *g;
|
|
|
|
|
2009-11-25 09:22:48 +00:00
|
|
|
#endif // GUI_H
|