+class OptionEditorMiniPage : public OptionEditorComponent, public OptionEditorPage
+{
+public:
+ OptionEditorMiniPage ()
+ {
+ box.pack_start (table, false, false);
+ box.set_border_width (0);
+ }
+
+ void parameter_changed (std::string const &) = 0;
+ void set_state_from_config () = 0;
+ virtual void add_to_page (OptionEditorPage*);
+
+ Gtk::Widget& tip_widget() { return *table.children().front().get_widget(); }
+};
+
+/** The OptionEditor dialog base class */
+class OptionEditor : virtual public sigc::trackable
+{
+public:
+ OptionEditor (PBD::Configuration *);
+ virtual ~OptionEditor ();
+
+ void add_option (std::string const &, OptionEditorComponent *);
+ void add_page (std::string const &, Gtk::Widget& page_widget);
+
+ void set_current_page (std::string const &);
+
+protected:
+ virtual void parameter_changed (std::string const &);
+
+ PBD::Configuration* _config;
+ Gtk::Notebook& notebook() { return _notebook; }
+ Gtk::TreeView& treeview() { return option_treeview; }
+
+ class OptionColumns : public Gtk::TreeModel::ColumnRecord
+ {
+ public:
+ Gtk::TreeModelColumn<std::string> name;
+ Gtk::TreeModelColumn<Gtk::Widget*> widget;
+
+ OptionColumns() {
+ add (name);
+ add (widget);
+ }
+ };
+
+ OptionColumns option_columns;
+ Glib::RefPtr<Gtk::TreeStore> option_tree;
+
+private:
+ PBD::ScopedConnection config_connection;
+ Gtk::Notebook _notebook;
+ Gtk::TreeView option_treeview;
+ std::map<std::string, OptionEditorPage*> _pages;
+
+ void add_path_to_treeview (std::string const &, Gtk::Widget&);
+ Gtk::TreeModel::iterator find_path_in_treemodel (std::string const & pn,
+ bool create_missing = false);
+ void treeview_row_selected ();
+};
+
+/** The OptionEditor dialog-as-container base class */
+class OptionEditorContainer : public OptionEditor, public Gtk::VBox
+{
+public:
+ OptionEditorContainer (PBD::Configuration *, std::string const &);
+ ~OptionEditorContainer() {}
+private:
+ Gtk::HBox hpacker;
+};
+
+/** The OptionEditor dialog-as-container base class */
+class OptionEditorWindow : public OptionEditor, public ArdourWindow
+{
+public:
+ OptionEditorWindow (PBD::Configuration *, std::string const &);
+ ~OptionEditorWindow() {}
+private:
+ Gtk::VBox container;
+ Gtk::HBox hpacker;
+};
+
+#endif /* __gtk_ardour_option_editor_h__ */