sp-widget.cpp revision 502e89d71501d2130f522fac5b59b4de3add3a58
#define __SP_WIDGET_C__
/*
* Abstract base class for dynamic control widgets
*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
* bulia byak <buliabyak@users.sf.net>
*
* Copyright (C) 1999-2002 Lauris Kaplinski
* Copyright (C) 2000-2001 Ximian, Inc.
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "macros.h"
#include "../document.h"
#include "sp-widget.h"
enum {
};
static void sp_widget_modify_selection (Inkscape::Application *inkscape, Inkscape::Selection *selection, guint flags, SPWidget *spw);
static void sp_widget_change_selection (Inkscape::Application *inkscape, Inkscape::Selection *selection, SPWidget *spw);
static void sp_widget_set_selection (Inkscape::Application *inkscape, Inkscape::Selection *selection, SPWidget *spw);
static GtkBinClass *parent_class;
sp_widget_get_type (void)
{
if (!type) {
static const GtkTypeInfo info = {
"SPWidget",
sizeof (SPWidget),
sizeof (SPWidgetClass),
};
}
return type;
}
static void
{
GTK_TYPE_NONE, 0);
GTK_TYPE_NONE, 1,
GTK_TYPE_NONE, 2,
GTK_TYPE_NONE, 1,
}
static void
{
}
static void
{
/* Disconnect signals */
// the checks are necessary because when destroy is caused by the the program shutting down,
// the inkscape object may already be (partly?) invalid --bb
}
}
static void
{
/* Connect signals */
g_signal_connect (G_OBJECT (spw->inkscape), "modify_selection", G_CALLBACK (sp_widget_modify_selection), spw);
g_signal_connect (G_OBJECT (spw->inkscape), "change_selection", G_CALLBACK (sp_widget_change_selection), spw);
g_signal_connect (G_OBJECT (spw->inkscape), "set_selection", G_CALLBACK (sp_widget_set_selection), spw);
}
}
static void
{
/* Disconnect signals */
}
}
static gint
{
}
/*
if ((bin->child) && (GTK_WIDGET_NO_WINDOW (bin->child))) {
GdkEventExpose ce;
ce = *event;
gtk_widget_event (bin->child, (GdkEvent *) &ce);
}
*/
return FALSE;
}
static void
{
}
static void
{
}
/* Methods */
{
return NULL;
}
}
{
if (GTK_WIDGET_VISIBLE (spw)) {
g_signal_connect (G_OBJECT (inkscape), "modify_selection", G_CALLBACK (sp_widget_modify_selection), spw);
g_signal_connect (G_OBJECT (inkscape), "change_selection", G_CALLBACK (sp_widget_change_selection), spw);
}
}
static void
sp_widget_modify_selection (Inkscape::Application *inkscape, Inkscape::Selection *selection, guint flags, SPWidget *spw)
{
}
static void
sp_widget_change_selection (Inkscape::Application *inkscape, Inkscape::Selection *selection, SPWidget *spw)
{
}
static void
sp_widget_set_selection (Inkscape::Application *inkscape, Inkscape::Selection *selection, SPWidget *spw)
{
/* Emit "set_selection" signal */
/* Inkscape will force "change_selection" anyways */
}