summaryrefslogtreecommitdiffstats
path: root/src/progs/ingenuity/WindowFactory.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-09-13 06:11:25 +0000
committerDavid Robillard <d@drobilla.net>2006-09-13 06:11:25 +0000
commite5675ebfeb93175e16762d0a078bd51d15d05f63 (patch)
tree189249ed9014e4c482cfaed0d6af28ced68570ca /src/progs/ingenuity/WindowFactory.h
parent23b7568ab7a87a79c186b8ddf3d3db4f1f934b06 (diff)
downloadingen-e5675ebfeb93175e16762d0a078bd51d15d05f63.tar.gz
ingen-e5675ebfeb93175e16762d0a078bd51d15d05f63.tar.bz2
ingen-e5675ebfeb93175e16762d0a078bd51d15d05f63.zip
Heavy-duty redesign of client library and GUI (now fully signal driven with clean Model/View separation).
Smarter, centralized window creation/management (should make window unification easy (panes?)). Typed metadata system, no more fugly string conversion of floats. Supports OSC fundamental types string, int, float, blob for now (though blob isn't working over the wire yet). git-svn-id: http://svn.drobilla.net/lad/ingen@131 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs/ingenuity/WindowFactory.h')
-rw-r--r--src/progs/ingenuity/WindowFactory.h56
1 files changed, 51 insertions, 5 deletions
diff --git a/src/progs/ingenuity/WindowFactory.h b/src/progs/ingenuity/WindowFactory.h
index add2d97b..831ab646 100644
--- a/src/progs/ingenuity/WindowFactory.h
+++ b/src/progs/ingenuity/WindowFactory.h
@@ -18,23 +18,69 @@
#define WINDOW_FACTORY_H
#include <map>
+#include <gtkmm.h>
#include "util/CountedPtr.h"
-#include "PatchController.h"
+#include "PatchView.h"
+#include "PatchModel.h"
+using Ingen::Client::PatchModel;
namespace Ingenuity {
class PatchWindow;
+class NodeControlWindow;
+class NodePropertiesWindow;
+class PatchPropertiesWindow;
+class LoadPatchWindow;
+class RenameWindow;
+/** Manager/Factory for all windows.
+ *
+ * This serves as a nice centralized spot for all window management issues,
+ * as well as an enumeration of all the windows in Ingenuity (the goal being
+ * to reduce that number as much as possible).
+ */
class WindowFactory {
public:
- void present(CountedPtr<PatchController> patch, PatchWindow* preferred = NULL);
+ WindowFactory();
+ ~WindowFactory();
+
+ PatchWindow* patch_window(CountedPtr<PatchModel> patch);
+ NodeControlWindow* control_window(CountedPtr<NodeModel> node);
+
+ void present_patch(CountedPtr<PatchModel> patch,
+ PatchWindow* preferred = NULL,
+ CountedPtr<PatchView> patch = CountedPtr<PatchView>());
+
+ void present_controls(CountedPtr<NodeModel> node);
+
+ void present_load_plugin(CountedPtr<PatchModel> patch, MetadataMap data = MetadataMap());
+ void present_load_patch(CountedPtr<PatchModel> patch, MetadataMap data = MetadataMap());
+ void present_new_subpatch(CountedPtr<PatchModel> patch, MetadataMap data = MetadataMap());
+ void present_load_subpatch(CountedPtr<PatchModel> patch, MetadataMap data = MetadataMap());
+ void present_rename(CountedPtr<ObjectModel> object);
+ void present_properties(CountedPtr<NodeModel> node);
private:
- PatchWindow* create_new(CountedPtr<PatchController> patch);
- bool remove(PatchWindow* win, GdkEventAny* ignored);
+ typedef std::map<Path, PatchWindow*> PatchWindowMap;
+ typedef std::map<Path, NodeControlWindow*> ControlWindowMap;
+
+ PatchWindow* new_patch_window(CountedPtr<PatchModel> patch, CountedPtr<PatchView> view);
+ bool remove_patch_window(PatchWindow* win, GdkEventAny* ignored);
+
+ NodeControlWindow* new_control_window(CountedPtr<NodeModel> node);
+ bool remove_control_window(NodeControlWindow* win, GdkEventAny* ignored);
+
+ PatchWindowMap _patch_windows;
+ ControlWindowMap _control_windows;
- std::map<Path, PatchWindow*> _windows;
+ LoadPluginWindow* _load_plugin_win;
+ LoadPatchWindow* _load_patch_win;
+ NewSubpatchWindow* _new_subpatch_win;
+ LoadSubpatchWindow* _load_subpatch_win;
+ NodePropertiesWindow* _node_properties_win;
+ PatchPropertiesWindow* _patch_properties_win;
+ RenameWindow* _rename_win;
};
}