summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 19f2d67)
raw | patch | inline | side by side (parent: 19f2d67)
author | JucaBlues <JucaBlues@users.sourceforge.net> | |
Thu, 15 Jan 2009 10:24:38 +0000 (10:24 +0000) | ||
committer | JucaBlues <JucaBlues@users.sourceforge.net> | |
Thu, 15 Jan 2009 10:24:38 +0000 (10:24 +0000) |
If you want to test it, create a new document, draw something, select it, ctrl+shift+O, expand the Interactivity expander and set:
onclick to window.location="http://xkcd.com"
onmouseover to this.style.cursor="pointer"
Save as Inkscape SVG (currently not working for Plain SVG)
then open this SVG file in Firefox to see the result.
onclick to window.location="http://xkcd.com"
onmouseover to this.style.cursor="pointer"
Save as Inkscape SVG (currently not working for Plain SVG)
then open this SVG file in Firefox to see the result.
src/dialogs/item-properties.cpp | patch | blob | history |
index d1992b158ce03545e28da1f7396fabc191b20c02..a885e7a616ec0c652a56c099e48c521273a2cd7b 100644 (file)
#include "../macros.h"
#include "../verbs.h"
#include "../interface.h"
+#include "sp-attribute-widget.h"
#include "dialog-events.h"
#include "../preferences.h"
sp_item_widget_new (void)
{
- GtkWidget *spw, *vb, *t, *cb, *l, *f, *tf, *pb;
+ GtkWidget *spw, *vb, *t, *cb, *l, *f, *tf, *pb, *int_expander, *int_label;
GtkTextBuffer *desc_buffer;
GtkTooltips *tt = gtk_tooltips_new();
spw );
gtk_object_set_data (GTK_OBJECT (spw), "sensitive", cb);
+ /* Create the frame for interactivity options */
+ int_label = gtk_label_new_with_mnemonic (_("_Interactivity"));
+ int_expander = gtk_expander_new (NULL);
+ gtk_expander_set_label_widget (GTK_EXPANDER (int_expander),int_label);
+ gtk_object_set_data (GTK_OBJECT (spw), "interactivity", int_expander);
+
+ gtk_box_pack_start (GTK_BOX (vb), int_expander, FALSE, FALSE, 0);
+
gtk_widget_show_all (spw);
sp_item_widget_setup (SP_WIDGET (spw), sp_desktop_selection (SP_ACTIVE_DESKTOP));
}
w = GTK_WIDGET(gtk_object_get_data(GTK_OBJECT(spw), "desc_frame"));
gtk_widget_set_sensitive(w, TRUE);
+
+ w = GTK_WIDGET(gtk_object_get_data(GTK_OBJECT(spw), "interactivity"));
+
+ GtkWidget* int_table = GTK_WIDGET(gtk_object_get_data(GTK_OBJECT(spw), "interactivity_table"));
+ if (int_table){
+ gtk_container_remove(GTK_CONTAINER(w), int_table);
+ }
+
+ const gchar* int_labels[10] = {"onclick", "onmouseover", "onmouseout", "onmousedown", "onmouseup", "onmousemove","onfocusin", "onfocusout", "onactivate", "onload"};
+
+ int_table = sp_attribute_table_new (obj, 10, int_labels, int_labels);
+ gtk_widget_show_all (int_table);
+ gtk_object_set_data(GTK_OBJECT(spw), "interactivity_table", int_table);
+
+ gtk_container_add (GTK_CONTAINER (w), int_table);
+
}
gtk_object_set_data (GTK_OBJECT (spw), "blocked", GUINT_TO_POINTER (FALSE));