index 62f590be327d6119379ec3936002e9d763c21397..d71c27d128a5c55e12a2221f61ab362c4bce049c 100644 (file)
#include <glibmm/i18n.h>
#include <gtkmm/box.h>
+#include <gtkmm/label.h>
+#include <gtkmm/frame.h>
+#include <gtkmm/table.h>
#include "inkscape.h"
#include "extension/implementation/implementation.h"
return param_string;
}
+/* Extension editor dialog stuff */
+
+Gtk::VBox *
+Extension::get_info_widget(void)
+{
+ Gtk::VBox * retval = Gtk::manage(new Gtk::VBox());
+
+ Gtk::Frame * info = Gtk::manage(new Gtk::Frame("General Extension Information"));
+ retval->pack_start(*info, true, true, 5);
+
+ Gtk::Table * table = Gtk::manage(new Gtk::Table());
+ info->add(*table);
+
+ int row = 0;
+ add_val(_("Name:"), _(name), table, &row);
+ add_val(_("ID:"), id, table, &row);
+ add_val(_("State:"), _state == STATE_LOADED ? _("Loaded") : _state == STATE_UNLOADED ? _("Unloaded") : _("Deactivated"), table, &row);
+
+
+ retval->show_all();
+ return retval;
+}
+
+void
+Extension::add_val(Glib::ustring labelstr, Glib::ustring valuestr, Gtk::Table * table, int * row)
+{
+ Gtk::Label * label;
+ Gtk::Label * value;
+
+ (*row)++;
+ label = Gtk::manage(new Gtk::Label(labelstr));
+ value = Gtk::manage(new Gtk::Label(valuestr));
+ table->attach(*label, 0, 1, (*row) - 1, *row);
+ table->attach(*value, 1, 2, (*row) - 1, *row);
+
+ label->show();
+ value->show();
+
+ return;
+}
+
+Gtk::VBox *
+Extension::get_help_widget(void)
+{
+ Gtk::VBox * retval = Gtk::manage(new Gtk::VBox());
+
+ if (_help == NULL) {
+ Gtk::Label * content = Gtk::manage(new Gtk::Label("Currently there is no help available for this Extension. Please look on the Inkscape website or ask on the mailing lists if you have questions regarding this extension."));
+ retval->pack_start(*content, true, true, 5);
+ content->set_line_wrap(true);
+ content->show();
+ } else {
+
+
+
+ }
+
+ retval->show();
+ return retval;
+}
+
+Gtk::VBox *
+Extension::get_params_widget(void)
+{
+ Gtk::VBox * retval = Gtk::manage(new Gtk::VBox());
+ Gtk::Widget * content = Gtk::manage(new Gtk::Label("Params"));
+ retval->pack_start(*content, true, true, 5);
+ content->show();
+ retval->show();
+ return retval;
+}
+
} /* namespace Extension */
} /* namespace Inkscape */