ink-action.cpp revision 0a9a46fd9e563adc481afec846ceb7e622b17131
#include <gtk/gtktooltips.h>
#include <gtk/gtktoolitem.h>
#include <gtk/gtktoggletoolbutton.h>
#include <gtk/gtkcheckmenuitem.h>
#include <gtk/gtkimagemenuitem.h>
#include "icon-size.h"
#include "ink-action.h"
static void ink_action_get_property( GObject* obj, guint propId, GValue* value, GParamSpec * pspec );
static void ink_action_set_property( GObject* obj, guint propId, const GValue *value, GParamSpec* pspec );
static GtkActionClass* gInkActionParentClass = 0;
struct _InkActionPrivate
{
};
#define INK_ACTION_GET_PRIVATE( o ) ( G_TYPE_INSTANCE_GET_PRIVATE( (o), INK_ACTION_TYPE, InkActionPrivate ) )
GType ink_action_get_type( void )
{
if ( !myType ) {
sizeof( InkActionClass ),
NULL, /* base_init */
NULL, /* base_finalize */
NULL, /* class_finalize */
NULL, /* class_data */
sizeof( InkAction ),
0, /* n_preallocs */
};
}
return myType;
}
enum {
PROP_INK_ID = 1,
};
{
if ( klass ) {
/*klass->parent_class.connect_proxy = connect_proxy;*/
/*klass->parent_class.disconnect_proxy = disconnect_proxy;*/
g_param_spec_string( "iconId",
"Icon ID",
"The id for the icon",
"",
g_param_spec_int( "iconSize",
"Icon Size",
"The size the icon",
(int)Inkscape::ICON_SIZE_MENU,
(int)Inkscape::ICON_SIZE_DECORATION,
(int)Inkscape::ICON_SIZE_SMALL_TOOLBAR,
}
}
{
}
{
}
{
"name", name,
"label", label,
"tooltip", tooltip,
"iconId", inkId,
"iconSize", size,
NULL );
return action;
}
static void ink_action_get_property( GObject* obj, guint propId, GValue* value, GParamSpec * pspec )
{
(void)action;
switch ( propId ) {
case PROP_INK_ID:
{
}
break;
case PROP_INK_SIZE:
{
}
break;
default:
}
}
{
(void)action;
switch ( propId ) {
case PROP_INK_ID:
{
}
break;
case PROP_INK_SIZE:
{
}
break;
default:
{
}
}
}
#include <gtk/gtkstock.h>
{
// TODO this work-around is until SPIcon will live properly inside of a popup menu
if ( SP_IS_ICON(child) ) {
if ( target ) {
}
}
label = 0;
} else {
}
return item;
}
{
if ( GTK_IS_TOOL_BUTTON(item) ) {
} else {
// For now trigger a warning but don't do anything else
(void)button;
}
}
// TODO investigate if needed
return item;
}
/* --------------------------------------------------------------- */
/* --------------------------------------------------------------- */
/* --------------------------------------------------------------- */
/* --------------------------------------------------------------- */
static void ink_toggle_action_get_property( GObject* obj, guint propId, GValue* value, GParamSpec * pspec );
static void ink_toggle_action_set_property( GObject* obj, guint propId, const GValue *value, GParamSpec* pspec );
static GtkToggleActionClass* gInkToggleActionParentClass = 0;
struct _InkToggleActionPrivate
{
};
#define INK_TOGGLE_ACTION_GET_PRIVATE( o ) ( G_TYPE_INSTANCE_GET_PRIVATE( (o), INK_TOGGLE_ACTION_TYPE, InkToggleActionPrivate ) )
GType ink_toggle_action_get_type( void )
{
if ( !myType ) {
sizeof( InkToggleActionClass ),
NULL, /* base_init */
NULL, /* base_finalize */
NULL, /* class_finalize */
NULL, /* class_data */
sizeof( InkToggleAction ),
0, /* n_preallocs */
};
myType = g_type_register_static( GTK_TYPE_TOGGLE_ACTION, "InkToggleAction", &myInfo, (GTypeFlags)0 );
}
return myType;
}
{
if ( klass ) {
/*klass->parent_class.connect_proxy = connect_proxy;*/
/*klass->parent_class.disconnect_proxy = disconnect_proxy;*/
g_param_spec_string( "iconId",
"Icon ID",
"The id for the icon",
"",
g_param_spec_int( "iconSize",
"Icon Size",
"The size the icon",
(int)Inkscape::ICON_SIZE_MENU,
(int)Inkscape::ICON_SIZE_DECORATION,
(int)Inkscape::ICON_SIZE_SMALL_TOOLBAR,
}
}
{
}
{
}
{
"name", name,
"label", label,
"tooltip", tooltip,
"iconId", inkId,
"iconSize", size,
NULL );
return action;
}
static void ink_toggle_action_get_property( GObject* obj, guint propId, GValue* value, GParamSpec * pspec )
{
(void)action;
switch ( propId ) {
case PROP_INK_ID:
{
}
break;
case PROP_INK_SIZE:
{
}
break;
default:
}
}
void ink_toggle_action_set_property( GObject* obj, guint propId, const GValue *value, GParamSpec* pspec )
{
(void)action;
switch ( propId ) {
case PROP_INK_ID:
{
}
break;
case PROP_INK_SIZE:
{
}
break;
default:
{
}
}
}
{
return item;
}
{
if ( GTK_IS_TOOL_BUTTON(item) ) {
} else {
}
} else {
// For now trigger a warning but don't do anything else
(void)button;
}
return item;
}
{
if ( action ) {
while ( proxies ) {
}
}
}
}
}
/* --------------------------------------------------------------- */
/* --------------------------------------------------------------- */
/* --------------------------------------------------------------- */
/* --------------------------------------------------------------- */
static void ink_radio_action_get_property( GObject* obj, guint propId, GValue* value, GParamSpec * pspec );
static void ink_radio_action_set_property( GObject* obj, guint propId, const GValue *value, GParamSpec* pspec );
static GtkRadioActionClass* gInkRadioActionParentClass = 0;
struct _InkRadioActionPrivate
{
};
#define INK_RADIO_ACTION_GET_PRIVATE( o ) ( G_TYPE_INSTANCE_GET_PRIVATE( (o), INK_RADIO_ACTION_TYPE, InkRadioActionPrivate ) )
GType ink_radio_action_get_type( void )
{
if ( !myType ) {
sizeof( InkRadioActionClass ),
NULL, /* base_init */
NULL, /* base_finalize */
NULL, /* class_finalize */
NULL, /* class_data */
sizeof( InkRadioAction ),
0, /* n_preallocs */
};
}
return myType;
}
{
if ( klass ) {
/*klass->parent_class.connect_proxy = connect_proxy;*/
/*klass->parent_class.disconnect_proxy = disconnect_proxy;*/
g_param_spec_string( "iconId",
"Icon ID",
"The id for the icon",
"",
g_param_spec_int( "iconSize",
"Icon Size",
"The size the icon",
(int)Inkscape::ICON_SIZE_MENU,
(int)Inkscape::ICON_SIZE_DECORATION,
(int)Inkscape::ICON_SIZE_SMALL_TOOLBAR,
}
}
{
}
{
}
{
"name", name,
"label", label,
"tooltip", tooltip,
"iconId", inkId,
"iconSize", size,
NULL );
return action;
}
static void ink_radio_action_get_property( GObject* obj, guint propId, GValue* value, GParamSpec * pspec )
{
(void)action;
switch ( propId ) {
case PROP_INK_ID:
{
}
break;
case PROP_INK_SIZE:
{
}
break;
default:
}
}
void ink_radio_action_set_property( GObject* obj, guint propId, const GValue *value, GParamSpec* pspec )
{
(void)action;
switch ( propId ) {
case PROP_INK_ID:
{
}
break;
case PROP_INK_SIZE:
{
}
break;
default:
{
}
}
}
{
return item;
}
{
if ( GTK_IS_TOOL_BUTTON(item) ) {
} else {
// For now trigger a warning but don't do anything else
(void)button;
}
}
// TODO investigate if needed
return item;
}