registered-widget.h revision d61d2d7858ded67cc041d49e7c81a10a84c9e164
/*
* Authors:
* Ralf Stephan <ralf@ark.in-berlin.de>
* Johan Engelen <j.b.c.engelen@utwente.nl>
* Abhishek Sharma
*
* Copyright (C) 2005-2008 Authors
*
* Released under GNU GPL. Read the file 'COPYING' for more information.
*/
#include "registry.h"
#include "ui/widget/scalar-unit.h"
#include "ui/widget/unit-menu.h"
#include "ui/widget/color-picker.h"
#include "inkscape.h"
#include "document.h"
#include "document-undo.h"
#include "desktop-handles.h"
#include "sp-namedview.h"
#include <gtkmm/checkbutton.h>
struct SPUnit;
}
{
write_undo = true;
}
RegisteredWidget() : W() { construct(); }
RegisteredWidget( A& a, B& b ): W( a, b ) { construct(); }
RegisteredWidget( A& a, B& b, C* c ): W( a, b, c ) { construct(); }
RegisteredWidget( A& a, B& b, C& c ): W( a, b, c ) { construct(); }
RegisteredWidget( A& a, B& b, C c, D d ): W( a, b, c, d ) { construct(); }
RegisteredWidget( A& a, B& b, C c, D& d, E& e, F* f): W( a, b, c, d, e, f) { construct(); }
virtual ~RegisteredWidget() {};
void init_parent(const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument *doc_in)
{
g_warning("Initialization of registered widget using defined repr but with doc==NULL");
}
void 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.
if (!local_repr) {
// no repr specified, use active desktop's namedview's repr
}
if (!write_undo) {
}
if (write_undo) {
}
}
SPDocument * doc;
unsigned int event_type;
bool write_undo;
void construct() {
write_undo = false;
}
};
//#######################################################
RegisteredCheckButton (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Registry& wr, bool right=true, Inkscape::XML::Node* repr_in=NULL, SPDocument *doc_in=NULL);
void setActive (bool);
// a slave button is only sensitive when the master button is active
// i.e. a slave button is greyed-out when the master button is not checked
}
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
void on_toggled();
};
void on_changed();
};
const RegisteredUnitMenu &rum,
void on_value_changed();
};
void on_value_changed();
};
void on_activate();
};
void closeWindow();
void on_changed (guint32);
};
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
void on_value_changed();
};
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
void on_value_changed();
};
void on_value_changed();
};
// redefine setValue, because transform must be applied
void on_value_changed();
};
// redefine setValue, because transform must be applied
/**
* Changes the widgets text to polar coordinates. The SVG output will still be a normal carthesian vector.
* Careful: when calling getValue(), the return value's X-coord will be the angle, Y-value will be the distance/length.
*/
void setPolarCoords(bool polar_coords = true);
void on_value_changed();
bool _polar_coords;
};
void on_value_changed();
};
} // namespace Widget
} // namespace UI
} // namespace Inkscape
#endif // INKSCAPE_UI_WIDGET_REGISTERED_WIDGET__H_
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :