99 lines
2.5 KiB
C++
99 lines
2.5 KiB
C++
#ifndef PREFERENCES_GUI_H
|
|
#define PREFERENCES_GUI_H
|
|
|
|
#include <gtkmm.h>
|
|
|
|
class Preferences : public Gtk::Dialog
|
|
{
|
|
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;
|
|
|
|
public:
|
|
Preferences(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &builder);
|
|
static Preferences *Open();
|
|
void Refresh();
|
|
void RefreshAliases();
|
|
|
|
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();
|
|
|
|
void on_check_activate_aliases_click();
|
|
void on_button_aliases_add_click();
|
|
void on_button_aliases_remove_click();
|
|
void on_button_aliases_edit_click();
|
|
void on_button_aliases_up_click();
|
|
void on_button_aliases_down_click();
|
|
|
|
void on_fontbutton_font_click();
|
|
void on_spin_cell_padding_click();
|
|
|
|
class ModelColumns : public Gtk::TreeModel::ColumnRecord
|
|
{
|
|
public:
|
|
ModelColumns()
|
|
{
|
|
add(m_row);
|
|
add(m_first);
|
|
add(m_second);
|
|
}
|
|
|
|
Gtk::TreeModelColumn<int> m_row;
|
|
Gtk::TreeModelColumn<std::string> m_first;
|
|
Gtk::TreeModelColumn<std::string> m_second;
|
|
};
|
|
|
|
ModelColumns m_columns;
|
|
Glib::RefPtr<Gtk::ListStore> m_tree_model_connections;
|
|
Glib::RefPtr<Gtk::ListStore> m_tree_model_aliases;
|
|
|
|
int GetAliasRow();
|
|
};
|
|
|
|
#endif // PREFERENCES_GUI_H
|