sp-widget.cpp revision c830d132ea7f29e73b55f87badff602b065f8eac
#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)
{
//TODO: switch to GObject
// GtkType and such calls were deprecated a while back with the
// introduction of GObject as a separate layer, with GType instead. --JonCruz
if (!type) {
static const GtkTypeInfo info = {
(gchar*) "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 */
}
/*
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 :