summaryrefslogtreecommitdiffstats
path: root/src/Patchage.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-01-02 14:02:44 +0100
committerDavid Robillard <d@drobilla.net>2021-01-02 14:02:44 +0100
commit663a5d01b1931b97370ed8feff3ae229a9cc7ea4 (patch)
treeaba74794cb45f06734bd80bbf53d79f947008e54 /src/Patchage.hpp
parent1936aace80b5594078d874e9b661a9a91e461279 (diff)
downloadpatchage-663a5d01b1931b97370ed8feff3ae229a9cc7ea4.tar.gz
patchage-663a5d01b1931b97370ed8feff3ae229a9cc7ea4.tar.bz2
patchage-663a5d01b1931b97370ed8feff3ae229a9cc7ea4.zip
Format all code with clang-format
Diffstat (limited to 'src/Patchage.hpp')
-rw-r--r--src/Patchage.hpp257
1 files changed, 127 insertions, 130 deletions
diff --git a/src/Patchage.hpp b/src/Patchage.hpp
index 4496f12..e108748 100644
--- a/src/Patchage.hpp
+++ b/src/Patchage.hpp
@@ -76,148 +76,145 @@ class Legend;
class Patchage
{
public:
- explicit Patchage(Options options);
+ explicit Patchage(Options options);
- ~Patchage();
+ ~Patchage();
- Patchage(const Patchage&) = delete;
- Patchage& operator=(const Patchage&) = delete;
+ Patchage(const Patchage&) = delete;
+ Patchage& operator=(const Patchage&) = delete;
- Patchage(Patchage&&) = delete;
- Patchage& operator=(Patchage&&) = delete;
+ Patchage(Patchage&&) = delete;
+ Patchage& operator=(Patchage&&) = delete;
- const std::unique_ptr<Canvas>& canvas() const { return _canvas; }
+ const std::unique_ptr<Canvas>& canvas() const { return _canvas; }
- void attach();
- void refresh();
- void save();
- void quit();
+ void attach();
+ void refresh();
+ void save();
+ void quit();
- void driver_attached(ClientType type);
- void driver_detached(ClientType type);
+ void driver_attached(ClientType type);
+ void driver_detached(ClientType type);
- void store_window_location();
+ void store_window_location();
- bool show_human_names() const
- {
- return _menu_view_human_names->get_active();
- }
+ bool show_human_names() const { return _menu_view_human_names->get_active(); }
- bool sort_ports() const { return _menu_view_sort_ports->get_active(); }
+ bool sort_ports() const { return _menu_view_sort_ports->get_active(); }
- Gtk::Window* window() { return _main_win.get(); }
- ILog& log() { return _log; }
- Metadata& metadata() { return _metadata; }
- const Configuration& conf() const { return _conf; }
- Configuration& conf() { return _conf; }
+ Gtk::Window* window() { return _main_win.get(); }
+ ILog& log() { return _log; }
+ Metadata& metadata() { return _metadata; }
+ const Configuration& conf() const { return _conf; }
+ Configuration& conf() { return _conf; }
protected:
- class BufferSizeColumns : public Gtk::TreeModel::ColumnRecord
- {
- public:
- BufferSizeColumns() { add(label); }
-
- Gtk::TreeModelColumn<Glib::ustring> label;
- };
-
- void on_driver_event(const Event& event);
- void process_events();
-
- void on_arrange();
- void on_sprung_layout_toggled();
- void on_help_about();
- void on_quit();
- void on_export_image();
- void on_view_messages();
- void on_view_toolbar();
- void on_store_positions();
- void on_view_human_names();
- void on_view_sort_ports();
- void on_zoom_in();
- void on_zoom_out();
- void on_zoom_normal();
- void on_zoom_full();
- void on_increase_font_size();
- void on_decrease_font_size();
- void on_normal_font_size();
-
- void on_legend_color_change(PortType id,
- const std::string& label,
- uint32_t rgba);
-
- void on_messages_resized(Gtk::Allocation& alloc);
-
- bool on_scroll(GdkEventScroll* ev);
-
- bool idle_callback();
- void clear_load();
- bool update_load();
- void update_toolbar();
-
- void buffer_size_changed();
-
- Glib::RefPtr<Gtk::Builder> _xml;
-
- std::mutex _events_mutex;
- std::queue<Event> _driver_events;
-
- std::unique_ptr<Driver> _alsa_driver;
-
- std::unique_ptr<Canvas> _canvas;
-
- std::unique_ptr<AudioDriver> _jack_driver;
- Configuration _conf;
-
- Gtk::Main* _gtk_main;
-
- BufferSizeColumns _buf_size_columns;
-
- Widget<Gtk::AboutDialog> _about_win;
- Widget<Gtk::ScrolledWindow> _main_scrolledwin;
- Widget<Gtk::Window> _main_win;
- Widget<Gtk::VBox> _main_vbox;
- Widget<Gtk::MenuBar> _menubar;
- Widget<Gtk::MenuItem> _menu_alsa_connect;
- Widget<Gtk::MenuItem> _menu_alsa_disconnect;
- Widget<Gtk::MenuItem> _menu_file_quit;
- Widget<Gtk::MenuItem> _menu_export_image;
- Widget<Gtk::MenuItem> _menu_help_about;
- Widget<Gtk::MenuItem> _menu_jack_connect;
- Widget<Gtk::MenuItem> _menu_jack_disconnect;
- Widget<Gtk::MenuItem> _menu_view_arrange;
- Widget<Gtk::CheckMenuItem> _menu_view_sprung_layout;
- Widget<Gtk::CheckMenuItem> _menu_view_messages;
- Widget<Gtk::CheckMenuItem> _menu_view_toolbar;
- Widget<Gtk::MenuItem> _menu_view_refresh;
- Widget<Gtk::CheckMenuItem> _menu_view_human_names;
- Widget<Gtk::CheckMenuItem> _menu_view_sort_ports;
- Widget<Gtk::ImageMenuItem> _menu_zoom_in;
- Widget<Gtk::ImageMenuItem> _menu_zoom_out;
- Widget<Gtk::ImageMenuItem> _menu_zoom_normal;
- Widget<Gtk::ImageMenuItem> _menu_zoom_full;
- Widget<Gtk::MenuItem> _menu_increase_font_size;
- Widget<Gtk::MenuItem> _menu_decrease_font_size;
- Widget<Gtk::MenuItem> _menu_normal_font_size;
- Widget<Gtk::Toolbar> _toolbar;
- Widget<Gtk::ToolButton> _clear_load_but;
- Widget<Gtk::Label> _dropouts_label;
- Widget<Gtk::ComboBox> _buf_size_combo;
- Widget<Gtk::Label> _latency_label;
- Widget<Gtk::Alignment> _legend_alignment;
- Widget<Gtk::Paned> _main_paned;
- Widget<Gtk::ScrolledWindow> _log_scrolledwindow;
- Widget<Gtk::TextView> _status_text;
- Legend* _legend;
- TextViewLog _log;
- Connector _connector;
- Metadata _metadata;
-
- Glib::RefPtr<Gtk::TextTag> _error_tag;
- Glib::RefPtr<Gtk::TextTag> _warning_tag;
-
- Options _options;
- bool _pane_initialized;
- bool _attach;
+ class BufferSizeColumns : public Gtk::TreeModel::ColumnRecord
+ {
+ public:
+ BufferSizeColumns() { add(label); }
+
+ Gtk::TreeModelColumn<Glib::ustring> label;
+ };
+
+ void on_driver_event(const Event& event);
+ void process_events();
+
+ void on_arrange();
+ void on_sprung_layout_toggled();
+ void on_help_about();
+ void on_quit();
+ void on_export_image();
+ void on_view_messages();
+ void on_view_toolbar();
+ void on_store_positions();
+ void on_view_human_names();
+ void on_view_sort_ports();
+ void on_zoom_in();
+ void on_zoom_out();
+ void on_zoom_normal();
+ void on_zoom_full();
+ void on_increase_font_size();
+ void on_decrease_font_size();
+ void on_normal_font_size();
+
+ void on_legend_color_change(PortType id,
+ const std::string& label,
+ uint32_t rgba);
+
+ void on_messages_resized(Gtk::Allocation& alloc);
+
+ bool on_scroll(GdkEventScroll* ev);
+
+ bool idle_callback();
+ void clear_load();
+ bool update_load();
+ void update_toolbar();
+
+ void buffer_size_changed();
+
+ Glib::RefPtr<Gtk::Builder> _xml;
+
+ std::mutex _events_mutex;
+ std::queue<Event> _driver_events;
+
+ std::unique_ptr<Driver> _alsa_driver;
+
+ std::unique_ptr<Canvas> _canvas;
+
+ std::unique_ptr<AudioDriver> _jack_driver;
+ Configuration _conf;
+
+ Gtk::Main* _gtk_main;
+
+ BufferSizeColumns _buf_size_columns;
+
+ Widget<Gtk::AboutDialog> _about_win;
+ Widget<Gtk::ScrolledWindow> _main_scrolledwin;
+ Widget<Gtk::Window> _main_win;
+ Widget<Gtk::VBox> _main_vbox;
+ Widget<Gtk::MenuBar> _menubar;
+ Widget<Gtk::MenuItem> _menu_alsa_connect;
+ Widget<Gtk::MenuItem> _menu_alsa_disconnect;
+ Widget<Gtk::MenuItem> _menu_file_quit;
+ Widget<Gtk::MenuItem> _menu_export_image;
+ Widget<Gtk::MenuItem> _menu_help_about;
+ Widget<Gtk::MenuItem> _menu_jack_connect;
+ Widget<Gtk::MenuItem> _menu_jack_disconnect;
+ Widget<Gtk::MenuItem> _menu_view_arrange;
+ Widget<Gtk::CheckMenuItem> _menu_view_sprung_layout;
+ Widget<Gtk::CheckMenuItem> _menu_view_messages;
+ Widget<Gtk::CheckMenuItem> _menu_view_toolbar;
+ Widget<Gtk::MenuItem> _menu_view_refresh;
+ Widget<Gtk::CheckMenuItem> _menu_view_human_names;
+ Widget<Gtk::CheckMenuItem> _menu_view_sort_ports;
+ Widget<Gtk::ImageMenuItem> _menu_zoom_in;
+ Widget<Gtk::ImageMenuItem> _menu_zoom_out;
+ Widget<Gtk::ImageMenuItem> _menu_zoom_normal;
+ Widget<Gtk::ImageMenuItem> _menu_zoom_full;
+ Widget<Gtk::MenuItem> _menu_increase_font_size;
+ Widget<Gtk::MenuItem> _menu_decrease_font_size;
+ Widget<Gtk::MenuItem> _menu_normal_font_size;
+ Widget<Gtk::Toolbar> _toolbar;
+ Widget<Gtk::ToolButton> _clear_load_but;
+ Widget<Gtk::Label> _dropouts_label;
+ Widget<Gtk::ComboBox> _buf_size_combo;
+ Widget<Gtk::Label> _latency_label;
+ Widget<Gtk::Alignment> _legend_alignment;
+ Widget<Gtk::Paned> _main_paned;
+ Widget<Gtk::ScrolledWindow> _log_scrolledwindow;
+ Widget<Gtk::TextView> _status_text;
+ Legend* _legend;
+ TextViewLog _log;
+ Connector _connector;
+ Metadata _metadata;
+
+ Glib::RefPtr<Gtk::TextTag> _error_tag;
+ Glib::RefPtr<Gtk::TextTag> _warning_tag;
+
+ Options _options;
+ bool _pane_initialized;
+ bool _attach;
};
} // namespace patchage