summaryrefslogtreecommitdiffstats
path: root/share/extensions/web-set-att.inx
blob: 5bb14d2850c6f06acde81504a88229ef2ed51c46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
  <_name>Set Attributes</_name>
  <id>org.inkscape.web.set-att</id>
  <dependency type="executable" location="extensions">web-set-att.py</dependency>
  <dependency type="executable" location="extensions">inkex.py</dependency>
  <_param name="intro" type="description">This effect adds a feature visible (or usable) only on a SVG enabled web browser (like Firefox).</_param>
  <_param name="sep1" type="description">••••••••••••••••••••••••••••••••••••••••••••••••</_param>
  <_param name="help" type="description">This effect sets one or more attributes in the second selected element, when a defined event occurs on the first selected element.</_param>
  <_param name="sep2" type="description">••••••••••••••••••••••••••••••••••••••••••••••••</_param>
  <_param name="help" type="description">If you want to set more than one attribute, you must separate this with a space, and only with a space.</_param>
  <param name="att" type="string" _gui-text="Attribute to set">fill stroke stroke-width</param>
  <param name="when" type="enum" _gui-text="When should the set be done?">
    <_item value="onclick">on click</_item>
    <_item value="onfocusin">on focus</_item>
    <_item value="onfocusout">on blur</_item>
    <_item value="onactivate">on activate</_item>
    <_item value="onmousedown">on mouse down</_item>
    <_item value="onmouseup">on mouse up</_item>
    <_item value="onmouseover">on mouse over</_item>
    <_item value="onmousemove">on mouse move</_item>
    <_item value="onmouseout">on mouse out</_item>
    <_item value="onload">on element loaded</_item>
  </param>
  <_param name="help" type="description">The list of values must have the same size as the attributes list.</_param>
  <param name="val" type="string" _gui-text="Value to set">red black 5px</param>
  <param name="compatibility" type="enum" _gui-text="Compatibility with previews code to this event">
    <_item value="append">Run it after</_item>
    <_item value="prepend">Run it before</_item>
    <_item value="replace">Replace</_item>
  </param>
  <_param name="help" type="description">The next parameter is useful when you select more than two elements</_param>
  <param name="from-and-to" type="enum" _gui-text="Source and destination of setting">
    <_item value="g-to-one">All selected ones set an attribute in the last one</_item>
    <_item value="one-to-g">The first selected sets an attribute in all others</_item>
  </param>
  <effect>
    <object-type>all</object-type>
    <effects-menu>
      <submenu _name="Web">
        <submenu name="JavaScript"/>
      </submenu>
    </effects-menu>
  </effect>
  <script>
    <command reldir="extensions" interpreter="python">web-set-att.py</command>
  </script>
</inkscape-extension>