0a182958cec26c354fa4c17a3cb974657acb3f76
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 ExtensionEditor(ExtensionEditor const &d);
65 ExtensionEditor& operator=(ExtensionEditor const &d);
67 void on_pagelist_selection_changed(void);
68 static void dbfunc (Inkscape::Extension::Extension * in_plug, gpointer in_data);
69 Gtk::TreeModel::iterator add_extension (Inkscape::Extension::Extension * ext);
70 bool defaultExtension(const Gtk::TreeModel::iterator &iter);
71 };
73 } // namespace Dialog
74 } // namespace UI
75 } // namespace Inkscape
77 #endif // INKSCAPE_UI_DIALOG_EXTENSION_EDITOR_H
79 /*
80 Local Variables:
81 mode:c++
82 c-file-style:"stroustrup"
83 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
84 indent-tabs-mode:nil
85 fill-column:99
86 End:
87 */
88 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :