summaryrefslogtreecommitdiffstats
path: root/src/ui/widget
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/widget')
-rw-r--r--src/ui/widget/page-sizer.cpp73
-rw-r--r--src/ui/widget/page-sizer.h4
-rw-r--r--src/ui/widget/registered-widget.cpp158
-rw-r--r--src/ui/widget/registered-widget.h161
4 files changed, 106 insertions, 290 deletions
diff --git a/src/ui/widget/page-sizer.cpp b/src/ui/widget/page-sizer.cpp
index 7b0fea5f5..40f3addcf 100644
--- a/src/ui/widget/page-sizer.cpp
+++ b/src/ui/widget/page-sizer.cpp
@@ -185,10 +185,13 @@ static const SPUnit _px_unit = sp_unit_get_by_id (SP_UNIT_PX);
/**
* Constructor
*/
-PageSizer::PageSizer() : Gtk::VBox(false,4)
+PageSizer::PageSizer(Registry & _wr)
+ : Gtk::VBox(false,4),
+ _dimensionUnits( _("U_nits:"), "units", _wr ),
+ _dimensionWidth( _("_Width:"), _("Width of paper"), "width", _dimensionUnits, _wr ),
+ _dimensionHeight( _("_Height:"), _("Height of paper"), "height", _dimensionUnits, _wr ),
+ _widgetRegistry(&_wr)
{
-
-
//# Set up the Paper Size combo box
_paperSizeListStore = Gtk::ListStore::create(_paperSizeListColumns);
_paperSizeList.set_model(_paperSizeListStore);
@@ -259,15 +262,15 @@ PageSizer::PageSizer() : Gtk::VBox(false,4)
_customTable.set_border_width (4);
_customTable.set_row_spacings (4);
_customTable.set_col_spacings (4);
+ _customTable.attach(_dimensionWidth, 0,1,0,1);
+ _customTable.attach(_dimensionUnits, 1,2,0,1);
+ _customTable.attach(_dimensionHeight, 0,1,1,2);
+ _customTable.attach(_fitPageButton, 1,2,1,2);
_customFrame.add(_customTable);
_fitPageButton.set_use_underline();
_fitPageButton.set_label(_("_Fit page to selection"));
- _tips.set_tip(_fitPageButton,
- _("Resize the page to fit the current selection, or the entire drawing if there is no selection"));
-
-
-
+ _tips.set_tip(_fitPageButton, _("Resize the page to fit the current selection, or the entire drawing if there is no selection"));
}
@@ -284,43 +287,15 @@ PageSizer::~PageSizer()
* Initialize or reset this widget
*/
void
-PageSizer::init (Registry& reg)
+PageSizer::init ()
{
-
- /*
- Note that the registered widgets can only be placed onto a
- container after they have been init()-ed. That is why some
- of the widget creation is in the constructor, and the rest is
- here.
- */
-
- _widgetRegistry = ®
-
- _dimensionUnits.init (_("U_nits:"), "units",
- *_widgetRegistry);
- _dimensionWidth.init (_("_Width:"), _("Width of paper"), "width",
- _dimensionUnits, *_widgetRegistry);
- _dimensionHeight.init (_("_Height:"), _("Height of paper"), "height",
- _dimensionUnits, *_widgetRegistry);
-
- _customTable.attach(*(_dimensionWidth.getSU()), 0,1,0,1);
- _customTable.attach(*(_dimensionUnits._sel), 1,2,0,1);
- _customTable.attach(*(_dimensionHeight.getSU()), 0,1,1,2);
- _customTable.attach(_fitPageButton, 1,2,1,2);
-
- _landscape_connection = _landscapeButton.signal_toggled().connect (
- sigc::mem_fun (*this, &PageSizer::on_landscape));
- _portrait_connection = _portraitButton.signal_toggled().connect (
- sigc::mem_fun (*this, &PageSizer::on_portrait));
- _changedw_connection = _dimensionWidth.getSU()->signal_value_changed().connect (
- sigc::mem_fun (*this, &PageSizer::on_value_changed));
- _changedh_connection = _dimensionHeight.getSU()->signal_value_changed().connect (
- sigc::mem_fun (*this, &PageSizer::on_value_changed));
- _fitPageButton.signal_clicked().connect(
- sigc::mem_fun(*this, &PageSizer::fire_fit_canvas_to_selection_or_drawing));
+ _landscape_connection = _landscapeButton.signal_toggled().connect (sigc::mem_fun (*this, &PageSizer::on_landscape));
+ _portrait_connection = _portraitButton.signal_toggled().connect (sigc::mem_fun (*this, &PageSizer::on_portrait));
+ _changedw_connection = _dimensionWidth.signal_value_changed().connect (sigc::mem_fun (*this, &PageSizer::on_value_changed));
+ _changedh_connection = _dimensionHeight.signal_value_changed().connect (sigc::mem_fun (*this, &PageSizer::on_value_changed));
+ _fitPageButton.signal_clicked().connect(sigc::mem_fun(*this, &PageSizer::fire_fit_canvas_to_selection_or_drawing));
show_all_children();
-
}
@@ -366,7 +341,7 @@ PageSizer::setDim (double w, double h, bool changeList)
_paperSizeListSelection->select(row);
}
- Unit const& unit = _dimensionUnits._sel->getUnit();
+ Unit const& unit = _dimensionUnits.getUnit();
_dimensionWidth.setValue (w / unit.factor);
_dimensionHeight.setValue (h / unit.factor);
@@ -487,8 +462,8 @@ PageSizer::on_portrait()
{
if (!_portraitButton.get_active())
return;
- double w = _dimensionWidth.getSU()->getValue ("px");
- double h = _dimensionHeight.getSU()->getValue ("px");
+ double w = _dimensionWidth.getValue ("px");
+ double h = _dimensionHeight.getValue ("px");
if (h < w)
setDim (h, w);
}
@@ -502,8 +477,8 @@ PageSizer::on_landscape()
{
if (!_landscapeButton.get_active())
return;
- double w = _dimensionWidth.getSU()->getValue ("px");
- double h = _dimensionHeight.getSU()->getValue ("px");
+ double w = _dimensionWidth.getValue ("px");
+ double h = _dimensionHeight.getValue ("px");
if (w < h)
setDim (h, w);
}
@@ -516,8 +491,8 @@ PageSizer::on_value_changed()
{
if (_widgetRegistry->isUpdating()) return;
- setDim (_dimensionWidth.getSU()->getValue("px"),
- _dimensionHeight.getSU()->getValue("px"));
+ setDim (_dimensionWidth.getValue("px"),
+ _dimensionHeight.getValue("px"));
}
diff --git a/src/ui/widget/page-sizer.h b/src/ui/widget/page-sizer.h
index e3d10f578..f970afe44 100644
--- a/src/ui/widget/page-sizer.h
+++ b/src/ui/widget/page-sizer.h
@@ -124,7 +124,7 @@ public:
/**
* Constructor
*/
- PageSizer();
+ PageSizer(Registry & _wr);
/**
* Destructor
@@ -134,7 +134,7 @@ public:
/**
* Set up or reset this widget
*/
- void init (Registry& reg);
+ void init ();
/**
* Set the page size to the given dimensions. If 'changeList' is
diff --git a/src/ui/widget/registered-widget.cpp b/src/ui/widget/registered-widget.cpp
index f8abecdbe..3b36ea6bc 100644
--- a/src/ui/widget/registered-widget.cpp
+++ b/src/ui/widget/registered-widget.cpp
@@ -41,33 +41,6 @@ namespace Inkscape {
namespace UI {
namespace Widget {
-void
-RegisteredWdg::write_to_xml(const char * svgstr)
-{
- // Use local repr here. When repr is specified, use that one, but
- // if repr==NULL, get the repr of namedview of active desktop.
- Inkscape::XML::Node *local_repr = repr;
- SPDocument *local_doc = doc;
- if (!local_repr) {
- // no repr specified, use active desktop's namedview's repr
- SPDesktop* dt = SP_ACTIVE_DESKTOP;
- local_repr = SP_OBJECT_REPR (sp_desktop_namedview(dt));
- local_doc = sp_desktop_document(dt);
- }
-
- bool saved = sp_document_get_undo_sensitive (local_doc);
- sp_document_set_undo_sensitive (local_doc, false);
- if (!write_undo) local_repr->setAttribute(_key.c_str(), svgstr);
- sp_document_set_undo_sensitive (local_doc, saved);
-
- local_doc->setModifiedSinceSave();
- if (write_undo) {
- local_repr->setAttribute(_key.c_str(), svgstr);
- sp_document_done (local_doc, event_type, event_description);
- }
-}
-
-
/*#########################################
* Registered CHECKBUTTON
*/
@@ -130,35 +103,24 @@ RegisteredCheckButton::on_toggled()
* Registered UNITMENU
*/
-RegisteredUnitMenu::RegisteredUnitMenu()
-: _label(0), _sel(0)
-{
-}
-
RegisteredUnitMenu::~RegisteredUnitMenu()
{
_changed_connection.disconnect();
- if (_label) delete _label;
- if (_sel) delete _sel;
}
-void
-RegisteredUnitMenu::init (const Glib::ustring& label, const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument *doc_in)
+RegisteredUnitMenu::RegisteredUnitMenu (const Glib::ustring& label, const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument *doc_in)
+ : RegisteredWidget<Labelled> (label, "" /*tooltip*/, new UnitMenu())
{
init_parent(key, wr, repr_in, doc_in);
- _label = new Gtk::Label (label, 1.0, 0.5);
- _label->set_use_underline (true);
- _sel = new UnitMenu ();
- _label->set_mnemonic_widget (*_sel);
- _sel->setUnitType (UNIT_TYPE_LINEAR);
- _changed_connection = _sel->signal_changed().connect (sigc::mem_fun (*this, &RegisteredUnitMenu::on_changed));
+ getUnitMenu()->setUnitType (UNIT_TYPE_LINEAR);
+ _changed_connection = getUnitMenu()->signal_changed().connect (sigc::mem_fun (*this, &RegisteredUnitMenu::on_changed));
}
void
RegisteredUnitMenu::setUnit (const SPUnit* unit)
{
- _sel->setUnit (sp_unit_get_abbreviation (unit));
+ getUnitMenu()->setUnit (sp_unit_get_abbreviation (unit));
}
void
@@ -168,7 +130,7 @@ RegisteredUnitMenu::on_changed()
return;
Inkscape::SVGOStringStream os;
- os << _sel->getUnitAbbr();
+ os << getUnitMenu()->getUnitAbbr();
_wr->setUpdating (true);
@@ -182,48 +144,30 @@ RegisteredUnitMenu::on_changed()
* Registered SCALARUNIT
*/
-RegisteredScalarUnit::RegisteredScalarUnit()
-: _widget(0), _um(0)
-{
-}
-
RegisteredScalarUnit::~RegisteredScalarUnit()
{
- if (_widget) delete _widget;
_value_changed_connection.disconnect();
}
-void
-RegisteredScalarUnit::init (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, const RegisteredUnitMenu &rum, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument *doc_in)
+RegisteredScalarUnit::RegisteredScalarUnit (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, const RegisteredUnitMenu &rum, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument *doc_in)
+ : RegisteredWidget<ScalarUnit>(label, tip, UNIT_TYPE_LINEAR, "", "", rum.getUnitMenu()),
+ _um(0)
{
init_parent(key, wr, repr_in, doc_in);
- _widget = new ScalarUnit (label, tip, UNIT_TYPE_LINEAR, "", "", rum._sel);
- _widget->initScalar (-1e6, 1e6);
- _widget->setUnit (rum._sel->getUnitAbbr());
- _widget->setDigits (2);
- _um = rum._sel;
- _value_changed_connection = _widget->signal_value_changed().connect (sigc::mem_fun (*this, &RegisteredScalarUnit::on_value_changed));
-}
-
-ScalarUnit*
-RegisteredScalarUnit::getSU()
-{
- return _widget;
+ initScalar (-1e6, 1e6);
+ setUnit (rum.getUnitMenu()->getUnitAbbr());
+ setDigits (2);
+ _um = rum.getUnitMenu();
+ _value_changed_connection = signal_value_changed().connect (sigc::mem_fun (*this, &RegisteredScalarUnit::on_value_changed));
}
-void
-RegisteredScalarUnit::setValue (double val)
-{
- if (_widget)
- _widget->setValue (val);
-}
void
RegisteredScalarUnit::on_value_changed()
{
- if (_widget->setProgrammatically) {
- _widget->setProgrammatically = false;
+ if (setProgrammatically) {
+ setProgrammatically = false;
return;
}
@@ -233,7 +177,7 @@ RegisteredScalarUnit::on_value_changed()
_wr->setUpdating (true);
Inkscape::SVGOStringStream os;
- os << _widget->getValue("");
+ os << getValue("");
if (_um)
os << _um->getUnitAbbr();
@@ -371,46 +315,22 @@ RegisteredColorPicker::on_changed (guint32 rgba)
* Registered SUFFIXEDINTEGER
*/
-RegisteredSuffixedInteger::RegisteredSuffixedInteger()
-: _label(0),
- setProgrammatically(false),
- _sb(0),
- _adj(0.0,0.0,100.0,1.0,1.0,1.0),
- _suffix(0)
-{
-}
-
RegisteredSuffixedInteger::~RegisteredSuffixedInteger()
{
_changed_connection.disconnect();
- if (_label) delete _label;
- if (_suffix) delete _suffix;
- if (_sb) delete _sb;
}
-void
-RegisteredSuffixedInteger::init (const Glib::ustring& label, const Glib::ustring& suffix, const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument *doc_in)
+RegisteredSuffixedInteger::RegisteredSuffixedInteger (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& suffix, const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument *doc_in)
+ : RegisteredWidget<Scalar>(label, tip, 0, suffix),
+ setProgrammatically(false)
{
init_parent(key, wr, repr_in, doc_in);
- _label = new Gtk::Label (label);
- _label->set_alignment (1.0, 0.5);
- _label->set_use_underline();
- _sb = new Gtk::SpinButton (_adj, 1.0, 0);
- _sb->set_numeric();
- _label->set_mnemonic_widget (*_sb);
- _suffix = new Gtk::Label (suffix);
- _hbox.pack_start (*_sb, true, true, 0);
- _hbox.pack_start (*_suffix, false, false, 0);
-
- _changed_connection = _adj.signal_value_changed().connect (sigc::mem_fun(*this, &RegisteredSuffixedInteger::on_value_changed));
-}
+ setRange (0, 1e6);
+ setDigits (0);
+ setIncrements(1, 10);
-void
-RegisteredSuffixedInteger::setValue (int i)
-{
- setProgrammatically = true;
- _adj.set_value (i);
+ _changed_connection = signal_value_changed().connect (sigc::mem_fun(*this, &RegisteredSuffixedInteger::on_value_changed));
}
void
@@ -427,8 +347,7 @@ RegisteredSuffixedInteger::on_value_changed()
_wr->setUpdating (true);
Inkscape::SVGOStringStream os;
- int value = int(_adj.get_value());
- os << value;
+ os << getValue();
write_to_xml(os.str().c_str());
@@ -440,32 +359,29 @@ RegisteredSuffixedInteger::on_value_changed()
* Registered RADIOBUTTONPAIR
*/
-RegisteredRadioButtonPair::RegisteredRadioButtonPair()
-: _hbox(0),
- setProgrammatically(false)
-{
-}
-
RegisteredRadioButtonPair::~RegisteredRadioButtonPair()
{
_changed_connection.disconnect();
}
-void
-RegisteredRadioButtonPair::init (const Glib::ustring& label,
-const Glib::ustring& label1, const Glib::ustring& label2,
-const Glib::ustring& tip1, const Glib::ustring& tip2,
-const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument *doc_in)
+RegisteredRadioButtonPair::RegisteredRadioButtonPair (const Glib::ustring& label,
+ const Glib::ustring& label1, const Glib::ustring& label2,
+ const Glib::ustring& tip1, const Glib::ustring& tip2,
+ const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument *doc_in)
+ : RegisteredWidget<Gtk::HBox>(),
+ _rb1(NULL),
+ _rb2(NULL)
{
init_parent(key, wr, repr_in, doc_in);
- _hbox = new Gtk::HBox;
- _hbox->add (*manage (new Gtk::Label (label)));
+ setProgrammatically = false;
+
+ add (*manage (new Gtk::Label (label)));
_rb1 = manage (new Gtk::RadioButton (label1, true));
- _hbox->add (*_rb1);
+ add (*_rb1);
Gtk::RadioButtonGroup group = _rb1->get_group();
_rb2 = manage (new Gtk::RadioButton (group, label2, true));
- _hbox->add (*_rb2);
+ add (*_rb2);
_rb2->set_active();
_tt.set_tip (*_rb1, tip1);
_tt.set_tip (*_rb2, tip2);
diff --git a/src/ui/widget/registered-widget.h b/src/ui/widget/registered-widget.h
index 42bcf62d7..a3b04575e 100644
--- a/src/ui/widget/registered-widget.h
+++ b/src/ui/widget/registered-widget.h
@@ -21,8 +21,11 @@
#include "xml/node.h"
#include "registry.h"
+#include "ui/widget/scalar.h"
+#include "ui/widget/scalar-unit.h"
#include "ui/widget/point.h"
#include "ui/widget/random.h"
+#include "ui/widget/unit-menu.h"
#include "ui/widget/color-picker.h"
#include "inkscape.h"
@@ -44,9 +47,6 @@ namespace UI {
namespace Widget {
class Registry;
-class Scalar;
-class ScalarUnit;
-class UnitMenu;
template <class W>
class RegisteredWidget : public W {
@@ -70,9 +70,13 @@ protected:
template< typename A, typename B >
RegisteredWidget( A& a, B& b ): W( a, b ) { construct(); }
template< typename A, typename B, typename C >
+ RegisteredWidget( A& a, B& b, C* c ): W( a, b, c ) { construct(); }
+ template< typename A, typename B, typename C >
RegisteredWidget( A& a, B& b, C& c ): W( a, b, c ) { construct(); }
template< typename A, typename B, typename C, typename D >
RegisteredWidget( A& a, B& b, C c, D d ): W( a, b, c, d ) { construct(); }
+ template< typename A, typename B, typename C, typename D, typename E , typename F>
+ RegisteredWidget( A& a, B& b, C c, D& d, E& e, F* f): W( a, b, c, d, e, f) { construct(); }
virtual ~RegisteredWidget() {};
@@ -129,47 +133,6 @@ private:
}
};
-class RegisteredWdg {
-public:
- void set_undo_parameters(const unsigned int _event_type, Glib::ustring _event_description)
- {
- event_type = _event_type;
- event_description = _event_description;
- write_undo = true;
- }
-
- bool is_updating() {if (_wr) return _wr->isUpdating(); else return false;}
-
-protected:
- RegisteredWdg()
- {
- _wr = NULL;
- repr = NULL;
- doc = NULL;
- write_undo = false;
- }
-
- void init_parent(const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument *doc_in)
- {
- _wr = &wr;
- _key = key;
- repr = repr_in;
- doc = doc_in;
- if (repr && !doc) // doc cannot be NULL when repr is not NULL
- g_warning("Initialization of registered widget using defined repr but with doc==NULL");
- }
-
- void write_to_xml(const char * svgstr);
-
- Registry * _wr;
- Glib::ustring _key;
- Inkscape::XML::Node * repr;
- SPDocument * doc;
- unsigned int event_type;
- Glib::ustring event_description;
- bool write_undo;
-};
-
//#######################################################
class RegisteredCheckButton : public RegisteredWidget<Gtk::CheckButton> {
@@ -191,59 +154,42 @@ public:
bool setProgrammatically; // true if the value was set by setActive, not changed by the user;
// if a callback checks it, it must reset it back to false
-
protected:
Gtk::Tooltips _tt;
sigc::connection _toggled_connection;
void on_toggled();
};
-class RegisteredUnitMenu : public RegisteredWdg {
+class RegisteredUnitMenu : public RegisteredWidget<Labelled> {
public:
- RegisteredUnitMenu();
~RegisteredUnitMenu();
- void init ( const Glib::ustring& label,
- const Glib::ustring& key,
- Registry& wr,
- Inkscape::XML::Node* repr_in,
- SPDocument *doc_in);
- inline void init ( const Glib::ustring& label,
- const Glib::ustring& key,
- Registry& wr)
- { init(label, key, wr, NULL, NULL); };
+ RegisteredUnitMenu ( const Glib::ustring& label,
+ const Glib::ustring& key,
+ Registry& wr,
+ Inkscape::XML::Node* repr_in = NULL,
+ SPDocument *doc_in = NULL );
void setUnit (const SPUnit*);
- Gtk::Label *_label;
- UnitMenu *_sel;
+ Unit getUnit() const { return static_cast<UnitMenu*>(_widget)->getUnit(); };
+ UnitMenu* getUnitMenu() const { return static_cast<UnitMenu*>(_widget); };
sigc::connection _changed_connection;
protected:
void on_changed();
};
-class RegisteredScalarUnit : public RegisteredWdg {
+class RegisteredScalarUnit : public RegisteredWidget<ScalarUnit> {
public:
- RegisteredScalarUnit();
~RegisteredScalarUnit();
- void init (const Glib::ustring& label,
- const Glib::ustring& tip,
- const Glib::ustring& key,
- const RegisteredUnitMenu &rum,
- Registry& wr,
- Inkscape::XML::Node* repr_in,
- SPDocument *doc_in);
- inline void init ( const Glib::ustring& label,
- const Glib::ustring& tip,
- const Glib::ustring& key,
- const RegisteredUnitMenu &rum,
- Registry& wr)
- { init(label, tip, key, rum, wr, NULL, NULL); };
-
- ScalarUnit* getSU();
- void setValue (double);
+ RegisteredScalarUnit ( const Glib::ustring& label,
+ const Glib::ustring& tip,
+ const Glib::ustring& key,
+ const RegisteredUnitMenu &rum,
+ Registry& wr,
+ Inkscape::XML::Node* repr_in = NULL,
+ SPDocument *doc_in = NULL );
protected:
- ScalarUnit *_widget;
sigc::connection _value_changed_connection;
UnitMenu *_um;
void on_value_changed();
@@ -288,60 +234,39 @@ protected:
sigc::connection _changed_connection;
};
-class RegisteredSuffixedInteger : public RegisteredWdg {
+class RegisteredSuffixedInteger : public RegisteredWidget<Scalar> {
public:
- RegisteredSuffixedInteger();
- ~RegisteredSuffixedInteger();
- void init (const Glib::ustring& label1,
- const Glib::ustring& label2,
- const Glib::ustring& key,
- Registry& wr,
- Inkscape::XML::Node* repr_in,
- SPDocument *doc_in);
- inline void init ( const Glib::ustring& label1,
- const Glib::ustring& label2,
- const Glib::ustring& key,
- Registry& wr)
- { init(label1, label2, key, wr, NULL, NULL); };
+ virtual ~RegisteredSuffixedInteger();
+ RegisteredSuffixedInteger ( const Glib::ustring& label,
+ const Glib::ustring& tip,
+ const Glib::ustring& suffix,
+ const Glib::ustring& key,
+ Registry& wr,
+ Inkscape::XML::Node* repr_in = NULL,
+ SPDocument *doc_in = NULL );
- void setValue (int);
- Gtk::Label *_label;
- Gtk::HBox _hbox;
bool setProgrammatically; // true if the value was set by setValue, not changed by the user;
// if a callback checks it, it must reset it back to false
protected:
- Gtk::SpinButton *_sb;
- Gtk::Adjustment _adj;
- Gtk::Label *_suffix;
sigc::connection _changed_connection;
void on_value_changed();
};
-class RegisteredRadioButtonPair : public RegisteredWdg {
+class RegisteredRadioButtonPair : public RegisteredWidget<Gtk::HBox> {
public:
- RegisteredRadioButtonPair();
- ~RegisteredRadioButtonPair();
- void init (const Glib::ustring& label,
- const Glib::ustring& label1,
- const Glib::ustring& label2,
- const Glib::ustring& tip1,
- const Glib::ustring& tip2,
- const Glib::ustring& key,
- Registry& wr,
- Inkscape::XML::Node* repr_in,
- SPDocument *doc_in);
- inline void init ( const Glib::ustring& label,
- const Glib::ustring& label1,
- const Glib::ustring& label2,
- const Glib::ustring& tip1,
- const Glib::ustring& tip2,
- const Glib::ustring& key,
- Registry& wr)
- { init(label, label1, label2, tip1, tip2, key, wr, NULL, NULL); };
+ virtual ~RegisteredRadioButtonPair();
+ RegisteredRadioButtonPair ( const Glib::ustring& label,
+ const Glib::ustring& label1,
+ const Glib::ustring& label2,
+ const Glib::ustring& tip1,
+ const Glib::ustring& tip2,
+ const Glib::ustring& key,
+ Registry& wr,
+ Inkscape::XML::Node* repr_in = NULL,
+ SPDocument *doc_in = NULL );
void setValue (bool second);
- Gtk::HBox *_hbox;
bool setProgrammatically; // true if the value was set by setValue, not changed by the user;
// if a callback checks it, it must reset it back to false