#include "icon-size.h"
#include "widgets/ink-action.h"
#if GTK_CHECK_VERSION(3,0,0)
// Fork of gtk-imagemenuitem to continue support
#include "widgets/image-menu-item.h"
#endif
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 );
struct _InkActionPrivate
{
};
#define INK_ACTION_GET_PRIVATE( o ) ( G_TYPE_INSTANCE_GET_PRIVATE( (o), INK_ACTION_TYPE, InkActionPrivate ) )
enum {
};
{
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,
}
}
{
}
{
}
//Any strings passed in should already be localised
{
"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:
{
}
}
}
{
#if GTK_CHECK_VERSION(3,0,0)
#else
#endif
// TODO this work-around is until SPIcon will live properly inside of a popup menu
if ( SP_IS_ICON(child) ) {
if ( target ) {
}
}
#if GTK_CHECK_VERSION(3,0,0)
#else
#endif
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 );
struct _InkToggleActionPrivate
{
};
#define INK_TOGGLE_ACTION_GET_PRIVATE( o ) ( G_TYPE_INSTANCE_GET_PRIVATE( (o), INK_TOGGLE_ACTION_TYPE, InkToggleActionPrivate ) )
{
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)99,
(int)Inkscape::ICON_SIZE_SMALL_TOOLBAR,
}
}
{
}
{
}
{
"name", name,
"label", label,
"tooltip", tooltip,
"iconId", inkId,
//"SP_ATTR_INKSCAPE", attr, // Why doesn't this work and do I need to use g_object_set_data below?
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:
{
}
}
}
{
GtkWidget* item = GTK_TOGGLE_ACTION_CLASS(ink_toggle_action_parent_class)->parent_class.create_menu_item(action);
return item;
}
{
GtkWidget* item = GTK_TOGGLE_ACTION_CLASS(ink_toggle_action_parent_class)->parent_class.create_tool_item(action);
if ( GTK_IS_TOOL_BUTTON(item) ) {
#if GTK_CHECK_VERSION(3,0,0)
#else
#endif
} else {
label = 0;
}
} else {
// For now trigger a warning but don't do anything else
(void)button;
}
return item;
}
{
if ( action ) {
while ( proxies ) {
#if GTK_CHECK_VERSION(3,0,0)
#else
#endif
}
}
}
}
}
/* --------------------------------------------------------------- */
/* --------------------------------------------------------------- */
/* --------------------------------------------------------------- */
/* --------------------------------------------------------------- */
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 );
struct _InkRadioActionPrivate
{
};
#define INK_RADIO_ACTION_GET_PRIVATE( o ) ( G_TYPE_INSTANCE_GET_PRIVATE( (o), INK_RADIO_ACTION_TYPE, InkRadioActionPrivate ) )
{
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,
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:
{
}
}
}
{
GtkWidget* item = GTK_RADIO_ACTION_CLASS(ink_radio_action_parent_class)->parent_class.parent_class.create_menu_item(action);
return item;
}
{
GtkWidget* item = GTK_RADIO_ACTION_CLASS(ink_radio_action_parent_class)->parent_class.parent_class.create_tool_item(action);
if ( GTK_IS_TOOL_BUTTON(item) ) {
#if GTK_CHECK_VERSION(3,0,0)
#else
#endif
} else {
// For now trigger a warning but don't do anything else
(void)button;
}
}
// TODO investigate if needed
return item;
}
/* --------------------------------------------------------------- */
/* --------------------------------------------------------------- */
/* --------------------------------------------------------------- */
/* --------------------------------------------------------------- */
// ToolMenu Action is happily derived from http://www.gtkforums.com/viewtopic.php?t=4215
static void
{
}
static void
{
}
{
"name", name,
"label", label,
"tooltip", tooltip,
"iconId", inkId,
"iconSize", size,
NULL );
return action;
}