Code

typo fixed
[inkscape.git] / src / ui / dialog / extension-editor.h
index 4c6beb7f7966b7f2ae1173ee3b05b019b51c0989..b6c331eae5796a015ae12d32c01eba41cc6dc671 100644 (file)
@@ -3,8 +3,9 @@
  *
  * Authors:
  *   Bryce W. Harrington <bryce@bryceharrington.org>
+ *   Ted Gould <ted@gould.cx>
  *
- * Copyright (C) 2004, 2005 Authors
+ * Copyright (C) 2004-2006 Authors
  *
  * Released under GNU GPL.  Read the file 'COPYING' for more information.
  */
 
 #include <glibmm/i18n.h>
 
+#include <gtkmm/treestore.h>
+#include <gtkmm/treeview.h>
+#include <gtkmm/label.h>
+#include <gtkmm/frame.h>
+#include <gtkmm/scrolledwindow.h>
+
+#include "extension/extension.h"
+
 namespace Inkscape {
 namespace UI {
 namespace Dialog {
@@ -27,11 +36,50 @@ public:
 
     static ExtensionEditor *create() { return new ExtensionEditor(); }
 
+    static void show_help (gchar const * extension_id);
+
 protected:
+    /** \brief  The view of the list of extensions on the left of the dialog */
+    Gtk::TreeView _page_list;
+    /** \brief  The model for the list of extensions */
+    Glib::RefPtr<Gtk::TreeStore> _page_list_model;
+    /** \brief  The notebook page that contains information */
+    Gtk::ScrolledWindow _notebook_info;
+    /** \brief  The notebook page that contains help info */
+    Gtk::ScrolledWindow _notebook_help;
+    /** \brief  The notebook page that holds all the parameters */
+    Gtk::ScrolledWindow _notebook_params;
+
+    //Pagelist model columns:
+    class PageListModelColumns : public Gtk::TreeModel::ColumnRecord {
+    public:
+        /** \brief  Creates the Page List model by adding all of the
+                    members of the class as column records. */
+        PageListModelColumns() {
+            Gtk::TreeModelColumnRecord::add(_col_name);
+            Gtk::TreeModelColumnRecord::add(_col_id);
+        }
+        /** \brief  Name of the extension */
+        Gtk::TreeModelColumn<Glib::ustring> _col_name;
+        /** \brief  ID of the extension */
+        Gtk::TreeModelColumn<Glib::ustring> _col_id;
+    };
+    PageListModelColumns _page_list_columns;
 
 private:
+    /** \brief  A 'global' variable to help search through and select
+                an item in the extension list */
+    Glib::ustring _selection_search;
+
     ExtensionEditor(ExtensionEditor const &d);
     ExtensionEditor& operator=(ExtensionEditor const &d);
+
+    void on_pagelist_selection_changed(void);
+    static void dbfunc (Inkscape::Extension::Extension * in_plug, gpointer in_data);
+    Gtk::TreeModel::iterator add_extension (Inkscape::Extension::Extension * ext);
+    bool setExtensionIter(const Gtk::TreeModel::iterator &iter);
+public:
+    void setExtension(Glib::ustring extension_id);
 };
 
 } // namespace Dialog