Difference between revisions of "Creating a new SPObject"

From Inkscape Wiki
Jump to navigation Jump to search
(lycosss1)
 
(add changes for c++ified SPObject)
 
(8 intermediate revisions by 5 users not shown)
Line 1: Line 1:
http://lycosss.com/index.html
Create two new files in your source tree, sp-customobject.cpp and sp-customobject.h.
http://lycosss.com/100-free-mature-anal-pics.html
 
http://lycosss.com100free-mature-blond-pics.html
sp-customobject.h
http://lycosss.com/100-free-mature-hardcore-thumbnails.html
#ifndef SP_CUSTOMOBJECT_H_SEEN
http://lycosss.com/100free-mature-porn-pics.html
#define SP_CUSTOMOBJECT_H_SEEN
http://lycosss.com/100-free-moms-and-mature-porn-downloads.html
http://lycosss.com/100-free-nude-mature-pics.html
/** \file
http://lycosss.com/104-year-old-company-with-80-billion-sales-for-2002.html
  * Your custom object implementation
http://lycosss.com/14-year-old-40-yard-dash.html
  *
http://lycosss.com/30-40-mature-woman-free-galleries.html
  * Authors:
http://lycosss.com/30-mature-leg-pics.html
  *  You
http://lycosss.com/30-year-old-women.html
  *
http://lycosss.com/40-and-50-year-old-nudes.html
  * Copyright (C) You 2???
http://lycosss.com/40-and-50-year-old-women.html
  * Released under GNU GPL, read the file 'COPYING' for more information
http://lycosss.com/40-mature-woman-free-galleries.html
  */
http://lycosss.com/40-year-fat-old-women.html
http://lycosss.com/40-year-old.html
#include "sp-object.h"
http://lycosss.com/40-year-old-anger-shorttemper-symptoms.html
http://lycosss.com/40-year-old-babes.html
/* Skeleton base class */
http://lycosss.com/40-year-old-bathing-suit-models.html
http://lycosss.com/40-year-old-birthday.html
#define SP_CUSTOM_OBJECT(o) (dynamic_cast<SPCustomObject*>(o))
http://lycosss.com/40-year-old-birthday-cards.html
#define SP_IS_CUSTOM_OBJECT(o) (dynamic_cast<SPCustomObject*>(o) != NULL)
http://lycosss.com/40-year-old-birthday-ideas.html
 
http://lycosss.com/40-year-old-celebrities.html
class SPCustomObject : public SPObject {
http://lycosss.com/40-year-old-cyclist.html
public:
http://lycosss.com/40-year-old-engineer-jokes.html
    SPCustomObject() {}
http://lycosss.com/40-year-old-fashon.html
    virtual ~SPCustomObject() {}
http://lycosss.com/40-year-old-female-models.html
http://lycosss.com/40-year-old-gag-gifts.html
    // to do anything useful with your new object, you need to override the following methods:
http://lycosss.com/40-year-old-gift-ideas.html
    virtual void build(SPDocument * doc, Inkscape::XML::Node *repr);
http://lycosss.com/40-year-old-jokes.html
    virtual void set(unsigned key, const gchar* value);
http://lycosss.com/40-year-old-ladies.html
    virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
http://lycosss.com/40-year-old-latino-women.html
};
http://lycosss.com/40-year-old-lesbiens.html
http://lycosss.com/40-year-old-male-models.html
http://lycosss.com/40-year-old-male-role-models.html
#endif /* !SP_CUSTOMOBJECT_H_SEEN */
http://lycosss.com/40-year-old-male-underwear-models.html
 
http://lycosss.com/40-year-old-man.html
 
http://lycosss.com/40-year-old-men.html
Add this code into your .cpp file, which will register your SP object with the XML tree:
http://lycosss.com/40-year-old-models.html
namespace {
http://lycosss.com/40-year-old-mom-fucking.html
    SPObject* createCustomObject() {
http://lycosss.com/40-year-old-moms-thong-hanging-out-in-public.html
        return new SPCustomObject();
http://lycosss.com/40-year-old-nude-moms.html
    }
http://lycosss.com/40-year-old-people.html
    bool customObjectsRegistered = SPFactory::instance().registerObject("name_in_svg", createCustomObject);
http://lycosss.com/40-year-old-preggo.html
}
http://lycosss.com/40-year-old-pussy.html
(If your SPObject doesn't have a useful XML representation, you can skip this call.)
http://lycosss.com/40-year-old-scotch.html
 
http://lycosss.com/40-year-old-sex.html
When you override build, set, or write, you need to include a call to the base class method:
http://lycosss.com/40-year-old-sex-drive.html
 
http://lycosss.com/40-year-olds-fuckin.html
void
http://lycosss.com/40-year-old-she-males.html
SPCustomObject::build(SPDocument* doc, Inkscape::XML::Node* repr) {
http://lycosss.com/40-year-old-single-mother-knows-nothing-needs-a-job.html
    // read in attributes from repr
http://lycosss.com/40-year-olds-in-porn.html
    readAttr( "inkscape:not-an-attribute" ); // this propogates up to SPObject, which calls the virtual set() method, finally calling back here
http://lycosss.com/40-year-old-slut.html
    SPObject::build(doc, repr);
http://lycosss.com/40-year-old-sluts.html
http://lycosss.com/40-year-old-transexual-escorts.html
    // maybe do some more stuff here
http://lycosss.com/40-year-old-vagina.html
}
http://lycosss.com/40-year-old-whiskies.html
 
http://lycosss.com/40-year-old-wife-nude-pics.html
Inkscape::XML::Node*
http://lycosss.com/40-year-old-woman-face-lift-pictures-price.html
SPCustomObject::write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags) {
http://lycosss.com/40-year-old-woman-having-sex-fantasies.html
    // write our attributes to XML
http://lycosss.com/40-year-old-women.html
   
http://lycosss.com/40-year-old-women-fat.html
    // the repr doesn't exist, we need to create it
http://lycosss.com/40-year-old-women-nude.html
    if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) {
http://lycosss.com/45-year-old-attractive-nude-women.html
        repr = doc->createElement("name_in_svg");
http://lycosss.com/50-60-70-year-old-moms-fucking-there-sons.html
    }
http://lycosss.com/50-mature-women-nude.html
http://lycosss.com/50-to-60-mature-lesbians-galleries.html
    if (flags & SP_OBJECT_WRITE_EXT) {
http://lycosss.com/50-year-old.html
        // write Inkscape-only objects here, not copied to plain SVG dump.
http://lycosss.com/50-year-old-11-year-old.html
        repr->setAttribute("inkscape:not-an-attribute");
http://lycosss.com/50-year-old-actresses.html
    }
http://lycosss.com/50-year-old-adult-birthday-card.html
    SPObject::write(doc, repr, flags);
http://lycosss.com/50-year-old-beauties.html
    // and possibly do anything else here
http://lycosss.com/50-year-old-bikini-model.html
    return repr;
http://lycosss.com/50-year-old-birthday.html
}
http://lycosss.com/50-year-old-birthday-gift.html
 
http://lycosss.com/50-year-old-birthday-jokes.html
void
http://lycosss.com/50-year-old-birthday-parties.html
SPCustomObject::set(unsigned int key, gchar const* value) {
http://lycosss.com/50-year-old-blondes.html
    // set an object from its value
http://lycosss.com/50-year-old-bodybuilders.html
    switch (key) {
http://lycosss.com/50-year-old-body-builders.html
        case SP_ATTR_INKSCAPE_CUSTOM:
http://lycosss.com/50-year-old-chivas-regal-bid.html
            if ((value && *value) && !strcmp(value, "true")) {
http://lycosss.com/50-year-old-clothes.html
                val = true;
http://lycosss.com/50-year-old-cognac.html
            }
http://lycosss.com/50-year-old-escort.html
            break;
http://lycosss.com/50-year-old-gift.html
        default:
http://lycosss.com/50-year-old-guidance-counselor-nude-photos.html
            SPObject::set(key, value);
http://lycosss.com/50-year-old-items.html
            break;
http://lycosss.com/50-year-old-jokes.html
    }
http://lycosss.com/50-year-old-liquor.html
}
http://lycosss.com/50-year-old-man-why-they-smell.html
http://lycosss.com/50-year-old-man-with-chest-pain-for-24-hours.html
http://lycosss.com/50-year-old-men.html
http://lycosss.com/50-year-old-milf.html
http://lycosss.com/50-year-old-milfs.html
http://lycosss.com/50-year-old-model.html
http://lycosss.com/50-year-old-naked-women.html
http://lycosss.com/50-year-old-nude.html
http://lycosss.com/50-year-old-nude-model.html
http://lycosss.com/50-year-old-nude-woman.html
http://lycosss.com/50-year-old-nude-women.html
http://lycosss.com/50-year-old-poems.html
http://lycosss.com/50-year-old-rings.html
http://lycosss.com/50-year-olds.html
http://lycosss.com/50-year-old-sally-o-malley.html
http://lycosss.com/50-year-old-scotch.html
http://lycosss.com/50-year-olds-entering-teaching-professions.html
http://lycosss.com/50-year-old-sex.html
http://lycosss.com/50-year-old-slut.html
http://lycosss.com/50-year-old-sluty-mums.html
http://lycosss.com/50-year-old-unsolved-crimes.html
http://lycosss.com/50-year-old-w.html
http://lycosss.com/50-year-old-wedding-rings.html
http://lycosss.com/50-year-old-weight-training.html
http://lycosss.com/50-year-old-wine.html
http://lycosss.com/50-year-old-woman.html
http://lycosss.com/50-year-old-women.html
http://lycosss.com/50-year-old-women-nude.html
http://lycosss.com/50-year-old-women-nude-having-vegetable-sex-free-web-cam.html
http://lycosss.com/50-year-old-women-shagging.html
http://lycosss.com/50-year-old-women-taking-it-up-the-ass.html
http://lycosss.com/5k-run-times-for-a-40-year-old.html
http://lycosss.com/60-70-year-old-women.html
http://lycosss.com/60-and-70-year-old-who-fuck-young-boys.html
http://lycosss.com/60-free-granny-thumbnail-gallery.html
http://lycosss.com/60-granny-thumbnail-gallery.html
http://lycosss.com/60-year-old-australia.html
http://lycosss.com/60-year-old-babes-free-pics.html
http://lycosss.com/60-year-old-black-free-porn.html
http://lycosss.com/60-year-old-black-sluts.html
http://lycosss.com/60-year-old-celebs.html
http://lycosss.com/60-year-old-cunts.html
http://lycosss.com/60-year-old-cunts-thumbnails.html
http://lycosss.com/60-year-old-free-pics.html
http://lycosss.com/60-year-old-grandmother-to-raise-a-7-year-old.html
http://lycosss.com/60-year-old-grandmother-to-raise-a-7-year-old-bad.html
http://lycosss.com/60-year-old-hairy-blonde.html
http://lycosss.com/60-year-old-house.html
http://lycosss.com/60-year-old-mature-housewives.html
http://lycosss.com/60-year-old-men-and-sexual-relations.html
http://lycosss.com/60-year-old-milfs.html
http://lycosss.com/60-year-old-milfs-and-young-stud.html
http://lycosss.com/60-year-old-naked-women.html
http://lycosss.com/60-year-old-nudes.html
http://lycosss.com/60-year-old-nude-women.html
http://lycosss.com/60-year-old-pornography.html
http://lycosss.com/60-year-old-scotch.html
http://lycosss.com/60-year-old-sex.html
http://lycosss.com/60-year-old-teachers-fucking-students.html
http://lycosss.com/60-year-old-twins-birthday-party-theme.html
http://lycosss.com/60-year-old-wine.html
http://lycosss.com/60-year-old-woman.html
http://lycosss.com/60-year-old-woman-new-zealand.html
http://lycosss.com/60-year-old-woman-with-hypertension.html
http://lycosss.com/60-year-old-women.html
http://lycosss.com/60-year-old-women-nude.html
http://lycosss.com/60-year-old-women-on-bed.html
http://lycosss.com/60-year-old-women-peeing.html
http://lycosss.com/60-year-old-women-pics.html
http://lycosss.com/70-and-80-year-old-whores.html
http://lycosss.com/70-s-mature-sluts.html
http://lycosss.com/70-year-old-cunt.html
http://lycosss.com/70-year-old-drivers.html
http://lycosss.com/70-year-old-fucking.html
http://lycosss.com/70-year-old-hookers.html
http://lycosss.com/70-year-old-naked-women.html
http://lycosss.com/70-year-old-nude-women-thumbnail-galleries.html
http://lycosss.com/70-year-old-people.html
http://lycosss.com/70-year-old-pussy.html
http://lycosss.com/70-year-old-pussy-thumb-nail.html
http://lycosss.com/70-year-olds-being-fuck-by-16-inch-dicks.html
http://lycosss.com/70-year-old-sex.html
http://lycosss.com/70-year-old-sluts.html
http://lycosss.com/70-year-old-whores.html
http://lycosss.com/70-year-old-with-copd.html
http://lycosss.com/70-year-old-woman-raped.html
http://lycosss.com/70-year-old-women-naked.html
http://lycosss.com/70yr-old-granny.html
http://lycosss.com/80-year-old-and-rat.html
http://lycosss.com/80-year-old-birthday-ideas.html
http://lycosss.com/80-year-old-celebrations.html
http://lycosss.com/80-year-old-classrings.html
http://lycosss.com/80-year-old-crocodile.html
http://lycosss.com/80-year-old-funny-speech.html
http://lycosss.com/80-year-old-grandma-sex.html
http://lycosss.com/80-year-old-granny.html
http://lycosss.com/80-year-old-having-sex.html
http://lycosss.com/80-year-old-man-caught-copying-movies.html
http://lycosss.com/80-year-old-men.html
http://lycosss.com/80-year-old-naked.html
http://lycosss.com/80-year-old-naked-men.html
http://lycosss.com/80-year-old-naked-women.html
http://lycosss.com/80-year-old-nude.html
http://lycosss.com/80-year-old-nude-women.html
http://lycosss.com/80-year-old-orgasm.html
http://lycosss.com/80-year-old-porn.html
http://lycosss.com/80-year-old-pussy.html
http://lycosss.com/80-year-old-scotch.html
http://lycosss.com/80-year-old-sluts.html
http://lycosss.com/80-year-old-thong-pics.html
http://lycosss.com/80-year-old-with-hodgkins-disease.html
http://lycosss.com/80-year-old-women.html
http://lycosss.com/80-year-old-women-getting-fucked-in-the-ass.html
http://lycosss.com/80-year-old-women-nude.html
http://lycosss.com/80-year-old-women-porn.html
http://lycosss.com/80-year-old-women-thong-pics.html
http://lycosss.com/900-mature-phone-sex.html
http://lycosss.com/a-40-year-old-woman.html
http://lycosss.com/absolute-grannies.html
http://lycosss.com/accessible-porn-for-mature-teens.html
http://lycosss.com/acne-in-40-year-old-female.html
http://lycosss.com/action-36-grannies.html
http://lycosss.com/action-36-mature.html
http://lycosss.com/adherence-of-medical-therapy-by-older-people.html
http://lycosss.com/adoration-of-older-women.html
http://lycosss.com/adult-check-id-sites-pictures-of-naked-older-women.html
http://lycosss.com/adult-entertainment-older-women.html
http://lycosss.com/adult-entertainment-xxx-grannys.html
http://lycosss.com/adult-fucking-loud-mature.html
http://lycosss.com/Adult-Galleries-Mature-Women.html
http://lycosss.com/adult-gay-site-in-brazil-for-mature-men.html
http://lycosss.com/adult-granny-tgp-free.html
http://lycosss.com/adult-images-old-women-free.html
http://lycosss.com/adult-mature.html
http://lycosss.com/adult-mature-elderly-swingers-older-tgp-free.html
http://lycosss.com/adult-mature-fetish-porn-movies.html
http://lycosss.com/adult-mature-galleries.html
http://lycosss.com/adult-mature-ladies.html
http://lycosss.com/adult-mature-movies.html
http://lycosss.com/adult-mature-nude-women-free.html
http://lycosss.com/adult-mature-pics-motocycle-gallery.html
http://lycosss.com/adult-mature-video-game.html
http://lycosss.com/adult-personals-mature-women-pictures-profiles-free-local.html
http://lycosss.com/adult-video-games-mature.html
http://lycosss.com/adventure-for-the-50-year-old.html
http://lycosss.com/african-women.html
http://lycosss.com/airy-mature-female-women-videos.html
http://lycosss.com/all-free-naked-mature-ladies.html
http://lycosss.com/all-mature-babes.html
http://lycosss.com/amateur-50-year-olds.html
http://lycosss.com/amateur-adult-mature-mpeg.html
http://lycosss.com/amateur-adult-mature-mpeg-submitted-galleries.html
http://lycosss.com/amateur-ass-cunt-mature-porn-pussy-teen-tit.html
http://lycosss.com/amateur-clips-mature.html
http://lycosss.com/amateur-dvd-gangbang-mature-housewife.html
http://lycosss.com/amateur-free-porn-mature.html
http://lycosss.com/amateur-fucking-hard-mature.html
http://lycosss.com/amateur-granny.html
http://lycosss.com/amateur-interracial-mature-wife.html
http://lycosss.com/amateur-mature.html
http://lycosss.com/amateur-mature-asian-nude.html
http://lycosss.com/amateur-mature-bbw.html
http://lycosss.com/amateur-mature-cum-slurping-sluts.html
http://lycosss.com/amateur-mature-cum-slurping-sluts-milfs.html
http://lycosss.com/amateur-mature-erotica-tgp.html
http://lycosss.com/amateur-mature-free.html
http://lycosss.com/amateur-mature-free-videos.html
http://lycosss.com/amateur-mature-galleries.html
http://lycosss.com/amateur-mature-gallery.html
http://lycosss.com/amateur-mature-girdle-canada.html
http://lycosss.com/amateur-mature-granny-sex-stories.html
http://lycosss.com/amateur-mature-hardcore.html
http://lycosss.com/amateur-mature-housewives.html
http://lycosss.com/amateur-mature-images.html
http://lycosss.com/amateur-mature-ladies.html
http://lycosss.com/amateur-mature-lingerie-models.html
http://lycosss.com/amateur-mature-links.html
http://lycosss.com/amateur-mature-maria.html
http://lycosss.com/amateur-mature-men-with-contact-information.html
http://lycosss.com/amateur-mature-mom-movies.html
http://lycosss.com/amateur-mature-nude.html
http://lycosss.com/amateur-mature-nudes.html
http://lycosss.com/amateur-mature-nude-women.html
http://lycosss.com/amateur-mature-pics.html
http://lycosss.com/amateur-mature-porn.html
http://lycosss.com/amateur-mature-pussy.html
http://lycosss.com/amateur-mature-reality.html
http://lycosss.com/amateur-mature-sex.html
http://lycosss.com/amateur-mature-sex-pics.html
http://lycosss.com/amateur-mature-submissions.html
http://lycosss.com/amateur-mature-thumbnail-free.html
http://lycosss.com/amateur-mature-thumbnails.html
http://lycosss.com/amateur-mature-video.html
http://lycosss.com/amateur-mature-video-free.html
http://lycosss.com/amateur-mature-video-free-black.html
http://lycosss.com/amateur-mature-wife.html
http://lycosss.com/amateur-mature-wives.html
http://lycosss.com/amateur-mature-women.html
http://lycosss.com/amateur-mature-women-free-pics.html
http://lycosss.com/amateur-mature-women-galleries.html
http://lycosss.com/amateur-mature-women-naked.html
http://lycosss.com/amateur-mature-women-naked-samples.html
http://lycosss.com/amateur-mature-women-photos.html
http://lycosss.com/amateur-naked-galleries-mature.html
http://lycosss.com/amateur-older-women.html
http://lycosss.com/amateur-porno-mature.html
http://lycosss.com/amateur-vanessa-mature.html
http://lycosss.com/amateur-video-women-mature-free.html
http://lycosss.com/amateur-women.html
http://lycosss.com/amatuer-mature.html
http://lycosss.com/amatuer-mature-housewives.html
http://lycosss.com/amatuer-mature-nude-women.html
http://lycosss.com/amatuer-mature-nude-women-free.html
http://lycosss.com/amatuer-mature-pussy.html
http://lycosss.com/amatuer-mature-thumbnails.html
http://lycosss.com/amatuer-mature-women.html
http://lycosss.com/amatuer-nude-mature-women-free.html
http://lycosss.com/amatuer-nude-old-women.html
http://lycosss.com/amatuer-older-women.html
http://lycosss.com/amature-and-mature-women-top-100.html
http://lycosss.com/amature-grannies.html
http://lycosss.com/amature-mature-free.html
http://lycosss.com/amature-mature-hairy-pussy.html
http://lycosss.com/amature-mature-nude-women.html
http://lycosss.com/amature-mature-pics.html
http://lycosss.com/amature-mature-porn.html
http://lycosss.com/amature-mature-woman-nude.html
http://lycosss.com/amature-mature-women.html
http://lycosss.com/amature-nude-mature-photography.html
http://lycosss.com/amature-older-woman-pictures-thumb-nails-free.html
http://lycosss.com/amature-older-women.html
http://lycosss.com/amature-videos-slut-free-fucking-fat-mature-tgp.html
http://lycosss.com/amazon-women.html
http://lycosss.com/american-grannies.html
http://lycosss.com/american-granny.html
http://lycosss.com/american-woman.html
http://lycosss.com/ameteur-older-ladies-mature-adult-video-dvd.html
http://lycosss.com/ameteur-older-ladies-mature-adult-video-dvd-movie.html
http://lycosss.com/amputee-women.html
http://lycosss.com/anal-fucking-mature-woman.html
http://lycosss.com/anal-grannies.html
http://lycosss.com/anal-grannies-galleries.html
http://lycosss.com/anal-granny.html
http://lycosss.com/anal-mature.html
http://lycosss.com/anal-mature-movies.html
http://lycosss.com/anal-mature-teen-pic-tgp.html
http://lycosss.com/anal-sex-mature-tight-pics-tgp.html
http://lycosss.com/anime-women.html
http://lycosss.com/arab-songs-50-year-old.html
http://lycosss.com/arab-women.html
http://lycosss.com/archive-mature-porn.html
http://lycosss.com/arkansas-nude-mature.html
http://lycosss.com/art-mature-nude-male.html
http://lycosss.com/art-nude-mature-female.html
http://lycosss.com/asain-mature-tgp.html
http://lycosss.com/asian-fucking-mature.html
http://lycosss.com/asian-grannies.html
http://lycosss.com/asian-granny.html
http://lycosss.com/asian-granny-sex.html
http://lycosss.com/asian-granny-with-young-men.html
http://lycosss.com/asian-ladies-over-50-year-old.html
http://lycosss.com/asian-mature.html
http://lycosss.com/asian-mature-hardcore-photos.html
http://lycosss.com/asian-mature-nude-women.html
http://lycosss.com/asian-mature-porn.html
http://lycosss.com/asian-mature-pussy.html
http://lycosss.com/asian-mature-sex.html
http://lycosss.com/asian-mature-sex-woman.html
http://lycosss.com/asian-mature-tgp.html
http://lycosss.com/asian-mature-thumbs.html
http://lycosss.com/asian-mature-women.html
http://lycosss.com/asian-nurse-medical-sex.html
http://lycosss.com/asian-nurse-sex.html
http://lycosss.com/asian-older-women.html
http://lycosss.com/asian-old-grannies.html
http://lycosss.com/asian-sex-movies-mature-group.html
http://lycosss.com/asian-sex-movies-mature-group-extra.html
http://lycosss.com/asian-woman.html
http://lycosss.com/asian-women.html
http://lycosss.com/athletic-women.html
http://lycosss.com/attractive-mature-nude-woman.html
http://lycosss.com/attractive-older-women.html
http://lycosss.com/aunt-judys-big-mature-women-special-offer.html
http://lycosss.com/aunt-judy-s-mature-amateurs.html
http://lycosss.com/aunt-judy-s-mature-ladies.html
http://lycosss.com/auntjudys-mature-porn.html
http://lycosss.com/aunt-judys-older-women.html
http://lycosss.com/aunt-judy-s-older-women.html
http://lycosss.com/aunt-judy-s-sexy-seniors.html
http://lycosss.com/average-age-of-a-40-year-old-male-in-the-united-states.html
http://lycosss.com/average-mature-women-with-small-breasts.html
http://lycosss.com/babe-mature-porn.html
http://lycosss.com/babes-mature.html
http://lycosss.com/bald-mature-pussys.html
http://lycosss.com/bald-women.html
http://lycosss.com/bang-fucking-gang-mature.html
http://lycosss.com/banging-mature-women-young-men-videos.html
http://lycosss.com/barcellona-mature-men.html
http://lycosss.com/barcelona-mature.html
http://lycosss.com/barcelona-mature-maturebarcelona-porn.html
http://lycosss.com/barcelona-mature-men.html
http://lycosss.com/barcelona-mature-sex.html
http://lycosss.com/barcelona-men-mature.html
http://lycosss.com/battered-women.html
http://lycosss.com/bbs-mature.html
http://lycosss.com/bbw-bash-pics-mature.html
http://lycosss.com/bbw-free-pictures-mature-sex.html
http://lycosss.com/bbw-fucking-mature-wife.html
http://lycosss.com/bbw-granny.html
http://lycosss.com/bbw-mature-thumb-galleries.html
http://lycosss.com/bcn-mature.html
http://lycosss.com/bcn-mature-older-men-galleries.html
http://lycosss.com/beautiful-50-year-old-women.html
http://lycosss.com/beautiful-black-women.html
http://lycosss.com/beautiful-grannies.html
http://lycosss.com/beautiful-granny-thumbs.html
http://lycosss.com/beautiful-mature-babes.html
http://lycosss.com/beautiful-mature-gallery.html
http://lycosss.com/beautiful-mature-ladies.html
http://lycosss.com/beautiful-mature-petite-babes.html
http://lycosss.com/beautiful-mature-women.html
http://lycosss.com/beautiful-mature-women-porn.html
http://lycosss.com/beautiful-naked-older-women.html
http://lycosss.com/beautiful-naked-women.html
http://lycosss.com/beautiful-nude-women.html
http://lycosss.com/beautiful-older-naked-women.html
http://lycosss.com/beautiful-older-women.html
http://lycosss.com/beautiful-older-women-gallery.html
http://lycosss.com/beautiful-older-women-pictures.html
http://lycosss.com/beautiful-petite-mature-babes.html
http://lycosss.com/beautiful-woman.html

Latest revision as of 20:40, 14 May 2014

Create two new files in your source tree, sp-customobject.cpp and sp-customobject.h.

sp-customobject.h

#ifndef SP_CUSTOMOBJECT_H_SEEN
#define SP_CUSTOMOBJECT_H_SEEN

/** \file
 * Your custom object implementation
 * 
 * Authors:
 *   You
 *
 * Copyright (C) You 2???
 * Released under GNU GPL, read the file 'COPYING' for more information
 */

#include "sp-object.h"

/* Skeleton base class */

#define SP_CUSTOM_OBJECT(o) (dynamic_cast<SPCustomObject*>(o))
#define SP_IS_CUSTOM_OBJECT(o) (dynamic_cast<SPCustomObject*>(o) != NULL)
 
class SPCustomObject : public SPObject {
public:
    SPCustomObject() {}
    virtual ~SPCustomObject() {}

    // to do anything useful with your new object, you need to override the following methods:
    virtual void build(SPDocument * doc, Inkscape::XML::Node *repr);
    virtual void set(unsigned key, const gchar* value);
    virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);
};


#endif /* !SP_CUSTOMOBJECT_H_SEEN */


Add this code into your .cpp file, which will register your SP object with the XML tree:

namespace {
    SPObject* createCustomObject() {
        return new SPCustomObject();
    }
    bool customObjectsRegistered = SPFactory::instance().registerObject("name_in_svg", createCustomObject);
}

(If your SPObject doesn't have a useful XML representation, you can skip this call.)

When you override build, set, or write, you need to include a call to the base class method:

void
SPCustomObject::build(SPDocument* doc, Inkscape::XML::Node* repr) {
    // read in attributes from repr
    readAttr( "inkscape:not-an-attribute" ); // this propogates up to SPObject, which calls the virtual set() method, finally calling back here
    SPObject::build(doc, repr);

    // maybe do some more stuff here
}
Inkscape::XML::Node*
SPCustomObject::write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags) {
    // write our attributes to XML
    
    // the repr doesn't exist, we need to create it
    if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) {
        repr = doc->createElement("name_in_svg");
    }

    if (flags & SP_OBJECT_WRITE_EXT) {
        // write Inkscape-only objects here, not copied to plain SVG dump.
        repr->setAttribute("inkscape:not-an-attribute");
    }
    SPObject::write(doc, repr, flags);
    // and possibly do anything else here
    return repr;
}
void
SPCustomObject::set(unsigned int key, gchar const* value) {
    // set an object from its value
    switch (key) {
        case SP_ATTR_INKSCAPE_CUSTOM:
            if ((value && *value) && !strcmp(value, "true")) {
                val = true;
            }
            break;
        default:
            SPObject::set(key, value);
            break;
    }
}