summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bdbe820)
raw | patch | inline | side by side (parent: bdbe820)
author | johnce <johnce@users.sourceforge.net> | |
Wed, 5 Aug 2009 06:38:07 +0000 (06:38 +0000) | ||
committer | johnce <johnce@users.sourceforge.net> | |
Wed, 5 Aug 2009 06:38:07 +0000 (06:38 +0000) |
58 files changed:
diff --git a/src/extension/implementation/implementation.cpp b/src/extension/implementation/implementation.cpp
index 6090b72d071a747be60a013d8f4291d9fd389a0d..e3421b26d3bf9991a20454a0a74bf405457223ad 100644 (file)
return module->autogui(NULL, NULL);
} /* Implementation::prefs_input */
-SPDocument *
+Document *
Implementation::open(Inkscape::Extension::Input */*module*/, gchar const */*filename*/) {
/* throw open_failed(); */
return NULL;
} /* Implementation::prefs_output */
void
-Implementation::save(Inkscape::Extension::Output */*module*/, SPDocument */*doc*/, gchar const */*filename*/) {
+Implementation::save(Inkscape::Extension::Output */*module*/, Document */*doc*/, gchar const */*filename*/) {
/* throw save_fail */
return;
} /* Implementation::save */
Implementation::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view, sigc::signal<void> * changeSignal, ImplementationDocumentCache * docCache) {
if (module->param_visible_count() == 0) return NULL;
- SPDocument * current_document = view->doc();
+ Document * current_document = view->doc();
using Inkscape::Util::GSListConstIterator;
GSListConstIterator<SPItem *> selected =
unsigned int
-Implementation::begin(Inkscape::Extension::Print */*module*/, SPDocument */*doc*/)
+Implementation::begin(Inkscape::Extension::Print */*module*/, Document */*doc*/)
{
return 0;
}
index e6ce40bc0f517e948d3a5772a1ef940c01b4a0cb..d207c1a196838297dfd9cde919210c3e3fe21bb3 100644 (file)
the incoming filename (so that it's not the temporary filename).
That document is then returned from this function.
*/
-SPDocument *
+Document *
Script::open(Inkscape::Extension::Input *module,
const gchar *filenameArg)
{
int data_read = execute(command, params, lfilename, fileout);
fileout.toFile(tempfilename_out);
- SPDocument * mydoc = NULL;
+ Document * mydoc = NULL;
if (data_read > 10) {
if (helper_extension.size()==0) {
mydoc = Inkscape::Extension::open(
*/
void
Script::save(Inkscape::Extension::Output *module,
- SPDocument *doc,
+ Document *doc,
const gchar *filenameArg)
{
std::list<std::string> params;
pump_events();
- SPDocument * mydoc = NULL;
+ Document * mydoc = NULL;
if (data_read > 10) {
mydoc = Inkscape::Extension::open(
Inkscape::Extension::db.get(SP_MODULE_KEY_INPUT_SVG),
index f34fea64a36a30daaa4f489ec70f20814be59a5c..9eea2dbebba9c894fe8ad532431274bea39d34d6 100644 (file)
return;
}
-SPDocument *
+Document *
XSLT::open(Inkscape::Extension::Input */*module*/, gchar const *filename)
{
xmlDocPtr filein = xmlParseFile(filename);
}
g_free(s);
- SPDocument * doc = sp_document_create(rdoc, filename, base, name, true);
+ Document * doc = sp_document_create(rdoc, filename, base, name, true);
g_free(base); g_free(name);
}
void
-XSLT::save(Inkscape::Extension::Output */*module*/, SPDocument *doc, gchar const *filename)
+XSLT::save(Inkscape::Extension::Output */*module*/, Document *doc, gchar const *filename)
{
/* TODO: Should we assume filename to be in utf8 or to be a raw filename?
* See JavaFXOutput::save for discussion. */
diff --git a/src/extension/internal/bitmap/imagemagick.cpp b/src/extension/internal/bitmap/imagemagick.cpp
index e907612fdaa093098e27d6f361e7976d7aa7a26e..75d53927d21b8277ae9c5624940150234f1c1672 100644 (file)
@@ -221,7 +221,7 @@ ImageMagick::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::Vi
Gtk::Widget *
ImageMagick::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view, sigc::signal<void> * changeSignal, Inkscape::Extension::Implementation::ImplementationDocumentCache * /*docCache*/)
{
- SPDocument * current_document = view->doc();
+ Document * current_document = view->doc();
using Inkscape::Util::GSListConstIterator;
GSListConstIterator<SPItem *> selected = sp_desktop_selection((SPDesktop *)view)->itemList();
index c81fdd0298df8286fa35fdc7ff56aa14811e404e..d849755b7f3f6b21a842432647941825e671c5bf 100644 (file)
}
static bool
-png_render_document_to_file(SPDocument *doc, gchar const *filename)
+png_render_document_to_file(Document *doc, gchar const *filename)
{
CairoRenderer *renderer;
CairoRenderContext *ctx;
\param uri Filename to save to (probably will end in .png)
*/
void
-CairoRendererOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename)
+CairoRendererOutput::save(Inkscape::Extension::Output *mod, Document *doc, gchar const *filename)
{
if (!png_render_document_to_file(doc, filename))
throw Inkscape::Extension::Output::save_failed();
index dff89c1ed0595ef9b74bcd85e76ad69ba4ce6762..d9cac666ce56bb1d652128f40e1685ba83337362 100644 (file)
}
static bool
-ps_print_document_to_file(SPDocument *doc, gchar const *filename, unsigned int level, bool texttopath, bool filtertobitmap, int resolution, const gchar * const exportId, bool exportDrawing, bool exportCanvas, bool eps = false)
+ps_print_document_to_file(Document *doc, gchar const *filename, unsigned int level, bool texttopath, bool filtertobitmap, int resolution, const gchar * const exportId, bool exportDrawing, bool exportCanvas, bool eps = false)
{
sp_document_ensure_up_to_date(doc);
@@ -124,7 +124,7 @@ ps_print_document_to_file(SPDocument *doc, gchar const *filename, unsigned int l
\param filename Filename to save to (probably will end in .ps)
*/
void
-CairoPsOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename)
+CairoPsOutput::save(Inkscape::Extension::Output *mod, Document *doc, gchar const *filename)
{
Inkscape::Extension::Extension * ext;
unsigned int ret;
@@ -188,7 +188,7 @@ CairoPsOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar con
\param filename Filename to save to (probably will end in .ps)
*/
void
-CairoEpsOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename)
+CairoEpsOutput::save(Inkscape::Extension::Output *mod, Document *doc, gchar const *filename)
{
Inkscape::Extension::Extension * ext;
unsigned int ret;
diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp
index d1462e52e5e43ae663bd381a351c1aa84650a4e2..28cf406f2bd0b2b2de7b8bc0cf88206a8013c116 100644 (file)
@@ -811,7 +811,7 @@ CairoRenderContext::_finishSurfaceSetup(cairo_surface_t *surface, cairo_matrix_t
cairo_scale(_cr, PT_PER_PX, PT_PER_PX);
} else if (cairo_surface_get_content(_surface) != CAIRO_CONTENT_ALPHA) {
// set background color on non-alpha surfaces
- // TODO: bgcolor should be derived from SPDocument
+ // TODO: bgcolor should be derived from Document
cairo_set_source_rgb(_cr, 1.0, 1.0, 1.0);
cairo_rectangle(_cr, 0, 0, _width, _height);
cairo_fill(_cr);
diff --git a/src/extension/internal/cairo-renderer-pdf-out.cpp b/src/extension/internal/cairo-renderer-pdf-out.cpp
index b44e83449323711c64434b05789d061639d77fe5..1e5404c5074aa14360fcd7a16ccb4f4f70791015 100644 (file)
}
static bool
-pdf_render_document_to_file(SPDocument *doc, gchar const *filename, unsigned int level,
+pdf_render_document_to_file(Document *doc, gchar const *filename, unsigned int level,
bool texttopath, bool filtertobitmap, int resolution,
const gchar * const exportId, bool exportDrawing, bool exportCanvas)
{
@@ -118,7 +118,7 @@ pdf_render_document_to_file(SPDocument *doc, gchar const *filename, unsigned int
tell the printing system to save to file.
*/
void
-CairoRendererPdfOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename)
+CairoRendererPdfOutput::save(Inkscape::Extension::Output *mod, Document *doc, gchar const *filename)
{
Inkscape::Extension::Extension * ext;
unsigned int ret;
index da88a5eae779307c1b4f98fd985085a7a8bd345e..3414993e5c3112d166c5f3527e1a3fd27b57329d 100644 (file)
Geom::Matrix t = t_on_document * t_item.inverse();
// Do the export
- SPDocument *document = SP_OBJECT(item)->document;
+ Document *document = SP_OBJECT(item)->document;
GSList *items = NULL;
items = g_slist_append(items, item);
}
bool
-CairoRenderer::setupDocument(CairoRenderContext *ctx, SPDocument *doc, bool pageBoundingBox, SPItem *base)
+CairoRenderer::setupDocument(CairoRenderContext *ctx, Document *doc, bool pageBoundingBox, SPItem *base)
{
g_assert( ctx != NULL );
diff --git a/src/extension/internal/emf-win32-inout.cpp b/src/extension/internal/emf-win32-inout.cpp
index f400a36497008c5da1080c66f3c81cd6f5e13b21..ffba5af81e8c0a19655bb2656ee8e808d934ed5f 100644 (file)
static void
-emf_print_document_to_file(SPDocument *doc, gchar const *filename)
+emf_print_document_to_file(Document *doc, gchar const *filename)
{
Inkscape::Extension::Print *mod;
SPPrintContext context;
void
-EmfWin32::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename)
+EmfWin32::save(Inkscape::Extension::Output *mod, Document *doc, gchar const *filename)
{
Inkscape::Extension::Extension * ext;
#pragma pack( pop )
-SPDocument *
+Document *
EmfWin32::open( Inkscape::Extension::Input * /*mod*/, const gchar *uri )
{
EMF_CALLBACK_DATA d;
// std::cout << "SVG Output: " << std::endl << *(d.outsvg) << std::endl;
- SPDocument *doc = sp_document_new_from_mem(d.outsvg->c_str(), d.outsvg->length(), TRUE);
+ Document *doc = sp_document_new_from_mem(d.outsvg->c_str(), d.outsvg->length(), TRUE);
delete d.outsvg;
delete d.path;
diff --git a/src/extension/internal/emf-win32-print.cpp b/src/extension/internal/emf-win32-print.cpp
index d098f6466ab95ba25ddabb62deb3e0523f2d5208..822a0577bf55b27c30f07e7f8f3ecd9935606c23 100644 (file)
unsigned int
-PrintEmfWin32::begin (Inkscape::Extension::Print *mod, SPDocument *doc)
+PrintEmfWin32::begin (Inkscape::Extension::Print *mod, Document *doc)
{
gchar const *utf8_fn = mod->get_param_string("destination");
diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp
index 64a099c8a42e3c673b89b3348936c0e4050d6174..2f52561d117f959a432e533bd3fd68628883dc3b 100644 (file)
namespace Extension {
namespace Internal {
-SPDocument *
+Document *
GdkpixbufInput::open(Inkscape::Extension::Input */*mod*/, char const *uri)
{
- SPDocument *doc = NULL;
+ PDocument *doc = NULL;
GdkPixbuf *pb = Inkscape::IO::pixbuf_new_from_file( uri, NULL );
if (pb) { /* We are readable */
index 5b3e0c16ef2e37bf7427d6951906fd7777730ed7..9510b5ebd290a7ff74dac6afc2d324deca70a30b 100644 (file)
}
/**
- \brief Actually open the gradient and turn it into an SPDocument
+ \brief Actually open the gradient and turn it into an Document
\param module The input module being used
\param filename The filename of the gradient to be opened
\return A Document with the gradient in it.
document using the \c sp_document_from_mem. That is then returned
to Inkscape.
*/
-SPDocument *
+Document *
GimpGrad::open (Inkscape::Extension::Input */*module*/, gchar const *filename)
{
Inkscape::IO::dump_fopen_call(filename, "I");
index d4b35b261baec5cb49bb89bbdac225bb8bd07179..5a0523ba800f50973f4beb3c6ebbac030f0f5113 100644 (file)
Geom::Rect bounding_area = Geom::Rect(Geom::Point(0,0), Geom::Point(100,100));
if (selection->isEmpty()) {
/* get page size */
- SPDocument * doc = document->doc();
+ Document * doc = document->doc();
bounding_area = Geom::Rect( Geom::Point(0,0),
Geom::Point(sp_document_width(doc), sp_document_height(doc)) );
} else {
Gtk::Widget *
Grid::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view, sigc::signal<void> * changeSignal, Inkscape::Extension::Implementation::ImplementationDocumentCache * /*docCache*/)
{
- SPDocument * current_document = view->doc();
+ Document * current_document = view->doc();
using Inkscape::Util::GSListConstIterator;
GSListConstIterator<SPItem *> selected = sp_desktop_selection((SPDesktop *)view)->itemList();
index 417755e1973f19354dcae0a2367486cfa64ef04f..c1f057071d0b41992ffe8af1fa72ee329a5c61dd 100644 (file)
/**
* Output the tree data to buffer
*/
-bool JavaFXOutput::doTreeRecursive(SPDocument *doc, SPObject *obj)
+bool JavaFXOutput::doTreeRecursive(Document *doc, SPObject *obj)
{
/**
* Check the type of node and process
/**
* Output the curve data to buffer
*/
-bool JavaFXOutput::doTree(SPDocument *doc)
+bool JavaFXOutput::doTree(Document *doc)
{
double bignum = 1000000.0;
}
-bool JavaFXOutput::doBody(SPDocument *doc, SPObject *obj)
+bool JavaFXOutput::doBody(Document *doc, SPObject *obj)
{
/**
* Check the type of node and process
/**
* Saves the <paths> of an Inkscape SVG file as JavaFX spline definitions
*/
-bool JavaFXOutput::saveDocument(SPDocument *doc, gchar const *filename_utf8)
+bool JavaFXOutput::saveDocument(Document *doc, gchar const *filename_utf8)
{
reset();
*/
void
JavaFXOutput::save(Inkscape::Extension::Output */*mod*/,
- SPDocument *doc, gchar const *filename_utf8)
+ Document *doc, gchar const *filename_utf8)
{
/* N.B. The name `filename_utf8' represents the fact that we want it to be in utf8; whereas in
* fact we know that some callers of Extension::save pass something in the filesystem's
diff --git a/src/extension/internal/latex-pstricks-out.cpp b/src/extension/internal/latex-pstricks-out.cpp
index 4a469a7500a0da118ed649fa5ff19fad21ebe443..924f9697e0aa9abea98785f6c4d50ff4c4e95af9 100644 (file)
void
-LatexOutput::save(Inkscape::Extension::Output *mod2, SPDocument *doc, gchar const *filename)
+LatexOutput::save(Inkscape::Extension::Output *mod2, Document *doc, gchar const *filename)
{
Inkscape::Extension::Print *mod;
SPPrintContext context;
index 789e5ea346878159e2cb150c191d41ce33fbdf0b..afc985e1424481cb581050fb67d1679e656793d7 100644 (file)
}
unsigned int
-PrintLatex::begin (Inkscape::Extension::Print *mod, SPDocument *doc)
+PrintLatex::begin (Inkscape::Extension::Print *mod, Document *doc)
{
Inkscape::SVGOStringStream os;
int res;
index cc8489302d2c73da43173e14eba0be3fc2a49f19..e7e22414a497c67fb3d63089fe2ce3ef6d818cc8 100644 (file)
* Descends into the SVG tree, mapping things to ODF when appropriate
*/
void
-OdfOutput::save(Inkscape::Extension::Output */*mod*/, SPDocument *doc, gchar const *filename)
+OdfOutput::save(Inkscape::Extension::Output */*mod*/, Document *doc, gchar const *filename)
{
reset();
diff --git a/src/extension/internal/pdf-input-cairo.cpp b/src/extension/internal/pdf-input-cairo.cpp
index 937fefb1117636f7c1cba87534697813c7e4960c..76759259dcddf1b264118b9b91385ad90da890ad 100644 (file)
static cairo_status_t _write_ustring_cb(void *closure, const unsigned char *data, unsigned int length);
-SPDocument *
+Document *
PdfInputCairo::open(Inkscape::Extension::Input * /*mod*/, const gchar * uri) {
printf("Attempting to open using PdfInputCairo\n");
cairo_destroy(cr);
cairo_surface_destroy(surface);
- SPDocument * doc = sp_document_new_from_mem(output->c_str(), output->length(), TRUE);
+ Document * doc = sp_document_new_from_mem(output->c_str(), output->length(), TRUE);
delete output;
g_object_unref(page);
diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp
index c2d417f2c03d750dbcb3e54983fab76f92aca3d8..476f0daf617aaeecb56666ca9349d88c4e773481 100644 (file)
/**
* Parses the selected page of the given PDF document using PdfParser.
*/
-SPDocument *
+Document *
PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) {
// Initialize the globalParams variable for poppler
Catalog *catalog = pdf_doc->getCatalog();
Page *page = catalog->getPage(page_num);
- SPDocument *doc = sp_document_new(NULL, TRUE, TRUE);
+ Document *doc = sp_document_new(NULL, TRUE, TRUE);
bool saved = sp_document_get_undo_sensitive(doc);
sp_document_set_undo_sensitive(doc, false); // No need to undo in this temporary document
diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp
index 00bd8fa4d8df9e00b2f09492381cd60b99cdd275..686e44bb12b66d86c4f7c18f4df098024bc316f7 100644 (file)
*
*/
-SvgBuilder::SvgBuilder(SPDocument *document, gchar *docname, XRef *xref) {
+SvgBuilder::SvgBuilder(Document *document, gchar *docname, XRef *xref) {
_is_top_level = true;
_doc = document;
_docname = docname;
index f30cbc317a4413cd6b07270bd2542a15c3bfc86e..d3ed39d1f2439bf874ebee7f3ba796ccdf9416f5 100644 (file)
/**
* Descend the svg tree recursively, translating data
*/
-bool PovOutput::doTreeRecursive(SPDocument *doc, SPObject *obj)
+bool PovOutput::doTreeRecursive(Document *doc, SPObject *obj)
{
String id;
/**
* Output the curve data to buffer
*/
-bool PovOutput::doTree(SPDocument *doc)
+bool PovOutput::doTree(Document *doc)
{
double bignum = 1000000.0;
minx = bignum;
/**
* Saves the Shapes of an Inkscape SVG file as PovRay spline definitions
*/
-void PovOutput::saveDocument(SPDocument *doc, gchar const *filename_utf8)
+void PovOutput::saveDocument(Document *doc, gchar const *filename_utf8)
{
reset();
*/
void
PovOutput::save(Inkscape::Extension::Output */*mod*/,
- SPDocument *doc, gchar const *filename_utf8)
+ Document *doc, gchar const *filename_utf8)
{
/* See comments in JavaFSOutput::save re the name `filename_utf8'. */
saveDocument(doc, filename_utf8);
index a3589e9051556fe27c523cd368df1b79dfda34b1..31781108807a4d849123798f6ba1925832363c44 100644 (file)
/**
\return A new document just for you!
\brief This function takes in a filename of a SVG document and
- turns it into a SPDocument.
+ turns it into a Document.
\param mod Module to use
\param uri The path to the file (UTF-8)
This function is really simple, it just calls sp_document_new...
*/
-SPDocument *
+Document *
Svg::open (Inkscape::Extension::Input */*mod*/, const gchar *uri)
{
#ifdef WITH_GNOME_VFS
g_warning("Error: Could not open file '%s' with VFS\n", uri);
return NULL;
}
- SPDocument * doc = sp_document_new_from_mem(buffer, strlen(buffer), 1);
+ Document * doc = sp_document_new_from_mem(buffer, strlen(buffer), 1);
g_free(buffer);
return doc;
all of this code. I just stole it.
*/
void
-Svg::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar const *filename)
+Svg::save(Inkscape::Extension::Output *mod, Document *doc, gchar const *filename)
{
g_return_if_fail(doc != NULL);
g_return_if_fail(filename != NULL);
index 21f27885850115b34c7448be7815f5ce116fd8ff..f272292b5b04a9e530eb6c1d97b7a02b98a8f890 100644 (file)
}
unsigned int
-PrintWin32::begin (Inkscape::Extension::Print *mod, SPDocument *doc)
+PrintWin32::begin (Inkscape::Extension::Print *mod, Document *doc)
{
DOCINFO di = {
sizeof (DOCINFO),
index c37d5705b4bc0b0077fc2506a9b129ed0b6bd79f..e7177e5e3031381fb148003f176a09a4dae08383 100644 (file)
namespace Internal {
-SPDocument *
+Document *
WpgInput::open(Inkscape::Extension::Input * mod, const gchar * uri) {
WPXInputStream* input = new libwpg::WPGFileStream(uri);
if (input->isOLEStream()) {
//printf("I've got a doc: \n%s", painter.document.c_str());
- SPDocument * doc = sp_document_new_from_mem(output.cstr(), strlen(output.cstr()), TRUE);
+ Document * doc = sp_document_new_from_mem(output.cstr(), strlen(output.cstr()), TRUE);
delete input;
return doc;
}
index 1dda3d73f82e4dea77009e5e1b839ac05b25056f..07170587a48a86b52a473db0598ba51fcfe86490 100644 (file)
and \c pref_name() are used.
*/
bool
-ParamBool::set( bool in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/ )
+ParamBool::set( bool in, Document * /*doc*/, Inkscape::XML::Node * /*node*/ )
{
_value = in;
/** \brief Returns \c _value */
bool
-ParamBool::get (const SPDocument * doc, const Inkscape::XML::Node * node)
+ParamBool::get (const Document * doc, const Inkscape::XML::Node * node)
{
return _value;
}
private:
/** \brief Param to change */
ParamBool * _pref;
- SPDocument * _doc;
+ Document * _doc;
Inkscape::XML::Node * _node;
sigc::signal<void> * _changeSignal;
public:
This function sets the value of the checkbox to be that of the
parameter, and then sets up a callback to \c on_toggle.
*/
- ParamBoolCheckButton (ParamBool * param, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) :
+ ParamBoolCheckButton (ParamBool * param, Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) :
Gtk::CheckButton(), _pref(param), _doc(doc), _node(node), _changeSignal(changeSignal) {
this->set_active(_pref->get(NULL, NULL) /**\todo fix */);
this->signal_toggled().connect(sigc::mem_fun(this, &ParamBoolCheckButton::on_toggle));
Builds a hbox with a label and a check button in it.
*/
Gtk::Widget *
-ParamBool::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
+ParamBool::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
{
if (_gui_hidden) return NULL;
Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
index 58db857486283a4367d58e30f722d7932e58abb2..080356e710301d290ba5c35ed59b4d901cac9e90 100644 (file)
}
guint32
-ParamColor::set( guint32 in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/ )
+ParamColor::set( guint32 in, Document * /*doc*/, Inkscape::XML::Node * /*node*/ )
{
_value = in;
}
Gtk::Widget *
-ParamColor::get_widget( SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * changeSignal )
+ParamColor::get_widget( Document * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * changeSignal )
{
if (_gui_hidden) return NULL;
index 656e58c491cc53ea0fcd8fa7183cbbcb8adfc610..3641695cccb14ae8cc46a57b6da88a8429c6cbc3 100644 (file)
/** \brief Create a label for the description */
Gtk::Widget *
-ParamDescription::get_widget (SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * /*changeSignal*/)
+ParamDescription::get_widget (Document * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * /*changeSignal*/)
{
if (_gui_hidden) return NULL;
index 03c1f839b99c5a81deb39273f2504f84784cbf26..9de3f60dd9c0db886883dfebebb32ff60242ec8f 100644 (file)
the passed in value is duplicated using \c g_strdup().
*/
const gchar *
-ParamComboBox::set (const gchar * in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/)
+ParamComboBox::set (const gchar * in, Document * /*doc*/, Inkscape::XML::Node * /*node*/)
{
if (in == NULL) return NULL; /* Can't have NULL string */
class ParamComboBoxEntry : public Gtk::ComboBoxText {
private:
ParamComboBox * _pref;
- SPDocument * _doc;
+ Document * _doc;
Inkscape::XML::Node * _node;
sigc::signal<void> * _changeSignal;
public:
\param pref Where to get the string from, and where to put it
when it changes.
*/
- ParamComboBoxEntry (ParamComboBox * pref, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) :
+ ParamComboBoxEntry (ParamComboBox * pref, Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) :
Gtk::ComboBoxText(), _pref(pref), _doc(doc), _node(node), _changeSignal(changeSignal) {
this->signal_changed().connect(sigc::mem_fun(this, &ParamComboBoxEntry::changed));
};
\brief Creates a combobox widget for an enumeration parameter
*/
Gtk::Widget *
-ParamComboBox::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
+ParamComboBox::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
{
if (_gui_hidden) return NULL;
index 11e3a8d97c51b69d9e89a5f355454ff83d95610a..516249c3c3e8f599330e994e0ff87eaad92b2c47 100644 (file)
and \c pref_name() are used.
*/
float
-ParamFloat::set (float in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/)
+ParamFloat::set (float in, Document * /*doc*/, Inkscape::XML::Node * /*node*/)
{
_value = in;
if (_value > _max) _value = _max;
class ParamFloatAdjustment : public Gtk::Adjustment {
/** The parameter to adjust */
ParamFloat * _pref;
- SPDocument * _doc;
+ Document * _doc;
Inkscape::XML::Node * _node;
sigc::signal<void> * _changeSignal;
public:
/** \brief Make the adjustment using an extension and the string
describing the parameter. */
- ParamFloatAdjustment (ParamFloat * param, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) :
+ ParamFloatAdjustment (ParamFloat * param, Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) :
Gtk::Adjustment(0.0, param->min(), param->max(), 0.1, 0), _pref(param), _doc(doc), _node(node), _changeSignal(changeSignal) {
this->set_value(_pref->get(NULL, NULL) /* \todo fix */);
this->signal_value_changed().connect(sigc::mem_fun(this, &ParamFloatAdjustment::val_changed));
Builds a hbox with a label and a float adjustment in it.
*/
Gtk::Widget *
-ParamFloat::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
+ParamFloat::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
{
if (_gui_hidden) return NULL;
index 301d54ed008aa0ff1b9737c10e54bff4f496b71e..2818bb57ba49b0e547c7b2852a39331a30fc9b99 100644 (file)
and \c pref_name() are used.
*/
int
-ParamInt::set (int in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/)
+ParamInt::set (int in, Document * /*doc*/, Inkscape::XML::Node * /*node*/)
{
_value = in;
if (_value > _max) _value = _max;
class ParamIntAdjustment : public Gtk::Adjustment {
/** The parameter to adjust */
ParamInt * _pref;
- SPDocument * _doc;
+ Document * _doc;
Inkscape::XML::Node * _node;
sigc::signal<void> * _changeSignal;
public:
/** \brief Make the adjustment using an extension and the string
describing the parameter. */
- ParamIntAdjustment (ParamInt * param, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) :
+ ParamIntAdjustment (ParamInt * param, Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) :
Gtk::Adjustment(0.0, param->min(), param->max(), 1.0, 0), _pref(param), _doc(doc), _node(node), _changeSignal(changeSignal) {
this->set_value(_pref->get(NULL, NULL) /* \todo fix */);
this->signal_value_changed().connect(sigc::mem_fun(this, &ParamIntAdjustment::val_changed));
Builds a hbox with a label and a int adjustment in it.
*/
Gtk::Widget *
-ParamInt::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
+ParamInt::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
{
if (_gui_hidden) return NULL;
index 1c30b7e0e82ac04acbd8b2e66dc4c8a70d418293..6ad338ffafd69b5215e0dd9bde57a19a4bc22949 100644 (file)
ParamNotebookPage(const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, bool gui_hidden, const gchar * gui_tip, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml);
~ParamNotebookPage(void);
- Gtk::Widget * get_widget(SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
+ Gtk::Widget * get_widget(Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal);
void paramString (std::list <std::string> &list);
gchar * get_guitext (void) {return _text;};
@@ -196,7 +196,7 @@ ParamNotebookPage::makepage (Inkscape::XML::Node * in_repr, Inkscape::Extension:
Builds a notebook page (a vbox) and puts parameters on it.
*/
Gtk::Widget *
-ParamNotebookPage::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
+ParamNotebookPage::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
{
if (_gui_hidden) return NULL;
the passed in value is duplicated using \c g_strdup().
*/
const gchar *
-ParamNotebook::set (const int in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/)
+ParamNotebook::set (const int in, Document * /*doc*/, Inkscape::XML::Node * /*node*/)
{
ParamNotebookPage * page = NULL;
int i = 0;
class ParamNotebookWdg : public Gtk::Notebook {
private:
ParamNotebook * _pref;
- SPDocument * _doc;
+ Document * _doc;
Inkscape::XML::Node * _node;
public:
/** \brief Build a notebookpage preference for the given parameter
\param pref Where to get the string (pagename) from, and where to put it
when it changes.
*/
- ParamNotebookWdg (ParamNotebook * pref, SPDocument * doc, Inkscape::XML::Node * node) :
+ ParamNotebookWdg (ParamNotebook * pref, Document * doc, Inkscape::XML::Node * node) :
Gtk::Notebook(), _pref(pref), _doc(doc), _node(node), activated(false) {
// don't have to set the correct page: this is done in ParamNotebook::get_widget.
// hook function
Builds a notebook and puts pages in it.
*/
Gtk::Widget *
-ParamNotebook::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
+ParamNotebook::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
{
if (_gui_hidden) return NULL;
index 2773af61dde709ad4c9ae3206b00a50392b9e0fa..1094a5d3f894a52b0f644a08460a63259d5b23d9 100644 (file)
@@ -156,7 +156,7 @@ Parameter::make (Inkscape::XML::Node * in_repr, Inkscape::Extension::Extension *
/** \brief Wrapper to cast to the object and use it's function. */
bool
-Parameter::get_bool (const SPDocument * doc, const Inkscape::XML::Node * node)
+Parameter::get_bool (const Document * doc, const Inkscape::XML::Node * node)
{
ParamBool * boolpntr = dynamic_cast<ParamBool *>(this);
if (boolpntr == NULL)
/** \brief Wrapper to cast to the object and use it's function. */
int
-Parameter::get_int (const SPDocument * doc, const Inkscape::XML::Node * node)
+Parameter::get_int (const Document * doc, const Inkscape::XML::Node * node)
{
ParamInt * intpntr = dynamic_cast<ParamInt *>(this);
if (intpntr == NULL)
/** \brief Wrapper to cast to the object and use it's function. */
float
-Parameter::get_float (const SPDocument * doc, const Inkscape::XML::Node * node)
+Parameter::get_float (const Document * doc, const Inkscape::XML::Node * node)
{
ParamFloat * floatpntr = dynamic_cast<ParamFloat *>(this);
if (floatpntr == NULL)
/** \brief Wrapper to cast to the object and use it's function. */
const gchar *
-Parameter::get_string (const SPDocument * doc, const Inkscape::XML::Node * node)
+Parameter::get_string (const Document * doc, const Inkscape::XML::Node * node)
{
ParamString * stringpntr = dynamic_cast<ParamString *>(this);
if (stringpntr == NULL)
@@ -196,7 +196,7 @@ Parameter::get_string (const SPDocument * doc, const Inkscape::XML::Node * node)
/** \brief Wrapper to cast to the object and use it's function. */
const gchar *
-Parameter::get_enum (const SPDocument * doc, const Inkscape::XML::Node * node)
+Parameter::get_enum (const Document * doc, const Inkscape::XML::Node * node)
{
ParamComboBox * param = dynamic_cast<ParamComboBox *>(this);
if (param == NULL)
}
guint32
-Parameter::get_color(const SPDocument* doc, const Inkscape::XML::Node* node)
+Parameter::get_color(const Document* doc, const Inkscape::XML::Node* node)
{
ParamColor* param = dynamic_cast<ParamColor *>(this);
if (param == NULL)
/** \brief Wrapper to cast to the object and use it's function. */
bool
-Parameter::set_bool (bool in, SPDocument * doc, Inkscape::XML::Node * node)
+Parameter::set_bool (bool in, Document * doc, Inkscape::XML::Node * node)
{
ParamBool * boolpntr = dynamic_cast<ParamBool *>(this);
if (boolpntr == NULL)
/** \brief Wrapper to cast to the object and use it's function. */
int
-Parameter::set_int (int in, SPDocument * doc, Inkscape::XML::Node * node)
+Parameter::set_int (int in, Document * doc, Inkscape::XML::Node * node)
{
ParamInt * intpntr = dynamic_cast<ParamInt *>(this);
if (intpntr == NULL)
/** \brief Wrapper to cast to the object and use it's function. */
float
-Parameter::set_float (float in, SPDocument * doc, Inkscape::XML::Node * node)
+Parameter::set_float (float in, Document * doc, Inkscape::XML::Node * node)
{
ParamFloat * floatpntr;
floatpntr = dynamic_cast<ParamFloat *>(this);
/** \brief Wrapper to cast to the object and use it's function. */
const gchar *
-Parameter::set_string (const gchar * in, SPDocument * doc, Inkscape::XML::Node * node)
+Parameter::set_string (const gchar * in, Document * doc, Inkscape::XML::Node * node)
{
ParamString * stringpntr = dynamic_cast<ParamString *>(this);
if (stringpntr == NULL)
@@ -255,7 +255,7 @@ Parameter::set_string (const gchar * in, SPDocument * doc, Inkscape::XML::Node *
}
/** \brief Wrapper to cast to the object and use it's function. */
guint32
-Parameter::set_color (guint32 in, SPDocument * doc, Inkscape::XML::Node * node)
+Parameter::set_color (guint32 in, Document * doc, Inkscape::XML::Node * node)
{
ParamColor* param = dynamic_cast<ParamColor *>(this);
if (param == NULL)
}
Inkscape::XML::Node *
-Parameter::document_param_node (SPDocument * doc)
+Parameter::document_param_node (Document * doc)
{
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
Inkscape::XML::Node * defs = SP_OBJECT_REPR(SP_DOCUMENT_DEFS(doc));
/** \brief Basically, if there is no widget pass a NULL. */
Gtk::Widget *
-Parameter::get_widget (SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * /*changeSignal*/)
+Parameter::get_widget (Document * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * /*changeSignal*/)
{
return NULL;
}
index c17839001f94282b782325bc3f70931189851834..315984e176a4e1111f830d59dfbad947118f62af 100644 (file)
the passed in value is duplicated using \c g_strdup().
*/
const gchar *
-ParamRadioButton::set (const gchar * in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/)
+ParamRadioButton::set (const gchar * in, Document * /*doc*/, Inkscape::XML::Node * /*node*/)
{
if (in == NULL) return NULL; /* Can't have NULL string */
class ParamRadioButtonWdg : public Gtk::RadioButton {
private:
ParamRadioButton * _pref;
- SPDocument * _doc;
+ Document * _doc;
Inkscape::XML::Node * _node;
sigc::signal<void> * _changeSignal;
public:
\param pref Where to put the radiobutton's string when it is selected.
*/
ParamRadioButtonWdg ( Gtk::RadioButtonGroup& group, const Glib::ustring& label,
- ParamRadioButton * pref, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal ) :
+ ParamRadioButton * pref, Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal ) :
Gtk::RadioButton(group, label), _pref(pref), _doc(doc), _node(node), _changeSignal(changeSignal) {
add_changesignal();
};
ParamRadioButtonWdg ( const Glib::ustring& label,
- ParamRadioButton * pref, SPDocument * doc, Inkscape::XML::Node * node , sigc::signal<void> * changeSignal) :
+ ParamRadioButton * pref, Document * doc, Inkscape::XML::Node * node , sigc::signal<void> * changeSignal) :
Gtk::RadioButton(label), _pref(pref), _doc(doc), _node(node), _changeSignal(changeSignal) {
add_changesignal();
};
class ComboWdg : public Gtk::ComboBoxText {
public:
- ComboWdg(ParamRadioButton* base, SPDocument * doc, Inkscape::XML::Node * node) :
+ ComboWdg(ParamRadioButton* base, Document * doc, Inkscape::XML::Node * node) :
Gtk::ComboBoxText(),
base(base),
doc(doc),
protected:
ParamRadioButton* base;
- SPDocument* doc;
+ Document* doc;
Inkscape::XML::Node* node;
virtual void on_changed() {
\brief Creates a combobox widget for an enumeration parameter
*/
Gtk::Widget *
-ParamRadioButton::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
+ParamRadioButton::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
{
if (_gui_hidden) return NULL;
index e32224332e4c53e093ca35c2459fb0b473beea45..6427f6f76ee4ea1487b374c5ad759eb79f016a71 100644 (file)
the passed in value is duplicated using \c g_strdup().
*/
const gchar *
-ParamString::set (const gchar * in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/)
+ParamString::set (const gchar * in, Document * /*doc*/, Inkscape::XML::Node * /*node*/)
{
if (in == NULL) return NULL; /* Can't have NULL string */
class ParamStringEntry : public Gtk::Entry {
private:
ParamString * _pref;
- SPDocument * _doc;
+ Document * _doc;
Inkscape::XML::Node * _node;
sigc::signal<void> * _changeSignal;
public:
\param pref Where to get the string from, and where to put it
when it changes.
*/
- ParamStringEntry (ParamString * pref, SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) :
+ ParamStringEntry (ParamString * pref, Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal) :
Gtk::Entry(), _pref(pref), _doc(doc), _node(node), _changeSignal(changeSignal) {
if (_pref->get(NULL, NULL) != NULL)
this->set_text(Glib::ustring(_pref->get(NULL, NULL)));
Builds a hbox with a label and a text box in it.
*/
Gtk::Widget *
-ParamString::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
+ParamString::get_widget (Document * doc, Inkscape::XML::Node * node, sigc::signal<void> * changeSignal)
{
if (_gui_hidden) return NULL;
index 025bec37a074018d8be728db097d9fe636e5df49..af6a0c516c27f0f39c06be12aed7cc124d6eeea4 100644 (file)
// should be in UTF-*8..
char *about=g_build_filename(INKSCAPE_SCREENSDIR, _("about.svg"), NULL);
- SPDocument *doc=sp_document_new (about, TRUE);
+ Document *doc=sp_document_new (about, TRUE);
g_free(about);
g_return_val_if_fail(doc != NULL, NULL);
index 96cad1fbe6074596d9edfde15ba8a1b44c4f8cae..f69d80fe5ec6c7bb783d2204cca398c07c40f9fb 100644 (file)
}
void
-DocumentMetadata::_handleDocumentReplaced(SPDesktop* desktop, SPDocument *)
+DocumentMetadata::_handleDocumentReplaced(SPDesktop* desktop, Document *)
{
Inkscape::XML::Node *repr = SP_OBJECT_REPR(sp_desktop_namedview(desktop));
repr->addListener (&_repr_events, this);
index 423778276e8fd32752bbe40a0909b0e6225882a3..0e928a9ebec5313c6faf02371f09fcbbd7c3f788 100644 (file)
}
void
-DocumentProperties::_handleDocumentReplaced(SPDesktop* desktop, SPDocument *document)
+DocumentProperties::_handleDocumentReplaced(SPDesktop* desktop, Document *document)
{
Inkscape::XML::Node *repr = SP_OBJECT_REPR(sp_desktop_namedview(desktop));
repr->addListener(&_repr_events, this);
{
SPDesktop *dt = getDesktop();
Inkscape::XML::Node *repr = SP_OBJECT_REPR(sp_desktop_namedview(dt));
- SPDocument *doc = sp_desktop_document(dt);
+ Document *doc = sp_desktop_document(dt);
Glib::ustring typestring = _grids_combo_gridtype.get_active_text();
CanvasGrid::writeNewGridToRepr(repr, doc, CanvasGrid::getGridTypeFromName(typestring.c_str()));
index 70f2f2ae52edbdfd6862a1fa267e5e2fc8341029..30a7e7c2a42908aeb0b7402086839c3ed14f2e4b 100644 (file)
### SVG Preview Widget
#########################################################################*/
-bool SVGPreview::setDocument(SPDocument *doc)
+bool SVGPreview::setDocument(Document *doc)
{
if (document)
sp_document_unref(document);
* I don't know why passing false to keepalive is bad. But it
* prevents the display of an svg with a non-ascii filename
*/
- SPDocument *doc = sp_document_new (fileName.c_str(), true);
+ Document *doc = sp_document_new (fileName.c_str(), true);
if (!doc) {
g_warning("SVGView: error loading document '%s'\n", fileName.c_str());
return false;
return false;
gint len = (gint)strlen(xmlBuffer);
- SPDocument *doc = sp_document_new_from_mem(xmlBuffer, len, 0);
+ Document *doc = sp_document_new_from_mem(xmlBuffer, len, 0);
if (!doc) {
g_warning("SVGView: error loading buffer '%s'\n",xmlBuffer);
return false;
index 0d8f0de5f7c3a1674af6eea74b648ec03b5d829f..4a2cc879d4d1c1f7312225a9a2a6ccb2c240d570 100644 (file)
gchar *utf8string = g_utf16_to_utf8((const gunichar2*)_path_string,
_MAX_PATH, NULL, NULL, NULL);
- SPDocument *svgDoc = sp_document_new (utf8string, true);
+ Document *svgDoc = sp_document_new (utf8string, true);
g_free(utf8string);
// Check the document loaded properly
index baf46970a697948e0f0ef64c3474ba68bee1e74b..026af2c9f48ee5a533e29d8e97c953a45bc471ef 100644 (file)
@@ -1222,7 +1222,7 @@ void FilterEffectsDialog::FilterModifier::on_selection_toggled(const Glib::ustri
if(iter) {
SPDesktop *desktop = _dialog.getDesktop();
- SPDocument *doc = sp_desktop_document(desktop);
+ Document *doc = sp_desktop_document(desktop);
SPFilter* filter = (*iter)[_columns.filter];
Inkscape::Selection *sel = sp_desktop_selection(desktop);
@@ -1255,7 +1255,7 @@ void FilterEffectsDialog::FilterModifier::on_selection_toggled(const Glib::ustri
void FilterEffectsDialog::FilterModifier::update_filters()
{
SPDesktop* desktop = _dialog.getDesktop();
- SPDocument* document = sp_desktop_document(desktop);
+ Document* document = sp_desktop_document(desktop);
const GSList* filters = sp_document_get_resource_list(document, "filter");
_model->clear();
@@ -1310,7 +1310,7 @@ void FilterEffectsDialog::FilterModifier::filter_list_button_release(GdkEventBut
void FilterEffectsDialog::FilterModifier::add_filter()
{
- SPDocument* doc = sp_desktop_document(_dialog.getDesktop());
+ Document* doc = sp_desktop_document(_dialog.getDesktop());
SPFilter* filter = new_filter(doc);
const int count = _model->children().size();
SPFilter *filter = get_selected_filter();
if(filter) {
- SPDocument* doc = filter->document;
+ Document* doc = filter->document;
sp_repr_unparent(filter->repr);
sp_document_done(doc, SP_VERB_DIALOG_FILTER_EFFECTS, _("Remove filter"));
index 3a7964ba250e47bdb5546191bd5c0ae3fc9e9a64..2d7f7cb5beb782553eb78bc4f06aef2435e31b24 100644 (file)
--- a/src/ui/dialog/guides.cpp
+++ b/src/ui/dialog/guides.cpp
void GuidelinePropertiesDialog::_onDelete()
{
- SPDocument *doc = SP_OBJECT_DOCUMENT(_guide);
+ Document *doc = SP_OBJECT_DOCUMENT(_guide);
sp_guide_remove(_guide);
sp_document_done(doc, SP_VERB_NONE,
_("Delete guide"));
index 336afc3c563f872c291358b76640062f05741678..1490e5b73dec7b771709ec2f62b2c7f0d6231136 100644 (file)
extern "C" {
// takes doc, root, icon, and icon name to produce pixels
guchar *
-sp_icon_doc_icon( SPDocument *doc, NRArenaItem *root,
+sp_icon_doc_icon( Document *doc, NRArenaItem *root,
const gchar *name, unsigned int psize );
}
void IconPreviewPanel::renderPreview( SPObject* obj )
{
- SPDocument * doc = SP_OBJECT_DOCUMENT(obj);
+ Document * doc = SP_OBJECT_DOCUMENT(obj);
gchar * id = SP_OBJECT_ID(obj);
// g_message(" setting up to render '%s' as the icon", id );
index fa47ad88d979da656760262a406f588f284442c3..0298042ef438e40918e956765dc2817f9d3b530d 100644 (file)
--- a/src/ui/dialog/layers.cpp
+++ b/src/ui/dialog/layers.cpp
@@ -349,7 +349,7 @@ bool LayersPanel::_checkForSelected(const Gtk::TreePath &path, const Gtk::TreeIt
void LayersPanel::_layersChanged()
{
// g_message("_layersChanged()");
- SPDocument* document = _desktop->doc();
+ Document* document = _desktop->doc();
SPObject* root = document->root;
if ( root ) {
_selectedConnection.block();
}
}
-void LayersPanel::_addLayer( SPDocument* doc, SPObject* layer, Gtk::TreeModel::Row* parentRow, SPObject* target, int level )
+void LayersPanel::_addLayer( Document* doc, SPObject* layer, Gtk::TreeModel::Row* parentRow, SPObject* target, int level )
{
if ( layer && (level < _maxNestDepth) ) {
unsigned int counter = _mgr->childCount(layer);
index dd2dc8250a4002b6ea5aa1bf54bbccced15af259..bea8a096ebbb16f6503265a28cbffaa2c9c50e8b 100644 (file)
if ( sel && !sel->isEmpty() ) {
SPItem *item = sel->singleItem();
if ( item && SP_IS_LPE_ITEM(item) ) {
- SPDocument *doc = current_desktop->doc();
+ Document *doc = current_desktop->doc();
const Util::EnumData<LivePathEffect::EffectType>* data = combo_effecttype.get_active_data();
if (!data) return;
index d15773ecb9fa31aab81f794d2591bb720a57091b..198495f74365931bb57957a6ada52afbb26567bc 100644 (file)
--- a/src/ui/dialog/print.cpp
+++ b/src/ui/dialog/print.cpp
namespace UI {
namespace Dialog {
-Print::Print(SPDocument *doc, SPItem *base) :
+Print::Print(Document *doc, SPItem *base) :
_doc (doc),
_base (base)
{
index 5f86196b1f71e88994d912cc3160f54127d86232..64ea0787761adec7f3f5de721e95af690b0ca651 100644 (file)
void SvgFontsDialog::on_kerning_value_changed(){
if (!this->kerning_pair) return;
- SPDocument* document = sp_desktop_document(this->getDesktop());
+ Document* document = sp_desktop_document(this->getDesktop());
//TODO: I am unsure whether this is the correct way of calling sp_document_maybe_done
Glib::ustring undokey = "svgfonts:hkern:k:";
void SvgFontsDialog::update_fonts()
{
SPDesktop* desktop = this->getDesktop();
- SPDocument* document = sp_desktop_document(desktop);
+ Document* document = sp_desktop_document(desktop);
const GSList* fonts = sp_document_get_resource_list(document, "font");
_model->clear();
}
}
-SPGlyph *new_glyph(SPDocument* document, SPFont *font, const int count)
+SPGlyph *new_glyph(Document* document, SPFont *font, const int count)
{
g_return_val_if_fail(font != NULL, NULL);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document);
void SvgFontsDialog::add_glyph(){
const int count = _GlyphsListStore->children().size();
- SPDocument* doc = sp_desktop_document(this->getDesktop());
+ Document* doc = sp_desktop_document(this->getDesktop());
/* SPGlyph* glyph =*/ new_glyph(doc, get_selected_spfont(), count+1);
sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Add glyph"));
}
Inkscape::MessageStack *msgStack = sp_desktop_message_stack(desktop);
- SPDocument* doc = sp_desktop_document(desktop);
+ Document* doc = sp_desktop_document(desktop);
Inkscape::Selection* sel = sp_desktop_selection(desktop);
if (sel->isEmpty()){
char *msg = _("Select a <b>path</b> to define the curves of a glyph");
}
Inkscape::MessageStack *msgStack = sp_desktop_message_stack(desktop);
- SPDocument* doc = sp_desktop_document(desktop);
+ Document* doc = sp_desktop_document(desktop);
Inkscape::Selection* sel = sp_desktop_selection(desktop);
if (sel->isEmpty()){
char *msg = _("Select a <b>path</b> to define the curves of a glyph");
return;
}
- SPDocument* doc = sp_desktop_document(desktop);
+ Document* doc = sp_desktop_document(desktop);
SPObject* obj;
for (obj = get_selected_spfont()->children; obj; obj=obj->next){
if (SP_IS_MISSING_GLYPH(obj)){
SPGlyph* glyph = (*i)[_GlyphsListColumns.glyph_node];
glyph->repr->setAttribute("glyph-name", str.c_str());
- SPDocument* doc = sp_desktop_document(this->getDesktop());
+ Document* doc = sp_desktop_document(this->getDesktop());
sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Edit glyph name"));
update_glyphs();
@@ -594,7 +594,7 @@ void SvgFontsDialog::glyph_unicode_edit(const Glib::ustring&, const Glib::ustrin
SPGlyph* glyph = (*i)[_GlyphsListColumns.glyph_node];
glyph->repr->setAttribute("unicode", str.c_str());
- SPDocument* doc = sp_desktop_document(this->getDesktop());
+ Document* doc = sp_desktop_document(this->getDesktop());
sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Set glyph unicode"));
update_glyphs();
SPFont* font = get_selected_spfont();
sp_repr_unparent(font->repr);
- SPDocument* doc = sp_desktop_document(this->getDesktop());
+ Document* doc = sp_desktop_document(this->getDesktop());
sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Remove font"));
update_fonts();
SPGlyph* glyph = (*i)[_GlyphsListColumns.glyph_node];
sp_repr_unparent(glyph->repr);
- SPDocument* doc = sp_desktop_document(this->getDesktop());
+ Document* doc = sp_desktop_document(this->getDesktop());
sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Remove glyph"));
update_glyphs();
SPGlyphKerning* pair = (*i)[_KerningPairsListColumns.spnode];
sp_repr_unparent(pair->repr);
- SPDocument* doc = sp_desktop_document(this->getDesktop());
+ Document* doc = sp_desktop_document(this->getDesktop());
sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Remove kerning pair"));
update_glyphs();
if (this->kerning_pair) return; //We already have this kerning pair
- SPDocument* document = sp_desktop_document(this->getDesktop());
+ Document* document = sp_desktop_document(this->getDesktop());
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document);
// create a new hkern node
return &kerning_vbox;
}
-SPFont *new_font(SPDocument *document)
+SPFont *new_font(Document *document)
{
g_return_val_if_fail(document != NULL, NULL);
}
void SvgFontsDialog::add_font(){
- SPDocument* doc = sp_desktop_document(this->getDesktop());
+ Document* doc = sp_desktop_document(this->getDesktop());
SPFont* font = new_font(doc);
const int count = _model->children().size();
index e273a827c4c4e6211e3cab52ed5d0a9fceb42a7d..cdd479e9dc4b03c7f149264bb9adc79562a78803 100644 (file)
if ( bounceTarget ) {
SwatchesPanel* swp = bounceTarget->ptr ? reinterpret_cast<SwatchesPanel*>(bounceTarget->ptr) : 0;
SPDesktop* desktop = swp ? swp->getDesktop() : 0;
- SPDocument *doc = desktop ? desktop->doc() : 0;
+ Document *doc = desktop ? desktop->doc() : 0;
if (doc) {
std::string targetName(bounceTarget->def.descr);
const GSList *gradients = sp_document_get_resource_list(doc, "gradient");
if ( bounceTarget ) {
SwatchesPanel* swp = bounceTarget->ptr ? reinterpret_cast<SwatchesPanel*>(bounceTarget->ptr) : 0;
SPDesktop* desktop = swp ? swp->getDesktop() : 0;
- SPDocument *doc = desktop ? desktop->doc() : 0;
+ Document *doc = desktop ? desktop->doc() : 0;
if (doc) {
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
{
}
-static bool bruteForce( SPDocument* document, Inkscape::XML::Node* node, Glib::ustring const& match, int r, int g, int b )
+static bool bruteForce( Document* document, Inkscape::XML::Node* node, Glib::ustring const& match, int r, int g, int b )
{
bool changed = false;
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if ( desktop ) {
- SPDocument* document = sp_desktop_document( desktop );
+ Document* document = sp_desktop_document( desktop );
Inkscape::XML::Node *rroot = sp_document_repr_root( document );
if ( rroot ) {
_currentDesktop->connectToolSubselectionChanged(
sigc::hide(sigc::mem_fun(*this, &SwatchesPanel::_updateFromSelection)));
- sigc::bound_mem_functor1<void, Inkscape::UI::Dialogs::SwatchesPanel, SPDocument*> first = sigc::mem_fun(*this, &SwatchesPanel::_setDocument);
- sigc::slot<void, SPDocument*> base2 = first;
- sigc::slot<void,SPDesktop*, SPDocument*> slot2 = sigc::hide<0>( base2 );
+ sigc::bound_mem_functor1<void, Inkscape::UI::Dialogs::SwatchesPanel, Document*> first = sigc::mem_fun(*this, &SwatchesPanel::_setDocument);
+ sigc::slot<void, Document*> base2 = first;
+ sigc::slot<void,SPDesktop*, Document*> slot2 = sigc::hide<0>( base2 );
_documentConnection = desktop->connectDocumentReplaced( slot2 );
_setDocument( desktop->doc() );
}
}
-void SwatchesPanel::_setDocument( SPDocument *document )
+void SwatchesPanel::_setDocument( Document *document )
{
if ( document != _currentDocument ) {
if ( _currentDocument ) {
index 756f4df73a72f0f6d651a5296e97ca0982a627c0..9619380bbdd5e74659a756d9d4be2de56b40e28c 100644 (file)
namespace UI {
namespace View {
-EditWidget::EditWidget (SPDocument *doc)
+EditWidget::EditWidget (Document *doc)
: _main_window_table(4),
_viewport_table(3,3),
_act_grp(Gtk::ActionGroup::create()),
if (Inkscape::NSApplication::Editor::isDuplicatedView (_desktop))
return false;
- SPDocument *doc = _desktop->doc();
+ Document *doc = _desktop->doc();
if (doc->isModifiedSinceSave()) {
gchar *markup;
/// \todo FIXME !!! obviously this will have problems if the document
_update_s_f = true;
/* The desktop region we always show unconditionally */
- SPDocument *doc = _desktop->doc();
+ Document *doc = _desktop->doc();
Geom::Rect darea ( Geom::Point(-sp_document_width(doc), -sp_document_height(doc)),
Geom::Point(2 * sp_document_width(doc), 2 * sp_document_height(doc)) );
SPObject* root = doc->root;
}
void
-EditWidget::initEdit (SPDocument *doc)
+EditWidget::initEdit (Document *doc)
{
_desktop = new SPDesktop();
_desktop->registerEditWidget (this);
diff --git a/src/ui/view/view.cpp b/src/ui/view/view.cpp
index 1b498a846ec018112149d37bbeb6dd1ce5ded556..07bb6d2c134427801da9b26c7db82f5bd3c1aa0e 100644 (file)
--- a/src/ui/view/view.cpp
+++ b/src/ui/view/view.cpp
*
* \param doc The new document to connect the view to.
*/
-void View::setDocument(SPDocument *doc) {
+void View::setDocument(Document *doc) {
g_return_if_fail(doc != NULL);
if (_doc) {
index e9f09f574c9deb5109f7967d3dd5cdcd05d06f81..f42b2976002f0e871f06cf8856cb08cffbe0f998 100644 (file)
}
void
-EntityLineEntry::update (SPDocument *doc)
+EntityLineEntry::update (Document *doc)
{
const char *text = rdf_get_work_entity (doc, _entity);
static_cast<Gtk::Entry*>(_packable)->set_text (text ? text : "");
if (_wr->isUpdating()) return;
_wr->setUpdating (true);
- SPDocument *doc = SP_ACTIVE_DOCUMENT;
+ Document *doc = SP_ACTIVE_DOCUMENT;
Glib::ustring text = static_cast<Gtk::Entry*>(_packable)->get_text();
if (rdf_set_work_entity (doc, _entity, text.c_str()))
sp_document_done (doc, SP_VERB_NONE,
}
void
-EntityMultiLineEntry::update (SPDocument *doc)
+EntityMultiLineEntry::update (Document *doc)
{
const char *text = rdf_get_work_entity (doc, _entity);
Gtk::ScrolledWindow *s = static_cast<Gtk::ScrolledWindow*>(_packable);
if (_wr->isUpdating()) return;
_wr->setUpdating (true);
- SPDocument *doc = SP_ACTIVE_DOCUMENT;
+ Document *doc = SP_ACTIVE_DOCUMENT;
Gtk::ScrolledWindow *s = static_cast<Gtk::ScrolledWindow*>(_packable);
Gtk::TextView *tv = static_cast<Gtk::TextView*>(s->get_child());
Glib::ustring text = tv->get_buffer()->get_text();
index 6a817e30d8918417f8334472643599b7620af46a..ead32b4b7ba4a35aac6adb6be0930c862afc7329 100644 (file)
}
-bool ImageIcon::showSvgDocument(const SPDocument *docArg)
+bool ImageIcon::showSvgDocument(const Document *docArg)
{
if (document)
sp_document_unref(document);
- SPDocument *doc = (SPDocument *)docArg;
+ Document *doc = (Document *)docArg;
sp_document_ref(doc);
document = doc;
fileName = Glib::filename_to_utf8(fileName);
- SPDocument *doc = sp_document_new (fileName.c_str(), 0);
+ Document *doc = sp_document_new (fileName.c_str(), 0);
if (!doc) {
g_warning("SVGView: error loading document '%s'\n", fileName.c_str());
return false;
return false;
gint len = (gint)strlen(xmlBuffer);
- SPDocument *doc = sp_document_new_from_mem(xmlBuffer, len, 0);
+ Document *doc = sp_document_new_from_mem(xmlBuffer, len, 0);
if (!doc) {
g_warning("SVGView: error loading buffer '%s'\n",xmlBuffer);
return false;
index a5f1d89be02b6ab48a6965c650270bef7e4dfd4e..778fbc6ccde887645b7dd1863c5f45f1f2bac3a7 100644 (file)
}
void
-Licensor::update (SPDocument *doc)
+Licensor::update (Document *doc)
{
/* identify the license info */
struct rdf_license_t * license = rdf_get_license (doc);
diff --git a/src/ui/widget/object-composite-settings.cpp b/src/ui/widget/object-composite-settings.cpp
index bfc291bc02a3e69435a2219e31a2b9ffbaf02b03..1b425114386c43c3c6cda419625e9f8e80e22a4d 100644 (file)
if (!desktop) {
return;
}
- SPDocument *document = sp_desktop_document (desktop);
+ Document *document = sp_desktop_document (desktop);
if (_blocked)
return;
index 02688a55e67ac6370c31ba744e2027915ec07596..429442779e546f3d9c816dc771e5ae9376388d48 100644 (file)
_changedh_connection.block();
if (SP_ACTIVE_DESKTOP && !_widgetRegistry->isUpdating()) {
- SPDocument *doc = sp_desktop_document(SP_ACTIVE_DESKTOP);
+ Document *doc = sp_desktop_document(SP_ACTIVE_DESKTOP);
double const old_height = sp_document_height(doc);
sp_document_set_width (doc, w, &_px_unit);
sp_document_set_height (doc, h, &_px_unit);
index 93a950d1a4da33f18c860d48b86fe4cc9097ca3d..c2fafa00106385990b3728d8ada51e8b05c466b2 100644 (file)
--- a/src/ui/widget/panel.cpp
+++ b/src/ui/widget/panel.cpp
_response_map[response_id]->set_sensitive(setting);
}
-sigc::signal<void, SPDesktop *, SPDocument *> &
+sigc::signal<void, SPDesktop *, Document *> &
Panel::signalDocumentReplaced()
{
return _signal_document_replaced;
index 95ddec286c4a8641d0dcacb5bb3988fa22a5b330..5780f74ed69aa0ee074f62327a4021a393bb0a6a 100644 (file)
_toggled_connection.disconnect();
}
-RegisteredCheckButton::RegisteredCheckButton (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Registry& wr, bool right, Inkscape::XML::Node* repr_in, SPDocument *doc_in)
+RegisteredCheckButton::RegisteredCheckButton (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Registry& wr, bool right, Inkscape::XML::Node* repr_in, Document *doc_in)
: RegisteredWidget<Gtk::CheckButton>()
{
init_parent(key, wr, repr_in, doc_in);
_changed_connection.disconnect();
}
-RegisteredUnitMenu::RegisteredUnitMenu (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, Document *doc_in)
: RegisteredWidget<Labelled> (label, "" /*tooltip*/, new UnitMenu())
{
init_parent(key, wr, repr_in, doc_in);
_value_changed_connection.disconnect();
}
-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)
+RegisteredScalarUnit::RegisteredScalarUnit (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, const RegisteredUnitMenu &rum, Registry& wr, Inkscape::XML::Node* repr_in, Document *doc_in)
: RegisteredWidget<ScalarUnit>(label, tip, UNIT_TYPE_LINEAR, "", "", rum.getUnitMenu()),
_um(0)
{
RegisteredScalar::RegisteredScalar ( const Glib::ustring& label, const Glib::ustring& tip,
const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in,
- SPDocument * doc_in )
+ Document * doc_in )
: RegisteredWidget<Scalar>(label, tip)
{
init_parent(key, wr, repr_in, doc_in);
RegisteredText::RegisteredText ( const Glib::ustring& label, const Glib::ustring& tip,
const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in,
- SPDocument * doc_in )
+ Document * doc_in )
: RegisteredWidget<Text>(label, tip)
{
init_parent(key, wr, repr_in, doc_in);
const Glib::ustring& akey,
Registry& wr,
Inkscape::XML::Node* repr_in,
- SPDocument *doc_in)
+ Document *doc_in)
: RegisteredWidget<ColorPicker> (title, tip, 0, true)
{
init_parent("", wr, repr_in, doc_in);
// 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;
+ Document *local_doc = doc;
if (!local_repr) {
// no repr specified, use active desktop's namedview's repr
SPDesktop *dt = SP_ACTIVE_DESKTOP;
_changed_connection.disconnect();
}
-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)
+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, Document *doc_in)
: RegisteredWidget<Scalar>(label, tip, 0, suffix),
setProgrammatically(false)
{
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)
+ const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, Document *doc_in)
: RegisteredWidget<Gtk::HBox>(),
_rb1(NULL),
_rb2(NULL)
RegisteredPoint::RegisteredPoint ( const Glib::ustring& label, const Glib::ustring& tip,
const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in,
- SPDocument* doc_in )
+ Document* doc_in )
: RegisteredWidget<Point> (label, tip)
{
init_parent(key, wr, repr_in, doc_in);
RegisteredTransformedPoint::RegisteredTransformedPoint ( const Glib::ustring& label, const Glib::ustring& tip,
const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in,
- SPDocument* doc_in )
+ Document* doc_in )
: RegisteredWidget<Point> (label, tip),
to_svg(Geom::identity())
{
RegisteredRandom::RegisteredRandom ( const Glib::ustring& label, const Glib::ustring& tip,
const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in,
- SPDocument * doc_in )
+ Document * doc_in )
: RegisteredWidget<Random> (label, tip)
{
init_parent(key, wr, repr_in, doc_in);
index 3a36127f4d74bd733e271621fd91642bf2a9b2be..bc5b459792f782f44489f7804f4eda04c573fc15 100644 (file)
_wr->setUpdating (true);
- SPDocument *doc = sp_desktop_document(dt);
+ Document *doc = sp_desktop_document(dt);
bool saved = sp_document_get_undo_sensitive (doc);
sp_document_set_undo_sensitive (doc, false);
Inkscape::XML::Node *repr = SP_OBJECT_REPR (sp_desktop_namedview(dt));