Code

Remove redundant dialog present(), make sure user_hidden is set for
[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>
24 #include <gtkmm/scrolledwindow.h>
26 #include "extension/extension.h"
28 namespace Inkscape {
29 namespace UI {
30 namespace Dialog {
32 class ExtensionEditor : public Dialog {
33 public:
34     ExtensionEditor(Behavior::BehaviorFactory behavior_factory);
35     virtual ~ExtensionEditor();
37     static ExtensionEditor *create(Behavior::BehaviorFactory behavior_factory)
38     { return new ExtensionEditor(behavior_factory); }
40     static void show_help (gchar const * extension_id);
42 protected:
43     /** \brief  The view of the list of extensions on the left of the dialog */
44     Gtk::TreeView _page_list;
45     /** \brief  The model for the list of extensions */
46     Glib::RefPtr<Gtk::TreeStore> _page_list_model;
47     /** \brief  The notebook page that contains information */
48     Gtk::ScrolledWindow _notebook_info;
49     /** \brief  The notebook page that contains help info */
50     Gtk::ScrolledWindow _notebook_help;
51     /** \brief  The notebook page that holds all the parameters */
52     Gtk::ScrolledWindow _notebook_params;
54     //Pagelist model columns:
55     class PageListModelColumns : public Gtk::TreeModel::ColumnRecord {
56     public:
57         /** \brief  Creates the Page List model by adding all of the
58                     members of the class as column records. */
59         PageListModelColumns() {
60             Gtk::TreeModelColumnRecord::add(_col_name);
61             Gtk::TreeModelColumnRecord::add(_col_id);
62         }
63         /** \brief  Name of the extension */
64         Gtk::TreeModelColumn<Glib::ustring> _col_name;
65         /** \brief  ID of the extension */
66         Gtk::TreeModelColumn<Glib::ustring> _col_id;
67     };
68     PageListModelColumns _page_list_columns;
70 private:
71     /** \brief  A 'global' variable to help search through and select
72                 an item in the extension list */
73     Glib::ustring _selection_search;
75     ExtensionEditor(ExtensionEditor const &d);
76     ExtensionEditor& operator=(ExtensionEditor const &d);
78     void on_pagelist_selection_changed(void);
79     static void dbfunc (Inkscape::Extension::Extension * in_plug, gpointer in_data);
80     Gtk::TreeModel::iterator add_extension (Inkscape::Extension::Extension * ext);
81     bool setExtensionIter(const Gtk::TreeModel::iterator &iter);
82 public:
83     void setExtension(Glib::ustring extension_id);
84 };
86 } // namespace Dialog
87 } // namespace UI
88 } // namespace Inkscape
90 #endif // INKSCAPE_UI_DIALOG_EXTENSION_EDITOR_H
92 /*
93   Local Variables:
94   mode:c++
95   c-file-style:"stroustrup"
96   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
97   indent-tabs-mode:nil
98   fill-column:99
99   End:
100 */
101 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :