Merge lp:~valavanisalex/ubuntu/oneiric/inkscape/fix-726850 into lp:ubuntu/oneiric/inkscape
- Oneiric (11.10)
- fix-726850
- Merge into oneiric
Status: | Rejected |
---|---|
Rejected by: | Martin Pitt |
Proposed branch: | lp:~valavanisalex/ubuntu/oneiric/inkscape/fix-726850 |
Merge into: | lp:ubuntu/oneiric/inkscape |
Diff against target: |
8748 lines (+4368/-4329) 8 files modified
debian/changelog (+16/-0) debian/patches/00list (+3/-2) debian/patches/01_add_unity_quicklist_support.patch.dpatch (+0/-20) debian/patches/04-fix-gcc4.6-ftbfs.dpatch (+0/-4301) debian/patches/ubuntu-01-add-unity-quicklist-support.dpatch (+22/-0) debian/patches/ubuntu-02-add-translation-domain-to-desktop-file.dpatch (+25/-0) debian/patches/ubuntu-03-fix-gcc4.6-ftbfs.dpatch (+4302/-0) debian/rules (+0/-6) |
To merge this branch: | bzr merge lp:~valavanisalex/ubuntu/oneiric/inkscape/fix-726850 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Pitt | Disapprove | ||
Review via email: mp+60303@code.launchpad.net |
Commit message
Description of the change
This branch introduces two main changes:
1) A fix for bug #726850, to ensure that the translation domain is added to the correct group in inkscape.desktop
2) Reformatting of patches added in the Ubuntu fork: All patch names are no prefixed by "ubuntu-" to distinguish them from those maintained in Debian, and the DEP-3 headers have been refreshed and completed.
Martin Pitt (pitti) wrote : | # |
Also, I think a better fix would be to use dh_translations instead of hand-patching the domain. I'll do that as well.
Also, I noticed that all other patches were committed to upstream as well, so I don't think we should rename them to be ubuntu specific. Therefore there's nothing left in this MP to merge, I'll handle the dh_translations issue in the bug.
Thanks!
Unmerged revisions
- 54. By Alex Valavanis
-
* debian/
patches/ 01_add_ unity_quicklist _support. patch.dpatch:
- Rename to debian/patches/ ubuntu- 01-add- unity-quicklist -support. dpatch
- Refresh header
* Make sure that translation domain is added to correct group in
Desktop entry file (LP: #726850):
- debian/rules: Removed broken patch from install rule
- debian/patches/ ubuntu- 02-add- translation- domain- to-desktop-
file.dpatch: New dpatch to replace the patch in debian/rules
* debian/patches/ 04-fix- gcc4.6- ftbfs.dpatch:
- Rename to debian/patches/ ubuntu- 03-fix- gcc4.6- ftbfs.dpatch
- Refresh header
Preview Diff
1 | === modified file 'debian/changelog' | |||
2 | --- debian/changelog 2011-05-01 01:08:10 +0000 | |||
3 | +++ debian/changelog 2011-05-08 10:26:27 +0000 | |||
4 | @@ -1,3 +1,19 @@ | |||
5 | 1 | inkscape (0.48.1-2ubuntu4) natty; urgency=low | ||
6 | 2 | |||
7 | 3 | * debian/patches/01_add_unity_quicklist_support.patch.dpatch: | ||
8 | 4 | - Rename to debian/patches/ubuntu-01-add-unity-quicklist-support.dpatch | ||
9 | 5 | - Refresh header | ||
10 | 6 | * Make sure that translation domain is added to correct group in | ||
11 | 7 | Desktop entry file (LP: #726850): | ||
12 | 8 | - debian/rules: Removed broken patch from install rule | ||
13 | 9 | - debian/patches/ubuntu-02-add-translation-domain-to-desktop- | ||
14 | 10 | file.dpatch: New dpatch to replace the patch in debian/rules | ||
15 | 11 | * debian/patches/04-fix-gcc4.6-ftbfs.dpatch: | ||
16 | 12 | - Rename to debian/patches/ubuntu-03-fix-gcc4.6-ftbfs.dpatch | ||
17 | 13 | - Refresh header | ||
18 | 14 | |||
19 | 15 | -- Alex Valavanis <valavanisalex@gmail.com> Sun, 08 May 2011 01:11:10 +0100 | ||
20 | 16 | |||
21 | 1 | inkscape (0.48.1-2ubuntu3) oneiric; urgency=low | 17 | inkscape (0.48.1-2ubuntu3) oneiric; urgency=low |
22 | 2 | 18 | ||
23 | 3 | * debian/patches/04-fix-gcc4.6-ftbfs.dpatch: Fix build failure with gcc 4.6 | 19 | * debian/patches/04-fix-gcc4.6-ftbfs.dpatch: Fix build failure with gcc 4.6 |
24 | 4 | 20 | ||
25 | === modified file 'debian/patches/00list' | |||
26 | --- debian/patches/00list 2011-05-01 01:08:10 +0000 | |||
27 | +++ debian/patches/00list 2011-05-08 10:26:27 +0000 | |||
28 | @@ -1,5 +1,6 @@ | |||
29 | 1 | 01-libwpg0.2.dpatch | 1 | 01-libwpg0.2.dpatch |
30 | 2 | 02-add-shebangs-and-fix-permissions | 2 | 02-add-shebangs-and-fix-permissions |
31 | 3 | 03-add-missing-mimetypes | 3 | 03-add-missing-mimetypes |
34 | 4 | 01_add_unity_quicklist_support.patch | 4 | ubuntu-01-add-unity-quicklist-support.dpatch |
35 | 5 | 04-fix-gcc4.6-ftbfs.dpatch | 5 | ubuntu-02-add-translation-domain-to-desktop-file.dpatch |
36 | 6 | ubuntu-03-fix-gcc4.6-ftbfs.dpatch | ||
37 | 6 | 7 | ||
38 | === removed file 'debian/patches/01_add_unity_quicklist_support.patch.dpatch' | |||
39 | --- debian/patches/01_add_unity_quicklist_support.patch.dpatch 2011-03-22 16:27:15 +0000 | |||
40 | +++ debian/patches/01_add_unity_quicklist_support.patch.dpatch 1970-01-01 00:00:00 +0000 | |||
41 | @@ -1,20 +0,0 @@ | |||
42 | 1 | #! /bin/sh /usr/share/dpatch/dpatch-run | ||
43 | 2 | # Description: Add Unity static quicklist support to inkscape | ||
44 | 3 | # Forwarded: https://bugs.launchpad.net/inkscape/+bug/676886 | ||
45 | 4 | # Bug-Ubuntu: https://bugs.launchpad.net/bugs/676886 | ||
46 | 5 | # Author: Didier Roche <didrocks@ubuntu.com> | ||
47 | 6 | |||
48 | 7 | @DPATCH@ | ||
49 | 8 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/inkscape.desktop.in inkscape-0.48.1/inkscape.desktop.in | ||
50 | 9 | --- inkscape-0.48.1~/inkscape.desktop.in 2010-07-13 05:48:40.000000000 +0200 | ||
51 | 10 | +++ inkscape-0.48.1/inkscape.desktop.in 2011-02-17 16:21:42.690388423 +0100 | ||
52 | 11 | @@ -12,3 +12,9 @@ | ||
53 | 12 | Terminal=false | ||
54 | 13 | StartupNotify=true | ||
55 | 14 | Icon=inkscape | ||
56 | 15 | +X-Ayatana-Desktop-Shortcuts=Drawing | ||
57 | 16 | + | ||
58 | 17 | +[Drawing Shortcut Group] | ||
59 | 18 | +_Name=New Drawing | ||
60 | 19 | +Exec=inkscape | ||
61 | 20 | +TargetEnvironment=Unity | ||
62 | 21 | 0 | ||
63 | === removed file 'debian/patches/04-fix-gcc4.6-ftbfs.dpatch' | |||
64 | --- debian/patches/04-fix-gcc4.6-ftbfs.dpatch 2011-05-01 01:08:10 +0000 | |||
65 | +++ debian/patches/04-fix-gcc4.6-ftbfs.dpatch 1970-01-01 00:00:00 +0000 | |||
66 | @@ -1,4301 +0,0 @@ | |||
67 | 1 | #! /bin/sh /usr/share/dpatch/dpatch-run | ||
68 | 2 | ## Description: Fix build failure with gcc 4.6 | ||
69 | 3 | ## Author: theAdib <theadib@gmail.com> | ||
70 | 4 | ## Bug: https://bugs.launchpad.net/inkscape/+bug/765983 | ||
71 | 5 | ## 04-fix-gcc4.6-ftbfs.dpatch by Alex Valavanis <valavanisalex@gmail.com> | ||
72 | 6 | ## | ||
73 | 7 | ## All lines beginning with `## DP:' are a description of the patch. | ||
74 | 8 | ## DP: No description. | ||
75 | 9 | |||
76 | 10 | @DPATCH@ | ||
77 | 11 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/2geom/utils.h inkscape-0.48.1/src/2geom/utils.h | ||
78 | 12 | --- inkscape-0.48.1~/src/2geom/utils.h 2010-07-13 04:48:40.000000000 +0100 | ||
79 | 13 | +++ inkscape-0.48.1/src/2geom/utils.h 2011-05-01 00:56:53.101250888 +0100 | ||
80 | 14 | @@ -33,6 +33,7 @@ | ||
81 | 15 | * | ||
82 | 16 | */ | ||
83 | 17 | |||
84 | 18 | +#include <cstddef> | ||
85 | 19 | #include <cmath> | ||
86 | 20 | #include <vector> | ||
87 | 21 | |||
88 | 22 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/Makefile.am inkscape-0.48.1/src/Makefile.am | ||
89 | 23 | --- inkscape-0.48.1~/src/Makefile.am 2010-07-13 04:48:40.000000000 +0100 | ||
90 | 24 | +++ inkscape-0.48.1/src/Makefile.am 2011-05-01 00:56:19.591250878 +0100 | ||
91 | 25 | @@ -205,7 +205,7 @@ | ||
92 | 26 | |||
93 | 27 | inkscape_SOURCES += main.cpp $(win32_sources) | ||
94 | 28 | inkscape_LDADD = $(all_libs) | ||
95 | 29 | -inkscape_LDFLAGS = --export-dynamic $(kdeldflags) $(mwindows) | ||
96 | 30 | +inkscape_LDFLAGS = -Wl,--export-dynamic $(kdeldflags) $(mwindows) | ||
97 | 31 | |||
98 | 32 | inkview_SOURCES += inkview.cpp $(win32_sources) | ||
99 | 33 | inkview_LDADD = $(all_libs) | ||
100 | 34 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/Makefile.am.orig inkscape-0.48.1/src/Makefile.am.orig | ||
101 | 35 | --- inkscape-0.48.1~/src/Makefile.am.orig 1970-01-01 01:00:00.000000000 +0100 | ||
102 | 36 | +++ inkscape-0.48.1/src/Makefile.am.orig 2010-07-13 04:48:40.000000000 +0100 | ||
103 | 37 | @@ -0,0 +1,277 @@ | ||
104 | 38 | +## Process this file with automake to produce Makefile.in | ||
105 | 39 | + | ||
106 | 40 | +# ################################################ | ||
107 | 41 | +# G L O B A L | ||
108 | 42 | +# ################################################ | ||
109 | 43 | + | ||
110 | 44 | +# Should work in either automake1.7 or 1.8, but 1.6 doesn't | ||
111 | 45 | +# handle foo/libfoo_a_CPPFLAGS properly (if at all). | ||
112 | 46 | +# Update: We now avoid setting foo/libfoo_a_CPPFLAGS, | ||
113 | 47 | +# so perhaps 1.6 will work. | ||
114 | 48 | +AUTOMAKE_OPTIONS = 1.7 subdir-objects | ||
115 | 49 | + | ||
116 | 50 | +# Executables compiled by "make" and installed by "make install" | ||
117 | 51 | +bin_PROGRAMS = inkscape inkview | ||
118 | 52 | + | ||
119 | 53 | +# Libraries which should be compiled by "make" but not installed. | ||
120 | 54 | +# Use this only for libraries that are really standalone, rather than for | ||
121 | 55 | +# source tree subdirectories. | ||
122 | 56 | +#if WITH_INKBOARD | ||
123 | 57 | +#libpedro = pedro/libpedro.a | ||
124 | 58 | +#endif | ||
125 | 59 | +noinst_LIBRARIES = \ | ||
126 | 60 | + libinkscape.a \ | ||
127 | 61 | + dom/libdom.a \ | ||
128 | 62 | + libcroco/libcroco.a \ | ||
129 | 63 | + libavoid/libavoid.a \ | ||
130 | 64 | + libgdl/libgdl.a \ | ||
131 | 65 | + libcola/libcola.a \ | ||
132 | 66 | + libvpsc/libvpsc.a \ | ||
133 | 67 | + livarot/libvarot.a \ | ||
134 | 68 | + 2geom/lib2geom.a \ | ||
135 | 69 | + $(libpedro) \ | ||
136 | 70 | + libinkversion.a | ||
137 | 71 | + | ||
138 | 72 | +all_libs = \ | ||
139 | 73 | + $(noinst_LIBRARIES) \ | ||
140 | 74 | + $(INKSCAPE_LIBS) \ | ||
141 | 75 | + $(GNOME_VFS_LIBS) \ | ||
142 | 76 | + $(XFT_LIBS) \ | ||
143 | 77 | + $(FREETYPE_LIBS) \ | ||
144 | 78 | + $(kdeldadd) \ | ||
145 | 79 | + $(win32ldflags) \ | ||
146 | 80 | + $(CARBON_LDFLAGS) \ | ||
147 | 81 | + $(PERL_LIBS) \ | ||
148 | 82 | + $(PYTHON_LIBS) \ | ||
149 | 83 | + $(INKBOARD_LIBS) \ | ||
150 | 84 | + $(LIBWPG_LIBS) \ | ||
151 | 85 | + $(IMAGEMAGICK_LIBS) | ||
152 | 86 | + | ||
153 | 87 | +# Add sources common for Inkscape and Inkview to this variable. | ||
154 | 88 | +ink_common_sources = | ||
155 | 89 | +# Add Inkscape-only sources here. | ||
156 | 90 | +inkscape_SOURCES = | ||
157 | 91 | +# Add Inkview-only sources here. | ||
158 | 92 | +inkview_SOURCES = | ||
159 | 93 | + | ||
160 | 94 | +INCLUDES = \ | ||
161 | 95 | + $(PERL_CFLAGS) $(PYTHON_CFLAGS) \ | ||
162 | 96 | + $(FREETYPE_CFLAGS) \ | ||
163 | 97 | + $(GNOME_PRINT_CFLAGS) \ | ||
164 | 98 | + $(GNOME_VFS_CFLAGS) \ | ||
165 | 99 | + $(IMAGEMAGICK_CFLAGS) \ | ||
166 | 100 | + $(INKBOARD_CFLAGS) \ | ||
167 | 101 | + $(LIBWPG_CFLAGS) \ | ||
168 | 102 | + $(XFT_CFLAGS) \ | ||
169 | 103 | + $(LCMS_CFLAGS) \ | ||
170 | 104 | + $(POPPLER_CFLAGS) \ | ||
171 | 105 | + $(POPPLER_GLIB_CFLAGS) \ | ||
172 | 106 | + -DPOTRACE=\"potrace\" \ | ||
173 | 107 | + $(INKSCAPE_CFLAGS) \ | ||
174 | 108 | + -I$(top_srcdir)/cxxtest \ | ||
175 | 109 | + $(WIN32_CFLAGS) \ | ||
176 | 110 | + -I$(srcdir)/bind/javainc \ | ||
177 | 111 | + -I$(srcdir)/bind/javainc/linux \ | ||
178 | 112 | + $(AM_CPPFLAGS) | ||
179 | 113 | + | ||
180 | 114 | +CXXTEST_TEMPLATE = $(srcdir)/cxxtest-template.tpl | ||
181 | 115 | +CXXTESTGENFLAGS = --root --have-eh --template=$(CXXTEST_TEMPLATE) | ||
182 | 116 | +CXXTESTGEN = $(top_srcdir)/cxxtest/cxxtestgen.pl $(CXXTESTGENFLAGS) | ||
183 | 117 | +# Add test cases to this variable | ||
184 | 118 | +CXXTEST_TESTSUITES = | ||
185 | 119 | + | ||
186 | 120 | +# ################################################ | ||
187 | 121 | +# | ||
188 | 122 | +# E X T R A | ||
189 | 123 | +# | ||
190 | 124 | +# ################################################ | ||
191 | 125 | + | ||
192 | 126 | +if PLATFORM_WIN32 | ||
193 | 127 | +win32_sources = winmain.cpp registrytool.cpp registrytool.h | ||
194 | 128 | +win32ldflags = -lcomdlg32 -lmscms | ||
195 | 129 | +mwindows = -mwindows | ||
196 | 130 | +endif | ||
197 | 131 | + | ||
198 | 132 | +if INKJAR | ||
199 | 133 | +inkjar_dir = inkjar | ||
200 | 134 | +inkjar_libs = inkjar/libinkjar.a | ||
201 | 135 | +endif | ||
202 | 136 | + | ||
203 | 137 | +# Include all partial makefiles from subdirectories | ||
204 | 138 | +include Makefile_insert | ||
205 | 139 | +include application/Makefile_insert | ||
206 | 140 | +include bind/Makefile_insert | ||
207 | 141 | +include dialogs/Makefile_insert | ||
208 | 142 | +include display/Makefile_insert | ||
209 | 143 | +include dom/Makefile_insert | ||
210 | 144 | +include extension/Makefile_insert | ||
211 | 145 | +include extension/implementation/Makefile_insert | ||
212 | 146 | +include extension/internal/Makefile_insert | ||
213 | 147 | +include extension/script/Makefile_insert | ||
214 | 148 | +include filters/Makefile_insert | ||
215 | 149 | +include helper/Makefile_insert | ||
216 | 150 | +include io/Makefile_insert | ||
217 | 151 | +#include pedro/Makefile_insert | ||
218 | 152 | +#include jabber_whiteboard/Makefile_insert | ||
219 | 153 | +include libcroco/Makefile_insert | ||
220 | 154 | +include libgdl/Makefile_insert | ||
221 | 155 | +include libnr/Makefile_insert | ||
222 | 156 | +include libnrtype/Makefile_insert | ||
223 | 157 | +include libavoid/Makefile_insert | ||
224 | 158 | +include livarot/Makefile_insert | ||
225 | 159 | +include live_effects/Makefile_insert | ||
226 | 160 | +include live_effects/parameter/Makefile_insert | ||
227 | 161 | +include libvpsc/Makefile_insert | ||
228 | 162 | +include libcola/Makefile_insert | ||
229 | 163 | +include svg/Makefile_insert | ||
230 | 164 | +include widgets/Makefile_insert | ||
231 | 165 | +include debug/Makefile_insert | ||
232 | 166 | +include xml/Makefile_insert | ||
233 | 167 | +include ui/Makefile_insert | ||
234 | 168 | +include ui/cache/Makefile_insert | ||
235 | 169 | +include ui/dialog/Makefile_insert | ||
236 | 170 | +include ui/tool/Makefile_insert | ||
237 | 171 | +include ui/view/Makefile_insert | ||
238 | 172 | +include ui/widget/Makefile_insert | ||
239 | 173 | +include util/Makefile_insert | ||
240 | 174 | +include trace/Makefile_insert | ||
241 | 175 | +include 2geom/Makefile_insert | ||
242 | 176 | + | ||
243 | 177 | +# Extra files not mentioned as sources to include in the source tarball | ||
244 | 178 | +EXTRA_DIST = \ | ||
245 | 179 | + $(top_srcdir)/Doxyfile \ | ||
246 | 180 | + sp-skeleton.cpp sp-skeleton.h \ | ||
247 | 181 | + util/makefile.in \ | ||
248 | 182 | + application/makefile.in \ | ||
249 | 183 | + bind/makefile.in \ | ||
250 | 184 | + debug/makefile.in \ | ||
251 | 185 | + dialogs/makefile.in \ | ||
252 | 186 | + display/makefile.in \ | ||
253 | 187 | + dom/makefile.in \ | ||
254 | 188 | + extension/implementation/makefile.in \ | ||
255 | 189 | + extension/internal/makefile.in \ | ||
256 | 190 | + extension/makefile.in \ | ||
257 | 191 | + extension/script/makefile.in \ | ||
258 | 192 | + filters/makefile.in \ | ||
259 | 193 | + helper/makefile.in \ | ||
260 | 194 | + io/makefile.in \ | ||
261 | 195 | + io/crystalegg.xml \ | ||
262 | 196 | + io/doc2html.xsl \ | ||
263 | 197 | + pedro/makefile.in \ | ||
264 | 198 | + jabber_whiteboard/makefile.in \ | ||
265 | 199 | + libgdl/makefile.in \ | ||
266 | 200 | + libcroco/makefile.in \ | ||
267 | 201 | + libnr/makefile.in \ | ||
268 | 202 | + libnrtype/makefile.in \ | ||
269 | 203 | + libavoid/makefile.in \ | ||
270 | 204 | + livarot/makefile.in \ | ||
271 | 205 | + live_effects/makefile.in \ | ||
272 | 206 | + live_effects/parameter/makefile.in \ | ||
273 | 207 | + svg/makefile.in \ | ||
274 | 208 | + trace/makefile.in \ | ||
275 | 209 | + ui/makefile.in \ | ||
276 | 210 | + ui/cache/makefile.in \ | ||
277 | 211 | + ui/dialog/makefile.in \ | ||
278 | 212 | + ui/view/makefile.in \ | ||
279 | 213 | + ui/widget/makefile.in \ | ||
280 | 214 | + util/makefile.in \ | ||
281 | 215 | + widgets/makefile.in \ | ||
282 | 216 | + xml/makefile.in \ | ||
283 | 217 | + 2geom/makefile.in \ | ||
284 | 218 | + extension/internal/win32.cpp \ | ||
285 | 219 | + extension/internal/win32.h \ | ||
286 | 220 | + extension/internal/emf-win32-inout.cpp \ | ||
287 | 221 | + extension/internal/emf-win32-inout.h \ | ||
288 | 222 | + extension/internal/emf-win32-print.cpp \ | ||
289 | 223 | + extension/internal/emf-win32-print.h \ | ||
290 | 224 | + helper/sp-marshal.list \ | ||
291 | 225 | + show-preview.bmp \ | ||
292 | 226 | + winconsole.cpp \ | ||
293 | 227 | + $(jabber_whiteboard_SOURCES) \ | ||
294 | 228 | + $(CXXTEST_TEMPLATE) | ||
295 | 229 | + | ||
296 | 230 | +# Extra files to remove when doing "make distclean" | ||
297 | 231 | +DISTCLEANFILES = \ | ||
298 | 232 | + helper/sp-marshal.cpp \ | ||
299 | 233 | + helper/sp-marshal.h \ | ||
300 | 234 | + inkscape-version.cpp | ||
301 | 235 | + | ||
302 | 236 | +# ################################################ | ||
303 | 237 | +# B I N A R I E S | ||
304 | 238 | +# ################################################ | ||
305 | 239 | + | ||
306 | 240 | +# this should speed up the build | ||
307 | 241 | +libinkscape_a_SOURCES = $(ink_common_sources) | ||
308 | 242 | + | ||
309 | 243 | +inkscape_SOURCES += main.cpp $(win32_sources) | ||
310 | 244 | +inkscape_LDADD = $(all_libs) | ||
311 | 245 | +inkscape_LDFLAGS = --export-dynamic $(kdeldflags) $(mwindows) | ||
312 | 246 | + | ||
313 | 247 | +inkview_SOURCES += inkview.cpp $(win32_sources) | ||
314 | 248 | +inkview_LDADD = $(all_libs) | ||
315 | 249 | +inkview_LDFLAGS = $(mwindows) | ||
316 | 250 | + | ||
317 | 251 | +# ################################################ | ||
318 | 252 | +# VERSION REPORTING | ||
319 | 253 | +# ################################################ | ||
320 | 254 | + | ||
321 | 255 | +libinkversion_a_SOURCES = inkscape-version.cpp inkscape-version.h | ||
322 | 256 | + | ||
323 | 257 | +if USE_BZR_VERSION | ||
324 | 258 | +inkscape_version_deps = $(top_srcdir)/.bzr/branch/last-revision | ||
325 | 259 | +endif | ||
326 | 260 | + | ||
327 | 261 | +# If this is an BZR snapshot build, regenerate this file every time | ||
328 | 262 | +# someone updates the BZR working directory. | ||
329 | 263 | +inkscape-version.cpp: $(inkscape_version_deps) | ||
330 | 264 | + VER_PREFIX="$(VERSION)";\ | ||
331 | 265 | + VER_BZRREV=" r`bzr revno`"; \ | ||
332 | 266 | + if test ! -z "`bzr status -S -V $(srcdir)`"; then \ | ||
333 | 267 | + VER_CUSTOM=" custom"; \ | ||
334 | 268 | + fi; \ | ||
335 | 269 | + VERSION="$$VER_PREFIX$$VER_BZRREV$$VER_CUSTOM"; \ | ||
336 | 270 | + echo "namespace Inkscape { " \ | ||
337 | 271 | + "char const *version_string = \"$$VERSION\"; " \ | ||
338 | 272 | + "}" > inkscape-version.new.cpp; \ | ||
339 | 273 | + if cmp -s inkscape-version.new.cpp inkscape-version.cpp; then \ | ||
340 | 274 | + rm inkscape-version.new.cpp; \ | ||
341 | 275 | + else \ | ||
342 | 276 | + mv inkscape-version.new.cpp inkscape-version.cpp; \ | ||
343 | 277 | + fi; \ | ||
344 | 278 | + echo $$VERSION | ||
345 | 279 | + | ||
346 | 280 | +# ################################# | ||
347 | 281 | +# ## TESTING STUFF (make check) ### | ||
348 | 282 | +# ################################# | ||
349 | 283 | + | ||
350 | 284 | +# List of all programs that should be built before testing. Note that this is | ||
351 | 285 | +# different from TESTS, because some tests can be scripts that don't | ||
352 | 286 | +# need to be built. There should be one test program per directory. | ||
353 | 287 | +# automake adds $(EXEEXT) to check_PROGRAMS items but not to TESTS items: | ||
354 | 288 | +# TESTS items can be scripts etc. | ||
355 | 289 | +check_PROGRAMS = cxxtests | ||
356 | 290 | + | ||
357 | 291 | +# streamtest is unfinished and can't handle the relocations done during | ||
358 | 292 | +# "make distcheck". | ||
359 | 293 | + | ||
360 | 294 | +# List of all tests to be run. | ||
361 | 295 | +TESTS = $(check_PROGRAMS) ../share/extensions/test/run-all-extension-tests | ||
362 | 296 | +XFAIL_TESTS = $(check_PROGRAMS) ../share/extensions/test/run-all-extension-tests | ||
363 | 297 | + | ||
364 | 298 | +# including the the testsuites here ensures that they get distributed | ||
365 | 299 | +cxxtests_SOURCES = cxxtests.cpp libnr/nr-compose-reference.cpp $(CXXTEST_TESTSUITES) | ||
366 | 300 | +cxxtests_LDADD = $(all_libs) | ||
367 | 301 | + | ||
368 | 302 | +cxxtests.cpp: $(CXXTEST_TESTSUITES) $(CXXTEST_TEMPLATE) | ||
369 | 303 | + $(CXXTESTGEN) -o cxxtests.cpp $(CXXTEST_TESTSUITES) | ||
370 | 304 | + | ||
371 | 305 | +# ################################################ | ||
372 | 306 | +# D I S T | ||
373 | 307 | +# ################################################ | ||
374 | 308 | + | ||
375 | 309 | +dist-hook: | ||
376 | 310 | + mkdir $(distdir)/pixmaps | ||
377 | 311 | + cp $(srcdir)/pixmaps/*xpm $(distdir)/pixmaps | ||
378 | 312 | + | ||
379 | 313 | +distclean-local: | ||
380 | 314 | + rm -f cxxtests.xml cxxtests.log | ||
381 | 315 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/arc-context.h inkscape-0.48.1/src/arc-context.h | ||
382 | 316 | --- inkscape-0.48.1~/src/arc-context.h 2010-07-13 04:48:40.000000000 +0100 | ||
383 | 317 | +++ inkscape-0.48.1/src/arc-context.h 2011-05-01 00:56:19.591250878 +0100 | ||
384 | 318 | @@ -15,6 +15,7 @@ | ||
385 | 319 | * Released under GNU GPL, read the file 'COPYING' for more information | ||
386 | 320 | */ | ||
387 | 321 | |||
388 | 322 | +#include <stddef.h> | ||
389 | 323 | #include <sigc++/connection.h> | ||
390 | 324 | |||
391 | 325 | #include <2geom/point.h> | ||
392 | 326 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/box3d-context.h inkscape-0.48.1/src/box3d-context.h | ||
393 | 327 | --- inkscape-0.48.1~/src/box3d-context.h 2010-07-13 04:48:40.000000000 +0100 | ||
394 | 328 | +++ inkscape-0.48.1/src/box3d-context.h 2011-05-01 00:56:19.591250878 +0100 | ||
395 | 329 | @@ -15,6 +15,7 @@ | ||
396 | 330 | * Released under GNU GPL | ||
397 | 331 | */ | ||
398 | 332 | |||
399 | 333 | +#include <stddef.h> | ||
400 | 334 | #include <sigc++/sigc++.h> | ||
401 | 335 | #include "event-context.h" | ||
402 | 336 | #include "proj_pt.h" | ||
403 | 337 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/conn-avoid-ref.h inkscape-0.48.1/src/conn-avoid-ref.h | ||
404 | 338 | --- inkscape-0.48.1~/src/conn-avoid-ref.h 2010-07-13 04:48:40.000000000 +0100 | ||
405 | 339 | +++ inkscape-0.48.1/src/conn-avoid-ref.h 2011-05-01 00:56:19.591250878 +0100 | ||
406 | 340 | @@ -14,6 +14,7 @@ | ||
407 | 341 | */ | ||
408 | 342 | |||
409 | 343 | #include <glib/gslist.h> | ||
410 | 344 | +#include <stddef.h> | ||
411 | 345 | #include <sigc++/connection.h> | ||
412 | 346 | |||
413 | 347 | struct SPDesktop; | ||
414 | 348 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/connection-pool.h inkscape-0.48.1/src/connection-pool.h | ||
415 | 349 | --- inkscape-0.48.1~/src/connection-pool.h 2010-07-13 04:48:40.000000000 +0100 | ||
416 | 350 | +++ inkscape-0.48.1/src/connection-pool.h 2011-05-01 00:56:19.591250878 +0100 | ||
417 | 351 | @@ -3,6 +3,7 @@ | ||
418 | 352 | |||
419 | 353 | #include <glib-object.h> | ||
420 | 354 | #include <gtkmm.h> | ||
421 | 355 | +#include <stddef.h> | ||
422 | 356 | #include <sigc++/sigc++.h> | ||
423 | 357 | |||
424 | 358 | namespace Inkscape | ||
425 | 359 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/connector-context.h inkscape-0.48.1/src/connector-context.h | ||
426 | 360 | --- inkscape-0.48.1~/src/connector-context.h 2010-07-13 04:48:40.000000000 +0100 | ||
427 | 361 | +++ inkscape-0.48.1/src/connector-context.h 2011-05-01 00:56:19.591250878 +0100 | ||
428 | 362 | @@ -12,6 +12,7 @@ | ||
429 | 363 | * Released under GNU GPL, read the file 'COPYING' for more information | ||
430 | 364 | */ | ||
431 | 365 | |||
432 | 366 | +#include <stddef.h> | ||
433 | 367 | #include <sigc++/sigc++.h> | ||
434 | 368 | #include <sigc++/connection.h> | ||
435 | 369 | #include "event-context.h" | ||
436 | 370 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/desktop.h inkscape-0.48.1/src/desktop.h | ||
437 | 371 | --- inkscape-0.48.1~/src/desktop.h 2010-07-13 04:48:40.000000000 +0100 | ||
438 | 372 | +++ inkscape-0.48.1/src/desktop.h 2011-05-01 00:56:19.591250878 +0100 | ||
439 | 373 | @@ -27,6 +27,7 @@ | ||
440 | 374 | |||
441 | 375 | #include <gdk/gdkevents.h> | ||
442 | 376 | #include <gtk/gtktypeutils.h> | ||
443 | 377 | +#include <stddef.h> | ||
444 | 378 | #include <sigc++/sigc++.h> | ||
445 | 379 | |||
446 | 380 | #include <2geom/matrix.h> | ||
447 | 381 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/desktop.h.orig inkscape-0.48.1/src/desktop.h.orig | ||
448 | 382 | --- inkscape-0.48.1~/src/desktop.h.orig 1970-01-01 01:00:00.000000000 +0100 | ||
449 | 383 | +++ inkscape-0.48.1/src/desktop.h.orig 2010-07-13 04:48:40.000000000 +0100 | ||
450 | 384 | @@ -0,0 +1,379 @@ | ||
451 | 385 | +#ifndef SEEN_SP_DESKTOP_H | ||
452 | 386 | +#define SEEN_SP_DESKTOP_H | ||
453 | 387 | + | ||
454 | 388 | +/** \file | ||
455 | 389 | + * SPDesktop: an editable view. | ||
456 | 390 | + * | ||
457 | 391 | + * Author: | ||
458 | 392 | + * Lauris Kaplinski <lauris@kaplinski.com> | ||
459 | 393 | + * Frank Felfe <innerspace@iname.com> | ||
460 | 394 | + * bulia byak <buliabyak@users.sf.net> | ||
461 | 395 | + * Ralf Stephan <ralf@ark.in-berlin.de> | ||
462 | 396 | + * John Bintz <jcoswell@coswellproductions.org> | ||
463 | 397 | + * Johan Engelen <j.b.c.engelen@ewi.utwente.nl> | ||
464 | 398 | + * | ||
465 | 399 | + * Copyright (C) 2007 Johan Engelen | ||
466 | 400 | + * Copyright (C) 2006 John Bintz | ||
467 | 401 | + * Copyright (C) 1999-2005 authors | ||
468 | 402 | + * Copyright (C) 2000-2001 Ximian, Inc. | ||
469 | 403 | + * | ||
470 | 404 | + * Released under GNU GPL, read the file 'COPYING' for more information | ||
471 | 405 | + * | ||
472 | 406 | + */ | ||
473 | 407 | + | ||
474 | 408 | +#ifdef HAVE_CONFIG_H | ||
475 | 409 | +#include "config.h" | ||
476 | 410 | +#endif | ||
477 | 411 | + | ||
478 | 412 | +#include <gdk/gdkevents.h> | ||
479 | 413 | +#include <gtk/gtktypeutils.h> | ||
480 | 414 | +#include <sigc++/sigc++.h> | ||
481 | 415 | + | ||
482 | 416 | +#include <2geom/matrix.h> | ||
483 | 417 | +#include <2geom/rect.h> | ||
484 | 418 | + | ||
485 | 419 | +#include "ui/view/view.h" | ||
486 | 420 | +#include "ui/view/edit-widget-interface.h" | ||
487 | 421 | + | ||
488 | 422 | +#include "display/rendermode.h" | ||
489 | 423 | +#include "display/snap-indicator.h" | ||
490 | 424 | + | ||
491 | 425 | +class SPCSSAttr; | ||
492 | 426 | +struct SPCanvas; | ||
493 | 427 | +struct SPCanvasItem; | ||
494 | 428 | +struct SPCanvasGroup; | ||
495 | 429 | +struct SPEventContext; | ||
496 | 430 | +struct SPItem; | ||
497 | 431 | +struct SPNamedView; | ||
498 | 432 | +struct SPObject; | ||
499 | 433 | +struct SPStyle; | ||
500 | 434 | + | ||
501 | 435 | +namespace Gtk | ||
502 | 436 | +{ | ||
503 | 437 | + class Window; | ||
504 | 438 | +} | ||
505 | 439 | + | ||
506 | 440 | +typedef int sp_verb_t; | ||
507 | 441 | + | ||
508 | 442 | + | ||
509 | 443 | + | ||
510 | 444 | +namespace Inkscape { | ||
511 | 445 | + class Application; | ||
512 | 446 | + class MessageContext; | ||
513 | 447 | + class Selection; | ||
514 | 448 | + class ObjectHierarchy; | ||
515 | 449 | + class LayerManager; | ||
516 | 450 | + class EventLog; | ||
517 | 451 | + namespace UI { | ||
518 | 452 | + namespace Dialog { | ||
519 | 453 | + class DialogManager; | ||
520 | 454 | + } | ||
521 | 455 | + } | ||
522 | 456 | + namespace Whiteboard { | ||
523 | 457 | + class SessionManager; | ||
524 | 458 | + } | ||
525 | 459 | + namespace Display { | ||
526 | 460 | + class TemporaryItemList; | ||
527 | 461 | + class TemporaryItem; | ||
528 | 462 | + //class SnapIndicator; | ||
529 | 463 | + } | ||
530 | 464 | +} | ||
531 | 465 | + | ||
532 | 466 | +/** | ||
533 | 467 | + * Editable view. | ||
534 | 468 | + * | ||
535 | 469 | + * @see \ref desktop-handles.h for desktop macros. | ||
536 | 470 | + */ | ||
537 | 471 | +struct SPDesktop : public Inkscape::UI::View::View | ||
538 | 472 | +{ | ||
539 | 473 | + Inkscape::UI::Dialog::DialogManager *_dlg_mgr; | ||
540 | 474 | + SPNamedView *namedview; | ||
541 | 475 | + SPCanvas *canvas; | ||
542 | 476 | + /// current selection; will never generally be NULL | ||
543 | 477 | + Inkscape::Selection *selection; | ||
544 | 478 | + SPEventContext *event_context; | ||
545 | 479 | + Inkscape::LayerManager *layer_manager; | ||
546 | 480 | + Inkscape::EventLog *event_log; | ||
547 | 481 | + | ||
548 | 482 | + Inkscape::Display::TemporaryItemList *temporary_item_list; | ||
549 | 483 | + Inkscape::Display::SnapIndicator *snapindicator; | ||
550 | 484 | + | ||
551 | 485 | + SPCanvasItem *acetate; | ||
552 | 486 | + SPCanvasGroup *main; | ||
553 | 487 | + SPCanvasGroup *gridgroup; | ||
554 | 488 | + SPCanvasGroup *guides; | ||
555 | 489 | + SPCanvasItem *drawing; | ||
556 | 490 | + SPCanvasGroup *sketch; | ||
557 | 491 | + SPCanvasGroup *controls; | ||
558 | 492 | + SPCanvasGroup *tempgroup; ///< contains temporary canvas items | ||
559 | 493 | + SPCanvasItem *table; ///< outside-of-page background | ||
560 | 494 | + SPCanvasItem *page; ///< page background | ||
561 | 495 | + SPCanvasItem *page_border; ///< page border | ||
562 | 496 | + SPCSSAttr *current; ///< current style | ||
563 | 497 | + bool _focusMode; ///< Whether we're focused working or general working | ||
564 | 498 | + | ||
565 | 499 | + GList *zooms_past; | ||
566 | 500 | + GList *zooms_future; | ||
567 | 501 | + bool _quick_zoom_enabled; ///< Signifies that currently we're in quick zoom mode | ||
568 | 502 | + Geom::Rect _quick_zoom_stored_area; ///< The area of the screen before quick zoom | ||
569 | 503 | + unsigned int dkey; | ||
570 | 504 | + unsigned int number; | ||
571 | 505 | + guint window_state; | ||
572 | 506 | + unsigned int interaction_disabled_counter; | ||
573 | 507 | + bool waiting_cursor; | ||
574 | 508 | + | ||
575 | 509 | + /// \todo fixme: This has to be implemented in different way */ | ||
576 | 510 | + guint guides_active : 1; | ||
577 | 511 | + | ||
578 | 512 | + // storage for selected dragger used by GrDrag as it's | ||
579 | 513 | + // created and deleted by tools | ||
580 | 514 | + SPItem *gr_item; | ||
581 | 515 | + guint gr_point_type; | ||
582 | 516 | + guint gr_point_i; | ||
583 | 517 | + bool gr_fill_or_stroke; | ||
584 | 518 | + | ||
585 | 519 | + | ||
586 | 520 | + Inkscape::ObjectHierarchy *_layer_hierarchy; | ||
587 | 521 | + gchar * _reconstruction_old_layer_id; | ||
588 | 522 | + | ||
589 | 523 | + sigc::signal<void, sp_verb_t> _tool_changed; | ||
590 | 524 | + sigc::signal<void, SPObject *> _layer_changed_signal; | ||
591 | 525 | + sigc::signal<bool, const SPCSSAttr *>::accumulated<StopOnTrue> _set_style_signal; | ||
592 | 526 | + sigc::signal<int, SPStyle *, int>::accumulated<StopOnNonZero> _query_style_signal; | ||
593 | 527 | + | ||
594 | 528 | + /// Emitted when the zoom factor changes (not emitted when scrolling). | ||
595 | 529 | + /// The parameter is the new zoom factor | ||
596 | 530 | + sigc::signal<void, double> signal_zoom_changed; | ||
597 | 531 | + | ||
598 | 532 | + sigc::connection connectDocumentReplaced (const sigc::slot<void,SPDesktop*,SPDocument*> & slot) | ||
599 | 533 | + { | ||
600 | 534 | + return _document_replaced_signal.connect (slot); | ||
601 | 535 | + } | ||
602 | 536 | + | ||
603 | 537 | + sigc::connection connectEventContextChanged (const sigc::slot<void,SPDesktop*,SPEventContext*> & slot) | ||
604 | 538 | + { | ||
605 | 539 | + return _event_context_changed_signal.connect (slot); | ||
606 | 540 | + } | ||
607 | 541 | + sigc::connection connectSetStyle (const sigc::slot<bool, const SPCSSAttr *> & slot) | ||
608 | 542 | + { | ||
609 | 543 | + return _set_style_signal.connect (slot); | ||
610 | 544 | + } | ||
611 | 545 | + sigc::connection connectQueryStyle (const sigc::slot<int, SPStyle *, int> & slot) | ||
612 | 546 | + { | ||
613 | 547 | + return _query_style_signal.connect (slot); | ||
614 | 548 | + } | ||
615 | 549 | + // subselection is some sort of selection which is specific to the tool, such as a handle in gradient tool, or a text selection | ||
616 | 550 | + sigc::connection connectToolSubselectionChanged(const sigc::slot<void, gpointer> & slot) { | ||
617 | 551 | + return _tool_subselection_changed.connect(slot); | ||
618 | 552 | + } | ||
619 | 553 | + void emitToolSubselectionChanged(gpointer data); | ||
620 | 554 | + sigc::connection connectCurrentLayerChanged(const sigc::slot<void, SPObject *> & slot) { | ||
621 | 555 | + return _layer_changed_signal.connect(slot); | ||
622 | 556 | + } | ||
623 | 557 | + | ||
624 | 558 | + // Whiteboard changes | ||
625 | 559 | + | ||
626 | 560 | +#ifdef WITH_INKBOARD | ||
627 | 561 | + Inkscape::Whiteboard::SessionManager* whiteboard_session_manager() { | ||
628 | 562 | + return _whiteboard_session_manager; | ||
629 | 563 | + } | ||
630 | 564 | + | ||
631 | 565 | + Inkscape::Whiteboard::SessionManager* _whiteboard_session_manager; | ||
632 | 566 | +#endif | ||
633 | 567 | + | ||
634 | 568 | + SPDesktop(); | ||
635 | 569 | + void init (SPNamedView* nv, SPCanvas* canvas, Inkscape::UI::View::EditWidgetInterface *widget); | ||
636 | 570 | + virtual ~SPDesktop(); | ||
637 | 571 | + void destroy(); | ||
638 | 572 | + | ||
639 | 573 | + Inkscape::MessageContext *guidesMessageContext() const { | ||
640 | 574 | + return _guides_message_context; | ||
641 | 575 | + } | ||
642 | 576 | + | ||
643 | 577 | + Inkscape::Display::TemporaryItem * add_temporary_canvasitem (SPCanvasItem *item, guint lifetime, bool move_to_bottom = true); | ||
644 | 578 | + void remove_temporary_canvasitem (Inkscape::Display::TemporaryItem * tempitem); | ||
645 | 579 | + | ||
646 | 580 | + void _setDisplayMode(Inkscape::RenderMode mode); | ||
647 | 581 | + void setDisplayModeNormal() { | ||
648 | 582 | + _setDisplayMode(Inkscape::RENDERMODE_NORMAL); | ||
649 | 583 | + } | ||
650 | 584 | + void setDisplayModeNoFilters() { | ||
651 | 585 | + _setDisplayMode(Inkscape::RENDERMODE_NO_FILTERS); | ||
652 | 586 | + } | ||
653 | 587 | + void setDisplayModeOutline() { | ||
654 | 588 | + _setDisplayMode(Inkscape::RENDERMODE_OUTLINE); | ||
655 | 589 | + } | ||
656 | 590 | +// void setDisplayModePrintColorsPreview() { | ||
657 | 591 | +// _setDisplayMode(Inkscape::RENDERMODE_PRINT_COLORS_PREVIEW); | ||
658 | 592 | +// } | ||
659 | 593 | + void displayModeToggle(); | ||
660 | 594 | + Inkscape::RenderMode _display_mode; | ||
661 | 595 | + Inkscape::RenderMode getMode() const { return _display_mode; } | ||
662 | 596 | + | ||
663 | 597 | + Inkscape::UI::Widget::Dock* getDock() { return _widget->getDock(); } | ||
664 | 598 | + | ||
665 | 599 | + void set_active (bool new_active); | ||
666 | 600 | + SPObject *currentRoot() const; | ||
667 | 601 | + SPObject *currentLayer() const; | ||
668 | 602 | + void setCurrentLayer(SPObject *object); | ||
669 | 603 | + void toggleLayerSolo(SPObject *object); | ||
670 | 604 | + SPObject *layerForObject(SPObject *object); | ||
671 | 605 | + bool isLayer(SPObject *object) const; | ||
672 | 606 | + bool isWithinViewport(SPItem *item) const; | ||
673 | 607 | + bool itemIsHidden(SPItem const *item) const; | ||
674 | 608 | + | ||
675 | 609 | + void activate_guides (bool activate); | ||
676 | 610 | + void change_document (SPDocument *document); | ||
677 | 611 | + | ||
678 | 612 | + void set_event_context (GtkType type, const gchar *config); | ||
679 | 613 | + void push_event_context (GtkType type, const gchar *config, unsigned int key); | ||
680 | 614 | + | ||
681 | 615 | + void set_coordinate_status (Geom::Point p); | ||
682 | 616 | + SPItem *item_from_list_at_point_bottom (const GSList *list, Geom::Point const p) const; | ||
683 | 617 | + SPItem *item_at_point (Geom::Point const p, bool into_groups, SPItem *upto = NULL) const; | ||
684 | 618 | + SPItem *group_at_point (Geom::Point const p) const; | ||
685 | 619 | + Geom::Point point() const; | ||
686 | 620 | + | ||
687 | 621 | + Geom::Rect get_display_area() const; | ||
688 | 622 | + void set_display_area (double x0, double y0, double x1, double y1, double border, bool log = true); | ||
689 | 623 | + void set_display_area(Geom::Rect const &a, Geom::Coord border, bool log = true); | ||
690 | 624 | + void zoom_absolute (double cx, double cy, double zoom); | ||
691 | 625 | + void zoom_relative (double cx, double cy, double zoom); | ||
692 | 626 | + void zoom_absolute_keep_point (double cx, double cy, double px, double py, double zoom); | ||
693 | 627 | + void zoom_relative_keep_point (double cx, double cy, double zoom); | ||
694 | 628 | + void zoom_relative_keep_point (Geom::Point const &c, double const zoom) | ||
695 | 629 | + { | ||
696 | 630 | + zoom_relative_keep_point (c[Geom::X], c[Geom::Y], zoom); | ||
697 | 631 | + } | ||
698 | 632 | + | ||
699 | 633 | + void zoom_page(); | ||
700 | 634 | + void zoom_page_width(); | ||
701 | 635 | + void zoom_drawing(); | ||
702 | 636 | + void zoom_selection(); | ||
703 | 637 | + void zoom_grab_focus(); | ||
704 | 638 | + double current_zoom() const { return _d2w.descrim(); } | ||
705 | 639 | + void prev_zoom(); | ||
706 | 640 | + void next_zoom(); | ||
707 | 641 | + void zoom_quick(bool enable = true); | ||
708 | 642 | + /** \brief Returns whether the desktop is in quick zoom mode or not */ | ||
709 | 643 | + bool quick_zoomed(void) { return _quick_zoom_enabled; } | ||
710 | 644 | + | ||
711 | 645 | + bool scroll_to_point (Geom::Point const &s_dt, gdouble autoscrollspeed = 0); | ||
712 | 646 | + void scroll_world (double dx, double dy, bool is_scrolling = false); | ||
713 | 647 | + void scroll_world (Geom::Point const scroll, bool is_scrolling = false) | ||
714 | 648 | + { | ||
715 | 649 | + scroll_world(scroll[Geom::X], scroll[Geom::Y], is_scrolling); | ||
716 | 650 | + } | ||
717 | 651 | + void scroll_world_in_svg_coords (double dx, double dy, bool is_scrolling = false); | ||
718 | 652 | + | ||
719 | 653 | + void getWindowGeometry (gint &x, gint &y, gint &w, gint &h); | ||
720 | 654 | + void setWindowPosition (Geom::Point p); | ||
721 | 655 | + void setWindowSize (gint w, gint h); | ||
722 | 656 | + void setWindowTransient (void* p, int transient_policy=1); | ||
723 | 657 | + Gtk::Window* getToplevel(); | ||
724 | 658 | + void presentWindow(); | ||
725 | 659 | + bool warnDialog (gchar *text); | ||
726 | 660 | + void toggleRulers(); | ||
727 | 661 | + void toggleScrollbars(); | ||
728 | 662 | + void layoutWidget(); | ||
729 | 663 | + void destroyWidget(); | ||
730 | 664 | + void setToolboxFocusTo (gchar const* label); | ||
731 | 665 | + void setToolboxAdjustmentValue (gchar const* id, double val); | ||
732 | 666 | + void setToolboxSelectOneValue (gchar const* id, gint val); | ||
733 | 667 | + bool isToolboxButtonActive (gchar const *id); | ||
734 | 668 | + void updateNow(); | ||
735 | 669 | + void updateCanvasNow(); | ||
736 | 670 | + | ||
737 | 671 | + void enableInteraction(); | ||
738 | 672 | + void disableInteraction(); | ||
739 | 673 | + | ||
740 | 674 | + void setWaitingCursor(); | ||
741 | 675 | + void clearWaitingCursor(); | ||
742 | 676 | + bool isWaitingCursor() const { return waiting_cursor; }; | ||
743 | 677 | + | ||
744 | 678 | + void toggleColorProfAdjust(); | ||
745 | 679 | + | ||
746 | 680 | + void toggleGrids(); | ||
747 | 681 | + void toggleSnapGlobal(); | ||
748 | 682 | + bool gridsEnabled() const { return grids_visible; }; | ||
749 | 683 | + void showGrids(bool show, bool dirty_document = true); | ||
750 | 684 | + | ||
751 | 685 | + bool is_iconified(); | ||
752 | 686 | + bool is_maximized(); | ||
753 | 687 | + bool is_fullscreen(); | ||
754 | 688 | + bool is_focusMode(); | ||
755 | 689 | + | ||
756 | 690 | + void iconify(); | ||
757 | 691 | + void maximize(); | ||
758 | 692 | + void fullscreen(); | ||
759 | 693 | + void focusMode(bool mode = true); | ||
760 | 694 | + | ||
761 | 695 | + Geom::Matrix w2d() const; //transformation from window to desktop coordinates (used for zooming) | ||
762 | 696 | + Geom::Point w2d(Geom::Point const &p) const; | ||
763 | 697 | + Geom::Point d2w(Geom::Point const &p) const; | ||
764 | 698 | + Geom::Matrix doc2dt() const; | ||
765 | 699 | + Geom::Matrix dt2doc() const; | ||
766 | 700 | + Geom::Point doc2dt(Geom::Point const &p) const; | ||
767 | 701 | + Geom::Point dt2doc(Geom::Point const &p) const; | ||
768 | 702 | + | ||
769 | 703 | + virtual void setDocument (SPDocument* doc); | ||
770 | 704 | + virtual bool shutdown(); | ||
771 | 705 | + virtual void mouseover() {} | ||
772 | 706 | + virtual void mouseout() {} | ||
773 | 707 | + | ||
774 | 708 | + virtual bool onDeleteUI (GdkEventAny*); | ||
775 | 709 | + virtual bool onWindowStateEvent (GdkEventWindowState* event); | ||
776 | 710 | + | ||
777 | 711 | +private: | ||
778 | 712 | + Inkscape::UI::View::EditWidgetInterface *_widget; | ||
779 | 713 | + Inkscape::Application *_inkscape; | ||
780 | 714 | + Inkscape::MessageContext *_guides_message_context; | ||
781 | 715 | + bool _active; | ||
782 | 716 | + Geom::Matrix _w2d; | ||
783 | 717 | + Geom::Matrix _d2w; | ||
784 | 718 | + Geom::Matrix _doc2dt; | ||
785 | 719 | + | ||
786 | 720 | + bool grids_visible; /* don't set this variable directly, use the method below */ | ||
787 | 721 | + void set_grids_visible(bool visible); | ||
788 | 722 | + | ||
789 | 723 | + void push_current_zoom (GList**); | ||
790 | 724 | + | ||
791 | 725 | + sigc::signal<void,SPDesktop*,SPDocument*> _document_replaced_signal; | ||
792 | 726 | + sigc::signal<void> _activate_signal; | ||
793 | 727 | + sigc::signal<void> _deactivate_signal; | ||
794 | 728 | + sigc::signal<void,SPDesktop*,SPEventContext*> _event_context_changed_signal; | ||
795 | 729 | + sigc::signal<void, gpointer> _tool_subselection_changed; | ||
796 | 730 | + | ||
797 | 731 | + sigc::connection _activate_connection; | ||
798 | 732 | + sigc::connection _deactivate_connection; | ||
799 | 733 | + sigc::connection _sel_modified_connection; | ||
800 | 734 | + sigc::connection _sel_changed_connection; | ||
801 | 735 | + sigc::connection _reconstruction_start_connection; | ||
802 | 736 | + sigc::connection _reconstruction_finish_connection; | ||
803 | 737 | + sigc::connection _commit_connection; | ||
804 | 738 | + sigc::connection _modified_connection; | ||
805 | 739 | + | ||
806 | 740 | + virtual void onPositionSet (double, double); | ||
807 | 741 | + virtual void onResized (double, double); | ||
808 | 742 | + virtual void onRedrawRequested(); | ||
809 | 743 | + virtual void onStatusMessage (Inkscape::MessageType type, gchar const *message); | ||
810 | 744 | + virtual void onDocumentURISet (gchar const* uri); | ||
811 | 745 | + virtual void onDocumentResized (double, double); | ||
812 | 746 | + | ||
813 | 747 | + static void _onActivate (SPDesktop* dt); | ||
814 | 748 | + static void _onDeactivate (SPDesktop* dt); | ||
815 | 749 | + static void _onSelectionModified (Inkscape::Selection *selection, guint flags, SPDesktop *dt); | ||
816 | 750 | +}; | ||
817 | 751 | + | ||
818 | 752 | +#endif // SEEN_SP_DESKTOP_H | ||
819 | 753 | + | ||
820 | 754 | +/* | ||
821 | 755 | + Local Variables: | ||
822 | 756 | + mode:c++ | ||
823 | 757 | + c-file-style:"stroustrup" | ||
824 | 758 | + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) | ||
825 | 759 | + indent-tabs-mode:nil | ||
826 | 760 | + fill-column:99 | ||
827 | 761 | + End: | ||
828 | 762 | +*/ | ||
829 | 763 | +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : | ||
830 | 764 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/dialogs/object-attributes.cpp inkscape-0.48.1/src/dialogs/object-attributes.cpp | ||
831 | 765 | --- inkscape-0.48.1~/src/dialogs/object-attributes.cpp 2010-07-13 04:48:40.000000000 +0100 | ||
832 | 766 | +++ inkscape-0.48.1/src/dialogs/object-attributes.cpp 2011-05-01 00:56:19.591250878 +0100 | ||
833 | 767 | @@ -13,6 +13,7 @@ | ||
834 | 768 | #include <glibmm/i18n.h> | ||
835 | 769 | #include <string> | ||
836 | 770 | #include <cstring> | ||
837 | 771 | +#include <stddef.h> | ||
838 | 772 | #include <sigc++/connection.h> | ||
839 | 773 | #include <sigc++/functors/ptr_fun.h> | ||
840 | 774 | #include <sigc++/adaptors/bind.h> | ||
841 | 775 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/display/canvas-temporary-item.h inkscape-0.48.1/src/display/canvas-temporary-item.h | ||
842 | 776 | --- inkscape-0.48.1~/src/display/canvas-temporary-item.h 2010-07-13 04:48:40.000000000 +0100 | ||
843 | 777 | +++ inkscape-0.48.1/src/display/canvas-temporary-item.h 2011-05-01 00:56:19.591250878 +0100 | ||
844 | 778 | @@ -14,6 +14,7 @@ | ||
845 | 779 | |||
846 | 780 | #include "display/display-forward.h" | ||
847 | 781 | |||
848 | 782 | +#include <stddef.h> | ||
849 | 783 | #include <sigc++/sigc++.h> | ||
850 | 784 | |||
851 | 785 | namespace Inkscape { | ||
852 | 786 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/display/canvas-temporary-item.h.orig inkscape-0.48.1/src/display/canvas-temporary-item.h.orig | ||
853 | 787 | --- inkscape-0.48.1~/src/display/canvas-temporary-item.h.orig 1970-01-01 01:00:00.000000000 +0100 | ||
854 | 788 | +++ inkscape-0.48.1/src/display/canvas-temporary-item.h.orig 2010-07-13 04:48:40.000000000 +0100 | ||
855 | 789 | @@ -0,0 +1,57 @@ | ||
856 | 790 | +#ifndef INKSCAPE_CANVAS_TEMPORARY_ITEM_H | ||
857 | 791 | +#define INKSCAPE_CANVAS_TEMPORARY_ITEM_H | ||
858 | 792 | + | ||
859 | 793 | +/** \file | ||
860 | 794 | + * Provides a class to put a canvasitem temporarily on-canvas. | ||
861 | 795 | + * | ||
862 | 796 | + * Authors: | ||
863 | 797 | + * Johan Engelen | ||
864 | 798 | + * | ||
865 | 799 | + * Copyright (C) Johan Engelen 2008 <j.b.c.engelen@utwente.nl> | ||
866 | 800 | + * | ||
867 | 801 | + * Released under GNU GPL, read the file 'COPYING' for more information | ||
868 | 802 | + */ | ||
869 | 803 | + | ||
870 | 804 | +#include "display/display-forward.h" | ||
871 | 805 | + | ||
872 | 806 | +#include <sigc++/sigc++.h> | ||
873 | 807 | + | ||
874 | 808 | +namespace Inkscape { | ||
875 | 809 | +namespace Display { | ||
876 | 810 | + | ||
877 | 811 | +class TemporaryItem { | ||
878 | 812 | +public: | ||
879 | 813 | + TemporaryItem(SPCanvasItem *item, guint lifetime, bool destroy_on_deselect = false); | ||
880 | 814 | + virtual ~TemporaryItem(); | ||
881 | 815 | + | ||
882 | 816 | + sigc::signal<void, TemporaryItem *> signal_timeout; | ||
883 | 817 | + | ||
884 | 818 | +protected: | ||
885 | 819 | + friend class TemporaryItemList; | ||
886 | 820 | + | ||
887 | 821 | + SPCanvasItem * canvasitem; /** The item we are holding on to */ | ||
888 | 822 | + guint timeout_id; /** ID by which glib knows the timeout event */ | ||
889 | 823 | + bool destroy_on_deselect; // only destroy when parent item is deselected, not when mouse leaves | ||
890 | 824 | + | ||
891 | 825 | + static gboolean _timeout(gpointer data); ///< callback for when lifetime expired | ||
892 | 826 | + | ||
893 | 827 | +private: | ||
894 | 828 | + TemporaryItem(const TemporaryItem&); | ||
895 | 829 | + TemporaryItem& operator=(const TemporaryItem&); | ||
896 | 830 | +}; | ||
897 | 831 | + | ||
898 | 832 | +} //namespace Display | ||
899 | 833 | +} //namespace Inkscape | ||
900 | 834 | + | ||
901 | 835 | +#endif | ||
902 | 836 | + | ||
903 | 837 | +/* | ||
904 | 838 | + Local Variables: | ||
905 | 839 | + mode:c++ | ||
906 | 840 | + c-file-style:"stroustrup" | ||
907 | 841 | + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) | ||
908 | 842 | + indent-tabs-mode:nil | ||
909 | 843 | + fill-column:99 | ||
910 | 844 | + End: | ||
911 | 845 | +*/ | ||
912 | 846 | +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : | ||
913 | 847 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/document-private.h inkscape-0.48.1/src/document-private.h | ||
914 | 848 | --- inkscape-0.48.1~/src/document-private.h 2010-07-13 04:48:40.000000000 +0100 | ||
915 | 849 | +++ inkscape-0.48.1/src/document-private.h 2011-05-01 00:56:19.591250878 +0100 | ||
916 | 850 | @@ -14,6 +14,7 @@ | ||
917 | 851 | */ | ||
918 | 852 | |||
919 | 853 | #include <map> | ||
920 | 854 | +#include <stddef.h> | ||
921 | 855 | #include <sigc++/sigc++.h> | ||
922 | 856 | #include "xml/event-fns.h" | ||
923 | 857 | #include "sp-defs.h" | ||
924 | 858 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/document-private.h.orig inkscape-0.48.1/src/document-private.h.orig | ||
925 | 859 | --- inkscape-0.48.1~/src/document-private.h.orig 1970-01-01 01:00:00.000000000 +0100 | ||
926 | 860 | +++ inkscape-0.48.1/src/document-private.h.orig 2010-07-13 04:48:40.000000000 +0100 | ||
927 | 861 | @@ -0,0 +1,79 @@ | ||
928 | 862 | +#ifndef __SP_DOCUMENT_PRIVATE_H__ | ||
929 | 863 | +#define __SP_DOCUMENT_PRIVATE_H__ | ||
930 | 864 | + | ||
931 | 865 | +/* | ||
932 | 866 | + * Seldom needed document data | ||
933 | 867 | + * | ||
934 | 868 | + * Authors: | ||
935 | 869 | + * Lauris Kaplinski <lauris@kaplinski.com> | ||
936 | 870 | + * | ||
937 | 871 | + * Copyright (C) 1999-2002 Lauris Kaplinski | ||
938 | 872 | + * Copyright (C) 2001-2002 Ximian, Inc. | ||
939 | 873 | + * | ||
940 | 874 | + * Released under GNU GPL, read the file 'COPYING' for more information | ||
941 | 875 | + */ | ||
942 | 876 | + | ||
943 | 877 | +#include <map> | ||
944 | 878 | +#include <sigc++/sigc++.h> | ||
945 | 879 | +#include "xml/event-fns.h" | ||
946 | 880 | +#include "sp-defs.h" | ||
947 | 881 | +#include "sp-root.h" | ||
948 | 882 | +#include "document.h" | ||
949 | 883 | + | ||
950 | 884 | +#include "composite-undo-stack-observer.h" | ||
951 | 885 | + | ||
952 | 886 | +#include "event-log.h" | ||
953 | 887 | + | ||
954 | 888 | +// XXX only for testing! | ||
955 | 889 | +#include "console-output-undo-observer.h" | ||
956 | 890 | + | ||
957 | 891 | +#define SP_DOCUMENT_DEFS(d) ((SPObject *) SP_ROOT (SP_DOCUMENT_ROOT (d))->defs) | ||
958 | 892 | + | ||
959 | 893 | +namespace Inkscape { | ||
960 | 894 | +namespace XML { | ||
961 | 895 | +class Event; | ||
962 | 896 | +} | ||
963 | 897 | +} | ||
964 | 898 | + | ||
965 | 899 | + | ||
966 | 900 | +struct SPDocumentPrivate { | ||
967 | 901 | + typedef std::map<GQuark, SPDocument::IDChangedSignal> IDChangedSignalMap; | ||
968 | 902 | + typedef std::map<GQuark, SPDocument::ResourcesChangedSignal> ResourcesChangedSignalMap; | ||
969 | 903 | + | ||
970 | 904 | + GHashTable *iddef; /**< Dictionary of id -> SPObject mappings */ | ||
971 | 905 | + GHashTable *reprdef; /**< Dictionary of Inkscape::XML::Node -> SPObject mappings */ | ||
972 | 906 | + | ||
973 | 907 | + unsigned long serial; | ||
974 | 908 | + | ||
975 | 909 | + /** Dictionary of signals for id changes */ | ||
976 | 910 | + IDChangedSignalMap id_changed_signals; | ||
977 | 911 | + | ||
978 | 912 | + /* Resources */ | ||
979 | 913 | + /* It is GHashTable of GSLists */ | ||
980 | 914 | + GHashTable *resources; | ||
981 | 915 | + ResourcesChangedSignalMap resources_changed_signals; | ||
982 | 916 | + | ||
983 | 917 | + SPDocument::ModifiedSignal modified_signal; | ||
984 | 918 | + SPDocument::URISetSignal uri_set_signal; | ||
985 | 919 | + SPDocument::ResizedSignal resized_signal; | ||
986 | 920 | + SPDocument::ReconstructionStart _reconstruction_start_signal; | ||
987 | 921 | + SPDocument::ReconstructionFinish _reconstruction_finish_signal; | ||
988 | 922 | + SPDocument::CommitSignal commit_signal; | ||
989 | 923 | + | ||
990 | 924 | + /* Undo/Redo state */ | ||
991 | 925 | + bool sensitive: true; /* If we save actions to undo stack */ | ||
992 | 926 | + Inkscape::XML::Event * partial; /* partial undo log when interrupted */ | ||
993 | 927 | + int history_size; | ||
994 | 928 | + GSList * undo; /* Undo stack of reprs */ | ||
995 | 929 | + GSList * redo; /* Redo stack of reprs */ | ||
996 | 930 | + | ||
997 | 931 | + /* Undo listener */ | ||
998 | 932 | + Inkscape::CompositeUndoStackObserver undoStackObservers; | ||
999 | 933 | + | ||
1000 | 934 | + // XXX only for testing! | ||
1001 | 935 | + Inkscape::ConsoleOutputUndoObserver console_output_undo_observer; | ||
1002 | 936 | + | ||
1003 | 937 | + bool seeking; | ||
1004 | 938 | +}; | ||
1005 | 939 | + | ||
1006 | 940 | +#endif | ||
1007 | 941 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/document-subset.h inkscape-0.48.1/src/document-subset.h | ||
1008 | 942 | --- inkscape-0.48.1~/src/document-subset.h 2010-07-13 04:48:40.000000000 +0100 | ||
1009 | 943 | +++ inkscape-0.48.1/src/document-subset.h 2011-05-01 00:56:19.591250878 +0100 | ||
1010 | 944 | @@ -10,6 +10,7 @@ | ||
1011 | 945 | #ifndef SEEN_INKSCAPE_DOCUMENT_SUBSET_H | ||
1012 | 946 | #define SEEN_INKSCAPE_DOCUMENT_SUBSET_H | ||
1013 | 947 | |||
1014 | 948 | +#include <stddef.h> | ||
1015 | 949 | #include <sigc++/connection.h> | ||
1016 | 950 | #include <sigc++/functors/slot.h> | ||
1017 | 951 | |||
1018 | 952 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/document.h inkscape-0.48.1/src/document.h | ||
1019 | 953 | --- inkscape-0.48.1~/src/document.h 2010-08-04 17:45:00.000000000 +0100 | ||
1020 | 954 | +++ inkscape-0.48.1/src/document.h 2011-05-01 00:56:19.601250878 +0100 | ||
1021 | 955 | @@ -17,6 +17,7 @@ | ||
1022 | 956 | |||
1023 | 957 | #include <glib-object.h> | ||
1024 | 958 | #include <gtk/gtksignal.h> | ||
1025 | 959 | +#include <stddef.h> | ||
1026 | 960 | #include <sigc++/sigc++.h> | ||
1027 | 961 | #include <sigc++/class_slot.h> | ||
1028 | 962 | |||
1029 | 963 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/document.h.orig inkscape-0.48.1/src/document.h.orig | ||
1030 | 964 | --- inkscape-0.48.1~/src/document.h.orig 1970-01-01 01:00:00.000000000 +0100 | ||
1031 | 965 | +++ inkscape-0.48.1/src/document.h.orig 2010-08-04 17:45:00.000000000 +0100 | ||
1032 | 966 | @@ -0,0 +1,304 @@ | ||
1033 | 967 | +#ifndef __SP_DOCUMENT_H__ | ||
1034 | 968 | +#define __SP_DOCUMENT_H__ | ||
1035 | 969 | + | ||
1036 | 970 | +/** \file | ||
1037 | 971 | + * SPDocument: Typed SVG document implementation | ||
1038 | 972 | + */ | ||
1039 | 973 | +/* Authors: | ||
1040 | 974 | + * Lauris Kaplinski <lauris@kaplinski.com> | ||
1041 | 975 | + * MenTaLguY <mental@rydia.net> | ||
1042 | 976 | + * | ||
1043 | 977 | + * Copyright (C) 2004-2005 MenTaLguY | ||
1044 | 978 | + * Copyright (C) 1999-2002 Lauris Kaplinski | ||
1045 | 979 | + * Copyright (C) 2000-2001 Ximian, Inc. | ||
1046 | 980 | + * | ||
1047 | 981 | + * Released under GNU GPL, read the file 'COPYING' for more information | ||
1048 | 982 | + */ | ||
1049 | 983 | + | ||
1050 | 984 | +#include <glib-object.h> | ||
1051 | 985 | +#include <gtk/gtksignal.h> | ||
1052 | 986 | +#include <sigc++/sigc++.h> | ||
1053 | 987 | +#include <sigc++/class_slot.h> | ||
1054 | 988 | + | ||
1055 | 989 | +#include "libcroco/cr-cascade.h" | ||
1056 | 990 | +#include <2geom/forward.h> | ||
1057 | 991 | + | ||
1058 | 992 | +#include "gc-managed.h" | ||
1059 | 993 | +#include "gc-finalized.h" | ||
1060 | 994 | +#include "gc-anchored.h" | ||
1061 | 995 | +#include <glibmm/ustring.h> | ||
1062 | 996 | +#include "verbs.h" | ||
1063 | 997 | +#include <vector> | ||
1064 | 998 | +#include <set> | ||
1065 | 999 | + | ||
1066 | 1000 | +namespace Avoid { | ||
1067 | 1001 | +class Router; | ||
1068 | 1002 | +} | ||
1069 | 1003 | + | ||
1070 | 1004 | +struct NRRect; | ||
1071 | 1005 | +struct SPDesktop; | ||
1072 | 1006 | +struct SPItem; | ||
1073 | 1007 | +struct SPObject; | ||
1074 | 1008 | +struct SPGroup; | ||
1075 | 1009 | + | ||
1076 | 1010 | +namespace Inkscape { | ||
1077 | 1011 | + struct Application; | ||
1078 | 1012 | + class Selection; | ||
1079 | 1013 | + class UndoStackObserver; | ||
1080 | 1014 | + class EventLog; | ||
1081 | 1015 | + class ProfileManager; | ||
1082 | 1016 | + namespace XML { | ||
1083 | 1017 | + class Document; | ||
1084 | 1018 | + class Node; | ||
1085 | 1019 | + } | ||
1086 | 1020 | +} | ||
1087 | 1021 | + | ||
1088 | 1022 | +class SP3DBox; | ||
1089 | 1023 | +class Persp3D; | ||
1090 | 1024 | +class Persp3DImpl; | ||
1091 | 1025 | + | ||
1092 | 1026 | +namespace Proj { | ||
1093 | 1027 | + class TransfMat3x4; | ||
1094 | 1028 | +} | ||
1095 | 1029 | + | ||
1096 | 1030 | +class SPDocumentPrivate; | ||
1097 | 1031 | + | ||
1098 | 1032 | +/// Typed SVG document implementation. | ||
1099 | 1033 | +struct SPDocument : public Inkscape::GC::Managed<>, | ||
1100 | 1034 | + public Inkscape::GC::Finalized, | ||
1101 | 1035 | + public Inkscape::GC::Anchored | ||
1102 | 1036 | +{ | ||
1103 | 1037 | + typedef sigc::signal<void, SPObject *> IDChangedSignal; | ||
1104 | 1038 | + typedef sigc::signal<void> ResourcesChangedSignal; | ||
1105 | 1039 | + typedef sigc::signal<void, guint> ModifiedSignal; | ||
1106 | 1040 | + typedef sigc::signal<void, gchar const *> URISetSignal; | ||
1107 | 1041 | + typedef sigc::signal<void, double, double> ResizedSignal; | ||
1108 | 1042 | + typedef sigc::signal<void> ReconstructionStart; | ||
1109 | 1043 | + typedef sigc::signal<void> ReconstructionFinish; | ||
1110 | 1044 | + typedef sigc::signal<void> CommitSignal; | ||
1111 | 1045 | + | ||
1112 | 1046 | + SPDocument(); | ||
1113 | 1047 | + virtual ~SPDocument(); | ||
1114 | 1048 | + | ||
1115 | 1049 | + unsigned int keepalive : 1; | ||
1116 | 1050 | + unsigned int virgin : 1; ///< Has the document never been touched? | ||
1117 | 1051 | + unsigned int modified_since_save : 1; | ||
1118 | 1052 | + | ||
1119 | 1053 | + Inkscape::XML::Document *rdoc; ///< Our Inkscape::XML::Document | ||
1120 | 1054 | + Inkscape::XML::Node *rroot; ///< Root element of Inkscape::XML::Document | ||
1121 | 1055 | + SPObject *root; ///< Our SPRoot | ||
1122 | 1056 | + CRCascade *style_cascade; | ||
1123 | 1057 | + | ||
1124 | 1058 | + gchar *uri; ///< A filename (not a URI yet), or NULL | ||
1125 | 1059 | + gchar *base; ///< To be used for resolving relative hrefs. | ||
1126 | 1060 | + gchar *name; ///< basename(uri) or other human-readable label for the document. | ||
1127 | 1061 | + | ||
1128 | 1062 | + SPDocumentPrivate *priv; | ||
1129 | 1063 | + | ||
1130 | 1064 | + /// Last action key | ||
1131 | 1065 | + Glib::ustring actionkey; | ||
1132 | 1066 | + | ||
1133 | 1067 | + /// Handler ID | ||
1134 | 1068 | + guint modified_id; | ||
1135 | 1069 | + | ||
1136 | 1070 | + /// Connector rerouting handler ID | ||
1137 | 1071 | + guint rerouting_handler_id; | ||
1138 | 1072 | + | ||
1139 | 1073 | + Inkscape::ProfileManager* profileManager; | ||
1140 | 1074 | + | ||
1141 | 1075 | + // Instance of the connector router | ||
1142 | 1076 | + Avoid::Router *router; | ||
1143 | 1077 | + | ||
1144 | 1078 | + GSList *_collection_queue; | ||
1145 | 1079 | + | ||
1146 | 1080 | + bool oldSignalsConnected; | ||
1147 | 1081 | + | ||
1148 | 1082 | + void setCurrentPersp3D(Persp3D * const persp); | ||
1149 | 1083 | + inline void setCurrentPersp3DImpl(Persp3DImpl * const persp_impl) { current_persp3d_impl = persp_impl; } | ||
1150 | 1084 | + /* | ||
1151 | 1085 | + * getCurrentPersp3D returns current_persp3d (if non-NULL) or the first | ||
1152 | 1086 | + * perspective in the defs. If no perspective exists, returns NULL. | ||
1153 | 1087 | + */ | ||
1154 | 1088 | + Persp3D * getCurrentPersp3D(); | ||
1155 | 1089 | + Persp3DImpl * getCurrentPersp3DImpl(); | ||
1156 | 1090 | + void getPerspectivesInDefs(std::vector<Persp3D*> &list); | ||
1157 | 1091 | + unsigned int numPerspectivesInDefs() { | ||
1158 | 1092 | + std::vector<Persp3D*> list; | ||
1159 | 1093 | + getPerspectivesInDefs(list); | ||
1160 | 1094 | + return list.size(); | ||
1161 | 1095 | + } | ||
1162 | 1096 | + | ||
1163 | 1097 | + //void initialize_current_persp3d(); | ||
1164 | 1098 | + | ||
1165 | 1099 | + sigc::connection connectModified(ModifiedSignal::slot_type slot); | ||
1166 | 1100 | + sigc::connection connectURISet(URISetSignal::slot_type slot); | ||
1167 | 1101 | + sigc::connection connectResized(ResizedSignal::slot_type slot); | ||
1168 | 1102 | +sigc::connection connectCommit(CommitSignal::slot_type slot); | ||
1169 | 1103 | + | ||
1170 | 1104 | + void bindObjectToId(gchar const *id, SPObject *object); | ||
1171 | 1105 | + SPObject *getObjectById(gchar const *id); | ||
1172 | 1106 | + sigc::connection connectIdChanged(const gchar *id, IDChangedSignal::slot_type slot); | ||
1173 | 1107 | + | ||
1174 | 1108 | + void bindObjectToRepr(Inkscape::XML::Node *repr, SPObject *object); | ||
1175 | 1109 | + SPObject *getObjectByRepr(Inkscape::XML::Node *repr); | ||
1176 | 1110 | + | ||
1177 | 1111 | + Glib::ustring getLanguage(); | ||
1178 | 1112 | + | ||
1179 | 1113 | + void queueForOrphanCollection(SPObject *object); | ||
1180 | 1114 | + void collectOrphans(); | ||
1181 | 1115 | + | ||
1182 | 1116 | + void _emitModified(); | ||
1183 | 1117 | + | ||
1184 | 1118 | + void addUndoObserver(Inkscape::UndoStackObserver& observer); | ||
1185 | 1119 | + void removeUndoObserver(Inkscape::UndoStackObserver& observer); | ||
1186 | 1120 | + | ||
1187 | 1121 | + bool _updateDocument(); | ||
1188 | 1122 | + | ||
1189 | 1123 | + /// Are we currently in a transition between two "known good" states of the document? | ||
1190 | 1124 | + bool isSeeking() const; | ||
1191 | 1125 | + | ||
1192 | 1126 | + bool isModifiedSinceSave() const { return modified_since_save; } | ||
1193 | 1127 | + void setModifiedSinceSave(bool modified = true) { | ||
1194 | 1128 | + modified_since_save = modified; | ||
1195 | 1129 | + } | ||
1196 | 1130 | + | ||
1197 | 1131 | +private: | ||
1198 | 1132 | + SPDocument(SPDocument const &); // no copy | ||
1199 | 1133 | + void operator=(SPDocument const &); // no assign | ||
1200 | 1134 | + | ||
1201 | 1135 | + Persp3D *current_persp3d; /**< Currently 'active' perspective (to which, e.g., newly created boxes are attached) */ | ||
1202 | 1136 | + Persp3DImpl *current_persp3d_impl; | ||
1203 | 1137 | + | ||
1204 | 1138 | +public: | ||
1205 | 1139 | + sigc::connection connectReconstructionStart(ReconstructionStart::slot_type slot); | ||
1206 | 1140 | + sigc::connection connectReconstructionFinish(ReconstructionFinish::slot_type slot); | ||
1207 | 1141 | + void emitReconstructionStart(void); | ||
1208 | 1142 | + void emitReconstructionFinish(void); | ||
1209 | 1143 | + | ||
1210 | 1144 | + unsigned long serial() const; | ||
1211 | 1145 | + void reset_key(void *dummy); | ||
1212 | 1146 | + sigc::connection _selection_changed_connection; | ||
1213 | 1147 | + sigc::connection _desktop_activated_connection; | ||
1214 | 1148 | + | ||
1215 | 1149 | + void fitToRect(Geom::Rect const &rect, bool with_margins = false); | ||
1216 | 1150 | +}; | ||
1217 | 1151 | + | ||
1218 | 1152 | +SPDocument *sp_document_new(const gchar *uri, unsigned int keepalive, bool make_new = false); | ||
1219 | 1153 | +SPDocument *sp_document_new_from_mem(const gchar *buffer, gint length, unsigned int keepalive); | ||
1220 | 1154 | + | ||
1221 | 1155 | +SPDocument *sp_document_ref(SPDocument *doc); | ||
1222 | 1156 | +SPDocument *sp_document_unref(SPDocument *doc); | ||
1223 | 1157 | + | ||
1224 | 1158 | + | ||
1225 | 1159 | +SPDocument *sp_document_create(Inkscape::XML::Document *rdoc, gchar const *uri, gchar const *base, gchar const *name, unsigned int keepalive); | ||
1226 | 1160 | + | ||
1227 | 1161 | +/* | ||
1228 | 1162 | + * Access methods | ||
1229 | 1163 | + */ | ||
1230 | 1164 | + | ||
1231 | 1165 | +#define sp_document_repr_doc(d) (d->rdoc) | ||
1232 | 1166 | +#define sp_document_repr_root(d) (d->rroot) | ||
1233 | 1167 | +#define sp_document_root(d) (d->root) | ||
1234 | 1168 | +#define SP_DOCUMENT_ROOT(d) (d->root) | ||
1235 | 1169 | + | ||
1236 | 1170 | +gdouble sp_document_width(SPDocument *document); | ||
1237 | 1171 | +gdouble sp_document_height(SPDocument *document); | ||
1238 | 1172 | +Geom::Point sp_document_dimensions(SPDocument *document); | ||
1239 | 1173 | + | ||
1240 | 1174 | +struct SPUnit; | ||
1241 | 1175 | + | ||
1242 | 1176 | +void sp_document_set_width(SPDocument *document, gdouble width, const SPUnit *unit); | ||
1243 | 1177 | +void sp_document_set_height(SPDocument *document, gdouble height, const SPUnit *unit); | ||
1244 | 1178 | + | ||
1245 | 1179 | +#define SP_DOCUMENT_URI(d) (d->uri) | ||
1246 | 1180 | +#define SP_DOCUMENT_NAME(d) (d->name) | ||
1247 | 1181 | +#define SP_DOCUMENT_BASE(d) (d->base) | ||
1248 | 1182 | + | ||
1249 | 1183 | +/* | ||
1250 | 1184 | + * Dictionary | ||
1251 | 1185 | + */ | ||
1252 | 1186 | + | ||
1253 | 1187 | +/* | ||
1254 | 1188 | + * Undo & redo | ||
1255 | 1189 | + */ | ||
1256 | 1190 | + | ||
1257 | 1191 | +void sp_document_set_undo_sensitive(SPDocument *document, bool sensitive); | ||
1258 | 1192 | +bool sp_document_get_undo_sensitive(SPDocument const *document); | ||
1259 | 1193 | + | ||
1260 | 1194 | +void sp_document_clear_undo(SPDocument *document); | ||
1261 | 1195 | +void sp_document_clear_redo(SPDocument *document); | ||
1262 | 1196 | + | ||
1263 | 1197 | +void sp_document_child_added(SPDocument *doc, SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref); | ||
1264 | 1198 | +void sp_document_child_removed(SPDocument *doc, SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref); | ||
1265 | 1199 | +void sp_document_attr_changed(SPDocument *doc, SPObject *object, const gchar *key, const gchar *oldval, const gchar *newval); | ||
1266 | 1200 | +void sp_document_content_changed(SPDocument *doc, SPObject *object, const gchar *oldcontent, const gchar *newcontent); | ||
1267 | 1201 | +void sp_document_order_changed(SPDocument *doc, SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *oldref, Inkscape::XML::Node *newref); | ||
1268 | 1202 | + | ||
1269 | 1203 | +/* Object modification root handler */ | ||
1270 | 1204 | +void sp_document_request_modified(SPDocument *doc); | ||
1271 | 1205 | +gint sp_document_ensure_up_to_date(SPDocument *doc); | ||
1272 | 1206 | + | ||
1273 | 1207 | +/* Save all previous actions to stack, as one undo step */ | ||
1274 | 1208 | +void sp_document_done(SPDocument *document, unsigned int event_type, Glib::ustring event_description); | ||
1275 | 1209 | +void sp_document_maybe_done(SPDocument *document, const gchar *keyconst, unsigned int event_type, Glib::ustring event_description); | ||
1276 | 1210 | +void sp_document_reset_key(Inkscape::Application *inkscape, SPDesktop *desktop, GtkObject *base); | ||
1277 | 1211 | + | ||
1278 | 1212 | +/* Cancel (and revert) current unsaved actions */ | ||
1279 | 1213 | +void sp_document_cancel(SPDocument *document); | ||
1280 | 1214 | + | ||
1281 | 1215 | +/* Undo and redo */ | ||
1282 | 1216 | +gboolean sp_document_undo(SPDocument *document); | ||
1283 | 1217 | +gboolean sp_document_redo(SPDocument *document); | ||
1284 | 1218 | + | ||
1285 | 1219 | +/* Resource management */ | ||
1286 | 1220 | +gboolean sp_document_add_resource(SPDocument *document, const gchar *key, SPObject *object); | ||
1287 | 1221 | +gboolean sp_document_remove_resource(SPDocument *document, const gchar *key, SPObject *object); | ||
1288 | 1222 | +const GSList *sp_document_get_resource_list(SPDocument *document, const gchar *key); | ||
1289 | 1223 | +sigc::connection sp_document_resources_changed_connect(SPDocument *document, const gchar *key, SPDocument::ResourcesChangedSignal::slot_type slot); | ||
1290 | 1224 | + | ||
1291 | 1225 | + | ||
1292 | 1226 | +/* | ||
1293 | 1227 | + * Ideas: How to overcome style invalidation nightmare | ||
1294 | 1228 | + * | ||
1295 | 1229 | + * 1. There is reference request dictionary, that contains | ||
1296 | 1230 | + * objects (styles) needing certain id. Object::build checks | ||
1297 | 1231 | + * final id against it, and invokes necesary methods | ||
1298 | 1232 | + * | ||
1299 | 1233 | + * 2. Removing referenced object is simply prohibited - | ||
1300 | 1234 | + * needs analyse, how we can deal with situations, where | ||
1301 | 1235 | + * we simply want to ungroup etc. - probably we need | ||
1302 | 1236 | + * Repr::reparent method :( [Or was it ;)] | ||
1303 | 1237 | + * | ||
1304 | 1238 | + */ | ||
1305 | 1239 | + | ||
1306 | 1240 | +/* | ||
1307 | 1241 | + * Misc | ||
1308 | 1242 | + */ | ||
1309 | 1243 | + | ||
1310 | 1244 | +GSList *sp_document_items_in_box(SPDocument *document, unsigned int dkey, Geom::Rect const &box); | ||
1311 | 1245 | +GSList *sp_document_partial_items_in_box(SPDocument *document, unsigned int dkey, Geom::Rect const &box); | ||
1312 | 1246 | +SPItem *sp_document_item_from_list_at_point_bottom(unsigned int dkey, SPGroup *group, const GSList *list, Geom::Point const p, bool take_insensitive = false); | ||
1313 | 1247 | +SPItem *sp_document_item_at_point (SPDocument *document, unsigned int key, Geom::Point const p, gboolean into_groups, SPItem *upto = NULL); | ||
1314 | 1248 | +GSList *sp_document_items_at_points(SPDocument *document, unsigned const key, std::vector<Geom::Point> points); | ||
1315 | 1249 | +SPItem *sp_document_group_at_point (SPDocument *document, unsigned int key, Geom::Point const p); | ||
1316 | 1250 | + | ||
1317 | 1251 | +void sp_document_set_uri(SPDocument *document, gchar const *uri); | ||
1318 | 1252 | +void sp_document_change_uri_and_hrefs(SPDocument *document, gchar const *uri); | ||
1319 | 1253 | + | ||
1320 | 1254 | +void sp_document_resized_signal_emit(SPDocument *doc, gdouble width, gdouble height); | ||
1321 | 1255 | + | ||
1322 | 1256 | +unsigned int vacuum_document(SPDocument *document); | ||
1323 | 1257 | + | ||
1324 | 1258 | + | ||
1325 | 1259 | +#endif | ||
1326 | 1260 | + | ||
1327 | 1261 | +/* | ||
1328 | 1262 | + Local Variables: | ||
1329 | 1263 | + mode:c++ | ||
1330 | 1264 | + c-file-style:"stroustrup" | ||
1331 | 1265 | + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) | ||
1332 | 1266 | + indent-tabs-mode:nil | ||
1333 | 1267 | + fill-column:99 | ||
1334 | 1268 | + End: | ||
1335 | 1269 | +*/ | ||
1336 | 1270 | +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : | ||
1337 | 1271 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/draw-context.h inkscape-0.48.1/src/draw-context.h | ||
1338 | 1272 | --- inkscape-0.48.1~/src/draw-context.h 2010-07-13 04:48:40.000000000 +0100 | ||
1339 | 1273 | +++ inkscape-0.48.1/src/draw-context.h 2011-05-01 00:56:19.601250878 +0100 | ||
1340 | 1274 | @@ -14,6 +14,7 @@ | ||
1341 | 1275 | * Released under GNU GPL | ||
1342 | 1276 | */ | ||
1343 | 1277 | |||
1344 | 1278 | +#include <stddef.h> | ||
1345 | 1279 | #include <sigc++/sigc++.h> | ||
1346 | 1280 | #include "event-context.h" | ||
1347 | 1281 | #include <forward.h> | ||
1348 | 1282 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/extension/timer.h inkscape-0.48.1/src/extension/timer.h | ||
1349 | 1283 | --- inkscape-0.48.1~/src/extension/timer.h 2010-07-13 04:48:40.000000000 +0100 | ||
1350 | 1284 | +++ inkscape-0.48.1/src/extension/timer.h 2011-05-01 00:56:19.601250878 +0100 | ||
1351 | 1285 | @@ -13,6 +13,7 @@ | ||
1352 | 1286 | #ifndef INKSCAPE_EXTENSION_TIMER_H__ | ||
1353 | 1287 | #define INKSCAPE_EXTENSION_TIMER_H__ | ||
1354 | 1288 | |||
1355 | 1289 | +#include <stddef.h> | ||
1356 | 1290 | #include <sigc++/sigc++.h> | ||
1357 | 1291 | #include <glibmm/timeval.h> | ||
1358 | 1292 | #include "extension-forward.h" | ||
1359 | 1293 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/flood-context.h inkscape-0.48.1/src/flood-context.h | ||
1360 | 1294 | --- inkscape-0.48.1~/src/flood-context.h 2010-07-13 04:48:40.000000000 +0100 | ||
1361 | 1295 | +++ inkscape-0.48.1/src/flood-context.h 2011-05-01 00:56:19.601250878 +0100 | ||
1362 | 1296 | @@ -11,6 +11,7 @@ | ||
1363 | 1297 | * Released under GNU GPL | ||
1364 | 1298 | */ | ||
1365 | 1299 | |||
1366 | 1300 | +#include <stddef.h> | ||
1367 | 1301 | #include <sigc++/sigc++.h> | ||
1368 | 1302 | #include <gtk/gtk.h> | ||
1369 | 1303 | #include "event-context.h" | ||
1370 | 1304 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/gc-alloc.h inkscape-0.48.1/src/gc-alloc.h | ||
1371 | 1305 | --- inkscape-0.48.1~/src/gc-alloc.h 2010-07-13 04:48:40.000000000 +0100 | ||
1372 | 1306 | +++ inkscape-0.48.1/src/gc-alloc.h 2011-05-01 00:56:19.601250878 +0100 | ||
1373 | 1307 | @@ -16,6 +16,7 @@ | ||
1374 | 1308 | #define SEEN_INKSCAPE_GC_ALLOC_H | ||
1375 | 1309 | |||
1376 | 1310 | #include <limits> | ||
1377 | 1311 | +#include <cstddef> | ||
1378 | 1312 | #include "gc-core.h" | ||
1379 | 1313 | |||
1380 | 1314 | namespace Inkscape { | ||
1381 | 1315 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/gc-finalized.h inkscape-0.48.1/src/gc-finalized.h | ||
1382 | 1316 | --- inkscape-0.48.1~/src/gc-finalized.h 2010-07-13 04:48:40.000000000 +0100 | ||
1383 | 1317 | +++ inkscape-0.48.1/src/gc-finalized.h 2011-05-01 00:56:19.601250878 +0100 | ||
1384 | 1318 | @@ -17,6 +17,7 @@ | ||
1385 | 1319 | #define SEEN_INKSCAPE_GC_FINALIZED_H | ||
1386 | 1320 | |||
1387 | 1321 | #include <new> | ||
1388 | 1322 | +#include <cstddef> | ||
1389 | 1323 | #include "gc-core.h" | ||
1390 | 1324 | |||
1391 | 1325 | namespace Inkscape { | ||
1392 | 1326 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/gc.cpp inkscape-0.48.1/src/gc.cpp | ||
1393 | 1327 | --- inkscape-0.48.1~/src/gc.cpp 2010-07-13 04:48:40.000000000 +0100 | ||
1394 | 1328 | +++ inkscape-0.48.1/src/gc.cpp 2011-05-01 00:56:19.601250878 +0100 | ||
1395 | 1329 | @@ -16,6 +16,7 @@ | ||
1396 | 1330 | #include <glib/gmessages.h> | ||
1397 | 1331 | #include <sigc++/functors/ptr_fun.h> | ||
1398 | 1332 | #include <glibmm/main.h> | ||
1399 | 1333 | +#include <cstddef> | ||
1400 | 1334 | |||
1401 | 1335 | namespace Inkscape { | ||
1402 | 1336 | namespace GC { | ||
1403 | 1337 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/gradient-context.h inkscape-0.48.1/src/gradient-context.h | ||
1404 | 1338 | --- inkscape-0.48.1~/src/gradient-context.h 2010-07-13 04:48:40.000000000 +0100 | ||
1405 | 1339 | +++ inkscape-0.48.1/src/gradient-context.h 2011-05-01 00:56:19.601250878 +0100 | ||
1406 | 1340 | @@ -15,6 +15,7 @@ | ||
1407 | 1341 | * Released under GNU GPL | ||
1408 | 1342 | */ | ||
1409 | 1343 | |||
1410 | 1344 | +#include <stddef.h> | ||
1411 | 1345 | #include <sigc++/sigc++.h> | ||
1412 | 1346 | #include "event-context.h" | ||
1413 | 1347 | |||
1414 | 1348 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/gradient-drag.h inkscape-0.48.1/src/gradient-drag.h | ||
1415 | 1349 | --- inkscape-0.48.1~/src/gradient-drag.h 2010-08-04 17:45:00.000000000 +0100 | ||
1416 | 1350 | +++ inkscape-0.48.1/src/gradient-drag.h 2011-05-01 00:56:19.601250878 +0100 | ||
1417 | 1351 | @@ -15,6 +15,7 @@ | ||
1418 | 1352 | */ | ||
1419 | 1353 | |||
1420 | 1354 | #include <glib/gslist.h> | ||
1421 | 1355 | +#include <stddef.h> | ||
1422 | 1356 | #include <sigc++/sigc++.h> | ||
1423 | 1357 | #include <vector> | ||
1424 | 1358 | |||
1425 | 1359 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/knot.h inkscape-0.48.1/src/knot.h | ||
1426 | 1360 | --- inkscape-0.48.1~/src/knot.h 2010-07-13 04:48:40.000000000 +0100 | ||
1427 | 1361 | +++ inkscape-0.48.1/src/knot.h 2011-05-01 00:56:19.601250878 +0100 | ||
1428 | 1362 | @@ -20,6 +20,7 @@ | ||
1429 | 1363 | #include "forward.h" | ||
1430 | 1364 | #include <2geom/point.h> | ||
1431 | 1365 | #include "knot-enums.h" | ||
1432 | 1366 | +#include <stddef.h> | ||
1433 | 1367 | #include <sigc++/sigc++.h> | ||
1434 | 1368 | |||
1435 | 1369 | class SPKnot; | ||
1436 | 1370 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/knot.h.orig inkscape-0.48.1/src/knot.h.orig | ||
1437 | 1371 | --- inkscape-0.48.1~/src/knot.h.orig 1970-01-01 01:00:00.000000000 +0100 | ||
1438 | 1372 | +++ inkscape-0.48.1/src/knot.h.orig 2010-07-13 04:48:40.000000000 +0100 | ||
1439 | 1373 | @@ -0,0 +1,192 @@ | ||
1440 | 1374 | +#ifndef __SP_KNOT_H__ | ||
1441 | 1375 | +#define __SP_KNOT_H__ | ||
1442 | 1376 | + | ||
1443 | 1377 | +/** \file | ||
1444 | 1378 | + * Declarations for SPKnot: Desktop-bound visual control object. | ||
1445 | 1379 | + */ | ||
1446 | 1380 | +/* | ||
1447 | 1381 | + * Authors: | ||
1448 | 1382 | + * Lauris Kaplinski <lauris@kaplinski.com> | ||
1449 | 1383 | + * | ||
1450 | 1384 | + * Copyright (C) 1999-2002 authors | ||
1451 | 1385 | + * Copyright (C) 2001-2002 Ximian, Inc. | ||
1452 | 1386 | + * | ||
1453 | 1387 | + * Released under GNU GPL, read the file 'COPYING' for more information | ||
1454 | 1388 | + */ | ||
1455 | 1389 | + | ||
1456 | 1390 | +#include <gdk/gdk.h> | ||
1457 | 1391 | +#include <gtk/gtkenums.h> | ||
1458 | 1392 | +#include "display/display-forward.h" | ||
1459 | 1393 | +#include "forward.h" | ||
1460 | 1394 | +#include <2geom/point.h> | ||
1461 | 1395 | +#include "knot-enums.h" | ||
1462 | 1396 | +#include <sigc++/sigc++.h> | ||
1463 | 1397 | + | ||
1464 | 1398 | +class SPKnot; | ||
1465 | 1399 | +class SPKnotClass; | ||
1466 | 1400 | + | ||
1467 | 1401 | +#define SP_TYPE_KNOT (sp_knot_get_type()) | ||
1468 | 1402 | +#define SP_KNOT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SP_TYPE_KNOT, SPKnot)) | ||
1469 | 1403 | +#define SP_KNOT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SP_TYPE_KNOT, SPKnotClass)) | ||
1470 | 1404 | +#define SP_IS_KNOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_KNOT)) | ||
1471 | 1405 | +#define SP_IS_KNOT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_KNOT)) | ||
1472 | 1406 | + | ||
1473 | 1407 | +/** | ||
1474 | 1408 | + * Desktop-bound visual control object. | ||
1475 | 1409 | + * | ||
1476 | 1410 | + * A knot is a draggable object, with callbacks to change something by | ||
1477 | 1411 | + * dragging it, visuably represented by a canvas item (mostly square). | ||
1478 | 1412 | + */ | ||
1479 | 1413 | +struct SPKnot : GObject { | ||
1480 | 1414 | + SPDesktop *desktop; /**< Desktop we are on. */ | ||
1481 | 1415 | + SPCanvasItem *item; /**< Our CanvasItem. */ | ||
1482 | 1416 | + guint flags; | ||
1483 | 1417 | + | ||
1484 | 1418 | + guint size; /**< Always square. */ | ||
1485 | 1419 | + Geom::Point pos; /**< Our desktop coordinates. */ | ||
1486 | 1420 | + Geom::Point grabbed_rel_pos; /**< Grabbed relative position. */ | ||
1487 | 1421 | + Geom::Point drag_origin; /**< Origin of drag. */ | ||
1488 | 1422 | + GtkAnchorType anchor; /**< Anchor. */ | ||
1489 | 1423 | + | ||
1490 | 1424 | + SPKnotShapeType shape; /**< Shape type. */ | ||
1491 | 1425 | + SPKnotModeType mode; | ||
1492 | 1426 | + | ||
1493 | 1427 | + guint32 fill[SP_KNOT_VISIBLE_STATES]; | ||
1494 | 1428 | + guint32 stroke[SP_KNOT_VISIBLE_STATES]; | ||
1495 | 1429 | + guchar *image[SP_KNOT_VISIBLE_STATES]; | ||
1496 | 1430 | + | ||
1497 | 1431 | + GdkCursor *cursor[SP_KNOT_VISIBLE_STATES]; | ||
1498 | 1432 | + | ||
1499 | 1433 | + GdkCursor *saved_cursor; | ||
1500 | 1434 | + gpointer pixbuf; | ||
1501 | 1435 | + | ||
1502 | 1436 | + gchar *tip; | ||
1503 | 1437 | + | ||
1504 | 1438 | + gulong _event_handler_id; | ||
1505 | 1439 | + | ||
1506 | 1440 | + double pressure; /**< The tablet pen pressure when the knot is being dragged. */ | ||
1507 | 1441 | + | ||
1508 | 1442 | + // C++ signals | ||
1509 | 1443 | + /** | ||
1510 | 1444 | + sigc::signal<void, Geom::Point const &, Geom::Point const &, guint> _moved_signal; | ||
1511 | 1445 | + sigc::signal<void, guint> _click_signal; | ||
1512 | 1446 | + sigc::signal<Geom::Point> _ungrabbed_signal; | ||
1513 | 1447 | + **/ | ||
1514 | 1448 | + sigc::signal<void, SPKnot *, Geom::Point const &, guint> _moved_signal; | ||
1515 | 1449 | + sigc::signal<void, SPKnot *, guint> _click_signal; | ||
1516 | 1450 | + sigc::signal<void, SPKnot *> _ungrabbed_signal; | ||
1517 | 1451 | + | ||
1518 | 1452 | + //TODO: all the members above should eventualle become private, accessible via setters/getters | ||
1519 | 1453 | + inline void setSize (guint i) {size = i;} | ||
1520 | 1454 | + inline void setShape (guint i) {shape = (SPKnotShapeType) i;} | ||
1521 | 1455 | + inline void setAnchor (guint i) {anchor = (GtkAnchorType) i;} | ||
1522 | 1456 | + inline void setMode (guint i) {mode = (SPKnotModeType) i;} | ||
1523 | 1457 | + inline void setPixbuf (gpointer p) {pixbuf = p;} | ||
1524 | 1458 | + inline void setFill (guint32 normal, guint32 mouseover, guint32 dragging) { | ||
1525 | 1459 | + fill[SP_KNOT_STATE_NORMAL] = normal; | ||
1526 | 1460 | + fill[SP_KNOT_STATE_MOUSEOVER] = mouseover; | ||
1527 | 1461 | + fill[SP_KNOT_STATE_DRAGGING] = dragging; | ||
1528 | 1462 | + } | ||
1529 | 1463 | + inline void setStroke (guint32 normal, guint32 mouseover, guint32 dragging) { | ||
1530 | 1464 | + stroke[SP_KNOT_STATE_NORMAL] = normal; | ||
1531 | 1465 | + stroke[SP_KNOT_STATE_MOUSEOVER] = mouseover; | ||
1532 | 1466 | + stroke[SP_KNOT_STATE_DRAGGING] = dragging; | ||
1533 | 1467 | + } | ||
1534 | 1468 | + inline void setImage (guchar* normal, guchar* mouseover, guchar* dragging) { | ||
1535 | 1469 | + image[SP_KNOT_STATE_NORMAL] = normal; | ||
1536 | 1470 | + image[SP_KNOT_STATE_MOUSEOVER] = mouseover; | ||
1537 | 1471 | + image[SP_KNOT_STATE_DRAGGING] = dragging; | ||
1538 | 1472 | + } | ||
1539 | 1473 | + inline void setCursor (GdkCursor* normal, GdkCursor* mouseover, GdkCursor* dragging) { | ||
1540 | 1474 | + if (cursor[SP_KNOT_STATE_NORMAL]) { | ||
1541 | 1475 | + gdk_cursor_unref(cursor[SP_KNOT_STATE_NORMAL]); | ||
1542 | 1476 | + } | ||
1543 | 1477 | + cursor[SP_KNOT_STATE_NORMAL] = normal; | ||
1544 | 1478 | + if (normal) { | ||
1545 | 1479 | + gdk_cursor_ref(normal); | ||
1546 | 1480 | + } | ||
1547 | 1481 | + | ||
1548 | 1482 | + if (cursor[SP_KNOT_STATE_MOUSEOVER]) { | ||
1549 | 1483 | + gdk_cursor_unref(cursor[SP_KNOT_STATE_MOUSEOVER]); | ||
1550 | 1484 | + } | ||
1551 | 1485 | + cursor[SP_KNOT_STATE_MOUSEOVER] = mouseover; | ||
1552 | 1486 | + if (mouseover) { | ||
1553 | 1487 | + gdk_cursor_ref(mouseover); | ||
1554 | 1488 | + } | ||
1555 | 1489 | + | ||
1556 | 1490 | + if (cursor[SP_KNOT_STATE_DRAGGING]) { | ||
1557 | 1491 | + gdk_cursor_unref(cursor[SP_KNOT_STATE_DRAGGING]); | ||
1558 | 1492 | + } | ||
1559 | 1493 | + cursor[SP_KNOT_STATE_DRAGGING] = dragging; | ||
1560 | 1494 | + if (dragging) { | ||
1561 | 1495 | + gdk_cursor_ref(dragging); | ||
1562 | 1496 | + } | ||
1563 | 1497 | + } | ||
1564 | 1498 | + | ||
1565 | 1499 | +}; | ||
1566 | 1500 | + | ||
1567 | 1501 | +/// The SPKnot vtable. | ||
1568 | 1502 | +struct SPKnotClass { | ||
1569 | 1503 | + GObjectClass parent_class; | ||
1570 | 1504 | + gint (* event) (SPKnot *knot, GdkEvent *event); | ||
1571 | 1505 | + | ||
1572 | 1506 | + /* | ||
1573 | 1507 | + * These are unconditional. | ||
1574 | 1508 | + */ | ||
1575 | 1509 | + | ||
1576 | 1510 | + void (* clicked) (SPKnot *knot, guint state); | ||
1577 | 1511 | + void (* doubleclicked) (SPKnot *knot, guint state); | ||
1578 | 1512 | + void (* grabbed) (SPKnot *knot, guint state); | ||
1579 | 1513 | + void (* ungrabbed) (SPKnot *knot, guint state); | ||
1580 | 1514 | + void (* moved) (SPKnot *knot, Geom::Point const &position, guint state); | ||
1581 | 1515 | + void (* stamped) (SPKnot *know, guint state); | ||
1582 | 1516 | + | ||
1583 | 1517 | + /** Request knot to move to absolute position. */ | ||
1584 | 1518 | + bool (* request) (SPKnot *knot, Geom::Point const &pos, guint state); | ||
1585 | 1519 | + | ||
1586 | 1520 | + /** Find complex distance from knot to point. */ | ||
1587 | 1521 | + gdouble (* distance) (SPKnot *knot, Geom::Point const &pos, guint state); | ||
1588 | 1522 | +}; | ||
1589 | 1523 | + | ||
1590 | 1524 | +GType sp_knot_get_type(); | ||
1591 | 1525 | + | ||
1592 | 1526 | +SPKnot *sp_knot_new(SPDesktop *desktop, gchar const *tip = NULL); | ||
1593 | 1527 | + | ||
1594 | 1528 | +#define SP_KNOT_IS_VISIBLE(k) ((k->flags & SP_KNOT_VISIBLE) != 0) | ||
1595 | 1529 | +#define SP_KNOT_IS_MOUSEOVER(k) ((k->flags & SP_KNOT_MOUSEOVER) != 0) | ||
1596 | 1530 | +#define SP_KNOT_IS_DRAGGING(k) ((k->flags & SP_KNOT_DRAGGING) != 0) | ||
1597 | 1531 | +#define SP_KNOT_IS_GRABBED(k) ((k->flags & SP_KNOT_GRABBED) != 0) | ||
1598 | 1532 | + | ||
1599 | 1533 | +void sp_knot_show(SPKnot *knot); | ||
1600 | 1534 | +void sp_knot_hide(SPKnot *knot); | ||
1601 | 1535 | + | ||
1602 | 1536 | +void sp_knot_set_flag(SPKnot *knot, guint flag, bool set); | ||
1603 | 1537 | +void sp_knot_update_ctrl(SPKnot *knot); | ||
1604 | 1538 | + | ||
1605 | 1539 | +void sp_knot_request_position(SPKnot *knot, Geom::Point const &pos, guint state); | ||
1606 | 1540 | +gdouble sp_knot_distance(SPKnot *knot, Geom::Point const &p, guint state); | ||
1607 | 1541 | + | ||
1608 | 1542 | +void sp_knot_start_dragging(SPKnot *knot, Geom::Point const &p, gint x, gint y, guint32 etime); | ||
1609 | 1543 | + | ||
1610 | 1544 | +/** Moves knot and emits "moved" signal. */ | ||
1611 | 1545 | +void sp_knot_set_position(SPKnot *knot, Geom::Point const &p, guint state); | ||
1612 | 1546 | + | ||
1613 | 1547 | +/** Moves knot without any signal. */ | ||
1614 | 1548 | +void sp_knot_moveto(SPKnot *knot, Geom::Point const &p); | ||
1615 | 1549 | + | ||
1616 | 1550 | +void sp_knot_handler_request_position(GdkEvent *event, SPKnot *knot); | ||
1617 | 1551 | +Geom::Point sp_knot_position(SPKnot const *knot); | ||
1618 | 1552 | + | ||
1619 | 1553 | + | ||
1620 | 1554 | +#endif /* !__SP_KNOT_H__ */ | ||
1621 | 1555 | + | ||
1622 | 1556 | +/* | ||
1623 | 1557 | + Local Variables: | ||
1624 | 1558 | + mode:c++ | ||
1625 | 1559 | + c-file-style:"stroustrup" | ||
1626 | 1560 | + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) | ||
1627 | 1561 | + indent-tabs-mode:nil | ||
1628 | 1562 | + fill-column:99 | ||
1629 | 1563 | + End: | ||
1630 | 1564 | +*/ | ||
1631 | 1565 | +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : | ||
1632 | 1566 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/libavoid/geomtypes.h inkscape-0.48.1/src/libavoid/geomtypes.h | ||
1633 | 1567 | --- inkscape-0.48.1~/src/libavoid/geomtypes.h 2010-07-13 04:48:40.000000000 +0100 | ||
1634 | 1568 | +++ inkscape-0.48.1/src/libavoid/geomtypes.h 2011-05-01 00:56:19.601250878 +0100 | ||
1635 | 1569 | @@ -29,6 +29,7 @@ | ||
1636 | 1570 | #ifndef AVOID_GEOMTYPES_H | ||
1637 | 1571 | #define AVOID_GEOMTYPES_H | ||
1638 | 1572 | |||
1639 | 1573 | +#include <cstddef> | ||
1640 | 1574 | #include <vector> | ||
1641 | 1575 | #include <utility> | ||
1642 | 1576 | |||
1643 | 1577 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/live_effects/lpeobject-reference.h inkscape-0.48.1/src/live_effects/lpeobject-reference.h | ||
1644 | 1578 | --- inkscape-0.48.1~/src/live_effects/lpeobject-reference.h 2010-07-13 04:48:40.000000000 +0100 | ||
1645 | 1579 | +++ inkscape-0.48.1/src/live_effects/lpeobject-reference.h 2011-05-01 00:56:19.601250878 +0100 | ||
1646 | 1580 | @@ -11,6 +11,7 @@ | ||
1647 | 1581 | |||
1648 | 1582 | #include <forward.h> | ||
1649 | 1583 | #include <uri-references.h> | ||
1650 | 1584 | +#include <stddef.h> | ||
1651 | 1585 | #include <sigc++/sigc++.h> | ||
1652 | 1586 | |||
1653 | 1587 | namespace Inkscape { | ||
1654 | 1588 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/live_effects/parameter/path-reference.h inkscape-0.48.1/src/live_effects/parameter/path-reference.h | ||
1655 | 1589 | --- inkscape-0.48.1~/src/live_effects/parameter/path-reference.h 2010-07-13 04:48:40.000000000 +0100 | ||
1656 | 1590 | +++ inkscape-0.48.1/src/live_effects/parameter/path-reference.h 2011-05-01 00:56:19.601250878 +0100 | ||
1657 | 1591 | @@ -11,6 +11,7 @@ | ||
1658 | 1592 | |||
1659 | 1593 | #include <forward.h> | ||
1660 | 1594 | #include <uri-references.h> | ||
1661 | 1595 | +#include <stddef.h> | ||
1662 | 1596 | #include <sigc++/sigc++.h> | ||
1663 | 1597 | |||
1664 | 1598 | class Path; | ||
1665 | 1599 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/live_effects/parameter/path-reference.h.orig inkscape-0.48.1/src/live_effects/parameter/path-reference.h.orig | ||
1666 | 1600 | --- inkscape-0.48.1~/src/live_effects/parameter/path-reference.h.orig 1970-01-01 01:00:00.000000000 +0100 | ||
1667 | 1601 | +++ inkscape-0.48.1/src/live_effects/parameter/path-reference.h.orig 2010-07-13 04:48:40.000000000 +0100 | ||
1668 | 1602 | @@ -0,0 +1,60 @@ | ||
1669 | 1603 | +#ifndef SEEN_LPE_PATH_REFERENCE_H | ||
1670 | 1604 | +#define SEEN_LPE_PATH_REFERENCE_H | ||
1671 | 1605 | + | ||
1672 | 1606 | +/* | ||
1673 | 1607 | + * The reference corresponding to href of LPE PathParam. | ||
1674 | 1608 | + * | ||
1675 | 1609 | + * Copyright (C) 2008 Johan Engelen | ||
1676 | 1610 | + * | ||
1677 | 1611 | + * Released under GNU GPL, read the file 'COPYING' for more information. | ||
1678 | 1612 | + */ | ||
1679 | 1613 | + | ||
1680 | 1614 | +#include <forward.h> | ||
1681 | 1615 | +#include <uri-references.h> | ||
1682 | 1616 | +#include <sigc++/sigc++.h> | ||
1683 | 1617 | + | ||
1684 | 1618 | +class Path; | ||
1685 | 1619 | + | ||
1686 | 1620 | +namespace Inkscape { | ||
1687 | 1621 | + | ||
1688 | 1622 | +namespace XML { | ||
1689 | 1623 | + struct Node; | ||
1690 | 1624 | +} | ||
1691 | 1625 | + | ||
1692 | 1626 | +namespace LivePathEffect { | ||
1693 | 1627 | + | ||
1694 | 1628 | + | ||
1695 | 1629 | +class PathReference : public Inkscape::URIReference { | ||
1696 | 1630 | +public: | ||
1697 | 1631 | + PathReference(SPObject *owner) : URIReference(owner) {} | ||
1698 | 1632 | + | ||
1699 | 1633 | + SPItem *getObject() const { | ||
1700 | 1634 | + return (SPItem *)URIReference::getObject(); | ||
1701 | 1635 | + } | ||
1702 | 1636 | + | ||
1703 | 1637 | +protected: | ||
1704 | 1638 | + virtual bool _acceptObject(SPObject * const obj) const; | ||
1705 | 1639 | + | ||
1706 | 1640 | +private: | ||
1707 | 1641 | + PathReference(const PathReference&); | ||
1708 | 1642 | + PathReference& operator=(const PathReference&); | ||
1709 | 1643 | +}; | ||
1710 | 1644 | + | ||
1711 | 1645 | +} // namespace LivePathEffect | ||
1712 | 1646 | + | ||
1713 | 1647 | +} // namespace Inkscape | ||
1714 | 1648 | + | ||
1715 | 1649 | + | ||
1716 | 1650 | + | ||
1717 | 1651 | +#endif /* !SEEN_LPE_PATH_REFERENCE_H */ | ||
1718 | 1652 | + | ||
1719 | 1653 | +/* | ||
1720 | 1654 | + Local Variables: | ||
1721 | 1655 | + mode:c++ | ||
1722 | 1656 | + c-file-style:"stroustrup" | ||
1723 | 1657 | + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) | ||
1724 | 1658 | + indent-tabs-mode:nil | ||
1725 | 1659 | + fill-column:99 | ||
1726 | 1660 | + End: | ||
1727 | 1661 | +*/ | ||
1728 | 1662 | +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : | ||
1729 | 1663 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/live_effects/parameter/path.h inkscape-0.48.1/src/live_effects/parameter/path.h | ||
1730 | 1664 | --- inkscape-0.48.1~/src/live_effects/parameter/path.h 2010-07-13 04:48:40.000000000 +0100 | ||
1731 | 1665 | +++ inkscape-0.48.1/src/live_effects/parameter/path.h 2011-05-01 00:56:19.601250878 +0100 | ||
1732 | 1666 | @@ -16,6 +16,7 @@ | ||
1733 | 1667 | |||
1734 | 1668 | #include "live_effects/parameter/parameter.h" | ||
1735 | 1669 | #include "live_effects/parameter/path-reference.h" | ||
1736 | 1670 | +#include <stddef.h> | ||
1737 | 1671 | #include <sigc++/sigc++.h> | ||
1738 | 1672 | |||
1739 | 1673 | namespace Inkscape { | ||
1740 | 1674 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/message-stack.h inkscape-0.48.1/src/message-stack.h | ||
1741 | 1675 | --- inkscape-0.48.1~/src/message-stack.h 2010-07-13 04:48:40.000000000 +0100 | ||
1742 | 1676 | +++ inkscape-0.48.1/src/message-stack.h 2011-05-01 00:56:19.601250878 +0100 | ||
1743 | 1677 | @@ -14,6 +14,7 @@ | ||
1744 | 1678 | #ifndef SEEN_INKSCAPE_MESSAGE_STACK_H | ||
1745 | 1679 | #define SEEN_INKSCAPE_MESSAGE_STACK_H | ||
1746 | 1680 | |||
1747 | 1681 | +#include <stddef.h> | ||
1748 | 1682 | #include <sigc++/sigc++.h> | ||
1749 | 1683 | #include <glib.h> | ||
1750 | 1684 | #include <stdarg.h> | ||
1751 | 1685 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/object-hierarchy.h inkscape-0.48.1/src/object-hierarchy.h | ||
1752 | 1686 | --- inkscape-0.48.1~/src/object-hierarchy.h 2010-07-13 04:48:40.000000000 +0100 | ||
1753 | 1687 | +++ inkscape-0.48.1/src/object-hierarchy.h 2011-05-01 00:56:19.601250878 +0100 | ||
1754 | 1688 | @@ -14,6 +14,7 @@ | ||
1755 | 1689 | |||
1756 | 1690 | #include <exception> | ||
1757 | 1691 | #include <list> | ||
1758 | 1692 | +#include <stddef.h> | ||
1759 | 1693 | #include <sigc++/connection.h> | ||
1760 | 1694 | #include <sigc++/signal.h> | ||
1761 | 1695 | #include <glib/gmessages.h> | ||
1762 | 1696 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/persp3d-reference.h inkscape-0.48.1/src/persp3d-reference.h | ||
1763 | 1697 | --- inkscape-0.48.1~/src/persp3d-reference.h 2010-07-13 04:48:40.000000000 +0100 | ||
1764 | 1698 | +++ inkscape-0.48.1/src/persp3d-reference.h 2011-05-01 00:56:19.601250878 +0100 | ||
1765 | 1699 | @@ -11,6 +11,7 @@ | ||
1766 | 1700 | */ | ||
1767 | 1701 | |||
1768 | 1702 | #include "uri-references.h" | ||
1769 | 1703 | +#include <stddef.h> | ||
1770 | 1704 | #include <sigc++/sigc++.h> | ||
1771 | 1705 | #include "persp3d.h" | ||
1772 | 1706 | |||
1773 | 1707 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/rect-context.h inkscape-0.48.1/src/rect-context.h | ||
1774 | 1708 | --- inkscape-0.48.1~/src/rect-context.h 2010-07-13 04:48:40.000000000 +0100 | ||
1775 | 1709 | +++ inkscape-0.48.1/src/rect-context.h 2011-05-01 00:56:19.601250878 +0100 | ||
1776 | 1710 | @@ -14,6 +14,7 @@ | ||
1777 | 1711 | * Released under GNU GPL | ||
1778 | 1712 | */ | ||
1779 | 1713 | |||
1780 | 1714 | +#include <stddef.h> | ||
1781 | 1715 | #include <sigc++/sigc++.h> | ||
1782 | 1716 | #include "event-context.h" | ||
1783 | 1717 | #include "libnr/nr-point.h" | ||
1784 | 1718 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/selcue.h inkscape-0.48.1/src/selcue.h | ||
1785 | 1719 | --- inkscape-0.48.1~/src/selcue.h 2010-07-13 04:48:40.000000000 +0100 | ||
1786 | 1720 | +++ inkscape-0.48.1/src/selcue.h 2011-05-01 00:56:19.601250878 +0100 | ||
1787 | 1721 | @@ -14,6 +14,7 @@ | ||
1788 | 1722 | */ | ||
1789 | 1723 | |||
1790 | 1724 | #include <list> | ||
1791 | 1725 | +#include <stddef.h> | ||
1792 | 1726 | #include <sigc++/sigc++.h> | ||
1793 | 1727 | |||
1794 | 1728 | class SPDesktop; | ||
1795 | 1729 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/selection-describer.h inkscape-0.48.1/src/selection-describer.h | ||
1796 | 1730 | --- inkscape-0.48.1~/src/selection-describer.h 2010-07-13 04:48:40.000000000 +0100 | ||
1797 | 1731 | +++ inkscape-0.48.1/src/selection-describer.h 2011-05-01 00:56:19.601250878 +0100 | ||
1798 | 1732 | @@ -12,6 +12,7 @@ | ||
1799 | 1733 | #ifndef SEEN_INKSCAPE_SELECTION_DESCRIPTION_HANDLER_H | ||
1800 | 1734 | #define SEEN_INKSCAPE_SELECTION_DESCRIPTION_HANDLER_H | ||
1801 | 1735 | |||
1802 | 1736 | +#include <stddef.h> | ||
1803 | 1737 | #include <sigc++/sigc++.h> | ||
1804 | 1738 | #include "message-context.h" | ||
1805 | 1739 | |||
1806 | 1740 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/selection.h inkscape-0.48.1/src/selection.h | ||
1807 | 1741 | --- inkscape-0.48.1~/src/selection.h 2010-07-13 04:48:40.000000000 +0100 | ||
1808 | 1742 | +++ inkscape-0.48.1/src/selection.h 2011-05-01 00:56:19.601250878 +0100 | ||
1809 | 1743 | @@ -19,6 +19,7 @@ | ||
1810 | 1744 | #include <vector> | ||
1811 | 1745 | #include <map> | ||
1812 | 1746 | #include <list> | ||
1813 | 1747 | +#include <stddef.h> | ||
1814 | 1748 | #include <sigc++/sigc++.h> | ||
1815 | 1749 | |||
1816 | 1750 | //#include "libnr/nr-rect.h" | ||
1817 | 1751 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/seltrans.h inkscape-0.48.1/src/seltrans.h | ||
1818 | 1752 | --- inkscape-0.48.1~/src/seltrans.h 2010-07-13 04:48:40.000000000 +0100 | ||
1819 | 1753 | +++ inkscape-0.48.1/src/seltrans.h 2011-05-01 00:56:19.601250878 +0100 | ||
1820 | 1754 | @@ -15,6 +15,7 @@ | ||
1821 | 1755 | * Released under GNU GPL, read the file 'COPYING' for more information | ||
1822 | 1756 | */ | ||
1823 | 1757 | |||
1824 | 1758 | +#include <stddef.h> | ||
1825 | 1759 | #include <sigc++/sigc++.h> | ||
1826 | 1760 | #include <2geom/point.h> | ||
1827 | 1761 | #include <2geom/matrix.h> | ||
1828 | 1762 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/seltrans.h.orig inkscape-0.48.1/src/seltrans.h.orig | ||
1829 | 1763 | --- inkscape-0.48.1~/src/seltrans.h.orig 1970-01-01 01:00:00.000000000 +0100 | ||
1830 | 1764 | +++ inkscape-0.48.1/src/seltrans.h.orig 2010-07-13 04:48:40.000000000 +0100 | ||
1831 | 1765 | @@ -0,0 +1,196 @@ | ||
1832 | 1766 | +#ifndef __SELTRANS_H__ | ||
1833 | 1767 | +#define __SELTRANS_H__ | ||
1834 | 1768 | + | ||
1835 | 1769 | +/* | ||
1836 | 1770 | + * Helper object for transforming selected items | ||
1837 | 1771 | + * | ||
1838 | 1772 | + * Authors: | ||
1839 | 1773 | + * Lauris Kaplinski <lauris@kaplinski.com> | ||
1840 | 1774 | + * Carl Hetherington <inkscape@carlh.net> | ||
1841 | 1775 | + * Diederik van Lierop <mail@diedenrezi.nl> | ||
1842 | 1776 | + * | ||
1843 | 1777 | + * Copyright (C) 2006 Johan Engelen <johan@shouraizou.nl> | ||
1844 | 1778 | + * Copyright (C) 1999-2002 Lauris Kaplinski | ||
1845 | 1779 | + * | ||
1846 | 1780 | + * Released under GNU GPL, read the file 'COPYING' for more information | ||
1847 | 1781 | + */ | ||
1848 | 1782 | + | ||
1849 | 1783 | +#include <sigc++/sigc++.h> | ||
1850 | 1784 | +#include <2geom/point.h> | ||
1851 | 1785 | +#include <2geom/matrix.h> | ||
1852 | 1786 | +#include <2geom/rect.h> | ||
1853 | 1787 | +#include "knot.h" | ||
1854 | 1788 | +#include "forward.h" | ||
1855 | 1789 | +#include "selcue.h" | ||
1856 | 1790 | +#include "message-context.h" | ||
1857 | 1791 | +#include <vector> | ||
1858 | 1792 | +#include "sp-item.h" | ||
1859 | 1793 | + | ||
1860 | 1794 | +struct SPKnot; | ||
1861 | 1795 | +class SPDesktop; | ||
1862 | 1796 | +class SPCanvasItem; | ||
1863 | 1797 | +class SPSelTransHandle; | ||
1864 | 1798 | + | ||
1865 | 1799 | +namespace Inkscape | ||
1866 | 1800 | +{ | ||
1867 | 1801 | + | ||
1868 | 1802 | +Geom::Scale calcScaleFactors(Geom::Point const &initial_point, Geom::Point const &new_point, Geom::Point const &origin, bool const skew = false); | ||
1869 | 1803 | + | ||
1870 | 1804 | +namespace XML | ||
1871 | 1805 | +{ | ||
1872 | 1806 | + class Node; | ||
1873 | 1807 | +} | ||
1874 | 1808 | + | ||
1875 | 1809 | +class SelTrans | ||
1876 | 1810 | +{ | ||
1877 | 1811 | +public: | ||
1878 | 1812 | + SelTrans(SPDesktop *desktop); | ||
1879 | 1813 | + ~SelTrans(); | ||
1880 | 1814 | + | ||
1881 | 1815 | + Inkscape::MessageContext &messageContext() { | ||
1882 | 1816 | + return _message_context; | ||
1883 | 1817 | + } | ||
1884 | 1818 | + | ||
1885 | 1819 | + void increaseState(); | ||
1886 | 1820 | + void resetState(); | ||
1887 | 1821 | + void setCenter(Geom::Point const &p); | ||
1888 | 1822 | + void grab(Geom::Point const &p, gdouble x, gdouble y, bool show_handles, bool translating); | ||
1889 | 1823 | + void transform(Geom::Matrix const &rel_affine, Geom::Point const &norm); | ||
1890 | 1824 | + void ungrab(); | ||
1891 | 1825 | + void stamp(); | ||
1892 | 1826 | + void moveTo(Geom::Point const &xy, guint state); | ||
1893 | 1827 | + void stretch(SPSelTransHandle const &handle, Geom::Point &pt, guint state); | ||
1894 | 1828 | + void scale(Geom::Point &pt, guint state); | ||
1895 | 1829 | + void skew(SPSelTransHandle const &handle, Geom::Point &pt, guint state); | ||
1896 | 1830 | + void rotate(Geom::Point &pt, guint state); | ||
1897 | 1831 | + gboolean scaleRequest(Geom::Point &pt, guint state); | ||
1898 | 1832 | + gboolean stretchRequest(SPSelTransHandle const &handle, Geom::Point &pt, guint state); | ||
1899 | 1833 | + gboolean skewRequest(SPSelTransHandle const &handle, Geom::Point &pt, guint state); | ||
1900 | 1834 | + gboolean rotateRequest(Geom::Point &pt, guint state); | ||
1901 | 1835 | + gboolean centerRequest(Geom::Point &pt, guint state); | ||
1902 | 1836 | + | ||
1903 | 1837 | + gboolean handleRequest(SPKnot *knot, Geom::Point *position, guint state, SPSelTransHandle const &handle); | ||
1904 | 1838 | + void handleGrab(SPKnot *knot, guint state, SPSelTransHandle const &handle); | ||
1905 | 1839 | + void handleClick(SPKnot *knot, guint state, SPSelTransHandle const &handle); | ||
1906 | 1840 | + void handleNewEvent(SPKnot *knot, Geom::Point *position, guint state, SPSelTransHandle const &handle); | ||
1907 | 1841 | + | ||
1908 | 1842 | + enum Show | ||
1909 | 1843 | + { | ||
1910 | 1844 | + SHOW_CONTENT, | ||
1911 | 1845 | + SHOW_OUTLINE | ||
1912 | 1846 | + }; | ||
1913 | 1847 | + | ||
1914 | 1848 | + void setShow(Show s) { | ||
1915 | 1849 | + _show = s; | ||
1916 | 1850 | + } | ||
1917 | 1851 | + bool isEmpty() { | ||
1918 | 1852 | + return _empty; | ||
1919 | 1853 | + } | ||
1920 | 1854 | + bool isGrabbed() { | ||
1921 | 1855 | + return _grabbed; | ||
1922 | 1856 | + } | ||
1923 | 1857 | + bool centerIsVisible() { | ||
1924 | 1858 | + return ( _chandle && SP_KNOT_IS_VISIBLE (_chandle) ); | ||
1925 | 1859 | + } | ||
1926 | 1860 | + | ||
1927 | 1861 | +private: | ||
1928 | 1862 | + void _updateHandles(); | ||
1929 | 1863 | + void _updateVolatileState(); | ||
1930 | 1864 | + void _selChanged(Inkscape::Selection *selection); | ||
1931 | 1865 | + void _selModified(Inkscape::Selection *selection, guint flags); | ||
1932 | 1866 | + void _showHandles(SPKnot *knot[], SPSelTransHandle const handle[], gint num, | ||
1933 | 1867 | + gchar const *even_tip, gchar const *odd_tip); | ||
1934 | 1868 | + Geom::Point _getGeomHandlePos(Geom::Point const &visual_handle_pos); | ||
1935 | 1869 | + Geom::Point _calcAbsAffineDefault(Geom::Scale const default_scale); | ||
1936 | 1870 | + Geom::Point _calcAbsAffineGeom(Geom::Scale const geom_scale); | ||
1937 | 1871 | + void _keepClosestPointOnly(std::vector<Inkscape::SnapCandidatePoint> &points, const Geom::Point &reference); | ||
1938 | 1872 | + void _display_snapsource(); | ||
1939 | 1873 | + | ||
1940 | 1874 | + enum State { | ||
1941 | 1875 | + STATE_SCALE, //scale or stretch | ||
1942 | 1876 | + STATE_ROTATE //rotate or skew | ||
1943 | 1877 | + }; | ||
1944 | 1878 | + | ||
1945 | 1879 | + SPDesktop *_desktop; | ||
1946 | 1880 | + | ||
1947 | 1881 | + std::vector<SPItem *> _items; | ||
1948 | 1882 | + std::vector<SPItem const *> _items_const; | ||
1949 | 1883 | + std::vector<Geom::Matrix> _items_affines; | ||
1950 | 1884 | + std::vector<Geom::Point> _items_centers; | ||
1951 | 1885 | + | ||
1952 | 1886 | + std::vector<Inkscape::SnapCandidatePoint> _snap_points; | ||
1953 | 1887 | + std::vector<Inkscape::SnapCandidatePoint> _bbox_points; // the bbox point of the selection as a whole, i.e. max. 4 corners plus optionally some midpoints | ||
1954 | 1888 | + std::vector<Inkscape::SnapCandidatePoint> _bbox_points_for_translating; // the bbox points of each selected item, only to be used for translating | ||
1955 | 1889 | + | ||
1956 | 1890 | + Inkscape::SelCue _selcue; | ||
1957 | 1891 | + | ||
1958 | 1892 | + Inkscape::Selection *_selection; | ||
1959 | 1893 | + State _state; | ||
1960 | 1894 | + Show _show; | ||
1961 | 1895 | + | ||
1962 | 1896 | + bool _grabbed; | ||
1963 | 1897 | + bool _show_handles; | ||
1964 | 1898 | + bool _empty; | ||
1965 | 1899 | + bool _changed; | ||
1966 | 1900 | + | ||
1967 | 1901 | + SPItem::BBoxType _snap_bbox_type; | ||
1968 | 1902 | + | ||
1969 | 1903 | + Geom::OptRect _bbox; | ||
1970 | 1904 | + Geom::OptRect _approximate_bbox; | ||
1971 | 1905 | + Geom::OptRect _geometric_bbox; | ||
1972 | 1906 | + gdouble _strokewidth; | ||
1973 | 1907 | + | ||
1974 | 1908 | + Geom::Matrix _current_relative_affine; | ||
1975 | 1909 | + Geom::Matrix _absolute_affine; | ||
1976 | 1910 | + Geom::Matrix _relative_affine; | ||
1977 | 1911 | + /* According to Merriam - Webster's online dictionary | ||
1978 | 1912 | + * Affine: a transformation (as a translation, a rotation, or a uniform stretching) that carries straight | ||
1979 | 1913 | + * lines into straight lines and parallel lines into parallel lines but may alter distance between points | ||
1980 | 1914 | + * and angles between lines <affine geometry> | ||
1981 | 1915 | + */ | ||
1982 | 1916 | + | ||
1983 | 1917 | + Geom::Point _opposite; ///< opposite point to where a scale is taking place | ||
1984 | 1918 | + Geom::Point _opposite_for_specpoints; | ||
1985 | 1919 | + Geom::Point _opposite_for_bboxpoints; | ||
1986 | 1920 | + Geom::Point _origin_for_specpoints; | ||
1987 | 1921 | + Geom::Point _origin_for_bboxpoints; | ||
1988 | 1922 | + | ||
1989 | 1923 | + gdouble _handle_x; | ||
1990 | 1924 | + gdouble _handle_y; | ||
1991 | 1925 | + | ||
1992 | 1926 | + boost::optional<Geom::Point> _center; | ||
1993 | 1927 | + bool _center_is_set; ///< we've already set _center, no need to reread it from items | ||
1994 | 1928 | + | ||
1995 | 1929 | + SPKnot *_shandle[8]; | ||
1996 | 1930 | + SPKnot *_rhandle[8]; | ||
1997 | 1931 | + SPKnot *_chandle; | ||
1998 | 1932 | + SPCanvasItem *_norm; | ||
1999 | 1933 | + SPCanvasItem *_grip; | ||
2000 | 1934 | + SPCanvasItem *_l[4]; | ||
2001 | 1935 | + guint _sel_changed_id; | ||
2002 | 1936 | + guint _sel_modified_id; | ||
2003 | 1937 | + GSList *_stamp_cache; | ||
2004 | 1938 | + | ||
2005 | 1939 | + Geom::Point _origin; ///< position of origin for transforms | ||
2006 | 1940 | + Geom::Point _point; ///< original position of the knot being used for the current transform | ||
2007 | 1941 | + Geom::Point _point_geom; ///< original position of the knot being used for the current transform | ||
2008 | 1942 | + Inkscape::MessageContext _message_context; | ||
2009 | 1943 | + sigc::connection _sel_changed_connection; | ||
2010 | 1944 | + sigc::connection _sel_modified_connection; | ||
2011 | 1945 | +}; | ||
2012 | 1946 | + | ||
2013 | 1947 | +} | ||
2014 | 1948 | + | ||
2015 | 1949 | +#endif | ||
2016 | 1950 | + | ||
2017 | 1951 | + | ||
2018 | 1952 | +/* | ||
2019 | 1953 | + Local Variables: | ||
2020 | 1954 | + mode:c++ | ||
2021 | 1955 | + c-file-style:"stroustrup" | ||
2022 | 1956 | + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) | ||
2023 | 1957 | + indent-tabs-mode:nil | ||
2024 | 1958 | + fill-column:99 | ||
2025 | 1959 | + End: | ||
2026 | 1960 | +*/ | ||
2027 | 1961 | +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : | ||
2028 | 1962 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-conn-end-pair.h inkscape-0.48.1/src/sp-conn-end-pair.h | ||
2029 | 1963 | --- inkscape-0.48.1~/src/sp-conn-end-pair.h 2010-07-13 04:48:40.000000000 +0100 | ||
2030 | 1964 | +++ inkscape-0.48.1/src/sp-conn-end-pair.h 2011-05-01 00:56:19.611250878 +0100 | ||
2031 | 1965 | @@ -15,6 +15,7 @@ | ||
2032 | 1966 | |||
2033 | 1967 | #include "forward.h" | ||
2034 | 1968 | #include "libnr/nr-point.h" | ||
2035 | 1969 | +#include <stddef.h> | ||
2036 | 1970 | #include <sigc++/connection.h> | ||
2037 | 1971 | #include <sigc++/functors/slot.h> | ||
2038 | 1972 | #include <sigc++/signal.h> | ||
2039 | 1973 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-conn-end.h inkscape-0.48.1/src/sp-conn-end.h | ||
2040 | 1974 | --- inkscape-0.48.1~/src/sp-conn-end.h 2010-07-13 04:48:40.000000000 +0100 | ||
2041 | 1975 | +++ inkscape-0.48.1/src/sp-conn-end.h 2011-05-01 00:56:19.611250878 +0100 | ||
2042 | 1976 | @@ -2,6 +2,7 @@ | ||
2043 | 1977 | #define SEEN_SP_CONN_END | ||
2044 | 1978 | |||
2045 | 1979 | #include <glib/gtypes.h> | ||
2046 | 1980 | +#include <stddef.h> | ||
2047 | 1981 | #include <sigc++/connection.h> | ||
2048 | 1982 | |||
2049 | 1983 | #include "sp-use-reference.h" | ||
2050 | 1984 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-gradient.h inkscape-0.48.1/src/sp-gradient.h | ||
2051 | 1985 | --- inkscape-0.48.1~/src/sp-gradient.h 2010-08-04 17:45:00.000000000 +0100 | ||
2052 | 1986 | +++ inkscape-0.48.1/src/sp-gradient.h 2011-05-01 00:56:19.611250878 +0100 | ||
2053 | 1987 | @@ -25,6 +25,7 @@ | ||
2054 | 1988 | #include "sp-gradient-units.h" | ||
2055 | 1989 | #include "sp-gradient-vector.h" | ||
2056 | 1990 | |||
2057 | 1991 | +#include <stddef.h> | ||
2058 | 1992 | #include <sigc++/connection.h> | ||
2059 | 1993 | |||
2060 | 1994 | struct SPGradientReference; | ||
2061 | 1995 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-object.h inkscape-0.48.1/src/sp-object.h | ||
2062 | 1996 | --- inkscape-0.48.1~/src/sp-object.h 2010-07-13 04:48:40.000000000 +0100 | ||
2063 | 1997 | +++ inkscape-0.48.1/src/sp-object.h 2011-05-01 00:56:19.611250878 +0100 | ||
2064 | 1998 | @@ -56,6 +56,7 @@ | ||
2065 | 1999 | |||
2066 | 2000 | |||
2067 | 2001 | #include <glib-object.h> | ||
2068 | 2002 | +#include <stddef.h> | ||
2069 | 2003 | #include <sigc++/connection.h> | ||
2070 | 2004 | #include <sigc++/functors/slot.h> | ||
2071 | 2005 | #include <sigc++/signal.h> | ||
2072 | 2006 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-object.h.orig inkscape-0.48.1/src/sp-object.h.orig | ||
2073 | 2007 | --- inkscape-0.48.1~/src/sp-object.h.orig 1970-01-01 01:00:00.000000000 +0100 | ||
2074 | 2008 | +++ inkscape-0.48.1/src/sp-object.h.orig 2010-07-13 04:48:40.000000000 +0100 | ||
2075 | 2009 | @@ -0,0 +1,587 @@ | ||
2076 | 2010 | +#ifndef SP_OBJECT_H_SEEN | ||
2077 | 2011 | +#define SP_OBJECT_H_SEEN | ||
2078 | 2012 | + | ||
2079 | 2013 | +/** \file | ||
2080 | 2014 | + * Abstract base class for all nodes | ||
2081 | 2015 | + * | ||
2082 | 2016 | + * Authors: | ||
2083 | 2017 | + * Lauris Kaplinski <lauris@kaplinski.com> | ||
2084 | 2018 | + * | ||
2085 | 2019 | + * Copyright (C) 1999-2002 authors | ||
2086 | 2020 | + * Copyright (C) 2001-2002 Ximian, Inc. | ||
2087 | 2021 | + * | ||
2088 | 2022 | + * Released under GNU GPL, read the file 'COPYING' for more information | ||
2089 | 2023 | + */ | ||
2090 | 2024 | + | ||
2091 | 2025 | +/* SPObject flags */ | ||
2092 | 2026 | + | ||
2093 | 2027 | +/* Async modification flags */ | ||
2094 | 2028 | +#define SP_OBJECT_MODIFIED_FLAG (1 << 0) | ||
2095 | 2029 | +#define SP_OBJECT_CHILD_MODIFIED_FLAG (1 << 1) | ||
2096 | 2030 | +#define SP_OBJECT_PARENT_MODIFIED_FLAG (1 << 2) | ||
2097 | 2031 | +#define SP_OBJECT_STYLE_MODIFIED_FLAG (1 << 3) | ||
2098 | 2032 | +#define SP_OBJECT_VIEWPORT_MODIFIED_FLAG (1 << 4) | ||
2099 | 2033 | +#define SP_OBJECT_USER_MODIFIED_FLAG_A (1 << 5) | ||
2100 | 2034 | +#define SP_OBJECT_USER_MODIFIED_FLAG_B (1 << 6) | ||
2101 | 2035 | +#define SP_OBJECT_USER_MODIFIED_FLAG_C (1 << 7) | ||
2102 | 2036 | + | ||
2103 | 2037 | +/* Conveneience */ | ||
2104 | 2038 | +#define SP_OBJECT_FLAGS_ALL 0xff | ||
2105 | 2039 | + | ||
2106 | 2040 | +/* Flags that mark object as modified */ | ||
2107 | 2041 | +/* Object, Child, Style, Viewport, User */ | ||
2108 | 2042 | +#define SP_OBJECT_MODIFIED_STATE (SP_OBJECT_FLAGS_ALL & ~(SP_OBJECT_PARENT_MODIFIED_FLAG)) | ||
2109 | 2043 | + | ||
2110 | 2044 | +/* Flags that will propagate downstreams */ | ||
2111 | 2045 | +/* Parent, Style, Viewport, User */ | ||
2112 | 2046 | +#define SP_OBJECT_MODIFIED_CASCADE (SP_OBJECT_FLAGS_ALL & ~(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG)) | ||
2113 | 2047 | + | ||
2114 | 2048 | +/* Generic */ | ||
2115 | 2049 | +#define SP_OBJECT_IS_CLONED(o) (((SPObject *) (o))->cloned) | ||
2116 | 2050 | + | ||
2117 | 2051 | +/* Write flags */ | ||
2118 | 2052 | +#define SP_OBJECT_WRITE_BUILD (1 << 0) | ||
2119 | 2053 | +#define SP_OBJECT_WRITE_EXT (1 << 1) | ||
2120 | 2054 | +#define SP_OBJECT_WRITE_ALL (1 << 2) | ||
2121 | 2055 | + | ||
2122 | 2056 | +/* Convenience stuff */ | ||
2123 | 2057 | +#define SP_OBJECT_ID(o) (((SPObject *) (o))->getId()) | ||
2124 | 2058 | +#define SP_OBJECT_REPR(o) (((SPObject *) (o))->repr) | ||
2125 | 2059 | +#define SP_OBJECT_DOCUMENT(o) (((SPObject *) (o))->document) | ||
2126 | 2060 | +#define SP_OBJECT_PARENT(o) (((SPObject *) (o))->parent) | ||
2127 | 2061 | +#define SP_OBJECT_NEXT(o) (((SPObject *) (o))->next) | ||
2128 | 2062 | +#define SP_OBJECT_PREV(o) (sp_object_prev((SPObject *) (o))) | ||
2129 | 2063 | +#define SP_OBJECT_HREFCOUNT(o) (((SPObject *) (o))->hrefcount) | ||
2130 | 2064 | +#define SP_OBJECT_STYLE(o) (((SPObject *) (o))->style) | ||
2131 | 2065 | + | ||
2132 | 2066 | + | ||
2133 | 2067 | +#include <glib-object.h> | ||
2134 | 2068 | +#include <sigc++/connection.h> | ||
2135 | 2069 | +#include <sigc++/functors/slot.h> | ||
2136 | 2070 | +#include <sigc++/signal.h> | ||
2137 | 2071 | + | ||
2138 | 2072 | +#include "forward.h" | ||
2139 | 2073 | +#include "version.h" | ||
2140 | 2074 | +#include "util/forward-pointer-iterator.h" | ||
2141 | 2075 | + | ||
2142 | 2076 | +namespace Inkscape { | ||
2143 | 2077 | +namespace XML { | ||
2144 | 2078 | +class Node; | ||
2145 | 2079 | +class Document; | ||
2146 | 2080 | +} | ||
2147 | 2081 | +} | ||
2148 | 2082 | + | ||
2149 | 2083 | + | ||
2150 | 2084 | +typedef enum { | ||
2151 | 2085 | + SP_NO_EXCEPTION, | ||
2152 | 2086 | + SP_INDEX_SIZE_ERR, | ||
2153 | 2087 | + SP_DOMSTRING_SIZE_ERR, | ||
2154 | 2088 | + SP_HIERARCHY_REQUEST_ERR, | ||
2155 | 2089 | + SP_WRONG_DOCUMENT_ERR, | ||
2156 | 2090 | + SP_INVALID_CHARACTER_ERR, | ||
2157 | 2091 | + SP_NO_DATA_ALLOWED_ERR, | ||
2158 | 2092 | + SP_NO_MODIFICATION_ALLOWED_ERR, | ||
2159 | 2093 | + SP_NOT_FOUND_ERR, | ||
2160 | 2094 | + SP_NOT_SUPPORTED_ERR, | ||
2161 | 2095 | + SP_INUSE_ATTRIBUTE_ERR, | ||
2162 | 2096 | + SP_INVALID_STATE_ERR, | ||
2163 | 2097 | + SP_SYNTAX_ERR, | ||
2164 | 2098 | + SP_INVALID_MODIFICATION_ERR, | ||
2165 | 2099 | + SP_NAMESPACE_ERR, | ||
2166 | 2100 | + SP_INVALID_ACCESS_ERR | ||
2167 | 2101 | +} SPExceptionType; | ||
2168 | 2102 | + | ||
2169 | 2103 | +class SPException; | ||
2170 | 2104 | + | ||
2171 | 2105 | +/// An attempt to implement exceptions, unused? | ||
2172 | 2106 | +struct SPException { | ||
2173 | 2107 | + SPExceptionType code; | ||
2174 | 2108 | +}; | ||
2175 | 2109 | + | ||
2176 | 2110 | +#define SP_EXCEPTION_INIT(ex) {(ex)->code = SP_NO_EXCEPTION;} | ||
2177 | 2111 | +#define SP_EXCEPTION_IS_OK(ex) (!(ex) || ((ex)->code == SP_NO_EXCEPTION)) | ||
2178 | 2112 | + | ||
2179 | 2113 | +class SPCtx; | ||
2180 | 2114 | + | ||
2181 | 2115 | +/// Unused | ||
2182 | 2116 | +struct SPCtx { | ||
2183 | 2117 | + unsigned int flags; | ||
2184 | 2118 | +}; | ||
2185 | 2119 | + | ||
2186 | 2120 | +enum { | ||
2187 | 2121 | + SP_XML_SPACE_DEFAULT, | ||
2188 | 2122 | + SP_XML_SPACE_PRESERVE | ||
2189 | 2123 | +}; | ||
2190 | 2124 | + | ||
2191 | 2125 | +class SPIXmlSpace; | ||
2192 | 2126 | + | ||
2193 | 2127 | +/// Internal class consisting of two bits. | ||
2194 | 2128 | +struct SPIXmlSpace { | ||
2195 | 2129 | + guint set : 1; | ||
2196 | 2130 | + guint value : 1; | ||
2197 | 2131 | +}; | ||
2198 | 2132 | + | ||
2199 | 2133 | +class SPObject; | ||
2200 | 2134 | + | ||
2201 | 2135 | +/* | ||
2202 | 2136 | + * Refcounting | ||
2203 | 2137 | + * | ||
2204 | 2138 | + * Owner is here for debug reasons, you can set it to NULL safely | ||
2205 | 2139 | + * Ref should return object, NULL is error, unref return always NULL | ||
2206 | 2140 | + */ | ||
2207 | 2141 | + | ||
2208 | 2142 | +SPObject *sp_object_ref(SPObject *object, SPObject *owner=NULL); | ||
2209 | 2143 | +SPObject *sp_object_unref(SPObject *object, SPObject *owner=NULL); | ||
2210 | 2144 | + | ||
2211 | 2145 | +SPObject *sp_object_href(SPObject *object, gpointer owner); | ||
2212 | 2146 | +SPObject *sp_object_hunref(SPObject *object, gpointer owner); | ||
2213 | 2147 | + | ||
2214 | 2148 | +/// A refcounting tree node object. | ||
2215 | 2149 | +struct SPObject : public GObject { | ||
2216 | 2150 | + enum CollectionPolicy { | ||
2217 | 2151 | + COLLECT_WITH_PARENT, | ||
2218 | 2152 | + ALWAYS_COLLECT | ||
2219 | 2153 | + }; | ||
2220 | 2154 | + | ||
2221 | 2155 | + unsigned int cloned : 1; | ||
2222 | 2156 | + unsigned int uflags : 8; | ||
2223 | 2157 | + unsigned int mflags : 8; | ||
2224 | 2158 | + SPIXmlSpace xml_space; | ||
2225 | 2159 | + unsigned int hrefcount; /* number of xlink:href references */ | ||
2226 | 2160 | + unsigned int _total_hrefcount; /* our hrefcount + total descendants */ | ||
2227 | 2161 | + SPDocument *document; /* Document we are part of */ | ||
2228 | 2162 | + SPObject *parent; /* Our parent (only one allowed) */ | ||
2229 | 2163 | + SPObject *children; /* Our children */ | ||
2230 | 2164 | + SPObject *_last_child; /* Remembered last child */ | ||
2231 | 2165 | + SPObject *next; /* Next object in linked list */ | ||
2232 | 2166 | + Inkscape::XML::Node *repr; /* Our xml representation */ | ||
2233 | 2167 | + | ||
2234 | 2168 | +private: | ||
2235 | 2169 | + gchar *id; /* Our very own unique id */ | ||
2236 | 2170 | +public: | ||
2237 | 2171 | + | ||
2238 | 2172 | + /** | ||
2239 | 2173 | + * Returns the objects current ID string. | ||
2240 | 2174 | + */ | ||
2241 | 2175 | + gchar const* getId() const; | ||
2242 | 2176 | + | ||
2243 | 2177 | + /** @brief cleans up an SPObject, releasing its references and | ||
2244 | 2178 | + * requesting that references to it be released | ||
2245 | 2179 | + */ | ||
2246 | 2180 | + void releaseReferences(); | ||
2247 | 2181 | + | ||
2248 | 2182 | + /** @brief connects to the release request signal | ||
2249 | 2183 | + * | ||
2250 | 2184 | + * @param slot the slot to connect | ||
2251 | 2185 | + * | ||
2252 | 2186 | + * @returns the sigc::connection formed | ||
2253 | 2187 | + */ | ||
2254 | 2188 | + sigc::connection connectRelease(sigc::slot<void, SPObject *> slot) { | ||
2255 | 2189 | + return _release_signal.connect(slot); | ||
2256 | 2190 | + } | ||
2257 | 2191 | + | ||
2258 | 2192 | + /** | ||
2259 | 2193 | + * Represents the style properties, whether from presentation attributes, the <tt>style</tt> | ||
2260 | 2194 | + * attribute, or inherited. | ||
2261 | 2195 | + * | ||
2262 | 2196 | + * sp_object_private_set doesn't handle SP_ATTR_STYLE or any presentation attributes at the | ||
2263 | 2197 | + * time of writing, so this is probably NULL for all SPObject's that aren't an SPItem. | ||
2264 | 2198 | + * | ||
2265 | 2199 | + * However, this gives rise to the bugs mentioned in sp_object_get_style_property. | ||
2266 | 2200 | + * Note that some non-SPItem SPObject's, such as SPStop, do need styling information, | ||
2267 | 2201 | + * and need to inherit properties even through other non-SPItem parents like \<defs\>. | ||
2268 | 2202 | + */ | ||
2269 | 2203 | + SPStyle *style; | ||
2270 | 2204 | + | ||
2271 | 2205 | + /// Switch containing next() method. | ||
2272 | 2206 | + struct ParentIteratorStrategy { | ||
2273 | 2207 | + static SPObject const *next(SPObject const *object) { | ||
2274 | 2208 | + return object->parent; | ||
2275 | 2209 | + } | ||
2276 | 2210 | + }; | ||
2277 | 2211 | + /// Switch containing next() method. | ||
2278 | 2212 | + struct SiblingIteratorStrategy { | ||
2279 | 2213 | + static SPObject const *next(SPObject const *object) { | ||
2280 | 2214 | + return object->next; | ||
2281 | 2215 | + } | ||
2282 | 2216 | + }; | ||
2283 | 2217 | + | ||
2284 | 2218 | + typedef Inkscape::Util::ForwardPointerIterator<SPObject, ParentIteratorStrategy> ParentIterator; | ||
2285 | 2219 | + typedef Inkscape::Util::ForwardPointerIterator<SPObject const, ParentIteratorStrategy> ConstParentIterator; | ||
2286 | 2220 | + typedef Inkscape::Util::ForwardPointerIterator<SPObject, SiblingIteratorStrategy> SiblingIterator; | ||
2287 | 2221 | + typedef Inkscape::Util::ForwardPointerIterator<SPObject const, SiblingIteratorStrategy> ConstSiblingIterator; | ||
2288 | 2222 | + | ||
2289 | 2223 | + bool isSiblingOf(SPObject const *object) const { | ||
2290 | 2224 | + g_return_val_if_fail(object != NULL, false); | ||
2291 | 2225 | + return this->parent && this->parent == object->parent; | ||
2292 | 2226 | + } | ||
2293 | 2227 | + bool isAncestorOf(SPObject const *object) const; | ||
2294 | 2228 | + | ||
2295 | 2229 | + SPObject const *nearestCommonAncestor(SPObject const *object) const; | ||
2296 | 2230 | + /* A non-const version can be similarly constructed if you want one. | ||
2297 | 2231 | + * (Don't just cast away the constness, which would be ill-formed.) */ | ||
2298 | 2232 | + | ||
2299 | 2233 | + SPObject *getNext(); | ||
2300 | 2234 | + SPObject *getPrev(); | ||
2301 | 2235 | + | ||
2302 | 2236 | + bool hasChildren() const { return ( children != NULL ); } | ||
2303 | 2237 | + | ||
2304 | 2238 | + SPObject *firstChild() { return children; } | ||
2305 | 2239 | + SPObject const *firstChild() const { return children; } | ||
2306 | 2240 | + SPObject *lastChild() { return _last_child; } | ||
2307 | 2241 | + SPObject const *lastChild() const { return _last_child; } | ||
2308 | 2242 | + | ||
2309 | 2243 | + enum Action { ActionGeneral, ActionBBox, ActionUpdate, ActionShow }; | ||
2310 | 2244 | + /** @brief Retrieves children as a GSList */ | ||
2311 | 2245 | + GSList *childList(bool add_ref, Action action = ActionGeneral); | ||
2312 | 2246 | + | ||
2313 | 2247 | + SPObject *appendChildRepr(Inkscape::XML::Node *repr); | ||
2314 | 2248 | + | ||
2315 | 2249 | + /** @brief Gets the author-visible label for this object. */ | ||
2316 | 2250 | + gchar const *label() const; | ||
2317 | 2251 | + /** @brief Returns a default label for this object. */ | ||
2318 | 2252 | + gchar const *defaultLabel() const; | ||
2319 | 2253 | + /** @brief Sets the author-visible label for this object. | ||
2320 | 2254 | + * | ||
2321 | 2255 | + * Sets the author-visible label for the object. | ||
2322 | 2256 | + * | ||
2323 | 2257 | + * @param label the new label | ||
2324 | 2258 | + */ | ||
2325 | 2259 | + void setLabel(gchar const *label); | ||
2326 | 2260 | + | ||
2327 | 2261 | + /** Retrieves the title of this object */ | ||
2328 | 2262 | + gchar *title() const; | ||
2329 | 2263 | + /** Sets the title of this object */ | ||
2330 | 2264 | + bool setTitle(gchar const *title, bool verbatim=false); | ||
2331 | 2265 | + | ||
2332 | 2266 | + /** Retrieves the description of this object */ | ||
2333 | 2267 | + gchar *desc() const; | ||
2334 | 2268 | + /** Sets the description of this object */ | ||
2335 | 2269 | + bool setDesc(gchar const *desc, bool verbatim=false); | ||
2336 | 2270 | + | ||
2337 | 2271 | + /** @brief Set the policy under which this object will be | ||
2338 | 2272 | + * orphan-collected. | ||
2339 | 2273 | + * | ||
2340 | 2274 | + * Orphan-collection is the process of deleting all objects which no longer have | ||
2341 | 2275 | + * hyper-references pointing to them. The policy determines when this happens. Many objects | ||
2342 | 2276 | + * should not be deleted simply because they are no longer referred to; other objects (like | ||
2343 | 2277 | + * "intermediate" gradients) are more or less throw-away and should always be collected when no | ||
2344 | 2278 | + * longer in use. | ||
2345 | 2279 | + * | ||
2346 | 2280 | + * Along these lines, there are currently two orphan-collection policies: | ||
2347 | 2281 | + * | ||
2348 | 2282 | + * COLLECT_WITH_PARENT - don't worry about the object's hrefcount; | ||
2349 | 2283 | + * if its parent is collected, this object | ||
2350 | 2284 | + * will be too | ||
2351 | 2285 | + * | ||
2352 | 2286 | + * COLLECT_ALWAYS - always collect the object as soon as its | ||
2353 | 2287 | + * hrefcount reaches zero | ||
2354 | 2288 | + * | ||
2355 | 2289 | + * @returns the current collection policy in effect for this object | ||
2356 | 2290 | + */ | ||
2357 | 2291 | + CollectionPolicy collectionPolicy() const { return _collection_policy; } | ||
2358 | 2292 | + | ||
2359 | 2293 | + /** @brief Sets the orphan-collection policy in effect for this object. | ||
2360 | 2294 | + * | ||
2361 | 2295 | + * @see SPObject::collectionPolicy | ||
2362 | 2296 | + * | ||
2363 | 2297 | + * @param policy the new policy to adopt | ||
2364 | 2298 | + */ | ||
2365 | 2299 | + void setCollectionPolicy(CollectionPolicy policy) { | ||
2366 | 2300 | + _collection_policy = policy; | ||
2367 | 2301 | + } | ||
2368 | 2302 | + | ||
2369 | 2303 | + /** @brief Requests a later automatic call to collectOrphan(). | ||
2370 | 2304 | + * | ||
2371 | 2305 | + * This method requests that collectOrphan() be called during the document update cycle, | ||
2372 | 2306 | + * deleting the object if it is no longer used. | ||
2373 | 2307 | + * | ||
2374 | 2308 | + * If the current collection policy is COLLECT_WITH_PARENT, this function has no effect. | ||
2375 | 2309 | + * | ||
2376 | 2310 | + * @see SPObject::collectOrphan | ||
2377 | 2311 | + */ | ||
2378 | 2312 | + void requestOrphanCollection(); | ||
2379 | 2313 | + | ||
2380 | 2314 | + /** @brief Unconditionally delete the object if it is not referenced. | ||
2381 | 2315 | + * | ||
2382 | 2316 | + * Unconditionally delete the object if there are no outstanding hyper-references to it. | ||
2383 | 2317 | + * Observers are not notified of the object's deletion (at the SPObject level; XML tree | ||
2384 | 2318 | + * notifications still fire). | ||
2385 | 2319 | + * | ||
2386 | 2320 | + * @see SPObject::deleteObject | ||
2387 | 2321 | + */ | ||
2388 | 2322 | + void collectOrphan() { | ||
2389 | 2323 | + if ( _total_hrefcount == 0 ) { | ||
2390 | 2324 | + deleteObject(false); | ||
2391 | 2325 | + } | ||
2392 | 2326 | + } | ||
2393 | 2327 | + | ||
2394 | 2328 | + /** @brief Check if object is referenced by any other object. | ||
2395 | 2329 | + */ | ||
2396 | 2330 | + bool isReferenced() { return ( _total_hrefcount > 0 ); } | ||
2397 | 2331 | + | ||
2398 | 2332 | + /** @brief Deletes an object. | ||
2399 | 2333 | + * | ||
2400 | 2334 | + * Detaches the object's repr, and optionally sends notification that the object has been | ||
2401 | 2335 | + * deleted. | ||
2402 | 2336 | + * | ||
2403 | 2337 | + * @param propagate notify observers that the object has been deleted? | ||
2404 | 2338 | + * | ||
2405 | 2339 | + * @param propagate_descendants notify observers of children that they have been deleted? | ||
2406 | 2340 | + */ | ||
2407 | 2341 | + void deleteObject(bool propagate, bool propagate_descendants); | ||
2408 | 2342 | + | ||
2409 | 2343 | + /** @brief Deletes on object. | ||
2410 | 2344 | + * | ||
2411 | 2345 | + * @param propagate Notify observers of this object and its children that they have been | ||
2412 | 2346 | + * deleted? | ||
2413 | 2347 | + */ | ||
2414 | 2348 | + void deleteObject(bool propagate=true) { | ||
2415 | 2349 | + deleteObject(propagate, propagate); | ||
2416 | 2350 | + } | ||
2417 | 2351 | + | ||
2418 | 2352 | + /** @brief Connects a slot to be called when an object is deleted. | ||
2419 | 2353 | + * | ||
2420 | 2354 | + * This connects a slot to an object's internal delete signal, which is invoked when the object | ||
2421 | 2355 | + * is deleted | ||
2422 | 2356 | + * | ||
2423 | 2357 | + * The signal is mainly useful for e.g. knowing when to break hrefs or dissociate clones. | ||
2424 | 2358 | + * | ||
2425 | 2359 | + * @param slot the slot to connect | ||
2426 | 2360 | + * | ||
2427 | 2361 | + * @see SPObject::deleteObject | ||
2428 | 2362 | + */ | ||
2429 | 2363 | + sigc::connection connectDelete(sigc::slot<void, SPObject *> slot) { | ||
2430 | 2364 | + return _delete_signal.connect(slot); | ||
2431 | 2365 | + } | ||
2432 | 2366 | + | ||
2433 | 2367 | + sigc::connection connectPositionChanged(sigc::slot<void, SPObject *> slot) { | ||
2434 | 2368 | + return _position_changed_signal.connect(slot); | ||
2435 | 2369 | + } | ||
2436 | 2370 | + | ||
2437 | 2371 | + /** @brief Returns the object which supercedes this one (if any). | ||
2438 | 2372 | + * | ||
2439 | 2373 | + * This is mainly useful for ensuring we can correctly perform a series of moves or deletes, | ||
2440 | 2374 | + * even if the objects in question have been replaced in the middle of the sequence. | ||
2441 | 2375 | + */ | ||
2442 | 2376 | + SPObject *successor() { return _successor; } | ||
2443 | 2377 | + | ||
2444 | 2378 | + /** @brief Indicates that another object supercedes this one. */ | ||
2445 | 2379 | + void setSuccessor(SPObject *successor) { | ||
2446 | 2380 | + g_assert(successor != NULL); | ||
2447 | 2381 | + g_assert(_successor == NULL); | ||
2448 | 2382 | + g_assert(successor->_successor == NULL); | ||
2449 | 2383 | + sp_object_ref(successor, NULL); | ||
2450 | 2384 | + _successor = successor; | ||
2451 | 2385 | + } | ||
2452 | 2386 | + | ||
2453 | 2387 | + /* modifications; all three sets of methods should probably ultimately be protected, as they | ||
2454 | 2388 | + * are not really part of its public interface. However, other parts of the code to | ||
2455 | 2389 | + * occasionally use them at present. */ | ||
2456 | 2390 | + | ||
2457 | 2391 | + /* the no-argument version of updateRepr() is intended to be a bit more public, however -- it | ||
2458 | 2392 | + * essentially just flushes any changes back to the backing store (the repr layer); maybe it | ||
2459 | 2393 | + * should be called something else and made public at that point. */ | ||
2460 | 2394 | + | ||
2461 | 2395 | + /** @brief Updates the object's repr based on the object's state. | ||
2462 | 2396 | + * | ||
2463 | 2397 | + * This method updates the the repr attached to the object to reflect the object's current | ||
2464 | 2398 | + * state; see the three-argument version for details. | ||
2465 | 2399 | + * | ||
2466 | 2400 | + * @param flags object write flags that apply to this update | ||
2467 | 2401 | + * | ||
2468 | 2402 | + * @return the updated repr | ||
2469 | 2403 | + */ | ||
2470 | 2404 | + Inkscape::XML::Node *updateRepr(unsigned int flags=SP_OBJECT_WRITE_EXT); | ||
2471 | 2405 | + | ||
2472 | 2406 | + /** @brief Updates the given repr based on the object's state. | ||
2473 | 2407 | + * | ||
2474 | 2408 | + * This method updates the given repr to reflect the object's current state. There are | ||
2475 | 2409 | + * several flags that affect this: | ||
2476 | 2410 | + * | ||
2477 | 2411 | + * SP_OBJECT_WRITE_BUILD - create new reprs | ||
2478 | 2412 | + * | ||
2479 | 2413 | + * SP_OBJECT_WRITE_EXT - write elements and attributes | ||
2480 | 2414 | + * which are not part of pure SVG | ||
2481 | 2415 | + * (i.e. the Inkscape and Sodipodi | ||
2482 | 2416 | + * namespaces) | ||
2483 | 2417 | + * | ||
2484 | 2418 | + * SP_OBJECT_WRITE_ALL - create all nodes and attributes, | ||
2485 | 2419 | + * even those which might be redundant | ||
2486 | 2420 | + * | ||
2487 | 2421 | + * @param repr the repr to update | ||
2488 | 2422 | + * @param flags object write flags that apply to this update | ||
2489 | 2423 | + * | ||
2490 | 2424 | + * @return the updated repr | ||
2491 | 2425 | + */ | ||
2492 | 2426 | + Inkscape::XML::Node *updateRepr(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, unsigned int flags); | ||
2493 | 2427 | + | ||
2494 | 2428 | + /** @brief Queues an deferred update of this object's display. | ||
2495 | 2429 | + * | ||
2496 | 2430 | + * This method sets flags to indicate updates to be performed later, during the idle loop. | ||
2497 | 2431 | + * | ||
2498 | 2432 | + * There are several flags permitted here: | ||
2499 | 2433 | + * | ||
2500 | 2434 | + * SP_OBJECT_MODIFIED_FLAG - the object has been modified | ||
2501 | 2435 | + * | ||
2502 | 2436 | + * SP_OBJECT_CHILD_MODIFIED_FLAG - a child of the object has been | ||
2503 | 2437 | + * modified | ||
2504 | 2438 | + * | ||
2505 | 2439 | + * SP_OBJECT_STYLE_MODIFIED_FLAG - the object's style has been | ||
2506 | 2440 | + * modified | ||
2507 | 2441 | + * | ||
2508 | 2442 | + * There are also some subclass-specific modified flags which are hardly ever used. | ||
2509 | 2443 | + * | ||
2510 | 2444 | + * One of either MODIFIED or CHILD_MODIFIED is required. | ||
2511 | 2445 | + * | ||
2512 | 2446 | + * @param flags flags indicating what to update | ||
2513 | 2447 | + */ | ||
2514 | 2448 | + void requestDisplayUpdate(unsigned int flags); | ||
2515 | 2449 | + | ||
2516 | 2450 | + /** @brief Updates the object's display immediately | ||
2517 | 2451 | + * | ||
2518 | 2452 | + * This method is called during the idle loop by SPDocument in order to update the object's | ||
2519 | 2453 | + * display. | ||
2520 | 2454 | + * | ||
2521 | 2455 | + * One additional flag is legal here: | ||
2522 | 2456 | + * | ||
2523 | 2457 | + * SP_OBJECT_PARENT_MODIFIED_FLAG - the parent has been | ||
2524 | 2458 | + * modified | ||
2525 | 2459 | + * | ||
2526 | 2460 | + * @param ctx an SPCtx which accumulates various state | ||
2527 | 2461 | + * during the recursive update -- beware! some | ||
2528 | 2462 | + * subclasses try to cast this to an SPItemCtx * | ||
2529 | 2463 | + * | ||
2530 | 2464 | + * @param flags flags indicating what to update (in addition | ||
2531 | 2465 | + * to any already set flags) | ||
2532 | 2466 | + */ | ||
2533 | 2467 | + void updateDisplay(SPCtx *ctx, unsigned int flags); | ||
2534 | 2468 | + | ||
2535 | 2469 | + /** @brief Requests that a modification notification signal | ||
2536 | 2470 | + * be emitted later (e.g. during the idle loop) | ||
2537 | 2471 | + * | ||
2538 | 2472 | + * @param flags flags indicating what has been modified | ||
2539 | 2473 | + */ | ||
2540 | 2474 | + void requestModified(unsigned int flags); | ||
2541 | 2475 | + | ||
2542 | 2476 | + /** @brief Emits a modification notification signal | ||
2543 | 2477 | + * | ||
2544 | 2478 | + * @param flags indicating what has been modified | ||
2545 | 2479 | + */ | ||
2546 | 2480 | + void emitModified(unsigned int flags); | ||
2547 | 2481 | + | ||
2548 | 2482 | + /** @brief Connects to the modification notification signal | ||
2549 | 2483 | + * | ||
2550 | 2484 | + * @param slot the slot to connect | ||
2551 | 2485 | + * | ||
2552 | 2486 | + * @returns the connection formed thereby | ||
2553 | 2487 | + */ | ||
2554 | 2488 | + sigc::connection connectModified( | ||
2555 | 2489 | + sigc::slot<void, SPObject *, unsigned int> slot | ||
2556 | 2490 | + ) { | ||
2557 | 2491 | + return _modified_signal.connect(slot); | ||
2558 | 2492 | + } | ||
2559 | 2493 | + | ||
2560 | 2494 | + void _sendDeleteSignalRecursive(); | ||
2561 | 2495 | + void _updateTotalHRefCount(int increment); | ||
2562 | 2496 | + | ||
2563 | 2497 | + void _requireSVGVersion(unsigned major, unsigned minor) { | ||
2564 | 2498 | + _requireSVGVersion(Inkscape::Version(major, minor)); | ||
2565 | 2499 | + } | ||
2566 | 2500 | + void _requireSVGVersion(Inkscape::Version version); | ||
2567 | 2501 | + | ||
2568 | 2502 | + sigc::signal<void, SPObject *> _release_signal; | ||
2569 | 2503 | + sigc::signal<void, SPObject *> _delete_signal; | ||
2570 | 2504 | + sigc::signal<void, SPObject *> _position_changed_signal; | ||
2571 | 2505 | + sigc::signal<void, SPObject *, unsigned int> _modified_signal; | ||
2572 | 2506 | + SPObject *_successor; | ||
2573 | 2507 | + CollectionPolicy _collection_policy; | ||
2574 | 2508 | + gchar *_label; | ||
2575 | 2509 | + mutable gchar *_default_label; | ||
2576 | 2510 | + | ||
2577 | 2511 | +private: | ||
2578 | 2512 | + // Private member functions used in the definitions of setTitle(), | ||
2579 | 2513 | + // setDesc(), title() and desc(). | ||
2580 | 2514 | + bool setTitleOrDesc(gchar const *value, gchar const *svg_tagname, bool verbatim); | ||
2581 | 2515 | + gchar * getTitleOrDesc(gchar const *svg_tagname) const; | ||
2582 | 2516 | + SPObject * findFirstChild(gchar const *tagname) const; | ||
2583 | 2517 | + GString * textualContent() const; | ||
2584 | 2518 | + | ||
2585 | 2519 | + friend class SPObjectImpl; | ||
2586 | 2520 | +}; | ||
2587 | 2521 | + | ||
2588 | 2522 | +/// The SPObject vtable. | ||
2589 | 2523 | +struct SPObjectClass { | ||
2590 | 2524 | + GObjectClass parent_class; | ||
2591 | 2525 | + | ||
2592 | 2526 | + void (* build) (SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr); | ||
2593 | 2527 | + void (* release) (SPObject *object); | ||
2594 | 2528 | + | ||
2595 | 2529 | + /* Virtual handlers of repr signals */ | ||
2596 | 2530 | + void (* child_added) (SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref); | ||
2597 | 2531 | + void (* remove_child) (SPObject *object, Inkscape::XML::Node *child); | ||
2598 | 2532 | + | ||
2599 | 2533 | + void (* order_changed) (SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *old, Inkscape::XML::Node *new_repr); | ||
2600 | 2534 | + | ||
2601 | 2535 | + void (* set) (SPObject *object, unsigned int key, gchar const *value); | ||
2602 | 2536 | + | ||
2603 | 2537 | + void (* read_content) (SPObject *object); | ||
2604 | 2538 | + | ||
2605 | 2539 | + /* Update handler */ | ||
2606 | 2540 | + void (* update) (SPObject *object, SPCtx *ctx, unsigned int flags); | ||
2607 | 2541 | + /* Modification handler */ | ||
2608 | 2542 | + void (* modified) (SPObject *object, unsigned int flags); | ||
2609 | 2543 | + | ||
2610 | 2544 | + Inkscape::XML::Node * (* write) (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, unsigned int flags); | ||
2611 | 2545 | +}; | ||
2612 | 2546 | + | ||
2613 | 2547 | + | ||
2614 | 2548 | +/* | ||
2615 | 2549 | + * Attaching/detaching | ||
2616 | 2550 | + */ | ||
2617 | 2551 | + | ||
2618 | 2552 | +void sp_object_attach(SPObject *parent, SPObject *object, SPObject *prev); | ||
2619 | 2553 | +void sp_object_reorder(SPObject *object, SPObject *prev); | ||
2620 | 2554 | +void sp_object_detach(SPObject *parent, SPObject *object); | ||
2621 | 2555 | + | ||
2622 | 2556 | +inline SPObject *sp_object_first_child(SPObject *parent) { | ||
2623 | 2557 | + return parent->firstChild(); | ||
2624 | 2558 | +} | ||
2625 | 2559 | +SPObject *sp_object_get_child_by_repr(SPObject *object, Inkscape::XML::Node *repr); | ||
2626 | 2560 | + | ||
2627 | 2561 | +void sp_object_invoke_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr, unsigned int cloned); | ||
2628 | 2562 | + | ||
2629 | 2563 | +void sp_object_set(SPObject *object, unsigned int key, gchar const *value); | ||
2630 | 2564 | + | ||
2631 | 2565 | +void sp_object_read_attr(SPObject *object, gchar const *key); | ||
2632 | 2566 | + | ||
2633 | 2567 | +/* Public */ | ||
2634 | 2568 | + | ||
2635 | 2569 | +gchar const *sp_object_tagName_get(SPObject const *object, SPException *ex); | ||
2636 | 2570 | +gchar const *sp_object_getAttribute(SPObject const *object, gchar const *key, SPException *ex); | ||
2637 | 2571 | +void sp_object_setAttribute(SPObject *object, gchar const *key, gchar const *value, SPException *ex); | ||
2638 | 2572 | +void sp_object_removeAttribute(SPObject *object, gchar const *key, SPException *ex); | ||
2639 | 2573 | + | ||
2640 | 2574 | +/* Style */ | ||
2641 | 2575 | + | ||
2642 | 2576 | +gchar const *sp_object_get_style_property(SPObject const *object, | ||
2643 | 2577 | + gchar const *key, gchar const *def); | ||
2644 | 2578 | + | ||
2645 | 2579 | +int sp_object_compare_position(SPObject const *first, SPObject const *second); | ||
2646 | 2580 | + | ||
2647 | 2581 | +SPObject *sp_object_prev(SPObject *child); | ||
2648 | 2582 | + | ||
2649 | 2583 | + | ||
2650 | 2584 | +#endif // SP_OBJECT_H_SEEN | ||
2651 | 2585 | + | ||
2652 | 2586 | + | ||
2653 | 2587 | +/* | ||
2654 | 2588 | + Local Variables: | ||
2655 | 2589 | + mode:c++ | ||
2656 | 2590 | + c-file-style:"stroustrup" | ||
2657 | 2591 | + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) | ||
2658 | 2592 | + indent-tabs-mode:nil | ||
2659 | 2593 | + fill-column:99 | ||
2660 | 2594 | + End: | ||
2661 | 2595 | +*/ | ||
2662 | 2596 | +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : | ||
2663 | 2597 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-offset.h inkscape-0.48.1/src/sp-offset.h | ||
2664 | 2598 | --- inkscape-0.48.1~/src/sp-offset.h 2010-07-13 04:48:40.000000000 +0100 | ||
2665 | 2599 | +++ inkscape-0.48.1/src/sp-offset.h 2011-05-01 00:56:19.611250878 +0100 | ||
2666 | 2600 | @@ -16,6 +16,7 @@ | ||
2667 | 2601 | |||
2668 | 2602 | #include "sp-shape.h" | ||
2669 | 2603 | |||
2670 | 2604 | +#include <stddef.h> | ||
2671 | 2605 | #include <sigc++/sigc++.h> | ||
2672 | 2606 | |||
2673 | 2607 | #define SP_TYPE_OFFSET (sp_offset_get_type ()) | ||
2674 | 2608 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-pattern.h inkscape-0.48.1/src/sp-pattern.h | ||
2675 | 2609 | --- inkscape-0.48.1~/src/sp-pattern.h 2010-07-13 04:48:40.000000000 +0100 | ||
2676 | 2610 | +++ inkscape-0.48.1/src/sp-pattern.h 2011-05-01 00:56:19.611250878 +0100 | ||
2677 | 2611 | @@ -32,6 +32,7 @@ | ||
2678 | 2612 | #include "sp-paint-server.h" | ||
2679 | 2613 | #include "uri-references.h" | ||
2680 | 2614 | |||
2681 | 2615 | +#include <stddef.h> | ||
2682 | 2616 | #include <sigc++/connection.h> | ||
2683 | 2617 | |||
2684 | 2618 | class SPPatternReference : public Inkscape::URIReference { | ||
2685 | 2619 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-pattern.h.orig inkscape-0.48.1/src/sp-pattern.h.orig | ||
2686 | 2620 | --- inkscape-0.48.1~/src/sp-pattern.h.orig 1970-01-01 01:00:00.000000000 +0100 | ||
2687 | 2621 | +++ inkscape-0.48.1/src/sp-pattern.h.orig 2010-07-13 04:48:40.000000000 +0100 | ||
2688 | 2622 | @@ -0,0 +1,113 @@ | ||
2689 | 2623 | +#ifndef __SP_PATTERN_H__ | ||
2690 | 2624 | +#define __SP_PATTERN_H__ | ||
2691 | 2625 | + | ||
2692 | 2626 | +/* | ||
2693 | 2627 | + * SVG <pattern> implementation | ||
2694 | 2628 | + * | ||
2695 | 2629 | + * Author: | ||
2696 | 2630 | + * Lauris Kaplinski <lauris@kaplinski.com> | ||
2697 | 2631 | + * | ||
2698 | 2632 | + * Copyright (C) 2002 Lauris Kaplinski | ||
2699 | 2633 | + * | ||
2700 | 2634 | + * Released under GNU GPL, read the file 'COPYING' for more information | ||
2701 | 2635 | + */ | ||
2702 | 2636 | + | ||
2703 | 2637 | +#include <gtk/gtktypeutils.h> | ||
2704 | 2638 | + | ||
2705 | 2639 | +#include "forward.h" | ||
2706 | 2640 | + | ||
2707 | 2641 | +#define SP_TYPE_PATTERN (sp_pattern_get_type ()) | ||
2708 | 2642 | +#define SP_PATTERN(o) (GTK_CHECK_CAST ((o), SP_TYPE_PATTERN, SPPattern)) | ||
2709 | 2643 | +#define SP_PATTERN_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), SP_TYPE_PATTERN, SPPatternClass)) | ||
2710 | 2644 | +#define SP_IS_PATTERN(o) (GTK_CHECK_TYPE ((o), SP_TYPE_PATTERN)) | ||
2711 | 2645 | +#define SP_IS_PATTERN_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), SP_TYPE_PATTERN)) | ||
2712 | 2646 | + | ||
2713 | 2647 | +GType sp_pattern_get_type (void); | ||
2714 | 2648 | + | ||
2715 | 2649 | +class SPPatternClass; | ||
2716 | 2650 | + | ||
2717 | 2651 | +#include <libnr/nr-rect.h> | ||
2718 | 2652 | +#include <libnr/nr-matrix.h> | ||
2719 | 2653 | +#include "svg/svg-length.h" | ||
2720 | 2654 | +#include "sp-paint-server.h" | ||
2721 | 2655 | +#include "uri-references.h" | ||
2722 | 2656 | + | ||
2723 | 2657 | +#include <sigc++/connection.h> | ||
2724 | 2658 | + | ||
2725 | 2659 | +class SPPatternReference : public Inkscape::URIReference { | ||
2726 | 2660 | +public: | ||
2727 | 2661 | + SPPatternReference (SPObject *obj) : URIReference(obj) {} | ||
2728 | 2662 | + SPPattern *getObject() const { | ||
2729 | 2663 | + return (SPPattern *)URIReference::getObject(); | ||
2730 | 2664 | + } | ||
2731 | 2665 | + | ||
2732 | 2666 | +protected: | ||
2733 | 2667 | + virtual bool _acceptObject(SPObject *obj) const { | ||
2734 | 2668 | + return SP_IS_PATTERN (obj); | ||
2735 | 2669 | + } | ||
2736 | 2670 | +}; | ||
2737 | 2671 | + | ||
2738 | 2672 | +enum { | ||
2739 | 2673 | + SP_PATTERN_UNITS_USERSPACEONUSE, | ||
2740 | 2674 | + SP_PATTERN_UNITS_OBJECTBOUNDINGBOX | ||
2741 | 2675 | +}; | ||
2742 | 2676 | + | ||
2743 | 2677 | +struct SPPattern : public SPPaintServer { | ||
2744 | 2678 | + /* Reference (href) */ | ||
2745 | 2679 | + gchar *href; | ||
2746 | 2680 | + SPPatternReference *ref; | ||
2747 | 2681 | + | ||
2748 | 2682 | + /* patternUnits and patternContentUnits attribute */ | ||
2749 | 2683 | + guint patternUnits : 1; | ||
2750 | 2684 | + guint patternUnits_set : 1; | ||
2751 | 2685 | + guint patternContentUnits : 1; | ||
2752 | 2686 | + guint patternContentUnits_set : 1; | ||
2753 | 2687 | + /* patternTransform attribute */ | ||
2754 | 2688 | + Geom::Matrix patternTransform; | ||
2755 | 2689 | + guint patternTransform_set : 1; | ||
2756 | 2690 | + /* Tile rectangle */ | ||
2757 | 2691 | + SVGLength x; | ||
2758 | 2692 | + SVGLength y; | ||
2759 | 2693 | + SVGLength width; | ||
2760 | 2694 | + SVGLength height; | ||
2761 | 2695 | + /* VieBox */ | ||
2762 | 2696 | + NRRect viewBox; | ||
2763 | 2697 | + guint viewBox_set : 1; | ||
2764 | 2698 | + | ||
2765 | 2699 | + sigc::connection modified_connection; | ||
2766 | 2700 | +}; | ||
2767 | 2701 | + | ||
2768 | 2702 | +struct SPPatternClass { | ||
2769 | 2703 | + SPPaintServerClass parent_class; | ||
2770 | 2704 | +}; | ||
2771 | 2705 | + | ||
2772 | 2706 | +guint pattern_users (SPPattern *pattern); | ||
2773 | 2707 | +SPPattern *pattern_chain (SPPattern *pattern); | ||
2774 | 2708 | +SPPattern *sp_pattern_clone_if_necessary (SPItem *item, SPPattern *pattern, const gchar *property); | ||
2775 | 2709 | +void sp_pattern_transform_multiply (SPPattern *pattern, Geom::Matrix postmul, bool set); | ||
2776 | 2710 | + | ||
2777 | 2711 | +const gchar *pattern_tile (GSList *reprs, Geom::Rect bounds, SPDocument *document, Geom::Matrix transform, Geom::Matrix move); | ||
2778 | 2712 | + | ||
2779 | 2713 | +SPPattern *pattern_getroot (SPPattern *pat); | ||
2780 | 2714 | + | ||
2781 | 2715 | +guint pattern_patternUnits (SPPattern *pat); | ||
2782 | 2716 | +guint pattern_patternContentUnits (SPPattern *pat); | ||
2783 | 2717 | +Geom::Matrix const &pattern_patternTransform(SPPattern const *pat); | ||
2784 | 2718 | +gdouble pattern_x (SPPattern *pat); | ||
2785 | 2719 | +gdouble pattern_y (SPPattern *pat); | ||
2786 | 2720 | +gdouble pattern_width (SPPattern *pat); | ||
2787 | 2721 | +gdouble pattern_height (SPPattern *pat); | ||
2788 | 2722 | +NRRect *pattern_viewBox (SPPattern *pat); | ||
2789 | 2723 | + | ||
2790 | 2724 | +#endif //__SP_PATTERN_H__ | ||
2791 | 2725 | + | ||
2792 | 2726 | +/* | ||
2793 | 2727 | + Local Variables: | ||
2794 | 2728 | + mode:c++ | ||
2795 | 2729 | + c-file-style:"stroustrup" | ||
2796 | 2730 | + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) | ||
2797 | 2731 | + indent-tabs-mode:nil | ||
2798 | 2732 | + fill-column:99 | ||
2799 | 2733 | + End: | ||
2800 | 2734 | +*/ | ||
2801 | 2735 | +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : | ||
2802 | 2736 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-shape.h inkscape-0.48.1/src/sp-shape.h | ||
2803 | 2737 | --- inkscape-0.48.1~/src/sp-shape.h 2010-07-13 04:48:40.000000000 +0100 | ||
2804 | 2738 | +++ inkscape-0.48.1/src/sp-shape.h 2011-05-01 00:56:19.611250878 +0100 | ||
2805 | 2739 | @@ -19,6 +19,7 @@ | ||
2806 | 2740 | #include "sp-marker-loc.h" | ||
2807 | 2741 | #include <2geom/forward.h> | ||
2808 | 2742 | |||
2809 | 2743 | +#include <stddef.h> | ||
2810 | 2744 | #include <sigc++/connection.h> | ||
2811 | 2745 | |||
2812 | 2746 | #define SP_TYPE_SHAPE (sp_shape_get_type ()) | ||
2813 | 2747 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-shape.h.orig inkscape-0.48.1/src/sp-shape.h.orig | ||
2814 | 2748 | --- inkscape-0.48.1~/src/sp-shape.h.orig 1970-01-01 01:00:00.000000000 +0100 | ||
2815 | 2749 | +++ inkscape-0.48.1/src/sp-shape.h.orig 2010-07-13 04:48:40.000000000 +0100 | ||
2816 | 2750 | @@ -0,0 +1,71 @@ | ||
2817 | 2751 | +#ifndef __SP_SHAPE_H__ | ||
2818 | 2752 | +#define __SP_SHAPE_H__ | ||
2819 | 2753 | + | ||
2820 | 2754 | +/* | ||
2821 | 2755 | + * Base class for shapes, including <path> element | ||
2822 | 2756 | + * | ||
2823 | 2757 | + * Author: | ||
2824 | 2758 | + * Lauris Kaplinski <lauris@kaplinski.com> | ||
2825 | 2759 | + * | ||
2826 | 2760 | + * Copyright (C) 1999-2002 Lauris Kaplinski | ||
2827 | 2761 | + * Copyright (C) 2000-2001 Ximian, Inc. | ||
2828 | 2762 | + * Copyright (C) 2008 Johan Engelen | ||
2829 | 2763 | + * | ||
2830 | 2764 | + * Released under GNU GPL, read the file 'COPYING' for more information | ||
2831 | 2765 | + */ | ||
2832 | 2766 | + | ||
2833 | 2767 | +#include "display/display-forward.h" | ||
2834 | 2768 | +#include "sp-lpe-item.h" | ||
2835 | 2769 | +#include "sp-marker-loc.h" | ||
2836 | 2770 | +#include <2geom/forward.h> | ||
2837 | 2771 | + | ||
2838 | 2772 | +#include <sigc++/connection.h> | ||
2839 | 2773 | + | ||
2840 | 2774 | +#define SP_TYPE_SHAPE (sp_shape_get_type ()) | ||
2841 | 2775 | +#define SP_SHAPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_SHAPE, SPShape)) | ||
2842 | 2776 | +#define SP_SHAPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_SHAPE, SPShapeClass)) | ||
2843 | 2777 | +#define SP_IS_SHAPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_SHAPE)) | ||
2844 | 2778 | +#define SP_IS_SHAPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_SHAPE)) | ||
2845 | 2779 | + | ||
2846 | 2780 | +#define SP_SHAPE_WRITE_PATH (1 << 2) | ||
2847 | 2781 | + | ||
2848 | 2782 | +struct SPDesktop; | ||
2849 | 2783 | + | ||
2850 | 2784 | +struct SPShape : public SPLPEItem { | ||
2851 | 2785 | + SPCurve *curve; | ||
2852 | 2786 | + | ||
2853 | 2787 | + SPObject *marker[SP_MARKER_LOC_QTY]; | ||
2854 | 2788 | + sigc::connection release_connect [SP_MARKER_LOC_QTY]; | ||
2855 | 2789 | + sigc::connection modified_connect [SP_MARKER_LOC_QTY]; | ||
2856 | 2790 | +}; | ||
2857 | 2791 | + | ||
2858 | 2792 | +struct SPShapeClass { | ||
2859 | 2793 | + SPLPEItemClass item_class; | ||
2860 | 2794 | + | ||
2861 | 2795 | + /* Build bpath from extra shape attributes */ | ||
2862 | 2796 | + void (* set_shape) (SPShape *shape); | ||
2863 | 2797 | +}; | ||
2864 | 2798 | + | ||
2865 | 2799 | +GType sp_shape_get_type (void); | ||
2866 | 2800 | + | ||
2867 | 2801 | +void sp_shape_set_shape (SPShape *shape); | ||
2868 | 2802 | + | ||
2869 | 2803 | +/* Return duplicate of curve or NULL */ | ||
2870 | 2804 | +SPCurve *sp_shape_get_curve (SPShape *shape); | ||
2871 | 2805 | + | ||
2872 | 2806 | +// sets a curve, updates display | ||
2873 | 2807 | +void sp_shape_set_curve (SPShape *shape, SPCurve *curve, unsigned int owner); | ||
2874 | 2808 | + | ||
2875 | 2809 | +// same as sp_shape_set_curve, but without updating display | ||
2876 | 2810 | +void sp_shape_set_curve_insync (SPShape *shape, SPCurve *curve, unsigned int owner); | ||
2877 | 2811 | + | ||
2878 | 2812 | +// markers API | ||
2879 | 2813 | +void sp_shape_set_marker (SPObject *object, unsigned int key, const gchar *value); | ||
2880 | 2814 | +int sp_shape_has_markers (SPShape const *shape); | ||
2881 | 2815 | +int sp_shape_number_of_markers (SPShape* Shape, int type); | ||
2882 | 2816 | + | ||
2883 | 2817 | +Geom::Matrix sp_shape_marker_get_transform(Geom::Curve const & c1, Geom::Curve const & c2); | ||
2884 | 2818 | +Geom::Matrix sp_shape_marker_get_transform_at_start(Geom::Curve const & c); | ||
2885 | 2819 | +Geom::Matrix sp_shape_marker_get_transform_at_end(Geom::Curve const & c); | ||
2886 | 2820 | + | ||
2887 | 2821 | +#endif | ||
2888 | 2822 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-switch.h inkscape-0.48.1/src/sp-switch.h | ||
2889 | 2823 | --- inkscape-0.48.1~/src/sp-switch.h 2010-07-13 04:48:40.000000000 +0100 | ||
2890 | 2824 | +++ inkscape-0.48.1/src/sp-switch.h 2011-05-01 00:56:19.611250878 +0100 | ||
2891 | 2825 | @@ -14,6 +14,7 @@ | ||
2892 | 2826 | |||
2893 | 2827 | #include "sp-item-group.h" | ||
2894 | 2828 | |||
2895 | 2829 | +#include <stddef.h> | ||
2896 | 2830 | #include <sigc++/connection.h> | ||
2897 | 2831 | |||
2898 | 2832 | #define SP_TYPE_SWITCH (CSwitch::getType()) | ||
2899 | 2833 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-text.h inkscape-0.48.1/src/sp-text.h | ||
2900 | 2834 | --- inkscape-0.48.1~/src/sp-text.h 2010-07-13 04:48:40.000000000 +0100 | ||
2901 | 2835 | +++ inkscape-0.48.1/src/sp-text.h 2011-05-01 00:56:19.611250878 +0100 | ||
2902 | 2836 | @@ -14,6 +14,7 @@ | ||
2903 | 2837 | */ | ||
2904 | 2838 | |||
2905 | 2839 | #include <glib/gtypes.h> | ||
2906 | 2840 | +#include <stddef.h> | ||
2907 | 2841 | #include <sigc++/sigc++.h> | ||
2908 | 2842 | #include "sp-item.h" | ||
2909 | 2843 | #include "sp-string.h" | ||
2910 | 2844 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-tref-reference.h inkscape-0.48.1/src/sp-tref-reference.h | ||
2911 | 2845 | --- inkscape-0.48.1~/src/sp-tref-reference.h 2010-07-13 04:48:40.000000000 +0100 | ||
2912 | 2846 | +++ inkscape-0.48.1/src/sp-tref-reference.h 2011-05-01 00:56:19.611250878 +0100 | ||
2913 | 2847 | @@ -13,6 +13,7 @@ | ||
2914 | 2848 | |||
2915 | 2849 | #include <forward.h> | ||
2916 | 2850 | #include <uri-references.h> | ||
2917 | 2851 | +#include <stddef.h> | ||
2918 | 2852 | #include <sigc++/sigc++.h> | ||
2919 | 2853 | |||
2920 | 2854 | #include "util/share.h" | ||
2921 | 2855 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-tref-reference.h.orig inkscape-0.48.1/src/sp-tref-reference.h.orig | ||
2922 | 2856 | --- inkscape-0.48.1~/src/sp-tref-reference.h.orig 1970-01-01 01:00:00.000000000 +0100 | ||
2923 | 2857 | +++ inkscape-0.48.1/src/sp-tref-reference.h.orig 2010-07-13 04:48:40.000000000 +0100 | ||
2924 | 2858 | @@ -0,0 +1,75 @@ | ||
2925 | 2859 | +#ifndef SEEN_SP_TREF_REFERENCE_H | ||
2926 | 2860 | +#define SEEN_SP_TREF_REFERENCE_H | ||
2927 | 2861 | + | ||
2928 | 2862 | +/* | ||
2929 | 2863 | + * The reference corresponding to href of <tref> element. | ||
2930 | 2864 | + * | ||
2931 | 2865 | + * This file was created based on sp-use-reference.h | ||
2932 | 2866 | + * | ||
2933 | 2867 | + * Copyright (C) 2007 Gail Banaszkiewicz | ||
2934 | 2868 | + * | ||
2935 | 2869 | + * Released under GNU GPL, read the file 'COPYING' for more information. | ||
2936 | 2870 | + */ | ||
2937 | 2871 | + | ||
2938 | 2872 | +#include <forward.h> | ||
2939 | 2873 | +#include <uri-references.h> | ||
2940 | 2874 | +#include <sigc++/sigc++.h> | ||
2941 | 2875 | + | ||
2942 | 2876 | +#include "util/share.h" | ||
2943 | 2877 | +#include "xml/node-observer.h" | ||
2944 | 2878 | +#include "xml/subtree.h" | ||
2945 | 2879 | + | ||
2946 | 2880 | + | ||
2947 | 2881 | +class SPTRefReference : public Inkscape::URIReference, | ||
2948 | 2882 | + public Inkscape::XML::NodeObserver { | ||
2949 | 2883 | +public: | ||
2950 | 2884 | + SPTRefReference(SPObject *owner) : URIReference(owner), subtreeObserved(NULL) { | ||
2951 | 2885 | + updateObserver(); | ||
2952 | 2886 | + } | ||
2953 | 2887 | + | ||
2954 | 2888 | + virtual ~SPTRefReference() { | ||
2955 | 2889 | + if (subtreeObserved) { | ||
2956 | 2890 | + subtreeObserved->removeObserver(*this); | ||
2957 | 2891 | + delete subtreeObserved; | ||
2958 | 2892 | + } | ||
2959 | 2893 | + } | ||
2960 | 2894 | + | ||
2961 | 2895 | + SPItem *getObject() const { | ||
2962 | 2896 | + return (SPItem *)URIReference::getObject(); | ||
2963 | 2897 | + } | ||
2964 | 2898 | + | ||
2965 | 2899 | + void updateObserver(); | ||
2966 | 2900 | + | ||
2967 | 2901 | + ///////////////////////////////////////////////////////////////////// | ||
2968 | 2902 | + // Node Observer Functions | ||
2969 | 2903 | + // ----------------------- | ||
2970 | 2904 | + virtual void notifyChildAdded(Inkscape::XML::Node &node, Inkscape::XML::Node &child, Inkscape::XML::Node *prev); | ||
2971 | 2905 | + virtual void notifyChildRemoved(Inkscape::XML::Node &node, Inkscape::XML::Node &child, Inkscape::XML::Node *prev); | ||
2972 | 2906 | + virtual void notifyChildOrderChanged(Inkscape::XML::Node &node, Inkscape::XML::Node &child, | ||
2973 | 2907 | + Inkscape::XML::Node *old_prev, Inkscape::XML::Node *new_prev); | ||
2974 | 2908 | + virtual void notifyContentChanged(Inkscape::XML::Node &node, | ||
2975 | 2909 | + Inkscape::Util::ptr_shared<char> old_content, | ||
2976 | 2910 | + Inkscape::Util::ptr_shared<char> new_content); | ||
2977 | 2911 | + virtual void notifyAttributeChanged(Inkscape::XML::Node &node, GQuark name, | ||
2978 | 2912 | + Inkscape::Util::ptr_shared<char> old_value, | ||
2979 | 2913 | + Inkscape::Util::ptr_shared<char> new_value); | ||
2980 | 2914 | + ///////////////////////////////////////////////////////////////////// | ||
2981 | 2915 | + | ||
2982 | 2916 | +protected: | ||
2983 | 2917 | + virtual bool _acceptObject(SPObject * obj) const; | ||
2984 | 2918 | + | ||
2985 | 2919 | + Inkscape::XML::Subtree *subtreeObserved; | ||
2986 | 2920 | +}; | ||
2987 | 2921 | + | ||
2988 | 2922 | +#endif /* !SEEN_SP_TREF_REFERENCE_H */ | ||
2989 | 2923 | + | ||
2990 | 2924 | +/* | ||
2991 | 2925 | + Local Variables: | ||
2992 | 2926 | + mode:c++ | ||
2993 | 2927 | + c-file-style:"stroustrup" | ||
2994 | 2928 | + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) | ||
2995 | 2929 | + indent-tabs-mode:nil | ||
2996 | 2930 | + fill-column:99 | ||
2997 | 2931 | + End: | ||
2998 | 2932 | +*/ | ||
2999 | 2933 | +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : | ||
3000 | 2934 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-use-reference.h inkscape-0.48.1/src/sp-use-reference.h | ||
3001 | 2935 | --- inkscape-0.48.1~/src/sp-use-reference.h 2010-07-13 04:48:40.000000000 +0100 | ||
3002 | 2936 | +++ inkscape-0.48.1/src/sp-use-reference.h 2011-05-01 00:56:19.611250878 +0100 | ||
3003 | 2937 | @@ -11,6 +11,7 @@ | ||
3004 | 2938 | |||
3005 | 2939 | #include <forward.h> | ||
3006 | 2940 | #include <uri-references.h> | ||
3007 | 2941 | +#include <stddef.h> | ||
3008 | 2942 | #include <sigc++/sigc++.h> | ||
3009 | 2943 | |||
3010 | 2944 | class Path; | ||
3011 | 2945 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-use-reference.h.orig inkscape-0.48.1/src/sp-use-reference.h.orig | ||
3012 | 2946 | --- inkscape-0.48.1~/src/sp-use-reference.h.orig 1970-01-01 01:00:00.000000000 +0100 | ||
3013 | 2947 | +++ inkscape-0.48.1/src/sp-use-reference.h.orig 2010-07-13 04:48:40.000000000 +0100 | ||
3014 | 2948 | @@ -0,0 +1,77 @@ | ||
3015 | 2949 | +#ifndef SEEN_SP_USE_REFERENCE_H | ||
3016 | 2950 | +#define SEEN_SP_USE_REFERENCE_H | ||
3017 | 2951 | + | ||
3018 | 2952 | +/* | ||
3019 | 2953 | + * The reference corresponding to href of <use> element. | ||
3020 | 2954 | + * | ||
3021 | 2955 | + * Copyright (C) 2004 Bulia Byak | ||
3022 | 2956 | + * | ||
3023 | 2957 | + * Released under GNU GPL, read the file 'COPYING' for more information. | ||
3024 | 2958 | + */ | ||
3025 | 2959 | + | ||
3026 | 2960 | +#include <forward.h> | ||
3027 | 2961 | +#include <uri-references.h> | ||
3028 | 2962 | +#include <sigc++/sigc++.h> | ||
3029 | 2963 | + | ||
3030 | 2964 | +class Path; | ||
3031 | 2965 | + | ||
3032 | 2966 | +namespace Inkscape { | ||
3033 | 2967 | +namespace XML { | ||
3034 | 2968 | + struct Node; | ||
3035 | 2969 | +} | ||
3036 | 2970 | +} | ||
3037 | 2971 | + | ||
3038 | 2972 | + | ||
3039 | 2973 | +class SPUseReference : public Inkscape::URIReference { | ||
3040 | 2974 | +public: | ||
3041 | 2975 | + SPUseReference(SPObject *owner) : URIReference(owner) {} | ||
3042 | 2976 | + | ||
3043 | 2977 | + SPItem *getObject() const { | ||
3044 | 2978 | + return (SPItem *)URIReference::getObject(); | ||
3045 | 2979 | + } | ||
3046 | 2980 | + | ||
3047 | 2981 | +protected: | ||
3048 | 2982 | + virtual bool _acceptObject(SPObject * const obj) const; | ||
3049 | 2983 | + | ||
3050 | 2984 | +}; | ||
3051 | 2985 | + | ||
3052 | 2986 | + | ||
3053 | 2987 | +class SPUsePath : public SPUseReference { | ||
3054 | 2988 | +public: | ||
3055 | 2989 | + Path *originalPath; | ||
3056 | 2990 | + bool sourceDirty; | ||
3057 | 2991 | + | ||
3058 | 2992 | + SPObject *owner; | ||
3059 | 2993 | + gchar *sourceHref; | ||
3060 | 2994 | + Inkscape::XML::Node *sourceRepr; | ||
3061 | 2995 | + SPObject *sourceObject; | ||
3062 | 2996 | + | ||
3063 | 2997 | + sigc::connection _modified_connection; | ||
3064 | 2998 | + sigc::connection _delete_connection; | ||
3065 | 2999 | + sigc::connection _changed_connection; | ||
3066 | 3000 | + sigc::connection _transformed_connection; | ||
3067 | 3001 | + | ||
3068 | 3002 | + SPUsePath(SPObject* i_owner); | ||
3069 | 3003 | + ~SPUsePath(void); | ||
3070 | 3004 | + | ||
3071 | 3005 | + void link(char* to); | ||
3072 | 3006 | + void unlink(void); | ||
3073 | 3007 | + void start_listening(SPObject* to); | ||
3074 | 3008 | + void quit_listening(void); | ||
3075 | 3009 | + void refresh_source(void); | ||
3076 | 3010 | + | ||
3077 | 3011 | + void (*user_unlink) (SPObject *user); | ||
3078 | 3012 | +}; | ||
3079 | 3013 | + | ||
3080 | 3014 | +#endif /* !SEEN_SP_USE_REFERENCE_H */ | ||
3081 | 3015 | + | ||
3082 | 3016 | +/* | ||
3083 | 3017 | + Local Variables: | ||
3084 | 3018 | + mode:c++ | ||
3085 | 3019 | + c-file-style:"stroustrup" | ||
3086 | 3020 | + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) | ||
3087 | 3021 | + indent-tabs-mode:nil | ||
3088 | 3022 | + fill-column:99 | ||
3089 | 3023 | + End: | ||
3090 | 3024 | +*/ | ||
3091 | 3025 | +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : | ||
3092 | 3026 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-use.h inkscape-0.48.1/src/sp-use.h | ||
3093 | 3027 | --- inkscape-0.48.1~/src/sp-use.h 2010-07-13 04:48:40.000000000 +0100 | ||
3094 | 3028 | +++ inkscape-0.48.1/src/sp-use.h 2011-05-01 00:56:19.611250878 +0100 | ||
3095 | 3029 | @@ -13,6 +13,7 @@ | ||
3096 | 3030 | * Released under GNU GPL, read the file 'COPYING' for more information | ||
3097 | 3031 | */ | ||
3098 | 3032 | |||
3099 | 3033 | +#include <stddef.h> | ||
3100 | 3034 | #include <sigc++/sigc++.h> | ||
3101 | 3035 | #include "svg/svg-length.h" | ||
3102 | 3036 | #include "sp-item.h" | ||
3103 | 3037 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/spiral-context.h inkscape-0.48.1/src/spiral-context.h | ||
3104 | 3038 | --- inkscape-0.48.1~/src/spiral-context.h 2010-07-13 04:48:40.000000000 +0100 | ||
3105 | 3039 | +++ inkscape-0.48.1/src/spiral-context.h 2011-05-01 00:56:19.611250878 +0100 | ||
3106 | 3040 | @@ -16,6 +16,7 @@ | ||
3107 | 3041 | */ | ||
3108 | 3042 | |||
3109 | 3043 | #include <gtk/gtktypeutils.h> | ||
3110 | 3044 | +#include <stddef.h> | ||
3111 | 3045 | #include <sigc++/sigc++.h> | ||
3112 | 3046 | #include "event-context.h" | ||
3113 | 3047 | #include "libnr/nr-point.h" | ||
3114 | 3048 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/star-context.h inkscape-0.48.1/src/star-context.h | ||
3115 | 3049 | --- inkscape-0.48.1~/src/star-context.h 2010-07-13 04:48:40.000000000 +0100 | ||
3116 | 3050 | +++ inkscape-0.48.1/src/star-context.h 2011-05-01 00:56:19.611250878 +0100 | ||
3117 | 3051 | @@ -14,6 +14,7 @@ | ||
3118 | 3052 | * Released under GNU GPL, read the file 'COPYING' for more information | ||
3119 | 3053 | */ | ||
3120 | 3054 | |||
3121 | 3055 | +#include <stddef.h> | ||
3122 | 3056 | #include <sigc++/sigc++.h> | ||
3123 | 3057 | #include "event-context.h" | ||
3124 | 3058 | #include "libnr/nr-point.h" | ||
3125 | 3059 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/style.h inkscape-0.48.1/src/style.h | ||
3126 | 3060 | --- inkscape-0.48.1~/src/style.h 2010-08-04 17:45:00.000000000 +0100 | ||
3127 | 3061 | +++ inkscape-0.48.1/src/style.h 2011-05-01 00:56:19.611250878 +0100 | ||
3128 | 3062 | @@ -24,6 +24,7 @@ | ||
3129 | 3063 | #include "uri.h" | ||
3130 | 3064 | #include "sp-paint-server.h" | ||
3131 | 3065 | |||
3132 | 3066 | +#include <stddef.h> | ||
3133 | 3067 | #include <sigc++/connection.h> | ||
3134 | 3068 | |||
3135 | 3069 | namespace Inkscape { | ||
3136 | 3070 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/text-context.h inkscape-0.48.1/src/text-context.h | ||
3137 | 3071 | --- inkscape-0.48.1~/src/text-context.h 2010-07-13 04:48:40.000000000 +0100 | ||
3138 | 3072 | +++ inkscape-0.48.1/src/text-context.h 2011-05-01 00:56:19.611250878 +0100 | ||
3139 | 3073 | @@ -15,6 +15,7 @@ | ||
3140 | 3074 | */ | ||
3141 | 3075 | |||
3142 | 3076 | /* #include <gdk/gdkic.h> */ | ||
3143 | 3077 | +#include <stddef.h> | ||
3144 | 3078 | #include <sigc++/sigc++.h> | ||
3145 | 3079 | #include <gtk/gtkimcontext.h> | ||
3146 | 3080 | |||
3147 | 3081 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/dialog/desktop-tracker.h inkscape-0.48.1/src/ui/dialog/desktop-tracker.h | ||
3148 | 3082 | --- inkscape-0.48.1~/src/ui/dialog/desktop-tracker.h 2010-07-13 04:48:40.000000000 +0100 | ||
3149 | 3083 | +++ inkscape-0.48.1/src/ui/dialog/desktop-tracker.h 2011-05-01 00:56:19.611250878 +0100 | ||
3150 | 3084 | @@ -11,6 +11,7 @@ | ||
3151 | 3085 | #ifndef SEEN_DIALOG_DESKTOP_TRACKER | ||
3152 | 3086 | #define SEEN_DIALOG_DESKTOP_TRACKER | ||
3153 | 3087 | |||
3154 | 3088 | +#include <stddef.h> | ||
3155 | 3089 | #include <sigc++/connection.h> | ||
3156 | 3090 | #include <glib/gtypes.h> | ||
3157 | 3091 | |||
3158 | 3092 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/dialog/document-metadata.h inkscape-0.48.1/src/ui/dialog/document-metadata.h | ||
3159 | 3093 | --- inkscape-0.48.1~/src/ui/dialog/document-metadata.h 2010-07-13 04:48:40.000000000 +0100 | ||
3160 | 3094 | +++ inkscape-0.48.1/src/ui/dialog/document-metadata.h 2011-05-01 00:56:19.611250878 +0100 | ||
3161 | 3095 | @@ -14,6 +14,7 @@ | ||
3162 | 3096 | #define INKSCAPE_UI_DIALOG_DOCUMENT_METADATA_H | ||
3163 | 3097 | |||
3164 | 3098 | #include <list> | ||
3165 | 3099 | +#include <stddef.h> | ||
3166 | 3100 | #include <sigc++/sigc++.h> | ||
3167 | 3101 | #include <gtkmm/notebook.h> | ||
3168 | 3102 | #include <glibmm/i18n.h> | ||
3169 | 3103 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/dialog/document-properties.h inkscape-0.48.1/src/ui/dialog/document-properties.h | ||
3170 | 3104 | --- inkscape-0.48.1~/src/ui/dialog/document-properties.h 2010-07-13 04:48:40.000000000 +0100 | ||
3171 | 3105 | +++ inkscape-0.48.1/src/ui/dialog/document-properties.h 2011-05-01 00:56:19.611250878 +0100 | ||
3172 | 3106 | @@ -15,6 +15,7 @@ | ||
3173 | 3107 | #define INKSCAPE_UI_DIALOG_DOCUMENT_PREFERENCES_H | ||
3174 | 3108 | |||
3175 | 3109 | #include <list> | ||
3176 | 3110 | +#include <stddef.h> | ||
3177 | 3111 | #include <sigc++/sigc++.h>// | ||
3178 | 3112 | #include <gtkmm/notebook.h> | ||
3179 | 3113 | #include <glibmm/i18n.h> | ||
3180 | 3114 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/dialog/inkscape-preferences.h inkscape-0.48.1/src/ui/dialog/inkscape-preferences.h | ||
3181 | 3115 | --- inkscape-0.48.1~/src/ui/dialog/inkscape-preferences.h 2010-11-06 18:47:19.000000000 +0000 | ||
3182 | 3116 | +++ inkscape-0.48.1/src/ui/dialog/inkscape-preferences.h 2011-05-01 00:56:19.611250878 +0100 | ||
3183 | 3117 | @@ -28,6 +28,7 @@ | ||
3184 | 3118 | #include <gtkmm/frame.h> | ||
3185 | 3119 | #include <gtkmm/notebook.h> | ||
3186 | 3120 | #include "ui/widget/preferences-widget.h" | ||
3187 | 3121 | +#include <stddef.h> | ||
3188 | 3122 | #include <sigc++/sigc++.h> | ||
3189 | 3123 | #include <glibmm/i18n.h> | ||
3190 | 3124 | #include <gtkmm/textview.h> | ||
3191 | 3125 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/dialog/undo-history.cpp inkscape-0.48.1/src/ui/dialog/undo-history.cpp | ||
3192 | 3126 | --- inkscape-0.48.1~/src/ui/dialog/undo-history.cpp 2010-07-13 04:48:40.000000000 +0100 | ||
3193 | 3127 | +++ inkscape-0.48.1/src/ui/dialog/undo-history.cpp 2011-05-01 00:56:19.611250878 +0100 | ||
3194 | 3128 | @@ -14,6 +14,7 @@ | ||
3195 | 3129 | |||
3196 | 3130 | #include <glibmm/i18n.h> | ||
3197 | 3131 | #include <gtk/gtkimage.h> | ||
3198 | 3132 | +#include <stddef.h> | ||
3199 | 3133 | #include <sigc++/sigc++.h> | ||
3200 | 3134 | |||
3201 | 3135 | |||
3202 | 3136 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/dialog/undo-history.cpp.orig inkscape-0.48.1/src/ui/dialog/undo-history.cpp.orig | ||
3203 | 3137 | --- inkscape-0.48.1~/src/ui/dialog/undo-history.cpp.orig 1970-01-01 01:00:00.000000000 +0100 | ||
3204 | 3138 | +++ inkscape-0.48.1/src/ui/dialog/undo-history.cpp.orig 2010-07-13 04:48:40.000000000 +0100 | ||
3205 | 3139 | @@ -0,0 +1,348 @@ | ||
3206 | 3140 | +/** @file | ||
3207 | 3141 | + * @brief Undo History dialog - implementation | ||
3208 | 3142 | + */ | ||
3209 | 3143 | +/* Author: | ||
3210 | 3144 | + * Gustav Broberg <broberg@kth.se> | ||
3211 | 3145 | + * | ||
3212 | 3146 | + * Copyright (C) 2006 Authors | ||
3213 | 3147 | + * Released under GNU GPL. Read the file 'COPYING' for more information. | ||
3214 | 3148 | + */ | ||
3215 | 3149 | + | ||
3216 | 3150 | +#ifdef HAVE_CONFIG_H | ||
3217 | 3151 | +# include <config.h> | ||
3218 | 3152 | +#endif | ||
3219 | 3153 | + | ||
3220 | 3154 | +#include <glibmm/i18n.h> | ||
3221 | 3155 | +#include <gtk/gtkimage.h> | ||
3222 | 3156 | +#include <sigc++/sigc++.h> | ||
3223 | 3157 | + | ||
3224 | 3158 | + | ||
3225 | 3159 | +#include "document.h" | ||
3226 | 3160 | +#include "inkscape.h" | ||
3227 | 3161 | +#include "verbs.h" | ||
3228 | 3162 | +#include "desktop-handles.h" | ||
3229 | 3163 | + | ||
3230 | 3164 | +#include "undo-history.h" | ||
3231 | 3165 | + | ||
3232 | 3166 | +namespace Inkscape { | ||
3233 | 3167 | +namespace UI { | ||
3234 | 3168 | +namespace Dialog { | ||
3235 | 3169 | + | ||
3236 | 3170 | +/* Rendering functions for custom cell renderers */ | ||
3237 | 3171 | + | ||
3238 | 3172 | +void | ||
3239 | 3173 | +CellRendererSPIcon::render_vfunc(const Glib::RefPtr<Gdk::Drawable>& window, | ||
3240 | 3174 | + Gtk::Widget& widget, | ||
3241 | 3175 | + const Gdk::Rectangle& background_area, | ||
3242 | 3176 | + const Gdk::Rectangle& cell_area, | ||
3243 | 3177 | + const Gdk::Rectangle& expose_area, | ||
3244 | 3178 | + Gtk::CellRendererState flags) | ||
3245 | 3179 | +{ | ||
3246 | 3180 | + // if this event type doesn't have an icon... | ||
3247 | 3181 | + if ( !Inkscape::Verb::get(_property_event_type)->get_image() ) return; | ||
3248 | 3182 | + | ||
3249 | 3183 | + // if the icon isn't cached, render it to a pixbuf | ||
3250 | 3184 | + if ( !_icon_cache[_property_event_type] ) { | ||
3251 | 3185 | + | ||
3252 | 3186 | + Glib::ustring image = Inkscape::Verb::get(_property_event_type)->get_image(); | ||
3253 | 3187 | + Gtk::Widget* icon = sp_icon_get_icon(image, Inkscape::ICON_SIZE_MENU); | ||
3254 | 3188 | + | ||
3255 | 3189 | + if (icon) { | ||
3256 | 3190 | + | ||
3257 | 3191 | + // check icon type (inkscape, gtk, none) | ||
3258 | 3192 | + if ( SP_IS_ICON(icon->gobj()) ) { | ||
3259 | 3193 | + SPIcon* sp_icon = SP_ICON(icon->gobj()); | ||
3260 | 3194 | + sp_icon_fetch_pixbuf(sp_icon); | ||
3261 | 3195 | + _property_icon = Glib::wrap(sp_icon->pb, true); | ||
3262 | 3196 | + } else if ( GTK_IS_IMAGE(icon->gobj()) ) { | ||
3263 | 3197 | + _property_icon = Gtk::Invisible().render_icon(Gtk::StockID(image), | ||
3264 | 3198 | + Gtk::ICON_SIZE_MENU); | ||
3265 | 3199 | + } else { | ||
3266 | 3200 | + delete icon; | ||
3267 | 3201 | + return; | ||
3268 | 3202 | + } | ||
3269 | 3203 | + | ||
3270 | 3204 | + delete icon; | ||
3271 | 3205 | + property_pixbuf() = _icon_cache[_property_event_type] = _property_icon.get_value(); | ||
3272 | 3206 | + } | ||
3273 | 3207 | + | ||
3274 | 3208 | + } else { | ||
3275 | 3209 | + property_pixbuf() = _icon_cache[_property_event_type]; | ||
3276 | 3210 | + } | ||
3277 | 3211 | + | ||
3278 | 3212 | + Gtk::CellRendererPixbuf::render_vfunc(window, widget, background_area, | ||
3279 | 3213 | + cell_area, expose_area, flags); | ||
3280 | 3214 | +} | ||
3281 | 3215 | + | ||
3282 | 3216 | + | ||
3283 | 3217 | +void | ||
3284 | 3218 | +CellRendererInt::render_vfunc(const Glib::RefPtr<Gdk::Drawable>& window, | ||
3285 | 3219 | + Gtk::Widget& widget, | ||
3286 | 3220 | + const Gdk::Rectangle& background_area, | ||
3287 | 3221 | + const Gdk::Rectangle& cell_area, | ||
3288 | 3222 | + const Gdk::Rectangle& expose_area, | ||
3289 | 3223 | + Gtk::CellRendererState flags) | ||
3290 | 3224 | +{ | ||
3291 | 3225 | + if( _filter(_property_number) ) { | ||
3292 | 3226 | + std::ostringstream s; | ||
3293 | 3227 | + s << _property_number << std::flush; | ||
3294 | 3228 | + property_text() = s.str(); | ||
3295 | 3229 | + Gtk::CellRendererText::render_vfunc(window, widget, background_area, | ||
3296 | 3230 | + cell_area, expose_area, flags); | ||
3297 | 3231 | + } | ||
3298 | 3232 | +} | ||
3299 | 3233 | + | ||
3300 | 3234 | +const CellRendererInt::Filter& CellRendererInt::no_filter = CellRendererInt::NoFilter(); | ||
3301 | 3235 | + | ||
3302 | 3236 | +UndoHistory& UndoHistory::getInstance() | ||
3303 | 3237 | +{ | ||
3304 | 3238 | + return *new UndoHistory(); | ||
3305 | 3239 | +} | ||
3306 | 3240 | + | ||
3307 | 3241 | +void | ||
3308 | 3242 | +UndoHistory::setDesktop(SPDesktop* desktop) | ||
3309 | 3243 | +{ | ||
3310 | 3244 | + Panel::setDesktop(desktop); | ||
3311 | 3245 | + | ||
3312 | 3246 | + if (!desktop) return; | ||
3313 | 3247 | + | ||
3314 | 3248 | + _document = sp_desktop_document(desktop); | ||
3315 | 3249 | + | ||
3316 | 3250 | + _event_log = desktop->event_log; | ||
3317 | 3251 | + | ||
3318 | 3252 | + _callback_connections[EventLog::CALLB_SELECTION_CHANGE].block(); | ||
3319 | 3253 | + | ||
3320 | 3254 | + _event_list_store = _event_log->getEventListStore(); | ||
3321 | 3255 | + _event_list_view.set_model(_event_list_store); | ||
3322 | 3256 | + _event_list_selection = _event_list_view.get_selection(); | ||
3323 | 3257 | + | ||
3324 | 3258 | + _event_log->connectWithDialog(&_event_list_view, &_callback_connections); | ||
3325 | 3259 | + _event_list_view.scroll_to_row(_event_list_store->get_path(_event_list_selection->get_selected())); | ||
3326 | 3260 | + | ||
3327 | 3261 | + _callback_connections[EventLog::CALLB_SELECTION_CHANGE].block(false); | ||
3328 | 3262 | +} | ||
3329 | 3263 | + | ||
3330 | 3264 | +UndoHistory::UndoHistory() | ||
3331 | 3265 | + : UI::Widget::Panel ("", "/dialogs/undo-history", SP_VERB_DIALOG_UNDO_HISTORY), | ||
3332 | 3266 | + _document (sp_desktop_document(getDesktop())), | ||
3333 | 3267 | + _event_log (getDesktop() ? getDesktop()->event_log : NULL), | ||
3334 | 3268 | + _columns (_event_log ? &_event_log->getColumns() : NULL), | ||
3335 | 3269 | + _event_list_selection (_event_list_view.get_selection()) | ||
3336 | 3270 | +{ | ||
3337 | 3271 | + if ( !_document || !_event_log || !_columns ) return; | ||
3338 | 3272 | + | ||
3339 | 3273 | + set_size_request(300, 95); | ||
3340 | 3274 | + | ||
3341 | 3275 | + _getContents()->pack_start(_scrolled_window); | ||
3342 | 3276 | + _scrolled_window.set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); | ||
3343 | 3277 | + | ||
3344 | 3278 | + _event_list_store = _event_log->getEventListStore(); | ||
3345 | 3279 | + | ||
3346 | 3280 | + _event_list_view.set_model(_event_list_store); | ||
3347 | 3281 | + _event_list_view.set_rules_hint(false); | ||
3348 | 3282 | + _event_list_view.set_enable_search(false); | ||
3349 | 3283 | + _event_list_view.set_headers_visible(false); | ||
3350 | 3284 | + | ||
3351 | 3285 | + CellRendererSPIcon* icon_renderer = Gtk::manage(new CellRendererSPIcon()); | ||
3352 | 3286 | + icon_renderer->property_xpad() = 8; | ||
3353 | 3287 | + icon_renderer->property_width() = 36; | ||
3354 | 3288 | + int cols_count = _event_list_view.append_column("Icon", *icon_renderer); | ||
3355 | 3289 | + | ||
3356 | 3290 | + Gtk::TreeView::Column* icon_column = _event_list_view.get_column(cols_count-1); | ||
3357 | 3291 | + icon_column->add_attribute(icon_renderer->property_event_type(), _columns->type); | ||
3358 | 3292 | + | ||
3359 | 3293 | + Gtk::CellRendererText* description_renderer = Gtk::manage(new Gtk::CellRendererText()); | ||
3360 | 3294 | + | ||
3361 | 3295 | + cols_count = _event_list_view.append_column("Description", *description_renderer); | ||
3362 | 3296 | + Gtk::TreeView::Column* description_column = _event_list_view.get_column(cols_count-1); | ||
3363 | 3297 | + description_column->add_attribute(description_renderer->property_text(), _columns->description); | ||
3364 | 3298 | + description_column->set_resizable(); | ||
3365 | 3299 | + | ||
3366 | 3300 | + _event_list_view.set_expander_column( *_event_list_view.get_column(cols_count-1) ); | ||
3367 | 3301 | + | ||
3368 | 3302 | + CellRendererInt* children_renderer = Gtk::manage(new CellRendererInt(greater_than_1)); | ||
3369 | 3303 | + children_renderer->property_weight() = 600; // =Pango::WEIGHT_SEMIBOLD (not defined in old versions of pangomm) | ||
3370 | 3304 | + children_renderer->property_xalign() = 1.0; | ||
3371 | 3305 | + children_renderer->property_xpad() = 20; | ||
3372 | 3306 | + | ||
3373 | 3307 | + cols_count = _event_list_view.append_column("Children", *children_renderer); | ||
3374 | 3308 | + Gtk::TreeView::Column* children_column = _event_list_view.get_column(cols_count-1); | ||
3375 | 3309 | + children_column->add_attribute(children_renderer->property_number(), _columns->child_count); | ||
3376 | 3310 | + | ||
3377 | 3311 | + _scrolled_window.add(_event_list_view); | ||
3378 | 3312 | + | ||
3379 | 3313 | + // connect EventLog callbacks | ||
3380 | 3314 | + _callback_connections[EventLog::CALLB_SELECTION_CHANGE] = | ||
3381 | 3315 | + _event_list_selection->signal_changed().connect(sigc::mem_fun(*this, &Inkscape::UI::Dialog::UndoHistory::_onListSelectionChange)); | ||
3382 | 3316 | + | ||
3383 | 3317 | + _callback_connections[EventLog::CALLB_EXPAND] = | ||
3384 | 3318 | + _event_list_view.signal_row_expanded().connect(sigc::mem_fun(*this, &Inkscape::UI::Dialog::UndoHistory::_onExpandEvent)); | ||
3385 | 3319 | + | ||
3386 | 3320 | + _callback_connections[EventLog::CALLB_COLLAPSE] = | ||
3387 | 3321 | + _event_list_view.signal_row_collapsed().connect(sigc::mem_fun(*this, &Inkscape::UI::Dialog::UndoHistory::_onCollapseEvent)); | ||
3388 | 3322 | + | ||
3389 | 3323 | + // connect with the EventLog | ||
3390 | 3324 | + _event_log->connectWithDialog(&_event_list_view, &_callback_connections); | ||
3391 | 3325 | + | ||
3392 | 3326 | + show_all_children(); | ||
3393 | 3327 | + | ||
3394 | 3328 | + // scroll to the selected row | ||
3395 | 3329 | + _event_list_view.set_cursor(_event_list_store->get_path(_event_log->getCurrEvent())); | ||
3396 | 3330 | +} | ||
3397 | 3331 | + | ||
3398 | 3332 | +UndoHistory::~UndoHistory() | ||
3399 | 3333 | +{ | ||
3400 | 3334 | +} | ||
3401 | 3335 | + | ||
3402 | 3336 | +void | ||
3403 | 3337 | +UndoHistory::_onListSelectionChange() | ||
3404 | 3338 | +{ | ||
3405 | 3339 | + | ||
3406 | 3340 | + EventLog::const_iterator selected = _event_list_selection->get_selected(); | ||
3407 | 3341 | + | ||
3408 | 3342 | + /* If no event is selected in the view, find the right one and select it. This happens whenever | ||
3409 | 3343 | + * a branch we're currently in is collapsed. | ||
3410 | 3344 | + */ | ||
3411 | 3345 | + if (!selected) { | ||
3412 | 3346 | + | ||
3413 | 3347 | + EventLog::iterator curr_event = _event_log->getCurrEvent(); | ||
3414 | 3348 | + | ||
3415 | 3349 | + if (curr_event->parent()) { | ||
3416 | 3350 | + | ||
3417 | 3351 | + EventLog::iterator curr_event_parent = curr_event->parent(); | ||
3418 | 3352 | + EventLog::iterator last = curr_event_parent->children().end(); | ||
3419 | 3353 | + | ||
3420 | 3354 | + _event_log->blockNotifications(); | ||
3421 | 3355 | + for ( --last ; curr_event != last ; ++curr_event ) { | ||
3422 | 3356 | + sp_document_redo(_document); | ||
3423 | 3357 | + } | ||
3424 | 3358 | + _event_log->blockNotifications(false); | ||
3425 | 3359 | + | ||
3426 | 3360 | + _event_log->setCurrEvent(curr_event); | ||
3427 | 3361 | + _event_list_selection->select(curr_event_parent); | ||
3428 | 3362 | + | ||
3429 | 3363 | + } else { // this should not happen | ||
3430 | 3364 | + _event_list_selection->select(curr_event); | ||
3431 | 3365 | + } | ||
3432 | 3366 | + | ||
3433 | 3367 | + } else { | ||
3434 | 3368 | + | ||
3435 | 3369 | + EventLog::const_iterator last_selected = _event_log->getCurrEvent(); | ||
3436 | 3370 | + | ||
3437 | 3371 | + /* Selecting a collapsed parent event is equal to selecting the last child | ||
3438 | 3372 | + * of that parent's branch. | ||
3439 | 3373 | + */ | ||
3440 | 3374 | + | ||
3441 | 3375 | + if ( !selected->children().empty() && | ||
3442 | 3376 | + !_event_list_view.row_expanded(_event_list_store->get_path(selected)) ) | ||
3443 | 3377 | + { | ||
3444 | 3378 | + selected = selected->children().end(); | ||
3445 | 3379 | + --selected; | ||
3446 | 3380 | + } | ||
3447 | 3381 | + | ||
3448 | 3382 | + // An event before the current one has been selected. Undo to the selected event. | ||
3449 | 3383 | + if ( _event_list_store->get_path(selected) < | ||
3450 | 3384 | + _event_list_store->get_path(last_selected) ) | ||
3451 | 3385 | + { | ||
3452 | 3386 | + _event_log->blockNotifications(); | ||
3453 | 3387 | + | ||
3454 | 3388 | + while ( selected != last_selected ) { | ||
3455 | 3389 | + | ||
3456 | 3390 | + sp_document_undo(_document); | ||
3457 | 3391 | + | ||
3458 | 3392 | + if ( last_selected->parent() && | ||
3459 | 3393 | + last_selected == last_selected->parent()->children().begin() ) | ||
3460 | 3394 | + { | ||
3461 | 3395 | + last_selected = last_selected->parent(); | ||
3462 | 3396 | + _event_log->setCurrEventParent((EventLog::iterator)NULL); | ||
3463 | 3397 | + } else { | ||
3464 | 3398 | + --last_selected; | ||
3465 | 3399 | + if ( !last_selected->children().empty() ) { | ||
3466 | 3400 | + _event_log->setCurrEventParent(last_selected); | ||
3467 | 3401 | + last_selected = last_selected->children().end(); | ||
3468 | 3402 | + --last_selected; | ||
3469 | 3403 | + } | ||
3470 | 3404 | + } | ||
3471 | 3405 | + } | ||
3472 | 3406 | + _event_log->blockNotifications(false); | ||
3473 | 3407 | + _event_log->updateUndoVerbs(); | ||
3474 | 3408 | + | ||
3475 | 3409 | + } else { // An event after the current one has been selected. Redo to the selected event. | ||
3476 | 3410 | + | ||
3477 | 3411 | + _event_log->blockNotifications(); | ||
3478 | 3412 | + | ||
3479 | 3413 | + while ( selected != last_selected ) { | ||
3480 | 3414 | + | ||
3481 | 3415 | + sp_document_redo(_document); | ||
3482 | 3416 | + | ||
3483 | 3417 | + if ( !last_selected->children().empty() ) { | ||
3484 | 3418 | + _event_log->setCurrEventParent(last_selected); | ||
3485 | 3419 | + last_selected = last_selected->children().begin(); | ||
3486 | 3420 | + } else { | ||
3487 | 3421 | + ++last_selected; | ||
3488 | 3422 | + if ( last_selected->parent() && | ||
3489 | 3423 | + last_selected == last_selected->parent()->children().end() ) | ||
3490 | 3424 | + { | ||
3491 | 3425 | + last_selected = last_selected->parent(); | ||
3492 | 3426 | + ++last_selected; | ||
3493 | 3427 | + _event_log->setCurrEventParent((EventLog::iterator)NULL); | ||
3494 | 3428 | + } | ||
3495 | 3429 | + } | ||
3496 | 3430 | + } | ||
3497 | 3431 | + _event_log->blockNotifications(false); | ||
3498 | 3432 | + | ||
3499 | 3433 | + } | ||
3500 | 3434 | + | ||
3501 | 3435 | + _event_log->setCurrEvent(selected); | ||
3502 | 3436 | + _event_log->updateUndoVerbs(); | ||
3503 | 3437 | + } | ||
3504 | 3438 | + | ||
3505 | 3439 | +} | ||
3506 | 3440 | + | ||
3507 | 3441 | +void | ||
3508 | 3442 | +UndoHistory::_onExpandEvent(const Gtk::TreeModel::iterator &iter, const Gtk::TreeModel::Path &/*path*/) | ||
3509 | 3443 | +{ | ||
3510 | 3444 | + if ( iter == _event_list_selection->get_selected() ) { | ||
3511 | 3445 | + _event_list_selection->select(_event_log->getCurrEvent()); | ||
3512 | 3446 | + } | ||
3513 | 3447 | +} | ||
3514 | 3448 | + | ||
3515 | 3449 | +void | ||
3516 | 3450 | +UndoHistory::_onCollapseEvent(const Gtk::TreeModel::iterator &iter, const Gtk::TreeModel::Path &/*path*/) | ||
3517 | 3451 | +{ | ||
3518 | 3452 | + // Collapsing a branch we're currently in is equal to stepping to the last event in that branch | ||
3519 | 3453 | + if ( iter == _event_log->getCurrEvent() ) { | ||
3520 | 3454 | + EventLog::const_iterator curr_event_parent = _event_log->getCurrEvent(); | ||
3521 | 3455 | + EventLog::const_iterator curr_event = curr_event_parent->children().begin(); | ||
3522 | 3456 | + EventLog::const_iterator last = curr_event_parent->children().end(); | ||
3523 | 3457 | + | ||
3524 | 3458 | + _event_log->blockNotifications(); | ||
3525 | 3459 | + sp_document_redo(_document); | ||
3526 | 3460 | + | ||
3527 | 3461 | + for ( --last ; curr_event != last ; ++curr_event ) { | ||
3528 | 3462 | + sp_document_redo(_document); | ||
3529 | 3463 | + } | ||
3530 | 3464 | + _event_log->blockNotifications(false); | ||
3531 | 3465 | + | ||
3532 | 3466 | + _event_log->setCurrEvent(curr_event); | ||
3533 | 3467 | + _event_log->setCurrEventParent(curr_event_parent); | ||
3534 | 3468 | + _event_list_selection->select(curr_event_parent); | ||
3535 | 3469 | + } | ||
3536 | 3470 | +} | ||
3537 | 3471 | + | ||
3538 | 3472 | +const CellRendererInt::Filter& UndoHistory::greater_than_1 = UndoHistory::GreaterThan(1); | ||
3539 | 3473 | + | ||
3540 | 3474 | +} // namespace Dialog | ||
3541 | 3475 | +} // namespace UI | ||
3542 | 3476 | +} // namespace Inkscape | ||
3543 | 3477 | + | ||
3544 | 3478 | +/* | ||
3545 | 3479 | + Local Variables: | ||
3546 | 3480 | + mode:c++ | ||
3547 | 3481 | + c-file-style:"stroustrup" | ||
3548 | 3482 | + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) | ||
3549 | 3483 | + indent-tabs-mode:nil | ||
3550 | 3484 | + fill-column:99 | ||
3551 | 3485 | + End: | ||
3552 | 3486 | +*/ | ||
3553 | 3487 | +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : | ||
3554 | 3488 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/tool/control-point-selection.h inkscape-0.48.1/src/ui/tool/control-point-selection.h | ||
3555 | 3489 | --- inkscape-0.48.1~/src/ui/tool/control-point-selection.h 2010-08-04 17:45:00.000000000 +0100 | ||
3556 | 3490 | +++ inkscape-0.48.1/src/ui/tool/control-point-selection.h 2011-05-01 00:56:19.611250878 +0100 | ||
3557 | 3491 | @@ -14,6 +14,7 @@ | ||
3558 | 3492 | |||
3559 | 3493 | #include <memory> | ||
3560 | 3494 | #include <boost/optional.hpp> | ||
3561 | 3495 | +#include <stddef.h> | ||
3562 | 3496 | #include <sigc++/sigc++.h> | ||
3563 | 3497 | #include <2geom/forward.h> | ||
3564 | 3498 | #include <2geom/point.h> | ||
3565 | 3499 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/tool/control-point.h inkscape-0.48.1/src/ui/tool/control-point.h | ||
3566 | 3500 | --- inkscape-0.48.1~/src/ui/tool/control-point.h 2010-07-13 04:48:40.000000000 +0100 | ||
3567 | 3501 | +++ inkscape-0.48.1/src/ui/tool/control-point.h 2011-05-01 00:56:19.611250878 +0100 | ||
3568 | 3502 | @@ -12,6 +12,7 @@ | ||
3569 | 3503 | #define SEEN_UI_TOOL_CONTROL_POINT_H | ||
3570 | 3504 | |||
3571 | 3505 | #include <boost/utility.hpp> | ||
3572 | 3506 | +#include <stddef.h> | ||
3573 | 3507 | #include <sigc++/sigc++.h> | ||
3574 | 3508 | #include <gdkmm.h> | ||
3575 | 3509 | #include <gtkmm.h> | ||
3576 | 3510 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/tool/manipulator.h inkscape-0.48.1/src/ui/tool/manipulator.h | ||
3577 | 3511 | --- inkscape-0.48.1~/src/ui/tool/manipulator.h 2010-07-13 04:48:40.000000000 +0100 | ||
3578 | 3512 | +++ inkscape-0.48.1/src/ui/tool/manipulator.h 2011-05-01 00:56:19.611250878 +0100 | ||
3579 | 3513 | @@ -13,6 +13,7 @@ | ||
3580 | 3514 | |||
3581 | 3515 | #include <set> | ||
3582 | 3516 | #include <map> | ||
3583 | 3517 | +#include <stddef.h> | ||
3584 | 3518 | #include <sigc++/sigc++.h> | ||
3585 | 3519 | #include <glib.h> | ||
3586 | 3520 | #include <gdk/gdk.h> | ||
3587 | 3521 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/tool/multi-path-manipulator.h inkscape-0.48.1/src/ui/tool/multi-path-manipulator.h | ||
3588 | 3522 | --- inkscape-0.48.1~/src/ui/tool/multi-path-manipulator.h 2010-11-06 18:47:19.000000000 +0000 | ||
3589 | 3523 | +++ inkscape-0.48.1/src/ui/tool/multi-path-manipulator.h 2011-05-01 00:56:19.611250878 +0100 | ||
3590 | 3524 | @@ -11,6 +11,7 @@ | ||
3591 | 3525 | #ifndef SEEN_UI_TOOL_MULTI_PATH_MANIPULATOR_H | ||
3592 | 3526 | #define SEEN_UI_TOOL_MULTI_PATH_MANIPULATOR_H | ||
3593 | 3527 | |||
3594 | 3528 | +#include <stddef.h> | ||
3595 | 3529 | #include <sigc++/connection.h> | ||
3596 | 3530 | #include "display/display-forward.h" | ||
3597 | 3531 | #include "forward.h" | ||
3598 | 3532 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/tool/multi-path-manipulator.h.orig inkscape-0.48.1/src/ui/tool/multi-path-manipulator.h.orig | ||
3599 | 3533 | --- inkscape-0.48.1~/src/ui/tool/multi-path-manipulator.h.orig 1970-01-01 01:00:00.000000000 +0100 | ||
3600 | 3534 | +++ inkscape-0.48.1/src/ui/tool/multi-path-manipulator.h.orig 2010-11-06 18:47:19.000000000 +0000 | ||
3601 | 3535 | @@ -0,0 +1,139 @@ | ||
3602 | 3536 | +/** @file | ||
3603 | 3537 | + * Multi path manipulator - a tool component that edits multiple paths at once | ||
3604 | 3538 | + */ | ||
3605 | 3539 | +/* Authors: | ||
3606 | 3540 | + * Krzysztof Kosiński <tweenk.pl@gmail.com> | ||
3607 | 3541 | + * | ||
3608 | 3542 | + * Copyright (C) 2009 Authors | ||
3609 | 3543 | + * Released under GNU GPL, read the file 'COPYING' for more information | ||
3610 | 3544 | + */ | ||
3611 | 3545 | + | ||
3612 | 3546 | +#ifndef SEEN_UI_TOOL_MULTI_PATH_MANIPULATOR_H | ||
3613 | 3547 | +#define SEEN_UI_TOOL_MULTI_PATH_MANIPULATOR_H | ||
3614 | 3548 | + | ||
3615 | 3549 | +#include <sigc++/connection.h> | ||
3616 | 3550 | +#include "display/display-forward.h" | ||
3617 | 3551 | +#include "forward.h" | ||
3618 | 3552 | +#include "ui/tool/commit-events.h" | ||
3619 | 3553 | +#include "ui/tool/manipulator.h" | ||
3620 | 3554 | +#include "ui/tool/modifier-tracker.h" | ||
3621 | 3555 | +#include "ui/tool/node.h" | ||
3622 | 3556 | +#include "ui/tool/node-types.h" | ||
3623 | 3557 | +#include "ui/tool/shape-record.h" | ||
3624 | 3558 | + | ||
3625 | 3559 | +struct SPCanvasGroup; | ||
3626 | 3560 | + | ||
3627 | 3561 | +namespace Inkscape { | ||
3628 | 3562 | +namespace UI { | ||
3629 | 3563 | + | ||
3630 | 3564 | +class PathManipulator; | ||
3631 | 3565 | +class MultiPathManipulator; | ||
3632 | 3566 | +struct PathSharedData; | ||
3633 | 3567 | + | ||
3634 | 3568 | +/** | ||
3635 | 3569 | + * Manipulator that manages multiple path manipulators active at the same time. | ||
3636 | 3570 | + */ | ||
3637 | 3571 | +class MultiPathManipulator : public PointManipulator { | ||
3638 | 3572 | +public: | ||
3639 | 3573 | + MultiPathManipulator(PathSharedData &data, sigc::connection &chg); | ||
3640 | 3574 | + virtual ~MultiPathManipulator(); | ||
3641 | 3575 | + virtual bool event(GdkEvent *event); | ||
3642 | 3576 | + | ||
3643 | 3577 | + bool empty() { return _mmap.empty(); } | ||
3644 | 3578 | + unsigned size() { return _mmap.empty(); } | ||
3645 | 3579 | + void setItems(std::set<ShapeRecord> const &); | ||
3646 | 3580 | + void clear() { _mmap.clear(); } | ||
3647 | 3581 | + void cleanup(); | ||
3648 | 3582 | + | ||
3649 | 3583 | + void selectSubpaths(); | ||
3650 | 3584 | + void shiftSelection(int dir); | ||
3651 | 3585 | + void invertSelectionInSubpaths(); | ||
3652 | 3586 | + | ||
3653 | 3587 | + void setNodeType(NodeType t); | ||
3654 | 3588 | + void setSegmentType(SegmentType t); | ||
3655 | 3589 | + | ||
3656 | 3590 | + void insertNodes(); | ||
3657 | 3591 | + void duplicateNodes(); | ||
3658 | 3592 | + void joinNodes(); | ||
3659 | 3593 | + void breakNodes(); | ||
3660 | 3594 | + void deleteNodes(bool keep_shape = true); | ||
3661 | 3595 | + void joinSegments(); | ||
3662 | 3596 | + void deleteSegments(); | ||
3663 | 3597 | + void alignNodes(Geom::Dim2 d); | ||
3664 | 3598 | + void distributeNodes(Geom::Dim2 d); | ||
3665 | 3599 | + void reverseSubpaths(); | ||
3666 | 3600 | + void move(Geom::Point const &delta); | ||
3667 | 3601 | + | ||
3668 | 3602 | + void showOutline(bool show); | ||
3669 | 3603 | + void showHandles(bool show); | ||
3670 | 3604 | + void showPathDirection(bool show); | ||
3671 | 3605 | + void setLiveOutline(bool set); | ||
3672 | 3606 | + void setLiveObjects(bool set); | ||
3673 | 3607 | + void updateOutlineColors(); | ||
3674 | 3608 | + | ||
3675 | 3609 | + sigc::signal<void> signal_coords_changed; /// Emitted whenever the coordinates | ||
3676 | 3610 | + /// shown in the status bar need updating | ||
3677 | 3611 | +private: | ||
3678 | 3612 | + typedef std::pair<ShapeRecord, boost::shared_ptr<PathManipulator> > MapPair; | ||
3679 | 3613 | + typedef std::map<ShapeRecord, boost::shared_ptr<PathManipulator> > MapType; | ||
3680 | 3614 | + | ||
3681 | 3615 | + template <typename R> | ||
3682 | 3616 | + void invokeForAll(R (PathManipulator::*method)()) { | ||
3683 | 3617 | + for (MapType::iterator i = _mmap.begin(); i != _mmap.end(); ++i) { | ||
3684 | 3618 | + ((i->second.get())->*method)(); | ||
3685 | 3619 | + } | ||
3686 | 3620 | + } | ||
3687 | 3621 | + template <typename R, typename A> | ||
3688 | 3622 | + void invokeForAll(R (PathManipulator::*method)(A), A a) { | ||
3689 | 3623 | + for (MapType::iterator i = _mmap.begin(); i != _mmap.end(); ++i) { | ||
3690 | 3624 | + ((i->second.get())->*method)(a); | ||
3691 | 3625 | + } | ||
3692 | 3626 | + } | ||
3693 | 3627 | + template <typename R, typename A> | ||
3694 | 3628 | + void invokeForAll(R (PathManipulator::*method)(A const &), A const &a) { | ||
3695 | 3629 | + for (MapType::iterator i = _mmap.begin(); i != _mmap.end(); ++i) { | ||
3696 | 3630 | + ((i->second.get())->*method)(a); | ||
3697 | 3631 | + } | ||
3698 | 3632 | + } | ||
3699 | 3633 | + template <typename R, typename A, typename B> | ||
3700 | 3634 | + void invokeForAll(R (PathManipulator::*method)(A,B), A a, B b) { | ||
3701 | 3635 | + for (MapType::iterator i = _mmap.begin(); i != _mmap.end(); ++i) { | ||
3702 | 3636 | + ((i->second.get())->*method)(a, b); | ||
3703 | 3637 | + } | ||
3704 | 3638 | + } | ||
3705 | 3639 | + | ||
3706 | 3640 | + void _commit(CommitEvent cps); | ||
3707 | 3641 | + void _done(gchar const *); | ||
3708 | 3642 | + void _doneWithCleanup(gchar const *); | ||
3709 | 3643 | + guint32 _getOutlineColor(ShapeRole role); | ||
3710 | 3644 | + | ||
3711 | 3645 | + MapType _mmap; | ||
3712 | 3646 | +public: | ||
3713 | 3647 | + PathSharedData const &_path_data; | ||
3714 | 3648 | +private: | ||
3715 | 3649 | + sigc::connection &_changed; | ||
3716 | 3650 | + ModifierTracker _tracker; | ||
3717 | 3651 | + bool _show_handles; | ||
3718 | 3652 | + bool _show_outline; | ||
3719 | 3653 | + bool _show_path_direction; | ||
3720 | 3654 | + bool _live_outline; | ||
3721 | 3655 | + bool _live_objects; | ||
3722 | 3656 | + | ||
3723 | 3657 | + friend class PathManipulator; | ||
3724 | 3658 | +}; | ||
3725 | 3659 | + | ||
3726 | 3660 | +} // namespace UI | ||
3727 | 3661 | +} // namespace Inkscape | ||
3728 | 3662 | + | ||
3729 | 3663 | +#endif | ||
3730 | 3664 | + | ||
3731 | 3665 | +/* | ||
3732 | 3666 | + Local Variables: | ||
3733 | 3667 | + mode:c++ | ||
3734 | 3668 | + c-file-style:"stroustrup" | ||
3735 | 3669 | + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) | ||
3736 | 3670 | + indent-tabs-mode:nil | ||
3737 | 3671 | + fill-column:99 | ||
3738 | 3672 | + End: | ||
3739 | 3673 | +*/ | ||
3740 | 3674 | +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : | ||
3741 | 3675 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/tool/node-tool.h inkscape-0.48.1/src/ui/tool/node-tool.h | ||
3742 | 3676 | --- inkscape-0.48.1~/src/ui/tool/node-tool.h 2010-11-06 18:47:19.000000000 +0000 | ||
3743 | 3677 | +++ inkscape-0.48.1/src/ui/tool/node-tool.h 2011-05-01 00:56:19.611250878 +0100 | ||
3744 | 3678 | @@ -14,6 +14,7 @@ | ||
3745 | 3679 | #include <memory> | ||
3746 | 3680 | #include <boost/ptr_container/ptr_map.hpp> | ||
3747 | 3681 | #include <glib.h> | ||
3748 | 3682 | +#include <stddef.h> | ||
3749 | 3683 | #include <sigc++/sigc++.h> | ||
3750 | 3684 | #include "event-context.h" | ||
3751 | 3685 | #include "forward.h" | ||
3752 | 3686 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/tool/node.h inkscape-0.48.1/src/ui/tool/node.h | ||
3753 | 3687 | --- inkscape-0.48.1~/src/ui/tool/node.h 2011-01-02 04:34:09.000000000 +0000 | ||
3754 | 3688 | +++ inkscape-0.48.1/src/ui/tool/node.h 2011-05-01 00:56:19.611250878 +0100 | ||
3755 | 3689 | @@ -15,6 +15,7 @@ | ||
3756 | 3690 | #include <iterator> | ||
3757 | 3691 | #include <iosfwd> | ||
3758 | 3692 | #include <stdexcept> | ||
3759 | 3693 | +#include <cstddef> | ||
3760 | 3694 | #include <tr1/functional> | ||
3761 | 3695 | #include <boost/utility.hpp> | ||
3762 | 3696 | #include <boost/shared_ptr.hpp> | ||
3763 | 3697 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/view/view.h inkscape-0.48.1/src/ui/view/view.h | ||
3764 | 3698 | --- inkscape-0.48.1~/src/ui/view/view.h 2010-07-13 04:48:40.000000000 +0100 | ||
3765 | 3699 | +++ inkscape-0.48.1/src/ui/view/view.h 2011-05-01 00:56:19.611250878 +0100 | ||
3766 | 3700 | @@ -15,6 +15,7 @@ | ||
3767 | 3701 | */ | ||
3768 | 3702 | |||
3769 | 3703 | #include <gdk/gdktypes.h> | ||
3770 | 3704 | +#include <stddef.h> | ||
3771 | 3705 | #include <sigc++/connection.h> | ||
3772 | 3706 | #include "message.h" | ||
3773 | 3707 | #include "gc-managed.h" | ||
3774 | 3708 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/widget/color-picker.h inkscape-0.48.1/src/ui/widget/color-picker.h | ||
3775 | 3709 | --- inkscape-0.48.1~/src/ui/widget/color-picker.h 2010-07-13 04:48:40.000000000 +0100 | ||
3776 | 3710 | +++ inkscape-0.48.1/src/ui/widget/color-picker.h 2011-05-01 00:56:19.611250878 +0100 | ||
3777 | 3711 | @@ -13,6 +13,7 @@ | ||
3778 | 3712 | #ifndef __COLOR_PICKER_H__ | ||
3779 | 3713 | #define __COLOR_PICKER_H__ | ||
3780 | 3714 | |||
3781 | 3715 | +#include <stddef.h> | ||
3782 | 3716 | #include <sigc++/sigc++.h> | ||
3783 | 3717 | #include <gtkmm/button.h> | ||
3784 | 3718 | #include <gtkmm/dialog.h> | ||
3785 | 3719 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/widget/page-sizer.h inkscape-0.48.1/src/ui/widget/page-sizer.h | ||
3786 | 3720 | --- inkscape-0.48.1~/src/ui/widget/page-sizer.h 2010-07-13 04:48:40.000000000 +0100 | ||
3787 | 3721 | +++ inkscape-0.48.1/src/ui/widget/page-sizer.h 2011-05-01 00:56:19.611250878 +0100 | ||
3788 | 3722 | @@ -13,6 +13,7 @@ | ||
3789 | 3723 | #define INKSCAPE_UI_WIDGET_PAGE_SIZER__H | ||
3790 | 3724 | |||
3791 | 3725 | #include <gtkmm.h> | ||
3792 | 3726 | +#include <stddef.h> | ||
3793 | 3727 | #include <sigc++/sigc++.h> | ||
3794 | 3728 | |||
3795 | 3729 | #include "helper/units.h" | ||
3796 | 3730 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/widget/preferences-widget.h inkscape-0.48.1/src/ui/widget/preferences-widget.h | ||
3797 | 3731 | --- inkscape-0.48.1~/src/ui/widget/preferences-widget.h 2010-07-13 04:48:40.000000000 +0100 | ||
3798 | 3732 | +++ inkscape-0.48.1/src/ui/widget/preferences-widget.h 2011-05-01 00:56:19.611250878 +0100 | ||
3799 | 3733 | @@ -26,6 +26,7 @@ | ||
3800 | 3734 | #include <gtkmm/drawingarea.h> | ||
3801 | 3735 | #include <gtkmm/frame.h> | ||
3802 | 3736 | #include <gtkmm/filechooserbutton.h> | ||
3803 | 3737 | +#include <stddef.h> | ||
3804 | 3738 | #include <sigc++/sigc++.h> | ||
3805 | 3739 | #include <glibmm/i18n.h> | ||
3806 | 3740 | |||
3807 | 3741 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/widget/selected-style.h inkscape-0.48.1/src/ui/widget/selected-style.h | ||
3808 | 3742 | --- inkscape-0.48.1~/src/ui/widget/selected-style.h 2010-07-13 04:48:40.000000000 +0100 | ||
3809 | 3743 | +++ inkscape-0.48.1/src/ui/widget/selected-style.h 2011-05-01 00:56:19.611250878 +0100 | ||
3810 | 3744 | @@ -23,6 +23,7 @@ | ||
3811 | 3745 | #include <gtkmm/adjustment.h> | ||
3812 | 3746 | #include <gtkmm/spinbutton.h> | ||
3813 | 3747 | |||
3814 | 3748 | +#include <stddef.h> | ||
3815 | 3749 | #include <sigc++/sigc++.h> | ||
3816 | 3750 | |||
3817 | 3751 | #include <glibmm/i18n.h> | ||
3818 | 3752 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/widget/style-subject.h inkscape-0.48.1/src/ui/widget/style-subject.h | ||
3819 | 3753 | --- inkscape-0.48.1~/src/ui/widget/style-subject.h 2010-07-13 04:48:40.000000000 +0100 | ||
3820 | 3754 | +++ inkscape-0.48.1/src/ui/widget/style-subject.h 2011-05-01 00:56:19.611250878 +0100 | ||
3821 | 3755 | @@ -14,6 +14,7 @@ | ||
3822 | 3756 | #include "libnr/nr-rect.h" | ||
3823 | 3757 | #include <2geom/rect.h> | ||
3824 | 3758 | #include "sp-item.h" | ||
3825 | 3759 | +#include <stddef.h> | ||
3826 | 3760 | #include <sigc++/sigc++.h> | ||
3827 | 3761 | |||
3828 | 3762 | class SPDesktop; | ||
3829 | 3763 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/uri-references.h inkscape-0.48.1/src/uri-references.h | ||
3830 | 3764 | --- inkscape-0.48.1~/src/uri-references.h 2010-07-13 04:48:40.000000000 +0100 | ||
3831 | 3765 | +++ inkscape-0.48.1/src/uri-references.h 2011-05-01 00:56:19.611250878 +0100 | ||
3832 | 3766 | @@ -13,6 +13,7 @@ | ||
3833 | 3767 | * Released under GNU GPL, read the file 'COPYING' for more information | ||
3834 | 3768 | */ | ||
3835 | 3769 | |||
3836 | 3770 | +#include <stddef.h> | ||
3837 | 3771 | #include <sigc++/connection.h> | ||
3838 | 3772 | #include <sigc++/trackable.h> | ||
3839 | 3773 | |||
3840 | 3774 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/uri-references.h.orig inkscape-0.48.1/src/uri-references.h.orig | ||
3841 | 3775 | --- inkscape-0.48.1~/src/uri-references.h.orig 1970-01-01 01:00:00.000000000 +0100 | ||
3842 | 3776 | +++ inkscape-0.48.1/src/uri-references.h.orig 2010-07-13 04:48:40.000000000 +0100 | ||
3843 | 3777 | @@ -0,0 +1,152 @@ | ||
3844 | 3778 | +#ifndef __SP_URI_REFERENCES_H__ | ||
3845 | 3779 | +#define __SP_URI_REFERENCES_H__ | ||
3846 | 3780 | + | ||
3847 | 3781 | +/* | ||
3848 | 3782 | + * Helper methods for resolving URI References | ||
3849 | 3783 | + * | ||
3850 | 3784 | + * Authors: | ||
3851 | 3785 | + * Lauris Kaplinski <lauris@kaplinski.com> | ||
3852 | 3786 | + * | ||
3853 | 3787 | + * Copyright (C) 2001-2002 Lauris Kaplinski | ||
3854 | 3788 | + * Copyright (C) 2001 Ximian, Inc. | ||
3855 | 3789 | + * | ||
3856 | 3790 | + * Released under GNU GPL, read the file 'COPYING' for more information | ||
3857 | 3791 | + */ | ||
3858 | 3792 | + | ||
3859 | 3793 | +#include <sigc++/connection.h> | ||
3860 | 3794 | +#include <sigc++/trackable.h> | ||
3861 | 3795 | + | ||
3862 | 3796 | +#include "bad-uri-exception.h" | ||
3863 | 3797 | +#include "forward.h" | ||
3864 | 3798 | + | ||
3865 | 3799 | +namespace Inkscape { | ||
3866 | 3800 | + | ||
3867 | 3801 | +/** | ||
3868 | 3802 | + * A class encapsulating a reference to a particular URI; observers can | ||
3869 | 3803 | + * be notified when the URI comes to reference a different SPObject. | ||
3870 | 3804 | + * | ||
3871 | 3805 | + * The URIReference increments and decrements the SPObject's hrefcount | ||
3872 | 3806 | + * automatically. | ||
3873 | 3807 | + * | ||
3874 | 3808 | + * @see SPObject | ||
3875 | 3809 | + * @see sp_object_href | ||
3876 | 3810 | + * @see sp_object_hunref | ||
3877 | 3811 | + */ | ||
3878 | 3812 | +class URIReference : public sigc::trackable { | ||
3879 | 3813 | +public: | ||
3880 | 3814 | + /** | ||
3881 | 3815 | + * Constructor. | ||
3882 | 3816 | + * | ||
3883 | 3817 | + * @param owner The object on whose behalf this URIReference | ||
3884 | 3818 | + * is holding a reference to the target object. | ||
3885 | 3819 | + */ | ||
3886 | 3820 | + URIReference(SPObject *owner); | ||
3887 | 3821 | + URIReference(SPDocument *owner_document); | ||
3888 | 3822 | + | ||
3889 | 3823 | + /** | ||
3890 | 3824 | + * Destructor. Calls shutdown() if the reference has not been | ||
3891 | 3825 | + * shut down yet. | ||
3892 | 3826 | + */ | ||
3893 | 3827 | + virtual ~URIReference(); | ||
3894 | 3828 | + | ||
3895 | 3829 | + /** | ||
3896 | 3830 | + * Attaches to a URI, relative to the specified document. | ||
3897 | 3831 | + * | ||
3898 | 3832 | + * Throws a BadURIException if the URI is unsupported, | ||
3899 | 3833 | + * or the fragment identifier is xpointer and malformed. | ||
3900 | 3834 | + * | ||
3901 | 3835 | + * @param rel_document document for relative URIs | ||
3902 | 3836 | + * @param uri the URI to watch | ||
3903 | 3837 | + */ | ||
3904 | 3838 | + void attach(const URI &uri) throw(BadURIException); | ||
3905 | 3839 | + | ||
3906 | 3840 | + /** | ||
3907 | 3841 | + * Detaches from the currently attached URI target, if any; | ||
3908 | 3842 | + * the current referrent is signaled as NULL. | ||
3909 | 3843 | + */ | ||
3910 | 3844 | + void detach(); | ||
3911 | 3845 | + | ||
3912 | 3846 | + /** | ||
3913 | 3847 | + * @brief Returns a pointer to the current referrent of the | ||
3914 | 3848 | + * attached URI, or NULL. | ||
3915 | 3849 | + * | ||
3916 | 3850 | + * @return a pointer to the referenced SPObject or NULL | ||
3917 | 3851 | + */ | ||
3918 | 3852 | + SPObject *getObject() const { return _obj; } | ||
3919 | 3853 | + | ||
3920 | 3854 | + /** | ||
3921 | 3855 | + * @brief Returns a pointer to the URIReference's owner | ||
3922 | 3856 | + * | ||
3923 | 3857 | + * @return a pointer to the URIReference's owner | ||
3924 | 3858 | + */ | ||
3925 | 3859 | + SPObject *getOwner() const { return _owner; } | ||
3926 | 3860 | + | ||
3927 | 3861 | + /** | ||
3928 | 3862 | + * Accessor for the referrent change notification signal; | ||
3929 | 3863 | + * this signal is emitted whenever the URIReference's | ||
3930 | 3864 | + * referrent changes. | ||
3931 | 3865 | + * | ||
3932 | 3866 | + * Signal handlers take two parameters: the old and new | ||
3933 | 3867 | + * referrents. | ||
3934 | 3868 | + * | ||
3935 | 3869 | + * @returns a signal | ||
3936 | 3870 | + */ | ||
3937 | 3871 | + sigc::signal<void, SPObject *, SPObject *> changedSignal() { | ||
3938 | 3872 | + return _changed_signal; | ||
3939 | 3873 | + } | ||
3940 | 3874 | + | ||
3941 | 3875 | + /** | ||
3942 | 3876 | + * Returns a pointer to a URI containing the currently attached | ||
3943 | 3877 | + * URI, or NULL if no URI is currently attached. | ||
3944 | 3878 | + * | ||
3945 | 3879 | + * @returns the currently attached URI, or NULL | ||
3946 | 3880 | + */ | ||
3947 | 3881 | + const URI *getURI() const { | ||
3948 | 3882 | + return _uri; | ||
3949 | 3883 | + } | ||
3950 | 3884 | + | ||
3951 | 3885 | + /** | ||
3952 | 3886 | + * Returns true if there is currently an attached URI | ||
3953 | 3887 | + * | ||
3954 | 3888 | + * @returns true if there is an attached URI | ||
3955 | 3889 | + */ | ||
3956 | 3890 | + bool isAttached() const { | ||
3957 | 3891 | + return (bool)_uri; | ||
3958 | 3892 | + } | ||
3959 | 3893 | + | ||
3960 | 3894 | + SPDocument *getOwnerDocument() { return _owner_document; } | ||
3961 | 3895 | + SPObject *getOwnerObject() { return _owner; } | ||
3962 | 3896 | + | ||
3963 | 3897 | +protected: | ||
3964 | 3898 | + virtual bool _acceptObject(SPObject *obj) const { | ||
3965 | 3899 | + (void)obj; | ||
3966 | 3900 | + return true; | ||
3967 | 3901 | + } | ||
3968 | 3902 | + | ||
3969 | 3903 | +private: | ||
3970 | 3904 | + SPObject *_owner; | ||
3971 | 3905 | + SPDocument *_owner_document; | ||
3972 | 3906 | + sigc::connection _connection; | ||
3973 | 3907 | + sigc::connection _release_connection; | ||
3974 | 3908 | + SPObject *_obj; | ||
3975 | 3909 | + URI *_uri; | ||
3976 | 3910 | + | ||
3977 | 3911 | + sigc::signal<void, SPObject *, SPObject *> _changed_signal; | ||
3978 | 3912 | + | ||
3979 | 3913 | + void _setObject(SPObject *object); | ||
3980 | 3914 | + void _release(SPObject *object); | ||
3981 | 3915 | + | ||
3982 | 3916 | + void operator=(const URIReference &ref); | ||
3983 | 3917 | + /* Private and definition-less to prevent accidental use. */ | ||
3984 | 3918 | +}; | ||
3985 | 3919 | + | ||
3986 | 3920 | +} | ||
3987 | 3921 | + | ||
3988 | 3922 | +/** | ||
3989 | 3923 | + * Resolves an item referenced by a URI in CSS form contained in "url(...)" | ||
3990 | 3924 | + */ | ||
3991 | 3925 | +SPObject* sp_css_uri_reference_resolve( SPDocument *document, const gchar *uri ); | ||
3992 | 3926 | + | ||
3993 | 3927 | +SPObject *sp_uri_reference_resolve (SPDocument *document, const gchar *uri); | ||
3994 | 3928 | + | ||
3995 | 3929 | +#endif | ||
3996 | 3930 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/util/forward-pointer-iterator.h inkscape-0.48.1/src/util/forward-pointer-iterator.h | ||
3997 | 3931 | --- inkscape-0.48.1~/src/util/forward-pointer-iterator.h 2010-07-13 04:48:40.000000000 +0100 | ||
3998 | 3932 | +++ inkscape-0.48.1/src/util/forward-pointer-iterator.h 2011-05-01 00:56:19.611250878 +0100 | ||
3999 | 3933 | @@ -15,6 +15,7 @@ | ||
4000 | 3934 | #define SEEN_INKSCAPE_UTIL_FORWARD_POINTER_ITERATOR_H | ||
4001 | 3935 | |||
4002 | 3936 | #include <iterator> | ||
4003 | 3937 | +#include <cstddef> | ||
4004 | 3938 | #include "util/reference.h" | ||
4005 | 3939 | |||
4006 | 3940 | namespace Inkscape { | ||
4007 | 3941 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/util/share.h inkscape-0.48.1/src/util/share.h | ||
4008 | 3942 | --- inkscape-0.48.1~/src/util/share.h 2010-07-13 04:48:40.000000000 +0100 | ||
4009 | 3943 | +++ inkscape-0.48.1/src/util/share.h 2011-05-01 00:56:19.611250878 +0100 | ||
4010 | 3944 | @@ -14,6 +14,7 @@ | ||
4011 | 3945 | |||
4012 | 3946 | #include "gc-core.h" | ||
4013 | 3947 | #include <cstring> | ||
4014 | 3948 | +#include <cstddef> | ||
4015 | 3949 | |||
4016 | 3950 | namespace Inkscape { | ||
4017 | 3951 | namespace Util { | ||
4018 | 3952 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/util/unordered-containers.h inkscape-0.48.1/src/util/unordered-containers.h | ||
4019 | 3953 | --- inkscape-0.48.1~/src/util/unordered-containers.h 2010-07-13 04:48:40.000000000 +0100 | ||
4020 | 3954 | +++ inkscape-0.48.1/src/util/unordered-containers.h 2011-05-01 00:56:19.611250878 +0100 | ||
4021 | 3955 | @@ -41,6 +41,8 @@ | ||
4022 | 3956 | # define INK_UNORDERED_MAP __gnu_cxx::hash_map | ||
4023 | 3957 | # define INK_HASH __gnu_cxx::hash | ||
4024 | 3958 | |||
4025 | 3959 | +#include <cstddef> | ||
4026 | 3960 | + | ||
4027 | 3961 | namespace __gnu_cxx { | ||
4028 | 3962 | // hash function for pointers | ||
4029 | 3963 | // TR1 and Boost have this defined by default, __gnu_cxx doesn't | ||
4030 | 3964 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/widgets/desktop-widget.h inkscape-0.48.1/src/widgets/desktop-widget.h | ||
4031 | 3965 | --- inkscape-0.48.1~/src/widgets/desktop-widget.h 2010-07-13 04:48:40.000000000 +0100 | ||
4032 | 3966 | +++ inkscape-0.48.1/src/widgets/desktop-widget.h 2011-05-01 00:56:19.611250878 +0100 | ||
4033 | 3967 | @@ -21,6 +21,7 @@ | ||
4034 | 3968 | #include "ui/view/view-widget.h" | ||
4035 | 3969 | #include "ui/view/edit-widget-interface.h" | ||
4036 | 3970 | |||
4037 | 3971 | +#include <stddef.h> | ||
4038 | 3972 | #include <sigc++/connection.h> | ||
4039 | 3973 | |||
4040 | 3974 | // forward declaration | ||
4041 | 3975 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/widgets/desktop-widget.h.orig inkscape-0.48.1/src/widgets/desktop-widget.h.orig | ||
4042 | 3976 | --- inkscape-0.48.1~/src/widgets/desktop-widget.h.orig 1970-01-01 01:00:00.000000000 +0100 | ||
4043 | 3977 | +++ inkscape-0.48.1/src/widgets/desktop-widget.h.orig 2010-07-13 04:48:40.000000000 +0100 | ||
4044 | 3978 | @@ -0,0 +1,268 @@ | ||
4045 | 3979 | +#ifndef SEEN_SP_DESKTOP_WIDGET_H | ||
4046 | 3980 | +#define SEEN_SP_DESKTOP_WIDGET_H | ||
4047 | 3981 | + | ||
4048 | 3982 | +/** \file | ||
4049 | 3983 | + * SPDesktopWidget: handling Gtk events on a desktop. | ||
4050 | 3984 | + * | ||
4051 | 3985 | + * Authors: | ||
4052 | 3986 | + * Jon A. Cruz <jon@joncruz.org> (c) 2010 | ||
4053 | 3987 | + * John Bintz <jcoswell@coswellproductions.org> (c) 2006 | ||
4054 | 3988 | + * Ralf Stephan <ralf@ark.in-berlin.de> (c) 2005, distrib. under GPL2 | ||
4055 | 3989 | + * ? -2004 | ||
4056 | 3990 | + */ | ||
4057 | 3991 | + | ||
4058 | 3992 | +#include <gtk/gtktooltips.h> | ||
4059 | 3993 | +#include <gtk/gtkwindow.h> | ||
4060 | 3994 | + | ||
4061 | 3995 | +#include "display/display-forward.h" | ||
4062 | 3996 | +#include "libnr/nr-point.h" | ||
4063 | 3997 | +#include "forward.h" | ||
4064 | 3998 | +#include "message.h" | ||
4065 | 3999 | +#include "ui/view/view-widget.h" | ||
4066 | 4000 | +#include "ui/view/edit-widget-interface.h" | ||
4067 | 4001 | + | ||
4068 | 4002 | +#include <sigc++/connection.h> | ||
4069 | 4003 | + | ||
4070 | 4004 | +// forward declaration | ||
4071 | 4005 | +typedef struct _EgeColorProfTracker EgeColorProfTracker; | ||
4072 | 4006 | + | ||
4073 | 4007 | + | ||
4074 | 4008 | +#define SP_TYPE_DESKTOP_WIDGET SPDesktopWidget::getType() | ||
4075 | 4009 | +#define SP_DESKTOP_WIDGET(o) (GTK_CHECK_CAST ((o), SP_TYPE_DESKTOP_WIDGET, SPDesktopWidget)) | ||
4076 | 4010 | +#define SP_DESKTOP_WIDGET_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), SP_TYPE_DESKTOP_WIDGET, SPDesktopWidgetClass)) | ||
4077 | 4011 | +#define SP_IS_DESKTOP_WIDGET(o) (GTK_CHECK_TYPE ((o), SP_TYPE_DESKTOP_WIDGET)) | ||
4078 | 4012 | +#define SP_IS_DESKTOP_WIDGET_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), SP_TYPE_DESKTOP_WIDGET)) | ||
4079 | 4013 | + | ||
4080 | 4014 | +void sp_desktop_widget_destroy (SPDesktopWidget* dtw); | ||
4081 | 4015 | + | ||
4082 | 4016 | +void sp_desktop_widget_show_decorations(SPDesktopWidget *dtw, gboolean show); | ||
4083 | 4017 | +void sp_desktop_widget_iconify(SPDesktopWidget *dtw); | ||
4084 | 4018 | +void sp_desktop_widget_maximize(SPDesktopWidget *dtw); | ||
4085 | 4019 | +void sp_desktop_widget_fullscreen(SPDesktopWidget *dtw); | ||
4086 | 4020 | +void sp_desktop_widget_update_zoom(SPDesktopWidget *dtw); | ||
4087 | 4021 | +void sp_desktop_widget_update_rulers (SPDesktopWidget *dtw); | ||
4088 | 4022 | +void sp_desktop_widget_update_hruler (SPDesktopWidget *dtw); | ||
4089 | 4023 | +void sp_desktop_widget_update_vruler (SPDesktopWidget *dtw); | ||
4090 | 4024 | + | ||
4091 | 4025 | +/* Show/hide rulers & scrollbars */ | ||
4092 | 4026 | +void sp_desktop_widget_toggle_rulers (SPDesktopWidget *dtw); | ||
4093 | 4027 | +void sp_desktop_widget_toggle_scrollbars (SPDesktopWidget *dtw); | ||
4094 | 4028 | +void sp_desktop_widget_update_scrollbars (SPDesktopWidget *dtw, double scale); | ||
4095 | 4029 | +void sp_desktop_widget_toggle_color_prof_adj( SPDesktopWidget *dtw ); | ||
4096 | 4030 | + | ||
4097 | 4031 | +void sp_dtw_desktop_activate (SPDesktopWidget *dtw); | ||
4098 | 4032 | +void sp_dtw_desktop_deactivate (SPDesktopWidget *dtw); | ||
4099 | 4033 | + | ||
4100 | 4034 | +namespace Inkscape { namespace Widgets { class LayerSelector; } } | ||
4101 | 4035 | + | ||
4102 | 4036 | +namespace Inkscape { namespace UI { namespace Widget { class SelectedStyle; } } } | ||
4103 | 4037 | + | ||
4104 | 4038 | +namespace Inkscape { namespace UI { namespace Dialogs { class SwatchesPanel; } } } | ||
4105 | 4039 | + | ||
4106 | 4040 | +/// A GtkEventBox on an SPDesktop. | ||
4107 | 4041 | +struct SPDesktopWidget { | ||
4108 | 4042 | + SPViewWidget viewwidget; | ||
4109 | 4043 | + | ||
4110 | 4044 | + unsigned int update : 1; | ||
4111 | 4045 | + | ||
4112 | 4046 | + sigc::connection modified_connection; | ||
4113 | 4047 | + | ||
4114 | 4048 | + GtkTooltips *tt; | ||
4115 | 4049 | + | ||
4116 | 4050 | + SPDesktop *desktop; | ||
4117 | 4051 | + | ||
4118 | 4052 | + Gtk::Window *window; | ||
4119 | 4053 | + | ||
4120 | 4054 | + // The root vbox of the window layout. | ||
4121 | 4055 | + GtkWidget *vbox; | ||
4122 | 4056 | + | ||
4123 | 4057 | + GtkWidget *hbox; | ||
4124 | 4058 | + | ||
4125 | 4059 | + GtkWidget *menubar, *statusbar; | ||
4126 | 4060 | + | ||
4127 | 4061 | + Inkscape::UI::Dialogs::SwatchesPanel *panels; | ||
4128 | 4062 | + | ||
4129 | 4063 | + GtkWidget *hscrollbar, *vscrollbar, *vscrollbar_box; | ||
4130 | 4064 | + | ||
4131 | 4065 | + /* Rulers */ | ||
4132 | 4066 | + GtkWidget *hruler, *vruler; | ||
4133 | 4067 | + GtkWidget *hruler_box, *vruler_box; // eventboxes for setting tooltips | ||
4134 | 4068 | + | ||
4135 | 4069 | + GtkWidget *sticky_zoom; | ||
4136 | 4070 | + GtkWidget *cms_adjust; | ||
4137 | 4071 | + GtkWidget *coord_status; | ||
4138 | 4072 | + GtkWidget *coord_status_x; | ||
4139 | 4073 | + GtkWidget *coord_status_y; | ||
4140 | 4074 | + GtkWidget *select_status; | ||
4141 | 4075 | + GtkWidget *select_status_eventbox; | ||
4142 | 4076 | + GtkWidget *zoom_status; | ||
4143 | 4077 | + gulong zoom_update; | ||
4144 | 4078 | + | ||
4145 | 4079 | + Inkscape::UI::Widget::Dock *dock; | ||
4146 | 4080 | + | ||
4147 | 4081 | + Inkscape::UI::Widget::SelectedStyle *selected_style; | ||
4148 | 4082 | + | ||
4149 | 4083 | + gint coord_status_id, select_status_id; | ||
4150 | 4084 | + | ||
4151 | 4085 | + unsigned int _interaction_disabled_counter; | ||
4152 | 4086 | + | ||
4153 | 4087 | + SPCanvas *canvas; | ||
4154 | 4088 | + Geom::Point ruler_origin; | ||
4155 | 4089 | + double dt2r; | ||
4156 | 4090 | + | ||
4157 | 4091 | + GtkAdjustment *hadj, *vadj; | ||
4158 | 4092 | + | ||
4159 | 4093 | + Inkscape::Widgets::LayerSelector *layer_selector; | ||
4160 | 4094 | + | ||
4161 | 4095 | + EgeColorProfTracker* _tracker; | ||
4162 | 4096 | + | ||
4163 | 4097 | + struct WidgetStub : public Inkscape::UI::View::EditWidgetInterface { | ||
4164 | 4098 | + SPDesktopWidget *_dtw; | ||
4165 | 4099 | + SPDesktop *_dt; | ||
4166 | 4100 | + WidgetStub (SPDesktopWidget* dtw) : _dtw(dtw) {} | ||
4167 | 4101 | + | ||
4168 | 4102 | + virtual void setTitle (gchar const *uri) | ||
4169 | 4103 | + { _dtw->updateTitle (uri); } | ||
4170 | 4104 | + virtual Gtk::Window* getWindow() | ||
4171 | 4105 | + { return _dtw->window; } | ||
4172 | 4106 | + | ||
4173 | 4107 | + virtual void layout() { | ||
4174 | 4108 | + _dtw->layoutWidgets(); | ||
4175 | 4109 | + } | ||
4176 | 4110 | + | ||
4177 | 4111 | + virtual void present() | ||
4178 | 4112 | + { _dtw->presentWindow(); } | ||
4179 | 4113 | + virtual void getGeometry (gint &x, gint &y, gint &w, gint &h) | ||
4180 | 4114 | + { _dtw->getWindowGeometry (x, y, w, h); } | ||
4181 | 4115 | + virtual void setSize (gint w, gint h) | ||
4182 | 4116 | + { _dtw->setWindowSize (w, h); } | ||
4183 | 4117 | + virtual void setPosition (Geom::Point p) | ||
4184 | 4118 | + { _dtw->setWindowPosition (p); } | ||
4185 | 4119 | + virtual void setTransient (void* p, int transient_policy) | ||
4186 | 4120 | + { _dtw->setWindowTransient (p, transient_policy); } | ||
4187 | 4121 | + virtual Geom::Point getPointer() | ||
4188 | 4122 | + { return _dtw->window_get_pointer(); } | ||
4189 | 4123 | + virtual void setIconified() | ||
4190 | 4124 | + { sp_desktop_widget_iconify (_dtw); } | ||
4191 | 4125 | + virtual void setMaximized() | ||
4192 | 4126 | + { sp_desktop_widget_maximize (_dtw); } | ||
4193 | 4127 | + virtual void setFullscreen() | ||
4194 | 4128 | + { sp_desktop_widget_fullscreen (_dtw); } | ||
4195 | 4129 | + virtual bool shutdown() | ||
4196 | 4130 | + { return _dtw->shutdown(); } | ||
4197 | 4131 | + virtual void destroy() | ||
4198 | 4132 | + { | ||
4199 | 4133 | + if(_dtw->window != NULL) | ||
4200 | 4134 | + delete _dtw->window; | ||
4201 | 4135 | + _dtw->window = NULL; | ||
4202 | 4136 | + } | ||
4203 | 4137 | + | ||
4204 | 4138 | + virtual void requestCanvasUpdate() | ||
4205 | 4139 | + { _dtw->requestCanvasUpdate(); } | ||
4206 | 4140 | + virtual void requestCanvasUpdateAndWait() | ||
4207 | 4141 | + { _dtw->requestCanvasUpdateAndWait(); } | ||
4208 | 4142 | + virtual void enableInteraction() | ||
4209 | 4143 | + { _dtw->enableInteraction(); } | ||
4210 | 4144 | + virtual void disableInteraction() | ||
4211 | 4145 | + { _dtw->disableInteraction(); } | ||
4212 | 4146 | + virtual void activateDesktop() | ||
4213 | 4147 | + { sp_dtw_desktop_activate (_dtw); } | ||
4214 | 4148 | + virtual void deactivateDesktop() | ||
4215 | 4149 | + { sp_dtw_desktop_deactivate (_dtw); } | ||
4216 | 4150 | + virtual void viewSetPosition (Geom::Point p) | ||
4217 | 4151 | + { _dtw->viewSetPosition (p); } | ||
4218 | 4152 | + virtual void updateRulers() | ||
4219 | 4153 | + { sp_desktop_widget_update_rulers (_dtw); } | ||
4220 | 4154 | + virtual void updateScrollbars (double scale) | ||
4221 | 4155 | + { sp_desktop_widget_update_scrollbars (_dtw, scale); } | ||
4222 | 4156 | + virtual void toggleRulers() | ||
4223 | 4157 | + { sp_desktop_widget_toggle_rulers (_dtw); } | ||
4224 | 4158 | + virtual void toggleScrollbars() | ||
4225 | 4159 | + { sp_desktop_widget_toggle_scrollbars (_dtw); } | ||
4226 | 4160 | + virtual void toggleColorProfAdjust() | ||
4227 | 4161 | + { sp_desktop_widget_toggle_color_prof_adj(_dtw); } | ||
4228 | 4162 | + virtual void updateZoom() | ||
4229 | 4163 | + { sp_desktop_widget_update_zoom (_dtw); } | ||
4230 | 4164 | + virtual void letZoomGrabFocus() | ||
4231 | 4165 | + { _dtw->letZoomGrabFocus(); } | ||
4232 | 4166 | + virtual void setToolboxFocusTo (const gchar * id) | ||
4233 | 4167 | + { _dtw->setToolboxFocusTo (id); } | ||
4234 | 4168 | + virtual void setToolboxAdjustmentValue (const gchar *id, double val) | ||
4235 | 4169 | + { _dtw->setToolboxAdjustmentValue (id, val); } | ||
4236 | 4170 | + virtual void setToolboxSelectOneValue (gchar const *id, int val) | ||
4237 | 4171 | + { _dtw->setToolboxSelectOneValue (id, val); } | ||
4238 | 4172 | + virtual bool isToolboxButtonActive (gchar const* id) | ||
4239 | 4173 | + { return _dtw->isToolboxButtonActive (id); } | ||
4240 | 4174 | + virtual void setCoordinateStatus (Geom::Point p) | ||
4241 | 4175 | + { _dtw->setCoordinateStatus (p); } | ||
4242 | 4176 | + virtual void setMessage (Inkscape::MessageType type, gchar const* msg) | ||
4243 | 4177 | + { _dtw->setMessage (type, msg); } | ||
4244 | 4178 | + virtual bool warnDialog (gchar* text) | ||
4245 | 4179 | + { return _dtw->warnDialog (text); } | ||
4246 | 4180 | + virtual Inkscape::UI::Widget::Dock* getDock () | ||
4247 | 4181 | + { return _dtw->getDock(); } | ||
4248 | 4182 | + }; | ||
4249 | 4183 | + | ||
4250 | 4184 | + WidgetStub *stub; | ||
4251 | 4185 | + | ||
4252 | 4186 | + void setMessage(Inkscape::MessageType type, gchar const *message); | ||
4253 | 4187 | + Geom::Point window_get_pointer(); | ||
4254 | 4188 | + bool shutdown(); | ||
4255 | 4189 | + void viewSetPosition (Geom::Point p); | ||
4256 | 4190 | + void letZoomGrabFocus(); | ||
4257 | 4191 | + void getWindowGeometry (gint &x, gint &y, gint &w, gint &h); | ||
4258 | 4192 | + void setWindowPosition (Geom::Point p); | ||
4259 | 4193 | + void setWindowSize (gint w, gint h); | ||
4260 | 4194 | + void setWindowTransient (void *p, int transient_policy); | ||
4261 | 4195 | + void presentWindow(); | ||
4262 | 4196 | + bool warnDialog (gchar *text); | ||
4263 | 4197 | + void setToolboxFocusTo (gchar const *); | ||
4264 | 4198 | + void setToolboxAdjustmentValue (gchar const * id, double value); | ||
4265 | 4199 | + void setToolboxSelectOneValue (gchar const * id, gint value); | ||
4266 | 4200 | + bool isToolboxButtonActive (gchar const *id); | ||
4267 | 4201 | + void setToolboxPosition(Glib::ustring const& id, GtkPositionType pos); | ||
4268 | 4202 | + void setCoordinateStatus(Geom::Point p); | ||
4269 | 4203 | + void requestCanvasUpdate(); | ||
4270 | 4204 | + void requestCanvasUpdateAndWait(); | ||
4271 | 4205 | + void enableInteraction(); | ||
4272 | 4206 | + void disableInteraction(); | ||
4273 | 4207 | + void updateTitle(gchar const *uri); | ||
4274 | 4208 | + bool onFocusInEvent(GdkEventFocus*); | ||
4275 | 4209 | + | ||
4276 | 4210 | + Inkscape::UI::Widget::Dock* getDock(); | ||
4277 | 4211 | + | ||
4278 | 4212 | + static GtkType getType(); | ||
4279 | 4213 | + static SPDesktopWidget* createInstance(SPNamedView *namedview); | ||
4280 | 4214 | + | ||
4281 | 4215 | + void updateNamedview(); | ||
4282 | 4216 | + | ||
4283 | 4217 | +private: | ||
4284 | 4218 | + GtkWidget *tool_toolbox; | ||
4285 | 4219 | + GtkWidget *aux_toolbox; | ||
4286 | 4220 | + GtkWidget *commands_toolbox,; | ||
4287 | 4221 | + GtkWidget *snap_toolbox; | ||
4288 | 4222 | + | ||
4289 | 4223 | + static void init(SPDesktopWidget *widget); | ||
4290 | 4224 | + void layoutWidgets(); | ||
4291 | 4225 | + | ||
4292 | 4226 | + void namedviewModified(SPObject *obj, guint flags); | ||
4293 | 4227 | + | ||
4294 | 4228 | +}; | ||
4295 | 4229 | + | ||
4296 | 4230 | +/// The SPDesktopWidget vtable | ||
4297 | 4231 | +struct SPDesktopWidgetClass { | ||
4298 | 4232 | + SPViewWidgetClass parent_class; | ||
4299 | 4233 | +}; | ||
4300 | 4234 | + | ||
4301 | 4235 | +#endif /* !SEEN_SP_DESKTOP_WIDGET_H */ | ||
4302 | 4236 | + | ||
4303 | 4237 | +/* | ||
4304 | 4238 | + Local Variables: | ||
4305 | 4239 | + mode:c++ | ||
4306 | 4240 | + c-file-style:"stroustrup" | ||
4307 | 4241 | + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) | ||
4308 | 4242 | + indent-tabs-mode:nil | ||
4309 | 4243 | + fill-column:99 | ||
4310 | 4244 | + End: | ||
4311 | 4245 | +*/ | ||
4312 | 4246 | +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : | ||
4313 | 4247 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/widgets/gradient-image.h inkscape-0.48.1/src/widgets/gradient-image.h | ||
4314 | 4248 | --- inkscape-0.48.1~/src/widgets/gradient-image.h 2010-07-13 04:48:40.000000000 +0100 | ||
4315 | 4249 | +++ inkscape-0.48.1/src/widgets/gradient-image.h 2011-05-01 00:56:19.611250878 +0100 | ||
4316 | 4250 | @@ -19,6 +19,7 @@ | ||
4317 | 4251 | |||
4318 | 4252 | #include <glib.h> | ||
4319 | 4253 | |||
4320 | 4254 | +#include <stddef.h> | ||
4321 | 4255 | #include <sigc++/connection.h> | ||
4322 | 4256 | |||
4323 | 4257 | #define SP_TYPE_GRADIENT_IMAGE (sp_gradient_image_get_type ()) | ||
4324 | 4258 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/widgets/gradient-vector.h inkscape-0.48.1/src/widgets/gradient-vector.h | ||
4325 | 4259 | --- inkscape-0.48.1~/src/widgets/gradient-vector.h 2010-07-13 04:48:40.000000000 +0100 | ||
4326 | 4260 | +++ inkscape-0.48.1/src/widgets/gradient-vector.h 2011-05-01 00:56:19.611250878 +0100 | ||
4327 | 4261 | @@ -17,6 +17,7 @@ | ||
4328 | 4262 | |||
4329 | 4263 | #include <glib.h> | ||
4330 | 4264 | |||
4331 | 4265 | +#include <stddef.h> | ||
4332 | 4266 | #include <sigc++/connection.h> | ||
4333 | 4267 | |||
4334 | 4268 | #include <gtk/gtkvbox.h> | ||
4335 | 4269 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/widgets/sp-attribute-widget.h inkscape-0.48.1/src/widgets/sp-attribute-widget.h | ||
4336 | 4270 | --- inkscape-0.48.1~/src/widgets/sp-attribute-widget.h 2010-07-13 04:48:40.000000000 +0100 | ||
4337 | 4271 | +++ inkscape-0.48.1/src/widgets/sp-attribute-widget.h 2011-05-01 00:56:19.611250878 +0100 | ||
4338 | 4272 | @@ -14,6 +14,7 @@ | ||
4339 | 4273 | #define SEEN_DIALOGS_SP_ATTRIBUTE_WIDGET_H | ||
4340 | 4274 | |||
4341 | 4275 | #include <glib.h> | ||
4342 | 4276 | +#include <stddef.h> | ||
4343 | 4277 | #include <sigc++/connection.h> | ||
4344 | 4278 | |||
4345 | 4279 | #define SP_TYPE_ATTRIBUTE_WIDGET (sp_attribute_widget_get_type ()) | ||
4346 | 4280 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/widgets/sp-color-notebook.cpp inkscape-0.48.1/src/widgets/sp-color-notebook.cpp | ||
4347 | 4281 | --- inkscape-0.48.1~/src/widgets/sp-color-notebook.cpp 2010-07-13 04:48:40.000000000 +0100 | ||
4348 | 4282 | +++ inkscape-0.48.1/src/widgets/sp-color-notebook.cpp 2011-05-01 00:56:19.611250878 +0100 | ||
4349 | 4283 | @@ -22,6 +22,7 @@ | ||
4350 | 4284 | #include <cstring> | ||
4351 | 4285 | #include <string> | ||
4352 | 4286 | #include <cstdlib> | ||
4353 | 4287 | +#include <cstddef> | ||
4354 | 4288 | #include <gtk/gtk.h> | ||
4355 | 4289 | #include <glibmm/i18n.h> | ||
4356 | 4290 | |||
4357 | 4291 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/xml/helper-observer.h inkscape-0.48.1/src/xml/helper-observer.h | ||
4358 | 4292 | --- inkscape-0.48.1~/src/xml/helper-observer.h 2010-07-13 04:48:40.000000000 +0100 | ||
4359 | 4293 | +++ inkscape-0.48.1/src/xml/helper-observer.h 2011-05-01 00:56:19.611250878 +0100 | ||
4360 | 4294 | @@ -5,6 +5,7 @@ | ||
4361 | 4295 | #include "node.h" | ||
4362 | 4296 | #include "../sp-object.h" | ||
4363 | 4297 | //#include "../sp-object-repr.h" | ||
4364 | 4298 | +#include <stddef.h> | ||
4365 | 4299 | #include <sigc++/sigc++.h> | ||
4366 | 4300 | |||
4367 | 4301 | namespace Inkscape { | ||
4368 | 4302 | 0 | ||
4369 | === added file 'debian/patches/ubuntu-01-add-unity-quicklist-support.dpatch' | |||
4370 | --- debian/patches/ubuntu-01-add-unity-quicklist-support.dpatch 1970-01-01 00:00:00 +0000 | |||
4371 | +++ debian/patches/ubuntu-01-add-unity-quicklist-support.dpatch 2011-05-08 10:26:27 +0000 | |||
4372 | @@ -0,0 +1,22 @@ | |||
4373 | 1 | #! /bin/sh /usr/share/dpatch/dpatch-run | ||
4374 | 2 | # Description: Add Unity static quicklist support to inkscape | ||
4375 | 3 | # Bug: https://launchpad.net/bugs/676886 | ||
4376 | 4 | # Bug-Ubuntu: https://launchpad.net/bugs/676886 | ||
4377 | 5 | # Author: Didier Roche <didrocks@ubuntu.com> | ||
4378 | 6 | # Applied-Upstream: commit:10201 | ||
4379 | 7 | # Last-Update: 2011-05-08 | ||
4380 | 8 | |||
4381 | 9 | @DPATCH@ | ||
4382 | 10 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/inkscape.desktop.in inkscape-0.48.1/inkscape.desktop.in | ||
4383 | 11 | --- inkscape-0.48.1~/inkscape.desktop.in 2010-07-13 05:48:40.000000000 +0200 | ||
4384 | 12 | +++ inkscape-0.48.1/inkscape.desktop.in 2011-02-17 16:21:42.690388423 +0100 | ||
4385 | 13 | @@ -12,3 +12,9 @@ | ||
4386 | 14 | Terminal=false | ||
4387 | 15 | StartupNotify=true | ||
4388 | 16 | Icon=inkscape | ||
4389 | 17 | +X-Ayatana-Desktop-Shortcuts=Drawing | ||
4390 | 18 | + | ||
4391 | 19 | +[Drawing Shortcut Group] | ||
4392 | 20 | +_Name=New Drawing | ||
4393 | 21 | +Exec=inkscape | ||
4394 | 22 | +TargetEnvironment=Unity | ||
4395 | 0 | 23 | ||
4396 | === added file 'debian/patches/ubuntu-02-add-translation-domain-to-desktop-file.dpatch' | |||
4397 | --- debian/patches/ubuntu-02-add-translation-domain-to-desktop-file.dpatch 1970-01-01 00:00:00 +0000 | |||
4398 | +++ debian/patches/ubuntu-02-add-translation-domain-to-desktop-file.dpatch 2011-05-08 10:26:27 +0000 | |||
4399 | @@ -0,0 +1,25 @@ | |||
4400 | 1 | #! /bin/sh /usr/share/dpatch/dpatch-run | ||
4401 | 2 | ## From: Alex Valavanis <valavanisalex@gmail.com> | ||
4402 | 3 | ## Description: Add translation domain to Desktop Entry file | ||
4403 | 4 | ## This is an Ubuntu-specific fix to allow translations to be stripped | ||
4404 | 5 | ## from the Desktop entry file and read from language packs instead. | ||
4405 | 6 | ## This is needed to save space on installation media because Inkcape is in | ||
4406 | 7 | ## the "main" repository in Ubuntu. Most other distributions do not use this | ||
4407 | 8 | ## method, or recognise the X-Ubuntu-Gettext key, so there is no point in | ||
4408 | 9 | ## forwarding the patch upstream. | ||
4409 | 10 | ## Bug-Ubuntu: https://launchpad.net/bugs/726850 | ||
4410 | 11 | ## Forwarded: not-needed | ||
4411 | 12 | ## Last-Update: 2011-05-08 | ||
4412 | 13 | |||
4413 | 14 | @DPATCH@ | ||
4414 | 15 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' fix-726850~/inkscape.desktop.in fix-726850/inkscape.desktop.in | ||
4415 | 16 | --- fix-726850~/inkscape.desktop.in 2011-05-08 00:33:13.722220290 +0100 | ||
4416 | 17 | +++ fix-726850/inkscape.desktop.in 2011-05-08 00:34:01.752220306 +0100 | ||
4417 | 18 | @@ -12,6 +12,7 @@ | ||
4418 | 19 | Terminal=false | ||
4419 | 20 | StartupNotify=true | ||
4420 | 21 | Icon=inkscape | ||
4421 | 22 | +X-Ubuntu-Gettext-Domain=inkscape | ||
4422 | 23 | X-Ayatana-Desktop-Shortcuts=Drawing | ||
4423 | 24 | |||
4424 | 25 | [Drawing Shortcut Group] | ||
4425 | 0 | 26 | ||
4426 | === added file 'debian/patches/ubuntu-03-fix-gcc4.6-ftbfs.dpatch' | |||
4427 | --- debian/patches/ubuntu-03-fix-gcc4.6-ftbfs.dpatch 1970-01-01 00:00:00 +0000 | |||
4428 | +++ debian/patches/ubuntu-03-fix-gcc4.6-ftbfs.dpatch 2011-05-08 10:26:27 +0000 | |||
4429 | @@ -0,0 +1,4302 @@ | |||
4430 | 1 | #! /bin/sh /usr/share/dpatch/dpatch-run | ||
4431 | 2 | ## Author: theAdib <theadib@gmail.com> | ||
4432 | 3 | ## Author: Alex Valavanis <valavanisalex@gmail.com> | ||
4433 | 4 | ## Description: Fix build failure with gcc 4.6 | ||
4434 | 5 | ## Bug: https://launchpad.net/bugs/707205 | ||
4435 | 6 | ## Bug-Ubuntu: https://launchpad.net/bugs/707205 | ||
4436 | 7 | ## Bug-Debian: https://bugs.debian.org/625085 | ||
4437 | 8 | ## Applied-Upstream: commit:10196 | ||
4438 | 9 | ## Last-Update: 2011-05-08 | ||
4439 | 10 | |||
4440 | 11 | @DPATCH@ | ||
4441 | 12 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/2geom/utils.h inkscape-0.48.1/src/2geom/utils.h | ||
4442 | 13 | --- inkscape-0.48.1~/src/2geom/utils.h 2010-07-13 04:48:40.000000000 +0100 | ||
4443 | 14 | +++ inkscape-0.48.1/src/2geom/utils.h 2011-05-01 00:56:53.101250888 +0100 | ||
4444 | 15 | @@ -33,6 +33,7 @@ | ||
4445 | 16 | * | ||
4446 | 17 | */ | ||
4447 | 18 | |||
4448 | 19 | +#include <cstddef> | ||
4449 | 20 | #include <cmath> | ||
4450 | 21 | #include <vector> | ||
4451 | 22 | |||
4452 | 23 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/Makefile.am inkscape-0.48.1/src/Makefile.am | ||
4453 | 24 | --- inkscape-0.48.1~/src/Makefile.am 2010-07-13 04:48:40.000000000 +0100 | ||
4454 | 25 | +++ inkscape-0.48.1/src/Makefile.am 2011-05-01 00:56:19.591250878 +0100 | ||
4455 | 26 | @@ -205,7 +205,7 @@ | ||
4456 | 27 | |||
4457 | 28 | inkscape_SOURCES += main.cpp $(win32_sources) | ||
4458 | 29 | inkscape_LDADD = $(all_libs) | ||
4459 | 30 | -inkscape_LDFLAGS = --export-dynamic $(kdeldflags) $(mwindows) | ||
4460 | 31 | +inkscape_LDFLAGS = -Wl,--export-dynamic $(kdeldflags) $(mwindows) | ||
4461 | 32 | |||
4462 | 33 | inkview_SOURCES += inkview.cpp $(win32_sources) | ||
4463 | 34 | inkview_LDADD = $(all_libs) | ||
4464 | 35 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/Makefile.am.orig inkscape-0.48.1/src/Makefile.am.orig | ||
4465 | 36 | --- inkscape-0.48.1~/src/Makefile.am.orig 1970-01-01 01:00:00.000000000 +0100 | ||
4466 | 37 | +++ inkscape-0.48.1/src/Makefile.am.orig 2010-07-13 04:48:40.000000000 +0100 | ||
4467 | 38 | @@ -0,0 +1,277 @@ | ||
4468 | 39 | +## Process this file with automake to produce Makefile.in | ||
4469 | 40 | + | ||
4470 | 41 | +# ################################################ | ||
4471 | 42 | +# G L O B A L | ||
4472 | 43 | +# ################################################ | ||
4473 | 44 | + | ||
4474 | 45 | +# Should work in either automake1.7 or 1.8, but 1.6 doesn't | ||
4475 | 46 | +# handle foo/libfoo_a_CPPFLAGS properly (if at all). | ||
4476 | 47 | +# Update: We now avoid setting foo/libfoo_a_CPPFLAGS, | ||
4477 | 48 | +# so perhaps 1.6 will work. | ||
4478 | 49 | +AUTOMAKE_OPTIONS = 1.7 subdir-objects | ||
4479 | 50 | + | ||
4480 | 51 | +# Executables compiled by "make" and installed by "make install" | ||
4481 | 52 | +bin_PROGRAMS = inkscape inkview | ||
4482 | 53 | + | ||
4483 | 54 | +# Libraries which should be compiled by "make" but not installed. | ||
4484 | 55 | +# Use this only for libraries that are really standalone, rather than for | ||
4485 | 56 | +# source tree subdirectories. | ||
4486 | 57 | +#if WITH_INKBOARD | ||
4487 | 58 | +#libpedro = pedro/libpedro.a | ||
4488 | 59 | +#endif | ||
4489 | 60 | +noinst_LIBRARIES = \ | ||
4490 | 61 | + libinkscape.a \ | ||
4491 | 62 | + dom/libdom.a \ | ||
4492 | 63 | + libcroco/libcroco.a \ | ||
4493 | 64 | + libavoid/libavoid.a \ | ||
4494 | 65 | + libgdl/libgdl.a \ | ||
4495 | 66 | + libcola/libcola.a \ | ||
4496 | 67 | + libvpsc/libvpsc.a \ | ||
4497 | 68 | + livarot/libvarot.a \ | ||
4498 | 69 | + 2geom/lib2geom.a \ | ||
4499 | 70 | + $(libpedro) \ | ||
4500 | 71 | + libinkversion.a | ||
4501 | 72 | + | ||
4502 | 73 | +all_libs = \ | ||
4503 | 74 | + $(noinst_LIBRARIES) \ | ||
4504 | 75 | + $(INKSCAPE_LIBS) \ | ||
4505 | 76 | + $(GNOME_VFS_LIBS) \ | ||
4506 | 77 | + $(XFT_LIBS) \ | ||
4507 | 78 | + $(FREETYPE_LIBS) \ | ||
4508 | 79 | + $(kdeldadd) \ | ||
4509 | 80 | + $(win32ldflags) \ | ||
4510 | 81 | + $(CARBON_LDFLAGS) \ | ||
4511 | 82 | + $(PERL_LIBS) \ | ||
4512 | 83 | + $(PYTHON_LIBS) \ | ||
4513 | 84 | + $(INKBOARD_LIBS) \ | ||
4514 | 85 | + $(LIBWPG_LIBS) \ | ||
4515 | 86 | + $(IMAGEMAGICK_LIBS) | ||
4516 | 87 | + | ||
4517 | 88 | +# Add sources common for Inkscape and Inkview to this variable. | ||
4518 | 89 | +ink_common_sources = | ||
4519 | 90 | +# Add Inkscape-only sources here. | ||
4520 | 91 | +inkscape_SOURCES = | ||
4521 | 92 | +# Add Inkview-only sources here. | ||
4522 | 93 | +inkview_SOURCES = | ||
4523 | 94 | + | ||
4524 | 95 | +INCLUDES = \ | ||
4525 | 96 | + $(PERL_CFLAGS) $(PYTHON_CFLAGS) \ | ||
4526 | 97 | + $(FREETYPE_CFLAGS) \ | ||
4527 | 98 | + $(GNOME_PRINT_CFLAGS) \ | ||
4528 | 99 | + $(GNOME_VFS_CFLAGS) \ | ||
4529 | 100 | + $(IMAGEMAGICK_CFLAGS) \ | ||
4530 | 101 | + $(INKBOARD_CFLAGS) \ | ||
4531 | 102 | + $(LIBWPG_CFLAGS) \ | ||
4532 | 103 | + $(XFT_CFLAGS) \ | ||
4533 | 104 | + $(LCMS_CFLAGS) \ | ||
4534 | 105 | + $(POPPLER_CFLAGS) \ | ||
4535 | 106 | + $(POPPLER_GLIB_CFLAGS) \ | ||
4536 | 107 | + -DPOTRACE=\"potrace\" \ | ||
4537 | 108 | + $(INKSCAPE_CFLAGS) \ | ||
4538 | 109 | + -I$(top_srcdir)/cxxtest \ | ||
4539 | 110 | + $(WIN32_CFLAGS) \ | ||
4540 | 111 | + -I$(srcdir)/bind/javainc \ | ||
4541 | 112 | + -I$(srcdir)/bind/javainc/linux \ | ||
4542 | 113 | + $(AM_CPPFLAGS) | ||
4543 | 114 | + | ||
4544 | 115 | +CXXTEST_TEMPLATE = $(srcdir)/cxxtest-template.tpl | ||
4545 | 116 | +CXXTESTGENFLAGS = --root --have-eh --template=$(CXXTEST_TEMPLATE) | ||
4546 | 117 | +CXXTESTGEN = $(top_srcdir)/cxxtest/cxxtestgen.pl $(CXXTESTGENFLAGS) | ||
4547 | 118 | +# Add test cases to this variable | ||
4548 | 119 | +CXXTEST_TESTSUITES = | ||
4549 | 120 | + | ||
4550 | 121 | +# ################################################ | ||
4551 | 122 | +# | ||
4552 | 123 | +# E X T R A | ||
4553 | 124 | +# | ||
4554 | 125 | +# ################################################ | ||
4555 | 126 | + | ||
4556 | 127 | +if PLATFORM_WIN32 | ||
4557 | 128 | +win32_sources = winmain.cpp registrytool.cpp registrytool.h | ||
4558 | 129 | +win32ldflags = -lcomdlg32 -lmscms | ||
4559 | 130 | +mwindows = -mwindows | ||
4560 | 131 | +endif | ||
4561 | 132 | + | ||
4562 | 133 | +if INKJAR | ||
4563 | 134 | +inkjar_dir = inkjar | ||
4564 | 135 | +inkjar_libs = inkjar/libinkjar.a | ||
4565 | 136 | +endif | ||
4566 | 137 | + | ||
4567 | 138 | +# Include all partial makefiles from subdirectories | ||
4568 | 139 | +include Makefile_insert | ||
4569 | 140 | +include application/Makefile_insert | ||
4570 | 141 | +include bind/Makefile_insert | ||
4571 | 142 | +include dialogs/Makefile_insert | ||
4572 | 143 | +include display/Makefile_insert | ||
4573 | 144 | +include dom/Makefile_insert | ||
4574 | 145 | +include extension/Makefile_insert | ||
4575 | 146 | +include extension/implementation/Makefile_insert | ||
4576 | 147 | +include extension/internal/Makefile_insert | ||
4577 | 148 | +include extension/script/Makefile_insert | ||
4578 | 149 | +include filters/Makefile_insert | ||
4579 | 150 | +include helper/Makefile_insert | ||
4580 | 151 | +include io/Makefile_insert | ||
4581 | 152 | +#include pedro/Makefile_insert | ||
4582 | 153 | +#include jabber_whiteboard/Makefile_insert | ||
4583 | 154 | +include libcroco/Makefile_insert | ||
4584 | 155 | +include libgdl/Makefile_insert | ||
4585 | 156 | +include libnr/Makefile_insert | ||
4586 | 157 | +include libnrtype/Makefile_insert | ||
4587 | 158 | +include libavoid/Makefile_insert | ||
4588 | 159 | +include livarot/Makefile_insert | ||
4589 | 160 | +include live_effects/Makefile_insert | ||
4590 | 161 | +include live_effects/parameter/Makefile_insert | ||
4591 | 162 | +include libvpsc/Makefile_insert | ||
4592 | 163 | +include libcola/Makefile_insert | ||
4593 | 164 | +include svg/Makefile_insert | ||
4594 | 165 | +include widgets/Makefile_insert | ||
4595 | 166 | +include debug/Makefile_insert | ||
4596 | 167 | +include xml/Makefile_insert | ||
4597 | 168 | +include ui/Makefile_insert | ||
4598 | 169 | +include ui/cache/Makefile_insert | ||
4599 | 170 | +include ui/dialog/Makefile_insert | ||
4600 | 171 | +include ui/tool/Makefile_insert | ||
4601 | 172 | +include ui/view/Makefile_insert | ||
4602 | 173 | +include ui/widget/Makefile_insert | ||
4603 | 174 | +include util/Makefile_insert | ||
4604 | 175 | +include trace/Makefile_insert | ||
4605 | 176 | +include 2geom/Makefile_insert | ||
4606 | 177 | + | ||
4607 | 178 | +# Extra files not mentioned as sources to include in the source tarball | ||
4608 | 179 | +EXTRA_DIST = \ | ||
4609 | 180 | + $(top_srcdir)/Doxyfile \ | ||
4610 | 181 | + sp-skeleton.cpp sp-skeleton.h \ | ||
4611 | 182 | + util/makefile.in \ | ||
4612 | 183 | + application/makefile.in \ | ||
4613 | 184 | + bind/makefile.in \ | ||
4614 | 185 | + debug/makefile.in \ | ||
4615 | 186 | + dialogs/makefile.in \ | ||
4616 | 187 | + display/makefile.in \ | ||
4617 | 188 | + dom/makefile.in \ | ||
4618 | 189 | + extension/implementation/makefile.in \ | ||
4619 | 190 | + extension/internal/makefile.in \ | ||
4620 | 191 | + extension/makefile.in \ | ||
4621 | 192 | + extension/script/makefile.in \ | ||
4622 | 193 | + filters/makefile.in \ | ||
4623 | 194 | + helper/makefile.in \ | ||
4624 | 195 | + io/makefile.in \ | ||
4625 | 196 | + io/crystalegg.xml \ | ||
4626 | 197 | + io/doc2html.xsl \ | ||
4627 | 198 | + pedro/makefile.in \ | ||
4628 | 199 | + jabber_whiteboard/makefile.in \ | ||
4629 | 200 | + libgdl/makefile.in \ | ||
4630 | 201 | + libcroco/makefile.in \ | ||
4631 | 202 | + libnr/makefile.in \ | ||
4632 | 203 | + libnrtype/makefile.in \ | ||
4633 | 204 | + libavoid/makefile.in \ | ||
4634 | 205 | + livarot/makefile.in \ | ||
4635 | 206 | + live_effects/makefile.in \ | ||
4636 | 207 | + live_effects/parameter/makefile.in \ | ||
4637 | 208 | + svg/makefile.in \ | ||
4638 | 209 | + trace/makefile.in \ | ||
4639 | 210 | + ui/makefile.in \ | ||
4640 | 211 | + ui/cache/makefile.in \ | ||
4641 | 212 | + ui/dialog/makefile.in \ | ||
4642 | 213 | + ui/view/makefile.in \ | ||
4643 | 214 | + ui/widget/makefile.in \ | ||
4644 | 215 | + util/makefile.in \ | ||
4645 | 216 | + widgets/makefile.in \ | ||
4646 | 217 | + xml/makefile.in \ | ||
4647 | 218 | + 2geom/makefile.in \ | ||
4648 | 219 | + extension/internal/win32.cpp \ | ||
4649 | 220 | + extension/internal/win32.h \ | ||
4650 | 221 | + extension/internal/emf-win32-inout.cpp \ | ||
4651 | 222 | + extension/internal/emf-win32-inout.h \ | ||
4652 | 223 | + extension/internal/emf-win32-print.cpp \ | ||
4653 | 224 | + extension/internal/emf-win32-print.h \ | ||
4654 | 225 | + helper/sp-marshal.list \ | ||
4655 | 226 | + show-preview.bmp \ | ||
4656 | 227 | + winconsole.cpp \ | ||
4657 | 228 | + $(jabber_whiteboard_SOURCES) \ | ||
4658 | 229 | + $(CXXTEST_TEMPLATE) | ||
4659 | 230 | + | ||
4660 | 231 | +# Extra files to remove when doing "make distclean" | ||
4661 | 232 | +DISTCLEANFILES = \ | ||
4662 | 233 | + helper/sp-marshal.cpp \ | ||
4663 | 234 | + helper/sp-marshal.h \ | ||
4664 | 235 | + inkscape-version.cpp | ||
4665 | 236 | + | ||
4666 | 237 | +# ################################################ | ||
4667 | 238 | +# B I N A R I E S | ||
4668 | 239 | +# ################################################ | ||
4669 | 240 | + | ||
4670 | 241 | +# this should speed up the build | ||
4671 | 242 | +libinkscape_a_SOURCES = $(ink_common_sources) | ||
4672 | 243 | + | ||
4673 | 244 | +inkscape_SOURCES += main.cpp $(win32_sources) | ||
4674 | 245 | +inkscape_LDADD = $(all_libs) | ||
4675 | 246 | +inkscape_LDFLAGS = --export-dynamic $(kdeldflags) $(mwindows) | ||
4676 | 247 | + | ||
4677 | 248 | +inkview_SOURCES += inkview.cpp $(win32_sources) | ||
4678 | 249 | +inkview_LDADD = $(all_libs) | ||
4679 | 250 | +inkview_LDFLAGS = $(mwindows) | ||
4680 | 251 | + | ||
4681 | 252 | +# ################################################ | ||
4682 | 253 | +# VERSION REPORTING | ||
4683 | 254 | +# ################################################ | ||
4684 | 255 | + | ||
4685 | 256 | +libinkversion_a_SOURCES = inkscape-version.cpp inkscape-version.h | ||
4686 | 257 | + | ||
4687 | 258 | +if USE_BZR_VERSION | ||
4688 | 259 | +inkscape_version_deps = $(top_srcdir)/.bzr/branch/last-revision | ||
4689 | 260 | +endif | ||
4690 | 261 | + | ||
4691 | 262 | +# If this is an BZR snapshot build, regenerate this file every time | ||
4692 | 263 | +# someone updates the BZR working directory. | ||
4693 | 264 | +inkscape-version.cpp: $(inkscape_version_deps) | ||
4694 | 265 | + VER_PREFIX="$(VERSION)";\ | ||
4695 | 266 | + VER_BZRREV=" r`bzr revno`"; \ | ||
4696 | 267 | + if test ! -z "`bzr status -S -V $(srcdir)`"; then \ | ||
4697 | 268 | + VER_CUSTOM=" custom"; \ | ||
4698 | 269 | + fi; \ | ||
4699 | 270 | + VERSION="$$VER_PREFIX$$VER_BZRREV$$VER_CUSTOM"; \ | ||
4700 | 271 | + echo "namespace Inkscape { " \ | ||
4701 | 272 | + "char const *version_string = \"$$VERSION\"; " \ | ||
4702 | 273 | + "}" > inkscape-version.new.cpp; \ | ||
4703 | 274 | + if cmp -s inkscape-version.new.cpp inkscape-version.cpp; then \ | ||
4704 | 275 | + rm inkscape-version.new.cpp; \ | ||
4705 | 276 | + else \ | ||
4706 | 277 | + mv inkscape-version.new.cpp inkscape-version.cpp; \ | ||
4707 | 278 | + fi; \ | ||
4708 | 279 | + echo $$VERSION | ||
4709 | 280 | + | ||
4710 | 281 | +# ################################# | ||
4711 | 282 | +# ## TESTING STUFF (make check) ### | ||
4712 | 283 | +# ################################# | ||
4713 | 284 | + | ||
4714 | 285 | +# List of all programs that should be built before testing. Note that this is | ||
4715 | 286 | +# different from TESTS, because some tests can be scripts that don't | ||
4716 | 287 | +# need to be built. There should be one test program per directory. | ||
4717 | 288 | +# automake adds $(EXEEXT) to check_PROGRAMS items but not to TESTS items: | ||
4718 | 289 | +# TESTS items can be scripts etc. | ||
4719 | 290 | +check_PROGRAMS = cxxtests | ||
4720 | 291 | + | ||
4721 | 292 | +# streamtest is unfinished and can't handle the relocations done during | ||
4722 | 293 | +# "make distcheck". | ||
4723 | 294 | + | ||
4724 | 295 | +# List of all tests to be run. | ||
4725 | 296 | +TESTS = $(check_PROGRAMS) ../share/extensions/test/run-all-extension-tests | ||
4726 | 297 | +XFAIL_TESTS = $(check_PROGRAMS) ../share/extensions/test/run-all-extension-tests | ||
4727 | 298 | + | ||
4728 | 299 | +# including the the testsuites here ensures that they get distributed | ||
4729 | 300 | +cxxtests_SOURCES = cxxtests.cpp libnr/nr-compose-reference.cpp $(CXXTEST_TESTSUITES) | ||
4730 | 301 | +cxxtests_LDADD = $(all_libs) | ||
4731 | 302 | + | ||
4732 | 303 | +cxxtests.cpp: $(CXXTEST_TESTSUITES) $(CXXTEST_TEMPLATE) | ||
4733 | 304 | + $(CXXTESTGEN) -o cxxtests.cpp $(CXXTEST_TESTSUITES) | ||
4734 | 305 | + | ||
4735 | 306 | +# ################################################ | ||
4736 | 307 | +# D I S T | ||
4737 | 308 | +# ################################################ | ||
4738 | 309 | + | ||
4739 | 310 | +dist-hook: | ||
4740 | 311 | + mkdir $(distdir)/pixmaps | ||
4741 | 312 | + cp $(srcdir)/pixmaps/*xpm $(distdir)/pixmaps | ||
4742 | 313 | + | ||
4743 | 314 | +distclean-local: | ||
4744 | 315 | + rm -f cxxtests.xml cxxtests.log | ||
4745 | 316 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/arc-context.h inkscape-0.48.1/src/arc-context.h | ||
4746 | 317 | --- inkscape-0.48.1~/src/arc-context.h 2010-07-13 04:48:40.000000000 +0100 | ||
4747 | 318 | +++ inkscape-0.48.1/src/arc-context.h 2011-05-01 00:56:19.591250878 +0100 | ||
4748 | 319 | @@ -15,6 +15,7 @@ | ||
4749 | 320 | * Released under GNU GPL, read the file 'COPYING' for more information | ||
4750 | 321 | */ | ||
4751 | 322 | |||
4752 | 323 | +#include <stddef.h> | ||
4753 | 324 | #include <sigc++/connection.h> | ||
4754 | 325 | |||
4755 | 326 | #include <2geom/point.h> | ||
4756 | 327 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/box3d-context.h inkscape-0.48.1/src/box3d-context.h | ||
4757 | 328 | --- inkscape-0.48.1~/src/box3d-context.h 2010-07-13 04:48:40.000000000 +0100 | ||
4758 | 329 | +++ inkscape-0.48.1/src/box3d-context.h 2011-05-01 00:56:19.591250878 +0100 | ||
4759 | 330 | @@ -15,6 +15,7 @@ | ||
4760 | 331 | * Released under GNU GPL | ||
4761 | 332 | */ | ||
4762 | 333 | |||
4763 | 334 | +#include <stddef.h> | ||
4764 | 335 | #include <sigc++/sigc++.h> | ||
4765 | 336 | #include "event-context.h" | ||
4766 | 337 | #include "proj_pt.h" | ||
4767 | 338 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/conn-avoid-ref.h inkscape-0.48.1/src/conn-avoid-ref.h | ||
4768 | 339 | --- inkscape-0.48.1~/src/conn-avoid-ref.h 2010-07-13 04:48:40.000000000 +0100 | ||
4769 | 340 | +++ inkscape-0.48.1/src/conn-avoid-ref.h 2011-05-01 00:56:19.591250878 +0100 | ||
4770 | 341 | @@ -14,6 +14,7 @@ | ||
4771 | 342 | */ | ||
4772 | 343 | |||
4773 | 344 | #include <glib/gslist.h> | ||
4774 | 345 | +#include <stddef.h> | ||
4775 | 346 | #include <sigc++/connection.h> | ||
4776 | 347 | |||
4777 | 348 | struct SPDesktop; | ||
4778 | 349 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/connection-pool.h inkscape-0.48.1/src/connection-pool.h | ||
4779 | 350 | --- inkscape-0.48.1~/src/connection-pool.h 2010-07-13 04:48:40.000000000 +0100 | ||
4780 | 351 | +++ inkscape-0.48.1/src/connection-pool.h 2011-05-01 00:56:19.591250878 +0100 | ||
4781 | 352 | @@ -3,6 +3,7 @@ | ||
4782 | 353 | |||
4783 | 354 | #include <glib-object.h> | ||
4784 | 355 | #include <gtkmm.h> | ||
4785 | 356 | +#include <stddef.h> | ||
4786 | 357 | #include <sigc++/sigc++.h> | ||
4787 | 358 | |||
4788 | 359 | namespace Inkscape | ||
4789 | 360 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/connector-context.h inkscape-0.48.1/src/connector-context.h | ||
4790 | 361 | --- inkscape-0.48.1~/src/connector-context.h 2010-07-13 04:48:40.000000000 +0100 | ||
4791 | 362 | +++ inkscape-0.48.1/src/connector-context.h 2011-05-01 00:56:19.591250878 +0100 | ||
4792 | 363 | @@ -12,6 +12,7 @@ | ||
4793 | 364 | * Released under GNU GPL, read the file 'COPYING' for more information | ||
4794 | 365 | */ | ||
4795 | 366 | |||
4796 | 367 | +#include <stddef.h> | ||
4797 | 368 | #include <sigc++/sigc++.h> | ||
4798 | 369 | #include <sigc++/connection.h> | ||
4799 | 370 | #include "event-context.h" | ||
4800 | 371 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/desktop.h inkscape-0.48.1/src/desktop.h | ||
4801 | 372 | --- inkscape-0.48.1~/src/desktop.h 2010-07-13 04:48:40.000000000 +0100 | ||
4802 | 373 | +++ inkscape-0.48.1/src/desktop.h 2011-05-01 00:56:19.591250878 +0100 | ||
4803 | 374 | @@ -27,6 +27,7 @@ | ||
4804 | 375 | |||
4805 | 376 | #include <gdk/gdkevents.h> | ||
4806 | 377 | #include <gtk/gtktypeutils.h> | ||
4807 | 378 | +#include <stddef.h> | ||
4808 | 379 | #include <sigc++/sigc++.h> | ||
4809 | 380 | |||
4810 | 381 | #include <2geom/matrix.h> | ||
4811 | 382 | diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/desktop.h.orig inkscape-0.48.1/src/desktop.h.orig | ||
4812 | 383 | --- inkscape-0.48.1~/src/desktop.h.orig 1970-01-01 01:00:00.000000000 +0100 | ||
4813 | 384 | +++ inkscape-0.48.1/src/desktop.h.orig 2010-07-13 04:48:40.000000000 +0100 | ||
4814 | 385 | @@ -0,0 +1,379 @@ | ||
4815 | 386 | +#ifndef SEEN_SP_DESKTOP_H | ||
4816 | 387 | +#define SEEN_SP_DESKTOP_H | ||
4817 | 388 | + | ||
4818 | 389 | +/** \file | ||
4819 | 390 | + * SPDesktop: an editable view. | ||
4820 | 391 | + * | ||
4821 | 392 | + * Author: | ||
4822 | 393 | + * Lauris Kaplinski <lauris@kaplinski.com> | ||
4823 | 394 | + * Frank Felfe <innerspace@iname.com> | ||
4824 | 395 | + * bulia byak <buliabyak@users.sf.net> | ||
4825 | 396 | + * Ralf Stephan <ralf@ark.in-berlin.de> | ||
4826 | 397 | + * John Bintz <jcoswell@coswellproductions.org> | ||
4827 | 398 | + * Johan Engelen <j.b.c.engelen@ewi.utwente.nl> | ||
4828 | 399 | + * | ||
4829 | 400 | + * Copyright (C) 2007 Johan Engelen | ||
4830 | 401 | + * Copyright (C) 2006 John Bintz | ||
4831 | 402 | + * Copyright (C) 1999-2005 authors | ||
4832 | 403 | + * Copyright (C) 2000-2001 Ximian, Inc. | ||
4833 | 404 | + * | ||
4834 | 405 | + * Released under GNU GPL, read the file 'COPYING' for more information | ||
4835 | 406 | + * | ||
4836 | 407 | + */ | ||
4837 | 408 | + | ||
4838 | 409 | +#ifdef HAVE_CONFIG_H | ||
4839 | 410 | +#include "config.h" | ||
4840 | 411 | +#endif | ||
4841 | 412 | + | ||
4842 | 413 | +#include <gdk/gdkevents.h> | ||
4843 | 414 | +#include <gtk/gtktypeutils.h> | ||
4844 | 415 | +#include <sigc++/sigc++.h> | ||
4845 | 416 | + | ||
4846 | 417 | +#include <2geom/matrix.h> | ||
4847 | 418 | +#include <2geom/rect.h> | ||
4848 | 419 | + | ||
4849 | 420 | +#include "ui/view/view.h" | ||
4850 | 421 | +#include "ui/view/edit-widget-interface.h" | ||
4851 | 422 | + | ||
4852 | 423 | +#include "display/rendermode.h" | ||
4853 | 424 | +#include "display/snap-indicator.h" | ||
4854 | 425 | + | ||
4855 | 426 | +class SPCSSAttr; | ||
4856 | 427 | +struct SPCanvas; | ||
4857 | 428 | +struct SPCanvasItem; | ||
4858 | 429 | +struct SPCanvasGroup; | ||
4859 | 430 | +struct SPEventContext; | ||
4860 | 431 | +struct SPItem; | ||
4861 | 432 | +struct SPNamedView; | ||
4862 | 433 | +struct SPObject; | ||
4863 | 434 | +struct SPStyle; | ||
4864 | 435 | + | ||
4865 | 436 | +namespace Gtk | ||
4866 | 437 | +{ | ||
4867 | 438 | + class Window; | ||
4868 | 439 | +} | ||
4869 | 440 | + | ||
4870 | 441 | +typedef int sp_verb_t; | ||
4871 | 442 | + | ||
4872 | 443 | + | ||
4873 | 444 | + | ||
4874 | 445 | +namespace Inkscape { | ||
4875 | 446 | + class Application; | ||
4876 | 447 | + class MessageContext; | ||
4877 | 448 | + class Selection; | ||
4878 | 449 | + class ObjectHierarchy; | ||
4879 | 450 | + class LayerManager; | ||
4880 | 451 | + class EventLog; | ||
4881 | 452 | + namespace UI { | ||
4882 | 453 | + namespace Dialog { | ||
4883 | 454 | + class DialogManager; | ||
4884 | 455 | + } | ||
4885 | 456 | + } | ||
4886 | 457 | + namespace Whiteboard { | ||
4887 | 458 | + class SessionManager; | ||
4888 | 459 | + } | ||
4889 | 460 | + namespace Display { | ||
4890 | 461 | + class TemporaryItemList; | ||
4891 | 462 | + class TemporaryItem; | ||
4892 | 463 | + //class SnapIndicator; | ||
4893 | 464 | + } | ||
4894 | 465 | +} | ||
4895 | 466 | + | ||
4896 | 467 | +/** | ||
4897 | 468 | + * Editable view. | ||
4898 | 469 | + * | ||
4899 | 470 | + * @see \ref desktop-handles.h for desktop macros. | ||
4900 | 471 | + */ | ||
4901 | 472 | +struct SPDesktop : public Inkscape::UI::View::View | ||
4902 | 473 | +{ | ||
4903 | 474 | + Inkscape::UI::Dialog::DialogManager *_dlg_mgr; | ||
4904 | 475 | + SPNamedView *namedview; | ||
4905 | 476 | + SPCanvas *canvas; | ||
4906 | 477 | + /// current selection; will never generally be NULL | ||
4907 | 478 | + Inkscape::Selection *selection; | ||
4908 | 479 | + SPEventContext *event_context; | ||
4909 | 480 | + Inkscape::LayerManager *layer_manager; | ||
4910 | 481 | + Inkscape::EventLog *event_log; | ||
4911 | 482 | + | ||
4912 | 483 | + Inkscape::Display::TemporaryItemList *temporary_item_list; | ||
4913 | 484 | + Inkscape::Display::SnapIndicator *snapindicator; | ||
4914 | 485 | + | ||
4915 | 486 | + SPCanvasItem *acetate; | ||
4916 | 487 | + SPCanvasGroup *main; | ||
4917 | 488 | + SPCanvasGroup *gridgroup; | ||
4918 | 489 | + SPCanvasGroup *guides; | ||
4919 | 490 | + SPCanvasItem *drawing; | ||
4920 | 491 | + SPCanvasGroup *sketch; | ||
4921 | 492 | + SPCanvasGroup *controls; | ||
4922 | 493 | + SPCanvasGroup *tempgroup; ///< contains temporary canvas items | ||
4923 | 494 | + SPCanvasItem *table; ///< outside-of-page background | ||
4924 | 495 | + SPCanvasItem *page; ///< page background | ||
4925 | 496 | + SPCanvasItem *page_border; ///< page border | ||
4926 | 497 | + SPCSSAttr *current; ///< current style | ||
4927 | 498 | + bool _focusMode; ///< Whether we're focused working or general working | ||
4928 | 499 | + | ||
4929 | 500 | + GList *zooms_past; | ||
4930 | 501 | + GList *zooms_future; | ||
4931 | 502 | + bool _quick_zoom_enabled; ///< Signifies that currently we're in quick zoom mode | ||
4932 | 503 | + Geom::Rect _quick_zoom_stored_area; ///< The area of the screen before quick zoom | ||
4933 | 504 | + unsigned int dkey; | ||
4934 | 505 | + unsigned int number; | ||
4935 | 506 | + guint window_state; | ||
4936 | 507 | + unsigned int interaction_disabled_counter; | ||
4937 | 508 | + bool waiting_cursor; | ||
4938 | 509 | + | ||
4939 | 510 | + /// \todo fixme: This has to be implemented in different way */ | ||
4940 | 511 | + guint guides_active : 1; | ||
4941 | 512 | + | ||
4942 | 513 | + // storage for selected dragger used by GrDrag as it's | ||
4943 | 514 | + // created and deleted by tools | ||
4944 | 515 | + SPItem *gr_item; | ||
4945 | 516 | + guint gr_point_type; | ||
4946 | 517 | + guint gr_point_i; | ||
4947 | 518 | + bool gr_fill_or_stroke; | ||
4948 | 519 | + | ||
4949 | 520 | + | ||
4950 | 521 | + Inkscape::ObjectHierarchy *_layer_hierarchy; | ||
4951 | 522 | + gchar * _reconstruction_old_layer_id; | ||
4952 | 523 | + | ||
4953 | 524 | + sigc::signal<void, sp_verb_t> _tool_changed; | ||
4954 | 525 | + sigc::signal<void, SPObject *> _layer_changed_signal; | ||
4955 | 526 | + sigc::signal<bool, const SPCSSAttr *>::accumulated<StopOnTrue> _set_style_signal; | ||
4956 | 527 | + sigc::signal<int, SPStyle *, int>::accumulated<StopOnNonZero> _query_style_signal; | ||
4957 | 528 | + | ||
4958 | 529 | + /// Emitted when the zoom factor changes (not emitted when scrolling). | ||
4959 | 530 | + /// The parameter is the new zoom factor | ||
4960 | 531 | + sigc::signal<void, double> signal_zoom_changed; | ||
4961 | 532 | + | ||
4962 | 533 | + sigc::connection connectDocumentReplaced (const sigc::slot<void,SPDesktop*,SPDocument*> & slot) | ||
4963 | 534 | + { | ||
4964 | 535 | + return _document_replaced_signal.connect (slot); | ||
4965 | 536 | + } | ||
4966 | 537 | + | ||
4967 | 538 | + sigc::connection connectEventContextChanged (const sigc::slot<void,SPDesktop*,SPEventContext*> & slot) | ||
4968 | 539 | + { | ||
4969 | 540 | + return _event_context_changed_signal.connect (slot); | ||
4970 | 541 | + } | ||
4971 | 542 | + sigc::connection connectSetStyle (const sigc::slot<bool, const SPCSSAttr *> & slot) | ||
4972 | 543 | + { | ||
4973 | 544 | + return _set_style_signal.connect (slot); | ||
4974 | 545 | + } | ||
4975 | 546 | + sigc::connection connectQueryStyle (const sigc::slot<int, SPStyle *, int> & slot) | ||
4976 | 547 | + { | ||
4977 | 548 | + return _query_style_signal.connect (slot); | ||
4978 | 549 | + } | ||
4979 | 550 | + // subselection is some sort of selection which is specific to the tool, such as a handle in gradient tool, or a text selection | ||
4980 | 551 | + sigc::connection connectToolSubselectionChanged(const sigc::slot<void, gpointer> & slot) { | ||
4981 | 552 | + return _tool_subselection_changed.connect(slot); | ||
4982 | 553 | + } | ||
4983 | 554 | + void emitToolSubselectionChanged(gpointer data); | ||
4984 | 555 | + sigc::connection connectCurrentLayerChanged(const sigc::slot<void, SPObject *> & slot) { | ||
4985 | 556 | + return _layer_changed_signal.connect(slot); | ||
4986 | 557 | + } | ||
4987 | 558 | + | ||
4988 | 559 | + // Whiteboard changes | ||
4989 | 560 | + | ||
4990 | 561 | +#ifdef WITH_INKBOARD | ||
4991 | 562 | + Inkscape::Whiteboard::SessionManager* whiteboard_session_manager() { | ||
4992 | 563 | + return _whiteboard_session_manager; | ||
4993 | 564 | + } | ||
4994 | 565 | + | ||
4995 | 566 | + Inkscape::Whiteboard::SessionManager* _whiteboard_session_manager; | ||
4996 | 567 | +#endif | ||
4997 | 568 | + | ||
4998 | 569 | + SPDesktop(); | ||
4999 | 570 | + void init (SPNamedView* nv, SPCanvas* canvas, Inkscape::UI::View::EditWidgetInterface *widget); | ||
5000 | 571 | + virtual ~SPDesktop(); |
Note that you should use "bzr mv" for renamings, otherwise you lose the bzr history of the patches, and changes are very hard to read. Also, 03-fix- gcc4.6- ftbfs.dpatch is not Ubuntu specific, that really ought to be fixed upstream as well.
So I'll merge this with using bzr mv instead, and hand-craft the changed headers back in. I won't rename the gcc patch.