pen-context.h revision 8dc2ff4ddcbbce632cd8a6434acf6d9113e39757
#ifndef SEEN_PEN_CONTEXT_H
#define SEEN_PEN_CONTEXT_H
/** \file
* SPPenContext: a context for pen tool events.
*/
#include "draw-context.h"
#include "live_effects/effect.h"
#define SP_TYPE_PEN_CONTEXT (sp_pen_context_get_type())
#define SP_PEN_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SP_TYPE_PEN_CONTEXT, SPPenContextClass))
enum {
};
enum {
};
/**
* SPPenContext: a context for pen tool events.
*/
/** \invar npoints in {0, 2, 5}. */
// npoints somehow determines the type of the node (what does it mean, exactly? the number of Bezier handles?)
unsigned int mode : 1;
unsigned int state : 2;
bool polylines_only;
bool polylines_paraxial;
int num_clicks;
unsigned int expecting_clicks_for_LPE; // if positive, finish the path after this many clicks
Inkscape::LivePathEffect::Effect *waiting_LPE; // if NULL, waiting_LPE_type in SPDrawContext is taken into account
unsigned int events_disabled : 1;
};
/// The SPPenContext vtable (empty).
// note: waiting_LPE_type is defined in SPDrawContext
}
void sp_pen_context_wait_for_LPE_mouse_clicks(SPPenContext *pc, Inkscape::LivePathEffect::EffectType effect_type,
unsigned int num_clicks, bool use_polylines = true);
#endif /* !SEEN_PEN_CONTEXT_H */
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :