index 3fe9cac65e0895f35fafafe552116d8c97bc5721..70f66c41660c37995e4dc63f1b332797f5358ab0 100644 (file)
*/
/*
- * Authors:
+ * Author:
* Ted Gould <ted@gould.cx>
*
- * Copyright (C) 2005-2006 Authors
+ * Copyright (C) 2006 Johan Engelen <johan@shouraizou.nl>
+ * Copyright (C) 2005-2006 Author
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "sp-object.h"
#include "parameter.h"
+#include "paramnotebook.h"
+#include "paramenum.h"
/** \brief The root directory in the preferences database for extension
related parameters. */
Glib::ustring * string (void);
}; /* class ParamEnum */
+
/**
\return None
\brief This function creates a parameter that can be used later. This
@@ -309,7 +313,9 @@ Parameter::make (Inkscape::XML::Node * in_repr, Inkscape::Extension::Extension *
} else if (!strcmp(type, "description")) {
param = new ParamDescription(name, guitext, desc, scope, in_ext, in_repr);
} else if (!strcmp(type, "enum")) {
- param = new ParamEnum(name, guitext, desc, scope, in_ext, in_repr);
+ param = new ParamComboBox(name, guitext, desc, scope, in_ext, in_repr);
+ } else if (!strcmp(type, "notebook")) {
+ param = new ParamNotebook(name, guitext, desc, scope, in_ext, in_repr);
}
/* Note: param could equal NULL */
Gtk::Widget *
ParamFloat::get_widget (SPDocument * doc, Inkscape::XML::Node * node)
{
- Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox());
+ Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_LEFT));
label->show();
Gtk::Widget *
ParamInt::get_widget (SPDocument * doc, Inkscape::XML::Node * node)
{
- Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox());
+ Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_LEFT));
label->show();
Gtk::Widget *
ParamBool::get_widget (SPDocument * doc, Inkscape::XML::Node * node)
{
- Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox());
+ Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_LEFT));
label->show();
Gtk::Widget *
ParamString::get_widget (SPDocument * doc, Inkscape::XML::Node * node)
{
- Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox());
+ Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_LEFT));
label->show();
- hbox->pack_start(*label, true, true);
+ hbox->pack_start(*label, false, false);
ParamStringEntry * textbox = new ParamStringEntry(this, doc, node);
textbox->show();
- hbox->pack_start(*textbox, false, false);
+ hbox->pack_start(*textbox, true, true);
hbox->show();
label->set_line_wrap();
label->show();
- Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox());
+ Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
hbox->pack_start(*label, true, true, 5);
hbox->show();
@@ -931,6 +937,11 @@ ParamEnum::ParamEnum (const gchar * name, const gchar * guitext, const gchar * d
return;
}
+ParamEnum::~ParamEnum (void)
+{
+
+}
+
/** \brief Return the value as a string */
Glib::ustring *
ParamEnum::string (void)