diff options
author | David Robillard <d@drobilla.net> | 2012-03-16 22:27:16 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-03-16 22:27:16 +0000 |
commit | bc3afd8380d59c750c8f8e9bf1ed1b8d4a6826e9 (patch) | |
tree | b42f56620ce85f6207568eadfb901360436c6f74 /src/gui/PatchWindow.hpp | |
parent | 7126f005be3e49818dafe0d2666b6745e09f8aff (diff) | |
download | ingen-bc3afd8380d59c750c8f8e9bf1ed1b8d4a6826e9.tar.gz ingen-bc3afd8380d59c750c8f8e9bf1ed1b8d4a6826e9.tar.bz2 ingen-bc3afd8380d59c750c8f8e9bf1ed1b8d4a6826e9.zip |
Preliminary work towards native LV2 UI.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4074 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/PatchWindow.hpp')
-rw-r--r-- | src/gui/PatchWindow.hpp | 133 |
1 files changed, 23 insertions, 110 deletions
diff --git a/src/gui/PatchWindow.hpp b/src/gui/PatchWindow.hpp index fcb0e3f7..b1407f1e 100644 --- a/src/gui/PatchWindow.hpp +++ b/src/gui/PatchWindow.hpp @@ -15,37 +15,25 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef INGEN_GUI_PATCHWINDOW_HPP -#define INGEN_GUI_PATCHWINDOW_HPP +#ifndef INGEN_GUI_PATCH_WINDOW_HPP +#define INGEN_GUI_PATCH_WINDOW_HPP #include <gtkmm.h> #include "raul/SharedPtr.hpp" +#include "PatchBox.hpp" #include "Window.hpp" -namespace Raul { class Atom; class Path; } - namespace Ingen { namespace Client { class PatchModel; - class PortModel; - class ObjectModel; } using namespace Ingen::Client; namespace GUI { -class BreadCrumbs; -class LoadPatchWindow; -class LoadPluginWindow; -class NewSubpatchWindow; -class NodeControlWindow; -class PatchDescriptionWindow; -class PatchView; -class SubpatchModule; - /** A window for a patch. * * \ingroup GUI @@ -55,116 +43,41 @@ class PatchWindow : public Window public: PatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& xml); + ~PatchWindow(); void init_window(App& app); - void set_patch_from_path(const Raul::Path& path, SharedPtr<PatchView> view); - void set_patch(SharedPtr<const PatchModel> pc, SharedPtr<PatchView> view); - void show_documentation(const std::string& doc, bool html); - void hide_documentation(); + SharedPtr<const PatchModel> patch() const { return _box->patch(); } + PatchBox* box() const { return _box; } - SharedPtr<const PatchModel> patch() const { return _patch; } + void set_patch_from_path(const Raul::Path& path, SharedPtr<PatchView> view); - Gtk::MenuItem* menu_view_control_window() { return _menu_view_control_window; } + void show_documentation(const std::string& doc, bool html) { + _box->show_documentation(doc, html); + } - void show_port_status(const PortModel* model, const Raul::Atom& value); + void hide_documentation() { + _box->hide_documentation(); + } - void object_entered(const ObjectModel* model); - void object_left(const ObjectModel* model); + void show_port_status(const PortModel* model, const Raul::Atom& value) { + _box->show_port_status(model, value); + } protected: - void on_show(); - void on_hide(); bool on_event(GdkEvent* event); + void on_hide(); + void on_show(); private: - void patch_port_added(SharedPtr<const PortModel> port); - void patch_port_removed(SharedPtr<const PortModel> port); - void show_status(const ObjectModel* model); - void editable_changed(bool editable); - - void event_import(); - void event_save(); - void event_save_as(); - void event_draw(); - void event_edit_controls(); - void event_copy(); - void event_paste(); - void event_delete(); - void event_select_all(); - void event_close(); - void event_quit(); - void event_fullscreen_toggled(); - void event_status_bar_toggled(); - void event_human_names_toggled(); - void event_port_names_toggled(); - void event_zoom_in(); - void event_zoom_out(); - void event_zoom_normal(); - void event_arrange(); - void event_show_properties(); - void event_show_controls(); - void event_show_engine(); - void event_clipboard_changed(GdkEventOwnerChange* ev); - - SharedPtr<const PatchModel> _patch; - SharedPtr<PatchView> _view; - - sigc::connection new_port_connection; - sigc::connection removed_port_connection; - sigc::connection edit_mode_connection; - - bool _enable_signal; - bool _position_stored; - int _x; - int _y; - - Gtk::MenuItem* _menu_import; - Gtk::MenuItem* _menu_save; - Gtk::MenuItem* _menu_save_as; - Gtk::MenuItem* _menu_draw; - Gtk::CheckMenuItem* _menu_edit_controls; - Gtk::MenuItem* _menu_cut; - Gtk::MenuItem* _menu_copy; - Gtk::MenuItem* _menu_paste; - Gtk::MenuItem* _menu_delete; - Gtk::MenuItem* _menu_select_all; - Gtk::MenuItem* _menu_close; - Gtk::MenuItem* _menu_quit; - Gtk::CheckMenuItem* _menu_human_names; - Gtk::CheckMenuItem* _menu_show_port_names; - Gtk::CheckMenuItem* _menu_show_status_bar; - Gtk::MenuItem* _menu_zoom_in; - Gtk::MenuItem* _menu_zoom_out; - Gtk::MenuItem* _menu_zoom_normal; - Gtk::MenuItem* _menu_fullscreen; - Gtk::MenuItem* _menu_arrange; - Gtk::MenuItem* _menu_view_engine_window; - Gtk::MenuItem* _menu_view_control_window; - Gtk::MenuItem* _menu_view_patch_properties; - Gtk::MenuItem* _menu_view_messages_window; - Gtk::MenuItem* _menu_view_patch_tree_window; - Gtk::MenuItem* _menu_help_about; - - Gtk::VBox* _vbox; - Gtk::Alignment* _alignment; - BreadCrumbs* _breadcrumbs; - Gtk::Statusbar* _status_bar; - - Gtk::HPaned* _doc_paned; - Gtk::ScrolledWindow* _doc_scrolledwindow; - - sigc::connection _entered_connection; - sigc::connection _left_connection; - - /** Invisible bin used to store breadcrumbs when not shown by a view */ - Gtk::Alignment _breadcrumb_bin; - - bool _has_shown_documentation; + PatchBox* _box; + bool _position_stored; + int _x; + int _y; }; } // namespace GUI } // namespace Ingen -#endif // INGEN_GUI_PATCHWINDOW_HPP +#endif // INGEN_GUI_PATCH_WINDOW_HPP |