button.cpp revision e3b6cd4b0523f08a6414dc0800a15a3b1710ce8a
#define __SP_BUTTON_C__
/*
* Generic button widget
*
* Authors:
* MenTaLguY <mental@rydia.net>
* Lauris Kaplinski <lauris@kaplinski.com>
* bulia byak <buliabyak@users.sf.net>
*
* Copyright (C) 2002 Lauris Kaplinski
*
* This code is in public domain
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#if HAVE_STRING_H
#endif
#include "shortcuts.h"
#include "interface.h"
#include "icon.h"
#include "button.h"
static void sp_button_set_composed_tooltip (GtkTooltips *tooltips, GtkWidget *widget, SPAction *action);
static GtkToggleButtonClass *parent_class;
{NULL},
NULL,
};
GType sp_button_get_type(void)
{
if (!type) {
sizeof(SPButtonClass),
0, // base_init
0, // base_finalize
0, // class_finalize
0, // class_data
sizeof(SPButton),
0, // n_preallocs
0 // value_table
};
type = g_type_register_static(GTK_TYPE_TOGGLE_BUTTON, "SPButton", &info, static_cast<GTypeFlags>(0));
}
return type;
}
static void
{
}
static void
{
}
static void
{
}
}
if (button->doubleclick_action) {
}
}
static void
{
if (child) {
} else {
requisition->width = 0;
requisition->height = 0;
}
}
static void
{
}
}
static gint
{
case GDK_2BUTTON_PRESS:
if (button->doubleclick_action) {
}
return TRUE;
break;
default:
break;
}
return FALSE;
}
static void
{
}
}
sp_button_new( Inkscape::IconSize size, SPButtonType type, SPAction *action, SPAction *doubleclick_action, GtkTooltips *tooltips )
{
if (doubleclick_action)
// The Inkscape style is no-relief buttons
}
void
{
g_signal_handlers_block_by_func (G_OBJECT (button), (gpointer)G_CALLBACK (sp_button_perform_action), NULL);
g_signal_handlers_unblock_by_func (G_OBJECT (button), (gpointer)G_CALLBACK (sp_button_perform_action), NULL);
}
static void
{
if (button->doubleclick_action) {
}
if (action) {
}
}
static void
{
if (child) {
}
}
if (action) {
nr_active_object_add_listener ((NRActiveObject *) action, (NRObjectEventVector *) &button_event_vector, sizeof (SPActionEventVector), button);
}
}
}
}
static void
{
return;
}
/* temporarily lobotomized until SPActions are per-view */
}
}
static void
{
}
static void
{
}
}
static void
{
if (action) {
if (shortcut) {
// there's both action and shortcut
} else {
// action has no shortcut
}
} else {
// no action
}
}
{
return button;
}