button.cpp revision 24d0bcc7652434b07c32055043ef9311cfae9cb3
#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 <gdk/gdkkeysyms.h>
#include "icon.h"
#include "button.h"
static GtkToggleButtonClass *parent_class;
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 )
{
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) {
GTK_WIDGET(button)));
}
}
}
static void
{
return;
}
/* temporarily lobotomized until SPActions are per-view */
}
}
{
if (action) {
if (shortcut != GDK_VoidSymbol) {
// there's both action and shortcut
} else {
// action has no shortcut
}
} else {
// no action
}
}
{
return button;
}