void
LPEPerpBisector::addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) {
    {
        KnotHolderEntity *e = new PB::KnotHolderEntityLeftEnd(this);
        e->create( desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN,
                   _("Adjust the \"left\" end of the bisector") );
        knotholder->add(e);
    }
    {
        KnotHolderEntity *e = new PB::KnotHolderEntityRightEnd(this);
        e->create( desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN,
                   _("Adjust the \"right\" end of the bisector") );
        knotholder->add(e);
    }
};
Example #2
0
void LPECopyRotate::addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) {
    {
        KnotHolderEntity *e = new CR::KnotHolderEntityStartingAngle(this);
        e->create( desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN,
                   _("Adjust the starting angle") );
        knotholder->add(e);
    }
};
void
LPETangentToCurve::addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) {
    {
        KnotHolderEntity *e = new TtC::KnotHolderEntityAttachPt(this);
        e->create( desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN,
                   _("Adjust the point of attachment of the tangent") );
        knotholder->add(e);
    }
    {
        KnotHolderEntity *e = new TtC::KnotHolderEntityLeftEnd(this);
        e->create( desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN,
                    _("Adjust the \"left\" end of the tangent") );
        knotholder->add(e);
    }
    {
        KnotHolderEntity *e = new TtC::KnotHolderEntityRightEnd(this);
        e->create( desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN,
                   _("Adjust the \"right\" end of the tangent") );
        knotholder->add(e);
    }
};
Example #4
0
void
Effect::addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) {
    // TODO: The entities in kh_entity_vector are already instantiated during the call
    //       to registerKnotHolderHandle(), but they are recreated here. Also, we must not
    //       delete them when the knotholder is destroyed, whence the clumsy function
    //       isDeletable(). If we could create entities of different classes dynamically,
    //       this would be much nicer. How to do this?
    std::vector<std::pair<KnotHolderEntity*, const char*> >::iterator i;
    for (i = kh_entity_vector.begin(); i != kh_entity_vector.end(); ++i) {
        KnotHolderEntity *entity = i->first;
        const char *descr = i->second;

        entity->create(desktop, item, knotholder, descr);
        knotholder->add(entity);
    }
}