From 6720dc9cab2d0cb82ca7d45fb143ad4dfcafbf81 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 20 Mar 2012 05:51:23 +0000 Subject: Show entire UI (with menu and status bar) for LV2 UI. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4091 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/PatchBox.cpp | 14 ++++++++++++++ src/gui/PatchBox.hpp | 2 ++ src/gui/ingen_gui_lv2.cpp | 8 ++++---- 3 files changed, 20 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/gui/PatchBox.cpp b/src/gui/PatchBox.cpp index 1a38e027..cd3478c7 100644 --- a/src/gui/PatchBox.cpp +++ b/src/gui/PatchBox.cpp @@ -41,6 +41,7 @@ #include "PatchView.hpp" #include "PatchWindow.hpp" #include "ThreadedLoader.hpp" +#include "WidgetFactory.hpp" #include "WindowFactory.hpp" #include "ingen_config.h" @@ -160,6 +161,17 @@ PatchBox::~PatchBox() delete _breadcrumbs; } +SharedPtr +PatchBox::create(App& app, SharedPtr patch) +{ + PatchBox* result = NULL; + Glib::RefPtr xml = WidgetFactory::create("patch_win"); + xml->get_widget_derived("patch_win_vbox", result); + result->init_box(app); + result->set_patch(patch, SharedPtr()); + return SharedPtr(result); +} + void PatchBox::init_box(App& app) { @@ -258,6 +270,7 @@ PatchBox::set_patch(SharedPtr patch, show(); _alignment->show_all(); + hide_documentation(); _view->signal_object_entered.connect( sigc::mem_fun(this, &PatchBox::object_entered)); @@ -318,6 +331,7 @@ PatchBox::hide_documentation() { _doc_scrolledwindow->remove(); _doc_scrolledwindow->hide(); + _doc_paned->set_position(INT_MAX); } void diff --git a/src/gui/PatchBox.hpp b/src/gui/PatchBox.hpp index bd275cbb..d6d03829 100644 --- a/src/gui/PatchBox.hpp +++ b/src/gui/PatchBox.hpp @@ -58,6 +58,8 @@ public: const Glib::RefPtr& xml); ~PatchBox(); + static SharedPtr create(App& app, SharedPtr patch); + void init_box(App& app); void set_patch(SharedPtr pc, SharedPtr view); void set_window(PatchWindow* win) { _window = win; } diff --git a/src/gui/ingen_gui_lv2.cpp b/src/gui/ingen_gui_lv2.cpp index 0004b935..6fde9f93 100644 --- a/src/gui/ingen_gui_lv2.cpp +++ b/src/gui/ingen_gui_lv2.cpp @@ -27,7 +27,7 @@ #include "lv2/lv2plug.in/ns/extensions/ui/ui.h" #include "App.hpp" -#include "PatchView.hpp" +#include "PatchBox.hpp" #define INGEN_LV2_UI_URI "http://drobilla.net/ns/ingen#ui" @@ -68,7 +68,7 @@ struct IngenLV2UI { Ingen::Shared::World* world; IngenLV2AtomSink* sink; SharedPtr app; - SharedPtr view; + SharedPtr view; SharedPtr engine; SharedPtr reader; SharedPtr client; @@ -137,10 +137,10 @@ instantiate(const LV2UI_Descriptor* descriptor, ui->app->uris().ingen_Patch)); ui->app->store()->put("path:/", props); - // Create a PatchView for the root and set as the UI widget + // Create a PatchBox for the root and set as the UI widget SharedPtr root = PtrCast( ui->app->store()->object("path:/")); - ui->view = Ingen::GUI::PatchView::create(*ui->app, root); + ui->view = Ingen::GUI::PatchBox::create(*ui->app, root); ui->view->unparent(); *widget = ui->view->gobj(); -- cgit v1.2.1