annotate inkscape/README.mbext @ 221:ad4f8a956505

Implement a workaround for the button class. However, this won't solve all issues. We can use this as example to fix the mouse out event issue. When we move the curosr over the text inside the button. The upper layer group will receive MOUSE_OUT events. This is absolute incorrect.
author wycc
date Sun, 14 Dec 2008 12:35:13 +0800
parents 9643d383bbb6
children 1958bb2a87a2
rev   line source
203
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
1 # Introduction
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
2
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
3 This is inkscape extention for the MadButteerfly. It can help users to establish SVG files which is usable for the MadButterfly SVG parser and loader.
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
4
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
5 # Requirement
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
6
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
7 The following package must be installed in your system
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
8 * python 2.5 or above
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
9 * pygtk
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
10 * python lxml module
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
11
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
12
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
13 # Installation
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
14
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
15 The installation is simple. Just copy all files to the inkscape extention directory. Usually, it should be /usr/share/inkscape/extentions.
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
16
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
17 # Usage
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
18
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
19 ## Assign an MadButterfly symbol to an element
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
20
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
21 This function will give an SVG element, such as path or group, a MadButterfly symbol so that we can access them by symbol in the MadButterfly program.
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
22
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
23 Steps
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
24 * Select a single object in the worksapce. If you want to assign multiple elements to one symbol, please group them.
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
25 * Select the effect/MadButterFly/Convert to symbol
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
26 * Input the symbol name in the text entry
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
27 * Press OK
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
28
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
29 You can check by using the XML editor in the inkscape. A new attribute mbname will be added. The MadButterfly parser willput this object into the symbol table by using the mbname.
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
30
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
31 ## Convert to button(In planned)
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
32
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
33 This function will convert a symbol into a button. A button is a symbol with three groups inside it. For example,
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
34
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
35 <g id="g1234" mbname="btn">
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
36 <g id="g1235" frame="active">
215
9643d383bbb6 Add document for the button
wycc
parents: 203
diff changeset
37 <original object>
203
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
38 </g>
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
39 <g id="g1235" frame="normal">
215
9643d383bbb6 Add document for the button
wycc
parents: 203
diff changeset
40 <original object>
203
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
41 </g>
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
42 <g id="g1236" frame="click">
215
9643d383bbb6 Add document for the button
wycc
parents: 203
diff changeset
43 <original object>
203
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
44 </g>
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
45 </g>
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
46
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
47
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
48 The content of all three groups will be the same. We can modify each of them seperately. By default, the active and click group will be hidden. We can use the button editor to edit it.
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
49
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
50 ## Button editor(In planned)
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
51
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
52 This function will invoke another inkscape to edit the selected button. In the new inkscape, all three group will be visible and put in different layer. We can move them and edit them. When we close the inkscape, the MB extention will collect the new content and update the groups in the original SVG file. By this way, we can edit the button in any SVG file.
1d485bf96480 Add a sample inkscape extention to assign symbol name to an SVG element.
wycc
parents:
diff changeset
53