common-context.cpp revision d7943e935ff00bba1ca84e964ac46778ec16bb87
#include "common-context.h"
#include "config.h"
#include "message-context.h"
#include "streq.h"
#include "preferences.h"
#include "display/sp-canvas-item.h"
#define MIN_PRESSURE 0.0
#define MAX_PRESSURE 1.0
#define DEFAULT_PRESSURE 1.0
#define DRAG_MIN 0.0
#define DRAG_DEFAULT 1.0
#define DRAG_MAX 1.0
static SPEventContextClass *common_parent_class = 0;
{
if (!type) {
sizeof(SPCommonContextClass),
0, // base_init
0, // base_finalize
0, // class_finalize
0, // class_data
sizeof(SPCommonContext),
0, // n_preallocs
0 // value_table
};
type = g_type_register_static(SP_TYPE_EVENT_CONTEXT, "SPCommonContext", &info, static_cast<GTypeFlags>(0));
}
return type;
}
{
}
{
// ctx->cursor_shape = cursor_eraser_xpm;
// ctx->hot_x = 4;
// ctx->hot_y = 4;
ctx->accumulated = 0;
ctx->currentcurve = 0;
ctx->currentshape = 0;
/* Common values */
/* attributes */
}
{
if (ctx->accumulated) {
ctx->accumulated = 0;
}
}
if (ctx->currentcurve) {
ctx->currentcurve = 0;
}
}
}
if (ctx->currentshape) {
ctx->currentshape = 0;
}
if (ctx->_message_context) {
delete ctx->_message_context;
ctx->_message_context = 0;
}
}
{
if ( common_parent_class->setup ) {
}
}
{
// ignore preset modifications
if (path == "mass") {
} else if (path == "wiggle") {
} else if (path == "angle") {
} else if (path == "width") {
} else if (path == "thinning") {
} else if (path == "tremor") {
} else if (path == "flatness") {
} else if (path == "usepressure") {
} else if (path == "usetilt") {
} else if (path == "abs_width") {
} else if (path == "cap_rounding") {
}
}
{
// TODO add common hanlding
if ( !ret ) {
if ( common_parent_class->root_handler ) {
}
}
return ret;
}
/*
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:fileencoding=utf-8:textwidth=99 :