Code

aebe35049ebe0e58c1561390abc03e3adc98e947
[inkscape.git] / src / ui / dialog / extension-editor.h
1 /**
2  * \brief Extension editor
3  *
4  * Authors:
5  *   Bryce W. Harrington <bryce@bryceharrington.org>
6  *   Ted Gould <ted@gould.cx>
7  *
8  * Copyright (C) 2004-2006 Authors
9  *
10  * Released under GNU GPL.  Read the file 'COPYING' for more information.
11  */
13 #ifndef INKSCAPE_UI_DIALOG_EXTENSION_EDITOR_H
14 #define INKSCAPE_UI_DIALOG_EXTENSION_EDITOR_H
16 #include "dialog.h"
18 #include <glibmm/i18n.h>
20 #include <gtkmm/treestore.h>
21 #include <gtkmm/treeview.h>
22 #include <gtkmm/label.h>
23 #include <gtkmm/frame.h>
25 #include "extension/extension.h"
27 namespace Inkscape {
28 namespace UI {
29 namespace Dialog {
31 class ExtensionEditor : public Dialog {
32 public:
33     ExtensionEditor();
34     virtual ~ExtensionEditor();
36     static ExtensionEditor *create() { return new ExtensionEditor(); }
38     static void show_help (gchar const * extension_id);
40 protected:
41     Gtk::Frame _page_frame;
42     Gtk::Label _page_title;
43     Gtk::TreeView _page_list;  
44     Glib::RefPtr<Gtk::TreeStore> _page_list_model;
46     //Pagelist model columns:
47     class PageListModelColumns : public Gtk::TreeModel::ColumnRecord {
48     public:
49         PageListModelColumns() {
50             Gtk::TreeModelColumnRecord::add(_col_name);
51             Gtk::TreeModelColumnRecord::add(_col_page);
52             Gtk::TreeModelColumnRecord::add(_col_id);
53         }
54         Gtk::TreeModelColumn<Glib::ustring> _col_name;
55         Gtk::TreeModelColumn<Glib::ustring> _col_id;
56         Gtk::TreeModelColumn<Gtk::Widget *> _col_page;
57     };
58     PageListModelColumns _page_list_columns;
60     Gtk::TreeModel::Path _path_tools;
61     Gtk::TreeModel::Path _path_shapes;
63 private:
64     Glib::ustring _selection_search;
66     ExtensionEditor(ExtensionEditor const &d);
67     ExtensionEditor& operator=(ExtensionEditor const &d);
69     void on_pagelist_selection_changed(void);
70     static void dbfunc (Inkscape::Extension::Extension * in_plug, gpointer in_data);
71     Gtk::TreeModel::iterator add_extension (Inkscape::Extension::Extension * ext);
72     bool setExtensionIter(const Gtk::TreeModel::iterator &iter);
73 public:
74     void setExtension(Glib::ustring extension_id);
75 };
77 } // namespace Dialog
78 } // namespace UI
79 } // namespace Inkscape
81 #endif // INKSCAPE_UI_DIALOG_EXTENSION_EDITOR_H
83 /*
84   Local Variables:
85   mode:c++
86   c-file-style:"stroustrup"
87   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
88   indent-tabs-mode:nil
89   fill-column:99
90   End:
91 */
92 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :