diff options
| author | Markus Engel <markus.engel@tum.de> | 2013-03-29 23:56:13 +0000 |
|---|---|---|
| committer | Markus Engel <markus.engel@tum.de> | 2013-03-29 23:56:13 +0000 |
| commit | 7df6616da5ea2debb86838366ddf746841549cdb (patch) | |
| tree | 4557bc8c1950fe5c0f9e6063bd261f4a5c6ec5da | |
| parent | merged from trunk (diff) | |
| download | inkscape-7df6616da5ea2debb86838366ddf746841549cdb.tar.gz inkscape-7df6616da5ea2debb86838366ddf746841549cdb.zip | |
Renamed virtual function names.
(bzr r11608.1.57)
158 files changed, 1609 insertions, 1609 deletions
diff --git a/src/box3d-side.cpp b/src/box3d-side.cpp index ec09b60f3..c2672d89a 100644 --- a/src/box3d-side.cpp +++ b/src/box3d-side.cpp @@ -58,16 +58,16 @@ box3d_side_init (Box3DSide * side) side->front_or_rear = Box3D::FRONT; } -void CBox3DSide::onBuild(SPDocument * document, Inkscape::XML::Node * repr) { +void CBox3DSide::build(SPDocument * document, Inkscape::XML::Node * repr) { Box3DSide* object = this->spbox3dside; - CPolygon::onBuild(document, repr); + CPolygon::build(document, repr); object->readAttr( "inkscape:box3dsidetype" ); } -Inkscape::XML::Node* CBox3DSide::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CBox3DSide::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { Box3DSide* object = this->spbox3dside; Box3DSide *side = object; @@ -93,12 +93,12 @@ Inkscape::XML::Node* CBox3DSide::onWrite(Inkscape::XML::Document *xml_doc, Inksc repr->setAttribute("d", d); g_free (d); - CPolygon::onWrite(xml_doc, repr, flags); + CPolygon::write(xml_doc, repr, flags); return repr; } -void CBox3DSide::onSet(unsigned int key, const gchar* value) { +void CBox3DSide::set(unsigned int key, const gchar* value) { Box3DSide* object = this->spbox3dside; Box3DSide *side = object; @@ -125,12 +125,12 @@ void CBox3DSide::onSet(unsigned int key, const gchar* value) { } break; default: - CPolygon::onSet(key, value); + CPolygon::set(key, value); break; } } -void CBox3DSide::onUpdate(SPCtx* ctx, guint flags) { +void CBox3DSide::update(SPCtx* ctx, guint flags) { Box3DSide* object = this->spbox3dside; if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) { @@ -143,7 +143,7 @@ void CBox3DSide::onUpdate(SPCtx* ctx, guint flags) { static_cast<SPShape *>(object)->setShape (); } - CPolygon::onUpdate(ctx, flags); + CPolygon::update(ctx, flags); } @@ -169,13 +169,13 @@ int Box3DSide::getFaceId() void box3d_side_position_set (Box3DSide *side) { - side->cbox3dside->onSetShape(); + side->cbox3dside->set_shape(); // This call is responsible for live update of the sides during the initial drag side->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); } -void CBox3DSide::onSetShape() { +void CBox3DSide::set_shape() { Box3DSide* shape = this->spbox3dside; Box3DSide *side = shape; diff --git a/src/box3d-side.h b/src/box3d-side.h index efe68a057..930e797ad 100644 --- a/src/box3d-side.h +++ b/src/box3d-side.h @@ -48,12 +48,12 @@ public: CBox3DSide(Box3DSide* box3dside); virtual ~CBox3DSide(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onSet(unsigned int key, gchar const* value); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - virtual void onUpdate(SPCtx *ctx, guint flags); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void set(unsigned int key, gchar const* value); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual void update(SPCtx *ctx, guint flags); - virtual void onSetShape(); + virtual void set_shape(); protected: Box3DSide* spbox3dside; diff --git a/src/box3d.cpp b/src/box3d.cpp index df338c688..a7e6b0538 100644 --- a/src/box3d.cpp +++ b/src/box3d.cpp @@ -71,10 +71,10 @@ box3d_init(SPBox3D *box) box->persp_ref = new Persp3DReference(box); } -void CBox3D::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CBox3D::build(SPDocument *document, Inkscape::XML::Node *repr) { SPBox3D* object = this->spbox3d; - CGroup::onBuild(document, repr); + CGroup::build(document, repr); SPBox3D *box = SP_BOX3D (object); box->my_counter = counter++; @@ -96,7 +96,7 @@ void CBox3D::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { } } -void CBox3D::onRelease() { +void CBox3D::release() { SPBox3D* object = this->spbox3d; SPBox3D *box = object; @@ -131,10 +131,10 @@ void CBox3D::onRelease() { */ } - CGroup::onRelease(); + CGroup::release(); } -void CBox3D::onSet(unsigned int key, const gchar* value) { +void CBox3D::set(unsigned int key, const gchar* value) { SPBox3D* object = this->spbox3d; SPBox3D *box = object; @@ -181,7 +181,7 @@ void CBox3D::onSet(unsigned int key, const gchar* value) { } break; default: - CGroup::onSet(key, value); + CGroup::set(key, value); break; } } @@ -202,7 +202,7 @@ box3d_ref_changed(SPObject *old_ref, SPObject *ref, SPBox3D *box) } } -void CBox3D::onUpdate(SPCtx *ctx, guint flags) { +void CBox3D::update(SPCtx *ctx, guint flags) { if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) { /* FIXME?: Perhaps the display updates of box sides should be instantiated from here, but this @@ -212,10 +212,10 @@ void CBox3D::onUpdate(SPCtx *ctx, guint flags) { } // Invoke parent method - CGroup::onUpdate(ctx, flags); + CGroup::update(ctx, flags); } -Inkscape::XML::Node* CBox3D::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CBox3D::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPBox3D* object = this->spbox3d; SPBox3D *box = object; @@ -257,12 +257,12 @@ Inkscape::XML::Node* CBox3D::onWrite(Inkscape::XML::Document *xml_doc, Inkscape: box->save_corner7 = box->orig_corner7; } - CGroup::onWrite(xml_doc, repr, flags); + CGroup::write(xml_doc, repr, flags); return repr; } -gchar* CBox3D::onDescription() { +gchar* CBox3D::description() { SPBox3D* item = this->spbox3d; g_return_val_if_fail(SP_IS_BOX3D(item), NULL); @@ -280,7 +280,7 @@ void box3d_position_set(SPBox3D *box) } } -Geom::Affine CBox3D::onSetTransform(Geom::Affine const &xform) { +Geom::Affine CBox3D::set_transform(Geom::Affine const &xform) { SPBox3D* item = this->spbox3d; SPBox3D *box = item; @@ -1341,7 +1341,7 @@ box3d_push_back_corner_pair(SPBox3D *box, std::list<std::pair<Geom::Point, Geom: box3d_get_corner_screen(box, c2, false))); } -void CBox3D::onConvertToGuides() { +void CBox3D::convert_to_guides() { SPBox3D* item = this->spbox3d; SPBox3D *box = item; diff --git a/src/box3d.h b/src/box3d.h index 3fb867982..133cfd1c8 100644 --- a/src/box3d.h +++ b/src/box3d.h @@ -66,15 +66,15 @@ public: CBox3D(SPBox3D* box3d); virtual ~CBox3D(); - virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); - virtual void onRelease(); - virtual void onSet(unsigned int key, gchar const* value); - virtual void onUpdate(SPCtx *ctx, guint flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - - virtual gchar *onDescription(); - virtual Geom::Affine onSetTransform(Geom::Affine const &transform); - virtual void onConvertToGuides(); + virtual void build(SPDocument *document, Inkscape::XML::Node *repr); + virtual void release(); + virtual void set(unsigned int key, gchar const* value); + virtual void update(SPCtx *ctx, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + + virtual gchar *description(); + virtual Geom::Affine set_transform(Geom::Affine const &transform); + virtual void convert_to_guides(); protected: SPBox3D* spbox3d; diff --git a/src/color-profile.cpp b/src/color-profile.cpp index ca44ad49f..a2810d22c 100644 --- a/src/color-profile.cpp +++ b/src/color-profile.cpp @@ -250,7 +250,7 @@ void ColorProfile::init( ColorProfile *cprof ) /** * Callback: free object */ -void CColorProfile::onRelease() { +void CColorProfile::release() { ColorProfile* object = this->colorprofile; // Unregister ourselves @@ -314,7 +314,7 @@ void ColorProfileImpl::_clearProfile() /** * Callback: set attributes from associated repr. */ -void CColorProfile::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CColorProfile::build(SPDocument *document, Inkscape::XML::Node *repr) { ColorProfile* object = this->colorprofile; ColorProfile *cprof = COLORPROFILE(object); @@ -323,7 +323,7 @@ void CColorProfile::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { g_assert(cprof->name == 0); g_assert(cprof->intentStr == 0); - CObject::onBuild(document, repr); + CObject::build(document, repr); object->readAttr( "xlink:href" ); object->readAttr( "local" ); @@ -340,7 +340,7 @@ void CColorProfile::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { /** * Callback: set attribute. */ -void CColorProfile::onSet(unsigned key, gchar const *value) { +void CColorProfile::set(unsigned key, gchar const *value) { ColorProfile* object = this->colorprofile; ColorProfile *cprof = COLORPROFILE(object); @@ -451,7 +451,7 @@ void CColorProfile::onSet(unsigned key, gchar const *value) { break; default: - CObject::onSet(key, value); + CObject::set(key, value); break; } } @@ -459,7 +459,7 @@ void CColorProfile::onSet(unsigned key, gchar const *value) { /** * Callback: write attributes to associated repr. */ -Inkscape::XML::Node* CColorProfile::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CColorProfile::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { ColorProfile* object = this->colorprofile; ColorProfile *cprof = COLORPROFILE(object); @@ -484,7 +484,7 @@ Inkscape::XML::Node* CColorProfile::onWrite(Inkscape::XML::Document *xml_doc, In repr->setAttribute( "rendering-intent", cprof->intentStr ); } - CObject::onWrite(xml_doc, repr, flags); + CObject::write(xml_doc, repr, flags); return repr; } diff --git a/src/color-profile.h b/src/color-profile.h index 4a07e4c98..92184d826 100644 --- a/src/color-profile.h +++ b/src/color-profile.h @@ -78,12 +78,12 @@ public: CColorProfile(ColorProfile* cp); virtual ~CColorProfile(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); private: ColorProfile* colorprofile; diff --git a/src/filters/blend.cpp b/src/filters/blend.cpp index e58e186f6..b0704e23d 100644 --- a/src/filters/blend.cpp +++ b/src/filters/blend.cpp @@ -62,12 +62,12 @@ sp_feBlend_init(SPFeBlend *feBlend) * our name must be associated with a repr via "sp_object_type_register". Best done through * sp-object-repr.cpp's repr_name_entries array. */ -void CFeBlend::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CFeBlend::build(SPDocument *document, Inkscape::XML::Node *repr) { SPFeBlend* object = this->spfeblend; SPFeBlend *blend = SP_FEBLEND(object); - CFilterPrimitive::onBuild(document, repr); + CFilterPrimitive::build(document, repr); /*LOAD ATTRIBUTES FROM REPR HERE*/ object->readAttr( "mode" ); @@ -87,8 +87,8 @@ void CFeBlend::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { /** * Drops any allocated memory. */ -void CFeBlend::onRelease() { - CFilterPrimitive::onRelease(); +void CFeBlend::release() { + CFilterPrimitive::release(); } static Inkscape::Filters::FilterBlendMode sp_feBlend_readmode(gchar const *value) @@ -125,7 +125,7 @@ static Inkscape::Filters::FilterBlendMode sp_feBlend_readmode(gchar const *value /** * Sets a specific value in the SPFeBlend. */ -void CFeBlend::onSet(unsigned int key, gchar const *value) { +void CFeBlend::set(unsigned int key, gchar const *value) { SPFeBlend* object = this->spfeblend; SPFeBlend *feBlend = SP_FEBLEND(object); @@ -150,7 +150,7 @@ void CFeBlend::onSet(unsigned int key, gchar const *value) { } break; default: - CFilterPrimitive::onSet(key, value); + CFilterPrimitive::set(key, value); break; } } @@ -158,7 +158,7 @@ void CFeBlend::onSet(unsigned int key, gchar const *value) { /** * Receives update notifications. */ -void CFeBlend::onUpdate(SPCtx *ctx, guint flags) { +void CFeBlend::update(SPCtx *ctx, guint flags) { SPFeBlend* object = this->spfeblend; SPFeBlend *blend = SP_FEBLEND(object); @@ -180,13 +180,13 @@ void CFeBlend::onUpdate(SPCtx *ctx, guint flags) { object->getRepr()->setAttribute("in2", sp_filter_name_for_image(parent, blend->in2)); } - CFilterPrimitive::onUpdate(ctx, flags); + CFilterPrimitive::update(ctx, flags); } /** * Writes its settings to an incoming repr object, if any. */ -Inkscape::XML::Node* CFeBlend::onWrite(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CFeBlend::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { SPFeBlend* object = this->spfeblend; SPFeBlend *blend = SP_FEBLEND(object); @@ -227,12 +227,12 @@ Inkscape::XML::Node* CFeBlend::onWrite(Inkscape::XML::Document *doc, Inkscape::X } repr->setAttribute("mode", mode); - CFilterPrimitive::onWrite(doc, repr, flags); + CFilterPrimitive::write(doc, repr, flags); return repr; } -void CFeBlend::onBuildRenderer(Inkscape::Filters::Filter* filter) { +void CFeBlend::build_renderer(Inkscape::Filters::Filter* filter) { SPFeBlend* primitive = this->spfeblend; g_assert(primitive != NULL); diff --git a/src/filters/blend.h b/src/filters/blend.h index 5ab56f4fd..cd0326eb4 100644 --- a/src/filters/blend.h +++ b/src/filters/blend.h @@ -41,16 +41,16 @@ public: CFeBlend(SPFeBlend* blend); virtual ~CFeBlend(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); - virtual void onBuildRenderer(Inkscape::Filters::Filter* filter); + virtual void build_renderer(Inkscape::Filters::Filter* filter); private: SPFeBlend* spfeblend; diff --git a/src/filters/colormatrix.cpp b/src/filters/colormatrix.cpp index 356d50be7..d4e65bdc1 100644 --- a/src/filters/colormatrix.cpp +++ b/src/filters/colormatrix.cpp @@ -59,8 +59,8 @@ sp_feColorMatrix_init(SPFeColorMatrix *feColorMatrix) * our name must be associated with a repr via "sp_object_type_register". Best done through * sp-object-repr.cpp's repr_name_entries array. */ -void CFeColorMatrix::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { - CFilterPrimitive::onBuild(document, repr); +void CFeColorMatrix::build(SPDocument *document, Inkscape::XML::Node *repr) { + CFilterPrimitive::build(document, repr); SPFeColorMatrix* object = this->spfecolormatrix; @@ -72,8 +72,8 @@ void CFeColorMatrix::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { /** * Drops any allocated memory. */ -void CFeColorMatrix::onRelease() { - CFilterPrimitive::onRelease(); +void CFeColorMatrix::release() { + CFilterPrimitive::release(); } static Inkscape::Filters::FilterColorMatrixType sp_feColorMatrix_read_type(gchar const *value){ @@ -98,7 +98,7 @@ static Inkscape::Filters::FilterColorMatrixType sp_feColorMatrix_read_type(gchar /** * Sets a specific value in the SPFeColorMatrix. */ -void CFeColorMatrix::onSet(unsigned int key, gchar const *str) { +void CFeColorMatrix::set(unsigned int key, gchar const *str) { SPFeColorMatrix* object = this->spfecolormatrix; SPFeColorMatrix *feColorMatrix = SP_FECOLORMATRIX(object); @@ -122,7 +122,7 @@ void CFeColorMatrix::onSet(unsigned int key, gchar const *str) { } break; default: - CFilterPrimitive::onSet(key, str); + CFilterPrimitive::set(key, str); break; } } @@ -130,7 +130,7 @@ void CFeColorMatrix::onSet(unsigned int key, gchar const *str) { /** * Receives update notifications. */ -void CFeColorMatrix::onUpdate(SPCtx *ctx, guint flags) { +void CFeColorMatrix::update(SPCtx *ctx, guint flags) { SPFeColorMatrix* object = this->spfecolormatrix; if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | @@ -140,13 +140,13 @@ void CFeColorMatrix::onUpdate(SPCtx *ctx, guint flags) { } - CFilterPrimitive::onUpdate(ctx, flags); + CFilterPrimitive::update(ctx, flags); } /** * Writes its settings to an incoming repr object, if any. */ -Inkscape::XML::Node* CFeColorMatrix::onWrite(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CFeColorMatrix::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { SPFeColorMatrix* object = this->spfecolormatrix; /* TODO: Don't just clone, but create a new repr node and write all @@ -155,12 +155,12 @@ Inkscape::XML::Node* CFeColorMatrix::onWrite(Inkscape::XML::Document *doc, Inksc repr = object->getRepr()->duplicate(doc); } - CFilterPrimitive::onWrite(doc, repr, flags); + CFilterPrimitive::write(doc, repr, flags); return repr; } -void CFeColorMatrix::onBuildRenderer(Inkscape::Filters::Filter* filter) { +void CFeColorMatrix::build_renderer(Inkscape::Filters::Filter* filter) { SPFeColorMatrix* primitive = this->spfecolormatrix; g_assert(primitive != NULL); diff --git a/src/filters/colormatrix.h b/src/filters/colormatrix.h index eeb4db7ac..2ce1da06a 100644 --- a/src/filters/colormatrix.h +++ b/src/filters/colormatrix.h @@ -41,16 +41,16 @@ public: CFeColorMatrix(SPFeColorMatrix* matrix); virtual ~CFeColorMatrix(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); - virtual void onBuildRenderer(Inkscape::Filters::Filter* filter); + virtual void build_renderer(Inkscape::Filters::Filter* filter); private: SPFeColorMatrix* spfecolormatrix; diff --git a/src/filters/componenttransfer-funcnode.cpp b/src/filters/componenttransfer-funcnode.cpp index 835c525c1..f1015eced 100644 --- a/src/filters/componenttransfer-funcnode.cpp +++ b/src/filters/componenttransfer-funcnode.cpp @@ -158,8 +158,8 @@ sp_fefuncnode_init(SPFeFuncNode *fefuncnode) * our name must be associated with a repr via "sp_object_type_register". Best done through * sp-object-repr.cpp's repr_name_entries array. */ -void CFeFuncNode::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { - CObject::onBuild(document, repr); +void CFeFuncNode::build(SPDocument *document, Inkscape::XML::Node *repr) { + CObject::build(document, repr); SPFeFuncNode* object = this->spfefuncnode; @@ -180,7 +180,7 @@ void CFeFuncNode::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { /** * Drops any allocated memory. */ -void CFeFuncNode::onRelease() { +void CFeFuncNode::release() { SPFeFuncNode* object = this->spfefuncnode; //SPFeFuncNode *fefuncnode = SP_FEFUNCNODE(object); @@ -217,7 +217,7 @@ static Inkscape::Filters::FilterComponentTransferType sp_feComponenttransfer_rea /** * Sets a specific value in the SPFeFuncNode. */ -void CFeFuncNode::onSet(unsigned int key, gchar const *value) { +void CFeFuncNode::set(unsigned int key, gchar const *value) { SPFeFuncNode* object = this->spfefuncnode; SPFeFuncNode *feFuncNode = SP_FEFUNCNODE(object); @@ -275,7 +275,7 @@ void CFeFuncNode::onSet(unsigned int key, gchar const *value) { default: // if (((SPObjectClass *) feFuncNode_parent_class)->set) // ((SPObjectClass *) feFuncNode_parent_class)->set(object, key, value); - CObject::onSet(key, value); + CObject::set(key, value); break; } } @@ -283,7 +283,7 @@ void CFeFuncNode::onSet(unsigned int key, gchar const *value) { /** * * Receives update notifications. * */ -void CFeFuncNode::onUpdate(SPCtx *ctx, guint flags) { +void CFeFuncNode::update(SPCtx *ctx, guint flags) { SPFeFuncNode* object = this->spfefuncnode; SPFeFuncNode *feFuncNode = SP_FEFUNCNODE(object); @@ -296,13 +296,13 @@ void CFeFuncNode::onUpdate(SPCtx *ctx, guint flags) { //object->readAttr( "elevation" ); } - CObject::onUpdate(ctx, flags); + CObject::update(ctx, flags); } /** * Writes its settings to an incoming repr object, if any. */ -Inkscape::XML::Node* CFeFuncNode::onWrite(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CFeFuncNode::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { SPFeFuncNode* object = this->spfefuncnode; SPFeFuncNode *fefuncnode = SP_FEFUNCNODE(object); @@ -319,7 +319,7 @@ TODO: I'm not sure what to do here... if (fefuncnode->elevation_set) sp_repr_set_css_double(repr, "elevation", fefuncnode->elevation);*/ - CObject::onWrite(doc, repr, flags); + CObject::write(doc, repr, flags); return repr; } diff --git a/src/filters/componenttransfer-funcnode.h b/src/filters/componenttransfer-funcnode.h index 4b6fa423a..674074353 100644 --- a/src/filters/componenttransfer-funcnode.h +++ b/src/filters/componenttransfer-funcnode.h @@ -54,14 +54,14 @@ public: CFeFuncNode(SPFeFuncNode* funcnode); virtual ~CFeFuncNode(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); private: SPFeFuncNode* spfefuncnode; diff --git a/src/filters/componenttransfer.cpp b/src/filters/componenttransfer.cpp index 8b470dcff..d94198506 100644 --- a/src/filters/componenttransfer.cpp +++ b/src/filters/componenttransfer.cpp @@ -57,8 +57,8 @@ sp_feComponentTransfer_init(SPFeComponentTransfer *feComponentTransfer) * our name must be associated with a repr via "sp_object_type_register". Best done through * sp-object-repr.cpp's repr_name_entries array. */ -void CFeComponentTransfer::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { - CFilterPrimitive::onBuild(document, repr); +void CFeComponentTransfer::build(SPDocument *document, Inkscape::XML::Node *repr) { + CFilterPrimitive::build(document, repr); /*LOAD ATTRIBUTES FROM REPR HERE*/ @@ -102,12 +102,12 @@ static void sp_feComponentTransfer_children_modified(SPFeComponentTransfer *sp_c /** * Callback for child_added event. */ -void CFeComponentTransfer::onChildAdded(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { +void CFeComponentTransfer::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { SPFeComponentTransfer* object = this->spfecomponenttransfer; SPFeComponentTransfer *f = SP_FECOMPONENTTRANSFER(object); - CFilterPrimitive::onChildAdded(child, ref); + CFilterPrimitive::child_added(child, ref); sp_feComponentTransfer_children_modified(f); object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG); @@ -116,12 +116,12 @@ void CFeComponentTransfer::onChildAdded(Inkscape::XML::Node *child, Inkscape::XM /** * Callback for remove_child event. */ -void CFeComponentTransfer::onRemoveChild(Inkscape::XML::Node *child) { +void CFeComponentTransfer::remove_child(Inkscape::XML::Node *child) { SPFeComponentTransfer* object = this->spfecomponenttransfer; SPFeComponentTransfer *f = SP_FECOMPONENTTRANSFER(object); - CFilterPrimitive::onRemoveChild(child); + CFilterPrimitive::remove_child(child); sp_feComponentTransfer_children_modified(f); object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG); @@ -130,14 +130,14 @@ void CFeComponentTransfer::onRemoveChild(Inkscape::XML::Node *child) { /** * Drops any allocated memory. */ -void CFeComponentTransfer::onRelease() { - CFilterPrimitive::onRelease(); +void CFeComponentTransfer::release() { + CFilterPrimitive::release(); } /** * Sets a specific value in the SPFeComponentTransfer. */ -void CFeComponentTransfer::onSet(unsigned int key, gchar const *value) { +void CFeComponentTransfer::set(unsigned int key, gchar const *value) { SPFeComponentTransfer* object = this->spfecomponenttransfer; SPFeComponentTransfer *feComponentTransfer = SP_FECOMPONENTTRANSFER(object); @@ -146,7 +146,7 @@ void CFeComponentTransfer::onSet(unsigned int key, gchar const *value) { switch(key) { /*DEAL WITH SETTING ATTRIBUTES HERE*/ default: - CFilterPrimitive::onSet(key, value); + CFilterPrimitive::set(key, value); break; } } @@ -154,7 +154,7 @@ void CFeComponentTransfer::onSet(unsigned int key, gchar const *value) { /** * Receives update notifications. */ -void CFeComponentTransfer::onUpdate(SPCtx *ctx, guint flags) { +void CFeComponentTransfer::update(SPCtx *ctx, guint flags) { SPFeComponentTransfer* object = this->spfecomponenttransfer; if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | @@ -164,13 +164,13 @@ void CFeComponentTransfer::onUpdate(SPCtx *ctx, guint flags) { } - CFilterPrimitive::onUpdate(ctx, flags); + CFilterPrimitive::update(ctx, flags); } /** * Writes its settings to an incoming repr object, if any. */ -Inkscape::XML::Node* CFeComponentTransfer::onWrite(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CFeComponentTransfer::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { SPFeComponentTransfer* object = this->spfecomponenttransfer; /* TODO: Don't just clone, but create a new repr node and write all @@ -179,12 +179,12 @@ Inkscape::XML::Node* CFeComponentTransfer::onWrite(Inkscape::XML::Document *doc, repr = object->getRepr()->duplicate(doc); } - CFilterPrimitive::onWrite(doc, repr, flags); + CFilterPrimitive::write(doc, repr, flags); return repr; } -void CFeComponentTransfer::onBuildRenderer(Inkscape::Filters::Filter* filter) { +void CFeComponentTransfer::build_renderer(Inkscape::Filters::Filter* filter) { SPFeComponentTransfer* primitive = this->spfecomponenttransfer; g_assert(primitive != NULL); diff --git a/src/filters/componenttransfer.h b/src/filters/componenttransfer.h index 823b85bdd..e46f228bc 100644 --- a/src/filters/componenttransfer.h +++ b/src/filters/componenttransfer.h @@ -42,19 +42,19 @@ public: CFeComponentTransfer(SPFeComponentTransfer* tr); virtual ~CFeComponentTransfer(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); - virtual void onRemoveChild(Inkscape::XML::Node* child); + virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); + virtual void remove_child(Inkscape::XML::Node* child); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); - virtual void onBuildRenderer(Inkscape::Filters::Filter* filter); + virtual void build_renderer(Inkscape::Filters::Filter* filter); private: SPFeComponentTransfer* spfecomponenttransfer; diff --git a/src/filters/composite.cpp b/src/filters/composite.cpp index d1769f649..1d065da77 100644 --- a/src/filters/composite.cpp +++ b/src/filters/composite.cpp @@ -62,10 +62,10 @@ sp_feComposite_init(SPFeComposite *feComposite) * our name must be associated with a repr via "sp_object_type_register". Best done through * sp-object-repr.cpp's repr_name_entries array. */ -void CFeComposite::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CFeComposite::build(SPDocument *document, Inkscape::XML::Node *repr) { SPFeComposite* object = this->spfecomposite; - CFilterPrimitive::onBuild(document, repr); + CFilterPrimitive::build(document, repr); SPFeComposite *comp = SP_FECOMPOSITE(object); @@ -92,8 +92,8 @@ void CFeComposite::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { /** * Drops any allocated memory. */ -void CFeComposite::onRelease() { - CFilterPrimitive::onRelease(); +void CFeComposite::release() { + CFilterPrimitive::release(); } static FeCompositeOperator @@ -112,7 +112,7 @@ sp_feComposite_read_operator(gchar const *value) { /** * Sets a specific value in the SPFeComposite. */ -void CFeComposite::onSet(unsigned int key, gchar const *value) { +void CFeComposite::set(unsigned int key, gchar const *value) { SPFeComposite* object = this->spfecomposite; SPFeComposite *feComposite = SP_FECOMPOSITE(object); @@ -176,7 +176,7 @@ void CFeComposite::onSet(unsigned int key, gchar const *value) { break; default: - CFilterPrimitive::onSet(key, value); + CFilterPrimitive::set(key, value); break; } } @@ -185,7 +185,7 @@ void CFeComposite::onSet(unsigned int key, gchar const *value) { * Receives update notifications. */ void -CFeComposite::onUpdate(SPCtx *ctx, guint flags) { +CFeComposite::update(SPCtx *ctx, guint flags) { SPFeComposite* object = this->spfecomposite; SPFeComposite *comp = SP_FECOMPOSITE(object); @@ -209,13 +209,13 @@ CFeComposite::onUpdate(SPCtx *ctx, guint flags) { object->getRepr()->setAttribute("in2", sp_filter_name_for_image(parent, comp->in2)); } - CFilterPrimitive::onUpdate(ctx, flags); + CFilterPrimitive::update(ctx, flags); } /** * Writes its settings to an incoming repr object, if any. */ -Inkscape::XML::Node* CFeComposite::onWrite(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CFeComposite::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { SPFeComposite* object = this->spfecomposite; SPFeComposite *comp = SP_FECOMPOSITE(object); @@ -270,12 +270,12 @@ Inkscape::XML::Node* CFeComposite::onWrite(Inkscape::XML::Document *doc, Inkscap repr->setAttribute("k4", 0); } - CFilterPrimitive::onWrite(doc, repr, flags); + CFilterPrimitive::write(doc, repr, flags); return repr; } -void CFeComposite::onBuildRenderer(Inkscape::Filters::Filter* filter) { +void CFeComposite::build_renderer(Inkscape::Filters::Filter* filter) { SPFeComposite* primitive = this->spfecomposite; g_assert(primitive != NULL); diff --git a/src/filters/composite.h b/src/filters/composite.h index 263580d9b..780e84e20 100644 --- a/src/filters/composite.h +++ b/src/filters/composite.h @@ -52,16 +52,16 @@ public: CFeComposite(SPFeComposite* comp); virtual ~CFeComposite(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); - virtual void onBuildRenderer(Inkscape::Filters::Filter* filter); + virtual void build_renderer(Inkscape::Filters::Filter* filter); private: SPFeComposite* spfecomposite; diff --git a/src/filters/convolvematrix.cpp b/src/filters/convolvematrix.cpp index 09099d43d..a25c4621e 100644 --- a/src/filters/convolvematrix.cpp +++ b/src/filters/convolvematrix.cpp @@ -70,8 +70,8 @@ sp_feConvolveMatrix_init(SPFeConvolveMatrix *feConvolveMatrix) * our name must be associated with a repr via "sp_object_type_register". Best done through * sp-object-repr.cpp's repr_name_entries array. */ -void CFeConvolveMatrix::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { - CFilterPrimitive::onBuild(document, repr); +void CFeConvolveMatrix::build(SPDocument *document, Inkscape::XML::Node *repr) { + CFilterPrimitive::build(document, repr); SPFeConvolveMatrix* object = this->spfeconvolvematrix; @@ -90,8 +90,8 @@ void CFeConvolveMatrix::onBuild(SPDocument *document, Inkscape::XML::Node *repr) /** * Drops any allocated memory. */ -void CFeConvolveMatrix::onRelease() { - CFilterPrimitive::onRelease(); +void CFeConvolveMatrix::release() { + CFilterPrimitive::release(); } static Inkscape::Filters::FilterConvolveMatrixEdgeMode sp_feConvolveMatrix_read_edgeMode(gchar const *value){ @@ -113,7 +113,7 @@ static Inkscape::Filters::FilterConvolveMatrixEdgeMode sp_feConvolveMatrix_read_ /** * Sets a specific value in the SPFeConvolveMatrix. */ -void CFeConvolveMatrix::onSet(unsigned int key, gchar const *value) { +void CFeConvolveMatrix::set(unsigned int key, gchar const *value) { SPFeConvolveMatrix* object = this->spfeconvolvematrix; SPFeConvolveMatrix *feConvolveMatrix = SP_FECONVOLVEMATRIX(object); @@ -229,7 +229,7 @@ void CFeConvolveMatrix::onSet(unsigned int key, gchar const *value) { } break; default: - CFilterPrimitive::onSet(key, value); + CFilterPrimitive::set(key, value); break; } @@ -238,7 +238,7 @@ void CFeConvolveMatrix::onSet(unsigned int key, gchar const *value) { /** * Receives update notifications. */ -void CFeConvolveMatrix::onUpdate(SPCtx *ctx, guint flags) { +void CFeConvolveMatrix::update(SPCtx *ctx, guint flags) { SPFeConvolveMatrix* object = this->spfeconvolvematrix; if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | @@ -248,13 +248,13 @@ void CFeConvolveMatrix::onUpdate(SPCtx *ctx, guint flags) { } - CFilterPrimitive::onUpdate(ctx, flags); + CFilterPrimitive::update(ctx, flags); } /** * Writes its settings to an incoming repr object, if any. */ -Inkscape::XML::Node* CFeConvolveMatrix::onWrite(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CFeConvolveMatrix::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { SPFeConvolveMatrix* object = this->spfeconvolvematrix; /* TODO: Don't just clone, but create a new repr node and write all @@ -264,12 +264,12 @@ Inkscape::XML::Node* CFeConvolveMatrix::onWrite(Inkscape::XML::Document *doc, In } - CFilterPrimitive::onWrite(doc, repr, flags); + CFilterPrimitive::write(doc, repr, flags); return repr; } -void CFeConvolveMatrix::onBuildRenderer(Inkscape::Filters::Filter* filter) { +void CFeConvolveMatrix::build_renderer(Inkscape::Filters::Filter* filter) { SPFeConvolveMatrix* primitive = this->spfeconvolvematrix; g_assert(primitive != NULL); diff --git a/src/filters/convolvematrix.h b/src/filters/convolvematrix.h index 7513fcd40..6b00bb9e2 100644 --- a/src/filters/convolvematrix.h +++ b/src/filters/convolvematrix.h @@ -53,16 +53,16 @@ public: CFeConvolveMatrix(SPFeConvolveMatrix* matrix); virtual ~CFeConvolveMatrix(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); - virtual void onBuildRenderer(Inkscape::Filters::Filter* filter); + virtual void build_renderer(Inkscape::Filters::Filter* filter); private: SPFeConvolveMatrix* spfeconvolvematrix; diff --git a/src/filters/diffuselighting.cpp b/src/filters/diffuselighting.cpp index c6c476efb..621c36e1a 100644 --- a/src/filters/diffuselighting.cpp +++ b/src/filters/diffuselighting.cpp @@ -77,8 +77,8 @@ sp_feDiffuseLighting_init(SPFeDiffuseLighting *feDiffuseLighting) * our name must be associated with a repr via "sp_object_type_register". Best done through * sp-object-repr.cpp's repr_name_entries array. */ -void CFeDiffuseLighting::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { - CFilterPrimitive::onBuild(document, repr); +void CFeDiffuseLighting::build(SPDocument *document, Inkscape::XML::Node *repr) { + CFilterPrimitive::build(document, repr); SPFeDiffuseLighting* object = this->spfediffuselighting; @@ -92,14 +92,14 @@ void CFeDiffuseLighting::onBuild(SPDocument *document, Inkscape::XML::Node *repr /** * Drops any allocated memory. */ -void CFeDiffuseLighting::onRelease() { - CFilterPrimitive::onRelease(); +void CFeDiffuseLighting::release() { + CFilterPrimitive::release(); } /** * Sets a specific value in the SPFeDiffuseLighting. */ -void CFeDiffuseLighting::onSet(unsigned int key, gchar const *value) { +void CFeDiffuseLighting::set(unsigned int key, gchar const *value) { SPFeDiffuseLighting* object = this->spfediffuselighting; SPFeDiffuseLighting *feDiffuseLighting = SP_FEDIFFUSELIGHTING(object); @@ -181,7 +181,7 @@ void CFeDiffuseLighting::onSet(unsigned int key, gchar const *value) { object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG); break; default: - CFilterPrimitive::onSet(key, value); + CFilterPrimitive::set(key, value); break; } } @@ -189,7 +189,7 @@ void CFeDiffuseLighting::onSet(unsigned int key, gchar const *value) { /** * Receives update notifications. */ -void CFeDiffuseLighting::onUpdate(SPCtx *ctx, guint flags) { +void CFeDiffuseLighting::update(SPCtx *ctx, guint flags) { SPFeDiffuseLighting* object = this->spfediffuselighting; if (flags & (SP_OBJECT_MODIFIED_FLAG)) { @@ -199,13 +199,13 @@ void CFeDiffuseLighting::onUpdate(SPCtx *ctx, guint flags) { object->readAttr( "lighting-color" ); } - CFilterPrimitive::onUpdate(ctx, flags); + CFilterPrimitive::update(ctx, flags); } /** * Writes its settings to an incoming repr object, if any. */ -Inkscape::XML::Node* CFeDiffuseLighting::onWrite(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CFeDiffuseLighting::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { SPFeDiffuseLighting* object = this->spfediffuselighting; SPFeDiffuseLighting *fediffuselighting = SP_FEDIFFUSELIGHTING(object); @@ -233,7 +233,7 @@ Inkscape::XML::Node* CFeDiffuseLighting::onWrite(Inkscape::XML::Document *doc, I } else repr->setAttribute("lighting-color", NULL); - CFilterPrimitive::onWrite(doc, repr, flags); + CFilterPrimitive::write(doc, repr, flags); return repr; } @@ -241,12 +241,12 @@ Inkscape::XML::Node* CFeDiffuseLighting::onWrite(Inkscape::XML::Document *doc, I /** * Callback for child_added event. */ -void CFeDiffuseLighting::onChildAdded(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { +void CFeDiffuseLighting::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { SPFeDiffuseLighting* object = this->spfediffuselighting; SPFeDiffuseLighting *f = SP_FEDIFFUSELIGHTING(object); - CFilterPrimitive::onChildAdded(child, ref); + CFilterPrimitive::child_added(child, ref); sp_feDiffuseLighting_children_modified(f); object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG); @@ -255,22 +255,22 @@ void CFeDiffuseLighting::onChildAdded(Inkscape::XML::Node *child, Inkscape::XML: /** * Callback for remove_child event. */ -void CFeDiffuseLighting::onRemoveChild(Inkscape::XML::Node *child) { +void CFeDiffuseLighting::remove_child(Inkscape::XML::Node *child) { SPFeDiffuseLighting* object = this->spfediffuselighting; SPFeDiffuseLighting *f = SP_FEDIFFUSELIGHTING(object); - CFilterPrimitive::onRemoveChild(child); + CFilterPrimitive::remove_child(child); sp_feDiffuseLighting_children_modified(f); object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG); } -void CFeDiffuseLighting::onOrderChanged(Inkscape::XML::Node *child, Inkscape::XML::Node *old_ref, Inkscape::XML::Node *new_ref) { +void CFeDiffuseLighting::order_changed(Inkscape::XML::Node *child, Inkscape::XML::Node *old_ref, Inkscape::XML::Node *new_ref) { SPFeDiffuseLighting* object = this->spfediffuselighting; SPFeDiffuseLighting *f = SP_FEDIFFUSELIGHTING(object); - CFilterPrimitive::onOrderChanged(child, old_ref, new_ref); + CFilterPrimitive::order_changed(child, old_ref, new_ref); sp_feDiffuseLighting_children_modified(f); object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG); @@ -295,7 +295,7 @@ static void sp_feDiffuseLighting_children_modified(SPFeDiffuseLighting *sp_diffu } } -void CFeDiffuseLighting::onBuildRenderer(Inkscape::Filters::Filter* filter) { +void CFeDiffuseLighting::build_renderer(Inkscape::Filters::Filter* filter) { SPFeDiffuseLighting* primitive = this->spfediffuselighting; g_assert(primitive != NULL); diff --git a/src/filters/diffuselighting.h b/src/filters/diffuselighting.h index c4dc78e71..3bfe7e4f5 100644 --- a/src/filters/diffuselighting.h +++ b/src/filters/diffuselighting.h @@ -54,21 +54,21 @@ public: CFeDiffuseLighting(SPFeDiffuseLighting* dl); virtual ~CFeDiffuseLighting(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); - virtual void onRemoveChild(Inkscape::XML::Node* child); + virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); + virtual void remove_child(Inkscape::XML::Node* child); - virtual void onOrderChanged(Inkscape::XML::Node* child, Inkscape::XML::Node* old_repr, Inkscape::XML::Node* new_repr); + virtual void order_changed(Inkscape::XML::Node* child, Inkscape::XML::Node* old_repr, Inkscape::XML::Node* new_repr); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); - virtual void onBuildRenderer(Inkscape::Filters::Filter* filter); + virtual void build_renderer(Inkscape::Filters::Filter* filter); private: SPFeDiffuseLighting* spfediffuselighting; diff --git a/src/filters/displacementmap.cpp b/src/filters/displacementmap.cpp index 6fdbbf79c..1f82efcef 100644 --- a/src/filters/displacementmap.cpp +++ b/src/filters/displacementmap.cpp @@ -60,10 +60,10 @@ sp_feDisplacementMap_init(SPFeDisplacementMap *feDisplacementMap) * our name must be associated with a repr via "sp_object_type_register". Best done through * sp-object-repr.cpp's repr_name_entries array. */ -void CFeDisplacementMap::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CFeDisplacementMap::build(SPDocument *document, Inkscape::XML::Node *repr) { SPFeDisplacementMap* object = this->spfedisplacementmap; - CFilterPrimitive::onBuild(document, repr); + CFilterPrimitive::build(document, repr); /*LOAD ATTRIBUTES FROM REPR HERE*/ object->readAttr( "scale" ); @@ -86,8 +86,8 @@ void CFeDisplacementMap::onBuild(SPDocument *document, Inkscape::XML::Node *repr /** * Drops any allocated memory. */ -void CFeDisplacementMap::onRelease() { - CFilterPrimitive::onRelease(); +void CFeDisplacementMap::release() { + CFilterPrimitive::release(); } static FilterDisplacementMapChannelSelector sp_feDisplacementMap_readChannelSelector(gchar const *value) @@ -117,7 +117,7 @@ static FilterDisplacementMapChannelSelector sp_feDisplacementMap_readChannelSele /** * Sets a specific value in the SPFeDisplacementMap. */ -void CFeDisplacementMap::onSet(unsigned int key, gchar const *value) { +void CFeDisplacementMap::set(unsigned int key, gchar const *value) { SPFeDisplacementMap* object = this->spfedisplacementmap; SPFeDisplacementMap *feDisplacementMap = SP_FEDISPLACEMENTMAP(object); @@ -156,7 +156,7 @@ void CFeDisplacementMap::onSet(unsigned int key, gchar const *value) { } break; default: - CFilterPrimitive::onSet(key, value); + CFilterPrimitive::set(key, value); break; } } @@ -164,7 +164,7 @@ void CFeDisplacementMap::onSet(unsigned int key, gchar const *value) { /** * Receives update notifications. */ -void CFeDisplacementMap::onUpdate(SPCtx *ctx, guint flags) { +void CFeDisplacementMap::update(SPCtx *ctx, guint flags) { SPFeDisplacementMap* object = this->spfedisplacementmap; if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | @@ -187,7 +187,7 @@ void CFeDisplacementMap::onUpdate(SPCtx *ctx, guint flags) { object->getRepr()->setAttribute("in2", sp_filter_name_for_image(parent, disp->in2)); } - CFilterPrimitive::onUpdate(ctx, flags); + CFilterPrimitive::update(ctx, flags); } static char const * get_channelselector_name(FilterDisplacementMapChannelSelector selector) { @@ -208,7 +208,7 @@ static char const * get_channelselector_name(FilterDisplacementMapChannelSelecto /** * Writes its settings to an incoming repr object, if any. */ -Inkscape::XML::Node* CFeDisplacementMap::onWrite(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CFeDisplacementMap::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { SPFeDisplacementMap* object = this->spfedisplacementmap; SPFeDisplacementMap *disp = SP_FEDISPLACEMENTMAP(object); @@ -238,12 +238,12 @@ Inkscape::XML::Node* CFeDisplacementMap::onWrite(Inkscape::XML::Document *doc, I repr->setAttribute("yChannelSelector", get_channelselector_name(disp->yChannelSelector)); - CFilterPrimitive::onWrite(doc, repr, flags); + CFilterPrimitive::write(doc, repr, flags); return repr; } -void CFeDisplacementMap::onBuildRenderer(Inkscape::Filters::Filter* filter) { +void CFeDisplacementMap::build_renderer(Inkscape::Filters::Filter* filter) { SPFeDisplacementMap* primitive = this->spfedisplacementmap; g_assert(primitive != NULL); diff --git a/src/filters/displacementmap.h b/src/filters/displacementmap.h index 609142dc0..a2eac1ecf 100644 --- a/src/filters/displacementmap.h +++ b/src/filters/displacementmap.h @@ -49,16 +49,16 @@ public: CFeDisplacementMap(SPFeDisplacementMap* map); virtual ~CFeDisplacementMap(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); - virtual void onBuildRenderer(Inkscape::Filters::Filter* filter); + virtual void build_renderer(Inkscape::Filters::Filter* filter); private: SPFeDisplacementMap* spfedisplacementmap; diff --git a/src/filters/distantlight.cpp b/src/filters/distantlight.cpp index b8cf632a1..30cbb03fe 100644 --- a/src/filters/distantlight.cpp +++ b/src/filters/distantlight.cpp @@ -62,8 +62,8 @@ sp_fedistantlight_init(SPFeDistantLight *fedistantlight) * our name must be associated with a repr via "sp_object_type_register". Best done through * sp-object-repr.cpp's repr_name_entries array. */ -void CFeDistantLight::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { - CObject::onBuild(document, repr); +void CFeDistantLight::build(SPDocument *document, Inkscape::XML::Node *repr) { + CObject::build(document, repr); SPFeDistantLight* object = this->spfedistantlight; @@ -78,7 +78,7 @@ void CFeDistantLight::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { /** * Drops any allocated memory. */ -void CFeDistantLight::onRelease() { +void CFeDistantLight::release() { SPFeDistantLight* object = this->spfedistantlight; //SPFeDistantLight *fedistantlight = SP_FEDISTANTLIGHT(object); @@ -94,7 +94,7 @@ void CFeDistantLight::onRelease() { /** * Sets a specific value in the SPFeDistantLight. */ -void CFeDistantLight::onSet(unsigned int key, gchar const *value) { +void CFeDistantLight::set(unsigned int key, gchar const *value) { SPFeDistantLight* object = this->spfedistantlight; SPFeDistantLight *fedistantlight = SP_FEDISTANTLIGHT(object); gchar *end_ptr; @@ -137,7 +137,7 @@ void CFeDistantLight::onSet(unsigned int key, gchar const *value) { break; default: // See if any parents need this value. - CObject::onSet(key, value); + CObject::set(key, value); break; } } @@ -145,7 +145,7 @@ void CFeDistantLight::onSet(unsigned int key, gchar const *value) { /** * * Receives update notifications. * */ -void CFeDistantLight::onUpdate(SPCtx *ctx, guint flags) { +void CFeDistantLight::update(SPCtx *ctx, guint flags) { SPFeDistantLight* object = this->spfedistantlight; SPFeDistantLight *feDistantLight = SP_FEDISTANTLIGHT(object); (void)feDistantLight; @@ -156,13 +156,13 @@ void CFeDistantLight::onUpdate(SPCtx *ctx, guint flags) { object->readAttr( "elevation" ); } - CObject::onUpdate(ctx, flags); + CObject::update(ctx, flags); } /** * Writes its settings to an incoming repr object, if any. */ -Inkscape::XML::Node* CFeDistantLight::onWrite(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CFeDistantLight::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { SPFeDistantLight* object = this->spfedistantlight; SPFeDistantLight *fedistantlight = SP_FEDISTANTLIGHT(object); @@ -175,7 +175,7 @@ Inkscape::XML::Node* CFeDistantLight::onWrite(Inkscape::XML::Document *doc, Inks if (fedistantlight->elevation_set) sp_repr_set_css_double(repr, "elevation", fedistantlight->elevation); - CObject::onWrite(doc, repr, flags); + CObject::write(doc, repr, flags); return repr; } diff --git a/src/filters/distantlight.h b/src/filters/distantlight.h index 78de7e8cf..e0fa3b1c2 100644 --- a/src/filters/distantlight.h +++ b/src/filters/distantlight.h @@ -44,14 +44,14 @@ public: CFeDistantLight(SPFeDistantLight* distantlight); virtual ~CFeDistantLight(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); private: SPFeDistantLight* spfedistantlight; diff --git a/src/filters/flood.cpp b/src/filters/flood.cpp index 8400e7e21..7c780b5ca 100644 --- a/src/filters/flood.cpp +++ b/src/filters/flood.cpp @@ -58,8 +58,8 @@ static void sp_feFlood_init(SPFeFlood *feFlood) * our name must be associated with a repr via "sp_object_type_register". Best done through * sp-object-repr.cpp's repr_name_entries array. */ -void CFeFlood::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { - CFilterPrimitive::onBuild(document, repr); +void CFeFlood::build(SPDocument *document, Inkscape::XML::Node *repr) { + CFilterPrimitive::build(document, repr); SPFeFlood* object = this->spfeflood; @@ -71,14 +71,14 @@ void CFeFlood::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { /** * Drops any allocated memory. */ -void CFeFlood::onRelease() { - CFilterPrimitive::onRelease(); +void CFeFlood::release() { + CFilterPrimitive::release(); } /** * Sets a specific value in the SPFeFlood. */ -void CFeFlood::onSet(unsigned int key, gchar const *value) { +void CFeFlood::set(unsigned int key, gchar const *value) { SPFeFlood* object = this->spfeflood; SPFeFlood *feFlood = SP_FEFLOOD(object); @@ -137,7 +137,7 @@ void CFeFlood::onSet(unsigned int key, gchar const *value) { } break; default: - CFilterPrimitive::onSet(key, value); + CFilterPrimitive::set(key, value); break; } } @@ -145,7 +145,7 @@ void CFeFlood::onSet(unsigned int key, gchar const *value) { /** * Receives update notifications. */ -void CFeFlood::onUpdate(SPCtx *ctx, guint flags) { +void CFeFlood::update(SPCtx *ctx, guint flags) { SPFeFlood* object = this->spfeflood; if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | @@ -155,13 +155,13 @@ void CFeFlood::onUpdate(SPCtx *ctx, guint flags) { } - CFilterPrimitive::onUpdate(ctx, flags); + CFilterPrimitive::update(ctx, flags); } /** * Writes its settings to an incoming repr object, if any. */ -Inkscape::XML::Node* CFeFlood::onWrite(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CFeFlood::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { SPFeFlood* object = this->spfeflood; /* TODO: Don't just clone, but create a new repr node and write all @@ -170,12 +170,12 @@ Inkscape::XML::Node* CFeFlood::onWrite(Inkscape::XML::Document *doc, Inkscape::X repr = object->getRepr()->duplicate(doc); } - CFilterPrimitive::onWrite(doc, repr, flags); + CFilterPrimitive::write(doc, repr, flags); return repr; } -void CFeFlood::onBuildRenderer(Inkscape::Filters::Filter* filter) { +void CFeFlood::build_renderer(Inkscape::Filters::Filter* filter) { SPFeFlood* primitive = this->spfeflood; g_assert(primitive != NULL); diff --git a/src/filters/flood.h b/src/filters/flood.h index 60d1aae41..24231f992 100644 --- a/src/filters/flood.h +++ b/src/filters/flood.h @@ -46,16 +46,16 @@ public: CFeFlood(SPFeFlood* flood); virtual ~CFeFlood(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); - virtual void onBuildRenderer(Inkscape::Filters::Filter* filter); + virtual void build_renderer(Inkscape::Filters::Filter* filter); private: SPFeFlood* spfeflood; diff --git a/src/filters/gaussian-blur.cpp b/src/filters/gaussian-blur.cpp index 3a35a3598..90bdb4780 100644 --- a/src/filters/gaussian-blur.cpp +++ b/src/filters/gaussian-blur.cpp @@ -60,8 +60,8 @@ sp_gaussianBlur_init(SPGaussianBlur *gaussianBlur) * our name must be associated with a repr via "sp_object_type_register". Best done through * sp-object-repr.cpp's repr_name_entries array. */ -void CGaussianBlur::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { - CFilterPrimitive::onBuild(document, repr); +void CGaussianBlur::build(SPDocument *document, Inkscape::XML::Node *repr) { + CFilterPrimitive::build(document, repr); SPGaussianBlur* object = this->spgaussianblur; @@ -71,14 +71,14 @@ void CGaussianBlur::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { /** * Drops any allocated memory. */ -void CGaussianBlur::onRelease() { - CFilterPrimitive::onRelease(); +void CGaussianBlur::release() { + CFilterPrimitive::release(); } /** * Sets a specific value in the SPGaussianBlur. */ -void CGaussianBlur::onSet(unsigned int key, gchar const *value) { +void CGaussianBlur::set(unsigned int key, gchar const *value) { SPGaussianBlur* object = this->spgaussianblur; SPGaussianBlur *gaussianBlur = SP_GAUSSIANBLUR(object); @@ -89,7 +89,7 @@ void CGaussianBlur::onSet(unsigned int key, gchar const *value) { object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG); break; default: - CFilterPrimitive::onSet(key, value); + CFilterPrimitive::set(key, value); break; } } @@ -97,20 +97,20 @@ void CGaussianBlur::onSet(unsigned int key, gchar const *value) { /** * Receives update notifications. */ -void CGaussianBlur::onUpdate(SPCtx *ctx, guint flags) { +void CGaussianBlur::update(SPCtx *ctx, guint flags) { SPGaussianBlur* object = this->spgaussianblur; if (flags & SP_OBJECT_MODIFIED_FLAG) { object->readAttr( "stdDeviation" ); } - CFilterPrimitive::onUpdate(ctx, flags); + CFilterPrimitive::update(ctx, flags); } /** * Writes its settings to an incoming repr object, if any. */ -Inkscape::XML::Node* CGaussianBlur::onWrite(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CGaussianBlur::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { SPGaussianBlur* object = this->spgaussianblur; /* TODO: Don't just clone, but create a new repr node and write all @@ -119,7 +119,7 @@ Inkscape::XML::Node* CGaussianBlur::onWrite(Inkscape::XML::Document *doc, Inksca repr = object->getRepr()->duplicate(doc); } - CFilterPrimitive::onWrite(doc, repr, flags); + CFilterPrimitive::write(doc, repr, flags); return repr; } @@ -134,7 +134,7 @@ void sp_gaussianBlur_setDeviation(SPGaussianBlur *blur, float num, float optnum blur->stdDeviation.setOptNumber(optnum); } -void CGaussianBlur::onBuildRenderer(Inkscape::Filters::Filter* filter) { +void CGaussianBlur::build_renderer(Inkscape::Filters::Filter* filter) { SPGaussianBlur* primitive = this->spgaussianblur; SPGaussianBlur *sp_blur = SP_GAUSSIANBLUR(primitive); diff --git a/src/filters/gaussian-blur.h b/src/filters/gaussian-blur.h index 7efad6b8a..2872f0cc3 100644 --- a/src/filters/gaussian-blur.h +++ b/src/filters/gaussian-blur.h @@ -41,16 +41,16 @@ public: CGaussianBlur(SPGaussianBlur* gb); virtual ~CGaussianBlur(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); - virtual void onBuildRenderer(Inkscape::Filters::Filter* filter); + virtual void build_renderer(Inkscape::Filters::Filter* filter); private: SPGaussianBlur* spgaussianblur; diff --git a/src/filters/image.cpp b/src/filters/image.cpp index 396d17a65..aeae90471 100644 --- a/src/filters/image.cpp +++ b/src/filters/image.cpp @@ -60,14 +60,14 @@ static void sp_feImage_init(SPFeImage *feImage) * our name must be associated with a repr via "sp_object_type_register". Best done through * sp-object-repr.cpp's repr_name_entries array. */ -void CFeImage::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CFeImage::build(SPDocument *document, Inkscape::XML::Node *repr) { SPFeImage* object = this->spfeimage; // Save document reference so we can load images with relative paths. SPFeImage *feImage = SP_FEIMAGE(object); feImage->document = document; - CFilterPrimitive::onBuild(document, repr); + CFilterPrimitive::build(document, repr); /*LOAD ATTRIBUTES FROM REPR HERE*/ @@ -78,7 +78,7 @@ void CFeImage::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { /** * Drops any allocated memory. */ -void CFeImage::onRelease() { +void CFeImage::release() { SPFeImage* object = this->spfeimage; SPFeImage *feImage = SP_FEIMAGE(object); @@ -86,7 +86,7 @@ void CFeImage::onRelease() { feImage->_href_modified_connection.disconnect(); if (feImage->SVGElemRef) delete feImage->SVGElemRef; - CFilterPrimitive::onRelease(); + CFilterPrimitive::release(); } static void sp_feImage_elem_modified(SPObject* /*href*/, guint /*flags*/, SPObject* obj) @@ -111,7 +111,7 @@ static void sp_feImage_href_modified(SPObject* /*old_elem*/, SPObject* new_elem, /** * Sets a specific value in the SPFeImage. */ -void CFeImage::onSet(unsigned int key, gchar const *value) { +void CFeImage::set(unsigned int key, gchar const *value) { SPFeImage* object = this->spfeimage; SPFeImage *feImage = SP_FEIMAGE(object); @@ -216,7 +216,7 @@ void CFeImage::onSet(unsigned int key, gchar const *value) { break; default: - CFilterPrimitive::onSet(key, value); + CFilterPrimitive::set(key, value); break; } } @@ -224,7 +224,7 @@ void CFeImage::onSet(unsigned int key, gchar const *value) { /** * Receives update notifications. */ -void CFeImage::onUpdate(SPCtx *ctx, guint flags) { +void CFeImage::update(SPCtx *ctx, guint flags) { SPFeImage* object = this->spfeimage; if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | @@ -233,13 +233,13 @@ void CFeImage::onUpdate(SPCtx *ctx, guint flags) { /* do something to trigger redisplay, updates? */ } - CFilterPrimitive::onUpdate(ctx, flags); + CFilterPrimitive::update(ctx, flags); } /** * Writes its settings to an incoming repr object, if any. */ -Inkscape::XML::Node* CFeImage::onWrite(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CFeImage::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { SPFeImage* object = this->spfeimage; /* TODO: Don't just clone, but create a new repr node and write all @@ -248,12 +248,12 @@ Inkscape::XML::Node* CFeImage::onWrite(Inkscape::XML::Document *doc, Inkscape::X repr = object->getRepr()->duplicate(doc); } - CFilterPrimitive::onWrite(doc, repr, flags); + CFilterPrimitive::write(doc, repr, flags); return repr; } -void CFeImage::onBuildRenderer(Inkscape::Filters::Filter* filter) { +void CFeImage::build_renderer(Inkscape::Filters::Filter* filter) { SPFeImage* primitive = this->spfeimage; g_assert(primitive != NULL); diff --git a/src/filters/image.h b/src/filters/image.h index 312c646b7..0144082fa 100644 --- a/src/filters/image.h +++ b/src/filters/image.h @@ -53,16 +53,16 @@ public: CFeImage(SPFeImage* image); virtual ~CFeImage(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); - virtual void onBuildRenderer(Inkscape::Filters::Filter* filter); + virtual void build_renderer(Inkscape::Filters::Filter* filter); private: SPFeImage* spfeimage; diff --git a/src/filters/merge.cpp b/src/filters/merge.cpp index 897003445..b3e87f1a4 100644 --- a/src/filters/merge.cpp +++ b/src/filters/merge.cpp @@ -54,21 +54,21 @@ sp_feMerge_init(SPFeMerge *feMerge) * our name must be associated with a repr via "sp_object_type_register". Best done through * sp-object-repr.cpp's repr_name_entries array. */ -void CFeMerge::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { - CFilterPrimitive::onBuild(document, repr); +void CFeMerge::build(SPDocument *document, Inkscape::XML::Node *repr) { + CFilterPrimitive::build(document, repr); } /** * Drops any allocated memory. */ -void CFeMerge::onRelease() { - CFilterPrimitive::onRelease(); +void CFeMerge::release() { + CFilterPrimitive::release(); } /** * Sets a specific value in the SPFeMerge. */ -void CFeMerge::onSet(unsigned int key, gchar const *value) { +void CFeMerge::set(unsigned int key, gchar const *value) { SPFeMerge* object = this->spfemerge; SPFeMerge *feMerge = SP_FEMERGE(object); @@ -77,7 +77,7 @@ void CFeMerge::onSet(unsigned int key, gchar const *value) { switch(key) { /*DEAL WITH SETTING ATTRIBUTES HERE*/ default: - CFilterPrimitive::onSet(key, value); + CFilterPrimitive::set(key, value); break; } } @@ -85,20 +85,20 @@ void CFeMerge::onSet(unsigned int key, gchar const *value) { /** * Receives update notifications. */ -void CFeMerge::onUpdate(SPCtx *ctx, guint flags) { +void CFeMerge::update(SPCtx *ctx, guint flags) { SPFeMerge* object = this->spfemerge; if (flags & SP_OBJECT_MODIFIED_FLAG) { object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG); } - CFilterPrimitive::onUpdate(ctx, flags); + CFilterPrimitive::update(ctx, flags); } /** * Writes its settings to an incoming repr object, if any. */ -Inkscape::XML::Node* CFeMerge::onWrite(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CFeMerge::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { SPFeMerge* object = this->spfemerge; /* TODO: Don't just clone, but create a new repr node and write all @@ -108,12 +108,12 @@ Inkscape::XML::Node* CFeMerge::onWrite(Inkscape::XML::Document *doc, Inkscape::X } - CFilterPrimitive::onWrite(doc, repr, flags); + CFilterPrimitive::write(doc, repr, flags); return repr; } -void CFeMerge::onBuildRenderer(Inkscape::Filters::Filter* filter) { +void CFeMerge::build_renderer(Inkscape::Filters::Filter* filter) { SPFeMerge* primitive = this->spfemerge; g_assert(primitive != NULL); diff --git a/src/filters/merge.h b/src/filters/merge.h index c3bbadb72..9b30a7a05 100644 --- a/src/filters/merge.h +++ b/src/filters/merge.h @@ -34,16 +34,16 @@ public: CFeMerge(SPFeMerge* merge); virtual ~CFeMerge(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); - virtual void onBuildRenderer(Inkscape::Filters::Filter* filter); + virtual void build_renderer(Inkscape::Filters::Filter* filter); private: SPFeMerge* spfemerge; diff --git a/src/filters/mergenode.cpp b/src/filters/mergenode.cpp index 8e5b4d157..4f9524c91 100644 --- a/src/filters/mergenode.cpp +++ b/src/filters/mergenode.cpp @@ -53,7 +53,7 @@ sp_feMergeNode_init(SPFeMergeNode *feMergeNode) * our name must be associated with a repr via "sp_object_type_register". Best done through * sp-object-repr.cpp's repr_name_entries array. */ -void CFeMergeNode::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CFeMergeNode::build(SPDocument *document, Inkscape::XML::Node *repr) { SPFeMergeNode* object = this->spfemergenode; object->readAttr( "in" ); } @@ -61,14 +61,14 @@ void CFeMergeNode::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { /** * Drops any allocated memory. */ -void CFeMergeNode::onRelease() { - CObject::onRelease(); +void CFeMergeNode::release() { + CObject::release(); } /** * Sets a specific value in the SPFeMergeNode. */ -void CFeMergeNode::onSet(unsigned int key, gchar const *value) { +void CFeMergeNode::set(unsigned int key, gchar const *value) { SPFeMergeNode* object = this->spfemergenode; SPFeMergeNode *feMergeNode = SP_FEMERGENODE(object); SPFeMerge *parent = SP_FEMERGE(object->parent); @@ -82,13 +82,13 @@ void CFeMergeNode::onSet(unsigned int key, gchar const *value) { } /* See if any parents need this value. */ - CObject::onSet(key, value); + CObject::set(key, value); } /** * Receives update notifications. */ -void CFeMergeNode::onUpdate(SPCtx *ctx, guint flags) { +void CFeMergeNode::update(SPCtx *ctx, guint flags) { SPFeMergeNode* object = this->spfemergenode; //SPFeMergeNode *feMergeNode = SP_FEMERGENODE(object); @@ -96,13 +96,13 @@ void CFeMergeNode::onUpdate(SPCtx *ctx, guint flags) { object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG); } - CObject::onUpdate(ctx, flags); + CObject::update(ctx, flags); } /** * Writes its settings to an incoming repr object, if any. */ -Inkscape::XML::Node* CFeMergeNode::onWrite(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CFeMergeNode::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { SPFeMergeNode* object = this->spfemergenode; //SPFeMergeNode *feMergeNode = SP_FEMERGENODE(object); @@ -116,7 +116,7 @@ Inkscape::XML::Node* CFeMergeNode::onWrite(Inkscape::XML::Document *doc, Inkscap } } - CObject::onWrite(doc, repr, flags); + CObject::write(doc, repr, flags); return repr; } diff --git a/src/filters/mergenode.h b/src/filters/mergenode.h index ad3610ea5..897df31be 100644 --- a/src/filters/mergenode.h +++ b/src/filters/mergenode.h @@ -35,14 +35,14 @@ public: CFeMergeNode(SPFeMergeNode* mergenode); virtual ~CFeMergeNode(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); private: SPFeMergeNode* spfemergenode; diff --git a/src/filters/morphology.cpp b/src/filters/morphology.cpp index a067b7ed3..fb58b5fcf 100644 --- a/src/filters/morphology.cpp +++ b/src/filters/morphology.cpp @@ -59,8 +59,8 @@ sp_feMorphology_init(SPFeMorphology *feMorphology) * our name must be associated with a repr via "sp_object_type_register". Best done through * sp-object-repr.cpp's repr_name_entries array. */ -void CFeMorphology::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { - CFilterPrimitive::onBuild(document, repr); +void CFeMorphology::build(SPDocument *document, Inkscape::XML::Node *repr) { + CFilterPrimitive::build(document, repr); SPFeMorphology* object = this->spfemorphology; @@ -72,8 +72,8 @@ void CFeMorphology::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { /** * Drops any allocated memory. */ -void CFeMorphology::onRelease() { - CFilterPrimitive::onRelease(); +void CFeMorphology::release() { + CFilterPrimitive::release(); } static Inkscape::Filters::FilterMorphologyOperator sp_feMorphology_read_operator(gchar const *value){ @@ -92,7 +92,7 @@ static Inkscape::Filters::FilterMorphologyOperator sp_feMorphology_read_operator /** * Sets a specific value in the SPFeMorphology. */ -void CFeMorphology::onSet(unsigned int key, gchar const *value) { +void CFeMorphology::set(unsigned int key, gchar const *value) { SPFeMorphology* object = this->spfemorphology; SPFeMorphology *feMorphology = SP_FEMORPHOLOGY(object); @@ -116,7 +116,7 @@ void CFeMorphology::onSet(unsigned int key, gchar const *value) { object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG); break; default: - CFilterPrimitive::onSet(key, value); + CFilterPrimitive::set(key, value); break; } @@ -125,7 +125,7 @@ void CFeMorphology::onSet(unsigned int key, gchar const *value) { /** * Receives update notifications. */ -void CFeMorphology::onUpdate(SPCtx *ctx, guint flags) { +void CFeMorphology::update(SPCtx *ctx, guint flags) { SPFeMorphology* object = this->spfemorphology; if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | @@ -135,13 +135,13 @@ void CFeMorphology::onUpdate(SPCtx *ctx, guint flags) { } - CFilterPrimitive::onUpdate(ctx, flags); + CFilterPrimitive::update(ctx, flags); } /** * Writes its settings to an incoming repr object, if any. */ -Inkscape::XML::Node* CFeMorphology::onWrite(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CFeMorphology::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { SPFeMorphology* object = this->spfemorphology; /* TODO: Don't just clone, but create a new repr node and write all @@ -150,12 +150,12 @@ Inkscape::XML::Node* CFeMorphology::onWrite(Inkscape::XML::Document *doc, Inksca repr = object->getRepr()->duplicate(doc); } - CFilterPrimitive::onWrite(doc, repr, flags); + CFilterPrimitive::write(doc, repr, flags); return repr; } -void CFeMorphology::onBuildRenderer(Inkscape::Filters::Filter* filter) { +void CFeMorphology::build_renderer(Inkscape::Filters::Filter* filter) { SPFeMorphology* primitive = this->spfemorphology; g_assert(primitive != NULL); diff --git a/src/filters/morphology.h b/src/filters/morphology.h index add753424..3ef629ef4 100644 --- a/src/filters/morphology.h +++ b/src/filters/morphology.h @@ -41,16 +41,16 @@ public: CFeMorphology(SPFeMorphology* morph); virtual ~CFeMorphology(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); - virtual void onBuildRenderer(Inkscape::Filters::Filter* filter); + virtual void build_renderer(Inkscape::Filters::Filter* filter); private: SPFeMorphology* spfemorphology; diff --git a/src/filters/offset.cpp b/src/filters/offset.cpp index 16fad1176..cc1eb42fa 100644 --- a/src/filters/offset.cpp +++ b/src/filters/offset.cpp @@ -58,10 +58,10 @@ sp_feOffset_init(SPFeOffset *feOffset) * our name must be associated with a repr via "sp_object_type_register". Best done through * sp-object-repr.cpp's repr_name_entries array. */ -void CFeOffset::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CFeOffset::build(SPDocument *document, Inkscape::XML::Node *repr) { SPFeOffset* object = this->spfeoffset; - CFilterPrimitive::onBuild(document, repr); + CFilterPrimitive::build(document, repr); object->readAttr( "dx" ); object->readAttr( "dy" ); @@ -70,14 +70,14 @@ void CFeOffset::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { /** * Drops any allocated memory. */ -void CFeOffset::onRelease() { - CFilterPrimitive::onRelease(); +void CFeOffset::release() { + CFilterPrimitive::release(); } /** * Sets a specific value in the SPFeOffset. */ -void CFeOffset::onSet(unsigned int key, gchar const *value) { +void CFeOffset::set(unsigned int key, gchar const *value) { SPFeOffset* object = this->spfeoffset; SPFeOffset *feOffset = SP_FEOFFSET(object); @@ -101,7 +101,7 @@ void CFeOffset::onSet(unsigned int key, gchar const *value) { /*DEAL WITH SETTING ATTRIBUTES HERE*/ default: - CFilterPrimitive::onSet(key, value); + CFilterPrimitive::set(key, value); break; } } @@ -109,7 +109,7 @@ void CFeOffset::onSet(unsigned int key, gchar const *value) { /** * Receives update notifications. */ -void CFeOffset::onUpdate(SPCtx *ctx, guint flags) { +void CFeOffset::update(SPCtx *ctx, guint flags) { SPFeOffset* object = this->spfeoffset; if (flags & SP_OBJECT_MODIFIED_FLAG) { @@ -117,13 +117,13 @@ void CFeOffset::onUpdate(SPCtx *ctx, guint flags) { object->readAttr( "dy" ); } - CFilterPrimitive::onUpdate(ctx, flags); + CFilterPrimitive::update(ctx, flags); } /** * Writes its settings to an incoming repr object, if any. */ -Inkscape::XML::Node* CFeOffset::onWrite(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CFeOffset::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { SPFeOffset* object = this->spfeoffset; /* TODO: Don't just clone, but create a new repr node and write all @@ -132,12 +132,12 @@ Inkscape::XML::Node* CFeOffset::onWrite(Inkscape::XML::Document *doc, Inkscape:: repr = object->getRepr()->duplicate(doc); } - CFilterPrimitive::onWrite(doc, repr, flags); + CFilterPrimitive::write(doc, repr, flags); return repr; } -void CFeOffset::onBuildRenderer(Inkscape::Filters::Filter* filter) { +void CFeOffset::build_renderer(Inkscape::Filters::Filter* filter) { SPFeOffset* primitive = this->spfeoffset; g_assert(primitive != NULL); diff --git a/src/filters/offset.h b/src/filters/offset.h index 684a3564f..df0f9768d 100644 --- a/src/filters/offset.h +++ b/src/filters/offset.h @@ -38,16 +38,16 @@ public: CFeOffset(SPFeOffset* offset); virtual ~CFeOffset(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); - virtual void onBuildRenderer(Inkscape::Filters::Filter* filter); + virtual void build_renderer(Inkscape::Filters::Filter* filter); private: SPFeOffset* spfeoffset; diff --git a/src/filters/pointlight.cpp b/src/filters/pointlight.cpp index e6e18d7fe..718f9813c 100644 --- a/src/filters/pointlight.cpp +++ b/src/filters/pointlight.cpp @@ -65,8 +65,8 @@ sp_fepointlight_init(SPFePointLight *fepointlight) * our name must be associated with a repr via "sp_object_type_register". Best done through * sp-object-repr.cpp's repr_name_entries array. */ -void CFePointLight::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { - CObject::onBuild(document, repr); +void CFePointLight::build(SPDocument *document, Inkscape::XML::Node *repr) { + CObject::build(document, repr); SPFePointLight* object = this->spfepointlight; @@ -82,7 +82,7 @@ void CFePointLight::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { /** * Drops any allocated memory. */ -void CFePointLight::onRelease() { +void CFePointLight::release() { SPFePointLight* object = this->spfepointlight; //SPFePointLight *fepointlight = SP_FEPOINTLIGHT(object); @@ -97,7 +97,7 @@ void CFePointLight::onRelease() { /** * Sets a specific value in the SPFePointLight. */ -void CFePointLight::onSet(unsigned int key, gchar const *value) { +void CFePointLight::set(unsigned int key, gchar const *value) { SPFePointLight* object = this->spfepointlight; SPFePointLight *fepointlight = SP_FEPOINTLIGHT(object); @@ -159,7 +159,7 @@ void CFePointLight::onSet(unsigned int key, gchar const *value) { break; default: // See if any parents need this value. - CObject::onSet(key, value); + CObject::set(key, value); break; } } @@ -167,7 +167,7 @@ void CFePointLight::onSet(unsigned int key, gchar const *value) { /** * * Receives update notifications. * */ -void CFePointLight::onUpdate(SPCtx *ctx, guint flags) { +void CFePointLight::update(SPCtx *ctx, guint flags) { SPFePointLight* object = this->spfepointlight; SPFePointLight *fePointLight = SP_FEPOINTLIGHT(object); @@ -180,13 +180,13 @@ void CFePointLight::onUpdate(SPCtx *ctx, guint flags) { object->readAttr( "z" ); } - CObject::onUpdate(ctx, flags); + CObject::update(ctx, flags); } /** * Writes its settings to an incoming repr object, if any. */ -Inkscape::XML::Node* CFePointLight::onWrite(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CFePointLight::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { SPFePointLight* object = this->spfepointlight; SPFePointLight *fepointlight = SP_FEPOINTLIGHT(object); @@ -201,7 +201,7 @@ Inkscape::XML::Node* CFePointLight::onWrite(Inkscape::XML::Document *doc, Inksca if (fepointlight->z_set) sp_repr_set_css_double(repr, "z", fepointlight->z); - CObject::onWrite(doc, repr, flags); + CObject::write(doc, repr, flags); return repr; } diff --git a/src/filters/pointlight.h b/src/filters/pointlight.h index 766c7f5db..814a065be 100644 --- a/src/filters/pointlight.h +++ b/src/filters/pointlight.h @@ -47,14 +47,14 @@ public: CFePointLight(SPFePointLight* pointlight); virtual ~CFePointLight(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); private: SPFePointLight* spfepointlight; diff --git a/src/filters/specularlighting.cpp b/src/filters/specularlighting.cpp index 8bb76e324..4f4b4e2e2 100644 --- a/src/filters/specularlighting.cpp +++ b/src/filters/specularlighting.cpp @@ -79,10 +79,10 @@ sp_feSpecularLighting_init(SPFeSpecularLighting *feSpecularLighting) * our name must be associated with a repr via "sp_object_type_register". Best done through * sp-object-repr.cpp's repr_name_entries array. */ -void CFeSpecularLighting::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CFeSpecularLighting::build(SPDocument *document, Inkscape::XML::Node *repr) { SPFeSpecularLighting* object = this->spfespecularlighting; - CFilterPrimitive::onBuild(document, repr); + CFilterPrimitive::build(document, repr); /*LOAD ATTRIBUTES FROM REPR HERE*/ object->readAttr( "surfaceScale" ); @@ -95,14 +95,14 @@ void CFeSpecularLighting::onBuild(SPDocument *document, Inkscape::XML::Node *rep /** * Drops any allocated memory. */ -void CFeSpecularLighting::onRelease() { - CFilterPrimitive::onRelease(); +void CFeSpecularLighting::release() { + CFilterPrimitive::release(); } /** * Sets a specific value in the SPFeSpecularLighting. */ -void CFeSpecularLighting::onSet(unsigned int key, gchar const *value) { +void CFeSpecularLighting::set(unsigned int key, gchar const *value) { SPFeSpecularLighting* object = this->spfespecularlighting; SPFeSpecularLighting *feSpecularLighting = SP_FESPECULARLIGHTING(object); @@ -207,7 +207,7 @@ void CFeSpecularLighting::onSet(unsigned int key, gchar const *value) { object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG); break; default: - CFilterPrimitive::onSet(key, value); + CFilterPrimitive::set(key, value); break; } } @@ -215,7 +215,7 @@ void CFeSpecularLighting::onSet(unsigned int key, gchar const *value) { /** * Receives update notifications. */ -void CFeSpecularLighting::onUpdate(SPCtx *ctx, guint flags) { +void CFeSpecularLighting::update(SPCtx *ctx, guint flags) { SPFeSpecularLighting* object = this->spfespecularlighting; if (flags & (SP_OBJECT_MODIFIED_FLAG)) { @@ -226,13 +226,13 @@ void CFeSpecularLighting::onUpdate(SPCtx *ctx, guint flags) { object->readAttr( "lighting-color" ); } - CFilterPrimitive::onUpdate(ctx, flags); + CFilterPrimitive::update(ctx, flags); } /** * Writes its settings to an incoming repr object, if any. */ -Inkscape::XML::Node* CFeSpecularLighting::onWrite(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CFeSpecularLighting::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { SPFeSpecularLighting* object = this->spfespecularlighting; SPFeSpecularLighting *fespecularlighting = SP_FESPECULARLIGHTING(object); @@ -256,7 +256,7 @@ Inkscape::XML::Node* CFeSpecularLighting::onWrite(Inkscape::XML::Document *doc, sp_svg_write_color(c, sizeof(c), fespecularlighting->lighting_color); repr->setAttribute("lighting-color", c); } - CFilterPrimitive::onWrite(doc, repr, flags); + CFilterPrimitive::write(doc, repr, flags); return repr; } @@ -264,12 +264,12 @@ Inkscape::XML::Node* CFeSpecularLighting::onWrite(Inkscape::XML::Document *doc, /** * Callback for child_added event. */ -void CFeSpecularLighting::onChildAdded(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { +void CFeSpecularLighting::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { SPFeSpecularLighting* object = this->spfespecularlighting; SPFeSpecularLighting *f = SP_FESPECULARLIGHTING(object); - CFilterPrimitive::onChildAdded(child, ref); + CFilterPrimitive::child_added(child, ref); sp_feSpecularLighting_children_modified(f); object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG); @@ -278,22 +278,22 @@ void CFeSpecularLighting::onChildAdded(Inkscape::XML::Node *child, Inkscape::XML /** * Callback for remove_child event. */ -void CFeSpecularLighting::onRemoveChild(Inkscape::XML::Node *child) { +void CFeSpecularLighting::remove_child(Inkscape::XML::Node *child) { SPFeSpecularLighting* object = this->spfespecularlighting; SPFeSpecularLighting *f = SP_FESPECULARLIGHTING(object); - CFilterPrimitive::onRemoveChild(child); + CFilterPrimitive::remove_child(child); sp_feSpecularLighting_children_modified(f); object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG); } -void CFeSpecularLighting::onOrderChanged(Inkscape::XML::Node *child, Inkscape::XML::Node *old_ref, Inkscape::XML::Node *new_ref) { +void CFeSpecularLighting::order_changed(Inkscape::XML::Node *child, Inkscape::XML::Node *old_ref, Inkscape::XML::Node *new_ref) { SPFeSpecularLighting* object = this->spfespecularlighting; SPFeSpecularLighting *f = SP_FESPECULARLIGHTING(object); - CFilterPrimitive::onOrderChanged(child, old_ref, new_ref); + CFilterPrimitive::order_changed(child, old_ref, new_ref); sp_feSpecularLighting_children_modified(f); object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG); @@ -318,7 +318,7 @@ static void sp_feSpecularLighting_children_modified(SPFeSpecularLighting *sp_spe } } -void CFeSpecularLighting::onBuildRenderer(Inkscape::Filters::Filter* filter) { +void CFeSpecularLighting::build_renderer(Inkscape::Filters::Filter* filter) { SPFeSpecularLighting* primitive = this->spfespecularlighting; g_assert(primitive != NULL); diff --git a/src/filters/specularlighting.h b/src/filters/specularlighting.h index 5a6eee99e..b7e8d8591 100644 --- a/src/filters/specularlighting.h +++ b/src/filters/specularlighting.h @@ -60,21 +60,21 @@ public: CFeSpecularLighting(SPFeSpecularLighting* lighting); virtual ~CFeSpecularLighting(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); - virtual void onRemoveChild(Inkscape::XML::Node* child); + virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); + virtual void remove_child(Inkscape::XML::Node* child); - virtual void onOrderChanged(Inkscape::XML::Node* child, Inkscape::XML::Node* old_repr, Inkscape::XML::Node* new_repr); + virtual void order_changed(Inkscape::XML::Node* child, Inkscape::XML::Node* old_repr, Inkscape::XML::Node* new_repr); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); - virtual void onBuildRenderer(Inkscape::Filters::Filter* filter); + virtual void build_renderer(Inkscape::Filters::Filter* filter); private: SPFeSpecularLighting* spfespecularlighting; diff --git a/src/filters/spotlight.cpp b/src/filters/spotlight.cpp index e8834e79a..b56265c54 100644 --- a/src/filters/spotlight.cpp +++ b/src/filters/spotlight.cpp @@ -75,8 +75,8 @@ sp_fespotlight_init(SPFeSpotLight *fespotlight) * our name must be associated with a repr via "sp_object_type_register". Best done through * sp-object-repr.cpp's repr_name_entries array. */ -void CFeSpotLight::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { - CObject::onBuild(document, repr); +void CFeSpotLight::build(SPDocument *document, Inkscape::XML::Node *repr) { + CObject::build(document, repr); SPFeSpotLight* object = this->spfespotlight; @@ -97,7 +97,7 @@ void CFeSpotLight::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { /** * Drops any allocated memory. */ -void CFeSpotLight::onRelease() { +void CFeSpotLight::release() { SPFeSpotLight* object = this->spfespotlight; //SPFeSpotLight *fespotlight = SP_FESPOTLIGHT(object); @@ -112,7 +112,7 @@ void CFeSpotLight::onRelease() { /** * Sets a specific value in the SPFeSpotLight. */ -void CFeSpotLight::onSet(unsigned int key, gchar const *value) { +void CFeSpotLight::set(unsigned int key, gchar const *value) { SPFeSpotLight* object = this->spfespotlight; SPFeSpotLight *fespotlight = SP_FESPOTLIGHT(object); @@ -257,7 +257,7 @@ void CFeSpotLight::onSet(unsigned int key, gchar const *value) { break; default: // See if any parents need this value. - CObject::onSet(key, value); + CObject::set(key, value); break; } } @@ -265,7 +265,7 @@ void CFeSpotLight::onSet(unsigned int key, gchar const *value) { /** * * Receives update notifications. * */ -void CFeSpotLight::onUpdate(SPCtx *ctx, guint flags) { +void CFeSpotLight::update(SPCtx *ctx, guint flags) { SPFeSpotLight* object = this->spfespotlight; SPFeSpotLight *feSpotLight = SP_FESPOTLIGHT(object); @@ -283,13 +283,13 @@ void CFeSpotLight::onUpdate(SPCtx *ctx, guint flags) { object->readAttr( "limitingConeAngle" ); } - CObject::onUpdate(ctx, flags); + CObject::update(ctx, flags); } /** * Writes its settings to an incoming repr object, if any. */ -Inkscape::XML::Node* CFeSpotLight::onWrite(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CFeSpotLight::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { SPFeSpotLight* object = this->spfespotlight; SPFeSpotLight *fespotlight = SP_FESPOTLIGHT(object); @@ -314,7 +314,7 @@ Inkscape::XML::Node* CFeSpotLight::onWrite(Inkscape::XML::Document *doc, Inkscap if (fespotlight->limitingConeAngle_set) sp_repr_set_css_double(repr, "limitingConeAngle", fespotlight->limitingConeAngle); - CObject::onWrite(doc, repr, flags); + CObject::write(doc, repr, flags); return repr; } diff --git a/src/filters/spotlight.h b/src/filters/spotlight.h index bb1716fb2..51a1406de 100644 --- a/src/filters/spotlight.h +++ b/src/filters/spotlight.h @@ -61,14 +61,14 @@ public: CFeSpotLight(SPFeSpotLight* spotlight); virtual ~CFeSpotLight(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); private: SPFeSpotLight* spfespotlight; diff --git a/src/filters/tile.cpp b/src/filters/tile.cpp index b879038fa..436f9cd0b 100644 --- a/src/filters/tile.cpp +++ b/src/filters/tile.cpp @@ -52,21 +52,21 @@ sp_feTile_init(SPFeTile *feTile) * our name must be associated with a repr via "sp_object_type_register". Best done through * sp-object-repr.cpp's repr_name_entries array. */ -void CFeTile::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { - CFilterPrimitive::onBuild(document, repr); +void CFeTile::build(SPDocument *document, Inkscape::XML::Node *repr) { + CFilterPrimitive::build(document, repr); } /** * Drops any allocated memory. */ -void CFeTile::onRelease() { - CFilterPrimitive::onRelease(); +void CFeTile::release() { + CFilterPrimitive::release(); } /** * Sets a specific value in the SPFeTile. */ -void CFeTile::onSet(unsigned int key, gchar const *value) { +void CFeTile::set(unsigned int key, gchar const *value) { SPFeTile* object = this->spfetile; SPFeTile *feTile = SP_FETILE(object); @@ -75,7 +75,7 @@ void CFeTile::onSet(unsigned int key, gchar const *value) { switch(key) { /*DEAL WITH SETTING ATTRIBUTES HERE*/ default: - CFilterPrimitive::onSet(key, value); + CFilterPrimitive::set(key, value); break; } } @@ -83,7 +83,7 @@ void CFeTile::onSet(unsigned int key, gchar const *value) { /** * Receives update notifications. */ -void CFeTile::onUpdate(SPCtx *ctx, guint flags) { +void CFeTile::update(SPCtx *ctx, guint flags) { SPFeTile* object = this->spfetile; if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | @@ -93,13 +93,13 @@ void CFeTile::onUpdate(SPCtx *ctx, guint flags) { } - CFilterPrimitive::onUpdate(ctx, flags); + CFilterPrimitive::update(ctx, flags); } /** * Writes its settings to an incoming repr object, if any. */ -Inkscape::XML::Node* CFeTile::onWrite(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CFeTile::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { SPFeTile* object = this->spfetile; /* TODO: Don't just clone, but create a new repr node and write all @@ -108,12 +108,12 @@ Inkscape::XML::Node* CFeTile::onWrite(Inkscape::XML::Document *doc, Inkscape::XM repr = object->getRepr()->duplicate(doc); } - CFilterPrimitive::onWrite(doc, repr, flags); + CFilterPrimitive::write(doc, repr, flags); return repr; } -void CFeTile::onBuildRenderer(Inkscape::Filters::Filter* filter) { +void CFeTile::build_renderer(Inkscape::Filters::Filter* filter) { SPFeTile* primitive = this->spfetile; g_assert(primitive != NULL); diff --git a/src/filters/tile.h b/src/filters/tile.h index 01cddc726..3ef56b515 100644 --- a/src/filters/tile.h +++ b/src/filters/tile.h @@ -37,16 +37,16 @@ public: CFeTile(SPFeTile* tile); virtual ~CFeTile(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); - virtual void onBuildRenderer(Inkscape::Filters::Filter* filter); + virtual void build_renderer(Inkscape::Filters::Filter* filter); private: SPFeTile* spfetile; diff --git a/src/filters/turbulence.cpp b/src/filters/turbulence.cpp index 6b704d825..759fb6c23 100644 --- a/src/filters/turbulence.cpp +++ b/src/filters/turbulence.cpp @@ -60,10 +60,10 @@ sp_feTurbulence_init(SPFeTurbulence *feTurbulence) * our name must be associated with a repr via "sp_object_type_register". Best done through * sp-object-repr.cpp's repr_name_entries array. */ -void CFeTurbulence::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CFeTurbulence::build(SPDocument *document, Inkscape::XML::Node *repr) { SPFeTurbulence* object = this->spfeturbulence; - CFilterPrimitive::onBuild(document, repr); + CFilterPrimitive::build(document, repr); /*LOAD ATTRIBUTES FROM REPR HERE*/ object->readAttr( "baseFrequency" ); @@ -76,8 +76,8 @@ void CFeTurbulence::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { /** * Drops any allocated memory. */ -void CFeTurbulence::onRelease() { - CFilterPrimitive::onRelease(); +void CFeTurbulence::release() { + CFilterPrimitive::release(); } static bool sp_feTurbulence_read_stitchTiles(gchar const *value){ @@ -109,7 +109,7 @@ static Inkscape::Filters::FilterTurbulenceType sp_feTurbulence_read_type(gchar c /** * Sets a specific value in the SPFeTurbulence. */ -void CFeTurbulence::onSet(unsigned int key, gchar const *value) { +void CFeTurbulence::set(unsigned int key, gchar const *value) { SPFeTurbulence* object = this->spfeturbulence; SPFeTurbulence *feTurbulence = SP_FETURBULENCE(object); @@ -164,7 +164,7 @@ void CFeTurbulence::onSet(unsigned int key, gchar const *value) { } break; default: - CFilterPrimitive::onSet(key, value); + CFilterPrimitive::set(key, value); break; } } @@ -172,7 +172,7 @@ void CFeTurbulence::onSet(unsigned int key, gchar const *value) { /** * Receives update notifications. */ -void CFeTurbulence::onUpdate(SPCtx *ctx, guint flags) { +void CFeTurbulence::update(SPCtx *ctx, guint flags) { SPFeTurbulence* object = this->spfeturbulence; if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | @@ -182,13 +182,13 @@ void CFeTurbulence::onUpdate(SPCtx *ctx, guint flags) { } - CFilterPrimitive::onUpdate(ctx, flags); + CFilterPrimitive::update(ctx, flags); } /** * Writes its settings to an incoming repr object, if any. */ -Inkscape::XML::Node* CFeTurbulence::onWrite(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CFeTurbulence::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { SPFeTurbulence* object = this->spfeturbulence; /* TODO: Don't just clone, but create a new repr node and write all @@ -197,7 +197,7 @@ Inkscape::XML::Node* CFeTurbulence::onWrite(Inkscape::XML::Document *doc, Inksca repr = object->getRepr()->duplicate(doc); } - CFilterPrimitive::onWrite(doc, repr, flags); + CFilterPrimitive::write(doc, repr, flags); /* turbulence doesn't take input */ repr->setAttribute("in", 0); @@ -205,7 +205,7 @@ Inkscape::XML::Node* CFeTurbulence::onWrite(Inkscape::XML::Document *doc, Inksca return repr; } -void CFeTurbulence::onBuildRenderer(Inkscape::Filters::Filter* filter) { +void CFeTurbulence::build_renderer(Inkscape::Filters::Filter* filter) { SPFeTurbulence* primitive = this->spfeturbulence; g_assert(primitive != NULL); diff --git a/src/filters/turbulence.h b/src/filters/turbulence.h index 490f49156..ccfa3da92 100644 --- a/src/filters/turbulence.h +++ b/src/filters/turbulence.h @@ -50,16 +50,16 @@ public: CFeTurbulence(SPFeTurbulence* turb); virtual ~CFeTurbulence(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); - virtual void onBuildRenderer(Inkscape::Filters::Filter* filter); + virtual void build_renderer(Inkscape::Filters::Filter* filter); private: SPFeTurbulence* spfeturbulence; diff --git a/src/live_effects/lpeobject.cpp b/src/live_effects/lpeobject.cpp index d742456d8..93f038473 100644 --- a/src/live_effects/lpeobject.cpp +++ b/src/live_effects/lpeobject.cpp @@ -98,13 +98,13 @@ LivePathEffectObject::livepatheffect_init(LivePathEffectObject *lpeobj) /** * Virtual build: set livepatheffect attributes from its associated XML node. */ -void CLivePathEffectObject::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CLivePathEffectObject::build(SPDocument *document, Inkscape::XML::Node *repr) { LivePathEffectObject* object = this->livepatheffectobject; g_assert(object != NULL); g_assert(SP_IS_OBJECT(object)); - CObject::onBuild(document, repr); + CObject::build(document, repr); object->readAttr( "effect" ); @@ -119,7 +119,7 @@ void CLivePathEffectObject::onBuild(SPDocument *document, Inkscape::XML::Node *r /** * Virtual release of livepatheffect members before destruction. */ -void CLivePathEffectObject::onRelease() { +void CLivePathEffectObject::release() { LivePathEffectObject* object = this->livepatheffectobject; LivePathEffectObject *lpeobj = LIVEPATHEFFECT(object); @@ -150,13 +150,13 @@ void CLivePathEffectObject::onRelease() { } lpeobj->effecttype = Inkscape::LivePathEffect::INVALID_LPE; - CObject::onRelease(); + CObject::release(); } /** * Virtual set: set attribute to value. */ -void CLivePathEffectObject::onSet(unsigned key, gchar const *value) { +void CLivePathEffectObject::set(unsigned key, gchar const *value) { LivePathEffectObject* object = this->livepatheffectobject; LivePathEffectObject *lpeobj = LIVEPATHEFFECT(object); @@ -182,13 +182,13 @@ void CLivePathEffectObject::onSet(unsigned key, gchar const *value) { break; } - CObject::onSet(key, value); + CObject::set(key, value); } /** * Virtual write: write object attributes to repr. */ -Inkscape::XML::Node* CLivePathEffectObject::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CLivePathEffectObject::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { LivePathEffectObject* object = this->livepatheffectobject; LivePathEffectObject *lpeobj = LIVEPATHEFFECT(object); @@ -203,7 +203,7 @@ Inkscape::XML::Node* CLivePathEffectObject::onWrite(Inkscape::XML::Document *xml lpeobj->lpe->writeParamsToSVG(); } - CObject::onWrite(xml_doc, repr, flags); + CObject::write(xml_doc, repr, flags); return repr; } diff --git a/src/live_effects/lpeobject.h b/src/live_effects/lpeobject.h index 258ccee09..f360d7bdd 100644 --- a/src/live_effects/lpeobject.h +++ b/src/live_effects/lpeobject.h @@ -64,12 +64,12 @@ public: CLivePathEffectObject(LivePathEffectObject* lpeo); virtual ~CLivePathEffectObject(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); private: LivePathEffectObject* livepatheffectobject; diff --git a/src/marker.cpp b/src/marker.cpp index 2e78876f7..f27715d92 100644 --- a/src/marker.cpp +++ b/src/marker.cpp @@ -89,7 +89,7 @@ sp_marker_init (SPMarker *marker) * * \see SPObject::build() */ -void CMarker::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CMarker::build(SPDocument *document, Inkscape::XML::Node *repr) { SPMarker* object = this->spmarker; object->readAttr( "markerUnits" ); @@ -101,10 +101,10 @@ void CMarker::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { object->readAttr( "viewBox" ); object->readAttr( "preserveAspectRatio" ); - CGroup::onBuild(document, repr); + CGroup::build(document, repr); } -void CMarker::onRelease() { +void CMarker::release() { SPMarker* object = this->spmarker; SPMarker *marker = reinterpret_cast<SPMarker *>(object); @@ -114,13 +114,13 @@ void CMarker::onRelease() { // Parent class ::hide method //reinterpret_cast<SPItemClass *>(parent_class)->hide(marker, marker->views->key); // CPPIFY: correct one? - CGroup::onHide(marker->views->key); + CGroup::hide(marker->views->key); sp_marker_view_remove (marker, marker->views, TRUE); } - CGroup::onRelease(); + CGroup::release(); } /** @@ -136,7 +136,7 @@ void CMarker::onRelease() { * \see SPObject::release() */ -void CMarker::onSet(unsigned int key, const gchar* value) { +void CMarker::set(unsigned int key, const gchar* value) { SPMarker* object = this->spmarker; SPMarker *marker = SP_MARKER(object); @@ -270,12 +270,12 @@ void CMarker::onSet(unsigned int key, const gchar* value) { } break; default: - CGroup::onSet(key, value); + CGroup::set(key, value); break; } } -void CMarker::onUpdate(SPCtx *ctx, guint flags) { +void CMarker::update(SPCtx *ctx, guint flags) { SPMarker* object = this->spmarker; SPMarker *marker = SP_MARKER(object); @@ -385,7 +385,7 @@ void CMarker::onUpdate(SPCtx *ctx, guint flags) { } // And invoke parent method - CGroup::onUpdate((SPCtx *) &rctx, flags); + CGroup::update((SPCtx *) &rctx, flags); // As last step set additional transform of drawing group for (SPMarkerView *v = marker->views; v != NULL; v = v->next) { @@ -398,7 +398,7 @@ void CMarker::onUpdate(SPCtx *ctx, guint flags) { } } -Inkscape::XML::Node* CMarker::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CMarker::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPMarker* object = this->spmarker; SPMarker *marker; @@ -453,14 +453,14 @@ Inkscape::XML::Node* CMarker::onWrite(Inkscape::XML::Document *xml_doc, Inkscape //XML Tree being used directly here while it shouldn't be.... repr->setAttribute("preserveAspectRatio", object->getRepr()->attribute("preserveAspectRatio")); - CGroup::onWrite(xml_doc, repr, flags); + CGroup::write(xml_doc, repr, flags); return repr; } -Inkscape::DrawingItem* CMarker::onShow(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) { +Inkscape::DrawingItem* CMarker::show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) { // CPPIFY: correct? - return CGroup::onShow(drawing, key, flags); + return CGroup::show(drawing, key, flags); } /** @@ -473,9 +473,9 @@ sp_marker_private_show (SPItem */*item*/, Inkscape::Drawing &/*drawing*/, unsign return NULL; } -void CMarker::onHide(unsigned int key) { +void CMarker::hide(unsigned int key) { // CPPIFY: correct? - CGroup::onHide(key); + CGroup::hide(key); } /** @@ -487,7 +487,7 @@ sp_marker_private_hide (SPItem */*item*/, unsigned int /*key*/) /* Break propagation */ } -Geom::OptRect CMarker::onBbox(Geom::Affine const &transform, SPItem::BBoxType type) { +Geom::OptRect CMarker::bbox(Geom::Affine const &transform, SPItem::BBoxType type) { return Geom::OptRect(); } @@ -501,7 +501,7 @@ sp_marker_bbox(SPItem const *, Geom::Affine const &, SPItem::BBoxType) return Geom::OptRect(); } -void CMarker::onPrint(SPPrintContext* ctx) { +void CMarker::print(SPPrintContext* ctx) { } @@ -539,7 +539,7 @@ sp_marker_show_dimension (SPMarker *marker, unsigned int key, unsigned int size) if (view && (view->items.size() != size)) { /* Free old view and allocate new */ /* Parent class ::hide method */ - marker->cmarker->onHide(key); + marker->cmarker->hide(key); sp_marker_view_remove (marker, view, TRUE); view = NULL; @@ -579,7 +579,7 @@ sp_marker_show_instance ( SPMarker *marker, Inkscape::DrawingItem *parent, } if (!v->items[pos]) { /* Parent class ::show method */ - v->items[pos] = marker->cmarker->onShow(parent->drawing(), key, SP_ITEM_REFERENCE_FLAGS); + v->items[pos] = marker->cmarker->show(parent->drawing(), key, SP_ITEM_REFERENCE_FLAGS); if (v->items[pos]) { /* fixme: Position (Lauris) */ @@ -625,7 +625,7 @@ sp_marker_hide (SPMarker *marker, unsigned int key) next = v->next; if (v->key == key) { /* Parent class ::hide method */ - marker->cmarker->onHide(key); + marker->cmarker->hide(key); sp_marker_view_remove (marker, v, TRUE); return; diff --git a/src/marker.h b/src/marker.h index 3c13498cd..6f4f1e604 100644 --- a/src/marker.h +++ b/src/marker.h @@ -79,17 +79,17 @@ public: CMarker(SPMarker* marker); virtual ~CMarker(); - virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); - virtual void onRelease(); - virtual void onSet(unsigned int key, gchar const* value); - virtual void onUpdate(SPCtx *ctx, guint flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual void build(SPDocument *document, Inkscape::XML::Node *repr); + virtual void release(); + virtual void set(unsigned int key, gchar const* value); + virtual void update(SPCtx *ctx, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - virtual Inkscape::DrawingItem* onShow(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags); - virtual void onHide(unsigned int key); + virtual Inkscape::DrawingItem* show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags); + virtual void hide(unsigned int key); - virtual Geom::OptRect onBbox(Geom::Affine const &transform, SPItem::BBoxType type); - virtual void onPrint(SPPrintContext *ctx); + virtual Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType type); + virtual void print(SPPrintContext *ctx); protected: SPMarker* spmarker; diff --git a/src/persp3d.cpp b/src/persp3d.cpp index 0fc18a717..b6012f038 100644 --- a/src/persp3d.cpp +++ b/src/persp3d.cpp @@ -86,8 +86,8 @@ persp3d_init(Persp3D *persp) /** * Virtual build: set persp3d attributes from its associated XML node. */ -void CPersp3D::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { - CObject::onBuild(document, repr); +void CPersp3D::build(SPDocument *document, Inkscape::XML::Node *repr) { + CObject::build(document, repr); Persp3D* object = this->persp3d; @@ -104,7 +104,7 @@ void CPersp3D::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { /** * Virtual release of Persp3D members before destruction. */ -void CPersp3D::onRelease() { +void CPersp3D::release() { Persp3D* object = this->persp3d; Persp3D *persp = SP_PERSP3D(object); @@ -118,7 +118,7 @@ void CPersp3D::onRelease() { */ // FIXME: Currently we only read the finite positions of vanishing points; // should we move VPs into their own repr (as it's done for SPStop, e.g.)? -void CPersp3D::onSet(unsigned key, gchar const *value) { +void CPersp3D::set(unsigned key, gchar const *value) { Persp3D* object = this->persp3d; Persp3DImpl *persp_impl = SP_PERSP3D(object)->perspective_impl; @@ -153,7 +153,7 @@ void CPersp3D::onSet(unsigned key, gchar const *value) { } } default: { - CObject::onSet(key, value); + CObject::set(key, value); break; } } @@ -169,14 +169,14 @@ void CPersp3D::onSet(unsigned key, gchar const *value) { } } -void CPersp3D::onUpdate(SPCtx *ctx, guint flags) { +void CPersp3D::update(SPCtx *ctx, guint flags) { if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) { /* TODO: Should we update anything here? */ } - CObject::onUpdate(ctx, flags); + CObject::update(ctx, flags); } Persp3D *persp3d_create_xml_element(SPDocument *document, Persp3DImpl *dup) {// if dup is given, copy the attributes over @@ -235,7 +235,7 @@ Persp3D *persp3d_document_first_persp(SPDocument *document) /** * Virtual write: write object attributes to repr. */ -Inkscape::XML::Node* CPersp3D::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CPersp3D::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { Persp3D* object = this->persp3d; Persp3DImpl *persp_impl = SP_PERSP3D(object)->perspective_impl; @@ -261,7 +261,7 @@ Inkscape::XML::Node* CPersp3D::onWrite(Inkscape::XML::Document *xml_doc, Inkscap repr->setAttribute("inkscape:persp3d-origin", str); } - CObject::onWrite(xml_doc, repr, flags); + CObject::write(xml_doc, repr, flags); return repr; } diff --git a/src/persp3d.h b/src/persp3d.h index 4c8c7a1cd..a17a50347 100644 --- a/src/persp3d.h +++ b/src/persp3d.h @@ -64,14 +64,14 @@ public: CPersp3D(Persp3D* persp3d); virtual ~CPersp3D(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); private: Persp3D* persp3d; diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index dd9e9df2d..2506c1477 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -2854,7 +2854,7 @@ static void sp_selection_to_guides_recursive(SPItem *item, bool deleteitem, bool sp_selection_to_guides_recursive(SP_ITEM(i->data), deleteitem, wholegroups); } } else { - item->citem->onConvertToGuides(); + item->citem->convert_to_guides(); if (deleteitem) { item->deleteObject(true); diff --git a/src/sp-anchor.cpp b/src/sp-anchor.cpp index a9b78cec3..846bf3c66 100644 --- a/src/sp-anchor.cpp +++ b/src/sp-anchor.cpp @@ -51,10 +51,10 @@ static void sp_anchor_init(SPAnchor *anchor) anchor->href = NULL; } -void CAnchor::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CAnchor::build(SPDocument *document, Inkscape::XML::Node *repr) { SPAnchor* object = this->spanchor; - CGroup::onBuild(document, repr); + CGroup::build(document, repr); object->readAttr( "xlink:type" ); object->readAttr( "xlink:role" ); @@ -66,7 +66,7 @@ void CAnchor::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { object->readAttr( "target" ); } -void CAnchor::onRelease() { +void CAnchor::release() { SPAnchor *anchor = this->spanchor; if (anchor->href) { @@ -74,10 +74,10 @@ void CAnchor::onRelease() { anchor->href = NULL; } - CGroup::onRelease(); + CGroup::release(); } -void CAnchor::onSet(unsigned int key, const gchar* value) { +void CAnchor::set(unsigned int key, const gchar* value) { SPAnchor *anchor = this->spanchor; SPAnchor* object = anchor; @@ -97,7 +97,7 @@ void CAnchor::onSet(unsigned int key, const gchar* value) { object->requestModified(SP_OBJECT_MODIFIED_FLAG); break; default: - CGroup::onSet(key, value); + CGroup::set(key, value); break; } } @@ -105,7 +105,7 @@ void CAnchor::onSet(unsigned int key, const gchar* value) { #define COPY_ATTR(rd,rs,key) (rd)->setAttribute((key), rs->attribute(key)); -Inkscape::XML::Node* CAnchor::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CAnchor::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPAnchor *anchor = this->spanchor; SPAnchor* object = anchor; @@ -127,12 +127,12 @@ Inkscape::XML::Node* CAnchor::onWrite(Inkscape::XML::Document *xml_doc, Inkscape COPY_ATTR(repr, object->getRepr(), "target"); } - CGroup::onWrite(xml_doc, repr, flags); + CGroup::write(xml_doc, repr, flags); return repr; } -gchar* CAnchor::onDescription() { +gchar* CAnchor::description() { SPAnchor *anchor = this->spanchor; if (anchor->href) { @@ -146,7 +146,7 @@ gchar* CAnchor::onDescription() { } /* fixme: We should forward event to appropriate container/view */ -gint CAnchor::onEvent(SPEvent* event) { +gint CAnchor::event(SPEvent* event) { SPAnchor *anchor = this->spanchor; switch (event->type) { diff --git a/src/sp-anchor.h b/src/sp-anchor.h index 48851b720..1fbe3950d 100644 --- a/src/sp-anchor.h +++ b/src/sp-anchor.h @@ -40,13 +40,13 @@ public: CAnchor(SPAnchor* anchor); virtual ~CAnchor(); - virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); - virtual void onRelease(); - virtual void onSet(unsigned int key, gchar const* value); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual void build(SPDocument *document, Inkscape::XML::Node *repr); + virtual void release(); + virtual void set(unsigned int key, gchar const* value); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - virtual gchar* onDescription(); - virtual gint onEvent(SPEvent *event); + virtual gchar* description(); + virtual gint event(SPEvent *event); protected: SPAnchor* spanchor; diff --git a/src/sp-clippath.cpp b/src/sp-clippath.cpp index af19cf24b..18ea91cc2 100644 --- a/src/sp-clippath.cpp +++ b/src/sp-clippath.cpp @@ -69,10 +69,10 @@ sp_clippath_init(SPClipPath *cp) cp->display = NULL; } -void CClipPath::onBuild(SPDocument* doc, Inkscape::XML::Node* repr) { +void CClipPath::build(SPDocument* doc, Inkscape::XML::Node* repr) { SPClipPath* object = this->spclippath; - CObjectGroup::onBuild(doc, repr); + CObjectGroup::build(doc, repr); object->readAttr( "style" ); object->readAttr( "clipPathUnits" ); @@ -81,7 +81,7 @@ void CClipPath::onBuild(SPDocument* doc, Inkscape::XML::Node* repr) { doc->addResource("clipPath", object); } -void CClipPath::onRelease() { +void CClipPath::release() { SPClipPath* object = this->spclippath; if (object->document) { @@ -95,10 +95,10 @@ void CClipPath::onRelease() { cp->display = sp_clippath_view_list_remove(cp->display, cp->display); } - CObjectGroup::onRelease(); + CObjectGroup::release(); } -void CClipPath::onSet(unsigned int key, const gchar* value) { +void CClipPath::set(unsigned int key, const gchar* value) { SPClipPath* object = this->spclippath; SPClipPath *cp = SP_CLIPPATH(object); @@ -122,17 +122,17 @@ void CClipPath::onSet(unsigned int key, const gchar* value) { sp_style_read_from_object(object->style, object); object->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG); } else { - CObjectGroup::onSet(key, value); + CObjectGroup::set(key, value); } break; } } -void CClipPath::onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref) { +void CClipPath::child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref) { SPClipPath* object = this->spclippath; /* Invoke SPObjectGroup implementation */ - CObjectGroup::onChildAdded(child, ref); + CObjectGroup::child_added(child, ref); /* Show new object */ SPObject *ochild = object->document->getObjectByRepr(child); @@ -149,7 +149,7 @@ void CClipPath::onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* re } } -void CClipPath::onUpdate(SPCtx* ctx, unsigned int flags) { +void CClipPath::update(SPCtx* ctx, unsigned int flags) { SPClipPath* object = this->spclippath; if (flags & SP_OBJECT_MODIFIED_FLAG) { @@ -187,7 +187,7 @@ void CClipPath::onUpdate(SPCtx* ctx, unsigned int flags) { } } -void CClipPath::onModified(unsigned int flags) { +void CClipPath::modified(unsigned int flags) { SPClipPath* object = this->spclippath; if (flags & SP_OBJECT_MODIFIED_FLAG) { @@ -213,12 +213,12 @@ void CClipPath::onModified(unsigned int flags) { } } -Inkscape::XML::Node* CClipPath::onWrite(Inkscape::XML::Document* xml_doc, Inkscape::XML::Node* repr, guint flags) { +Inkscape::XML::Node* CClipPath::write(Inkscape::XML::Document* xml_doc, Inkscape::XML::Node* repr, guint flags) { if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) { repr = xml_doc->createElement("svg:clipPath"); } - CObjectGroup::onWrite(xml_doc, repr, flags); + CObjectGroup::write(xml_doc, repr, flags); return repr; } diff --git a/src/sp-clippath.h b/src/sp-clippath.h index e0236cace..231c72581 100644 --- a/src/sp-clippath.h +++ b/src/sp-clippath.h @@ -75,17 +75,17 @@ public: CClipPath(SPClipPath* clippath); virtual ~CClipPath(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); + virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); - virtual void onModified(unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); + virtual void modified(unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); protected: SPClipPath* spclippath; diff --git a/src/sp-defs.cpp b/src/sp-defs.cpp index 80df6422f..ef3c7182b 100644 --- a/src/sp-defs.cpp +++ b/src/sp-defs.cpp @@ -47,11 +47,11 @@ CDefs::~CDefs() { -void CDefs::onRelease() { - CObject::onRelease(); +void CDefs::release() { + CObject::release(); } -void CDefs::onUpdate(SPCtx *ctx, guint flags) { +void CDefs::update(SPCtx *ctx, guint flags) { SPDefs* object = this->spdefs; if (flags & SP_OBJECT_MODIFIED_FLAG) { @@ -71,7 +71,7 @@ void CDefs::onUpdate(SPCtx *ctx, guint flags) { } } -void CDefs::onModified(unsigned int flags) { +void CDefs::modified(unsigned int flags) { SPDefs* object = this->spdefs; if (flags & SP_OBJECT_MODIFIED_FLAG) { @@ -98,7 +98,7 @@ void CDefs::onModified(unsigned int flags) { } } -Inkscape::XML::Node* CDefs::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CDefs::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPDefs* object = this->spdefs; if (flags & SP_OBJECT_WRITE_BUILD) { @@ -127,7 +127,7 @@ Inkscape::XML::Node* CDefs::onWrite(Inkscape::XML::Document *xml_doc, Inkscape:: } } - CObject::onWrite(xml_doc, repr, flags); + CObject::write(xml_doc, repr, flags); return repr; } diff --git a/src/sp-defs.h b/src/sp-defs.h index 0e74dc17e..b2c3f8b0e 100644 --- a/src/sp-defs.h +++ b/src/sp-defs.h @@ -47,10 +47,10 @@ public: CDefs(SPDefs* defs); virtual ~CDefs(); - virtual void onRelease(); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); - virtual void onModified(unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual void release(); + virtual void update(SPCtx* ctx, unsigned int flags); + virtual void modified(unsigned int flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); protected: SPDefs* spdefs; diff --git a/src/sp-desc.cpp b/src/sp-desc.cpp index 3bbaa839c..41619eb87 100644 --- a/src/sp-desc.cpp +++ b/src/sp-desc.cpp @@ -39,14 +39,14 @@ static void sp_desc_init(SPDesc *desc) desc->cobject = desc->cdesc; } -Inkscape::XML::Node* CDesc::onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags) { +Inkscape::XML::Node* CDesc::write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags) { SPDesc* object = this->spdesc; if (!repr) { repr = object->getRepr()->duplicate(doc); } - CObject::onWrite(doc, repr, flags); + CObject::write(doc, repr, flags); return repr; } diff --git a/src/sp-desc.h b/src/sp-desc.h index 5b52ecda3..3f8f346e6 100644 --- a/src/sp-desc.h +++ b/src/sp-desc.h @@ -34,7 +34,7 @@ public: CDesc(SPDesc* desc); virtual ~CDesc(); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); protected: SPDesc* spdesc; diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp index 42a85080f..29f7f0397 100644 --- a/src/sp-ellipse.cpp +++ b/src/sp-ellipse.cpp @@ -100,7 +100,7 @@ sp_genericellipse_init(SPGenericEllipse *ellipse) ellipse->closed = TRUE; } -void CGenericEllipse::onUpdate(SPCtx *ctx, guint flags) { +void CGenericEllipse::update(SPCtx *ctx, guint flags) { SPGenericEllipse* object = this->spgenericEllipse; if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) { @@ -120,12 +120,12 @@ void CGenericEllipse::onUpdate(SPCtx *ctx, guint flags) { static_cast<SPShape *>(object)->setShape(); } - CShape::onUpdate(ctx, flags); + CShape::update(ctx, flags); } -void CGenericEllipse::onUpdatePatheffect(bool write) { +void CGenericEllipse::update_patheffect(bool write) { SPShape *shape = this->spgenericEllipse; - this->onSetShape(); + this->set_shape(); if (write) { Inkscape::XML::Node *repr = shape->getRepr(); @@ -143,7 +143,7 @@ void CGenericEllipse::onUpdatePatheffect(bool write) { /* fixme: Think (Lauris) */ /* Can't we use arcto in this method? */ -void CGenericEllipse::onSetShape() { +void CGenericEllipse::set_shape() { SPGenericEllipse* shape = this->spgenericEllipse; if (sp_lpe_item_has_broken_path_effect(SP_LPE_ITEM(shape))) { @@ -233,7 +233,7 @@ void CGenericEllipse::onSetShape() { curve->unref(); } -void CGenericEllipse::onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { +void CGenericEllipse::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { SPGenericEllipse* item = this->spgenericEllipse; g_assert(item != NULL); @@ -316,7 +316,7 @@ sp_genericellipse_normalize(SPGenericEllipse *ellipse) /* Now we keep: 0 <= start < end <= 2*PI */ } -Inkscape::XML::Node* CGenericEllipse::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CGenericEllipse::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPGenericEllipse *ellipse = this->spgenericEllipse; SPGenericEllipse* object = ellipse; @@ -334,9 +334,9 @@ Inkscape::XML::Node* CGenericEllipse::onWrite(Inkscape::XML::Document *xml_doc, sp_arc_set_elliptical_path_attribute(SP_ARC(object), object->getRepr()); } } - this->onSetShape(); // evaluate SPCurve + this->set_shape(); // evaluate SPCurve - CShape::onWrite(xml_doc, repr, flags); + CShape::write(xml_doc, repr, flags); return repr; } @@ -369,8 +369,8 @@ sp_ellipse_init(SPEllipse *ellipse) ellipse->cobject = ellipse->cellipse; } -void CEllipse::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { - CGenericEllipse::onBuild(document, repr); +void CEllipse::build(SPDocument *document, Inkscape::XML::Node *repr) { + CGenericEllipse::build(document, repr); SPEllipse* object = this->spellipse; object->readAttr( "cx" ); @@ -380,7 +380,7 @@ void CEllipse::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { } -Inkscape::XML::Node* CEllipse::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CEllipse::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPGenericEllipse *ellipse = this->spellipse; if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) { @@ -392,13 +392,13 @@ Inkscape::XML::Node* CEllipse::onWrite(Inkscape::XML::Document *xml_doc, Inkscap sp_repr_set_svg_double(repr, "rx", ellipse->rx.computed); sp_repr_set_svg_double(repr, "ry", ellipse->ry.computed); - CGenericEllipse::onWrite(xml_doc, repr, flags); + CGenericEllipse::write(xml_doc, repr, flags); return repr; } -void CEllipse::onSet(unsigned int key, gchar const* value) { +void CEllipse::set(unsigned int key, gchar const* value) { SPEllipse *ellipse = this->spellipse; SPEllipse* object = (SPEllipse*)ellipse; @@ -424,12 +424,12 @@ void CEllipse::onSet(unsigned int key, gchar const* value) { object->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); break; default: - CGenericEllipse::onSet(key, value); + CGenericEllipse::set(key, value); break; } } -gchar* CEllipse::onDescription() { +gchar* CEllipse::description() { return g_strdup(_("<b>Ellipse</b>")); } @@ -481,10 +481,10 @@ sp_circle_init(SPCircle *circle) circle->cobject = circle->ccircle; } -void CCircle::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CCircle::build(SPDocument *document, Inkscape::XML::Node *repr) { SPCircle* object = this->spcircle; - CGenericEllipse::onBuild(document, repr); + CGenericEllipse::build(document, repr); object->readAttr( "cx" ); object->readAttr( "cy" ); @@ -492,7 +492,7 @@ void CCircle::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { } -Inkscape::XML::Node* CCircle::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CCircle::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPGenericEllipse *ellipse = this->spcircle; if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) { @@ -503,13 +503,13 @@ Inkscape::XML::Node* CCircle::onWrite(Inkscape::XML::Document *xml_doc, Inkscape sp_repr_set_svg_double(repr, "cy", ellipse->cy.computed); sp_repr_set_svg_double(repr, "r", ellipse->rx.computed); - CGenericEllipse::onWrite(xml_doc, repr, flags); + CGenericEllipse::write(xml_doc, repr, flags); return repr; } -void CCircle::onSet(unsigned int key, gchar const* value) { +void CCircle::set(unsigned int key, gchar const* value) { SPGenericEllipse *ge = this->spcircle; SPCircle* object = (SPCircle*)ge; @@ -530,12 +530,12 @@ void CCircle::onSet(unsigned int key, gchar const* value) { object->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); break; default: - CGenericEllipse::onSet(key, value); + CGenericEllipse::set(key, value); break; } } -gchar* CCircle::onDescription() { +gchar* CCircle::description() { return g_strdup(_("<b>Circle</b>")); } @@ -568,10 +568,10 @@ sp_arc_init(SPArc *arc) arc->cobject = arc->carc; } -void CArc::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CArc::build(SPDocument *document, Inkscape::XML::Node *repr) { SPArc* object = this->sparc; - CGenericEllipse::onBuild(document, repr); + CGenericEllipse::build(document, repr); object->readAttr( "sodipodi:cx" ); object->readAttr( "sodipodi:cy" ); @@ -625,7 +625,7 @@ sp_arc_set_elliptical_path_attribute(SPArc *arc, Inkscape::XML::Node *repr) return true; } -Inkscape::XML::Node* CArc::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CArc::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPArc* object = this->sparc; SPGenericEllipse *ge = object; SPArc *arc = object; @@ -658,12 +658,12 @@ Inkscape::XML::Node* CArc::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::X // write d= sp_arc_set_elliptical_path_attribute(arc, repr); - CGenericEllipse::onWrite(xml_doc, repr, flags); + CGenericEllipse::write(xml_doc, repr, flags); return repr; } -void CArc::onSet(unsigned int key, gchar const* value) { +void CArc::set(unsigned int key, gchar const* value) { SPArc* object = this->sparc; SPGenericEllipse *ge = object; @@ -709,23 +709,23 @@ void CArc::onSet(unsigned int key, gchar const* value) { object->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); break; default: - CGenericEllipse::onSet(key, value); + CGenericEllipse::set(key, value); break; } } -void CArc::onModified(guint flags) { +void CArc::modified(guint flags) { SPArc* object = this->sparc; if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) { ((SPShape *) object)->setShape(); } - CGenericEllipse::onModified(flags); + CGenericEllipse::modified(flags); } -gchar* CArc::onDescription() { +gchar* CArc::description() { SPArc* item = this->sparc; SPGenericEllipse *ge = item; diff --git a/src/sp-ellipse.h b/src/sp-ellipse.h index b9c60dfa0..70e1e9618 100644 --- a/src/sp-ellipse.h +++ b/src/sp-ellipse.h @@ -52,13 +52,13 @@ public: CGenericEllipse(SPGenericEllipse* genericEllipse); virtual ~CGenericEllipse(); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual void update(SPCtx* ctx, unsigned int flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - virtual void onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); - virtual void onSetShape(); + virtual void snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); + virtual void set_shape(); - virtual void onUpdatePatheffect(bool write); + virtual void update_patheffect(bool write); protected: SPGenericEllipse* spgenericEllipse; @@ -95,10 +95,10 @@ public: CEllipse(SPEllipse* ellipse); virtual ~CEllipse(); - virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - virtual void onSet(unsigned int key, gchar const* value); - virtual gchar* onDescription(); + virtual void build(SPDocument *document, Inkscape::XML::Node *repr); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual void set(unsigned int key, gchar const* value); + virtual gchar* description(); protected: SPEllipse* spellipse; @@ -134,10 +134,10 @@ public: CCircle(SPCircle* circle); virtual ~CCircle(); - virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - virtual void onSet(unsigned int key, gchar const* value); - virtual gchar* onDescription(); + virtual void build(SPDocument *document, Inkscape::XML::Node *repr); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual void set(unsigned int key, gchar const* value); + virtual gchar* description(); protected: SPCircle* spcircle; @@ -171,11 +171,11 @@ public: CArc(SPArc* arc); virtual ~CArc(); - virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - virtual void onSet(unsigned int key, gchar const* value); - virtual gchar* onDescription(); - virtual void onModified(unsigned int flags); + virtual void build(SPDocument *document, Inkscape::XML::Node *repr); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual void set(unsigned int key, gchar const* value); + virtual gchar* description(); + virtual void modified(unsigned int flags); protected: SPArc* sparc; diff --git a/src/sp-filter-primitive.cpp b/src/sp-filter-primitive.cpp index 4842330ba..34f028518 100644 --- a/src/sp-filter-primitive.cpp +++ b/src/sp-filter-primitive.cpp @@ -68,7 +68,7 @@ CFilterPrimitive::~CFilterPrimitive() { } // CPPIFY: Make pure virtual. -void CFilterPrimitive::onBuildRenderer(Inkscape::Filters::Filter* filter) { +void CFilterPrimitive::build_renderer(Inkscape::Filters::Filter* filter) { // throw; } @@ -98,7 +98,7 @@ static void sp_filter_primitive_init(SPFilterPrimitive *filter_primitive) * our name must be associated with a repr via "sp_object_type_register". Best done through * sp-object-repr.cpp's repr_name_entries array. */ -void CFilterPrimitive::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CFilterPrimitive::build(SPDocument *document, Inkscape::XML::Node *repr) { SPFilterPrimitive* object = this->spfilterprimitive; object->readAttr( "style" ); // struct not derived from SPItem, we need to do this ourselves. @@ -109,20 +109,20 @@ void CFilterPrimitive::onBuild(SPDocument *document, Inkscape::XML::Node *repr) object->readAttr( "width" ); object->readAttr( "height" ); - CObject::onBuild(document, repr); + CObject::build(document, repr); } /** * Drops any allocated memory. */ -void CFilterPrimitive::onRelease() { - CObject::onRelease(); +void CFilterPrimitive::release() { + CObject::release(); } /** * Sets a specific value in the SPFilterPrimitive. */ -void CFilterPrimitive::onSet(unsigned int key, gchar const *value) { +void CFilterPrimitive::set(unsigned int key, gchar const *value) { SPFilterPrimitive* object = this->spfilterprimitive; SPFilterPrimitive *filter_primitive = SP_FILTER_PRIMITIVE(object); @@ -172,13 +172,13 @@ void CFilterPrimitive::onSet(unsigned int key, gchar const *value) { } /* See if any parents need this value. */ - CObject::onSet(key, value); + CObject::set(key, value); } /** * Receives update notifications. */ -void CFilterPrimitive::onUpdate(SPCtx *ctx, guint flags) { +void CFilterPrimitive::update(SPCtx *ctx, guint flags) { SPFilterPrimitive* object = this->spfilterprimitive; //SPFilterPrimitive *filter_primitive = SP_FILTER_PRIMITIVE(object); @@ -194,13 +194,13 @@ void CFilterPrimitive::onUpdate(SPCtx *ctx, guint flags) { object->readAttr( "height" ); } - CObject::onUpdate(ctx, flags); + CObject::update(ctx, flags); } /** * Writes its settings to an incoming repr object, if any. */ -Inkscape::XML::Node* CFilterPrimitive::onWrite(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CFilterPrimitive::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { SPFilterPrimitive* object = this->spfilterprimitive; SPFilterPrimitive *prim = SP_FILTER_PRIMITIVE(object); @@ -217,7 +217,7 @@ Inkscape::XML::Node* CFilterPrimitive::onWrite(Inkscape::XML::Document *doc, Ink repr->setAttribute("result", out_name); /* Do we need to add x,y,width,height? */ - CObject::onWrite(doc, repr, flags); + CObject::write(doc, repr, flags); return repr; } diff --git a/src/sp-filter-primitive.h b/src/sp-filter-primitive.h index 3befb0935..abf0659e9 100644 --- a/src/sp-filter-primitive.h +++ b/src/sp-filter-primitive.h @@ -50,16 +50,16 @@ public: CFilterPrimitive(SPFilterPrimitive* fp); virtual ~CFilterPrimitive(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); - virtual void onBuildRenderer(Inkscape::Filters::Filter* filter); + virtual void build_renderer(Inkscape::Filters::Filter* filter); private: SPFilterPrimitive* spfilterprimitive; diff --git a/src/sp-filter.cpp b/src/sp-filter.cpp index 01328adbe..0f9d47478 100644 --- a/src/sp-filter.cpp +++ b/src/sp-filter.cpp @@ -92,7 +92,7 @@ sp_filter_init(SPFilter *filter) * our name must be associated with a repr via "sp_object_type_register". Best done through * sp-object-repr.cpp's repr_name_entries array. */ -void CFilter::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CFilter::build(SPDocument *document, Inkscape::XML::Node *repr) { SPFilter* object = this->spfilter; //Read values of key attributes from XML nodes into object. @@ -106,7 +106,7 @@ void CFilter::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { object->readAttr( "filterRes" ); object->readAttr( "xlink:href" ); - CObject::onBuild(document, repr); + CObject::build(document, repr); //is this necessary? document->addResource("filter", object); @@ -115,7 +115,7 @@ void CFilter::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { /** * Drops any allocated memory. */ -void CFilter::onRelease() { +void CFilter::release() { SPFilter* object = this->spfilter; SPFilter *filter = SP_FILTER(object); @@ -137,13 +137,13 @@ void CFilter::onRelease() { filter->modified_connection.~connection(); delete filter->_image_name; - CObject::onRelease(); + CObject::release(); } /** * Sets a specific value in the SPFilter. */ -void CFilter::onSet(unsigned int key, gchar const *value) { +void CFilter::set(unsigned int key, gchar const *value) { SPFilter* object = this->spfilter; SPFilter *filter = SP_FILTER(object); @@ -210,7 +210,7 @@ void CFilter::onSet(unsigned int key, gchar const *value) { break; default: // See if any parents need this value. - CObject::onSet(key, value); + CObject::set(key, value); break; } } @@ -218,7 +218,7 @@ void CFilter::onSet(unsigned int key, gchar const *value) { /** * Receives update notifications. */ -void CFilter::onUpdate(SPCtx *ctx, guint flags) { +void CFilter::update(SPCtx *ctx, guint flags) { //SPFilter *filter = SP_FILTER(object); if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | @@ -228,13 +228,13 @@ void CFilter::onUpdate(SPCtx *ctx, guint flags) { } - CObject::onUpdate(ctx, flags); + CObject::update(ctx, flags); } /** * Writes its settings to an incoming repr object, if any. */ -Inkscape::XML::Node* CFilter::onWrite(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CFilter::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { SPFilter* object = this->spfilter; SPFilter *filter = SP_FILTER(object); @@ -321,7 +321,7 @@ Inkscape::XML::Node* CFilter::onWrite(Inkscape::XML::Document *doc, Inkscape::XM g_free(uri_string); } - CObject::onWrite(doc, repr, flags); + CObject::write(doc, repr, flags); return repr; } @@ -354,11 +354,11 @@ static void filter_ref_modified(SPObject */*href*/, guint /*flags*/, SPFilter *f /** * Callback for child_added event. */ -void CFilter::onChildAdded(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { +void CFilter::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { SPFilter* object = this->spfilter; //SPFilter *f = SP_FILTER(object); - CObject::onChildAdded(child, ref); + CObject::child_added(child, ref); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } @@ -366,11 +366,11 @@ void CFilter::onChildAdded(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) /** * Callback for remove_child event. */ -void CFilter::onRemoveChild(Inkscape::XML::Node *child) { +void CFilter::remove_child(Inkscape::XML::Node *child) { SPFilter* object = this->spfilter; // SPFilter *f = SP_FILTER(object); - CObject::onRemoveChild(child); + CObject::remove_child(child); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } @@ -410,7 +410,7 @@ void sp_filter_build_renderer(SPFilter *sp_filter, Inkscape::Filters::Filter *nr // } else { // g_warning("Cannot build filter renderer: missing builder"); // } // CPPIFY: => FilterPrimitive should be abstract. - primitive->cfilterprimitive->onBuildRenderer(nr_filter); + primitive->cfilterprimitive->build_renderer(nr_filter); } primitive_obj = primitive_obj->next; } diff --git a/src/sp-filter.h b/src/sp-filter.h index 2967b1b7d..0db572225 100644 --- a/src/sp-filter.h +++ b/src/sp-filter.h @@ -72,17 +72,17 @@ public: CFilter(SPFilter* filter); virtual ~CFilter(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); - virtual void onRemoveChild(Inkscape::XML::Node* child); + virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); + virtual void remove_child(Inkscape::XML::Node* child); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); private: SPFilter* spfilter; diff --git a/src/sp-flowdiv.cpp b/src/sp-flowdiv.cpp index 93bc4f1ec..90c0e8795 100644 --- a/src/sp-flowdiv.cpp +++ b/src/sp-flowdiv.cpp @@ -42,17 +42,17 @@ static void sp_flowdiv_init(SPFlowdiv *group) group->cobject = group->cflowdiv; } -void CFlowdiv::onRelease() { - CItem::onRelease(); +void CFlowdiv::release() { + CItem::release(); } -void CFlowdiv::onUpdate(SPCtx *ctx, unsigned int flags) { +void CFlowdiv::update(SPCtx *ctx, unsigned int flags) { SPFlowdiv* object = this->spflowdiv; SPItemCtx *ictx = reinterpret_cast<SPItemCtx *>(ctx); SPItemCtx cctx = *ictx; - CItem::onUpdate(ctx, flags); + CItem::update(ctx, flags); if (flags & SP_OBJECT_MODIFIED_FLAG) { flags |= SP_OBJECT_PARENT_MODIFIED_FLAG; @@ -82,10 +82,10 @@ void CFlowdiv::onUpdate(SPCtx *ctx, unsigned int flags) { } } -void CFlowdiv::onModified(unsigned int flags) { +void CFlowdiv::modified(unsigned int flags) { SPFlowdiv* object = this->spflowdiv; - CItem::onModified(flags); + CItem::modified(flags); if (flags & SP_OBJECT_MODIFIED_FLAG) { flags |= SP_OBJECT_PARENT_MODIFIED_FLAG; @@ -109,20 +109,20 @@ void CFlowdiv::onModified(unsigned int flags) { } -void CFlowdiv::onBuild(SPDocument *doc, Inkscape::XML::Node *repr) { +void CFlowdiv::build(SPDocument *doc, Inkscape::XML::Node *repr) { SPFlowdiv* object = this->spflowdiv; object->_requireSVGVersion(Inkscape::Version(1, 2)); - CItem::onBuild(doc, repr); + CItem::build(doc, repr); } -void CFlowdiv::onSet(unsigned int key, const gchar* value) { - CItem::onSet(key, value); +void CFlowdiv::set(unsigned int key, const gchar* value) { + CItem::set(key, value); } -Inkscape::XML::Node* CFlowdiv::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CFlowdiv::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPFlowdiv* object = this->spflowdiv; if ( flags & SP_OBJECT_WRITE_BUILD ) { @@ -160,7 +160,7 @@ Inkscape::XML::Node* CFlowdiv::onWrite(Inkscape::XML::Document *xml_doc, Inkscap } } - CItem::onWrite(xml_doc, repr, flags); + CItem::write(xml_doc, repr, flags); return repr; } @@ -191,17 +191,17 @@ static void sp_flowtspan_init(SPFlowtspan *group) group->cobject = group->cflowtspan; } -void CFlowtspan::onRelease() { - CItem::onRelease(); +void CFlowtspan::release() { + CItem::release(); } -void CFlowtspan::onUpdate(SPCtx *ctx, unsigned int flags) { +void CFlowtspan::update(SPCtx *ctx, unsigned int flags) { SPFlowtspan* object = this->spflowtspan; SPItemCtx *ictx = reinterpret_cast<SPItemCtx *>(ctx); SPItemCtx cctx = *ictx; - CItem::onUpdate(ctx, flags); + CItem::update(ctx, flags); if (flags & SP_OBJECT_MODIFIED_FLAG) { flags |= SP_OBJECT_PARENT_MODIFIED_FLAG; @@ -231,10 +231,10 @@ void CFlowtspan::onUpdate(SPCtx *ctx, unsigned int flags) { } } -void CFlowtspan::onModified(unsigned int flags) { +void CFlowtspan::modified(unsigned int flags) { SPFlowtspan* object = this->spflowtspan; - CItem::onModified(flags); + CItem::modified(flags); if (flags & SP_OBJECT_MODIFIED_FLAG) { flags |= SP_OBJECT_PARENT_MODIFIED_FLAG; @@ -258,16 +258,16 @@ void CFlowtspan::onModified(unsigned int flags) { } -void CFlowtspan::onBuild(SPDocument *doc, Inkscape::XML::Node *repr) +void CFlowtspan::build(SPDocument *doc, Inkscape::XML::Node *repr) { - CItem::onBuild(doc, repr); + CItem::build(doc, repr); } -void CFlowtspan::onSet(unsigned int key, const gchar* value) { - CItem::onSet(key, value); +void CFlowtspan::set(unsigned int key, const gchar* value) { + CItem::set(key, value); } -Inkscape::XML::Node *CFlowtspan::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) +Inkscape::XML::Node *CFlowtspan::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPFlowtspan* object = this->spflowtspan; @@ -306,7 +306,7 @@ Inkscape::XML::Node *CFlowtspan::onWrite(Inkscape::XML::Document *xml_doc, Inksc } } - CItem::onWrite(xml_doc, repr, flags); + CItem::write(xml_doc, repr, flags); return repr; } @@ -339,19 +339,19 @@ static void sp_flowpara_init (SPFlowpara *group) group->cobject = group->cflowpara; } -void CFlowpara::onRelease() { - CItem::onRelease(); +void CFlowpara::release() { + CItem::release(); } -void CFlowpara::onUpdate(SPCtx *ctx, unsigned int flags) +void CFlowpara::update(SPCtx *ctx, unsigned int flags) { SPFlowpara* object = this->spflowpara; SPItemCtx *ictx = reinterpret_cast<SPItemCtx *>(ctx); SPItemCtx cctx = *ictx; - CItem::onUpdate(ctx, flags); + CItem::update(ctx, flags); if (flags & SP_OBJECT_MODIFIED_FLAG) { flags |= SP_OBJECT_PARENT_MODIFIED_FLAG; @@ -381,10 +381,10 @@ void CFlowpara::onUpdate(SPCtx *ctx, unsigned int flags) } } -void CFlowpara::onModified(unsigned int flags) { +void CFlowpara::modified(unsigned int flags) { SPFlowpara* object = this->spflowpara; - CItem::onModified(flags); + CItem::modified(flags); if (flags & SP_OBJECT_MODIFIED_FLAG) { flags |= SP_OBJECT_PARENT_MODIFIED_FLAG; @@ -408,16 +408,16 @@ void CFlowpara::onModified(unsigned int flags) { } -void CFlowpara::onBuild(SPDocument *doc, Inkscape::XML::Node *repr) +void CFlowpara::build(SPDocument *doc, Inkscape::XML::Node *repr) { - CItem::onBuild(doc, repr); + CItem::build(doc, repr); } -void CFlowpara::onSet(unsigned int key, const gchar* value) { - CItem::onSet(key, value); +void CFlowpara::set(unsigned int key, const gchar* value) { + CItem::set(key, value); } -Inkscape::XML::Node *CFlowpara::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) +Inkscape::XML::Node *CFlowpara::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPFlowpara* object = this->spflowpara; @@ -454,7 +454,7 @@ Inkscape::XML::Node *CFlowpara::onWrite(Inkscape::XML::Document *xml_doc, Inksca } } - CItem::onWrite(xml_doc, repr, flags); + CItem::write(xml_doc, repr, flags); return repr; } @@ -484,13 +484,13 @@ static void sp_flowline_init(SPFlowline *group) group->cobject = group->cflowline; } -void CFlowline::onRelease() { - CObject::onRelease(); +void CFlowline::release() { + CObject::release(); } -void CFlowline::onModified(unsigned int flags) { - CObject::onModified(flags); +void CFlowline::modified(unsigned int flags) { + CObject::modified(flags); if (flags & SP_OBJECT_MODIFIED_FLAG) { flags |= SP_OBJECT_PARENT_MODIFIED_FLAG; @@ -498,7 +498,7 @@ void CFlowline::onModified(unsigned int flags) { flags &= SP_OBJECT_MODIFIED_CASCADE; } -Inkscape::XML::Node *CFlowline::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) +Inkscape::XML::Node *CFlowline::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { if ( flags & SP_OBJECT_WRITE_BUILD ) { if ( repr == NULL ) { @@ -507,7 +507,7 @@ Inkscape::XML::Node *CFlowline::onWrite(Inkscape::XML::Document *xml_doc, Inksca } else { } - CObject::onWrite(xml_doc, repr, flags); + CObject::write(xml_doc, repr, flags); return repr; } @@ -537,12 +537,12 @@ static void sp_flowregionbreak_init(SPFlowregionbreak *group) group->cobject = group->cflowregionbreak; } -void CFlowregionbreak::onRelease() { - CObject::onRelease(); +void CFlowregionbreak::release() { + CObject::release(); } -void CFlowregionbreak::onModified(unsigned int flags) { - CObject::onModified(flags); +void CFlowregionbreak::modified(unsigned int flags) { + CObject::modified(flags); if (flags & SP_OBJECT_MODIFIED_FLAG) { flags |= SP_OBJECT_PARENT_MODIFIED_FLAG; @@ -550,7 +550,7 @@ void CFlowregionbreak::onModified(unsigned int flags) { flags &= SP_OBJECT_MODIFIED_CASCADE; } -Inkscape::XML::Node *CFlowregionbreak::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) +Inkscape::XML::Node *CFlowregionbreak::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { if ( flags & SP_OBJECT_WRITE_BUILD ) { if ( repr == NULL ) { @@ -559,7 +559,7 @@ Inkscape::XML::Node *CFlowregionbreak::onWrite(Inkscape::XML::Document *xml_doc, } else { } - CObject::onWrite(xml_doc, repr, flags); + CObject::write(xml_doc, repr, flags); return repr; } diff --git a/src/sp-flowdiv.h b/src/sp-flowdiv.h index 4414be338..5b1e49f85 100644 --- a/src/sp-flowdiv.h +++ b/src/sp-flowdiv.h @@ -96,13 +96,13 @@ public: CFlowdiv(SPFlowdiv* flowdiv); virtual ~CFlowdiv(); - virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); - virtual void onRelease(); - virtual void onUpdate(SPCtx* ctx, guint flags); - virtual void onModified(unsigned int flags); + virtual void build(SPDocument *document, Inkscape::XML::Node *repr); + virtual void release(); + virtual void update(SPCtx* ctx, guint flags); + virtual void modified(unsigned int flags); - virtual void onSet(unsigned int key, gchar const* value); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual void set(unsigned int key, gchar const* value); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); protected: SPFlowdiv* spflowdiv; @@ -113,13 +113,13 @@ public: CFlowtspan(SPFlowtspan* flowtspan); virtual ~CFlowtspan(); - virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); - virtual void onRelease(); - virtual void onUpdate(SPCtx* ctx, guint flags); - virtual void onModified(unsigned int flags); + virtual void build(SPDocument *document, Inkscape::XML::Node *repr); + virtual void release(); + virtual void update(SPCtx* ctx, guint flags); + virtual void modified(unsigned int flags); - virtual void onSet(unsigned int key, gchar const* value); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual void set(unsigned int key, gchar const* value); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); protected: SPFlowtspan* spflowtspan; @@ -130,13 +130,13 @@ public: CFlowpara(SPFlowpara* flowpara); virtual ~CFlowpara(); - virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); - virtual void onRelease(); - virtual void onUpdate(SPCtx* ctx, guint flags); - virtual void onModified(unsigned int flags); + virtual void build(SPDocument *document, Inkscape::XML::Node *repr); + virtual void release(); + virtual void update(SPCtx* ctx, guint flags); + virtual void modified(unsigned int flags); - virtual void onSet(unsigned int key, gchar const* value); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual void set(unsigned int key, gchar const* value); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); protected: SPFlowpara* spflowpara; @@ -147,10 +147,10 @@ public: CFlowline(SPFlowline* flowline); virtual ~CFlowline(); - virtual void onRelease(); - virtual void onModified(unsigned int flags); + virtual void release(); + virtual void modified(unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); protected: SPFlowline* spflowline; @@ -161,10 +161,10 @@ public: CFlowregionbreak(SPFlowregionbreak* flowregionbreak); virtual ~CFlowregionbreak(); - virtual void onRelease(); - virtual void onModified(unsigned int flags); + virtual void release(); + virtual void modified(unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); protected: SPFlowregionbreak* spflowregionbreak; diff --git a/src/sp-flowregion.cpp b/src/sp-flowregion.cpp index 4208a0ed0..da30db7d3 100644 --- a/src/sp-flowregion.cpp +++ b/src/sp-flowregion.cpp @@ -71,26 +71,26 @@ sp_flowregion_dispose(GObject *object) group->computed.~vector<Shape*>(); } -void CFlowregion::onChildAdded(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { +void CFlowregion::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { SPFlowregion* object = this->spflowregion; - CItem::onChildAdded(child, ref); + CItem::child_added(child, ref); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } /* fixme: hide (Lauris) */ -void CFlowregion::onRemoveChild(Inkscape::XML::Node * child) { +void CFlowregion::remove_child(Inkscape::XML::Node * child) { SPFlowregion* object = this->spflowregion; - CItem::onRemoveChild(child); + CItem::remove_child(child); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } -void CFlowregion::onUpdate(SPCtx *ctx, unsigned int flags) { +void CFlowregion::update(SPCtx *ctx, unsigned int flags) { SPFlowregion* object = this->spflowregion; SPFlowregion *group = SP_FLOWREGION(object); @@ -98,7 +98,7 @@ void CFlowregion::onUpdate(SPCtx *ctx, unsigned int flags) { SPItemCtx *ictx = reinterpret_cast<SPItemCtx *>(ctx); SPItemCtx cctx = *ictx; - CItem::onUpdate(ctx, flags); + CItem::update(ctx, flags); if (flags & SP_OBJECT_MODIFIED_FLAG) { flags |= SP_OBJECT_PARENT_MODIFIED_FLAG; @@ -144,7 +144,7 @@ void SPFlowregion::UpdateComputed(void) } } -void CFlowregion::onModified(guint flags) { +void CFlowregion::modified(guint flags) { SPFlowregion* object = this->spflowregion; if (flags & SP_OBJECT_MODIFIED_FLAG) { @@ -168,7 +168,7 @@ void CFlowregion::onModified(guint flags) { } } -Inkscape::XML::Node *CFlowregion::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node *CFlowregion::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPFlowregion* object = this->spflowregion; if (flags & SP_OBJECT_WRITE_BUILD) { @@ -200,12 +200,12 @@ Inkscape::XML::Node *CFlowregion::onWrite(Inkscape::XML::Document *xml_doc, Inks } } - CItem::onWrite(xml_doc, repr, flags); + CItem::write(xml_doc, repr, flags); return repr; } -gchar* CFlowregion::onDescription() { +gchar* CFlowregion::description() { // TRANSLATORS: "Flow region" is an area where text is allowed to flow return g_strdup_printf(_("Flow region")); } @@ -253,26 +253,26 @@ sp_flowregionexclude_dispose(GObject *object) } } -void CFlowregionExclude::onChildAdded(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { +void CFlowregionExclude::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { SPFlowregionExclude* object = this->spflowregionexclude; - CItem::onChildAdded(child, ref); + CItem::child_added(child, ref); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } /* fixme: hide (Lauris) */ -void CFlowregionExclude::onRemoveChild(Inkscape::XML::Node * child) { +void CFlowregionExclude::remove_child(Inkscape::XML::Node * child) { SPFlowregionExclude* object = this->spflowregionexclude; - CItem::onRemoveChild(child); + CItem::remove_child(child); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } -void CFlowregionExclude::onUpdate(SPCtx *ctx, unsigned int flags) { +void CFlowregionExclude::update(SPCtx *ctx, unsigned int flags) { SPFlowregionExclude* object = this->spflowregionexclude; SPFlowregionExclude *group = SP_FLOWREGIONEXCLUDE (object); @@ -280,7 +280,7 @@ void CFlowregionExclude::onUpdate(SPCtx *ctx, unsigned int flags) { SPItemCtx *ictx = reinterpret_cast<SPItemCtx *>(ctx); SPItemCtx cctx = *ictx; - CItem::onUpdate(ctx, flags); + CItem::update(ctx, flags); if (flags & SP_OBJECT_MODIFIED_FLAG) { flags |= SP_OBJECT_PARENT_MODIFIED_FLAG; @@ -325,7 +325,7 @@ void SPFlowregionExclude::UpdateComputed(void) } } -void CFlowregionExclude::onModified(guint flags) { +void CFlowregionExclude::modified(guint flags) { SPFlowregionExclude* object = this->spflowregionexclude; if (flags & SP_OBJECT_MODIFIED_FLAG) { @@ -349,7 +349,7 @@ void CFlowregionExclude::onModified(guint flags) { } } -Inkscape::XML::Node *CFlowregionExclude::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node *CFlowregionExclude::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPFlowregionExclude* object = this->spflowregionexclude; if (flags & SP_OBJECT_WRITE_BUILD) { @@ -377,12 +377,12 @@ Inkscape::XML::Node *CFlowregionExclude::onWrite(Inkscape::XML::Document *xml_do } } - CItem::onWrite(xml_doc, repr, flags); + CItem::write(xml_doc, repr, flags); return repr; } -gchar* CFlowregionExclude::onDescription() { +gchar* CFlowregionExclude::description() { /* TRANSLATORS: A region "cut out of" a flow region; text is not allowed to flow inside the * flow excluded region. flowRegionExclude in SVG 1.2: see * http://www.w3.org/TR/2004/WD-SVG12-20041027/flow.html#flowRegion-elem and diff --git a/src/sp-flowregion.h b/src/sp-flowregion.h index 2386149ab..600a49282 100644 --- a/src/sp-flowregion.h +++ b/src/sp-flowregion.h @@ -43,12 +43,12 @@ public: CFlowregion(SPFlowregion* flowregion); virtual ~CFlowregion(); - virtual void onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); - virtual void onRemoveChild(Inkscape::XML::Node *child); - virtual void onUpdate(SPCtx *ctx, unsigned int flags); - virtual void onModified(guint flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - virtual gchar *onDescription(); + virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); + virtual void remove_child(Inkscape::XML::Node *child); + virtual void update(SPCtx *ctx, unsigned int flags); + virtual void modified(guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual gchar *description(); protected: SPFlowregion* spflowregion; @@ -74,12 +74,12 @@ public: CFlowregionExclude(SPFlowregionExclude* flowregionexclude); virtual ~CFlowregionExclude(); - virtual void onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); - virtual void onRemoveChild(Inkscape::XML::Node *child); - virtual void onUpdate(SPCtx *ctx, unsigned int flags); - virtual void onModified(guint flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - virtual gchar *onDescription(); + virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); + virtual void remove_child(Inkscape::XML::Node *child); + virtual void update(SPCtx *ctx, unsigned int flags); + virtual void modified(guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual gchar *description(); protected: SPFlowregionExclude* spflowregionexclude; diff --git a/src/sp-flowtext.cpp b/src/sp-flowtext.cpp index 2759e4c47..89b718781 100644 --- a/src/sp-flowtext.cpp +++ b/src/sp-flowtext.cpp @@ -75,8 +75,8 @@ sp_flowtext_dispose(GObject *object) group->layout.~Layout(); } -void CFlowtext::onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref) { - CItem::onChildAdded(child, ref); +void CFlowtext::child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref) { + CItem::child_added(child, ref); this->spflowtext->requestModified(SP_OBJECT_MODIFIED_FLAG); } @@ -84,21 +84,21 @@ void CFlowtext::onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* re /* fixme: hide (Lauris) */ -void CFlowtext::onRemoveChild(Inkscape::XML::Node* child) { - CItem::onRemoveChild(child); +void CFlowtext::remove_child(Inkscape::XML::Node* child) { + CItem::remove_child(child); this->spflowtext->requestModified(SP_OBJECT_MODIFIED_FLAG); } -void CFlowtext::onUpdate(SPCtx* ctx, unsigned int flags) { +void CFlowtext::update(SPCtx* ctx, unsigned int flags) { SPFlowtext* object = this->spflowtext; SPFlowtext *group = SP_FLOWTEXT(object); SPItemCtx *ictx = (SPItemCtx *) ctx; SPItemCtx cctx = *ictx; - CItem::onUpdate(ctx, flags); + CItem::update(ctx, flags); if (flags & SP_OBJECT_MODIFIED_FLAG) flags |= SP_OBJECT_PARENT_MODIFIED_FLAG; flags &= SP_OBJECT_MODIFIED_CASCADE; @@ -137,7 +137,7 @@ void CFlowtext::onUpdate(SPCtx* ctx, unsigned int flags) { } } -void CFlowtext::onModified(unsigned int flags) { +void CFlowtext::modified(unsigned int flags) { SPFlowtext* object = this->spflowtext; SPObject *ft = object; SPObject *region = NULL; @@ -171,17 +171,17 @@ void CFlowtext::onModified(unsigned int flags) { } } -void CFlowtext::onBuild(SPDocument* doc, Inkscape::XML::Node* repr) { +void CFlowtext::build(SPDocument* doc, Inkscape::XML::Node* repr) { SPFlowtext* object = this->spflowtext; object->_requireSVGVersion(Inkscape::Version(1, 2)); - CItem::onBuild(doc, repr); + CItem::build(doc, repr); object->readAttr( "inkscape:layoutOptions" ); // must happen after css has been read } -void CFlowtext::onSet(unsigned int key, const gchar* value) { +void CFlowtext::set(unsigned int key, const gchar* value) { SPFlowtext* object = this->spflowtext; SPFlowtext *group = (SPFlowtext *) object; @@ -232,12 +232,12 @@ void CFlowtext::onSet(unsigned int key, const gchar* value) { break; } default: - CItem::onSet(key, value); + CItem::set(key, value); break; } } -Inkscape::XML::Node* CFlowtext::onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags) { +Inkscape::XML::Node* CFlowtext::write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags) { SPFlowtext* object = this->spflowtext; if ( flags & SP_OBJECT_WRITE_BUILD ) { @@ -267,12 +267,12 @@ Inkscape::XML::Node* CFlowtext::onWrite(Inkscape::XML::Document* doc, Inkscape:: } } - CItem::onWrite(doc, repr, flags); + CItem::write(doc, repr, flags); return repr; } -Geom::OptRect CFlowtext::onBbox(Geom::Affine const &transform, SPItem::BBoxType type) { +Geom::OptRect CFlowtext::bbox(Geom::Affine const &transform, SPItem::BBoxType type) { SPFlowtext* item = this->spflowtext; SPFlowtext *group = SP_FLOWTEXT(item); @@ -287,7 +287,7 @@ Geom::OptRect CFlowtext::onBbox(Geom::Affine const &transform, SPItem::BBoxType return bbox; } -void CFlowtext::onPrint(SPPrintContext *ctx) { +void CFlowtext::print(SPPrintContext *ctx) { SPFlowtext* item = this->spflowtext; SPFlowtext *group = SP_FLOWTEXT(item); @@ -301,7 +301,7 @@ void CFlowtext::onPrint(SPPrintContext *ctx) { group->layout.print(ctx, pbox, dbox, bbox, ctm); } -gchar* CFlowtext::onDescription() { +gchar* CFlowtext::description() { SPFlowtext* item = this->spflowtext; Inkscape::Text::Layout const &layout = SP_FLOWTEXT(item)->layout; @@ -316,7 +316,7 @@ gchar* CFlowtext::onDescription() { } } -void CFlowtext::onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { +void CFlowtext::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { SPFlowtext* item = this->spflowtext; if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_TEXT_BASELINE)) { @@ -332,7 +332,7 @@ void CFlowtext::onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inksc } } -Inkscape::DrawingItem* CFlowtext::onShow(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) { +Inkscape::DrawingItem* CFlowtext::show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) { SPFlowtext* item = this->spflowtext; SPFlowtext *group = (SPFlowtext *) item; @@ -347,8 +347,8 @@ Inkscape::DrawingItem* CFlowtext::onShow(Inkscape::Drawing &drawing, unsigned in return flowed; } -void CFlowtext::onHide(unsigned int key) { - CItem::onHide(key); +void CFlowtext::hide(unsigned int key) { + CItem::hide(key); } diff --git a/src/sp-flowtext.h b/src/sp-flowtext.h index 9f1681636..f3dfb0a8e 100644 --- a/src/sp-flowtext.h +++ b/src/sp-flowtext.h @@ -66,24 +66,24 @@ public: CFlowtext(SPFlowtext* flowtext); virtual ~CFlowtext(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); - virtual void onRemoveChild(Inkscape::XML::Node* child); + virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); + virtual void remove_child(Inkscape::XML::Node* child); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); - virtual void onModified(unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); + virtual void modified(unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); - virtual Geom::OptRect onBbox(Geom::Affine const &transform, SPItem::BBoxType type); - virtual void onPrint(SPPrintContext *ctx); - virtual gchar* onDescription(); - virtual Inkscape::DrawingItem* onShow(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags); - virtual void onHide(unsigned int key); - virtual void onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); + virtual Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType type); + virtual void print(SPPrintContext *ctx); + virtual gchar* description(); + virtual Inkscape::DrawingItem* show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags); + virtual void hide(unsigned int key); + virtual void snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); protected: SPFlowtext* spflowtext; }; diff --git a/src/sp-font-face.cpp b/src/sp-font-face.cpp index 38467083f..0da5f7e6a 100644 --- a/src/sp-font-face.cpp +++ b/src/sp-font-face.cpp @@ -332,8 +332,8 @@ static void sp_fontface_init(SPFontFace *face) } -void CFontFace::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { - CObject::onBuild(document, repr); +void CFontFace::build(SPDocument *document, Inkscape::XML::Node *repr) { + CObject::build(document, repr); SPFontFace* object = this->spfontface; @@ -379,12 +379,12 @@ static void sp_fontface_children_modified(SPFontFace */*sp_fontface*/) /** * Callback for child_added event. */ -void CFontFace::onChildAdded(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { +void CFontFace::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { SPFontFace* object = this->spfontface; SPFontFace *f = SP_FONTFACE(object); - CObject::onChildAdded(child, ref); + CObject::child_added(child, ref); sp_fontface_children_modified(f); object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG); @@ -394,22 +394,22 @@ void CFontFace::onChildAdded(Inkscape::XML::Node *child, Inkscape::XML::Node *re /** * Callback for remove_child event. */ -void CFontFace::onRemoveChild(Inkscape::XML::Node *child) { +void CFontFace::remove_child(Inkscape::XML::Node *child) { SPFontFace* object = this->spfontface; SPFontFace *f = SP_FONTFACE(object); - CObject::onRemoveChild(child); + CObject::remove_child(child); sp_fontface_children_modified(f); object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG); } -void CFontFace::onRelease() { - CObject::onRelease(); +void CFontFace::release() { + CObject::release(); } -void CFontFace::onSet(unsigned int key, const gchar *value) { +void CFontFace::set(unsigned int key, const gchar *value) { SPFontFace* object = this->spfontface; SPFontFace *face = SP_FONTFACE(object); @@ -694,7 +694,7 @@ void CFontFace::onSet(unsigned int key, const gchar *value) { break; } default: - CObject::onSet(key, value); + CObject::set(key, value); break; } } @@ -702,7 +702,7 @@ void CFontFace::onSet(unsigned int key, const gchar *value) { /** * Receives update notifications. */ -void CFontFace::onUpdate(SPCtx *ctx, guint flags) { +void CFontFace::update(SPCtx *ctx, guint flags) { SPFontFace* object = this->spfontface; if (flags & (SP_OBJECT_MODIFIED_FLAG)) { @@ -741,12 +741,12 @@ void CFontFace::onUpdate(SPCtx *ctx, guint flags) { object->readAttr( "overline-thickness" ); } - CObject::onUpdate(ctx, flags); + CObject::update(ctx, flags); } #define COPY_ATTR(rd,rs,key) (rd)->setAttribute((key), rs->attribute(key)); -Inkscape::XML::Node* CFontFace::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CFontFace::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPFontFace* object = this->spfontface; SPFontFace *face = SP_FONTFACE(object); @@ -828,7 +828,7 @@ Inkscape::XML::Node* CFontFace::onWrite(Inkscape::XML::Document *xml_doc, Inksca COPY_ATTR(repr, object->getRepr(), "overline-thickness"); } - CObject::onWrite(xml_doc, repr, flags); + CObject::write(xml_doc, repr, flags); return repr; } diff --git a/src/sp-font-face.h b/src/sp-font-face.h index eed3e6c4c..b39ea881f 100644 --- a/src/sp-font-face.h +++ b/src/sp-font-face.h @@ -122,17 +122,17 @@ public: CFontFace(SPFontFace* face); virtual ~CFontFace(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); - virtual void onRemoveChild(Inkscape::XML::Node* child); + virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); + virtual void remove_child(Inkscape::XML::Node* child); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); private: SPFontFace* spfontface; diff --git a/src/sp-font.cpp b/src/sp-font.cpp index 737891573..0028310a6 100644 --- a/src/sp-font.cpp +++ b/src/sp-font.cpp @@ -58,8 +58,8 @@ static void sp_font_init(SPFont *font) font->vert_adv_y = FNT_UNITS_PER_EM; } -void CFont::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { - CObject::onBuild(document, repr); +void CFont::build(SPDocument *document, Inkscape::XML::Node *repr) { + CObject::build(document, repr); SPFont* object = this->spfont; @@ -80,10 +80,10 @@ static void sp_font_children_modified(SPFont */*sp_font*/) /** * Callback for child_added event. */ -void CFont::onChildAdded(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { +void CFont::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { SPFont* object = this->spfont; SPFont *f = SP_FONT(object); - CObject::onChildAdded(child, ref); + CObject::child_added(child, ref); sp_font_children_modified(f); object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG); @@ -93,26 +93,26 @@ void CFont::onChildAdded(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { /** * Callback for remove_child event. */ -void CFont::onRemoveChild(Inkscape::XML::Node* child) { +void CFont::remove_child(Inkscape::XML::Node* child) { SPFont* object = this->spfont; SPFont *f = SP_FONT(object); - CObject::onRemoveChild(child); + CObject::remove_child(child); sp_font_children_modified(f); object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG); } -void CFont::onRelease() { +void CFont::release() { //SPFont *font = SP_FONT(object); SPFont* object = this->spfont; object->document->removeResource("font", object); - CObject::onRelease(); + CObject::release(); } -void CFont::onSet(unsigned int key, const gchar *value) { +void CFont::set(unsigned int key, const gchar *value) { SPFont* object = this->spfont; SPFont *font = SP_FONT(object); @@ -173,7 +173,7 @@ void CFont::onSet(unsigned int key, const gchar *value) { break; } default: - CObject::onSet(key, value); + CObject::set(key, value); break; } } @@ -181,7 +181,7 @@ void CFont::onSet(unsigned int key, const gchar *value) { /** * Receives update notifications. */ -void CFont::onUpdate(SPCtx *ctx, guint flags) { +void CFont::update(SPCtx *ctx, guint flags) { SPFont* object = this->spfont; if (flags & (SP_OBJECT_MODIFIED_FLAG)) { @@ -193,12 +193,12 @@ void CFont::onUpdate(SPCtx *ctx, guint flags) { object->readAttr( "vert-adv-y" ); } - CObject::onUpdate(ctx, flags); + CObject::update(ctx, flags); } #define COPY_ATTR(rd,rs,key) (rd)->setAttribute((key), rs->attribute(key)); -Inkscape::XML::Node* CFont::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CFont::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPFont* object = this->spfont; SPFont *font = SP_FONT(object); @@ -224,7 +224,7 @@ Inkscape::XML::Node* CFont::onWrite(Inkscape::XML::Document *xml_doc, Inkscape:: COPY_ATTR(repr, object->getRepr(), "vert-adv-y"); } - CObject::onWrite(xml_doc, repr, flags); + CObject::write(xml_doc, repr, flags); return repr; } diff --git a/src/sp-font.h b/src/sp-font.h index 786fb7f97..1bddc7503 100644 --- a/src/sp-font.h +++ b/src/sp-font.h @@ -43,17 +43,17 @@ public: CFont(SPFont* font); virtual ~CFont(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); - virtual void onRemoveChild(Inkscape::XML::Node* child); + virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); + virtual void remove_child(Inkscape::XML::Node* child); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); private: SPFont* spfont; diff --git a/src/sp-glyph-kerning.cpp b/src/sp-glyph-kerning.cpp index 52bc13f1f..bdec3d089 100644 --- a/src/sp-glyph-kerning.cpp +++ b/src/sp-glyph-kerning.cpp @@ -103,10 +103,10 @@ static void sp_glyph_kerning_init(SPGlyphKerning *glyph) glyph->k = 0; } -void CGlyphKerning::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CGlyphKerning::build(SPDocument *document, Inkscape::XML::Node *repr) { SPGlyphKerning* object = this->spglyphkerning; - CObject::onBuild(document, repr); + CObject::build(document, repr); object->readAttr( "u1" ); object->readAttr( "g1" ); @@ -115,8 +115,8 @@ void CGlyphKerning::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { object->readAttr( "k" ); } -void CGlyphKerning::onRelease() { - CObject::onRelease(); +void CGlyphKerning::release() { + CObject::release(); } GlyphNames::GlyphNames(const gchar* value){ @@ -138,7 +138,7 @@ bool GlyphNames::contains(const char* name){ return false; } -void CGlyphKerning::onSet(unsigned int key, const gchar *value) { +void CGlyphKerning::set(unsigned int key, const gchar *value) { SPGlyphKerning* object = this->spglyphkerning; SPGlyphKerning * glyphkern = (SPGlyphKerning*) object; //even if it is a VKern this will work. I did it this way just to avoind warnings. @@ -191,7 +191,7 @@ void CGlyphKerning::onSet(unsigned int key, const gchar *value) { } default: { - CObject::onSet(key, value); + CObject::set(key, value); break; } } @@ -200,7 +200,7 @@ void CGlyphKerning::onSet(unsigned int key, const gchar *value) { /** * * Receives update notifications. * */ -void CGlyphKerning::onUpdate(SPCtx *ctx, guint flags) { +void CGlyphKerning::update(SPCtx *ctx, guint flags) { SPGlyphKerning* object = this->spglyphkerning; SPGlyphKerning *glyph = (SPGlyphKerning *)object; @@ -214,12 +214,12 @@ void CGlyphKerning::onUpdate(SPCtx *ctx, guint flags) { object->readAttr( "k" ); } - CObject::onUpdate(ctx, flags); + CObject::update(ctx, flags); } #define COPY_ATTR(rd,rs,key) (rd)->setAttribute((key), rs->attribute(key)); -Inkscape::XML::Node* CGlyphKerning::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CGlyphKerning::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPGlyphKerning* object = this->spglyphkerning; // SPGlyphKerning *glyph = SP_GLYPH_KERNING(object); @@ -250,7 +250,7 @@ Inkscape::XML::Node* CGlyphKerning::onWrite(Inkscape::XML::Document *xml_doc, In COPY_ATTR(repr, object->getRepr(), "k"); } - CObject::onWrite(xml_doc, repr, flags); + CObject::write(xml_doc, repr, flags); return repr; } diff --git a/src/sp-glyph-kerning.h b/src/sp-glyph-kerning.h index 6a0face55..fdb93ca59 100644 --- a/src/sp-glyph-kerning.h +++ b/src/sp-glyph-kerning.h @@ -59,14 +59,14 @@ public: CGlyphKerning(SPGlyphKerning* kerning); virtual ~CGlyphKerning(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); private: SPGlyphKerning* spglyphkerning; diff --git a/src/sp-glyph.cpp b/src/sp-glyph.cpp index 6aa72d8b1..332b720bc 100644 --- a/src/sp-glyph.cpp +++ b/src/sp-glyph.cpp @@ -56,8 +56,8 @@ static void sp_glyph_init(SPGlyph *glyph) glyph->vert_adv_y = 0; } -void CGlyph::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { - CObject::onBuild(document, repr); +void CGlyph::build(SPDocument *document, Inkscape::XML::Node *repr) { + CObject::build(document, repr); SPGlyph* object = this->spglyph; @@ -73,8 +73,8 @@ void CGlyph::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { object->readAttr( "vert-adv-y" ); } -void CGlyph::onRelease() { - CObject::onRelease(); +void CGlyph::release() { + CObject::release(); } static glyphArabicForm sp_glyph_read_arabic_form(gchar const *value){ @@ -108,7 +108,7 @@ static glyphOrientation sp_glyph_read_orientation(gchar const *value){ return GLYPH_ORIENTATION_BOTH; } -void CGlyph::onSet(unsigned int key, const gchar *value) { +void CGlyph::set(unsigned int key, const gchar *value) { SPGlyph* object = this->spglyph; SPGlyph *glyph = SP_GLYPH(object); @@ -198,7 +198,7 @@ void CGlyph::onSet(unsigned int key, const gchar *value) { } default: { - CObject::onSet(key, value); + CObject::set(key, value); break; } } @@ -207,7 +207,7 @@ void CGlyph::onSet(unsigned int key, const gchar *value) { /** * * Receives update notifications. * */ -void CGlyph::onUpdate(SPCtx *ctx, guint flags) { +void CGlyph::update(SPCtx *ctx, guint flags) { SPGlyph* object = this->spglyph; SPGlyph *glyph = SP_GLYPH(object); @@ -227,12 +227,12 @@ void CGlyph::onUpdate(SPCtx *ctx, guint flags) { object->readAttr( "vert-adv-y" ); } - CObject::onUpdate(ctx, flags); + CObject::update(ctx, flags); } #define COPY_ATTR(rd,rs,key) (rd)->setAttribute((key), rs->attribute(key)); -Inkscape::XML::Node* CGlyph::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CGlyph::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPGlyph* object = this->spglyph; // SPGlyph *glyph = SP_GLYPH(object); @@ -268,7 +268,7 @@ Inkscape::XML::Node* CGlyph::onWrite(Inkscape::XML::Document *xml_doc, Inkscape: COPY_ATTR(repr, object->getRepr(), "vert-adv-y"); } - CObject::onWrite(xml_doc, repr, flags); + CObject::write(xml_doc, repr, flags); return repr; } diff --git a/src/sp-glyph.h b/src/sp-glyph.h index a68d0bdd1..6543b1af2 100644 --- a/src/sp-glyph.h +++ b/src/sp-glyph.h @@ -60,14 +60,14 @@ public: CGlyph(SPGlyph* glyph); virtual ~CGlyph(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); private: SPGlyph* spglyph; diff --git a/src/sp-gradient.cpp b/src/sp-gradient.cpp index b6b1c5a60..b4bb9243e 100644 --- a/src/sp-gradient.cpp +++ b/src/sp-gradient.cpp @@ -101,10 +101,10 @@ sp_stop_init(SPStop *stop) stop->opacity = 1.0; } -void CStop::onBuild(SPDocument* doc, Inkscape::XML::Node* repr) { +void CStop::build(SPDocument* doc, Inkscape::XML::Node* repr) { SPStop* object = this->spstop; - CObject::onBuild(doc, repr); + CObject::build(doc, repr); object->readAttr( "offset" ); object->readAttr( "stop-color" ); @@ -117,7 +117,7 @@ void CStop::onBuild(SPDocument* doc, Inkscape::XML::Node* repr) { * Virtual build: set stop attributes from its associated XML node. */ -void CStop::onSet(unsigned int key, const gchar* value) { +void CStop::set(unsigned int key, const gchar* value) { SPStop* object = this->spstop; SPStop *stop = SP_STOP(object); @@ -190,7 +190,7 @@ void CStop::onSet(unsigned int key, const gchar* value) { break; } default: { - CObject::onSet(key, value); + CObject::set(key, value); break; } } @@ -200,7 +200,7 @@ void CStop::onSet(unsigned int key, const gchar* value) { * Virtual set: set attribute to value. */ -Inkscape::XML::Node* CStop::onWrite(Inkscape::XML::Document* xml_doc, Inkscape::XML::Node* repr, guint flags) { +Inkscape::XML::Node* CStop::write(Inkscape::XML::Document* xml_doc, Inkscape::XML::Node* repr, guint flags) { SPStop* object = this->spstop; SPStop *stop = SP_STOP(object); @@ -212,7 +212,7 @@ Inkscape::XML::Node* CStop::onWrite(Inkscape::XML::Document* xml_doc, Inkscape:: Glib::ustring colorStr = stop->specified_color.toString(); gfloat opacity = stop->opacity; - CObject::onWrite(xml_doc, repr, flags); + CObject::write(xml_doc, repr, flags); // Since we do a hackish style setting here (because SPStyle does not support stop-color and // stop-opacity), we must do it AFTER calling the parent write method; otherwise @@ -369,27 +369,27 @@ static void sp_meshrow_init(SPMeshRow * meshrow) meshrow->cobject = meshrow->cmeshrow; } -void CMeshRow::onBuild(SPDocument* doc, Inkscape::XML::Node* repr) { - CObject::onBuild(doc, repr); +void CMeshRow::build(SPDocument* doc, Inkscape::XML::Node* repr) { + CObject::build(doc, repr); } /** * Virtual build: set meshrow attributes from its associated XML node. */ -void CMeshRow::onSet(unsigned int key, const gchar* value) { +void CMeshRow::set(unsigned int key, const gchar* value) { } /** * Virtual set: set attribute to value. */ -Inkscape::XML::Node* CMeshRow::onWrite(Inkscape::XML::Document* xml_doc, Inkscape::XML::Node* repr, guint flags) { +Inkscape::XML::Node* CMeshRow::write(Inkscape::XML::Document* xml_doc, Inkscape::XML::Node* repr, guint flags) { if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) { repr = xml_doc->createElement("svg:meshRow"); } - CObject::onWrite(xml_doc, repr, flags); + CObject::write(xml_doc, repr, flags); return repr; } @@ -427,10 +427,10 @@ static void sp_meshpatch_init(SPMeshPatch * meshpatch) meshpatch->cobject = meshpatch->cmeshpatch; } -void CMeshPatch::onBuild(SPDocument* doc, Inkscape::XML::Node* repr) { +void CMeshPatch::build(SPDocument* doc, Inkscape::XML::Node* repr) { SPMeshPatch* object = this->spmeshpatch; - CObject::onBuild(doc, repr); + CObject::build(doc, repr); object->readAttr( "tensor" ); } @@ -439,7 +439,7 @@ void CMeshPatch::onBuild(SPDocument* doc, Inkscape::XML::Node* repr) { * Virtual build: set meshpatch attributes from its associated XML node. */ -void CMeshPatch::onSet(unsigned int key, const gchar* value) { +void CMeshPatch::set(unsigned int key, const gchar* value) { SPMeshPatch* object = this->spmeshpatch; SPMeshPatch *patch = SP_MESHPATCH(object); @@ -462,12 +462,12 @@ void CMeshPatch::onSet(unsigned int key, const gchar* value) { * Virtual set: set attribute to value. */ -Inkscape::XML::Node* CMeshPatch::onWrite(Inkscape::XML::Document* xml_doc, Inkscape::XML::Node* repr, guint flags) { +Inkscape::XML::Node* CMeshPatch::write(Inkscape::XML::Document* xml_doc, Inkscape::XML::Node* repr, guint flags) { if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) { repr = xml_doc->createElement("svg:meshPatch"); } - CObject::onWrite(xml_doc, repr, flags); + CObject::write(xml_doc, repr, flags); return repr; } @@ -561,7 +561,7 @@ void CGradient::init(SPGradient *gr) /** * Virtual build: set gradient attributes from its associated repr. */ -void CGradient::onBuild(SPDocument *document, Inkscape::XML::Node *repr) +void CGradient::build(SPDocument *document, Inkscape::XML::Node *repr) { SPGradient* object = this->spgradient; SPGradient *gradient = SP_GRADIENT(object); @@ -571,7 +571,7 @@ void CGradient::onBuild(SPDocument *document, Inkscape::XML::Node *repr) repr->setAttribute("inkscape:collect", 0); } - CPaintServer::onBuild(document, repr); + CPaintServer::build(document, repr); for ( SPObject *ochild = object->firstChild() ; ochild ; ochild = ochild->getNext() ) { if (SP_IS_STOP(ochild)) { @@ -593,7 +593,7 @@ void CGradient::onBuild(SPDocument *document, Inkscape::XML::Node *repr) /** * Virtual release of SPGradient members before destruction. */ -void CGradient::onRelease() +void CGradient::release() { SPGradient* object = this->spgradient; SPGradient *gradient = (SPGradient *) object; @@ -616,13 +616,13 @@ void CGradient::onRelease() gradient->modified_connection.~connection(); - CPaintServer::onRelease(); + CPaintServer::release(); } /** * Set gradient attribute to value. */ -void CGradient::onSet(unsigned key, gchar const *value) +void CGradient::set(unsigned key, gchar const *value) { SPGradient* object = this->spgradient; SPGradient *gr = SP_GRADIENT(object); @@ -703,7 +703,7 @@ void CGradient::onSet(unsigned key, gchar const *value) } break; default: - CPaintServer::onSet(key, value); + CPaintServer::set(key, value); break; } } @@ -740,14 +740,14 @@ void CGradient::gradientRefChanged(SPObject *old_ref, SPObject *ref, SPGradient /** * Callback for child_added event. */ -void CGradient::onChildAdded(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) +void CGradient::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { SPGradient* object = this->spgradient; SPGradient *gr = SP_GRADIENT(object); gr->invalidateVector(); - CPaintServer::onChildAdded(child, ref); + CPaintServer::child_added(child, ref); SPObject *ochild = object->get_child_by_repr(child); if ( ochild && SP_IS_STOP(ochild) ) { @@ -767,14 +767,14 @@ void CGradient::onChildAdded(Inkscape::XML::Node *child, Inkscape::XML::Node *re /** * Callback for remove_child event. */ -void CGradient::onRemoveChild(Inkscape::XML::Node *child) +void CGradient::remove_child(Inkscape::XML::Node *child) { SPGradient* object = this->spgradient; SPGradient *gr = SP_GRADIENT(object); gr->invalidateVector(); - CPaintServer::onRemoveChild(child); + CPaintServer::remove_child(child); gr->has_stops = FALSE; for ( SPObject *ochild = object->firstChild() ; ochild ; ochild = ochild->getNext() ) { @@ -798,7 +798,7 @@ void CGradient::onRemoveChild(Inkscape::XML::Node *child) /** * Callback for modified event. */ -void CGradient::onModified(guint flags) +void CGradient::modified(guint flags) { SPGradient* object = this->spgradient; SPGradient *gr = SP_GRADIENT(object); @@ -864,12 +864,12 @@ int SPGradient::getStopCount() const /** * Write gradient attributes to repr. */ -Inkscape::XML::Node *CGradient::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) +Inkscape::XML::Node *CGradient::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPGradient* object = this->spgradient; SPGradient *gr = SP_GRADIENT(object); - CPaintServer::onWrite(xml_doc, repr, flags); + CPaintServer::write(xml_doc, repr, flags); if (flags & SP_OBJECT_WRITE_BUILD) { GSList *l = NULL; @@ -1410,10 +1410,10 @@ static void sp_lineargradient_init(SPLinearGradient *lg) lg->y2.unset(SVGLength::PERCENT, 0.0, 0.0); } -void CLinearGradient::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CLinearGradient::build(SPDocument *document, Inkscape::XML::Node *repr) { SPLinearGradient* object = this->splineargradient; - CGradient::onBuild(document, repr); + CGradient::build(document, repr); object->readAttr( "x1" ); object->readAttr( "y1" ); @@ -1424,7 +1424,7 @@ void CLinearGradient::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { /** * Callback: set attribute. */ -void CLinearGradient::onSet(unsigned int key, const gchar* value) { +void CLinearGradient::set(unsigned int key, const gchar* value) { SPLinearGradient* object = this->splineargradient; SPLinearGradient *lg = SP_LINEARGRADIENT(object); @@ -1447,7 +1447,7 @@ void CLinearGradient::onSet(unsigned int key, const gchar* value) { object->requestModified(SP_OBJECT_MODIFIED_FLAG); break; default: - CGradient::onSet(key, value); + CGradient::set(key, value); break; } } @@ -1455,7 +1455,7 @@ void CLinearGradient::onSet(unsigned int key, const gchar* value) { /** * Callback: write attributes to associated repr. */ -Inkscape::XML::Node* CLinearGradient::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CLinearGradient::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPLinearGradient* object = this->splineargradient; SPLinearGradient *lg = SP_LINEARGRADIENT(object); @@ -1473,7 +1473,7 @@ Inkscape::XML::Node* CLinearGradient::onWrite(Inkscape::XML::Document *xml_doc, if ((flags & SP_OBJECT_WRITE_ALL) || lg->y2._set) sp_repr_set_svg_double(repr, "y2", lg->y2.computed); - CGradient::onWrite(xml_doc, repr, flags); + CGradient::write(xml_doc, repr, flags); return repr; } @@ -1541,10 +1541,10 @@ sp_radialgradient_init(SPRadialGradient *rg) /** * Set radial gradient attributes from associated repr. */ -void CRadialGradient::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CRadialGradient::build(SPDocument *document, Inkscape::XML::Node *repr) { SPRadialGradient* object = this->spradialgradient; - CGradient::onBuild(document, repr); + CGradient::build(document, repr); object->readAttr( "cx" ); object->readAttr( "cy" ); @@ -1556,7 +1556,7 @@ void CRadialGradient::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { /** * Set radial gradient attribute. */ -void CRadialGradient::onSet(unsigned key, gchar const *value) { +void CRadialGradient::set(unsigned key, gchar const *value) { SPRadialGradient* object = this->spradialgradient; SPRadialGradient *rg = SP_RADIALGRADIENT(object); @@ -1601,7 +1601,7 @@ void CRadialGradient::onSet(unsigned key, gchar const *value) { object->requestModified(SP_OBJECT_MODIFIED_FLAG); break; default: - CGradient::onSet(key, value); + CGradient::set(key, value); break; } } @@ -1609,7 +1609,7 @@ void CRadialGradient::onSet(unsigned key, gchar const *value) { /** * Write radial gradient attributes to associated repr. */ -Inkscape::XML::Node* CRadialGradient::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CRadialGradient::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPRadialGradient* object = this->spradialgradient; SPRadialGradient *rg = SP_RADIALGRADIENT(object); @@ -1624,7 +1624,7 @@ Inkscape::XML::Node* CRadialGradient::onWrite(Inkscape::XML::Document *xml_doc, if ((flags & SP_OBJECT_WRITE_ALL) || rg->fx._set) sp_repr_set_svg_double(repr, "fx", rg->fx.computed); if ((flags & SP_OBJECT_WRITE_ALL) || rg->fy._set) sp_repr_set_svg_double(repr, "fy", rg->fy.computed); - CGradient::onWrite(xml_doc, repr, flags); + CGradient::write(xml_doc, repr, flags); return repr; } @@ -1692,10 +1692,10 @@ sp_meshgradient_init(SPMeshGradient *mg) mg->y.unset(SVGLength::NONE, 0.0, 0.0); } -void CMeshGradient::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CMeshGradient::build(SPDocument *document, Inkscape::XML::Node *repr) { SPMeshGradient* object = this->spmeshgradient; - CGradient::onBuild(document, repr); + CGradient::build(document, repr); // Start coordinate of mesh object->readAttr( "x" ); @@ -1703,7 +1703,7 @@ void CMeshGradient::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { } -void CMeshGradient::onSet(unsigned key, gchar const *value) { +void CMeshGradient::set(unsigned key, gchar const *value) { SPMeshGradient* object = this->spmeshgradient; SPMeshGradient *mg = SP_MESHGRADIENT(object); @@ -1722,7 +1722,7 @@ void CMeshGradient::onSet(unsigned key, gchar const *value) { object->requestModified(SP_OBJECT_MODIFIED_FLAG); break; default: - CGradient::onSet(key, value); + CGradient::set(key, value); break; } } @@ -1730,7 +1730,7 @@ void CMeshGradient::onSet(unsigned key, gchar const *value) { /** * Write mesh gradient attributes to associated repr. */ -Inkscape::XML::Node* CMeshGradient::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CMeshGradient::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPMeshGradient* object = this->spmeshgradient; #ifdef MESH_DEBUG @@ -1745,7 +1745,7 @@ Inkscape::XML::Node* CMeshGradient::onWrite(Inkscape::XML::Document *xml_doc, In if ((flags & SP_OBJECT_WRITE_ALL) || mg->x._set) sp_repr_set_svg_double(repr, "x", mg->x.computed); if ((flags & SP_OBJECT_WRITE_ALL) || mg->y._set) sp_repr_set_svg_double(repr, "y", mg->y.computed); - CGradient::onWrite(xml_doc, repr, flags); + CGradient::write(xml_doc, repr, flags); return repr; } @@ -1806,7 +1806,7 @@ sp_gradient_pattern_common_setup(cairo_pattern_t *cp, } -cairo_pattern_t* CRadialGradient::onCreatePattern(cairo_t *ct, Geom::OptRect const &bbox, double opacity) { +cairo_pattern_t* CRadialGradient::pattern_new(cairo_t *ct, Geom::OptRect const &bbox, double opacity) { SPRadialGradient* ps = this->spradialgradient; SPRadialGradient *rg = SP_RADIALGRADIENT(ps); @@ -1863,7 +1863,7 @@ cairo_pattern_t* CRadialGradient::onCreatePattern(cairo_t *ct, Geom::OptRect con return cp; } -cairo_pattern_t* CMeshGradient::onCreatePattern(cairo_t *ct, +cairo_pattern_t* CMeshGradient::pattern_new(cairo_t *ct, #if defined(MESH_DEBUG) || (CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 4)) Geom::OptRect const &bbox, double opacity @@ -1987,7 +1987,7 @@ cairo_pattern_t* CMeshGradient::onCreatePattern(cairo_t *ct, return cp; } -cairo_pattern_t* CLinearGradient::onCreatePattern(cairo_t *ct, Geom::OptRect const &bbox, double opacity) { +cairo_pattern_t* CLinearGradient::pattern_new(cairo_t *ct, Geom::OptRect const &bbox, double opacity) { SPLinearGradient* ps = this->splineargradient; SPLinearGradient *lg = SP_LINEARGRADIENT(ps); diff --git a/src/sp-gradient.h b/src/sp-gradient.h index e43ba0e3f..e5744fab4 100644 --- a/src/sp-gradient.h +++ b/src/sp-gradient.h @@ -223,19 +223,19 @@ public: static void classInit(SPGradientClass *klass); static void init(SPGradient *gr); - virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); - virtual void onRelease(); - virtual void onModified(guint flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual void build(SPDocument *document, Inkscape::XML::Node *repr); + virtual void release(); + virtual void modified(guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); static void gradientRefModified(SPObject *href, guint flags, SPGradient *gradient); static void gradientRefChanged(SPObject *old_ref, SPObject *ref, SPGradient *gr); - virtual void onChildAdded(Inkscape::XML::Node *child, Inkscape::XML::Node *ref); - virtual void onRemoveChild(Inkscape::XML::Node *child); + virtual void child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref); + virtual void remove_child(Inkscape::XML::Node *child); - virtual void onSet(unsigned key, gchar const *value); + virtual void set(unsigned key, gchar const *value); protected: SPGradient* spgradient; diff --git a/src/sp-guide.cpp b/src/sp-guide.cpp index a7900909c..c25c44913 100644 --- a/src/sp-guide.cpp +++ b/src/sp-guide.cpp @@ -134,8 +134,8 @@ static void sp_guide_get_property(GObject *object, guint prop_id, GValue *value, } } -void CGuide::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { - CObject::onBuild(document, repr); +void CGuide::build(SPDocument *document, Inkscape::XML::Node *repr) { + CObject::build(document, repr); SPGuide* object = this->spguide; @@ -147,7 +147,7 @@ void CGuide::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { document->addResource("guide", object); } -void CGuide::onRelease() { +void CGuide::release() { SPGuide* object = this->spguide; SPGuide *guide = (SPGuide *) object; @@ -161,10 +161,10 @@ void CGuide::onRelease() { object->document->removeResource("guide", object); } - CObject::onRelease(); + CObject::release(); } -void CGuide::onSet(unsigned int key, const gchar *value) { +void CGuide::set(unsigned int key, const gchar *value) { SPGuide* object = this->spguide; SPGuide *guide = SP_GUIDE(object); @@ -235,7 +235,7 @@ void CGuide::onSet(unsigned int key, const gchar *value) { } break; default: - CObject::onSet(key, value); + CObject::set(key, value); break; } } diff --git a/src/sp-guide.h b/src/sp-guide.h index 525a9275c..23cc17900 100644 --- a/src/sp-guide.h +++ b/src/sp-guide.h @@ -64,9 +64,9 @@ public: CGuide(SPGuide* guide); virtual ~CGuide(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); - virtual void onSet(unsigned int key, const gchar* value); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); + virtual void set(unsigned int key, const gchar* value); private: SPGuide* spguide; diff --git a/src/sp-image.cpp b/src/sp-image.cpp index 100263ec6..fa75915f9 100644 --- a/src/sp-image.cpp +++ b/src/sp-image.cpp @@ -540,10 +540,10 @@ static void sp_image_init( SPImage *image ) image->lastMod = 0; } -void CImage::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CImage::build(SPDocument *document, Inkscape::XML::Node *repr) { SPImage* object = this->spimage; - CItem::onBuild(document, repr); + CItem::build(document, repr); object->readAttr( "xlink:href" ); object->readAttr( "x" ); @@ -557,7 +557,7 @@ void CImage::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { document->addResource("image", object); } -void CImage::onRelease() { +void CImage::release() { SPImage* object = this->spimage; SPImage *image = SP_IMAGE(object); @@ -593,10 +593,10 @@ void CImage::onRelease() { image->curve = image->curve->unref(); } - CItem::onRelease(); + CItem::release(); } -void CImage::onSet(unsigned int key, const gchar* value) { +void CImage::set(unsigned int key, const gchar* value) { SPImage* object = this->spimage; SPImage *image = SP_IMAGE (object); @@ -711,20 +711,20 @@ void CImage::onSet(unsigned int key, const gchar* value) { break; #endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2) default: - CItem::onSet(key, value); + CItem::set(key, value); break; } sp_image_set_curve(image); //creates a curve at the image's boundary for snapping } -void CImage::onUpdate(SPCtx *ctx, unsigned int flags) { +void CImage::update(SPCtx *ctx, unsigned int flags) { SPImage* object = this->spimage; SPImage *image = SP_IMAGE(object); SPDocument *doc = object->document; - CItem::onUpdate(ctx, flags); + CItem::update(ctx, flags); if (flags & SP_IMAGE_HREF_MODIFIED_FLAG) { if (image->pixbuf) { @@ -922,7 +922,7 @@ void CImage::onUpdate(SPCtx *ctx, unsigned int flags) { sp_image_update_canvas_image ((SPImage *) object); } -void CImage::onModified(unsigned int flags) { +void CImage::modified(unsigned int flags) { SPImage* object = this->spimage; SPImage *image = SP_IMAGE (object); @@ -938,7 +938,7 @@ void CImage::onModified(unsigned int flags) { } -Inkscape::XML::Node *CImage::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags ) { +Inkscape::XML::Node *CImage::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags ) { SPImage* object = this->spimage; SPImage *image = SP_IMAGE (object); @@ -970,12 +970,12 @@ Inkscape::XML::Node *CImage::onWrite(Inkscape::XML::Document *xml_doc, Inkscape: } #endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2) - CItem::onWrite(xml_doc, repr, flags); + CItem::write(xml_doc, repr, flags); return repr; } -Geom::OptRect CImage::onBbox(Geom::Affine const &transform, SPItem::BBoxType type) { +Geom::OptRect CImage::bbox(Geom::Affine const &transform, SPItem::BBoxType type) { SPImage* item = this->spimage; SPImage const &image = *SP_IMAGE(item); @@ -988,7 +988,7 @@ Geom::OptRect CImage::onBbox(Geom::Affine const &transform, SPItem::BBoxType typ return bbox; } -void CImage::onPrint(SPPrintContext *ctx) { +void CImage::print(SPPrintContext *ctx) { SPImage* item = this->spimage; SPImage *image = SP_IMAGE(item); @@ -1036,7 +1036,7 @@ void CImage::onPrint(SPPrintContext *ctx) { } } -gchar* CImage::onDescription() { +gchar* CImage::description() { SPImage* item = this->spimage; SPImage *image = SP_IMAGE(item); @@ -1060,7 +1060,7 @@ gchar* CImage::onDescription() { return ret; } -Inkscape::DrawingItem* CImage::onShow(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) { +Inkscape::DrawingItem* CImage::show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) { SPImage* item = this->spimage; SPImage * image = SP_IMAGE(item); @@ -1195,7 +1195,7 @@ static void sp_image_update_canvas_image(SPImage *image) } } -void CImage::onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { +void CImage::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { SPImage* item = this->spimage; /* An image doesn't have any nodes to snap, but still we want to be able snap one image @@ -1232,7 +1232,7 @@ void CImage::onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape * Transform x, y, set x, y, clear translation */ -Geom::Affine CImage::onSetTransform(Geom::Affine const &xform) { +Geom::Affine CImage::set_transform(Geom::Affine const &xform) { SPImage* item = this->spimage; SPImage *image = SP_IMAGE(item); @@ -1413,7 +1413,7 @@ static void sp_image_set_curve( SPImage *image ) image->curve = image->curve->unref(); } } else { - Geom::OptRect rect = image->cimage->onBbox(Geom::identity(), SPItem::VISUAL_BBOX); + Geom::OptRect rect = image->cimage->bbox(Geom::identity(), SPItem::VISUAL_BBOX); SPCurve *c = SPCurve::new_from_rect(*rect, true); if (image->curve) { @@ -1487,7 +1487,7 @@ void sp_image_refresh_if_outdated( SPImage* image ) if ( st.st_mtime != image->lastMod ) { SPCtx *ctx = 0; unsigned int flags = SP_IMAGE_HREF_MODIFIED_FLAG; - image->cimage->onUpdate(ctx, flags); + image->cimage->update(ctx, flags); } } } diff --git a/src/sp-image.h b/src/sp-image.h index 578948735..a095d9eb4 100644 --- a/src/sp-image.h +++ b/src/sp-image.h @@ -73,19 +73,19 @@ public: CImage(SPImage* image); virtual ~CImage(); - virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); - virtual void onRelease(); - virtual void onSet(unsigned int key, gchar const* value); - virtual void onUpdate(SPCtx *ctx, guint flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - virtual void onModified(unsigned int flags); - - virtual Geom::OptRect onBbox(Geom::Affine const &transform, SPItem::BBoxType type); - virtual void onPrint(SPPrintContext *ctx); - virtual gchar* onDescription(); - virtual Inkscape::DrawingItem* onShow(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags); - virtual void onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); - virtual Geom::Affine onSetTransform(Geom::Affine const &transform); + virtual void build(SPDocument *document, Inkscape::XML::Node *repr); + virtual void release(); + virtual void set(unsigned int key, gchar const* value); + virtual void update(SPCtx *ctx, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual void modified(unsigned int flags); + + virtual Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType type); + virtual void print(SPPrintContext *ctx); + virtual gchar* description(); + virtual Inkscape::DrawingItem* show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags); + virtual void snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); + virtual Geom::Affine set_transform(Geom::Affine const &transform); protected: SPImage* spimage; diff --git a/src/sp-item-group.cpp b/src/sp-item-group.cpp index 587b82607..7a6e0c1ba 100644 --- a/src/sp-item-group.cpp +++ b/src/sp-item-group.cpp @@ -88,21 +88,21 @@ sp_group_init (SPGroup *group) new (&group->_display_modes) std::map<unsigned int, SPGroup::LayerMode>(); } -void CGroup::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CGroup::build(SPDocument *document, Inkscape::XML::Node *repr) { SPGroup* object = this->spgroup; object->readAttr( "inkscape:groupmode" ); - CLPEItem::onBuild(document, repr); + CLPEItem::build(document, repr); } -void CGroup::onRelease() { +void CGroup::release() { SPGroup* object = this->spgroup; if ( SP_GROUP(object)->_layer_mode == SPGroup::LAYER ) { object->document->removeResource("layer", object); } - CLPEItem::onRelease(); + CLPEItem::release(); } static void @@ -111,8 +111,8 @@ sp_group_dispose(GObject *object) SP_GROUP(object)->_display_modes.~map(); } -void CGroup::onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref) { - CLPEItem::onChildAdded(child, ref); +void CGroup::child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref) { + CLPEItem::child_added(child, ref); SPObject *last_child = spgroup->lastChild(); @@ -157,15 +157,15 @@ void CGroup::onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref) /* fixme: hide (Lauris) */ -void CGroup::onRemoveChild(Inkscape::XML::Node *child) { - CLPEItem::onRemoveChild(child); +void CGroup::remove_child(Inkscape::XML::Node *child) { + CLPEItem::remove_child(child); spgroup->requestModified(SP_OBJECT_MODIFIED_FLAG); } -void CGroup::onOrderChanged (Inkscape::XML::Node *child, Inkscape::XML::Node *old_ref, Inkscape::XML::Node *new_ref) +void CGroup::order_changed (Inkscape::XML::Node *child, Inkscape::XML::Node *old_ref, Inkscape::XML::Node *new_ref) { - CLPEItem::onOrderChanged(child, old_ref, new_ref); + CLPEItem::order_changed(child, old_ref, new_ref); SPObject *ochild = spgroup->get_child_by_repr(child); if ( ochild && SP_IS_ITEM(ochild) ) { @@ -180,8 +180,8 @@ void CGroup::onOrderChanged (Inkscape::XML::Node *child, Inkscape::XML::Node *ol spgroup->requestModified(SP_OBJECT_MODIFIED_FLAG); } -void CGroup::onUpdate(SPCtx *ctx, unsigned int flags) { - CLPEItem::onUpdate(ctx, flags); +void CGroup::update(SPCtx *ctx, unsigned int flags) { + CLPEItem::update(ctx, flags); SPItemCtx *ictx, cctx; @@ -220,8 +220,8 @@ void CGroup::onUpdate(SPCtx *ctx, unsigned int flags) { } } -void CGroup::onModified(guint flags) { - CLPEItem::onModified(flags); +void CGroup::modified(guint flags) { + CLPEItem::modified(flags); SPObject *child; @@ -247,7 +247,7 @@ void CGroup::onModified(guint flags) { } } -Inkscape::XML::Node* CGroup::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CGroup::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPGroup* object = this->spgroup; SPGroup *group = SP_GROUP(object); @@ -296,12 +296,12 @@ Inkscape::XML::Node* CGroup::onWrite(Inkscape::XML::Document *xml_doc, Inkscape: repr->setAttribute("inkscape:groupmode", value); } - CLPEItem::onWrite(xml_doc, repr, flags); + CLPEItem::write(xml_doc, repr, flags); return repr; } -Geom::OptRect CGroup::onBbox(Geom::Affine const &transform, SPItem::BBoxType bboxtype) +Geom::OptRect CGroup::bbox(Geom::Affine const &transform, SPItem::BBoxType bboxtype) { Geom::OptRect bbox; @@ -318,7 +318,7 @@ Geom::OptRect CGroup::onBbox(Geom::Affine const &transform, SPItem::BBoxType bbo return bbox; } -void CGroup::onPrint(SPPrintContext *ctx) { +void CGroup::print(SPPrintContext *ctx) { GSList *l = g_slist_reverse(spgroup->childList(false)); while (l) { SPObject *o = SP_OBJECT (l->data); @@ -329,7 +329,7 @@ void CGroup::onPrint(SPPrintContext *ctx) { } } -gchar *CGroup::onDescription() { +gchar *CGroup::description() { gint len = this->spgroup->getItemCount(); return g_strdup_printf( ngettext("<b>Group</b> of <b>%d</b> object", @@ -337,7 +337,7 @@ gchar *CGroup::onDescription() { len), len); } -void CGroup::onSet(unsigned int key, gchar const* value) { +void CGroup::set(unsigned int key, gchar const* value) { SPGroup *group = this->spgroup; switch (key) { @@ -351,12 +351,12 @@ void CGroup::onSet(unsigned int key, gchar const* value) { } break; default: { - CLPEItem::onSet(key, value); + CLPEItem::set(key, value); } } } -Inkscape::DrawingItem *CGroup::onShow (Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) { +Inkscape::DrawingItem *CGroup::show (Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) { Inkscape::DrawingGroup *ai; SPObject *object = spgroup; @@ -368,7 +368,7 @@ Inkscape::DrawingItem *CGroup::onShow (Inkscape::Drawing &drawing, unsigned int return ai; } -void CGroup::onHide (unsigned int key) { +void CGroup::hide (unsigned int key) { SPItem * child; GSList *l = g_slist_reverse(spgroup->childList(false, SPObject::ActionShow)); @@ -385,7 +385,7 @@ void CGroup::onHide (unsigned int key) { } -void CGroup::onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { +void CGroup::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { SPGroup* item = this->spgroup; for ( SPObject const *o = item->firstChild(); o; o = o->getNext() ) @@ -671,7 +671,7 @@ void SPGroup::_showChildren (Inkscape::Drawing &drawing, Inkscape::DrawingItem * } } -void CGroup::onUpdatePatheffect(bool write) { +void CGroup::update_patheffect(bool write) { SPGroup* lpeitem = this->spgroup; #ifdef GROUP_VERBOSE @@ -684,7 +684,7 @@ void CGroup::onUpdatePatheffect(bool write) { for ( GSList const *iter = item_list; iter; iter = iter->next ) { SPObject *subitem = static_cast<SPObject *>(iter->data); if (SP_IS_LPE_ITEM(subitem)) { - ((SPLPEItem*)subitem)->clpeitem->onUpdatePatheffect(write); + ((SPLPEItem*)subitem)->clpeitem->update_patheffect(write); } } diff --git a/src/sp-item-group.h b/src/sp-item-group.h index d5e8cc771..9f22e2ef8 100644 --- a/src/sp-item-group.h +++ b/src/sp-item-group.h @@ -77,28 +77,28 @@ public: CGroup(SPGroup *group); virtual ~CGroup(); - virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); - virtual void onRelease(); + virtual void build(SPDocument *document, Inkscape::XML::Node *repr); + virtual void release(); - virtual void onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); - virtual void onRemoveChild(Inkscape::XML::Node *child); - virtual void onOrderChanged(Inkscape::XML::Node *child, Inkscape::XML::Node *old_ref, Inkscape::XML::Node *new_ref); + virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); + virtual void remove_child(Inkscape::XML::Node *child); + virtual void order_changed(Inkscape::XML::Node *child, Inkscape::XML::Node *old_ref, Inkscape::XML::Node *new_ref); - virtual void onUpdate(SPCtx *ctx, unsigned int flags); - virtual void onModified(guint flags); - virtual void onSet(unsigned int key, gchar const* value); + virtual void update(SPCtx *ctx, unsigned int flags); + virtual void modified(guint flags); + virtual void set(unsigned int key, gchar const* value); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - virtual Geom::OptRect onBbox(Geom::Affine const &transform, SPItem::BBoxType bboxtype); - virtual void onPrint(SPPrintContext *ctx); - virtual gchar *onDescription(); - virtual Inkscape::DrawingItem *onShow (Inkscape::Drawing &drawing, unsigned int key, unsigned int flags); - virtual void onHide (unsigned int key); + virtual Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType bboxtype); + virtual void print(SPPrintContext *ctx); + virtual gchar *description(); + virtual Inkscape::DrawingItem *show (Inkscape::Drawing &drawing, unsigned int key, unsigned int flags); + virtual void hide (unsigned int key); - virtual void onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); + virtual void snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); - virtual void onUpdatePatheffect(bool write); + virtual void update_patheffect(bool write); protected: SPGroup *spgroup; diff --git a/src/sp-item.cpp b/src/sp-item.cpp index 9dfb22139..4e157666a 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -395,7 +395,7 @@ void SPItem::moveTo(SPItem *target, gboolean intoafter) { } } -void CItem::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CItem::build(SPDocument *document, Inkscape::XML::Node *repr) { SPItem* object = this->spitem; object->readAttr( "style" ); @@ -409,10 +409,10 @@ void CItem::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { object->readAttr( "inkscape:connector-avoid" ); object->readAttr( "inkscape:connection-points" ); - CObject::onBuild(document, repr); + CObject::build(document, repr); } -void CItem::onRelease() { +void CItem::release() { SPItem* item = this->spitem; // Note: do this here before the clip_ref is deleted, since calling @@ -426,7 +426,7 @@ void CItem::onRelease() { delete item->clip_ref; delete item->mask_ref; - CObject::onRelease(); + CObject::release(); while (item->display) { item->display = sp_item_view_list_remove(item->display, item->display); @@ -435,7 +435,7 @@ void CItem::onRelease() { item->_transformed_signal.~signal(); } -void CItem::onSet(unsigned int key, gchar const* value) { +void CItem::set(unsigned int key, gchar const* value) { SPItem *item = this->spitem; SPItem* object = item; @@ -518,7 +518,7 @@ void CItem::onSet(unsigned int key, gchar const* value) { sp_style_read_from_object(object->style, object); object->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG); } else { - CObject::onSet(key, value); + CObject::set(key, value); } break; } @@ -574,7 +574,7 @@ void SPItem::mask_ref_changed(SPObject *old_mask, SPObject *mask, SPItem *item) } } -void CItem::onUpdate(SPCtx *ctx, guint flags) { +void CItem::update(SPCtx *ctx, guint flags) { SPItem *item = this->spitem; SPItem* object = item; @@ -632,7 +632,7 @@ void CItem::onUpdate(SPCtx *ctx, guint flags) { item->avoidRef->handleSettingChange(); } -Inkscape::XML::Node* CItem::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CItem::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPItem *item = this->spitem; SPItem* object = item; @@ -692,13 +692,13 @@ Inkscape::XML::Node* CItem::onWrite(Inkscape::XML::Document *xml_doc, Inkscape:: } } - CObject::onWrite(xml_doc, repr, flags); + CObject::write(xml_doc, repr, flags); return repr; } // CPPIFY: make pure virtual -Geom::OptRect CItem::onBbox(Geom::Affine const &transform, SPItem::BBoxType type) { +Geom::OptRect CItem::bbox(Geom::Affine const &transform, SPItem::BBoxType type) { //throw; return Geom::OptRect(); } @@ -712,7 +712,7 @@ Geom::OptRect SPItem::geometricBounds(Geom::Affine const &transform) const Geom::OptRect bbox; // call the subclass method - bbox = this->citem->onBbox(transform, SPItem::GEOMETRIC_BBOX); + bbox = this->citem->bbox(transform, SPItem::GEOMETRIC_BBOX); return bbox; } @@ -731,7 +731,7 @@ Geom::OptRect SPItem::visualBounds(Geom::Affine const &transform) const if ( style && style->filter.href && style->getFilter() && SP_IS_FILTER(style->getFilter())) { // call the subclass method - bbox = this->citem->onBbox(Geom::identity(), SPItem::VISUAL_BBOX); + bbox = this->citem->bbox(Geom::identity(), SPItem::VISUAL_BBOX); SPFilter *filter = SP_FILTER(style->getFilter()); // default filer area per the SVG spec: @@ -775,7 +775,7 @@ Geom::OptRect SPItem::visualBounds(Geom::Affine const &transform) const *bbox *= transform; } else { // call the subclass method - bbox = this->citem->onBbox(transform, SPItem::VISUAL_BBOX); + bbox = this->citem->bbox(transform, SPItem::VISUAL_BBOX); } if (clip_ref->getObject()) { bbox.intersectWith(SP_CLIPPATH(clip_ref->getObject())->geometricBounds(transform)); @@ -874,7 +874,7 @@ unsigned SPItem::pos_in_parent() } // CPPIFY: make pure virtual, see below! -void CItem::onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { +void CItem::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { //throw; } /* This will only be called if the derived class doesn't override this. @@ -886,7 +886,7 @@ void CItem::onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape: void SPItem::getSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) const { // Get the snappoints of the item - this->citem->onSnappoints(p, snapprefs); + this->citem->snappoints(p, snapprefs); // Get the snappoints at the item's center if (snapprefs != NULL && snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_ROTATION_CENTER)) { @@ -922,7 +922,7 @@ void SPItem::getSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscap } // CPPIFY: make pure virtual -void CItem::onPrint(SPPrintContext* ctx) { +void CItem::print(SPPrintContext* ctx) { //throw; } @@ -931,16 +931,16 @@ void SPItem::invoke_print(SPPrintContext *ctx) if ( !isHidden() ) { if (!transform.isIdentity() || style->opacity.value != SP_SCALE24_MAX) { sp_print_bind(ctx, transform, SP_SCALE24_TO_FLOAT(style->opacity.value)); - this->citem->onPrint(ctx); + this->citem->print(ctx); sp_print_release(ctx); } else { - this->citem->onPrint(ctx); + this->citem->print(ctx); } } } // CPPIFY: is it possible to combine this method with "SPItem::description()"? -gchar* CItem::onDescription() { +gchar* CItem::description() { return g_strdup(_("Object")); } @@ -951,7 +951,7 @@ gchar* CItem::onDescription() { */ gchar *SPItem::description() { - gchar* s = this->citem->onDescription(); + gchar* s = this->citem->description(); if (s && clip_ref->getObject()) { gchar *snew = g_strdup_printf (_("%s; <i>clipped</i>"), s); g_free (s); @@ -1006,7 +1006,7 @@ unsigned SPItem::display_key_new(unsigned numkeys) } // CPPIFY: make pure virtual -Inkscape::DrawingItem* CItem::onShow(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) { +Inkscape::DrawingItem* CItem::show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) { //throw; return 0; } @@ -1015,7 +1015,7 @@ Inkscape::DrawingItem *SPItem::invoke_show(Inkscape::Drawing &drawing, unsigned { Inkscape::DrawingItem *ai = NULL; - ai = this->citem->onShow(drawing, key, flags); + ai = this->citem->show(drawing, key, flags); if (ai != NULL) { Geom::OptRect item_bbox = geometricBounds(); @@ -1065,13 +1065,13 @@ Inkscape::DrawingItem *SPItem::invoke_show(Inkscape::Drawing &drawing, unsigned } // CPPIFY: make pure virtual -void CItem::onHide(unsigned int key) { +void CItem::hide(unsigned int key) { //throw; } void SPItem::invoke_hide(unsigned key) { - this->citem->onHide(key); + this->citem->hide(key); SPItemView *ref = NULL; SPItemView *v = display; @@ -1298,7 +1298,7 @@ void SPItem::adjust_livepatheffect (Geom::Affine const &postmul, bool set) // CPPIFY:: make pure virtual? // Not all SPItems must necessarily have a set transform method! -Geom::Affine CItem::onSetTransform(Geom::Affine const &transform) { +Geom::Affine CItem::set_transform(Geom::Affine const &transform) { // throw; return transform; } @@ -1378,7 +1378,7 @@ void SPItem::doWriteTransform(Inkscape::XML::Node *repr, Geom::Affine const &tra !mask_ref->getObject() && // the object does not have a mask !(!transform.isTranslation() && style && style->getFilter()) // the object does not have a filter, or the transform is translation (which is supposed to not affect filters) ) { - transform_attr = this->citem->onSetTransform(transform); + transform_attr = this->citem->set_transform(transform); if (freeze_stroke_width) { freeze_stroke_width_recursive(false); @@ -1411,13 +1411,13 @@ void SPItem::doWriteTransform(Inkscape::XML::Node *repr, Geom::Affine const &tra } // CPPIFY: see below, do not make pure? -gint CItem::onEvent(SPEvent* event) { +gint CItem::event(SPEvent* event) { return FALSE; } gint SPItem::emitEvent(SPEvent &event) { - return this->citem->onEvent(&event); + return this->citem->event(&event); } /** @@ -1435,7 +1435,7 @@ void SPItem::set_item_transform(Geom::Affine const &transform_matrix) } } -void CItem::onConvertToGuides() { +void CItem::convert_to_guides() { // CPPIFY: If not overridden, call SPItem::convert_to_guides(), see below! this->spitem->convert_to_guides(); } diff --git a/src/sp-item.h b/src/sp-item.h index 623c6cbe1..870dae031 100644 --- a/src/sp-item.h +++ b/src/sp-item.h @@ -253,21 +253,21 @@ public: CItem(SPItem* item); virtual ~CItem(); - virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); - virtual void onRelease(); - virtual void onSet(unsigned int key, gchar const* value); - virtual void onUpdate(SPCtx *ctx, guint flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - - virtual Geom::OptRect onBbox(Geom::Affine const &transform, SPItem::BBoxType type); - virtual void onPrint(SPPrintContext *ctx); - virtual gchar* onDescription(); - virtual Inkscape::DrawingItem* onShow(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags); - virtual void onHide(unsigned int key); - virtual void onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); - virtual Geom::Affine onSetTransform(Geom::Affine const &transform); - virtual void onConvertToGuides(); - virtual gint onEvent(SPEvent *event); + virtual void build(SPDocument *document, Inkscape::XML::Node *repr); + virtual void release(); + virtual void set(unsigned int key, gchar const* value); + virtual void update(SPCtx *ctx, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + + virtual Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType type); + virtual void print(SPPrintContext *ctx); + virtual gchar* description(); + virtual Inkscape::DrawingItem* show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags); + virtual void hide(unsigned int key); + virtual void snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); + virtual Geom::Affine set_transform(Geom::Affine const &transform); + virtual void convert_to_guides(); + virtual gint event(SPEvent *event); protected: SPItem* spitem; diff --git a/src/sp-line.cpp b/src/sp-line.cpp index bc198a6a5..71a9a78d6 100644 --- a/src/sp-line.cpp +++ b/src/sp-line.cpp @@ -56,10 +56,10 @@ sp_line_init(SPLine * line) line->y2.unset(); } -void CLine::onBuild(SPDocument * document, Inkscape::XML::Node * repr) { +void CLine::build(SPDocument * document, Inkscape::XML::Node * repr) { SPLine* object = this->spline; - CShape::onBuild(document, repr); + CShape::build(document, repr); object->readAttr( "x1" ); object->readAttr( "y1" ); @@ -67,7 +67,7 @@ void CLine::onBuild(SPDocument * document, Inkscape::XML::Node * repr) { object->readAttr( "y2" ); } -void CLine::onSet(unsigned int key, const gchar* value) { +void CLine::set(unsigned int key, const gchar* value) { SPLine* object = this->spline; SPLine * line = object; @@ -91,12 +91,12 @@ void CLine::onSet(unsigned int key, const gchar* value) { object->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); break; default: - CShape::onSet(key, value); + CShape::set(key, value); break; } } -void CLine::onUpdate(SPCtx *ctx, guint flags) { +void CLine::update(SPCtx *ctx, guint flags) { SPLine* object = this->spline; if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) { @@ -116,10 +116,10 @@ void CLine::onUpdate(SPCtx *ctx, guint flags) { ((SPShape *) object)->setShape(); } - CShape::onUpdate(ctx, flags); + CShape::update(ctx, flags); } -Inkscape::XML::Node* CLine::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CLine::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPLine* object = this->spline; SPLine *line = object; @@ -136,16 +136,16 @@ Inkscape::XML::Node* CLine::onWrite(Inkscape::XML::Document *xml_doc, Inkscape:: sp_repr_set_svg_double(repr, "x2", line->x2.computed); sp_repr_set_svg_double(repr, "y2", line->y2.computed); - CShape::onWrite(xml_doc, repr, flags); + CShape::write(xml_doc, repr, flags); return repr; } -gchar* CLine::onDescription() { +gchar* CLine::description() { return g_strdup(_("<b>Line</b>")); } -void CLine::onConvertToGuides() { +void CLine::convert_to_guides() { SPLine* item = this->spline; SPLine *line = item; @@ -160,7 +160,7 @@ void CLine::onConvertToGuides() { } -Geom::Affine CLine::onSetTransform(Geom::Affine const &transform) { +Geom::Affine CLine::set_transform(Geom::Affine const &transform) { SPLine* item = this->spline; SPLine *line = item; @@ -184,7 +184,7 @@ Geom::Affine CLine::onSetTransform(Geom::Affine const &transform) { return Geom::identity(); } -void CLine::onSetShape() { +void CLine::set_shape() { SPLine* shape = this->spline; SPLine *line = shape; diff --git a/src/sp-line.h b/src/sp-line.h index e521ca619..e59c15e9c 100644 --- a/src/sp-line.h +++ b/src/sp-line.h @@ -58,16 +58,16 @@ public: CLine(SPLine* line); virtual ~CLine(); - virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - virtual void onSet(unsigned int key, gchar const* value); + virtual void build(SPDocument *document, Inkscape::XML::Node *repr); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual void set(unsigned int key, gchar const* value); - virtual gchar* onDescription(); - virtual Geom::Affine onSetTransform(Geom::Affine const &transform); - virtual void onConvertToGuides(); - virtual void onUpdate(SPCtx* ctx, guint flags); + virtual gchar* description(); + virtual Geom::Affine set_transform(Geom::Affine const &transform); + virtual void convert_to_guides(); + virtual void update(SPCtx* ctx, guint flags); - virtual void onSetShape(); + virtual void set_shape(); protected: SPLine* spline; diff --git a/src/sp-linear-gradient.h b/src/sp-linear-gradient.h index 9b766f474..516cffe55 100644 --- a/src/sp-linear-gradient.h +++ b/src/sp-linear-gradient.h @@ -33,10 +33,10 @@ public: CLinearGradient(SPLinearGradient* lineargradient); virtual ~CLinearGradient(); - virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); - virtual void onSet(unsigned key, gchar const *value); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - virtual cairo_pattern_t* onCreatePattern(cairo_t *ct, Geom::OptRect const &bbox, double opacity); + virtual void build(SPDocument *document, Inkscape::XML::Node *repr); + virtual void set(unsigned key, gchar const *value); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual cairo_pattern_t* pattern_new(cairo_t *ct, Geom::OptRect const &bbox, double opacity); protected: SPLinearGradient* splineargradient; diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp index 15e4d21d2..f20818a64 100644 --- a/src/sp-lpe-item.cpp +++ b/src/sp-lpe-item.cpp @@ -91,15 +91,15 @@ static void sp_lpe_item_finalize(GObject *object) } } -void CLPEItem::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CLPEItem::build(SPDocument *document, Inkscape::XML::Node *repr) { SPLPEItem* object = this->splpeitem; object->readAttr( "inkscape:path-effect" ); - CItem::onBuild(document, repr); + CItem::build(document, repr); } -void CLPEItem::onRelease() { +void CLPEItem::release() { SPLPEItem *lpeitem = this->splpeitem; // disconnect all modified listeners: @@ -122,10 +122,10 @@ void CLPEItem::onRelease() { delete lpeitem->path_effect_list; lpeitem->path_effect_list = NULL; - CItem::onRelease(); + CItem::release(); } -void CLPEItem::onSet(unsigned int key, gchar const* value) { +void CLPEItem::set(unsigned int key, gchar const* value) { SPLPEItem *lpeitem = this->splpeitem; SPLPEItem* object = lpeitem; @@ -187,19 +187,19 @@ void CLPEItem::onSet(unsigned int key, gchar const* value) { } break; default: - CItem::onSet(key, value); + CItem::set(key, value); break; } } -void CLPEItem::onUpdate(SPCtx* ctx, unsigned int flags) { - CItem::onUpdate(ctx, flags); +void CLPEItem::update(SPCtx* ctx, unsigned int flags) { + CItem::update(ctx, flags); // update the helperpaths of all LPEs applied to the item // TODO: re-add for the new node tool } -void CLPEItem::onModified(unsigned int flags) { +void CLPEItem::modified(unsigned int flags) { SPLPEItem *lpeitem = this->splpeitem; SPLPEItem* object = lpeitem; @@ -210,7 +210,7 @@ void CLPEItem::onModified(unsigned int flags) { // CItem::onModified(flags); } -Inkscape::XML::Node* CLPEItem::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CLPEItem::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPLPEItem *lpeitem = this->splpeitem; if (flags & SP_OBJECT_WRITE_EXT) { @@ -222,7 +222,7 @@ Inkscape::XML::Node* CLPEItem::onWrite(Inkscape::XML::Document *xml_doc, Inkscap } } - CItem::onWrite(xml_doc, repr, flags); + CItem::write(xml_doc, repr, flags); return repr; } @@ -285,7 +285,7 @@ bool sp_lpe_item_perform_path_effect(SPLPEItem *lpeitem, SPCurve *curve) { } // CPPIFY: make pure virtual -void CLPEItem::onUpdatePatheffect(bool write) { +void CLPEItem::update_patheffect(bool write) { //throw; } @@ -335,7 +335,7 @@ sp_lpe_item_update_patheffect (SPLPEItem *lpeitem, bool wholetree, bool write) top = lpeitem; } - top->clpeitem->onUpdatePatheffect(write); + top->clpeitem->update_patheffect(write); } /** @@ -602,10 +602,10 @@ void sp_lpe_item_edit_next_param_oncanvas(SPLPEItem *lpeitem, SPDesktop *dt) } } -void CLPEItem::onChildAdded(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { +void CLPEItem::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { SPLPEItem* object = this->splpeitem; - CItem::onChildAdded(child, ref); + CItem::child_added(child, ref); if (SP_IS_LPE_ITEM(object) && sp_lpe_item_has_path_effect_recursive(SP_LPE_ITEM(object))) { SPObject *ochild = object->get_child_by_repr(child); @@ -614,7 +614,7 @@ void CLPEItem::onChildAdded(Inkscape::XML::Node *child, Inkscape::XML::Node *ref } } } -void CLPEItem::onRemoveChild(Inkscape::XML::Node * child) { +void CLPEItem::remove_child(Inkscape::XML::Node * child) { SPLPEItem* object = this->splpeitem; if (SP_IS_LPE_ITEM(object) && sp_lpe_item_has_path_effect_recursive(SP_LPE_ITEM(object))) { @@ -624,7 +624,7 @@ void CLPEItem::onRemoveChild(Inkscape::XML::Node * child) { } } - CItem::onRemoveChild(child); + CItem::remove_child(child); } static std::string patheffectlist_write_svg(PathEffectList const & list) diff --git a/src/sp-lpe-item.h b/src/sp-lpe-item.h index bbd5539cb..60fef13b7 100644 --- a/src/sp-lpe-item.h +++ b/src/sp-lpe-item.h @@ -68,20 +68,20 @@ public: CLPEItem(SPLPEItem* lpeitem); virtual ~CLPEItem(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, gchar const* value); + virtual void set(unsigned int key, gchar const* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); - virtual void onModified(unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); + virtual void modified(unsigned int flags); - virtual void onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); - virtual void onRemoveChild(Inkscape::XML::Node* child); + virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); + virtual void remove_child(Inkscape::XML::Node* child); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - virtual void onUpdatePatheffect(bool write); + virtual void update_patheffect(bool write); protected: SPLPEItem* splpeitem; diff --git a/src/sp-mask.cpp b/src/sp-mask.cpp index 161fc3e59..e777ee154 100644 --- a/src/sp-mask.cpp +++ b/src/sp-mask.cpp @@ -69,10 +69,10 @@ sp_mask_init (SPMask *mask) mask->display = NULL; } -void CMask::onBuild(SPDocument* doc, Inkscape::XML::Node* repr) { +void CMask::build(SPDocument* doc, Inkscape::XML::Node* repr) { SPMask* object = this->spmask; - CObjectGroup::onBuild(doc, repr); + CObjectGroup::build(doc, repr); object->readAttr( "maskUnits" ); object->readAttr( "maskContentUnits" ); @@ -81,7 +81,7 @@ void CMask::onBuild(SPDocument* doc, Inkscape::XML::Node* repr) { doc->addResource("mask", object); } -void CMask::onRelease() { +void CMask::release() { SPMask* object = this->spmask; if (object->document) { @@ -95,10 +95,10 @@ void CMask::onRelease() { cp->display = sp_mask_view_list_remove (cp->display, cp->display); } - CObjectGroup::onRelease(); + CObjectGroup::release(); } -void CMask::onSet(unsigned int key, const gchar* value) { +void CMask::set(unsigned int key, const gchar* value) { SPMask* object = this->spmask; SPMask *mask = SP_MASK (object); @@ -131,16 +131,16 @@ void CMask::onSet(unsigned int key, const gchar* value) { object->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); break; default: - CObjectGroup::onSet(key, value); + CObjectGroup::set(key, value); break; } } -void CMask::onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref) { +void CMask::child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref) { SPMask* object = this->spmask; /* Invoke SPObjectGroup implementation */ - CObjectGroup::onChildAdded(child, ref); + CObjectGroup::child_added(child, ref); /* Show new object */ SPObject *ochild = object->document->getObjectByRepr(child); @@ -158,7 +158,7 @@ void CMask::onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref) { } -void CMask::onUpdate(SPCtx* ctx, unsigned int flags) { +void CMask::update(SPCtx* ctx, unsigned int flags) { SPMask* object = this->spmask; if (flags & SP_OBJECT_MODIFIED_FLAG) { @@ -196,7 +196,7 @@ void CMask::onUpdate(SPCtx* ctx, unsigned int flags) { } } -void CMask::onModified(unsigned int flags) { +void CMask::modified(unsigned int flags) { SPMask* object = this->spmask; if (flags & SP_OBJECT_MODIFIED_FLAG) { @@ -222,12 +222,12 @@ void CMask::onModified(unsigned int flags) { } } -Inkscape::XML::Node* CMask::onWrite(Inkscape::XML::Document* xml_doc, Inkscape::XML::Node* repr, guint flags) { +Inkscape::XML::Node* CMask::write(Inkscape::XML::Document* xml_doc, Inkscape::XML::Node* repr, guint flags) { if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) { repr = xml_doc->createElement("svg:mask"); } - CObjectGroup::onWrite(xml_doc, repr, flags); + CObjectGroup::write(xml_doc, repr, flags); return repr; } diff --git a/src/sp-mask.h b/src/sp-mask.h index 5ee48765b..e0048c13f 100644 --- a/src/sp-mask.h +++ b/src/sp-mask.h @@ -58,17 +58,17 @@ public: CMask(SPMask* mask); virtual ~CMask(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); + virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); - virtual void onModified(unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); + virtual void modified(unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); protected: SPMask* spmask; diff --git a/src/sp-mesh-gradient.h b/src/sp-mesh-gradient.h index a366165b4..40fc5d8e9 100644 --- a/src/sp-mesh-gradient.h +++ b/src/sp-mesh-gradient.h @@ -31,10 +31,10 @@ public: CMeshGradient(SPMeshGradient* meshgradient); virtual ~CMeshGradient(); - virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); - virtual void onSet(unsigned key, gchar const *value); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - virtual cairo_pattern_t* onCreatePattern(cairo_t *ct, Geom::OptRect const &bbox, double opacity); + virtual void build(SPDocument *document, Inkscape::XML::Node *repr); + virtual void set(unsigned key, gchar const *value); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual cairo_pattern_t* pattern_new(cairo_t *ct, Geom::OptRect const &bbox, double opacity); protected: SPMeshGradient* spmeshgradient; diff --git a/src/sp-mesh-patch.h b/src/sp-mesh-patch.h index 2f5022234..58655d65a 100644 --- a/src/sp-mesh-patch.h +++ b/src/sp-mesh-patch.h @@ -55,9 +55,9 @@ public: CMeshPatch(SPMeshPatch* meshpatch); virtual ~CMeshPatch(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onSet(unsigned int key, const gchar* value); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void set(unsigned int key, const gchar* value); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); protected: SPMeshPatch* spmeshpatch; diff --git a/src/sp-mesh-row.h b/src/sp-mesh-row.h index 482e1270b..98187b124 100644 --- a/src/sp-mesh-row.h +++ b/src/sp-mesh-row.h @@ -49,9 +49,9 @@ public: CMeshRow(SPMeshRow* meshrow); virtual ~CMeshRow(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onSet(unsigned int key, const gchar* value); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void set(unsigned int key, const gchar* value); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); protected: SPMeshRow* spmeshrow; diff --git a/src/sp-metadata.cpp b/src/sp-metadata.cpp index cf83ad239..d788ec48d 100644 --- a/src/sp-metadata.cpp +++ b/src/sp-metadata.cpp @@ -74,7 +74,7 @@ void strip_ids_recursively(Inkscape::XML::Node *node) { } -void CMetadata::onBuild(SPDocument* doc, Inkscape::XML::Node* repr) { +void CMetadata::build(SPDocument* doc, Inkscape::XML::Node* repr) { using Inkscape::XML::NodeSiblingIterator; debug("0x%08x",(unsigned int)object); @@ -88,25 +88,25 @@ void CMetadata::onBuild(SPDocument* doc, Inkscape::XML::Node* repr) { } } - CObject::onBuild(doc, repr); + CObject::build(doc, repr); } -void CMetadata::onRelease() { +void CMetadata::release() { debug("0x%08x",(unsigned int)object); // handle ourself - CObject::onRelease(); + CObject::release(); } -void CMetadata::onSet(unsigned int key, const gchar* value) { +void CMetadata::set(unsigned int key, const gchar* value) { debug("0x%08x %s(%u): '%s'",(unsigned int)object, sp_attribute_name(key),key,value); // see if any parents need this value - CObject::onSet(key, value); + CObject::set(key, value); } -void CMetadata::onUpdate(SPCtx* ctx, unsigned int flags) { +void CMetadata::update(SPCtx* ctx, unsigned int flags) { debug("0x%08x",(unsigned int)object); //SPMetadata *metadata = SP_METADATA(object); @@ -120,7 +120,7 @@ void CMetadata::onUpdate(SPCtx* ctx, unsigned int flags) { // CObject::onUpdate(ctx, flags); } -Inkscape::XML::Node* CMetadata::onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags) { +Inkscape::XML::Node* CMetadata::write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags) { SPMetadata* object = this->spmetadata; debug("0x%08x",(unsigned int)object); @@ -134,7 +134,7 @@ Inkscape::XML::Node* CMetadata::onWrite(Inkscape::XML::Document* doc, Inkscape:: } } - CObject::onWrite(doc, repr, flags); + CObject::write(doc, repr, flags); return repr; } diff --git a/src/sp-metadata.h b/src/sp-metadata.h index 55b5c6407..d610a1592 100644 --- a/src/sp-metadata.h +++ b/src/sp-metadata.h @@ -38,12 +38,12 @@ public: CMetadata(SPMetadata* metadata); virtual ~CMetadata(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onSet(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual void set(unsigned int key, const gchar* value); + virtual void update(SPCtx* ctx, unsigned int flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); protected: SPMetadata* spmetadata; diff --git a/src/sp-missing-glyph.cpp b/src/sp-missing-glyph.cpp index 6ed413f1d..227f4d802 100644 --- a/src/sp-missing-glyph.cpp +++ b/src/sp-missing-glyph.cpp @@ -47,10 +47,10 @@ static void sp_missing_glyph_init(SPMissingGlyph *glyph) glyph->vert_adv_y = 0; } -void CMissingGlyph::onBuild(SPDocument* doc, Inkscape::XML::Node* repr) { +void CMissingGlyph::build(SPDocument* doc, Inkscape::XML::Node* repr) { SPMissingGlyph* object = this->spmissingglyph; - CObject::onBuild(doc, repr); + CObject::build(doc, repr); object->readAttr( "d" ); object->readAttr( "horiz-adv-x" ); @@ -59,12 +59,12 @@ void CMissingGlyph::onBuild(SPDocument* doc, Inkscape::XML::Node* repr) { object->readAttr( "vert-adv-y" ); } -void CMissingGlyph::onRelease() { - CObject::onRelease(); +void CMissingGlyph::release() { + CObject::release(); } -void CMissingGlyph::onSet(unsigned int key, const gchar* value) { +void CMissingGlyph::set(unsigned int key, const gchar* value) { SPMissingGlyph* object = this->spmissingglyph; SPMissingGlyph *glyph = SP_MISSING_GLYPH(object); @@ -117,7 +117,7 @@ void CMissingGlyph::onSet(unsigned int key, const gchar* value) { } default: { - CObject::onSet(key, value); + CObject::set(key, value); break; } } @@ -125,7 +125,7 @@ void CMissingGlyph::onSet(unsigned int key, const gchar* value) { #define COPY_ATTR(rd,rs,key) (rd)->setAttribute((key), rs->attribute(key)); -Inkscape::XML::Node* CMissingGlyph::onWrite(Inkscape::XML::Document* xml_doc, Inkscape::XML::Node* repr, guint flags) { +Inkscape::XML::Node* CMissingGlyph::write(Inkscape::XML::Document* xml_doc, Inkscape::XML::Node* repr, guint flags) { SPMissingGlyph* object = this->spmissingglyph; // SPMissingGlyph *glyph = SP_MISSING_GLYPH(object); @@ -152,7 +152,7 @@ Inkscape::XML::Node* CMissingGlyph::onWrite(Inkscape::XML::Document* xml_doc, In COPY_ATTR(repr, object->getRepr(), "vert-adv-y"); } - CObject::onWrite(xml_doc, repr, flags); + CObject::write(xml_doc, repr, flags); return repr; } diff --git a/src/sp-missing-glyph.h b/src/sp-missing-glyph.h index 0b6e395f5..213b98d97 100644 --- a/src/sp-missing-glyph.h +++ b/src/sp-missing-glyph.h @@ -47,10 +47,10 @@ public: CMissingGlyph(SPMissingGlyph* mg); virtual ~CMissingGlyph(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); - virtual void onSet(unsigned int key, const gchar* value); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); + virtual void set(unsigned int key, const gchar* value); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); protected: SPMissingGlyph* spmissingglyph; diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp index 7c663179c..1771b0787 100644 --- a/src/sp-namedview.cpp +++ b/src/sp-namedview.cpp @@ -181,13 +181,13 @@ static void sp_namedview_generate_old_grid(SPNamedView * /*nv*/, SPDocument *doc } } -void CNamedView::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CNamedView::build(SPDocument *document, Inkscape::XML::Node *repr) { SPNamedView* object = this->spnamedview; SPNamedView *nv = (SPNamedView *) object; SPObjectGroup *og = (SPObjectGroup *) object; - CObjectGroup::onBuild(document, repr); + CObjectGroup::build(document, repr); object->readAttr( "inkscape:document-units" ); object->readAttr( "units" ); @@ -257,7 +257,7 @@ void CNamedView::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { sp_namedview_generate_old_grid(nv, document, repr); } -void CNamedView::onRelease() { +void CNamedView::release() { SPNamedView* object = this->spnamedview; SPNamedView *namedview = (SPNamedView *) object; @@ -273,12 +273,12 @@ void CNamedView::onRelease() { namedview->grids = g_slist_remove_link(namedview->grids, namedview->grids); // deletes first entry } - CObjectGroup::onRelease(); + CObjectGroup::release(); namedview->snap_manager.~SnapManager(); } -void CNamedView::onSet(unsigned int key, const gchar* value) { +void CNamedView::set(unsigned int key, const gchar* value) { SPNamedView* object = this->spnamedview; SPNamedView *nv = SP_NAMEDVIEW(object); @@ -593,7 +593,7 @@ void CNamedView::onSet(unsigned int key, const gchar* value) { break; } default: - CObjectGroup::onSet(key, value); + CObjectGroup::set(key, value); break; } } @@ -639,12 +639,12 @@ sp_namedview_add_grid(SPNamedView *nv, Inkscape::XML::Node *repr, SPDesktop *des return grid; } -void CNamedView::onChildAdded(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { +void CNamedView::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { SPNamedView* object = this->spnamedview; SPNamedView *nv = (SPNamedView *) object; - CObjectGroup::onChildAdded(child, ref); + CObjectGroup::child_added(child, ref); if (!strcmp(child->name(), "inkscape:grid")) { sp_namedview_add_grid(nv, child, NULL); @@ -670,7 +670,7 @@ void CNamedView::onChildAdded(Inkscape::XML::Node *child, Inkscape::XML::Node *r } } -void CNamedView::onRemoveChild(Inkscape::XML::Node *child) { +void CNamedView::remove_child(Inkscape::XML::Node *child) { SPNamedView* object = this->spnamedview; SPNamedView *nv = (SPNamedView *) object; @@ -696,10 +696,10 @@ void CNamedView::onRemoveChild(Inkscape::XML::Node *child) { } } - CObjectGroup::onRemoveChild(child); + CObjectGroup::remove_child(child); } -Inkscape::XML::Node* CNamedView::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CNamedView::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPNamedView* object = this->spnamedview; if ( ( flags & SP_OBJECT_WRITE_EXT ) && diff --git a/src/sp-namedview.h b/src/sp-namedview.h index 8fe250c73..294f39d59 100644 --- a/src/sp-namedview.h +++ b/src/sp-namedview.h @@ -113,14 +113,14 @@ public: CNamedView(SPNamedView* view); virtual ~CNamedView(); - virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); - virtual void onRelease(); - virtual void onSet(unsigned int key, gchar const* value); + virtual void build(SPDocument *document, Inkscape::XML::Node *repr); + virtual void release(); + virtual void set(unsigned int key, gchar const* value); - virtual void onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); - virtual void onRemoveChild(Inkscape::XML::Node* child); + virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); + virtual void remove_child(Inkscape::XML::Node* child); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); protected: SPNamedView* spnamedview; diff --git a/src/sp-object-group.cpp b/src/sp-object-group.cpp index a4ada0120..ad2210574 100644 --- a/src/sp-object-group.cpp +++ b/src/sp-object-group.cpp @@ -41,34 +41,34 @@ CObjectGroup::~CObjectGroup() { } -void CObjectGroup::onChildAdded(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { +void CObjectGroup::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { SPObjectGroup* object = this->spobjectgroup; - CObject::onChildAdded(child, ref); + CObject::child_added(child, ref); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } -void CObjectGroup::onRemoveChild(Inkscape::XML::Node *child) { +void CObjectGroup::remove_child(Inkscape::XML::Node *child) { SPObjectGroup* object = this->spobjectgroup; - CObject::onRemoveChild(child); + CObject::remove_child(child); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } -void CObjectGroup::onOrderChanged(Inkscape::XML::Node *child, Inkscape::XML::Node *old_ref, Inkscape::XML::Node *new_ref) { +void CObjectGroup::order_changed(Inkscape::XML::Node *child, Inkscape::XML::Node *old_ref, Inkscape::XML::Node *new_ref) { SPObjectGroup* object = this->spobjectgroup; - CObject::onOrderChanged(child, old_ref, new_ref); + CObject::order_changed(child, old_ref, new_ref); object->requestModified(SP_OBJECT_MODIFIED_FLAG); } -Inkscape::XML::Node *CObjectGroup::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node *CObjectGroup::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPObjectGroup* object = this->spobjectgroup; if (flags & SP_OBJECT_WRITE_BUILD) { @@ -93,7 +93,7 @@ Inkscape::XML::Node *CObjectGroup::onWrite(Inkscape::XML::Document *xml_doc, Ink } } - CObject::onWrite(xml_doc, repr, flags); + CObject::write(xml_doc, repr, flags); return repr; } diff --git a/src/sp-object-group.h b/src/sp-object-group.h index d80a9165b..aa54092e6 100644 --- a/src/sp-object-group.h +++ b/src/sp-object-group.h @@ -47,12 +47,12 @@ public: CObjectGroup(SPObjectGroup* gr); virtual ~CObjectGroup(); - virtual void onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); - virtual void onRemoveChild(Inkscape::XML::Node* child); + virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); + virtual void remove_child(Inkscape::XML::Node* child); - virtual void onOrderChanged(Inkscape::XML::Node* child, Inkscape::XML::Node* old, Inkscape::XML::Node* new_repr); + virtual void order_changed(Inkscape::XML::Node* child, Inkscape::XML::Node* old, Inkscape::XML::Node* new_repr); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); protected: SPObjectGroup* spobjectgroup; diff --git a/src/sp-object.cpp b/src/sp-object.cpp index 0b31d2835..65d37ef1d 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -190,15 +190,15 @@ sp_object_init(SPObject *object) } // CPPIFY: make pure virtual -void CObject::onReadContent() { +void CObject::read_content() { //throw; } -void CObject::onUpdate(SPCtx* ctx, unsigned int flags) { +void CObject::update(SPCtx* ctx, unsigned int flags) { //throw; } -void CObject::onModified(unsigned int flags) { +void CObject::modified(unsigned int flags) { //throw; } @@ -657,7 +657,7 @@ SPObject *SPObject::get_child_by_repr(Inkscape::XML::Node *repr) return result; } -void CObject::onChildAdded(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { +void CObject::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { SPObject* object = this->spobject; GType type = sp_repr_type_lookup(child); @@ -672,7 +672,7 @@ void CObject::onChildAdded(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) ochild->invoke_build(object->document, child, object->cloned); } -void CObject::onRelease() { +void CObject::release() { SPObject* object = this->spobject; debug("id=%x, typename=%s", object, g_type_name_from_instance((GTypeInstance*)object)); @@ -681,7 +681,7 @@ void CObject::onRelease() { } } -void CObject::onRemoveChild(Inkscape::XML::Node* child) { +void CObject::remove_child(Inkscape::XML::Node* child) { SPObject* object = this->spobject; debug("id=%x, typename=%s", object, g_type_name_from_instance((GTypeInstance*)object)); @@ -692,7 +692,7 @@ void CObject::onRemoveChild(Inkscape::XML::Node* child) { } } -void CObject::onOrderChanged(Inkscape::XML::Node *child, Inkscape::XML::Node * old_ref, Inkscape::XML::Node *new_ref) { +void CObject::order_changed(Inkscape::XML::Node *child, Inkscape::XML::Node * old_ref, Inkscape::XML::Node *new_ref) { SPObject* object = this->spobject; SPObject *ochild = object->get_child_by_repr(child); @@ -702,7 +702,7 @@ void CObject::onOrderChanged(Inkscape::XML::Node *child, Inkscape::XML::Node * o ochild->_position_changed_signal.emit(ochild); } -void CObject::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CObject::build(SPDocument *document, Inkscape::XML::Node *repr) { SPObject* object = this->spobject; /* Nothing specific here */ @@ -780,7 +780,7 @@ void SPObject::invoke_build(SPDocument *document, Inkscape::XML::Node *repr, uns } /* Invoke derived methods, if any */ - this->cobject->onBuild(document, repr); + this->cobject->build(document, repr); /* Signalling (should be connected AFTER processing derived methods */ sp_repr_add_listener(repr, &object_event_vector, this); @@ -819,7 +819,7 @@ void SPObject::releaseReferences() { this->_release_signal.emit(this); - this->cobject->onRelease(); + this->cobject->release(); /* all hrefs should be released by the "release" handlers */ g_assert(this->hrefcount == 0); @@ -865,24 +865,24 @@ void SPObject::repr_child_added(Inkscape::XML::Node * /*repr*/, Inkscape::XML::N { SPObject *object = SP_OBJECT(data); - object->cobject->onChildAdded(child, ref); + object->cobject->child_added(child, ref); } void SPObject::repr_child_removed(Inkscape::XML::Node * /*repr*/, Inkscape::XML::Node *child, Inkscape::XML::Node * /*ref*/, gpointer data) { SPObject *object = SP_OBJECT(data); - object->cobject->onRemoveChild(child); + object->cobject->remove_child(child); } void SPObject::repr_order_changed(Inkscape::XML::Node * /*repr*/, Inkscape::XML::Node *child, Inkscape::XML::Node *old, Inkscape::XML::Node *newer, gpointer data) { SPObject *object = SP_OBJECT(data); - object->cobject->onOrderChanged(child, old, newer); + object->cobject->order_changed(child, old, newer); } -void CObject::onSet(unsigned int key, gchar const* value) { +void CObject::set(unsigned int key, gchar const* value) { g_assert(key != SP_ATTR_INVALID); SPObject* object = this->spobject; @@ -973,7 +973,7 @@ void SPObject::setKeyValue(unsigned int key, gchar const *value) //g_assert(object != NULL); //g_assert(SP_IS_OBJECT(object)); - this->cobject->onSet(key, value); + this->cobject->set(key, value); } void SPObject::readAttr(gchar const *key) @@ -1011,7 +1011,7 @@ void SPObject::repr_content_changed(Inkscape::XML::Node * /*repr*/, gchar const { SPObject *object = SP_OBJECT(data); - object->cobject->onReadContent(); + object->cobject->read_content(); } /** @@ -1029,7 +1029,7 @@ static gchar const *sp_xml_get_space_string(unsigned int space) } } -Inkscape::XML::Node* CObject::onWrite(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CObject::write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { SPObject* object = this->spobject; if (!repr && (flags & SP_OBJECT_WRITE_BUILD)) { @@ -1135,7 +1135,7 @@ Inkscape::XML::Node * SPObject::updateRepr(Inkscape::XML::Document *doc, Inkscap if (!(flags & SP_OBJECT_WRITE_BUILD) && !repr) { repr = getRepr(); } - return this->cobject->onWrite(doc, repr, flags); + return this->cobject->write(doc, repr, flags); } @@ -1202,7 +1202,7 @@ void SPObject::updateDisplay(SPCtx *ctx, unsigned int flags) try { - this->cobject->onUpdate(ctx, flags); + this->cobject->update(ctx, flags); } catch(...) { @@ -1260,7 +1260,7 @@ void SPObject::emitModified(unsigned int flags) g_object_ref(G_OBJECT(this)); - this->cobject->onModified(flags); + this->cobject->modified(flags); _modified_signal.emit(this, flags); g_object_unref(G_OBJECT(this)); diff --git a/src/sp-object.h b/src/sp-object.h index 1a0647c1a..b6162cc79 100644 --- a/src/sp-object.h +++ b/src/sp-object.h @@ -845,22 +845,22 @@ public: CObject(SPObject* object); virtual ~CObject(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); - virtual void onRemoveChild(Inkscape::XML::Node* child); + virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); + virtual void remove_child(Inkscape::XML::Node* child); - virtual void onOrderChanged(Inkscape::XML::Node* child, Inkscape::XML::Node* old_repr, Inkscape::XML::Node* new_repr); + virtual void order_changed(Inkscape::XML::Node* child, Inkscape::XML::Node* old_repr, Inkscape::XML::Node* new_repr); - virtual void onSet(unsigned int key, const gchar* value); + virtual void set(unsigned int key, const gchar* value); - virtual void onReadContent(); + virtual void read_content(); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); - virtual void onModified(unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); + virtual void modified(unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); protected: SPObject* spobject; diff --git a/src/sp-offset.cpp b/src/sp-offset.cpp index 5a15f9dbe..d6ad5e426 100644 --- a/src/sp-offset.cpp +++ b/src/sp-offset.cpp @@ -159,10 +159,10 @@ sp_offset_finalize(GObject *obj) offset->_transformed_connection.~connection(); } -void COffset::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void COffset::build(SPDocument *document, Inkscape::XML::Node *repr) { SPOffset* object = this->spoffset; - CShape::onBuild(document, repr); + CShape::build(document, repr); //XML Tree being used directly here while it shouldn't be. if (object->getRepr()->attribute("inkscape:radius")) { @@ -203,7 +203,7 @@ void COffset::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { } } -Inkscape::XML::Node* COffset::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* COffset::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPOffset* object = this->spoffset; SPOffset *offset = object; @@ -226,7 +226,7 @@ Inkscape::XML::Node* COffset::onWrite(Inkscape::XML::Document *xml_doc, Inkscape // Make sure the object has curve SPCurve *curve = SP_SHAPE (offset)->getCurve(); if (curve == NULL) { - this->onSetShape(); + this->set_shape(); } // write that curve to "d" @@ -234,12 +234,12 @@ Inkscape::XML::Node* COffset::onWrite(Inkscape::XML::Document *xml_doc, Inkscape repr->setAttribute("d", d); g_free (d); - CShape::onWrite(xml_doc, repr, flags | SP_SHAPE_WRITE_PATH); + CShape::write(xml_doc, repr, flags | SP_SHAPE_WRITE_PATH); return repr; } -void COffset::onRelease() { +void COffset::release() { SPOffset* object = this->spoffset; SPOffset *offset = (SPOffset *) object; @@ -255,10 +255,10 @@ void COffset::onRelease() { offset->sourceHref = NULL; offset->sourceRef->detach(); - CShape::onRelease(); + CShape::release(); } -void COffset::onSet(unsigned int key, const gchar* value) { +void COffset::set(unsigned int key, const gchar* value) { SPOffset* object = this->spoffset; SPOffset *offset = object; @@ -319,12 +319,12 @@ void COffset::onSet(unsigned int key, const gchar* value) { } break; default: - CShape::onSet(key, value); + CShape::set(key, value); break; } } -void COffset::onUpdate(SPCtx *ctx, guint flags) { +void COffset::update(SPCtx *ctx, guint flags) { SPOffset* object = this->spoffset; SPOffset* offset = object; @@ -337,10 +337,10 @@ void COffset::onUpdate(SPCtx *ctx, guint flags) { } offset->isUpdating=false; - CShape::onUpdate(ctx, flags); + CShape::update(ctx, flags); } -gchar* COffset::onDescription() { +gchar* COffset::description() { SPOffset* item = this->spoffset; SPOffset *offset = item; @@ -355,7 +355,7 @@ gchar* COffset::onDescription() { } } -void COffset::onSetShape() { +void COffset::set_shape() { SPOffset* shape = this->spoffset; SPOffset *offset = shape; @@ -637,8 +637,8 @@ void COffset::onSetShape() { } } -void COffset::onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { - CShape::onSnappoints(p, snapprefs); +void COffset::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { + CShape::snappoints(p, snapprefs); } @@ -867,7 +867,7 @@ sp_offset_top_point (SPOffset const * offset, Geom::Point *px) SPCurve *curve = SP_SHAPE (offset)->getCurve(); if (curve == NULL) { - offset->coffset->onSetShape(); + offset->coffset->set_shape(); curve = SP_SHAPE (offset)->getCurve(); if (curve == NULL) return; diff --git a/src/sp-offset.h b/src/sp-offset.h index cd04ab0a3..a18f2d889 100644 --- a/src/sp-offset.h +++ b/src/sp-offset.h @@ -91,16 +91,16 @@ public: COffset(SPOffset* offset); ~COffset(); - virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); - virtual void onSet(unsigned int key, gchar const* value); - virtual void onUpdate(SPCtx *ctx, guint flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - virtual void onRelease(); + virtual void build(SPDocument *document, Inkscape::XML::Node *repr); + virtual void set(unsigned int key, gchar const* value); + virtual void update(SPCtx *ctx, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual void release(); - virtual void onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); - virtual gchar* onDescription(); + virtual void snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); + virtual gchar* description(); - virtual void onSetShape(); + virtual void set_shape(); protected: SPOffset* spoffset; diff --git a/src/sp-paint-server.cpp b/src/sp-paint-server.cpp index 7b38c554d..75078f4ef 100644 --- a/src/sp-paint-server.cpp +++ b/src/sp-paint-server.cpp @@ -62,13 +62,13 @@ cairo_pattern_t *sp_paint_server_invoke_create_pattern(SPPaintServer *ps, cairo_pattern_t *cp = NULL; - cp = ps->cpaintserver->onCreatePattern(ct, bbox, opacity); + cp = ps->cpaintserver->pattern_new(ct, bbox, opacity); return cp; } // CPPIFY: make pure virtual -cairo_pattern_t* CPaintServer::onCreatePattern(cairo_t *ct, Geom::OptRect const &bbox, double opacity) { +cairo_pattern_t* CPaintServer::pattern_new(cairo_t *ct, Geom::OptRect const &bbox, double opacity) { //throw; // dummy_pattern diff --git a/src/sp-paint-server.h b/src/sp-paint-server.h index cd7b2656c..a44a0040f 100644 --- a/src/sp-paint-server.h +++ b/src/sp-paint-server.h @@ -52,7 +52,7 @@ public: CPaintServer(SPPaintServer* paintserver); virtual ~CPaintServer(); - virtual cairo_pattern_t* onCreatePattern(cairo_t *ct, Geom::OptRect const &bbox, double opacity); + virtual cairo_pattern_t* pattern_new(cairo_t *ct, Geom::OptRect const &bbox, double opacity); protected: SPPaintServer* sppaintserver; diff --git a/src/sp-path.cpp b/src/sp-path.cpp index b228781d0..cc469d027 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -73,7 +73,7 @@ gint SPPath::nodesInPath() const return _curve ? _curve->nodes_in_path() : 0; } -gchar* CPath::onDescription() { +gchar* CPath::description() { SPPath* item = this->sppath; int count = SP_PATH(item)->nodesInPath(); @@ -101,7 +101,7 @@ gchar* CPath::onDescription() { } } -void CPath::onConvertToGuides() { +void CPath::convert_to_guides() { SPPath* item = this->sppath; SPPath *path = item; @@ -159,7 +159,7 @@ sp_path_finalize(GObject *obj) path->connEndPair.~SPConnEndPair(); } -void CPath::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CPath::build(SPDocument *document, Inkscape::XML::Node *repr) { SPPath* object = this->sppath; /* Are these calls actually necessary? */ @@ -170,7 +170,7 @@ void CPath::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { sp_conn_end_pair_build(object); - CShape::onBuild(document, repr); + CShape::build(document, repr); object->readAttr( "inkscape:original-d" ); object->readAttr( "d" ); @@ -182,17 +182,17 @@ void CPath::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { } } -void CPath::onRelease() { +void CPath::release() { SPPath* object = this->sppath; SPPath *path = object; path->connEndPair.release(); - CShape::onRelease(); + CShape::release(); } -void CPath::onSet(unsigned int key, const gchar* value) { +void CPath::set(unsigned int key, const gchar* value) { SPPath* object = this->sppath; SPPath *path = (SPPath *) object; @@ -239,12 +239,12 @@ void CPath::onSet(unsigned int key, const gchar* value) { path->connEndPair.setAttr(key, value); break; default: - CShape::onSet(key, value); + CShape::set(key, value); break; } } -Inkscape::XML::Node* CPath::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CPath::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPPath* object = this->sppath; SPShape *shape = (SPShape *) object; @@ -275,26 +275,26 @@ g_message("sp_path_write writes 'd' attribute"); SP_PATH(shape)->connEndPair.writeRepr(repr); - CShape::onWrite(xml_doc, repr, flags); + CShape::write(xml_doc, repr, flags); return repr; } -void CPath::onUpdate(SPCtx *ctx, guint flags) { +void CPath::update(SPCtx *ctx, guint flags) { SPPath* object = this->sppath; if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) { flags &= ~SP_OBJECT_USER_MODIFIED_FLAG_B; // since we change the description, it's not a "just translation" anymore } - CShape::onUpdate(ctx, flags); + CShape::update(ctx, flags); SPPath *path = SP_PATH(object); path->connEndPair.update(); } -Geom::Affine CPath::onSetTransform(Geom::Affine const &transform) { +Geom::Affine CPath::set_transform(Geom::Affine const &transform) { SPPath* item = this->sppath; if (!SP_IS_PATH(item)) { @@ -337,7 +337,7 @@ Geom::Affine CPath::onSetTransform(Geom::Affine const &transform) { } -void CPath::onUpdatePatheffect(bool write) { +void CPath::update_patheffect(bool write) { SPPath* lpeitem = this->sppath; SPShape * const shape = (SPShape *) lpeitem; diff --git a/src/sp-path.h b/src/sp-path.h index 92757d39d..27d5b739d 100644 --- a/src/sp-path.h +++ b/src/sp-path.h @@ -59,18 +59,18 @@ public: CPath(SPPath* path); ~CPath(); - virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); - virtual void onRelease(); - virtual void onUpdate(SPCtx* ctx, guint flags); + virtual void build(SPDocument *document, Inkscape::XML::Node *repr); + virtual void release(); + virtual void update(SPCtx* ctx, guint flags); - virtual void onSet(unsigned int key, gchar const* value); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual void set(unsigned int key, gchar const* value); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - virtual gchar* onDescription(); - virtual Geom::Affine onSetTransform(Geom::Affine const &transform); - virtual void onConvertToGuides(); + virtual gchar* description(); + virtual Geom::Affine set_transform(Geom::Affine const &transform); + virtual void convert_to_guides(); - virtual void onUpdatePatheffect(bool write); + virtual void update_patheffect(bool write); protected: SPPath* sppath; diff --git a/src/sp-pattern.cpp b/src/sp-pattern.cpp index 16528e129..46e1978d3 100644 --- a/src/sp-pattern.cpp +++ b/src/sp-pattern.cpp @@ -88,10 +88,10 @@ sp_pattern_init (SPPattern *pat) new (&pat->modified_connection) sigc::connection(); } -void CPattern::onBuild(SPDocument* doc, Inkscape::XML::Node* repr) { +void CPattern::build(SPDocument* doc, Inkscape::XML::Node* repr) { SPPattern* object = this->sppattern; - CPaintServer::onBuild(doc, repr); + CPaintServer::build(doc, repr); object->readAttr( "patternUnits" ); object->readAttr( "patternContentUnits" ); @@ -107,7 +107,7 @@ void CPattern::onBuild(SPDocument* doc, Inkscape::XML::Node* repr) { doc->addResource("pattern", object); } -void CPattern::onRelease() { +void CPattern::release() { SPPattern* object = this->sppattern; SPPattern *pat = reinterpret_cast<SPPattern *>(object); @@ -126,10 +126,10 @@ void CPattern::onRelease() { pat->modified_connection.~connection(); - CPaintServer::onRelease(); + CPaintServer::release(); } -void CPattern::onSet(unsigned int key, const gchar* value) { +void CPattern::set(unsigned int key, const gchar* value) { SPPattern* object = this->sppattern; SPPattern *pat = SP_PATTERN (object); @@ -240,7 +240,7 @@ void CPattern::onSet(unsigned int key, const gchar* value) { } break; default: - CPaintServer::onSet(key, value); + CPaintServer::set(key, value); break; } } @@ -266,7 +266,7 @@ static GSList *pattern_getchildren(SPPattern *pat) return l; } -void CPattern::onUpdate(SPCtx* ctx, unsigned int flags) { +void CPattern::update(SPCtx* ctx, unsigned int flags) { SPPattern* object = this->sppattern; SPPattern *pat = SP_PATTERN (object); @@ -288,7 +288,7 @@ void CPattern::onUpdate(SPCtx* ctx, unsigned int flags) { } } -void CPattern::onModified(unsigned int flags) { +void CPattern::modified(unsigned int flags) { SPPattern* object = this->sppattern; SPPattern *pat = SP_PATTERN (object); @@ -561,7 +561,7 @@ static bool pattern_hasItemChildren (SPPattern const *pat) return hasChildren; } -cairo_pattern_t* CPattern::onCreatePattern(cairo_t *base_ct, Geom::OptRect const &bbox, double opacity) { +cairo_pattern_t* CPattern::pattern_new(cairo_t *base_ct, Geom::OptRect const &bbox, double opacity) { SPPattern* ps = this->sppattern; SPPattern *pat = SP_PATTERN (ps); diff --git a/src/sp-pattern.h b/src/sp-pattern.h index 6f341bd93..782b24940 100644 --- a/src/sp-pattern.h +++ b/src/sp-pattern.h @@ -92,12 +92,12 @@ public: CPattern(SPPattern* pattern); virtual ~CPattern(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); - virtual void onSet(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); - virtual void onModified(unsigned int flags); - virtual cairo_pattern_t* onCreatePattern(cairo_t *ct, Geom::OptRect const &bbox, double opacity); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); + virtual void set(unsigned int key, const gchar* value); + virtual void update(SPCtx* ctx, unsigned int flags); + virtual void modified(unsigned int flags); + virtual cairo_pattern_t* pattern_new(cairo_t *ct, Geom::OptRect const &bbox, double opacity); protected: SPPattern* sppattern; diff --git a/src/sp-polygon.cpp b/src/sp-polygon.cpp index 5a21956e7..b694c1755 100644 --- a/src/sp-polygon.cpp +++ b/src/sp-polygon.cpp @@ -49,10 +49,10 @@ static void sp_polygon_init(SPPolygon *polygon) polygon->cobject = polygon->cpolygon; } -void CPolygon::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CPolygon::build(SPDocument *document, Inkscape::XML::Node *repr) { SPPolygon* object = this->sppolygon; - CShape::onBuild(document, repr); + CShape::build(document, repr); object->readAttr( "points" ); } @@ -82,7 +82,7 @@ static gchar *sp_svg_write_polygon(Geom::PathVector const & pathv) return g_strdup(os.str().c_str()); } -Inkscape::XML::Node* CPolygon::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CPolygon::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPShape *shape = this->sppolygon; // Tolerable workaround: we need to update the object's curve before we set points= @@ -98,7 +98,7 @@ Inkscape::XML::Node* CPolygon::onWrite(Inkscape::XML::Document *xml_doc, Inkscap repr->setAttribute("points", str); g_free(str); - CShape::onWrite(xml_doc, repr, flags); + CShape::write(xml_doc, repr, flags); return repr; } @@ -124,7 +124,7 @@ static gboolean polygon_get_value(gchar const **p, gdouble *v) return true; } -void CPolygon::onSet(unsigned int key, const gchar* value) { +void CPolygon::set(unsigned int key, const gchar* value) { SPPolygon *polygon = this->sppolygon; switch (key) { @@ -181,12 +181,12 @@ void CPolygon::onSet(unsigned int key, const gchar* value) { break; } default: - CShape::onSet(key, value); + CShape::set(key, value); break; } } -gchar* CPolygon::onDescription() { +gchar* CPolygon::description() { return g_strdup(_("<b>Polygon</b>")); } diff --git a/src/sp-polygon.h b/src/sp-polygon.h index d11fd6da2..68ba35293 100644 --- a/src/sp-polygon.h +++ b/src/sp-polygon.h @@ -38,10 +38,10 @@ public: CPolygon(SPPolygon* polygon); virtual ~CPolygon(); - virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - virtual void onSet(unsigned int key, gchar const* value); - virtual gchar* onDescription(); + virtual void build(SPDocument *document, Inkscape::XML::Node *repr); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual void set(unsigned int key, gchar const* value); + virtual gchar* description(); protected: SPPolygon* sppolygon; diff --git a/src/sp-polyline.cpp b/src/sp-polyline.cpp index 048c54b06..e8144d2a5 100644 --- a/src/sp-polyline.cpp +++ b/src/sp-polyline.cpp @@ -46,15 +46,15 @@ void sp_polyline_init(SPPolyLine * polyline) polyline->cobject = polyline->cpolyline; } -void CPolyLine::onBuild(SPDocument * document, Inkscape::XML::Node * repr) { +void CPolyLine::build(SPDocument * document, Inkscape::XML::Node * repr) { SPPolyLine* object = this->sppolyline; - CShape::onBuild(document, repr); + CShape::build(document, repr); object->readAttr( "points" ); } -void CPolyLine::onSet(unsigned int key, const gchar* value) { +void CPolyLine::set(unsigned int key, const gchar* value) { SPPolyLine* object = this->sppolyline; SPPolyLine *polyline = object; @@ -105,12 +105,12 @@ void CPolyLine::onSet(unsigned int key, const gchar* value) { break; } default: - CShape::onSet(key, value); + CShape::set(key, value); break; } } -Inkscape::XML::Node* CPolyLine::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CPolyLine::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPPolyLine* object = this->sppolyline; if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) { @@ -121,12 +121,12 @@ Inkscape::XML::Node* CPolyLine::onWrite(Inkscape::XML::Document *xml_doc, Inksca repr->mergeFrom(object->getRepr(), "id"); } - CShape::onWrite(xml_doc, repr, flags); + CShape::write(xml_doc, repr, flags); return repr; } -gchar* CPolyLine::onDescription() { +gchar* CPolyLine::description() { return g_strdup(_("<b>Polyline</b>")); } diff --git a/src/sp-polyline.h b/src/sp-polyline.h index c6a0e10d6..306b1db1a 100644 --- a/src/sp-polyline.h +++ b/src/sp-polyline.h @@ -39,11 +39,11 @@ public: CPolyLine(SPPolyLine* polyline); virtual ~CPolyLine(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onSet(unsigned int key, gchar const* value); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void set(unsigned int key, gchar const* value); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - virtual gchar* onDescription(); + virtual gchar* description(); protected: SPPolyLine* sppolyline; diff --git a/src/sp-radial-gradient.h b/src/sp-radial-gradient.h index c2adc3f75..adfa442ed 100644 --- a/src/sp-radial-gradient.h +++ b/src/sp-radial-gradient.h @@ -35,10 +35,10 @@ public: CRadialGradient(SPRadialGradient* radialgradient); virtual ~CRadialGradient(); - virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); - virtual void onSet(unsigned key, gchar const *value); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - virtual cairo_pattern_t* onCreatePattern(cairo_t *ct, Geom::OptRect const &bbox, double opacity); + virtual void build(SPDocument *document, Inkscape::XML::Node *repr); + virtual void set(unsigned key, gchar const *value); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual cairo_pattern_t* pattern_new(cairo_t *ct, Geom::OptRect const &bbox, double opacity); protected: SPRadialGradient* spradialgradient; diff --git a/src/sp-rect.cpp b/src/sp-rect.cpp index 733a067cd..c0da69613 100644 --- a/src/sp-rect.cpp +++ b/src/sp-rect.cpp @@ -65,10 +65,10 @@ sp_rect_init(SPRect *rect) /* sp_svg_length_unset(&rect->ry, SP_SVG_UNIT_NONE, 0.0, 0.0); */ } -void CRect::onBuild(SPDocument* doc, Inkscape::XML::Node* repr) { +void CRect::build(SPDocument* doc, Inkscape::XML::Node* repr) { SPRect* object = this->sprect; - CShape::onBuild(doc, repr); + CShape::build(doc, repr); object->readAttr( "x" ); object->readAttr( "y" ); @@ -78,7 +78,7 @@ void CRect::onBuild(SPDocument* doc, Inkscape::XML::Node* repr) { object->readAttr( "ry" ); } -void CRect::onSet(unsigned key, gchar const *value) { +void CRect::set(unsigned key, gchar const *value) { SPRect* rect = this->sprect; SPRect* object = rect; @@ -118,12 +118,12 @@ void CRect::onSet(unsigned key, gchar const *value) { object->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); break; default: - CShape::onSet(key, value); + CShape::set(key, value); break; } } -void CRect::onUpdate(SPCtx* ctx, unsigned int flags) { +void CRect::update(SPCtx* ctx, unsigned int flags) { SPRect* object = this->sprect; if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) { @@ -144,10 +144,10 @@ void CRect::onUpdate(SPCtx* ctx, unsigned int flags) { flags &= ~SP_OBJECT_USER_MODIFIED_FLAG_B; // since we change the description, it's not a "just translation" anymore } - CShape::onUpdate(ctx, flags); + CShape::update(ctx, flags); } -Inkscape::XML::Node * CRect::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node * CRect::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPRect* rect = this->sprect; if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) { @@ -161,20 +161,20 @@ Inkscape::XML::Node * CRect::onWrite(Inkscape::XML::Document *xml_doc, Inkscape: sp_repr_set_svg_double(repr, "x", rect->x.computed); sp_repr_set_svg_double(repr, "y", rect->y.computed); - this->onSetShape(); // evaluate SPCurve - CShape::onWrite(xml_doc, repr, flags); + this->set_shape(); // evaluate SPCurve + CShape::write(xml_doc, repr, flags); return repr; } -gchar* CRect::onDescription() { +gchar* CRect::description() { g_return_val_if_fail(SP_IS_RECT(this->sprect), NULL); return g_strdup(_("<b>Rectangle</b>")); } #define C1 0.554 -void CRect::onSetShape() { +void CRect::set_shape() { SPRect *rect = this->sprect; if ((rect->height.computed < 1e-18) || (rect->width.computed < 1e-18)) { @@ -277,7 +277,7 @@ sp_rect_set_ry(SPRect *rect, gboolean set, gdouble value) SP_OBJECT(rect)->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); } -Geom::Affine CRect::onSetTransform(Geom::Affine const& xform) { +Geom::Affine CRect::set_transform(Geom::Affine const& xform) { SPRect *rect = this->sprect; SPRect* item = rect; @@ -319,7 +319,7 @@ Geom::Affine CRect::onSetTransform(Geom::Affine const& xform) { rect->x = pos[Geom::X]; rect->y = pos[Geom::Y]; - this->onSetShape(); + this->set_shape(); // Adjust stroke width item->adjust_stroke(sqrt(fabs(sw * sh))); @@ -491,7 +491,7 @@ sp_rect_get_visible_height(SPRect *rect) rect->transform); } -void CRect::onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { +void CRect::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { SPRect *rect = this->sprect; SPRect* item = rect; @@ -531,7 +531,7 @@ void CRect::onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape: } } -void CRect::onConvertToGuides() { +void CRect::convert_to_guides() { SPRect* rect = this->sprect; SPRect* item = rect; diff --git a/src/sp-rect.h b/src/sp-rect.h index 078d63a17..325413c23 100644 --- a/src/sp-rect.h +++ b/src/sp-rect.h @@ -50,19 +50,19 @@ public: CRect(SPRect* sprect); virtual ~CRect(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); - void onSet(unsigned key, gchar const *value); - void onUpdate(SPCtx* ctx, unsigned int flags); + void set(unsigned key, gchar const *value); + void update(SPCtx* ctx, unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - virtual gchar* onDescription(); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual gchar* description(); - void onSetShape(); - virtual Geom::Affine onSetTransform(Geom::Affine const& xform); + void set_shape(); + virtual Geom::Affine set_transform(Geom::Affine const& xform); - void onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); - void onConvertToGuides(); + void snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); + void convert_to_guides(); protected: SPRect* sprect; diff --git a/src/sp-root.cpp b/src/sp-root.cpp index 9a38cd05d..715d4659e 100644 --- a/src/sp-root.cpp +++ b/src/sp-root.cpp @@ -81,7 +81,7 @@ static void sp_root_init(SPRoot *root) root->defs = NULL; } -void CRoot::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CRoot::build(SPDocument *document, Inkscape::XML::Node *repr) { SPRoot* object = this->sproot; SPGroup *group = (SPGroup *) object; @@ -103,7 +103,7 @@ void CRoot::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { object->readAttr( "preserveAspectRatio" ); object->readAttr( "onload" ); - CGroup::onBuild(document, repr); + CGroup::build(document, repr); // Search for first <defs> node for (SPObject *o = group->firstChild() ; o ; o = o->getNext() ) { @@ -117,17 +117,17 @@ void CRoot::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { SP_ITEM(object)->transform = Geom::identity(); } -void CRoot::onRelease() { +void CRoot::release() { SPRoot* object = this->sproot; SPRoot *root = (SPRoot *) object; root->defs = NULL; - CGroup::onRelease(); + CGroup::release(); } -void CRoot::onSet(unsigned int key, const gchar* value) { +void CRoot::set(unsigned int key, const gchar* value) { SPRoot* object = this->sproot; SPRoot *root = object; @@ -264,18 +264,18 @@ void CRoot::onSet(unsigned int key, const gchar* value) { break; default: /* Pass the set event to the parent */ - CGroup::onSet(key, value); + CGroup::set(key, value); break; } } -void CRoot::onChildAdded(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { +void CRoot::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { SPRoot* object = this->sproot; SPRoot *root = (SPRoot *) object; SPGroup *group = (SPGroup *) object; - CGroup::onChildAdded(child, ref); + CGroup::child_added(child, ref); SPObject *co = object->document->getObjectByRepr(child); g_assert (co != NULL || !strcmp("comment", child->name())); // comment repr node has no object @@ -291,7 +291,7 @@ void CRoot::onChildAdded(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { } } -void CRoot::onRemoveChild(Inkscape::XML::Node* child) { +void CRoot::remove_child(Inkscape::XML::Node* child) { SPRoot* object = this->sproot; SPRoot *root = (SPRoot *) object; @@ -311,10 +311,10 @@ void CRoot::onRemoveChild(Inkscape::XML::Node* child) { } } - CGroup::onRemoveChild(child); + CGroup::remove_child(child); } -void CRoot::onUpdate(SPCtx *ctx, guint flags) { +void CRoot::update(SPCtx *ctx, guint flags) { SPRoot* object = this->sproot; SPRoot *root = SP_ROOT(object); @@ -444,7 +444,7 @@ void CRoot::onUpdate(SPCtx *ctx, guint flags) { rctx.i2vp = Geom::identity(); /* And invoke parent method */ - CGroup::onUpdate((SPCtx *) &rctx, flags); + CGroup::update((SPCtx *) &rctx, flags); /* As last step set additional transform of drawing group */ for (SPItemView *v = root->display; v != NULL; v = v->next) { @@ -453,12 +453,12 @@ void CRoot::onUpdate(SPCtx *ctx, guint flags) { } } -void CRoot::onModified(unsigned int flags) { +void CRoot::modified(unsigned int flags) { SPRoot* object = this->sproot; SPRoot *root = SP_ROOT(object); - CGroup::onModified(flags); + CGroup::modified(flags); /* fixme: (Lauris) */ if (!object->parent && (flags & SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) { @@ -467,7 +467,7 @@ void CRoot::onModified(unsigned int flags) { } -Inkscape::XML::Node* CRoot::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CRoot::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPRoot* object = this->sproot; SPRoot *root = SP_ROOT(object); @@ -504,19 +504,19 @@ Inkscape::XML::Node* CRoot::onWrite(Inkscape::XML::Document *xml_doc, Inkscape:: repr->setAttribute("viewBox", os.str().c_str()); } - CGroup::onWrite(xml_doc, repr, flags); + CGroup::write(xml_doc, repr, flags); return repr; } -Inkscape::DrawingItem* CRoot::onShow(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) { +Inkscape::DrawingItem* CRoot::show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) { SPRoot* item = this->sproot; SPRoot *root = SP_ROOT(item); Inkscape::DrawingItem *ai = 0; - ai = CGroup::onShow(drawing, key, flags); + ai = CGroup::show(drawing, key, flags); if (ai) { Inkscape::DrawingGroup *g = dynamic_cast<Inkscape::DrawingGroup *>(ai); @@ -526,14 +526,14 @@ Inkscape::DrawingItem* CRoot::onShow(Inkscape::Drawing &drawing, unsigned int ke return ai; } -void CRoot::onPrint(SPPrintContext* ctx) { +void CRoot::print(SPPrintContext* ctx) { SPRoot* item = this->sproot; SPRoot *root = SP_ROOT(item); sp_print_bind(ctx, root->c2p, 1.0); - CGroup::onPrint(ctx); + CGroup::print(ctx); sp_print_release(ctx); } diff --git a/src/sp-root.h b/src/sp-root.h index f489cc83e..9e5002b35 100644 --- a/src/sp-root.h +++ b/src/sp-root.h @@ -76,18 +76,18 @@ public: CRoot(SPRoot* root); virtual ~CRoot(); - virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); - virtual void onRelease(); - virtual void onSet(unsigned int key, gchar const* value); - virtual void onUpdate(SPCtx *ctx, guint flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - - virtual void onModified(unsigned int flags); - virtual void onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); - virtual void onRemoveChild(Inkscape::XML::Node* child); - - virtual Inkscape::DrawingItem* onShow(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags); - virtual void onPrint(SPPrintContext *ctx); + virtual void build(SPDocument *document, Inkscape::XML::Node *repr); + virtual void release(); + virtual void set(unsigned int key, gchar const* value); + virtual void update(SPCtx *ctx, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + + virtual void modified(unsigned int flags); + virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); + virtual void remove_child(Inkscape::XML::Node* child); + + virtual Inkscape::DrawingItem* show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags); + virtual void print(SPPrintContext *ctx); protected: SPRoot* sproot; diff --git a/src/sp-script.cpp b/src/sp-script.cpp index f9c2e6493..8190fe81c 100644 --- a/src/sp-script.cpp +++ b/src/sp-script.cpp @@ -37,10 +37,10 @@ static void sp_script_init(SPScript *script) script->cobject = script->cscript; } -void CScript::onBuild(SPDocument* doc, Inkscape::XML::Node* repr) { +void CScript::build(SPDocument* doc, Inkscape::XML::Node* repr) { SPScript* object = this->spscript; - CObject::onBuild(doc, repr); + CObject::build(doc, repr); //Read values of key attributes from XML nodes into object. object->readAttr( "xlink:href" ); @@ -54,7 +54,7 @@ void CScript::onBuild(SPDocument* doc, Inkscape::XML::Node* repr) { * sp-object-repr.cpp's repr_name_entries array. */ -void CScript::onRelease() { +void CScript::release() { SPScript* object = this->spscript; if (object->document) { @@ -62,18 +62,18 @@ void CScript::onRelease() { object->document->removeResource("script", object); } - CObject::onRelease(); + CObject::release(); } -void CScript::onUpdate(SPCtx* ctx, unsigned int flags) { +void CScript::update(SPCtx* ctx, unsigned int flags) { } -void CScript::onModified(unsigned int flags) { +void CScript::modified(unsigned int flags) { } -void CScript::onSet(unsigned int key, const gchar* value) { +void CScript::set(unsigned int key, const gchar* value) { SPScript* object = this->spscript; SPScript *scr = SP_SCRIPT(object); @@ -85,12 +85,12 @@ void CScript::onSet(unsigned int key, const gchar* value) { object->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); break; default: - CObject::onSet(key, value); + CObject::set(key, value); break; } } -Inkscape::XML::Node* CScript::onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags) { +Inkscape::XML::Node* CScript::write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags) { return repr; } diff --git a/src/sp-script.h b/src/sp-script.h index 6365591ca..a8ec05db7 100644 --- a/src/sp-script.h +++ b/src/sp-script.h @@ -41,12 +41,12 @@ public: CScript(SPScript* script); virtual ~CScript(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); - virtual void onSet(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); - virtual void onModified(unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); + virtual void set(unsigned int key, const gchar* value); + virtual void update(SPCtx* ctx, unsigned int flags); + virtual void modified(unsigned int flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); protected: SPScript* spscript; diff --git a/src/sp-shape.cpp b/src/sp-shape.cpp index 69a656266..afaeb91a8 100644 --- a/src/sp-shape.cpp +++ b/src/sp-shape.cpp @@ -115,10 +115,10 @@ sp_shape_finalize(GObject *object) } } -void CShape::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CShape::build(SPDocument *document, Inkscape::XML::Node *repr) { SPShape* object = this->spshape; - CLPEItem::onBuild(document, repr); + CLPEItem::build(document, repr); for (int i = 0 ; i < SP_MARKER_LOC_QTY ; i++) { sp_shape_set_marker (object, i, object->style->marker[i].value); @@ -136,7 +136,7 @@ void CShape::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { * * \see SPObject::release() */ -void CShape::onRelease() { +void CShape::release() { SPItem *item; SPShape *shape; SPItemView *v; @@ -163,24 +163,24 @@ void CShape::onRelease() { shape->_curve_before_lpe = shape->_curve_before_lpe->unref(); } - CLPEItem::onRelease(); + CLPEItem::release(); } -void CShape::onSet(unsigned int key, const gchar* value) { - CLPEItem::onSet(key, value); +void CShape::set(unsigned int key, const gchar* value) { + CLPEItem::set(key, value); } -Inkscape::XML::Node* CShape::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { - CLPEItem::onWrite(xml_doc, repr, flags); +Inkscape::XML::Node* CShape::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { + CLPEItem::write(xml_doc, repr, flags); return repr; } -void CShape::onUpdate(SPCtx* ctx, guint flags) { +void CShape::update(SPCtx* ctx, guint flags) { SPShape* shape = this->spshape; SPShape* object = shape; - CLPEItem::onUpdate(ctx, flags); + CLPEItem::update(ctx, flags); /* This stanza checks that an object's marker style agrees with * the marker objects it has allocated. sp_shape_set_marker ensures @@ -431,10 +431,10 @@ sp_shape_update_marker_view(SPShape *shape, Inkscape::DrawingItem *ai) } } -void CShape::onModified(unsigned int flags) { +void CShape::modified(unsigned int flags) { SPShape* shape = this->spshape; - CLPEItem::onModified(flags); + CLPEItem::modified(flags); if (flags & SP_OBJECT_STYLE_MODIFIED_FLAG) { for (SPItemView *v = shape->display; v != NULL; v = v->next) { @@ -444,7 +444,7 @@ void CShape::onModified(unsigned int flags) { } } -Geom::OptRect CShape::onBbox(Geom::Affine const &transform, SPItem::BBoxType bboxtype) { +Geom::OptRect CShape::bbox(Geom::Affine const &transform, SPItem::BBoxType bboxtype) { SPShape const* shape = this->spshape; SPShape const* item = shape; Geom::OptRect bbox; @@ -617,7 +617,7 @@ sp_shape_print_invoke_marker_printing(SPObject *obj, Geom::Affine tr, SPStyle co } } -void CShape::onPrint(SPPrintContext* ctx) { +void CShape::print(SPPrintContext* ctx) { SPShape *shape = this->spshape; SPShape* item = shape; @@ -724,7 +724,7 @@ void CShape::onPrint(SPPrintContext* ctx) { } } -Inkscape::DrawingItem* CShape::onShow(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) { +Inkscape::DrawingItem* CShape::show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) { SPObject *object = this->spshape; SPShape *shape = this->spshape; @@ -766,7 +766,7 @@ Inkscape::DrawingItem* CShape::onShow(Inkscape::Drawing &drawing, unsigned int k /** * Sets style, path, and paintbox. Updates marker views, including dimensions. */ -void CShape::onHide(unsigned int key) { +void CShape::hide(unsigned int key) { SPShape *shape = this->spshape; SPShape* item = shape; @@ -942,7 +942,7 @@ sp_shape_set_marker (SPObject *object, unsigned int key, const gchar *value) } // CPPIFY: make pure virtual -void CShape::onSetShape() { +void CShape::set_shape() { throw; } @@ -953,7 +953,7 @@ void CShape::onSetShape() { */ void SPShape::setShape() { - this->cshape->onSetShape(); + this->cshape->set_shape(); } /** @@ -1036,7 +1036,7 @@ void SPShape::setCurveInsync(SPCurve *new_curve, unsigned int owner) } } -void CShape::onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { +void CShape::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { SPShape const *shape = this->spshape; SPShape const *item = shape; diff --git a/src/sp-shape.h b/src/sp-shape.h index 20fe70626..85ac89a00 100644 --- a/src/sp-shape.h +++ b/src/sp-shape.h @@ -77,23 +77,23 @@ public: CShape(SPShape* shape); virtual ~CShape(); - virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); - virtual void onRelease(); - virtual void onUpdate(SPCtx* ctx, guint flags); - virtual void onModified(unsigned int flags); + virtual void build(SPDocument *document, Inkscape::XML::Node *repr); + virtual void release(); + virtual void update(SPCtx* ctx, guint flags); + virtual void modified(unsigned int flags); - virtual void onSet(unsigned int key, gchar const* value); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual void set(unsigned int key, gchar const* value); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - virtual Geom::OptRect onBbox(Geom::Affine const &transform, SPItem::BBoxType bboxtype); - virtual void onPrint(SPPrintContext* ctx); + virtual Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType bboxtype); + virtual void print(SPPrintContext* ctx); - virtual Inkscape::DrawingItem* onShow(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags); - virtual void onHide(unsigned int key); + virtual Inkscape::DrawingItem* show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags); + virtual void hide(unsigned int key); - virtual void onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); + virtual void snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); - virtual void onSetShape(); + virtual void set_shape(); protected: SPShape* spshape; diff --git a/src/sp-spiral.cpp b/src/sp-spiral.cpp index 8843604b9..083342640 100644 --- a/src/sp-spiral.cpp +++ b/src/sp-spiral.cpp @@ -69,10 +69,10 @@ sp_spiral_init (SPSpiral * spiral) spiral->t0 = 0.0; } -void CSpiral::onBuild(SPDocument * document, Inkscape::XML::Node * repr) { +void CSpiral::build(SPDocument * document, Inkscape::XML::Node * repr) { SPSpiral* object = this->spspiral; - CShape::onBuild(document, repr); + CShape::build(document, repr); object->readAttr( "sodipodi:cx" ); object->readAttr( "sodipodi:cy" ); @@ -83,7 +83,7 @@ void CSpiral::onBuild(SPDocument * document, Inkscape::XML::Node * repr) { object->readAttr( "sodipodi:t0" ); } -Inkscape::XML::Node* CSpiral::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CSpiral::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPSpiral *spiral = this->spspiral; if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) { @@ -105,7 +105,7 @@ Inkscape::XML::Node* CSpiral::onWrite(Inkscape::XML::Document *xml_doc, Inkscape } // make sure the curve is rebuilt with all up-to-date parameters - this->onSetShape(); + this->set_shape(); //Nulls might be possible if this called iteratively if ( !spiral->_curve ) { @@ -116,12 +116,12 @@ Inkscape::XML::Node* CSpiral::onWrite(Inkscape::XML::Document *xml_doc, Inkscape repr->setAttribute("d", d); g_free (d); - CShape::onWrite(xml_doc, repr, flags | SP_SHAPE_WRITE_PATH); + CShape::write(xml_doc, repr, flags | SP_SHAPE_WRITE_PATH); return repr; } -void CSpiral::onSet(unsigned int key, gchar const* value) { +void CSpiral::set(unsigned int key, gchar const* value) { SPSpiral *spiral = this->spspiral; SPSpiral* object = spiral; @@ -203,26 +203,26 @@ void CSpiral::onSet(unsigned int key, gchar const* value) { object->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); break; default: - CShape::onSet(key, value); + CShape::set(key, value); break; } } -void CSpiral::onUpdate(SPCtx *ctx, guint flags) { +void CSpiral::update(SPCtx *ctx, guint flags) { SPSpiral* object = this->spspiral; if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) { reinterpret_cast<SPShape *>(object)->setShape(); } - CShape::onUpdate(ctx, flags); + CShape::update(ctx, flags); } -void CSpiral::onUpdatePatheffect(bool write) { +void CSpiral::update_patheffect(bool write) { SPSpiral* shape = this->spspiral; - this->onSetShape(); + this->set_shape(); if (write) { Inkscape::XML::Node *repr = shape->getRepr(); @@ -238,7 +238,7 @@ void CSpiral::onUpdatePatheffect(bool write) { shape->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); } -gchar* CSpiral::onDescription() { +gchar* CSpiral::description() { SPSpiral* item = this->spspiral; // TRANSLATORS: since turn count isn't an integer, please adjust the @@ -336,7 +336,7 @@ sp_spiral_fit_and_draw (SPSpiral const *spiral, g_assert (is_unit_vector (hat2)); } -void CSpiral::onSetShape() { +void CSpiral::set_shape() { SPSpiral *spiral = this->spspiral; SPSpiral* shape = spiral; @@ -434,7 +434,7 @@ sp_spiral_position_set (SPSpiral *spiral, (static_cast<SPObject *>(spiral))->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); } -void CSpiral::onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { +void CSpiral::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { SPSpiral* item = this->spspiral; // We will determine the spiral's midpoint ourselves, instead of trusting on the base class @@ -442,7 +442,7 @@ void CSpiral::onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscap Inkscape::SnapPreferences local_snapprefs = *snapprefs; local_snapprefs.setTargetSnappable(Inkscape::SNAPTARGET_OBJECT_MIDPOINT, false); - CShape::onSnappoints(p, &local_snapprefs); + CShape::snappoints(p, &local_snapprefs); if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_OBJECT_MIDPOINT)) { Geom::Affine const i2dt (item->i2dt_affine ()); diff --git a/src/sp-spiral.h b/src/sp-spiral.h index 15a905935..0d8ac53aa 100644 --- a/src/sp-spiral.h +++ b/src/sp-spiral.h @@ -65,16 +65,16 @@ public: CSpiral(SPSpiral* spiral); virtual ~CSpiral(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - virtual void onUpdate(SPCtx *ctx, guint flags); - virtual void onSet(unsigned int key, gchar const* value); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual void update(SPCtx *ctx, guint flags); + virtual void set(unsigned int key, gchar const* value); - virtual void onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); - virtual gchar* onDescription(); + virtual void snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); + virtual gchar* description(); - virtual void onSetShape(); - virtual void onUpdatePatheffect(bool write); + virtual void set_shape(); + virtual void update_patheffect(bool write); protected: SPSpiral* spspiral; diff --git a/src/sp-star.cpp b/src/sp-star.cpp index 03c3e9046..7d22484cf 100644 --- a/src/sp-star.cpp +++ b/src/sp-star.cpp @@ -67,11 +67,11 @@ sp_star_init (SPStar * star) star->randomized = 0.0; } -void CStar::onBuild(SPDocument * document, Inkscape::XML::Node * repr) { +void CStar::build(SPDocument * document, Inkscape::XML::Node * repr) { SPStar* object = this->spstar; // CPPIFY: see header file - CShape::onBuild(document, repr); + CShape::build(document, repr); object->readAttr( "sodipodi:cx" ); object->readAttr( "sodipodi:cy" ); @@ -85,7 +85,7 @@ void CStar::onBuild(SPDocument * document, Inkscape::XML::Node * repr) { object->readAttr( "inkscape:randomized" ); } -Inkscape::XML::Node* CStar::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CStar::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPStar* object = this->spstar; SPStar *star = object; @@ -107,18 +107,18 @@ Inkscape::XML::Node* CStar::onWrite(Inkscape::XML::Document *xml_doc, Inkscape:: sp_repr_set_svg_double(repr, "inkscape:randomized", star->randomized); } - this->onSetShape(); + this->set_shape(); char *d = sp_svg_write_path (star->_curve->get_pathvector()); repr->setAttribute("d", d); g_free (d); // CPPIFY: see header file - CShape::onWrite(xml_doc, repr, flags); + CShape::write(xml_doc, repr, flags); return repr; } -void CStar::onSet(unsigned int key, const gchar* value) { +void CStar::set(unsigned int key, const gchar* value) { SPStar* object = this->spstar; SPStar *star = object; @@ -212,12 +212,12 @@ void CStar::onSet(unsigned int key, const gchar* value) { break; default: // CPPIFY: see header file - CShape::onSet(key, value); + CShape::set(key, value); break; } } -void CStar::onUpdate(SPCtx *ctx, guint flags) { +void CStar::update(SPCtx *ctx, guint flags) { SPStar* object = this->spstar; if (flags & (SP_OBJECT_MODIFIED_FLAG | @@ -227,14 +227,14 @@ void CStar::onUpdate(SPCtx *ctx, guint flags) { } // CPPIFY: see header file - CShape::onUpdate(ctx, flags); + CShape::update(ctx, flags); } -void CStar::onUpdatePatheffect(bool write) { +void CStar::update_patheffect(bool write) { SPStar* lpeitem = this->spstar; SPShape *shape = (SPShape *) lpeitem; - this->onSetShape(); + this->set_shape(); if (write) { Inkscape::XML::Node *repr = shape->getRepr(); @@ -250,7 +250,7 @@ void CStar::onUpdatePatheffect(bool write) { ((SPObject *)shape)->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); } -gchar* CStar::onDescription() { +gchar* CStar::description() { SPStar *star = this->spstar; // while there will never be less than 3 vertices, we still need to @@ -375,7 +375,7 @@ sp_star_get_curvepoint (SPStar *star, SPStarPoint point, gint index, bool previ) #define NEXT false #define PREV true -void CStar::onSetShape() { +void CStar::set_shape() { SPStar* shape = this->spstar; SPStar *star = shape; @@ -494,7 +494,7 @@ sp_star_position_set (SPStar *star, gint sides, Geom::Point center, gdouble r1, star->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); } -void CStar::onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { +void CStar::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { SPStar* item = this->spstar; // We will determine the star's midpoint ourselves, instead of trusting on the base class @@ -503,7 +503,7 @@ void CStar::onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape: local_snapprefs.setTargetSnappable(Inkscape::SNAPTARGET_OBJECT_MIDPOINT, false); // CPPIFY: see header file - CShape::onSnappoints(p, &local_snapprefs); + CShape::snappoints(p, &local_snapprefs); if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_OBJECT_MIDPOINT)) { Geom::Affine const i2dt (item->i2dt_affine ()); diff --git a/src/sp-star.h b/src/sp-star.h index 91a556224..60de2a6aa 100644 --- a/src/sp-star.h +++ b/src/sp-star.h @@ -56,16 +56,16 @@ public: CStar(SPStar* star); virtual ~CStar(); - virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - virtual void onSet(unsigned int key, gchar const* value); - virtual void onUpdate(SPCtx* ctx, guint flags); + virtual void build(SPDocument *document, Inkscape::XML::Node *repr); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual void set(unsigned int key, gchar const* value); + virtual void update(SPCtx* ctx, guint flags); - virtual gchar* onDescription(); - virtual void onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); + virtual gchar* description(); + virtual void snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); - virtual void onUpdatePatheffect(bool write); - virtual void onSetShape(); + virtual void update_patheffect(bool write); + virtual void set_shape(); protected: SPStar* spstar; diff --git a/src/sp-stop.h b/src/sp-stop.h index d731a9f66..e3b5e3163 100644 --- a/src/sp-stop.h +++ b/src/sp-stop.h @@ -70,9 +70,9 @@ public: CStop(SPStop* stop); virtual ~CStop(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onSet(unsigned int key, const gchar* value); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void set(unsigned int key, const gchar* value); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); protected: SPStop* spstop; diff --git a/src/sp-string.cpp b/src/sp-string.cpp index b66c1e9d1..81dc9576f 100644 --- a/src/sp-string.cpp +++ b/src/sp-string.cpp @@ -62,24 +62,24 @@ sp_string_init(SPString *string) new (&string->string) Glib::ustring(); } -void CString::onBuild(SPDocument *doc, Inkscape::XML::Node *repr) { +void CString::build(SPDocument *doc, Inkscape::XML::Node *repr) { SPString* object = this->spstring; - object->cstring->onReadContent(); + object->cstring->read_content(); - CObject::onBuild(doc, repr); + CObject::build(doc, repr); } -void CString::onRelease() { +void CString::release() { SPString* object = this->spstring; SPString *string = SP_STRING(object); string->string.~ustring(); - CObject::onRelease(); + CObject::release(); } -void CString::onReadContent() { +void CString::read_content() { SPString* object = this->spstring; SPString *string = SP_STRING(object); @@ -122,7 +122,7 @@ void CString::onReadContent() { object->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); } -void CString::onUpdate(SPCtx *ctx, unsigned flags) { +void CString::update(SPCtx *ctx, unsigned flags) { // CObject::onUpdate(ctx, flags); if (flags & (SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_MODIFIED_FLAG)) { diff --git a/src/sp-string.h b/src/sp-string.h index 428e2c557..790964214 100644 --- a/src/sp-string.h +++ b/src/sp-string.h @@ -35,12 +35,12 @@ public: CString(SPString* str); virtual ~CString(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); - virtual void onReadContent(); + virtual void read_content(); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); + virtual void update(SPCtx* ctx, unsigned int flags); protected: SPString* spstring; diff --git a/src/sp-style-elem.cpp b/src/sp-style-elem.cpp index 682750aec..65beaba07 100644 --- a/src/sp-style-elem.cpp +++ b/src/sp-style-elem.cpp @@ -33,7 +33,7 @@ sp_style_elem_init(SPStyleElem *style_elem) style_elem->is_css = false; } -void CStyleElem::onSet(unsigned int key, const gchar* value) { +void CStyleElem::set(unsigned int key, const gchar* value) { SPStyleElem* object = this->spstyleelem; g_return_if_fail(object); @@ -64,7 +64,7 @@ void CStyleElem::onSet(unsigned int key, const gchar* value) { /* title is ignored. */ default: { - CObject::onSet(key, value); + CObject::set(key, value); break; } } @@ -75,14 +75,14 @@ static void child_add_rm_cb(Inkscape::XML::Node *, Inkscape::XML::Node *, Inkscape::XML::Node *, void *const data) { - static_cast<SPObject *>(data)->cobject->onReadContent(); + static_cast<SPObject *>(data)->cobject->read_content(); } static void content_changed_cb(Inkscape::XML::Node *, gchar const *, gchar const *, void *const data) { - static_cast<SPObject *>(data)->cobject->onReadContent(); + static_cast<SPObject *>(data)->cobject->read_content(); } static void @@ -90,10 +90,10 @@ child_order_changed_cb(Inkscape::XML::Node *, Inkscape::XML::Node *, Inkscape::XML::Node *, Inkscape::XML::Node *, void *const data) { - static_cast<SPObject *>(data)->cobject->onReadContent(); + static_cast<SPObject *>(data)->cobject->read_content(); } -Inkscape::XML::Node* CStyleElem::onWrite(Inkscape::XML::Document* xml_doc, Inkscape::XML::Node* repr, guint flags) { +Inkscape::XML::Node* CStyleElem::write(Inkscape::XML::Document* xml_doc, Inkscape::XML::Node* repr, guint flags) { SPStyleElem* object = this->spstyleelem; if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) { @@ -112,7 +112,7 @@ Inkscape::XML::Node* CStyleElem::onWrite(Inkscape::XML::Document* xml_doc, Inksc } /* todo: media */ - CObject::onWrite(xml_doc, repr, flags); + CObject::write(xml_doc, repr, flags); return repr; } @@ -270,7 +270,7 @@ property_cb(CRDocHandler *const a_handler, g_return_if_fail(append_status == CR_OK); } -void CStyleElem::onReadContent() { +void CStyleElem::read_content() { SPStyleElem* object = this->spstyleelem; SPStyleElem &style_elem = *SP_STYLE_ELEM(object); @@ -358,10 +358,10 @@ rec_add_listener(Inkscape::XML::Node &repr, } } -void CStyleElem::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CStyleElem::build(SPDocument *document, Inkscape::XML::Node *repr) { SPStyleElem* object = this->spstyleelem; - object->cstyleelem->onReadContent(); + object->cstyleelem->read_content(); object->readAttr( "type" ); object->readAttr( "media" ); @@ -375,7 +375,7 @@ void CStyleElem::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { }; rec_add_listener(*repr, &nodeEventVector, object); - CObject::onBuild(document, repr); + CObject::build(document, repr); } diff --git a/src/sp-style-elem.h b/src/sp-style-elem.h index c53b42c08..6e3fc3cce 100644 --- a/src/sp-style-elem.h +++ b/src/sp-style-elem.h @@ -29,10 +29,10 @@ public: CStyleElem(SPStyleElem* se); virtual ~CStyleElem(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onSet(unsigned int key, gchar const* value); - virtual void onReadContent(); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void set(unsigned int key, gchar const* value); + virtual void read_content(); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); protected: SPStyleElem* spstyleelem; diff --git a/src/sp-switch.cpp b/src/sp-switch.cpp index f4c5d8a49..f6c267f79 100644 --- a/src/sp-switch.cpp +++ b/src/sp-switch.cpp @@ -77,7 +77,7 @@ GSList *SPSwitch::_childList(bool add_ref, SPObject::Action action) { return g_slist_prepend (NULL, child); } -gchar *CSwitch::onDescription() { +gchar *CSwitch::description() { gint len = this->spgroup->getItemCount(); return g_strdup_printf( ngettext("<b>Conditional group</b> of <b>%d</b> object", @@ -85,15 +85,15 @@ gchar *CSwitch::onDescription() { len), len); } -void CSwitch::onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref) { +void CSwitch::child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref) { this->spswitch->_reevaluate(true); } -void CSwitch::onRemoveChild(Inkscape::XML::Node *) { +void CSwitch::remove_child(Inkscape::XML::Node *) { this->spswitch->_reevaluate(); } -void CSwitch::onOrderChanged (Inkscape::XML::Node *, Inkscape::XML::Node *, Inkscape::XML::Node *) +void CSwitch::order_changed (Inkscape::XML::Node *, Inkscape::XML::Node *, Inkscape::XML::Node *) { this->spswitch->_reevaluate(); } diff --git a/src/sp-switch.h b/src/sp-switch.h index 39c00e251..aae8a8a14 100644 --- a/src/sp-switch.h +++ b/src/sp-switch.h @@ -62,10 +62,10 @@ public: friend class SPSwitch; - virtual void onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); - virtual void onRemoveChild(Inkscape::XML::Node *child); - virtual void onOrderChanged(Inkscape::XML::Node *child, Inkscape::XML::Node *old_ref, Inkscape::XML::Node *new_ref); - virtual gchar *onDescription(); + virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); + virtual void remove_child(Inkscape::XML::Node *child); + virtual void order_changed(Inkscape::XML::Node *child, Inkscape::XML::Node *old_ref, Inkscape::XML::Node *new_ref); + virtual gchar *description(); protected: SPSwitch* spswitch; diff --git a/src/sp-symbol.cpp b/src/sp-symbol.cpp index 5889ee899..896e5b3a8 100644 --- a/src/sp-symbol.cpp +++ b/src/sp-symbol.cpp @@ -53,20 +53,20 @@ static void sp_symbol_init(SPSymbol *symbol) symbol->c2p = Geom::identity(); } -void CSymbol::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CSymbol::build(SPDocument *document, Inkscape::XML::Node *repr) { SPSymbol* object = this->spsymbol; object->readAttr( "viewBox" ); object->readAttr( "preserveAspectRatio" ); - CGroup::onBuild(document, repr); + CGroup::build(document, repr); } -void CSymbol::onRelease() { - CGroup::onRelease(); +void CSymbol::release() { + CGroup::release(); } -void CSymbol::onSet(unsigned int key, const gchar* value) { +void CSymbol::set(unsigned int key, const gchar* value) { SPSymbol* object = this->spsymbol; SPSymbol *symbol = SP_SYMBOL(object); @@ -160,17 +160,17 @@ void CSymbol::onSet(unsigned int key, const gchar* value) { } break; default: - CGroup::onSet(key, value); + CGroup::set(key, value); break; } } -void CSymbol::onChildAdded(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { - CGroup::onChildAdded(child, ref); +void CSymbol::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) { + CGroup::child_added(child, ref); } -void CSymbol::onUpdate(SPCtx *ctx, guint flags) { +void CSymbol::update(SPCtx *ctx, guint flags) { SPSymbol* object = this->spsymbol; SPSymbol *symbol = object; @@ -271,7 +271,7 @@ void CSymbol::onUpdate(SPCtx *ctx, guint flags) { } // And invoke parent method - CGroup::onUpdate((SPCtx *) &rctx, flags); + CGroup::update((SPCtx *) &rctx, flags); // As last step set additional transform of drawing group for (SPItemView *v = symbol->display; v != NULL; v = v->next) { @@ -280,16 +280,16 @@ void CSymbol::onUpdate(SPCtx *ctx, guint flags) { } } else { // No-op - CGroup::onUpdate(ctx, flags); + CGroup::update(ctx, flags); } } -void CSymbol::onModified(unsigned int flags) { - CGroup::onModified(flags); +void CSymbol::modified(unsigned int flags) { + CGroup::modified(flags); } -Inkscape::XML::Node* CSymbol::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CSymbol::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPSymbol* object = this->spsymbol; if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) { @@ -302,12 +302,12 @@ Inkscape::XML::Node* CSymbol::onWrite(Inkscape::XML::Document *xml_doc, Inkscape //XML Tree being used directly here while it shouldn't be. repr->setAttribute("preserveAspectRatio", object->getRepr()->attribute("preserveAspectRatio")); - CGroup::onWrite(xml_doc, repr, flags); + CGroup::write(xml_doc, repr, flags); return repr; } -Inkscape::DrawingItem* CSymbol::onShow(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) { +Inkscape::DrawingItem* CSymbol::show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) { SPSymbol* item = this->spsymbol; SPSymbol *symbol = SP_SYMBOL(item); @@ -315,7 +315,7 @@ Inkscape::DrawingItem* CSymbol::onShow(Inkscape::Drawing &drawing, unsigned int if (symbol->cloned) { // Cloned <symbol> is actually renderable - ai = CGroup::onShow(drawing, key, flags); + ai = CGroup::show(drawing, key, flags); Inkscape::DrawingGroup *g = dynamic_cast<Inkscape::DrawingGroup *>(ai); if (g) { g->setChildTransform(symbol->c2p); @@ -325,19 +325,19 @@ Inkscape::DrawingItem* CSymbol::onShow(Inkscape::Drawing &drawing, unsigned int return ai; } -void CSymbol::onHide(unsigned int key) { +void CSymbol::hide(unsigned int key) { SPSymbol* item = this->spsymbol; SPSymbol *symbol = SP_SYMBOL(item); if (symbol->cloned) { /* Cloned <symbol> is actually renderable */ - CGroup::onHide(key); + CGroup::hide(key); } } -Geom::OptRect CSymbol::onBbox(Geom::Affine const &transform, SPItem::BBoxType type) { +Geom::OptRect CSymbol::bbox(Geom::Affine const &transform, SPItem::BBoxType type) { SPSymbol* item = this->spsymbol; SPSymbol const *symbol = SP_SYMBOL(item); @@ -346,12 +346,12 @@ Geom::OptRect CSymbol::onBbox(Geom::Affine const &transform, SPItem::BBoxType ty if (symbol->cloned) { // Cloned <symbol> is actually renderable Geom::Affine const a( symbol->c2p * transform ); - bbox = CGroup::onBbox(a, type); + bbox = CGroup::bbox(a, type); } return bbox; } -void CSymbol::onPrint(SPPrintContext* ctx) { +void CSymbol::print(SPPrintContext* ctx) { SPSymbol* item = this->spsymbol; SPSymbol *symbol = SP_SYMBOL(item); @@ -360,7 +360,7 @@ void CSymbol::onPrint(SPPrintContext* ctx) { sp_print_bind(ctx, symbol->c2p, 1.0); - CGroup::onPrint(ctx); + CGroup::print(ctx); sp_print_release (ctx); } diff --git a/src/sp-symbol.h b/src/sp-symbol.h index 095418a3c..0c2ecae36 100644 --- a/src/sp-symbol.h +++ b/src/sp-symbol.h @@ -55,19 +55,19 @@ public: CSymbol(SPSymbol* symbol); virtual ~CSymbol(); - virtual void onBuild(SPDocument *document, Inkscape::XML::Node *repr); - virtual void onRelease(); - virtual void onSet(unsigned int key, gchar const* value); - virtual void onUpdate(SPCtx *ctx, guint flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - - virtual void onModified(unsigned int flags); - virtual void onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); - - virtual Inkscape::DrawingItem* onShow(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags); - virtual void onPrint(SPPrintContext *ctx); - virtual Geom::OptRect onBbox(Geom::Affine const &transform, SPItem::BBoxType type); - virtual void onHide (unsigned int key); + virtual void build(SPDocument *document, Inkscape::XML::Node *repr); + virtual void release(); + virtual void set(unsigned int key, gchar const* value); + virtual void update(SPCtx *ctx, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + + virtual void modified(unsigned int flags); + virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); + + virtual Inkscape::DrawingItem* show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags); + virtual void print(SPPrintContext *ctx); + virtual Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType type); + virtual void hide (unsigned int key); protected: SPSymbol* spsymbol; diff --git a/src/sp-text.cpp b/src/sp-text.cpp index ed3792e66..45f159b9d 100644 --- a/src/sp-text.cpp +++ b/src/sp-text.cpp @@ -88,17 +88,17 @@ sp_text_init (SPText *text) new (&text->attributes) TextTagAttributes; } -void CText::onRelease() { +void CText::release() { SPText* object = this->sptext; SPText *text = SP_TEXT(object); text->attributes.~TextTagAttributes(); text->layout.~Layout(); - CItem::onRelease(); + CItem::release(); } -void CText::onBuild(SPDocument *doc, Inkscape::XML::Node *repr) { +void CText::build(SPDocument *doc, Inkscape::XML::Node *repr) { SPText* object = this->sptext; object->readAttr( "x" ); @@ -107,12 +107,12 @@ void CText::onBuild(SPDocument *doc, Inkscape::XML::Node *repr) { object->readAttr( "dy" ); object->readAttr( "rotate" ); - CItem::onBuild(doc, repr); + CItem::build(doc, repr); object->readAttr( "sodipodi:linespacing" ); // has to happen after the styles are read } -void CText::onSet(unsigned int key, const gchar* value) { +void CText::set(unsigned int key, const gchar* value) { SPText* object = this->sptext; SPText *text = SP_TEXT (object); @@ -133,39 +133,39 @@ void CText::onSet(unsigned int key, const gchar* value) { object->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_TEXT_LAYOUT_MODIFIED_FLAG); break; default: - CItem::onSet(key, value); + CItem::set(key, value); break; } } } -void CText::onChildAdded(Inkscape::XML::Node *rch, Inkscape::XML::Node *ref) { +void CText::child_added(Inkscape::XML::Node *rch, Inkscape::XML::Node *ref) { SPText* object = this->sptext; SPText *text = SP_TEXT (object); - CItem::onChildAdded(rch, ref); + CItem::child_added(rch, ref); text->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_TEXT_CONTENT_MODIFIED_FLAG | SP_TEXT_LAYOUT_MODIFIED_FLAG); } -void CText::onRemoveChild(Inkscape::XML::Node *rch) { +void CText::remove_child(Inkscape::XML::Node *rch) { SPText* object = this->sptext; SPText *text = SP_TEXT (object); - CItem::onRemoveChild(rch); + CItem::remove_child(rch); text->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_TEXT_CONTENT_MODIFIED_FLAG | SP_TEXT_LAYOUT_MODIFIED_FLAG); } -void CText::onUpdate(SPCtx *ctx, guint flags) { +void CText::update(SPCtx *ctx, guint flags) { SPText* object = this->sptext; SPText *text = SP_TEXT (object); - CItem::onUpdate(ctx, flags); + CItem::update(ctx, flags); guint cflags = (flags & SP_OBJECT_MODIFIED_CASCADE); if (flags & SP_OBJECT_MODIFIED_FLAG) cflags |= SP_OBJECT_PARENT_MODIFIED_FLAG; @@ -207,7 +207,7 @@ void CText::onUpdate(SPCtx *ctx, guint flags) { } } -void CText::onModified(guint flags) { +void CText::modified(guint flags) { SPText* object = this->sptext; // CItem::onModified(flags); @@ -249,7 +249,7 @@ void CText::onModified(guint flags) { } } -Inkscape::XML::Node *CText::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node *CText::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPText* object = this->sptext; SPText *text = SP_TEXT (object); @@ -302,12 +302,12 @@ Inkscape::XML::Node *CText::onWrite(Inkscape::XML::Document *xml_doc, Inkscape:: text->getRepr()->setAttribute("sodipodi:linespacing", NULL); } - CItem::onWrite(xml_doc, repr, flags); + CItem::write(xml_doc, repr, flags); return repr; } -Geom::OptRect CText::onBbox(Geom::Affine const &transform, SPItem::BBoxType type) { +Geom::OptRect CText::bbox(Geom::Affine const &transform, SPItem::BBoxType type) { SPText* item = this->sptext; Geom::OptRect bbox = SP_TEXT(item)->layout.bounds(transform); @@ -320,7 +320,7 @@ Geom::OptRect CText::onBbox(Geom::Affine const &transform, SPItem::BBoxType type return bbox; } -Inkscape::DrawingItem* CText::onShow(Inkscape::Drawing &drawing, unsigned key, unsigned flags) { +Inkscape::DrawingItem* CText::show(Inkscape::Drawing &drawing, unsigned key, unsigned flags) { SPText* item = this->sptext; SPText *group = (SPText *) item; @@ -336,12 +336,12 @@ Inkscape::DrawingItem* CText::onShow(Inkscape::Drawing &drawing, unsigned key, u } -void CText::onHide(unsigned int key) { +void CText::hide(unsigned int key) { // CItem::onHide(key); } -gchar* CText::onDescription() { +gchar* CText::description() { SPText* item = this->sptext; SPText *text = reinterpret_cast<SPText *>(item); @@ -375,7 +375,7 @@ gchar* CText::onDescription() { return ret; } -void CText::onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { +void CText::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { SPText* item = this->sptext; if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_TEXT_BASELINE)) { @@ -391,7 +391,7 @@ void CText::onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape: } } -Geom::Affine CText::onSetTransform(Geom::Affine const &xform) { +Geom::Affine CText::set_transform(Geom::Affine const &xform) { SPText* item = this->sptext; SPText *text = SP_TEXT(item); @@ -440,7 +440,7 @@ Geom::Affine CText::onSetTransform(Geom::Affine const &xform) { return ret; } -void CText::onPrint(SPPrintContext *ctx) { +void CText::print(SPPrintContext *ctx) { SPText* item = this->sptext; SPText *group = SP_TEXT (item); diff --git a/src/sp-text.h b/src/sp-text.h index fb0ffdeac..7e2cffd18 100644 --- a/src/sp-text.h +++ b/src/sp-text.h @@ -82,22 +82,22 @@ public: CText(SPText* text); virtual ~CText(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); - virtual void onChildAdded(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); - virtual void onRemoveChild(Inkscape::XML::Node* child); - virtual void onSet(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); - virtual void onModified(unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); - - virtual Geom::OptRect onBbox(Geom::Affine const &transform, SPItem::BBoxType type); - virtual void onPrint(SPPrintContext *ctx); - virtual gchar* onDescription(); - virtual Inkscape::DrawingItem* onShow(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags); - virtual void onHide(unsigned int key); - virtual void onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); - virtual Geom::Affine onSetTransform(Geom::Affine const &transform); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); + virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref); + virtual void remove_child(Inkscape::XML::Node* child); + virtual void set(unsigned int key, const gchar* value); + virtual void update(SPCtx* ctx, unsigned int flags); + virtual void modified(unsigned int flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + + virtual Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType type); + virtual void print(SPPrintContext *ctx); + virtual gchar* description(); + virtual Inkscape::DrawingItem* show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags); + virtual void hide(unsigned int key); + virtual void snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); + virtual Geom::Affine set_transform(Geom::Affine const &transform); protected: SPText* sptext; diff --git a/src/sp-textpath.h b/src/sp-textpath.h index c609e5eb7..18fc645d5 100644 --- a/src/sp-textpath.h +++ b/src/sp-textpath.h @@ -39,12 +39,12 @@ public: CTextPath(SPTextPath* textpath); virtual ~CTextPath(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); - virtual void onSet(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); - virtual void onModified(unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); + virtual void set(unsigned int key, const gchar* value); + virtual void update(SPCtx* ctx, unsigned int flags); + virtual void modified(unsigned int flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); protected: SPTextPath* sptextpath; diff --git a/src/sp-title.cpp b/src/sp-title.cpp index c51478abc..522901eaf 100644 --- a/src/sp-title.cpp +++ b/src/sp-title.cpp @@ -39,14 +39,14 @@ sp_title_init(SPTitle *desc) desc->cobject = desc->ctitle; } -Inkscape::XML::Node* CTitle::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CTitle::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPTitle* object = this->sptitle; if (!repr) { repr = object->getRepr()->duplicate(xml_doc); } - CObject::onWrite(xml_doc, repr, flags); + CObject::write(xml_doc, repr, flags); return repr; } diff --git a/src/sp-title.h b/src/sp-title.h index 50ee15a95..17559c488 100644 --- a/src/sp-title.h +++ b/src/sp-title.h @@ -34,7 +34,7 @@ public: CTitle(SPTitle* title); virtual ~CTitle(); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); protected: SPTitle* sptitle; diff --git a/src/sp-tref.cpp b/src/sp-tref.cpp index 8f33a7bd0..7d17f9d3b 100644 --- a/src/sp-tref.cpp +++ b/src/sp-tref.cpp @@ -104,10 +104,10 @@ sp_tref_finalize(GObject *obj) tref->_changed_connection.~connection(); } -void CTRef::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CTRef::build(SPDocument *document, Inkscape::XML::Node *repr) { SPTRef* object = this->sptref; - CItem::onBuild(document, repr); + CItem::build(document, repr); object->readAttr( "xlink:href" ); object->readAttr( "x" ); @@ -117,7 +117,7 @@ void CTRef::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { object->readAttr( "rotate" ); } -void CTRef::onRelease() { +void CTRef::release() { SPTRef* object = this->sptref; SPTRef *tref = SP_TREF(object); @@ -132,10 +132,10 @@ void CTRef::onRelease() { tref->uriOriginalRef->detach(); - CItem::onRelease(); + CItem::release(); } -void CTRef::onSet(unsigned int key, const gchar* value) { +void CTRef::set(unsigned int key, const gchar* value) { SPTRef* object = this->sptref; debug("0x%p %s(%u): '%s'",object, @@ -175,18 +175,18 @@ void CTRef::onSet(unsigned int key, const gchar* value) { } } else { // default - CItem::onSet(key, value); + CItem::set(key, value); } } -void CTRef::onUpdate(SPCtx *ctx, guint flags) { +void CTRef::update(SPCtx *ctx, guint flags) { SPTRef* object = this->sptref; debug("0x%p",object); SPTRef *tref = SP_TREF(object); - CItem::onUpdate(ctx, flags); + CItem::update(ctx, flags); if (flags & SP_OBJECT_MODIFIED_FLAG) { flags |= SP_OBJECT_PARENT_MODIFIED_FLAG; @@ -202,7 +202,7 @@ void CTRef::onUpdate(SPCtx *ctx, guint flags) { } } -void CTRef::onModified(unsigned int flags) { +void CTRef::modified(unsigned int flags) { SPTRef* object = this->sptref; SPTRef *tref_obj = SP_TREF(object); @@ -223,7 +223,7 @@ void CTRef::onModified(unsigned int flags) { } } -Inkscape::XML::Node* CTRef::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CTRef::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPTRef* object = this->sptref; debug("0x%p",object); @@ -243,12 +243,12 @@ Inkscape::XML::Node* CTRef::onWrite(Inkscape::XML::Document *xml_doc, Inkscape:: g_free(uri_string); } - CItem::onWrite(xml_doc, repr, flags); + CItem::write(xml_doc, repr, flags); return repr; } -Geom::OptRect CTRef::onBbox(Geom::Affine const &transform, SPItem::BBoxType type) { +Geom::OptRect CTRef::bbox(Geom::Affine const &transform, SPItem::BBoxType type) { SPTRef* item = this->sptref; Geom::OptRect bbox; @@ -274,7 +274,7 @@ Geom::OptRect CTRef::onBbox(Geom::Affine const &transform, SPItem::BBoxType type return bbox; } -gchar* CTRef::onDescription() { +gchar* CTRef::description() { SPTRef* item = this->sptref; SPTRef *tref = SP_TREF(item); diff --git a/src/sp-tref.h b/src/sp-tref.h index f89a7ee1a..17ec2f591 100644 --- a/src/sp-tref.h +++ b/src/sp-tref.h @@ -65,15 +65,15 @@ public: CTRef(SPTRef* tref); virtual ~CTRef(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); - virtual void onSet(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); - virtual void onModified(unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); - - virtual Geom::OptRect onBbox(Geom::Affine const &transform, SPItem::BBoxType type); - virtual gchar* onDescription(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); + virtual void set(unsigned int key, const gchar* value); + virtual void update(SPCtx* ctx, unsigned int flags); + virtual void modified(unsigned int flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + + virtual Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType type); + virtual gchar* description(); protected: SPTRef* sptref; diff --git a/src/sp-tspan.cpp b/src/sp-tspan.cpp index 151e54830..fcbda7123 100644 --- a/src/sp-tspan.cpp +++ b/src/sp-tspan.cpp @@ -74,17 +74,17 @@ sp_tspan_init(SPTSpan *tspan) new (&tspan->attributes) TextTagAttributes; } -void CTSpan::onRelease() { +void CTSpan::release() { SPTSpan* object = this->sptspan; SPTSpan *tspan = SP_TSPAN(object); tspan->attributes.~TextTagAttributes(); - CItem::onRelease(); + CItem::release(); } -void CTSpan::onBuild(SPDocument *doc, Inkscape::XML::Node *repr) { +void CTSpan::build(SPDocument *doc, Inkscape::XML::Node *repr) { SPTSpan* object = this->sptspan; object->readAttr( "x" ); @@ -94,11 +94,11 @@ void CTSpan::onBuild(SPDocument *doc, Inkscape::XML::Node *repr) { object->readAttr( "rotate" ); object->readAttr( "sodipodi:role" ); - CItem::onBuild(doc, repr); + CItem::build(doc, repr); } -void CTSpan::onSet(unsigned int key, const gchar* value) { +void CTSpan::set(unsigned int key, const gchar* value) { SPTSpan* object = this->sptspan; SPTSpan *tspan = SP_TSPAN(object); @@ -115,16 +115,16 @@ void CTSpan::onSet(unsigned int key, const gchar* value) { } break; default: - CItem::onSet(key, value); + CItem::set(key, value); break; } } } -void CTSpan::onUpdate(SPCtx *ctx, guint flags) { +void CTSpan::update(SPCtx *ctx, guint flags) { SPTSpan* object = this->sptspan; - CItem::onUpdate(ctx, flags); + CItem::update(ctx, flags); if (flags & SP_OBJECT_MODIFIED_FLAG) { flags |= SP_OBJECT_PARENT_MODIFIED_FLAG; @@ -138,7 +138,7 @@ void CTSpan::onUpdate(SPCtx *ctx, guint flags) { } } -void CTSpan::onModified(unsigned int flags) { +void CTSpan::modified(unsigned int flags) { SPTSpan* object = this->sptspan; // CItem::onModified(flags); @@ -155,7 +155,7 @@ void CTSpan::onModified(unsigned int flags) { } } -Geom::OptRect CTSpan::onBbox(Geom::Affine const &transform, SPItem::BBoxType type) { +Geom::OptRect CTSpan::bbox(Geom::Affine const &transform, SPItem::BBoxType type) { SPTSpan* item = this->sptspan; Geom::OptRect bbox; @@ -181,7 +181,7 @@ Geom::OptRect CTSpan::onBbox(Geom::Affine const &transform, SPItem::BBoxType typ return bbox; } -Inkscape::XML::Node* CTSpan::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CTSpan::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPTSpan* object = this->sptspan; SPTSpan *tspan = SP_TSPAN(object); @@ -224,12 +224,12 @@ Inkscape::XML::Node* CTSpan::onWrite(Inkscape::XML::Document *xml_doc, Inkscape: } } - CItem::onWrite(xml_doc, repr, flags); + CItem::write(xml_doc, repr, flags); return repr; } -gchar* CTSpan::onDescription() { +gchar* CTSpan::description() { SPTSpan* item = this->sptspan; g_return_val_if_fail(SP_IS_TSPAN(item), NULL); @@ -290,7 +290,7 @@ sp_textpath_finalize(GObject *obj) delete textpath->sourcePath; } -void CTextPath::onRelease() { +void CTextPath::release() { SPTextPath* object = this->sptextpath; SPTextPath *textpath = SP_TEXTPATH(object); @@ -300,10 +300,10 @@ void CTextPath::onRelease() { if (textpath->originalPath) delete textpath->originalPath; textpath->originalPath = NULL; - CItem::onRelease(); + CItem::release(); } -void CTextPath::onBuild(SPDocument *doc, Inkscape::XML::Node *repr) { +void CTextPath::build(SPDocument *doc, Inkscape::XML::Node *repr) { SPTextPath* object = this->sptextpath; object->readAttr( "x" ); @@ -329,10 +329,10 @@ void CTextPath::onBuild(SPDocument *doc, Inkscape::XML::Node *repr) { repr->addChild(rch, NULL); } - CItem::onBuild(doc, repr); + CItem::build(doc, repr); } -void CTextPath::onSet(unsigned int key, const gchar* value) { +void CTextPath::set(unsigned int key, const gchar* value) { SPTextPath* object = this->sptextpath; SPTextPath *textpath = SP_TEXTPATH(object); @@ -349,13 +349,13 @@ void CTextPath::onSet(unsigned int key, const gchar* value) { object->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); break; default: - CItem::onSet(key, value); + CItem::set(key, value); break; } } } -void CTextPath::onUpdate(SPCtx *ctx, guint flags) { +void CTextPath::update(SPCtx *ctx, guint flags) { SPTextPath* object = this->sptextpath; SPTextPath *textpath = SP_TEXTPATH(object); @@ -366,7 +366,7 @@ void CTextPath::onUpdate(SPCtx *ctx, guint flags) { } textpath->isUpdating = false; - CItem::onUpdate(ctx, flags); + CItem::update(ctx, flags); if (flags & SP_OBJECT_MODIFIED_FLAG) { flags |= SP_OBJECT_PARENT_MODIFIED_FLAG; @@ -401,7 +401,7 @@ void refresh_textpath_source(SPTextPath* tp) } } -void CTextPath::onModified(unsigned int flags) { +void CTextPath::modified(unsigned int flags) { SPTextPath* object = this->sptextpath; // CItem::onModified(flags); @@ -418,7 +418,7 @@ void CTextPath::onModified(unsigned int flags) { } } -Inkscape::XML::Node* CTextPath::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CTextPath::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPTextPath* object = this->sptextpath; SPTextPath *textpath = SP_TEXTPATH(object); @@ -474,7 +474,7 @@ Inkscape::XML::Node* CTextPath::onWrite(Inkscape::XML::Document *xml_doc, Inksca } } - CItem::onWrite(xml_doc, repr, flags); + CItem::write(xml_doc, repr, flags); return repr; } diff --git a/src/sp-tspan.h b/src/sp-tspan.h index 71bcb25f3..ed4bc4506 100644 --- a/src/sp-tspan.h +++ b/src/sp-tspan.h @@ -44,15 +44,15 @@ public: CTSpan(SPTSpan* span); virtual ~CTSpan(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); - virtual void onSet(unsigned int key, const gchar* value); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); - virtual void onModified(unsigned int flags); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); - - virtual Geom::OptRect onBbox(Geom::Affine const &transform, SPItem::BBoxType type); - virtual gchar* onDescription(); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); + virtual void set(unsigned int key, const gchar* value); + virtual void update(SPCtx* ctx, unsigned int flags); + virtual void modified(unsigned int flags); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags); + + virtual Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType type); + virtual gchar* description(); protected: SPTSpan* sptspan; diff --git a/src/sp-use.cpp b/src/sp-use.cpp index c26297195..f3c478194 100644 --- a/src/sp-use.cpp +++ b/src/sp-use.cpp @@ -108,10 +108,10 @@ sp_use_finalize(GObject *obj) use->_transformed_connection.~connection(); } -void CUse::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { +void CUse::build(SPDocument *document, Inkscape::XML::Node *repr) { SPUse* object = this->spuse; - CItem::onBuild(document, repr); + CItem::build(document, repr); object->readAttr( "x" ); object->readAttr( "y" ); @@ -124,7 +124,7 @@ void CUse::onBuild(SPDocument *document, Inkscape::XML::Node *repr) { // which will call sp_use_href_changed, and that will take care of the child } -void CUse::onRelease() { +void CUse::release() { SPUse *use = this->spuse; SPUse* object = use; @@ -142,10 +142,10 @@ void CUse::onRelease() { use->ref->detach(); - CItem::onRelease(); + CItem::release(); } -void CUse::onSet(unsigned int key, const gchar* value) { +void CUse::set(unsigned int key, const gchar* value) { SPUse *use = this->spuse; SPUse* object = use; @@ -192,19 +192,19 @@ void CUse::onSet(unsigned int key, const gchar* value) { } default: - CItem::onSet(key, value); + CItem::set(key, value); break; } } -Inkscape::XML::Node* CUse::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { +Inkscape::XML::Node* CUse::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPUse *use = this->spuse; if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) { repr = xml_doc->createElement("svg:use"); } - CItem::onWrite(xml_doc, repr, flags); + CItem::write(xml_doc, repr, flags); sp_repr_set_svg_double(repr, "x", use->x.computed); sp_repr_set_svg_double(repr, "y", use->y.computed); @@ -220,7 +220,7 @@ Inkscape::XML::Node* CUse::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::X return repr; } -Geom::OptRect CUse::onBbox(Geom::Affine const &transform, SPItem::BBoxType bboxtype) { +Geom::OptRect CUse::bbox(Geom::Affine const &transform, SPItem::BBoxType bboxtype) { SPUse const *use = this->spuse; Geom::OptRect bbox; @@ -236,7 +236,7 @@ Geom::OptRect CUse::onBbox(Geom::Affine const &transform, SPItem::BBoxType bboxt return bbox; } -void CUse::onPrint(SPPrintContext* ctx) { +void CUse::print(SPPrintContext* ctx) { SPUse *use = this->spuse; bool translated = false; @@ -256,7 +256,7 @@ void CUse::onPrint(SPPrintContext* ctx) { } } -gchar* CUse::onDescription() { +gchar* CUse::description() { SPUse *use = this->spuse; char *ret; @@ -289,7 +289,7 @@ gchar* CUse::onDescription() { } } -Inkscape::DrawingItem* CUse::onShow(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) { +Inkscape::DrawingItem* CUse::show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) { SPUse *use = this->spuse; SPUse* item = use; @@ -310,7 +310,7 @@ Inkscape::DrawingItem* CUse::onShow(Inkscape::Drawing &drawing, unsigned int key return ai; } -void CUse::onHide(unsigned int key) { +void CUse::hide(unsigned int key) { SPUse *use = this->spuse; if (use->child) { @@ -513,7 +513,7 @@ sp_use_delete_self(SPObject */*deleted*/, SPUse *self) } } -void CUse::onUpdate(SPCtx *ctx, unsigned flags) { +void CUse::update(SPCtx *ctx, unsigned flags) { SPUse* object = this->spuse; SPItem *item = SP_ITEM(object); @@ -521,7 +521,7 @@ void CUse::onUpdate(SPCtx *ctx, unsigned flags) { SPItemCtx *ictx = (SPItemCtx *) ctx; SPItemCtx cctx = *ictx; - CItem::onUpdate(ctx, flags); + CItem::update(ctx, flags); if (flags & SP_OBJECT_MODIFIED_FLAG) { flags |= SP_OBJECT_PARENT_MODIFIED_FLAG; @@ -575,7 +575,7 @@ void CUse::onUpdate(SPCtx *ctx, unsigned flags) { } } -void CUse::onModified(unsigned int flags) { +void CUse::modified(unsigned int flags) { SPUse* object = this->spuse; SPUse *use_obj = SP_USE(object); @@ -695,7 +695,7 @@ SPItem *sp_use_get_original(SPUse *use) return ref; } -void CUse::onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { +void CUse::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) { SPUse* item = this->spuse; g_assert (item != NULL); @@ -707,7 +707,7 @@ void CUse::onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape:: if (!root) return; - root->citem->onSnappoints(p, snapprefs); + root->citem->snappoints(p, snapprefs); } diff --git a/src/sp-use.h b/src/sp-use.h index 5d5a1f5e8..4107f45af 100644 --- a/src/sp-use.h +++ b/src/sp-use.h @@ -64,19 +64,19 @@ public: CUse(SPUse* use); virtual ~CUse(); - virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); - virtual void onRelease(); - virtual void onSet(unsigned key, gchar const *value); - virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); - virtual void onUpdate(SPCtx* ctx, unsigned int flags); - virtual void onModified(unsigned int flags); - - virtual Geom::OptRect onBbox(Geom::Affine const &transform, SPItem::BBoxType bboxtype); - virtual gchar* onDescription(); - virtual void onPrint(SPPrintContext *ctx); - virtual Inkscape::DrawingItem* onShow(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags); - virtual void onHide(unsigned int key); - virtual void onSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); + virtual void build(SPDocument* doc, Inkscape::XML::Node* repr); + virtual void release(); + virtual void set(unsigned key, gchar const *value); + virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual void update(SPCtx* ctx, unsigned int flags); + virtual void modified(unsigned int flags); + + virtual Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType bboxtype); + virtual gchar* description(); + virtual void print(SPPrintContext *ctx); + virtual Inkscape::DrawingItem* show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags); + virtual void hide(unsigned int key); + virtual void snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs); protected: SPUse* spuse; |
