svg-view.cpp revision f11cae0ae4b8e41d7f15a3f3ccd587188f26d04e
/** \file
* Functions and callbacks for generic SVG view and widget
*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
* Ralf Stephan <ralf@ark.in-berlin.de>
* Jon A. Cruz <jon@joncruz.org>
* Abhishek Sharma
*
* Copyright (C) 2001-2002 Lauris Kaplinski
* Copyright (C) 2001 Ximian, Inc.
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "display/canvas-arena.h"
#include "document.h"
#include "sp-item.h"
#include "svg-view.h"
/**
* Constructs new SPSVGView object and returns pointer to it.
*/
{
_hscale = 1.0;
_vscale = 1.0;
_keepaspect = FALSE;
_width = 0.0;
_height = 0.0;
_dkey = 0;
_drawing = 0;
}
{
{
}
}
/**
* Rescales SPSVGView to given proportions.
*/
void
{
doRescale (true);
}
}
/**
* Rescales SPSVGView and keeps aspect ratio.
*/
void
{
doRescale (true);
}
/**
* Helper function that sets rescale ratio and emits resize event.
*/
void
{
if (!doc()) return;
if (_rescale) {
if (_keepaspect) {
} else {
}
}
}
if (_drawing) {
}
if (event) {
}
}
void
{
}
void
{
}
//----------------------------------------------------------------
/**
* Callback connected with arena_event.
*/
/// \todo fixme.
static gint
{
static gdouble x, y;
case GDK_BUTTON_PRESS:
}
break;
case GDK_BUTTON_RELEASE:
if ( spitem != 0 )
{
}
}
}
break;
case GDK_MOTION_NOTIFY:
break;
case GDK_ENTER_NOTIFY:
if ( spitem != 0 )
{
}
break;
case GDK_LEAVE_NOTIFY:
if ( spitem != 0 )
{
}
break;
default:
break;
}
return TRUE;
}
/**
* Callback connected with set_document signal.
*/
void
{
if (doc()) {
}
if (!_drawing) {
}
if (document) {
if (ai) {
}
}
}
/**
* Callback connected with document_resized signal.
*/
void
{
}
/*
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 :