sp-guide.cpp revision f4f507228b30d55fd7e39386ba513f3a0a54bd5d
#define __SP_GUIDE_C__
/*
* Inkscape guideline implementation
*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
* Peter Moulder <pmoulder@mail.csse.monash.edu.au>
*
* Copyright (C) 2000-2002 authors
* Copyright (C) 2004 Monash University
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "display/guideline.h"
#include "attributes.h"
#include "sp-guide.h"
#include <sp-item-notify-moveto.h>
#include <sp-item.h>
#include <sp-guide-constraint.h>
#include <remove-last.h>
enum {
};
static void sp_guide_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
static void sp_guide_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
static SPObjectClass *parent_class;
GType sp_guide_get_type(void)
{
static GType guide_type = 0;
if (!guide_type) {
GTypeInfo guide_info = {
sizeof(SPGuideClass),
sizeof(SPGuide),
16,
NULL, /* value_table */
};
}
return guide_type;
}
{
0,
0xffffffff,
0xff000000,
0,
0xffffffff,
0xff000000,
}
{
/* constrain y coordinate; horizontal line. I doubt it ever matters what we initialize
this to. */
}
static void sp_guide_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
switch (prop_id) {
case PROP_COLOR:
}
break;
case PROP_HICOLOR:
break;
}
}
{
switch (prop_id) {
case PROP_COLOR:
break;
case PROP_HICOLOR:
break;
}
}
{
}
}
{
}
}
}
{
switch (key) {
case SP_ATTR_ORIENTATION:
/* Visual representation of a horizontal line, constrain vertically (y coordinate). */
} else {
}
break;
case SP_ATTR_POSITION:
// update position in non-committing way
// fixme: perhaps we need to add an update method instead, and request_update here
break;
default:
}
break;
}
}
{
}
{
return;
}
}
}
{
return;
}
}
}
{
}
/**
* \arg commit False indicates temporary moveto in response to motion event while dragging,
* true indicates a "committing" version: in response to button release event after
* dragging a guideline, or clicking OK in guide editing dialog.
*/
{
position);
}
/* Calling sp_repr_set_svg_double must precede calling sp_item_notify_moveto in the commit
case, so that the guide's new position is available for sp_item_rm_unsatisfied_cns. */
if (commit) {
"position", position);
}
i != iEnd; ++i)
{
SPGuideAttachment const &att = *i;
}
}
/**
* Returns a human-readable description of the guideline for use in dialog boxes and status bar.
*
* The caller is responsible for freeing the string.
*/
{
using NR::X;
using NR::Y;
return g_strdup(_("vertical guideline"));
return g_strdup(_("horizontal guideline"));
} else {
/* flip y axis and rotate 90 degrees to convert to line angle */
/* Alternative suggestion: "angled guideline". */
}
}
{
i != iEnd; ++i)
{
SPGuideAttachment const &att = *i;
}
}
/*
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 :