summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.bzrignore64
-rw-r--r--.snapcraft.yaml103
-rw-r--r--AUTHORS3
-rw-r--r--CMakeLists.txt15
-rw-r--r--CMakeScripts/ConfigCompileFlags.cmake15
-rw-r--r--CMakeScripts/DefineDependsandFlags.cmake37
-rw-r--r--Makefile.am650
-rw-r--r--README8
-rw-r--r--acinclude.m43
-rwxr-xr-xautogen.sh51
-rw-r--r--build-lx.xml590
-rw-r--r--build-x64-gtk3.xml952
-rw-r--r--build-x64.xml929
-rw-r--r--build.xml922
-rw-r--r--buildtool.cpp10333
-rw-r--r--configure.ac1202
-rwxr-xr-xdelautogen.sh14
-rw-r--r--doc/Makefile.am20
-rw-r--r--inkscape.fr.pod637
-rw-r--r--m4/Makefile.am11
-rw-r--r--m4/ac_define_dir.m449
-rw-r--r--m4/ink_bzr_snapshot_build.m414
-rw-r--r--m4/relaytool.m430
-rwxr-xr-xpackaging/snappy/snapcraft.sh6
-rw-r--r--setup/gui/inkscape.desktop302
l---------setup/gui/inkscape.svg1
-rw-r--r--share/Makefile.am25
-rw-r--r--share/attributes/Makefile.am10
-rw-r--r--share/branding/Makefile.am18
-rw-r--r--share/examples/Makefile.am37
-rw-r--r--share/extensions/Barcode/Makefile.am23
-rw-r--r--share/extensions/Makefile.am42
-rw-r--r--share/extensions/Poly3DObjects/Makefile.am33
-rw-r--r--share/extensions/alphabet_soup/Makefile.am78
-rw-r--r--share/extensions/ink2canvas/Makefile.am9
-rw-r--r--share/extensions/restack.inx4
-rw-r--r--share/extensions/test/Makefile.am60
-rw-r--r--share/extensions/xaml2svg/Makefile.am19
-rw-r--r--share/filters/Makefile.am13
-rw-r--r--share/fonts/Makefile.am7
-rw-r--r--share/gradients/Makefile.am7
-rw-r--r--share/icons/Makefile.am58
-rw-r--r--share/icons/application/16x16/Makefile.am5
-rw-r--r--share/icons/application/22x22/Makefile.am5
-rw-r--r--share/icons/application/24x24/Makefile.am5
-rw-r--r--share/icons/application/256x256/Makefile.am5
-rw-r--r--share/icons/application/32x32/Makefile.am5
-rw-r--r--share/icons/application/48x48/Makefile.am5
-rw-r--r--share/icons/application/Makefile.am15
-rw-r--r--share/keys/Makefile.am17
-rw-r--r--share/markers/Makefile.am9
-rw-r--r--share/palettes/Makefile.am38
-rw-r--r--share/patterns/Makefile.am12
-rw-r--r--share/screens/Makefile.am8
-rw-r--r--share/symbols/Makefile.am17
-rw-r--r--share/templates/Makefile.am67
-rw-r--r--share/tutorials/Makefile.am214
-rw-r--r--share/tutorials/tutorial-advanced.de.svg2
-rw-r--r--share/tutorials/tutorial-basic.de.svg480
-rw-r--r--share/tutorials/tutorial-shapes.de.svg16
-rw-r--r--share/tutorials/tutorial-tracing-pixelart.fr.svg74
-rw-r--r--share/tutorials/tutorial-tracing.fr.svg102
-rw-r--r--share/ui/Makefile.am11
-rw-r--r--src/2geom/Makefile_insert131
-rw-r--r--src/2geom/sbasis-geometric.cpp2
-rw-r--r--src/CMakeLists.txt8
-rw-r--r--src/Makefile.am289
-rw-r--r--src/Makefile_insert251
-rw-r--r--src/box3d.cpp20
-rw-r--r--src/color-profile.cpp45
-rw-r--r--src/conn-avoid-ref.cpp18
-rw-r--r--src/debug/Makefile_insert15
-rw-r--r--src/desktop-events.cpp52
-rw-r--r--src/desktop-style.cpp42
-rw-r--r--src/desktop.cpp4
-rw-r--r--src/device-manager.cpp56
-rw-r--r--src/display/Makefile_insert125
-rw-r--r--src/display/canvas-axonomgrid.cpp40
-rw-r--r--src/display/canvas-grid.cpp40
-rw-r--r--src/display/nr-svgfonts.cpp35
-rw-r--r--src/display/sp-canvas.cpp100
-rw-r--r--src/display/sp-canvas.h7
-rw-r--r--src/document.cpp96
-rw-r--r--src/extension/Makefile_insert54
-rw-r--r--src/extension/dbus/Makefile_insert111
-rw-r--r--src/extension/dbus/document-interface.cpp8
-rw-r--r--src/extension/error-file.cpp6
-rw-r--r--src/extension/execution-env.cpp4
-rw-r--r--src/extension/extension.cpp22
-rw-r--r--src/extension/extension.h9
-rw-r--r--src/extension/implementation/Makefile_insert9
-rw-r--r--src/extension/implementation/implementation.cpp4
-rw-r--r--src/extension/implementation/script.cpp12
-rw-r--r--src/extension/internal/Makefile_insert173
-rw-r--r--src/extension/internal/bitmap/imagemagick.cpp8
-rw-r--r--src/extension/internal/bluredge.cpp2
-rw-r--r--src/extension/internal/cairo-render-context.cpp23
-rw-r--r--src/extension/internal/cairo-renderer.cpp8
-rw-r--r--src/extension/internal/cdr-input.cpp11
-rw-r--r--src/extension/internal/emf-print.cpp14
-rw-r--r--src/extension/internal/filter/filter.cpp2
-rw-r--r--src/extension/internal/grid.cpp4
-rw-r--r--src/extension/internal/javafx-out.cpp8
-rw-r--r--src/extension/internal/metafile-print.cpp18
-rw-r--r--src/extension/internal/pdfinput/pdf-input.cpp36
-rw-r--r--src/extension/internal/pdfinput/pdf-input.h15
-rw-r--r--src/extension/internal/pov-out.cpp4
-rw-r--r--src/extension/internal/vsd-input.cpp12
-rw-r--r--src/extension/param/bool.cpp9
-rw-r--r--src/extension/param/enum.cpp2
-rw-r--r--src/extension/param/float.cpp17
-rw-r--r--src/extension/param/int.cpp18
-rw-r--r--src/extension/param/notebook.cpp8
-rw-r--r--src/extension/param/parameter.cpp10
-rw-r--r--src/extension/param/radiobutton.cpp11
-rw-r--r--src/extension/param/string.cpp2
-rw-r--r--src/extension/plugins/grid2/grid.cpp4
-rw-r--r--src/extension/prefdialog.cpp27
-rw-r--r--src/file.cpp26
-rw-r--r--src/filter-chemistry.cpp14
-rw-r--r--src/filters/Makefile_insert46
-rw-r--r--src/filters/blend.cpp6
-rw-r--r--src/filters/componenttransfer.cpp19
-rw-r--r--src/filters/composite.cpp6
-rw-r--r--src/filters/diffuselighting.cpp24
-rw-r--r--src/filters/displacementmap.cpp6
-rw-r--r--src/filters/merge.cpp9
-rw-r--r--src/filters/specularlighting.cpp24
-rw-r--r--src/gradient-chemistry.cpp28
-rw-r--r--src/gradient-drag.cpp16
-rw-r--r--src/helper/Makefile_insert45
-rw-r--r--src/helper/pixbuf-ops.cpp4
-rw-r--r--src/helper/png-write.cpp4
-rw-r--r--src/helper/stock-items.cpp30
-rw-r--r--src/id-clash.cpp8
-rw-r--r--src/inkgc/Makefile_insert13
-rw-r--r--src/inkscape.cpp105
-rw-r--r--src/inkscape.h3
-rw-r--r--src/inkview.cpp351
-rw-r--r--src/io/Makefile_insert26
-rw-r--r--src/knot.cpp41
-rw-r--r--src/layer-fns.cpp36
-rw-r--r--src/libavoid/Makefile_insert37
-rw-r--r--src/libcola/Makefile_insert18
-rw-r--r--src/libcroco/Makefile_insert64
-rw-r--r--src/libdepixelize/Makefile_insert22
-rw-r--r--src/libgdl/CMakeLists.txt50
-rw-r--r--src/libgdl/Makefile_insert92
-rw-r--r--src/libgdl/README.gdl-dock184
-rw-r--r--src/libgdl/gdl-dock-bar.c1049
-rw-r--r--src/libgdl/gdl-dock-bar.h74
-rw-r--r--src/libgdl/gdl-dock-item-button-image.c166
-rw-r--r--src/libgdl/gdl-dock-item-button-image.h70
-rw-r--r--src/libgdl/gdl-dock-item-grip.c809
-rw-r--r--src/libgdl/gdl-dock-item-grip.h77
-rw-r--r--src/libgdl/gdl-dock-item.c2401
-rw-r--r--src/libgdl/gdl-dock-item.h223
-rw-r--r--src/libgdl/gdl-dock-master.c1011
-rw-r--r--src/libgdl/gdl-dock-master.h106
-rw-r--r--src/libgdl/gdl-dock-notebook.c530
-rw-r--r--src/libgdl/gdl-dock-notebook.h59
-rw-r--r--src/libgdl/gdl-dock-object.c1027
-rw-r--r--src/libgdl/gdl-dock-object.h225
-rw-r--r--src/libgdl/gdl-dock-paned.c678
-rw-r--r--src/libgdl/gdl-dock-paned.h64
-rw-r--r--src/libgdl/gdl-dock-placeholder.c827
-rw-r--r--src/libgdl/gdl-dock-placeholder.h69
-rw-r--r--src/libgdl/gdl-dock-tablabel.c632
-rw-r--r--src/libgdl/gdl-dock-tablabel.h74
-rw-r--r--src/libgdl/gdl-dock.c1365
-rw-r--r--src/libgdl/gdl-dock.h99
-rw-r--r--src/libgdl/gdl-i18n.c43
-rw-r--r--src/libgdl/gdl-i18n.h72
-rw-r--r--src/libgdl/gdl-switcher.c1031
-rw-r--r--src/libgdl/gdl-switcher.h67
-rw-r--r--src/libgdl/gdl-win32.c42
-rw-r--r--src/libgdl/gdl-win32.h21
-rw-r--r--src/libgdl/gdl.h32
-rw-r--r--src/libgdl/libgdlmarshal.c173
-rw-r--r--src/libgdl/libgdlmarshal.h48
-rw-r--r--src/libgdl/libgdlmarshal.list7
-rw-r--r--src/libgdl/libgdltypebuiltins.c162
-rw-r--r--src/libgdl/libgdltypebuiltins.h38
-rw-r--r--src/libgdl/makefile.in17
-rw-r--r--src/libnrtype/Makefile_insert28
-rw-r--r--src/libnrtype/font-lister.cpp4
-rw-r--r--src/libuemf/Makefile_insert30
-rw-r--r--src/libvpsc/Makefile_insert23
-rw-r--r--src/livarot/Makefile_insert41
-rw-r--r--src/live_effects/Makefile_insert115
-rw-r--r--src/live_effects/lpe-perspective_path.cpp10
-rw-r--r--src/live_effects/parameter/Makefile_insert36
-rw-r--r--src/live_effects/parameter/togglebutton.cpp6
-rw-r--r--src/main-cmdlineact.cpp2
-rw-r--r--src/main.cpp119
-rw-r--r--src/object-set.cpp370
-rw-r--r--src/object-set.h329
-rw-r--r--src/object-snapper.cpp8
-rw-r--r--src/object-test.h1
-rw-r--r--src/path-chemistry.cpp12
-rw-r--r--src/path-prefix.h47
-rw-r--r--src/persp3d.cpp17
-rw-r--r--src/persp3d.h2
-rw-r--r--src/selcue.cpp16
-rw-r--r--src/selection-chemistry.cpp479
-rw-r--r--src/selection-chemistry.h25
-rw-r--r--src/selection-describer.cpp2
-rw-r--r--src/selection.cpp409
-rw-r--r--src/selection.h204
-rw-r--r--src/seltrans.cpp27
-rw-r--r--src/snap.cpp4
-rw-r--r--src/sp-clippath.cpp30
-rw-r--r--src/sp-defs.cpp14
-rw-r--r--src/sp-filter-primitive.cpp6
-rw-r--r--src/sp-filter.cpp33
-rw-r--r--src/sp-flowdiv.cpp120
-rw-r--r--src/sp-flowregion.cpp53
-rw-r--r--src/sp-flowtext.cpp58
-rw-r--r--src/sp-flowtext.h1
-rw-r--r--src/sp-gradient.cpp41
-rw-r--r--src/sp-hatch.cpp17
-rw-r--r--src/sp-item-group.cpp68
-rw-r--r--src/sp-item.cpp91
-rw-r--r--src/sp-mask.cpp27
-rw-r--r--src/sp-mesh-array.cpp34
-rw-r--r--src/sp-namedview.cpp12
-rw-r--r--src/sp-object-group.cpp8
-rw-r--r--src/sp-object.cpp187
-rw-r--r--src/sp-object.h47
-rw-r--r--src/sp-pattern.cpp30
-rw-r--r--src/sp-root.cpp15
-rw-r--r--src/sp-switch.cpp7
-rw-r--r--src/sp-text.cpp66
-rw-r--r--src/sp-tref.cpp6
-rw-r--r--src/sp-tspan.cpp80
-rw-r--r--src/sp-use.cpp32
-rw-r--r--src/splivarot.cpp174
-rw-r--r--src/splivarot.h10
-rw-r--r--src/svg-view-widget.cpp37
-rw-r--r--src/svg-view.cpp4
-rw-r--r--src/svg/Makefile_insert32
-rw-r--r--src/text-chemistry.cpp55
-rw-r--r--src/text-editing.cpp62
-rw-r--r--src/trace/Makefile_insert23
-rw-r--r--src/trace/trace.cpp4
-rw-r--r--src/ui/CMakeLists.txt4
-rw-r--r--src/ui/Makefile_insert31
-rw-r--r--src/ui/cache/Makefile_insert6
-rw-r--r--src/ui/clipboard.cpp41
-rw-r--r--src/ui/dialog-events.h1
-rw-r--r--src/ui/dialog/Makefile_insert.THIS (renamed from src/ui/dialog/Makefile_insert)0
-rw-r--r--src/ui/dialog/aboutbox.cpp21
-rw-r--r--src/ui/dialog/align-and-distribute.cpp60
-rw-r--r--src/ui/dialog/align-and-distribute.h38
-rw-r--r--src/ui/dialog/calligraphic-profile-rename.cpp25
-rw-r--r--src/ui/dialog/calligraphic-profile-rename.h9
-rw-r--r--src/ui/dialog/clonetiler.cpp1240
-rw-r--r--src/ui/dialog/clonetiler.h132
-rw-r--r--src/ui/dialog/debug.cpp7
-rw-r--r--src/ui/dialog/document-metadata.cpp31
-rw-r--r--src/ui/dialog/document-metadata.h12
-rw-r--r--src/ui/dialog/document-properties.cpp143
-rw-r--r--src/ui/dialog/document-properties.h6
-rw-r--r--src/ui/dialog/export.cpp121
-rw-r--r--src/ui/dialog/export.h40
-rw-r--r--src/ui/dialog/filedialog.cpp8
-rw-r--r--src/ui/dialog/filedialogimpl-gtkmm.cpp86
-rw-r--r--src/ui/dialog/filedialogimpl-win32.cpp4
-rw-r--r--src/ui/dialog/fill-and-stroke.cpp19
-rw-r--r--src/ui/dialog/fill-and-stroke.h4
-rw-r--r--src/ui/dialog/filter-effects-dialog.cpp255
-rw-r--r--src/ui/dialog/filter-effects-dialog.h12
-rw-r--r--src/ui/dialog/find.cpp14
-rw-r--r--src/ui/dialog/find.h6
-rw-r--r--src/ui/dialog/floating-behavior.cpp8
-rw-r--r--src/ui/dialog/font-substitution.cpp8
-rw-r--r--src/ui/dialog/glyphs.cpp86
-rw-r--r--src/ui/dialog/grid-arrange-tab.cpp40
-rw-r--r--src/ui/dialog/grid-arrange-tab.h5
-rw-r--r--src/ui/dialog/guides.cpp58
-rw-r--r--src/ui/dialog/guides.h12
-rw-r--r--src/ui/dialog/icon-preview.cpp4
-rw-r--r--src/ui/dialog/icon-preview.h6
-rw-r--r--src/ui/dialog/inkscape-preferences.cpp42
-rw-r--r--src/ui/dialog/inkscape-preferences.h8
-rw-r--r--src/ui/dialog/input.cpp131
-rw-r--r--src/ui/dialog/layer-properties.cpp31
-rw-r--r--src/ui/dialog/layer-properties.h10
-rw-r--r--src/ui/dialog/layers.cpp4
-rw-r--r--src/ui/dialog/layers.h6
-rw-r--r--src/ui/dialog/livepatheffect-add.cpp6
-rw-r--r--src/ui/dialog/livepatheffect-editor.cpp7
-rw-r--r--src/ui/dialog/livepatheffect-editor.h4
-rw-r--r--src/ui/dialog/new-from-template.cpp8
-rw-r--r--src/ui/dialog/object-properties.cpp94
-rw-r--r--src/ui/dialog/object-properties.h4
-rw-r--r--src/ui/dialog/objects.cpp114
-rw-r--r--src/ui/dialog/objects.h10
-rw-r--r--src/ui/dialog/ocaldialogs.cpp162
-rw-r--r--src/ui/dialog/ocaldialogs.h41
-rw-r--r--src/ui/dialog/pixelartdialog.cpp4
-rw-r--r--src/ui/dialog/polar-arrange-tab.cpp33
-rw-r--r--src/ui/dialog/polar-arrange-tab.h11
-rw-r--r--src/ui/dialog/spellcheck.cpp12
-rw-r--r--src/ui/dialog/spellcheck.h15
-rw-r--r--src/ui/dialog/svg-fonts-dialog.cpp93
-rw-r--r--src/ui/dialog/svg-fonts-dialog.h9
-rw-r--r--src/ui/dialog/swatches.cpp6
-rw-r--r--src/ui/dialog/symbols.cpp62
-rw-r--r--src/ui/dialog/tags.cpp57
-rw-r--r--src/ui/dialog/tags.h6
-rw-r--r--src/ui/dialog/text-edit.cpp37
-rw-r--r--src/ui/dialog/text-edit.h11
-rw-r--r--src/ui/dialog/tile.h5
-rw-r--r--src/ui/dialog/transformation.cpp146
-rw-r--r--src/ui/dialog/transformation.h4
-rw-r--r--src/ui/dialog/undo-history.cpp33
-rw-r--r--src/ui/dialog/undo-history.h18
-rw-r--r--src/ui/dialog/xml-tree.cpp18
-rw-r--r--src/ui/dialog/xml-tree.h11
-rw-r--r--src/ui/interface.cpp38
-rw-r--r--src/ui/previewholder.cpp141
-rw-r--r--src/ui/previewholder.h9
-rw-r--r--src/ui/tool/Makefile_insert30
-rw-r--r--src/ui/tools/Makefile_insert34
-rw-r--r--src/ui/tools/box3d-tool.cpp4
-rw-r--r--src/ui/tools/calligraphic-tool.cpp4
-rw-r--r--src/ui/tools/connector-tool.cpp10
-rw-r--r--src/ui/tools/dropper-tool.cpp8
-rw-r--r--src/ui/tools/eraser-tool.cpp11
-rw-r--r--src/ui/tools/flood-tool.cpp2
-rw-r--r--src/ui/tools/gradient-tool.cpp18
-rw-r--r--src/ui/tools/lpe-tool.cpp4
-rw-r--r--src/ui/tools/mesh-tool.cpp16
-rw-r--r--src/ui/tools/node-tool.cpp11
-rw-r--r--src/ui/tools/select-tool.cpp10
-rw-r--r--src/ui/tools/spray-tool.cpp58
-rw-r--r--src/ui/tools/spray-tool.h9
-rw-r--r--src/ui/tools/tool-base.cpp32
-rw-r--r--src/ui/tools/tweak-tool.cpp30
-rw-r--r--src/ui/view/Makefile_insert9
-rw-r--r--src/ui/widget/Makefile_insert110
-rw-r--r--src/ui/widget/addtoicon.cpp33
-rw-r--r--src/ui/widget/addtoicon.h14
-rw-r--r--src/ui/widget/anchor-selector.cpp10
-rw-r--r--src/ui/widget/anchor-selector.h12
-rw-r--r--src/ui/widget/clipmaskicon.cpp33
-rw-r--r--src/ui/widget/clipmaskicon.h13
-rw-r--r--src/ui/widget/color-icc-selector.cpp24
-rw-r--r--src/ui/widget/color-icc-selector.h8
-rw-r--r--src/ui/widget/color-notebook.cpp30
-rw-r--r--src/ui/widget/color-notebook.h9
-rw-r--r--src/ui/widget/color-picker.cpp5
-rw-r--r--src/ui/widget/color-preview.cpp26
-rw-r--r--src/ui/widget/color-preview.h6
-rw-r--r--src/ui/widget/color-scales.cpp28
-rw-r--r--src/ui/widget/color-scales.h8
-rw-r--r--src/ui/widget/color-slider.cpp122
-rw-r--r--src/ui/widget/color-slider.h18
-rw-r--r--src/ui/widget/color-wheel-selector.cpp48
-rw-r--r--src/ui/widget/color-wheel-selector.h12
-rw-r--r--src/ui/widget/dock-item.cpp8
-rw-r--r--src/ui/widget/dock-item.h4
-rw-r--r--src/ui/widget/dock.cpp12
-rw-r--r--src/ui/widget/highlight-picker.cpp33
-rw-r--r--src/ui/widget/highlight-picker.h14
-rw-r--r--src/ui/widget/imagetoggler.cpp33
-rw-r--r--src/ui/widget/imagetoggler.h14
-rw-r--r--src/ui/widget/insertordericon.cpp32
-rw-r--r--src/ui/widget/insertordericon.h13
-rw-r--r--src/ui/widget/layer-selector.cpp20
-rw-r--r--src/ui/widget/layertypeicon.cpp33
-rw-r--r--src/ui/widget/layertypeicon.h14
-rw-r--r--src/ui/widget/licensor.cpp8
-rw-r--r--src/ui/widget/notebook-page.cpp12
-rw-r--r--src/ui/widget/notebook-page.h13
-rw-r--r--src/ui/widget/object-composite-settings.cpp2
-rw-r--r--src/ui/widget/page-sizer.cpp43
-rw-r--r--src/ui/widget/page-sizer.h26
-rw-r--r--src/ui/widget/panel.cpp6
-rw-r--r--src/ui/widget/panel.h18
-rw-r--r--src/ui/widget/point.cpp4
-rw-r--r--src/ui/widget/point.h4
-rw-r--r--src/ui/widget/preferences-widget.cpp80
-rw-r--r--src/ui/widget/preferences-widget.h25
-rw-r--r--src/ui/widget/random.cpp4
-rw-r--r--src/ui/widget/random.h4
-rw-r--r--src/ui/widget/scalar.cpp10
-rw-r--r--src/ui/widget/scalar.h4
-rw-r--r--src/ui/widget/selected-style.cpp45
-rw-r--r--src/ui/widget/selected-style.h15
-rw-r--r--src/ui/widget/spin-scale.cpp30
-rw-r--r--src/ui/widget/spin-scale.h25
-rw-r--r--src/ui/widget/spin-slider.cpp61
-rw-r--r--src/ui/widget/spin-slider.h18
-rw-r--r--src/ui/widget/spinbutton.h4
-rw-r--r--src/ui/widget/style-subject.cpp10
-rw-r--r--src/ui/widget/style-swatch.cpp23
-rw-r--r--src/ui/widget/style-swatch.h8
-rw-r--r--src/ui/widget/tolerance-slider.cpp10
-rw-r--r--src/ui/widget/tolerance-slider.h10
-rw-r--r--src/uri-references.cpp9
-rw-r--r--src/util/Makefile_insert49
-rw-r--r--src/util/unordered-containers.h46
-rw-r--r--src/vanishing-point.cpp20
-rw-r--r--src/verbs.cpp6
-rw-r--r--src/widgets/CMakeLists.txt88
-rw-r--r--src/widgets/Makefile_insert123
-rw-r--r--src/widgets/arc-toolbar.cpp19
-rw-r--r--src/widgets/box3d-toolbar.cpp2
-rw-r--r--src/widgets/button.cpp29
-rw-r--r--src/widgets/calligraphy-toolbar.cpp1
-rw-r--r--src/widgets/connector-toolbar.cpp15
-rw-r--r--src/widgets/dash-selector.cpp14
-rw-r--r--src/widgets/dash-selector.h5
-rw-r--r--src/widgets/desktop-widget.cpp181
-rw-r--r--src/widgets/dropper-toolbar.cpp2
-rw-r--r--src/widgets/eek-preview.cpp148
-rw-r--r--src/widgets/ege-adjustment-action.cpp14
-rw-r--r--src/widgets/ege-output-action.cpp6
-rw-r--r--src/widgets/ege-select-one-action.cpp32
-rw-r--r--src/widgets/eraser-toolbar.cpp4
-rw-r--r--src/widgets/fill-style.cpp2
-rw-r--r--src/widgets/font-selector.cpp33
-rw-r--r--src/widgets/gimp/CMakeLists.txt13
-rw-r--r--src/widgets/gimp/gimpcolorwheel.c (renamed from src/ui/widget/gimpcolorwheel.c)137
-rw-r--r--src/widgets/gimp/gimpcolorwheel.h (renamed from src/ui/widget/gimpcolorwheel.h)0
-rw-r--r--src/widgets/gimp/gimpspinscale.c (renamed from src/ui/widget/gimpspinscale.c)260
-rw-r--r--src/widgets/gimp/gimpspinscale.h (renamed from src/ui/widget/gimpspinscale.h)0
-rw-r--r--src/widgets/gimp/ruler.cpp (renamed from src/widgets/ruler.cpp)187
-rw-r--r--src/widgets/gimp/ruler.h (renamed from src/widgets/ruler.h)0
-rw-r--r--src/widgets/gradient-image.cpp45
-rw-r--r--src/widgets/gradient-selector.cpp13
-rw-r--r--src/widgets/gradient-selector.h8
-rw-r--r--src/widgets/gradient-toolbar.cpp28
-rw-r--r--src/widgets/gradient-vector.cpp93
-rw-r--r--src/widgets/gradient-vector.h8
-rw-r--r--src/widgets/icon.cpp51
-rw-r--r--src/widgets/ink-action.cpp482
-rw-r--r--src/widgets/ink-action.h124
-rw-r--r--src/widgets/ink-comboboxentry-action.cpp14
-rw-r--r--src/widgets/ink-radio-action.cpp185
-rw-r--r--src/widgets/ink-radio-action.h52
-rw-r--r--src/widgets/ink-toggle-action.cpp221
-rw-r--r--src/widgets/ink-toggle-action.h53
-rw-r--r--src/widgets/ink-tool-menu-action.cpp49
-rw-r--r--src/widgets/ink-tool-menu-action.h52
-rw-r--r--src/widgets/lpe-toolbar.cpp3
-rw-r--r--src/widgets/measure-toolbar.cpp3
-rw-r--r--src/widgets/mesh-toolbar.cpp12
-rw-r--r--src/widgets/node-toolbar.cpp3
-rw-r--r--src/widgets/paint-selector.cpp54
-rw-r--r--src/widgets/paint-selector.h8
-rw-r--r--src/widgets/pencil-toolbar.cpp12
-rw-r--r--src/widgets/rect-toolbar.cpp8
-rw-r--r--src/widgets/select-toolbar.cpp11
-rw-r--r--src/widgets/sp-attribute-widget.cpp27
-rw-r--r--src/widgets/sp-attribute-widget.h9
-rw-r--r--src/widgets/sp-color-selector.cpp6
-rw-r--r--src/widgets/sp-color-selector.h9
-rw-r--r--src/widgets/sp-widget.cpp30
-rw-r--r--src/widgets/sp-xmlview-attr-list.cpp19
-rw-r--r--src/widgets/sp-xmlview-content.cpp19
-rw-r--r--src/widgets/sp-xmlview-tree.cpp20
-rw-r--r--src/widgets/spiral-toolbar.cpp8
-rw-r--r--src/widgets/spray-toolbar.cpp3
-rw-r--r--src/widgets/spw-utilities.cpp69
-rw-r--r--src/widgets/spw-utilities.h12
-rw-r--r--src/widgets/star-toolbar.cpp27
-rw-r--r--src/widgets/stroke-marker-selector.cpp6
-rw-r--r--src/widgets/stroke-style.cpp70
-rw-r--r--src/widgets/stroke-style.h11
-rw-r--r--src/widgets/text-toolbar.cpp42
-rw-r--r--src/widgets/toolbox.cpp56
-rw-r--r--src/widgets/tweak-toolbar.cpp3
-rw-r--r--src/xml/Makefile_insert51
-rw-r--r--testfiles/CMakeLists.txt50
-rw-r--r--testfiles/src/object-set-test.cpp321
-rw-r--r--testfiles/src/sp-object-test.cpp120
-rw-r--r--testfiles/unittest.cpp13
480 files changed, 6048 insertions, 42847 deletions
diff --git a/.bzrignore b/.bzrignore
index 114347d66..5bfe4946a 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -1,12 +1,8 @@
./Info.plist
./Makefile
./ABOUT-NLS
-./aclocal.m4
-./autom4te.cache
-./btool.exe
./build
./build.dep
-./build-aux
./compile
./compile.lst
./config.guess
@@ -63,44 +59,7 @@
./CMakeLists.txt.user
.deps
.dirstamp
-Makefile.in
doc/Makefile
-doc/Makefile.in
-m4/codeset.m4
-m4/gettext.m4
-m4/glibc2.m4
-m4/glibc21.m4
-m4/iconv.m4
-m4/intdiv0.m4
-m4/intl.m4
-m4/intldir.m4
-m4/intlmacosx.m4
-m4/intltool.m4
-m4/intmax.m4
-m4/inttypes-pri.m4
-m4/inttypes_h.m4
-m4/lcmessage.m4
-m4/lib-ld.m4
-m4/lib-link.m4
-m4/lib-prefix.m4
-m4/libtool.m4
-m4/lock.m4
-m4/longlong.m4
-m4/ltoptions.m4
-m4/ltsugar.m4
-m4/ltversion.m4
-m4/lt~obsolete.m4
-m4/nls.m4
-m4/po.m4
-m4/printf-posix.m4
-m4/progtest.m4
-m4/size_max.m4
-m4/stdint_h.m4
-m4/uintmax_t.m4
-m4/visibility.m4
-m4/wchar_t.m4
-m4/wint_t.m4
-m4/xsize.m4
packaging/autopackage/default.apspec
po/.intltool-merge-cache
po/*.gmo
@@ -118,35 +77,22 @@ po/remove-potcdate.sin
po/Rules-quot
po/stamp-it
share/Makefile
-share/Makefile.in
share/attributes/Makefile
-share/attributes/Makefile.in
share/branding/Makefile
share/clipart/Makefile
-share/clipart/Makefile.in
share/examples/Makefile
-share/examples/Makefile.in
share/extensions/Barcode/Makefile
-share/extensions/Barcode/Makefile.in
share/extensions/Makefile
-share/extensions/Makefile.in
share/extensions/Poly3DObjects/Makefile
-share/extensions/Poly3DObjects/Makefile.in
share/extensions/alphabet_soup/Makefile
-share/extensions/alphabet_soup/Makefile.in
share/extensions/ink2canvas/Makefile
-share/extensions/ink2canvas/Makefile.in
share/extensions/test/Makefile
share/extensions/xaml2svg/Makefile
-share/extensions/xaml2svg/Makefile.in
share/filters/Makefile
share/filters/filters.svg.h
share/fonts/Makefile
-share/fonts/Makefile.in
share/gradients/Makefile
-share/gradients/Makefile.in
share/icons/Makefile
-share/icons/Makefile.in
share/icons/application/16x16/Makefile
share/icons/application/22x22/Makefile
share/icons/application/24x24/Makefile
@@ -155,31 +101,21 @@ share/icons/application/32x32/Makefile
share/icons/application/48x48/Makefile
share/icons/application/Makefile
share/keys/Makefile
-share/keys/Makefile.in
share/markers/Makefile
-share/markers/Makefile.in
share/palettes/Makefile
-share/palettes/Makefile.in
share/palettes/palettes.h
share/patterns/Makefile
-share/patterns/Makefile.in
share/patterns/patterns.svg.h
share/screens/Makefile
-share/screens/Makefile.in
share/symbols/Makefile
-share/symbols/Makefile.in
share/symbols/symbols.h
share/templates/Makefile
-share/templates/Makefile.in
share/templates/templates.h
share/tutorials/Makefile
-share/tutorials/Makefile.in
share/ui/Makefile
-share/ui/Makefile.in
src/.libs/
src/2geom/makefile
src/Makefile
-src/Makefile.in
src/algorithms/makefile
src/application/makefile
src/bind/makefile
diff --git a/.snapcraft.yaml b/.snapcraft.yaml
new file mode 100644
index 000000000..16cac0c31
--- /dev/null
+++ b/.snapcraft.yaml
@@ -0,0 +1,103 @@
+name: inkscape
+version: 0.92+devel
+summary: Vector Graphics Editor
+description: |
+ An Open Source vector graphics editor, with capabilities similar to
+ Illustrator, CorelDraw, or Xara X, using the W3C standard Scalable Vector
+ Graphics (SVG) file format.
+
+ Inkscape supports many advanced SVG features (markers, clones, alpha blending,
+ etc.) and great care is taken in designing a streamlined interface.
+ It is very easy to edit nodes, perform complex path operations, trace
+ bitmaps and much more.
+
+ We also aim to maintain a thriving user and developer community by using
+ open, community-oriented development.
+confinement: strict
+
+parts:
+ inkscape:
+ plugin: cmake
+ source: .
+ configflags: ['-DENABLE_BINRELOC=ON']
+ build-packages:
+ - cmake
+ - intltool
+ - libart-2.0-dev
+ - libaspell-dev
+ - libboost-dev
+ - libcdr-dev
+ - libgc-dev
+ - libgdl-3-dev
+ - libglib2.0-dev
+ - libgnomevfs2-dev
+ - libgsl-dev
+ - libgtk-3-dev
+ - libgtkmm-3.0-dev
+ - libgtkspell-dev
+ - liblcms2-dev
+ - libmagick++-dev
+ - libpango1.0-dev
+ - libpng12-dev
+ - libpoppler-glib-dev
+ - libpoppler-private-dev
+ - libpopt-dev
+ - libpotrace-dev
+ - librevenge-dev
+ - libsigc++-2.0-dev
+ - libtool
+ - libvisio-dev
+ - libwpg-dev
+ - libxml-parser-perl
+ - libxml2-dev
+ - libxslt1-dev
+ - pkg-config
+ - python-dev
+ - python-lxml
+ - zlib1g-dev
+ stage-packages:
+ - libaspell15
+ - libatkmm-1.6-1v5
+ - libcairomm-1.0-1v5
+ - libcdr-0.1-1
+ - libgdk-pixbuf2.0-0
+ - libglibmm-2.4-1v5
+ - libgnomevfs2-0
+ - libgtkmm-2.4-1v5
+ - libgtkspell0
+ - liblcms2-2
+ - libmagick++-6.q16-5v5
+ - libpangomm-1.4-1v5
+ - libpoppler-glib8
+ - librevenge-0.0-0
+ - libvisio-0.1-1
+ - libwpg-0.3-3
+ - libglib2.0-bin
+ - aspell
+ - imagemagick
+ - libimage-magick-perl
+ - libwmf-bin
+ - python-lxml
+ - python-numpy
+ - transfig
+ - pstoedit
+ - libsvg-perl
+ - libxml-xql-perl
+ - python-uniconvertor
+ - ruby
+ snap:
+ - -lib/inkscape/*.a
+ after: [desktop/gtk3]
+ snapcraft-wrapper:
+ plugin: copy
+ files:
+ packaging/snappy/snapcraft.sh: snapcraft.sh
+ README: lib/share/README
+
+apps:
+ inkscape:
+ command: snapcraft.sh desktop-launch inkscape
+ plugs: [home, unity7, gsettings]
+ viewer:
+ command: snapcraft.sh desktop-launch inkview
+ plugs: [home, unity7, gsettings]
diff --git a/AUTHORS b/AUTHORS
index 7dafa6193..975705433 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -12,6 +12,7 @@ Nicholas Bishop
Joshua L. Blocher
Hanno Böck
Tomasz Boczkowski
+Adrian Boguszewski
Henrik Bohre
Boldewyn
Daniel Borgmann
@@ -173,4 +174,4 @@ Daniel Yacob
David Yip
Masatake Yamato
Moritz Eberl
-Sebastian Faubel \ No newline at end of file
+Sebastian Faubel
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b4ec5993e..ac7dc6fdd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -68,7 +68,10 @@ option(WITH_LIBCDR "Compile with support of libcdr for CorelDRAW Diagrams" ON)
option(WITH_LIBVISIO "Compile with support of libvisio for Microsoft Visio Diagrams" ON)
option(WITH_LIBWPG "Compile with support of libwpg for WordPerfect Graphics" ON)
option(WITH_NLS "Compile with Native Language Support (using gettext)" ON)
-option(WITH_GTK3_EXPERIMENTAL "Enable compilation with GTK+3 (EXPERIMENTAL!)" OFF)
+
+option(ENABLE_BINRELOC "Enable relocatable binaries" OFF)
+
+include(CMakeScripts/ConfigPaths.cmake) # Installation Paths
# -----------------------------------------------------------------------------
# Test Harness
@@ -86,7 +89,6 @@ endif()
include(CMakeScripts/DefineDependsandFlags.cmake) # Includes, Compiler Flags, and Link Libraries
include(CMakeScripts/HelperMacros.cmake) # Misc Utility Macros
-
# -----------------------------------------------------------------------------
# BAD HACKS, NEED TO INVESTIGATE MAKING THESE LESS BAD
add_definitions(-D_FORTIFY_SOURCE=2)
@@ -102,6 +104,14 @@ endif()
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
+# Relocatable Binary
+# -----------------------------------------------------------------------------
+
+if (ENABLE_BINRELOC)
+ add_definitions(-DENABLE_BINRELOC)
+endif()
+
+# -----------------------------------------------------------------------------
# Dist Target
# -----------------------------------------------------------------------------
set(INKSCAPE_DIST_PREFIX "${PROJECT_NAME}-${INKSCAPE_VERSION}")
@@ -238,7 +248,6 @@ message("ENABLE_POPPLER_CAIRO: ${ENABLE_POPPLER_CAIRO}")
message("GMOCK_PRESENT: ${GMOCK_PRESENT}")
message("WITH_DBUS: ${WITH_DBUS}")
message("WITH_GNOME_VFS: ${WITH_GNOME_VFS}")
-message("WITH_GTK3_EXPERIMENTAL: ${WITH_GTK3_EXPERIMENTAL}")
message("WITH_GTKSPELL: ${WITH_GTKSPELL}")
message("WITH_IMAGE_MAGICK: ${WITH_IMAGE_MAGICK}")
message("WITH_LIBCDR: ${WITH_LIBCDR}")
diff --git a/CMakeScripts/ConfigCompileFlags.cmake b/CMakeScripts/ConfigCompileFlags.cmake
index 453ceef21..fa2362cd2 100644
--- a/CMakeScripts/ConfigCompileFlags.cmake
+++ b/CMakeScripts/ConfigCompileFlags.cmake
@@ -1,26 +1,19 @@
-set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS}")
-add_definitions(-Wall -Wformat-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch)
-add_definitions(-O2)
-
# Define the flags for profiling if desired:
if(WITH_PROFILING)
set(COMPILE_PROFILING_FLAGS "-pg")
set(LINK_PROFILING_FLAGS "-pg")
endif()
-add_definitions(-DVERSION=\\\"${INKSCAPE_VERSION}\\\")
+# add_definitions(-DVERSION=\\\"${INKSCAPE_VERSION}\\\")
add_definitions(${DEFINE_FLAGS} -DHAVE_CONFIG_H -D_INTL_REDIRECT_INLINE)
if(WIN32)
add_definitions(-DXP_WIN)
endif(WIN32)
-# For Inkboard:
-add_definitions(-DHAVE_SSL "-DRELAYTOOL_SSL=\"static const int libssl_is_present=1; static int __attribute__((unused)) libssl_symbol_is_present(char *s){ return 1; }\"")
-
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_PROFILING_FLAGS} ")
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMPILE_PROFILING_FLAGS} ")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 ${COMPILE_PROFILING_FLAGS} ")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 ${COMPILE_PROFILING_FLAGS} ")
set(CMAKE_MAKE_PROGRAM "${CMAKE_MAKE_PROGRAM} ")
-# message(STATUS "${CMAKE_CXX_FLAGS}")
+message(STATUS "${CMAKE_CXX_FLAGS}")
diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake
index b708484af..186daf33f 100644
--- a/CMakeScripts/DefineDependsandFlags.cmake
+++ b/CMakeScripts/DefineDependsandFlags.cmake
@@ -12,6 +12,12 @@ list(APPEND INKSCAPE_INCS ${PROJECT_SOURCE_DIR}
)
# ----------------------------------------------------------------------------
+# Add C++11 standard compliance
+# TODO: Add a proper check for compiler compliance here
+# ----------------------------------------------------------------------------
+list(APPEND INKSCAPE_CXX_FLAGS "-std=c++11")
+
+# ----------------------------------------------------------------------------
# Files we include
# ----------------------------------------------------------------------------
if(WIN32)
@@ -237,7 +243,6 @@ endif()
set(TRY_GTKSPELL 1)
# Include dependencies:
# use patched version until GTK2_CAIROMMCONFIG_INCLUDE_DIR is added
-if("${WITH_GTK3_EXPERIMENTAL}")
pkg_check_modules(
GTK3
REQUIRED
@@ -247,11 +252,7 @@ if("${WITH_GTK3_EXPERIMENTAL}")
gdk-3.0>=3.8
gdl-3.0>=3.4
)
- message("Using EXPERIMENTAL Gtkmm 3 build")
list(APPEND INKSCAPE_CXX_FLAGS ${GTK3_CFLAGS_OTHER})
- set(WITH_GTKMM_3_0 1)
- message("Using external GDL")
- set(WITH_EXT_GDL 1)
# Check whether we can use new features in Gtkmm 3.10
# TODO: Drop this test and bump the version number in the GTK test above
@@ -291,32 +292,6 @@ if("${WITH_GTK3_EXPERIMENTAL}")
${GTK3_LIBRARIES}
${GTKSPELL3_LIBRARIES}
)
-else()
- pkg_check_modules(GTK REQUIRED
- gtkmm-2.4>=2.24
- gdkmm-2.4
- gtk+-2.0
- gdk-2.0
- )
- list(APPEND INKSCAPE_CXX_FLAGS ${GTK_CFLAGS_OTHER})
- pkg_check_modules(GTKSPELL2 gtkspell-2.0)
- if("${GTKSPELL2_FOUND}")
- message("Using GtkSpell 2")
- add_definitions(${GTKSPELL2_CFLAGS_OTHER})
- set (WITH_GTKSPELL 1)
- else()
- unset(WITH_GTKSPELL)
- endif()
- list(APPEND INKSCAPE_INCS_SYS
- ${GTK_INCLUDE_DIRS}
- ${GTKSPELL2_INCLUDE_DIRS}
- )
-
- list(APPEND INKSCAPE_LIBS
- ${GTK_LIBRARIES}
- ${GTKSPELL2_LIBRARIES}
- )
-endif()
find_package(Freetype REQUIRED)
list(APPEND INKSCAPE_INCS_SYS ${FREETYPE_INCLUDE_DIRS})
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index 8ab952a9a..000000000
--- a/Makefile.am
+++ /dev/null
@@ -1,650 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-AUTOMAKE_OPTIONS = foreign
-
-ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
-
-SUBDIRS = src doc share po
-
-Graphicsdir = $(datadir)/applications
-Graphics_in_files = inkscape.desktop.in
-Graphics_DATA = $(Graphics_in_files:.desktop.in=.desktop)
-@INTLTOOL_DESKTOP_RULE@
-
-appdatadir = $(datadir)/appdata
-appdata_in_files = inkscape.appdata.xml.in
-appdata_DATA = $(appdata_in_files:.xml.in=.xml)
-@INTLTOOL_XML_RULE@
-
-## dist-hook:
-## mkdir $(distdir)/samples
-## cp $(srcdir)/samples/*svg $(distdir)/samples
-## cp $(srcdir)/samples/*png $(distdir)/samples
-## cp $(srcdir)/AUTHORS $(distdir)
-## cp $(srcdir)/NEWS $(distdir)
-
-DISTCHECK_CONFIGURE_FLAGS = --enable-localinstall
-
-man_MANS = \
- inkscape.1 \
- inkscape.de.1 \
- inkscape.el.1 \
- inkscape.fr.1 \
- inkscape.ja.1 \
- inkscape.sk.1 \
- inkscape.zh_TW.1 \
- inkview.1
-
-EXTRA_DIST = \
- acinclude.m4 \
- autogen.sh \
- GPL2.txt \
- GPL3.txt \
- LGPL2.1.txt \
- fix-roff-punct \
- intltool-extract.in \
- intltool-merge.in \
- intltool-update.in \
- $(Graphics_in_files) \
- $(appdata_in_files) \
- po/check-markup \
- utf8-to-roff \
- inkscape.1 \
- inkscape.de.1 \
- inkscape.el.1 \
- inkscape.fr.1 \
- inkscape.ja.1 \
- inkscape.sk.1 \
- inkscape.zh_TW.1 \
- inkscape.pod \
- inkscape.de.pod \
- inkscape.el.pod \
- inkscape.fr.pod \
- inkscape.sk.pod \
- inkscape.zh_TW.pod \
- inkscape.spec.in \
- inkscape.spec \
- Info.plist.in \
- Info.plist \
- buildtool.cpp build.xml build-x64.xml \
- README README.ca.txt README.de.txt README.es.txt README.fr.txt README.it.txt README.osx.txt README.pt_BR.txt README.sk.txt README.sr.txt \
- TRANSLATORS \
- inkscape.png \
- inkscape.ico \
- mingwenv.bat \
- src/helper/sp-marshal.cpp.mingw src/helper/sp-marshal.h.mingw \
- src/2geom/angle.h \
- src/inkscape-manifest.xml src/inkview-manifest.xml \
- src/inkscape-manifest-x64.xml src/inkview-manifest-x64.xml \
- cxxtest/COPYING \
- cxxtest/cxxtestgen.pl \
- cxxtest/cxxtestgen.py \
- cxxtest/cxxtest/Descriptions.cpp \
- cxxtest/cxxtest/Descriptions.h \
- cxxtest/cxxtest/DummyDescriptions.cpp \
- cxxtest/cxxtest/DummyDescriptions.h \
- cxxtest/cxxtest/ErrorFormatter.h \
- cxxtest/cxxtest/ErrorPrinter.h \
- cxxtest/cxxtest/Flags.h \
- cxxtest/cxxtest/GlobalFixture.cpp \
- cxxtest/cxxtest/GlobalFixture.h \
- cxxtest/cxxtest/Gui.h \
- cxxtest/cxxtest/LinkedList.cpp \
- cxxtest/cxxtest/LinkedList.h \
- cxxtest/cxxtest/Mock.h \
- cxxtest/cxxtest/ParenPrinter.h \
- cxxtest/cxxtest/QtGui.h \
- cxxtest/cxxtest/RealDescriptions.cpp \
- cxxtest/cxxtest/RealDescriptions.h \
- cxxtest/cxxtest/Root.cpp \
- cxxtest/cxxtest/SelfTest.h \
- cxxtest/cxxtest/StdHeaders.h \
- cxxtest/cxxtest/StdValueTraits.h \
- cxxtest/cxxtest/StdioFilePrinter.h \
- cxxtest/cxxtest/StdioPrinter.h \
- cxxtest/cxxtest/TeeListener.h \
- cxxtest/cxxtest/TestListener.h \
- cxxtest/cxxtest/TestRunner.h \
- cxxtest/cxxtest/TestSuite.cpp \
- cxxtest/cxxtest/TestSuite.h \
- cxxtest/cxxtest/TestTracker.cpp \
- cxxtest/cxxtest/TestTracker.h \
- cxxtest/cxxtest/ValueTraits.cpp \
- cxxtest/cxxtest/ValueTraits.h \
- cxxtest/cxxtest/Win32Gui.h \
- cxxtest/cxxtest/X11Gui.h \
- cxxtest/cxxtest/YesNoRunner.h \
- packaging/autopackage/default.apspec.in \
- packaging/macosx/README.txt \
- packaging/macosx/Resources/Inkscape-Generic.icns \
- packaging/macosx/Resources/Inkscape.icns \
- packaging/macosx/Resources/MenuBar.nib/classes.nib \
- packaging/macosx/Resources/MenuBar.nib/info.nib \
- packaging/macosx/Resources/MenuBar.nib/objects.xib \
- packaging/macosx/Resources/ProgressWindow.nib/classes.nib \
- packaging/macosx/Resources/ProgressWindow.nib/info.nib \
- packaging/macosx/Resources/ProgressWindow.nib/objects.xib \
- packaging/macosx/Resources/alert_fccache.sh \
- packaging/macosx/Resources/application-gimp-gradient.icns \
- packaging/macosx/Resources/application-illustrator-svg.icns \
- packaging/macosx/Resources/application-illustrator.icns \
- packaging/macosx/Resources/application-pdf.icns \
- packaging/macosx/Resources/application-vnd.corel-draw-compressed.icns \
- packaging/macosx/Resources/application-vnd.corel-draw-template.icns \
- packaging/macosx/Resources/application-vnd.corel-draw.icns \
- packaging/macosx/Resources/application-vnd.ms.xaml.icns \
- packaging/macosx/Resources/application-vnd.wordperfect-graphic.icns \
- packaging/macosx/Resources/bin/gimp-wrapper.sh \
- packaging/macosx/Resources/bin/inkscape \
- packaging/macosx/Resources/etc/fonts/fonts.conf \
- packaging/macosx/Resources/etc/gtk-2.0/gtkrc \
- packaging/macosx/Resources/image-svg+xml-compressed.icns \
- packaging/macosx/Resources/image-svg+xml.icns \
- packaging/macosx/Resources/image-vnd.dxf.icns \
- packaging/macosx/Resources/image-vnd.sk1.icns \
- packaging/macosx/Resources/image-vnd.windows-metafile.icns \
- packaging/macosx/Resources/image-x-eps.icns \
- packaging/macosx/Resources/image-x-ps.icns \
- packaging/macosx/Resources/openDoc \
- packaging/macosx/Resources/script \
- packaging/macosx/Resources/xdg_setup.sh \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/application-exit.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/dialog-information.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/document-new.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/document-open-recent.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/document-open.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/document-print-preview.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/document-print.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/document-properties.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/document-revert-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/document-revert-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/document-save-as.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/document-save.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/drive-harddisk.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/edit-clear.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/edit-copy.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/edit-cut.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/edit-delete.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/edit-find-replace.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/edit-find.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/edit-paste.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/edit-redo-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/edit-redo-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/edit-select-all.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/edit-undo-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/edit-undo-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/folder-remote.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/folder.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/format-indent-less-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/format-indent-less-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/format-indent-more-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/format-indent-more-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/format-justify-center.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/format-justify-fill.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/format-justify-left.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/format-justify-right.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/format-text-bold.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/format-text-italic.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/format-text-strikethrough.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/format-text-underline.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/go-bottom.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/go-down.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/go-first-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/go-first-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/go-home.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/go-jump-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/go-jump-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/go-last-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/go-last-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/go-next-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/go-next-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/go-previous-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/go-previous-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/go-top.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/go-up.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/gtk-caps-lock-warning.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/gtk-color-picker.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/gtk-connect.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/gtk-convert.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/gtk-disconnect.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/gtk-edit.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/gtk-font.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/gtk-index.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/gtk-orientation-landscape.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/gtk-orientation-portrait.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/gtk-orientation-reverse-landscape.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/gtk-orientation-reverse-portrait.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/gtk-page-setup.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/gtk-preferences.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/gtk-select-color.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/gtk-select-font.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/gtk-undelete-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/gtk-undelete-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/help-about.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/help-contents.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/image-missing.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/list-add.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/list-remove.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/media-floppy.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/media-optical.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/media-playback-pause.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/media-playback-start-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/media-playback-start-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/media-playback-stop.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/media-record.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/media-seek-backward-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/media-seek-backward-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/media-seek-forward-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/media-seek-forward-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/media-skip-backward-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/media-skip-backward-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/media-skip-forward-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/media-skip-forward-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/network-idle.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/printer-error.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/printer-info.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/printer-paused.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/printer-warning.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/process-stop.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/system-run.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/text-x-generic.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/tools-check-spelling.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/user-desktop.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/user-home.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/view-fullscreen.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/view-refresh.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/view-restore.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/view-sort-ascending.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/view-sort-descending.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/window-close.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/zoom-fit-best.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/zoom-in.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/zoom-original.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/16/zoom-out.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/20/gtk-apply.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/20/gtk-cancel.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/20/gtk-no.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/20/gtk-ok.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/20/gtk-yes.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/20/window-close.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/application-exit.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/audio-volume-high.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/audio-volume-low.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/audio-volume-medium.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/audio-volume-muted.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/dialog-information.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/document-new.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/document-open-recent.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/document-open.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/document-print-preview.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/document-print.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/document-properties.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/document-revert-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/document-revert-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/document-save-as.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/document-save.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/drive-harddisk.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/edit-clear.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/edit-copy.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/edit-cut.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/edit-delete.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/edit-find-replace.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/edit-find.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/edit-paste.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/edit-redo-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/edit-redo-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/edit-select-all.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/edit-undo-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/edit-undo-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/folder-remote.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/folder.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/format-indent-less-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/format-indent-less-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/format-indent-more-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/format-indent-more-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/format-justify-center.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/format-justify-fill.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/format-justify-left.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/format-justify-right.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/format-text-bold.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/format-text-italic.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/format-text-strikethrough.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/format-text-underline.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/go-bottom.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/go-down.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/go-first-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/go-first-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/go-home.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/go-jump-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/go-jump-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/go-last-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/go-last-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/go-next-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/go-next-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/go-previous-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/go-previous-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/go-top.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/go-up.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/gtk-caps-lock-warning.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/gtk-color-picker.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/gtk-connect.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/gtk-convert.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/gtk-disconnect.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/gtk-edit.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/gtk-font.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/gtk-index.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/gtk-orientation-landscape.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/gtk-orientation-portrait.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/gtk-orientation-reverse-landscape.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/gtk-orientation-reverse-portrait.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/gtk-page-setup.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/gtk-preferences.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/gtk-select-color.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/gtk-select-font.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/gtk-undelete-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/gtk-undelete-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/help-about.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/help-contents.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/image-missing.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/list-add.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/list-remove.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/media-floppy.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/media-optical.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/media-playback-pause.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/media-playback-start-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/media-playback-start-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/media-playback-stop.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/media-record.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/media-seek-backward-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/media-seek-backward-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/media-seek-forward-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/media-seek-forward-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/media-skip-backward-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/media-skip-backward-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/media-skip-forward-ltr.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/media-skip-forward-rtl.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/network-idle.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/printer-error.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/printer-info.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/printer-paused.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/printer-warning.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/process-stop.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/system-run.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/text-x-generic.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/tools-check-spelling.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/user-desktop.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/user-home.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/view-fullscreen.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/view-refresh.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/view-restore.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/view-sort-ascending.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/view-sort-descending.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/window-close.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/zoom-fit-best.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/zoom-in.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/zoom-original.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/24/zoom-out.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/32/gtk-dnd-multiple.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/32/gtk-dnd.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/48/dialog-error.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/48/dialog-information.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/48/dialog-password.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/48/dialog-question.png \
- packaging/macosx/Resources-extras/src/icons/stock-icons/48/dialog-warning.png \
- packaging/macosx/ScriptExec/English.lproj/InfoPlist.strings \
- packaging/macosx/ScriptExec/English.lproj/main.nib/classes.nib \
- packaging/macosx/ScriptExec/English.lproj/main.nib/info.nib \
- packaging/macosx/ScriptExec/English.lproj/main.nib/objects.xib \
- packaging/macosx/ScriptExec/Info.plist \
- packaging/macosx/ScriptExec/MenuBar.nib/classes.nib \
- packaging/macosx/ScriptExec/MenuBar.nib/info.nib \
- packaging/macosx/ScriptExec/MenuBar.nib/objects.xib \
- packaging/macosx/ScriptExec/ScriptExec.xcodeproj/project.pbxproj \
- packaging/macosx/ScriptExec/ScriptExec_Prefix.pch \
- packaging/macosx/ScriptExec/launcher-quartz-no-macintegration.sh \
- packaging/macosx/ScriptExec/main.c \
- packaging/macosx/ScriptExec/openDoc \
- packaging/macosx/ScriptExec/script \
- packaging/macosx/ScriptExec/version.plist \
- packaging/macosx/create-stock-icon-theme.sh \
- packaging/macosx/dmg_background.png \
- packaging/macosx/dmg_background.svg \
- packaging/macosx/dmg_set_style.scpt \
- packaging/macosx/inkscape.ds_store \
- packaging/macosx/osx-app.sh \
- packaging/macosx/osx-build.sh \
- packaging/macosx/osx-dmg.sh \
- packaging/macosx/ports/_resources/port1.0/group/python-1.0.tcl \
- packaging/macosx/ports/devel/dbus-python/Portfile \
- packaging/macosx/ports/devel/inkscape-packaging/Portfile \
- packaging/macosx/ports/lang/python25/Portfile \
- packaging/macosx/ports/lang/python25/files/_localemodule.c.ed \
- packaging/macosx/ports/lang/python25/files/locale.py.ed \
- packaging/macosx/ports/lang/python25/files/patch-64bit.diff \
- packaging/macosx/ports/lang/python25/files/patch-FSIORefNum.diff \
- packaging/macosx/ports/lang/python25/files/patch-Lib-cgi.py.diff \
- packaging/macosx/ports/lang/python25/files/patch-Lib-distutils-dist.py.diff \
- packaging/macosx/ports/lang/python25/files/patch-Makefile.pre.in.diff \
- packaging/macosx/ports/lang/python25/files/patch-Misc-setuid-prog.c.diff \
- packaging/macosx/ports/lang/python25/files/patch-Modules-posixmodule.c.diff \
- packaging/macosx/ports/lang/python25/files/patch-configure.diff \
- packaging/macosx/ports/lang/python25/files/patch-fwrapv.diff \
- packaging/macosx/ports/lang/python25/files/patch-libedit.diff \
- packaging/macosx/ports/lang/python25/files/patch-mac_ver.diff \
- packaging/macosx/ports/lang/python25/files/patch-pyconfig.h.in.diff \
- packaging/macosx/ports/lang/python25/files/patch-setup.py-disabled_modules.diff \
- packaging/macosx/ports/lang/python25/files/patch-setup.py.diff \
- packaging/macosx/ports/lang/python25/files/pyconfig.ed \
- packaging/macosx/ports/lang/python25/files/pyconfig.h-universal.ed \
- packaging/macosx/ports/lang/python25/files/python25 \
- packaging/macosx/ports/lang/python26/Portfile \
- packaging/macosx/ports/lang/python26/files/patch-Lib-cgi.py.diff \
- packaging/macosx/ports/lang/python26/files/patch-Lib-distutils-dist.py.diff \
- packaging/macosx/ports/lang/python26/files/patch-Mac-IDLE-Makefile.in.diff \
- packaging/macosx/ports/lang/python26/files/patch-Mac-Makefile.in.diff \
- packaging/macosx/ports/lang/python26/files/patch-Mac-PythonLauncher-Makefile.in.diff \
- packaging/macosx/ports/lang/python26/files/patch-Mac-Tools-Doc-setup.py.diff \
- packaging/macosx/ports/lang/python26/files/patch-Makefile.pre.in.diff \
- packaging/macosx/ports/lang/python26/files/patch-setup.py.diff \
- packaging/macosx/ports/lang/python26/files/pyconfig.ed \
- packaging/macosx/ports/lang/python26/files/python26 \
- packaging/macosx/ports/lang/python26/files/version.plist \
- packaging/macosx/ports/python/py-Pillow/Portfile \
- packaging/macosx/ports/python/py-Pillow/files/patch-setup.py.diff \
- packaging/macosx/ports/python/py-gobject/Portfile \
- packaging/macosx/ports/python/py-gobject/files/00git_class_init.patch \
- packaging/macosx/ports/python/py-gobject/files/00git_fix_qdata_warning.patch \
- packaging/macosx/ports/python/py-gobject/files/00git_gio_flag_type.patch \
- packaging/macosx/ports/python/py-gobject/files/patch-pygi-info.c-p1.diff \
- packaging/macosx/ports/python/py-numpy/Portfile \
- packaging/macosx/ports/python/py-numpy/files/patch-f2py_setup.py.diff \
- packaging/macosx/ports/python/py-numpy/files/patch-fcompiler_g95.diff \
- packaging/macosx/ports/python/py-numpy/files/patch-numpy_core_setup.py.diff \
- packaging/macosx/ports/python/py-numpy/files/patch-numpy_linalg_setup.py.diff \
- packaging/macosx/ports/python/py-numpy/files/wrapper-template \
- packaging/macosx/ports/python/py-sk1libs/Portfile \
- packaging/macosx/ports/python/py-sk1libs/files/patch-src-imaging-libimagingft-_imagingft.c.diff \
- packaging/macosx/ports/python/py-sk1libs/files/patch-src-utils-fs.py.diff \
- packaging/macosx/ports/python/py-uniconvertor/Portfile \
- packaging/macosx/ports/python/py25-Pillow/Portfile \
- packaging/macosx/ports/python/py25-Pillow/files/patch-_imagingft.c.diff \
- packaging/macosx/ports/python/py25-Pillow/files/patch-setup.py-v1.7.8.diff \
- packaging/macosx/ports/python/py25-lxml/Portfile \
- packaging/macosx/ports/python/py25-nose/Portfile \
- packaging/macosx/ports/python/py25-nose/files/nosetests24 \
- packaging/macosx/ports/python/py25-nose/files/nosetests25 \
- packaging/macosx/ports/python/py25-nose/files/nosetests26 \
- packaging/macosx/ports/python/py25-nose/files/nosetests27 \
- packaging/macosx/ports/python/py25-nose/files/nosetests31 \
- packaging/macosx/ports/python/py25-nose/files/nosetests32 \
- packaging/macosx/ports/python/py25-nose/files/nosetests33 \
- packaging/macosx/ports/python/py25-nose/files/nosetests34 \
- packaging/macosx/ports/python/py25-numpy/Portfile \
- packaging/macosx/ports/python/py25-numpy/files/patch-f2py_setup.py.diff \
- packaging/macosx/ports/python/py25-numpy/files/patch-fcompiler_g95.diff \
- packaging/macosx/ports/python/py25-numpy/files/patch-numpy_distutils_fcompiler___init__.py.diff \
- packaging/macosx/ports/python/py25-numpy/files/patch-numpy_linalg_setup.py.diff \
- packaging/macosx/ports/python/py25-numpy/files/patch-setup.py.diff \
- packaging/macosx/ports/python/py25-numpy/files/wrapper-template \
- packaging/macosx/ports/python/py25-setuptools/Portfile \
- packaging/macosx/ports/python/py26-cython/Portfile \
- packaging/macosx/ports/python/py26-cython/files/cython24 \
- packaging/macosx/ports/python/py26-cython/files/cython25 \
- packaging/macosx/ports/python/py26-cython/files/cython26 \
- packaging/macosx/ports/python/py26-cython/files/cython27 \
- packaging/macosx/ports/python/py26-cython/files/cython31 \
- packaging/macosx/ports/python/py26-cython/files/cython32 \
- packaging/macosx/ports/python/py26-cython/files/cython33 \
- packaging/macosx/ports/python/py26-cython/files/cython34 \
- packaging/macosx/ports/python/py26-lxml/Portfile \
- packaging/macosx/ports/python/py26-nose/Portfile \
- packaging/macosx/ports/python/py26-nose/files/nosetests24 \
- packaging/macosx/ports/python/py26-nose/files/nosetests25 \
- packaging/macosx/ports/python/py26-nose/files/nosetests26 \
- packaging/macosx/ports/python/py26-nose/files/nosetests27 \
- packaging/macosx/ports/python/py26-nose/files/nosetests31 \
- packaging/macosx/ports/python/py26-nose/files/nosetests32 \
- packaging/macosx/ports/python/py26-nose/files/nosetests33 \
- packaging/macosx/ports/python/py26-nose/files/nosetests34 \
- packaging/macosx/ports/python/py26-numpy/Portfile \
- packaging/macosx/ports/python/py26-numpy/files/patch-f2py_setup.py.diff \
- packaging/macosx/ports/python/py26-numpy/files/patch-fcompiler_g95.diff \
- packaging/macosx/ports/python/py26-numpy/files/patch-numpy_core_setup.py.diff \
- packaging/macosx/ports/python/py26-numpy/files/patch-numpy_linalg_setup.py.diff \
- packaging/macosx/ports/python/py26-numpy/files/wrapper-template \
- packaging/macosx/ports/python/py26-setuptools/Portfile \
- packaging/win32/inkscape.nsi \
- packaging/win32/inkscape.nsi.uninstall \
- packaging/win32/languages/Breton.nsh \
- packaging/win32/languages/Catalan.nsh \
- packaging/win32/languages/Czech.nsh \
- packaging/win32/languages/Danish.nsh \
- packaging/win32/languages/Dutch.nsh \
- packaging/win32/languages/English.nsh \
- packaging/win32/languages/Finnish.nsh \
- packaging/win32/languages/French.nsh \
- packaging/win32/languages/Galician.nsh \
- packaging/win32/languages/German.nsh \
- packaging/win32/languages/Greek.nsh \
- packaging/win32/languages/Hebrew.nsh \
- packaging/win32/languages/Indonesian.nsh \
- packaging/win32/languages/Icelandic.nsh \
- packaging/win32/languages/Italian.nsh \
- packaging/win32/languages/Japanese.nsh \
- packaging/win32/languages/Polish.nsh \
- packaging/win32/languages/Portuguese.nsh \
- packaging/win32/languages/PortugueseBR.nsh \
- packaging/win32/languages/Romanian.nsh \
- packaging/win32/languages/Russian.nsh \
- packaging/win32/languages/Slovak.nsh \
- packaging/win32/languages/Slovenian.nsh \
- packaging/win32/languages/Spanish.nsh \
- packaging/win32/languages/SimpChinese.nsh \
- packaging/win32/languages/TradChinese.nsh \
- packaging/win32/languages/Ukrainian.nsh \
- packaging/win32/header.bmp \
- packaging/win32/header.svg \
- packaging/win32/AdvUninstLog.nsh \
- packaging/win32/AdvUninstLog.txt \
- packaging/win32/ifexist.nsh \
- packaging/win32/md5dll.dll \
- packaging/win32/md5dll.txt \
- packaging/win32/messagebox.dll \
- packaging/win32/MessageBox.txt \
- packaging/win32/RequireLatestNSIS.nsh \
- packaging/win32/VersionCompleteXXXX.nsh \
- packaging/win32/welcomefinish.bmp \
- packaging/win32/welcomefinish.svg \
- packaging/win32/portable/help.html \
- packaging/win32/portable/readme.packaging.txt \
- packaging/win32/portable/App/readme.txt \
- packaging/win32/portable/App/AppInfo/appicon.ico \
- packaging/win32/portable/App/AppInfo/appicon_16.png \
- packaging/win32/portable/App/AppInfo/appicon_32.png \
- packaging/win32/portable/App/AppInfo/appinfo.ini \
- packaging/win32/portable/App/AppInfo/installer.ini \
- packaging/wix/README \
- packaging/wix/inkscape.wxs \
- packaging/wix/gpl-2.0.rtf \
- packaging/wix/install.bat \
- packaging/wix/files.py \
- packaging/wix/version.py \
- packaging/wix/next_uuid.py \
- packaging/wix/wixenv.bat \
- packaging/wix/Bitmaps/banner.bmp \
- packaging/wix/Bitmaps/banner.svg \
- packaging/wix/Bitmaps/dialog.bmp \
- packaging/wix/Bitmaps/dialog.svg \
- po/inkscape.pot \
- po/update_po_files.sh \
- src/inkscape.rc src/inkview.rc src/inkscape-x64.rc src/inkview-x64.rc
-
-# We want the built inkscape.1 to go in the distributed .tar.gz so
-# that .tar.gz users don't need a full perl distribution to get a man
-# page.
-
-DISTCLEANFILES = inkscape.appdata.xml \
- inkscape.desktop \
- intltool-extract \
- intltool-merge \
- intltool-update
-
-#ACLOCAL_AMFLAGS = -I m4
-
-SUFFIXES = .pod .1
-inkscape.1 inkscape.de.1 inkscape.el.1 inkscape.fr.1 inkscape.ja.1 inkscape.sk.1 inkscape.zh_TW.1 : fix-roff-punct Makefile.am AUTHORS
-.pod.1:
- set -e; \
- d=`sed -n 's,/,-,g;s,.*\$$[D]ate: \(..........\).*,\1,p' $<`; \
- pod2man --utf8 $< \
- | sed 's/^\.TH .*/.TH INKSCAPE 1 "'"$$d"'" "Inkscape-$(VERSION)" "Inkscape"/' \
- | perl -pe 'if (/^\[\% .*INCLUDE.*AUTHORS.* \%\]/) { open(FOO, "$(srcdir)/AUTHORS");$$_ = join(",\n", map { chomp; $$_ } <FOO>) . "\n"; }' \
- | perl $(srcdir)/fix-roff-punct \
- > tmp.$$$$ \
- && mv -f tmp.$$$$ $@
-# ut8-to-roff removed (groff now supports utf8).
-# | perl -CI $(srcdir)/utf8-to-roff \
-# man 7 groff_char for further remarks on charset encoding for man pages.
-
-po/inkscape.pot:
- (cd $(srcdir)/po ; intltool-update --pot --output-file=$(distdir)/po/inkscape.pot)
-
-mande_DATA = inkscape.de.1
-mandedir = $(mandir)/de/man1
-
-manel_DATA = inkscape.el.1
-maneldir = $(mandir)/el/man1
-
-manfr_DATA = inkscape.fr.1
-manfrdir = $(mandir)/fr/man1
-
-manja_DATA = inkscape.ja.1
-manjadir = $(mandir)/ja/man1
-
-mansk_DATA = inkscape.ja.1
-manskdir = $(mandir)/sk/man1
-
-manzhtw_DATA = inkscape.zh_TW.1
-manzhtwdir = $(mandir)/zh_TW/man1
-
-#.PHONY: warn_markup
-noinst_DATA = warn_markup
-warn_markup:
- @if perl $(srcdir)/po/check-markup $(srcdir)/po/*.po; [ $$? = 1 ]; then \
- echo "WARNING: Bad markup found in translations. Please consider fixing the above problems." >&2; \
- fi
-
-.PHONY: check_markup
-check_DATA = check_markup
-check_markup:
- perl $(srcdir)/po/check-markup $(srcdir)/po/*.po || [ $$? = 127 ]
-# # `make check' probably shouldn't require perl to be installed, hence ignoring 127.
-
-distcheck-hook:
- perl $(srcdir)/po/check-markup $(srcdir)/po/*.po
-
-test-check-markup:
- if perl -e 42; then \
- perl $(srcdir)/po/check-markup $(srcdir)/po/bad.po.test 2>&1 \
- | diff $(srcdir)/po/bad.po.test.exp -; \
- fi
diff --git a/README b/README
index ca958d44a..77791f12f 100644
--- a/README
+++ b/README
@@ -32,14 +32,6 @@ Inkscape version 0.92 and newer can be build using cmake:
make
make install
-We also still include autoconf in 0.92 as an alternate build system, in
-case anything goes haywire with the new cmake scripts:
-
- ./autogen.sh # Optional, use if configure doesn't exist
- ./configure
- make
- make install
-
For platform specific instructions please read the README file that
is associated with that platform (e.g. for Mac OS X read README.osx)
diff --git a/acinclude.m4 b/acinclude.m4
deleted file mode 100644
index 36275e22f..000000000
--- a/acinclude.m4
+++ /dev/null
@@ -1,3 +0,0 @@
-m4_include([m4/ac_define_dir.m4])
-m4_include([m4/relaytool.m4])
-m4_include([m4/ink_bzr_snapshot_build.m4])
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index 0a9cb7924..000000000
--- a/autogen.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/sh
-
-# This script does all the magic calls to automake/autoconf and
-# friends that are needed to configure a cvs checkout. As described in
-# the file HACKING you need a couple of extra tools to run this script
-# successfully.
-#
-# If you are compiling from a released tarball you don't need these
-# tools and you shouldn't use this script. Just call ./configure
-# directly.
-
-test -n "$srcdir" || srcdir=`dirname "$0"`
-test -n "$srcdir" || srcdir=.
-
-olddir=`pwd`
-cd $srcdir
-
-WHICH_AUTORECONF=`which autoreconf`
-if test -z $WHICH_AUTORECONF; then
- echo "*** No autoreconf found, please install it ***"
- exit 1
-fi
-
-WHICH_INTLTOOLIZE=`which intltoolize`
-if test -z $WHICH_INTLTOOLIZE; then
- echo "*** No intltoolize found, please install the intltool package ***"
- exit 1
-fi
-
-WHICH_AUTOPOINT=`which autopoint`
-if test -z $WHICH_AUTOPOINT; then
- echo "*** No autopoint found, please install the autopoint package ***"
- exit 1
-fi
-
-autopoint --force
-AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install --verbose
-
-# Patch the generated po/Makefile.in.in file so that locale files are installed
-# in the correct location on OS X and Free-BSD systems. This is a workaround
-# for a bug in intltool. See https://launchpad.net/bugs/398571
-#
-# The issue should be fixed in intltool 0.51.0.
-#
-# TODO: Drop this hack, and bump our intltool version requirement once the issue
-# is fixed in intltool
-sed 's/itlocaledir = $(prefix)\/$(DATADIRNAME)\/locale/itlocaledir = $(datarootdir)\/locale/' < po/Makefile.in.in > po/Makefile.in.in.tmp
-mv po/Makefile.in.in.tmp po/Makefile.in.in
-
-echo ""
-echo "Done! Please run './configure' now."
diff --git a/build-lx.xml b/build-lx.xml
deleted file mode 100644
index 01be2d0fd..000000000
--- a/build-lx.xml
+++ /dev/null
@@ -1,590 +0,0 @@
-<!--
- * Inkscape build file.
- *
- * See buildtool.cpp for use.
- *
- * Authors:
- * Bob Jamison
- * Others
- *
- * Copyright (C) 2006-2008 Inkscape.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--->
-
-
-
-<!--
-########################################################################
-## P R O J E C T : I N K S C A P E
-########################################################################
--->
-<project name="Inkscape" default="dist" basedir=".">
- <description>
- Build file for the Inkscape SVG editor. This version
- is configured for Unix/Linux, but hopefully we can merge
- in the future.
- </description>
-
- <!-- set global properties for this build -->
- <property name="version" value="0.92pre1"/>
- <property name="src" location="src"/>
- <property name="lib" location="lib"/>
- <property name="build" location="build"/>
- <property name="dist" location="inkscape"/>
-
- <!-- Use these settings for Unix -->
- <!-- -->
- <property name="arch" value=""/>
- <property name="archutil" value=""/>
- <property name="devlibs" location="/usr"/>
- <property name="datadir" location="${dist}/share"/>
-
- <!-- -->
-
- <!-- Use these settings for the MinGW native compiler -->
- <!--
- <property name="arch" value="mingw32-"/>
- <property name="archutil" value=""/>
- <property name="devlibs" location="c:/devlibs"/>
- -->
-
- <!-- Use these settings for the MinGW cross compiler -->
- <!--
- <property name="arch" value="i686-pc-mingw32-"/>
- <property name="archutil" value="${arch}"/>
- <property name="gtk" location="/target"/>
- -->
-
- <!-- Extra properties -->
- <property name="refresh" value="false"/>
-
- <!--
- This is for package-config. With these two settings, pkg-config
- queries can be as simple as ${pcc.packageName} for cflags, and
- ${pcl.packageName} for libs. Dependencies are calculated automatically.
- -->
- <property name="pkg-config-path" location="${devlibs}/lib/pkgconfig"/>
- <property name="pkg-config-prefix" location="${devlibs}"/>
-
-
- <!--
- ########################################################################
- ## T A R G E T : I N I T
- ########################################################################
- -->
- <target name="init"
- description=
- "Do all preparatory tasks, like make directories and copy files">
-
-
- <mkdir dir="${build}"/>
- <mkdir dir="${build}/java"/>
- <mkdir dir="${build}/java/classes"/>
- <mkdir dir="${build}/java/lib"/>
-
- <mkdir dir="${build}"/>
- <mkdir dir="${dist}"/>
- <copy file="${src}/helper/sp-marshal.h.mingw"
- tofile="${src}/helper/sp-marshal.h"/>
- <copy file="${src}/helper/sp-marshal.cpp.mingw"
- tofile="${src}/helper/sp-marshal.cpp"/>
- <makefile file="inkscape_version.h">
- #define INKSCAPE_VERSION "${version}, revision ${svn.revision}"
- </makefile>
- <makefile file="config.h">
- #ifndef _CONFIG_H_
- #define _CONFIG_H_
-
- /*######################################
- ## This is for require-config.h, whose
- ## purpose I cannot fathom.
- ######################################*/
-
- #define PACKAGE_TARNAME
-
- /*######################################
- #### RESOURCE DIRECTORIES
- ######################################*/
-
- #define INKSCAPE_DATADIR "."
- #define PACKAGE_LOCALE_DIR "locale"
-
-
- /*######################################
- #### OTHER DEFINITIONS
- ######################################*/
-
- #define GETTEXT_PACKAGE "inkscape"
-
- #define PACKAGE_STRING VERSION
-
- #define HAVE_GETOPT_H 1
- #define HAVE_STRING_H 1
- #define HAVE_LIBINTL_H 1
- #define HAVE_MALLOC_H 1
- #define HAVE_STDLIB_H 1
- #define HAVE_SYS_STAT_H 1
- #define HAVE_INTTYPES_H 1
- #define HAVE_ZLIB_H 1
-
- #define ENABLE_LCMS 1
-
- #define WITH_GTKMM_2_24 1
-
- #define ENABLE_NLS 1
- #define HAVE_BIND_TEXTDOMAIN_CODESET 1
-
- /* make us relocatable */
- #define BR_PTHREADS 1
- #define ENABLE_BINRELOC 1
-
- /* CairoPDF options */
- #define HAVE_CAIRO_PDF 1
- #define PANGO_ENABLE_ENGINE 1
- #define RENDER_WITH_PANGO_CAIRO 1
-
- #define HAVE_GTK_WINDOW_FULLSCREEN 1
-
- /* internal interpreter */
- #define WITH_PYTHON 1
-
- /* use poppler for pdf import? */
- #define HAVE_POPPLER 1
- #define HAVE_POPPLER_CAIRO 1
-
- /* do we want bitmap manipulation? */
- #define WITH_IMAGE_MAGICK 1
-
- /* Allow reading WordPerfect? */
- #define WITH_LIBWPG 1
-
- /* Default to libwpg 0.1.x */
- #define WITH_LIBWPG01 1
-
- #endif /* _CONFIG_H_ */
- </makefile>
- </target>
-
-
-
- <!--
- ########################################################################
- ## T A R G E T : T O U C H A B O U T
- ########################################################################
- -->
- <target name="touchabout"
- description="update the modification time of aboutbox.cpp">
- <!-- not good <touch file="${src}/ui/dialog/aboutbox.cpp"/> -->
- <!-- better -->
- <delete file="${build}/obj/ui/dialog/aboutbox.o"/>
- <delete file="inkscape_version.h"/>
- </target>
-
-
- <!--
- ########################################################################
- ## T A R G E T : C O M P I L E
- ########################################################################
- -->
- <target name="compile" depends="init"
- description="compile the source to .o" >
-
- <!-- Compile from source to build -->
- <cc cc="${arch}gcc" cxx="${arch}g++"
- destdir="${build}/obj"
- continueOnError="false"
- refreshCache="${refresh}">
- <fileset dir="${src}">
- <!-- THINGS TO EXCLUDE -->
- <exclude name="2geom/chebyshev.cpp"/>
- <exclude name="ast/.*"/>
- <exclude name="bonobo/.*"/>
- <exclude name="deptool.cpp"/>
- <exclude name="test-all.cpp"/>
- <exclude name="display/testnr.cpp"/>
- <exclude name="display/bezier-utils-test.cpp"/>
- <exclude name="extension/api.cpp"/>
- <exclude name="extension/dxf2svg/.*"/>
- <exclude name="extension/implementation/plugin.cpp"/>
- <exclude name="extension/script/bindtest.cpp"/>
- <exclude name="extension/script/cpptest.cpp"/>
- <exclude name="extension/plugin/.*"/>
- <exclude name="extract-uri-test.cpp"/>
- <exclude name="helper/units-test.cpp"/>
- <!-- exclude name="inkview.cpp"/-->
- <exclude name="libnr/test-nr.cpp"/>
- <exclude name="libnr/test-nr-main.cpp"/>
- <exclude name="libnr/testnr.cpp"/>
- <exclude name="libnr/in-svg-plane-test.cpp"/>
- <exclude name="libnr/nr-compose-reference.cpp"/>
- <exclude name="libnr/nr-compose-test.cpp"/>
- <exclude name="libnr/nr-matrix-test.cpp"/>
- <exclude name="libnr/nr-point-fns-test.cpp"/>
- <exclude name="libnr/nr-rotate-fns-test.cpp"/>
- <exclude name="libnr/nr-rotate-test.cpp"/>
- <exclude name="libnr/nr-scale-test.cpp"/>
- <exclude name="libnr/nr-translate-test.cpp"/>
- <exclude name="libnr/nr-types-test.cpp"/>
- <exclude name="livarot/Path-test.cpp"/>
- <exclude name="mod360-test.cpp"/>
- <exclude name="trace/potrace/potest.cpp"/>
- <exclude name="round-test.cpp"/>
- <exclude name="sp-gradient-test.cpp"/>
- <exclude name="svg/ftos.cpp"/>
- <exclude name="svg/test-svg.cpp"/>
- <exclude name="svg/test-svg-main.cpp"/>
- <exclude name="widgets/test-widgets.cpp"/>
- <exclude name="xml/quote-test.cpp"/>
- <exclude name="xml/repr-action-test.cpp"/>
- <exclude name="xml/test-xml.cpp"/>
- <exclude name="xml/test-xml-main.cpp"/>
- <exclude name="io/streamtest.cpp"/>
- <!--OVERLAP-->
- <exclude name="removeoverlap/placement_SolveVPSC.cpp"/>
- <exclude name="removeoverlap/placement_SolveVPSC.h"/>
- <exclude name="removeoverlap/test.cpp"/>
- <exclude name="removeoverlap/remove_rectangle_overlap-test.cpp"/>
- <exclude name="removeoverlap/remove_rectangle_overlap-test.h"/>
- <!--WIN32 -->
- <exclude name="registrytool.cpp"/>
- <exclude name="extension/internal/win32.cpp"/>
- <exclude name="libgdl/gdl-win32.c"/>
- </fileset>
- <excludeinc dir="${src}">
- <file name="extension/param"/>
- </excludeinc>
- <flags>
- -Wall -Wformat -Werror=format-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch
- -O2
- </flags>
- <defines>
- -DVERSION=\"${version}\"
- -DHAVE_CONFIG_H
- -D_INTL_REDIRECT_INLINE
- -DHAVE_SSL
- -DRELAYTOOL_SSL="static const int libssl_is_present=1; static int __attribute__((unused)) libssl_symbol_is_present(char *s){ return 1; }" <!-- inkboard -->
- </defines>
- <includes>
- -I${devlibs}/include
- <!-- GTK / GTKMM -->
- ${pcc.gtkmm-2.4}
- <!-- OTHER -->
- ${pcc.libxslt}
- ${pcc.freetype2}
- ${pcc.cairo}
- ${pcc.poppler}
- -I${devlibs}/include/gc
- ${pcc.libwpg-0.1} ${pcc.libwpg-stream-0.1}
- <!-- PYTHON -->
- -I${devlibs}/python/include
- <!-- JAVA -->
- -I${src}/bind/javainc -I${src}/bind/javainc/linux
- </includes>
- </cc>
- </target>
-
-
- <!--
- ########################################################################
- ## T A R G E T : L I B
- ########################################################################
- -->
- <target name="lib" depends="compile"
- description="create a static library">
- <staticlib command="${archutil}ar crsv"
- file="${build}/libinkscape.a">
- <fileset dir="${build}/obj">
- <exclude name="main.o"/>
- <exclude name="winmain.o"/>
- <exclude name="inkview.o"/>
- </fileset>
- </staticlib>
- </target>
-
-
-
- <!--
- ########################################################################
- ## T A R G E T : I 1 8 N
- ########################################################################
- -->
- <target name="i18n" depends="compile"
- description="compile gettext .po files to .mo">
-
- <msgfmt todir="${build}/locale" owndir="true"
- out="LC_MESSAGES/inkscape.mo">
- <fileset dir="po">
- </fileset>
- </msgfmt>
- </target>
-
-
-
-
-
- <!--
- ########################################################################
- ## T A R G E T : L I N K
- ########################################################################
- -->
- <target name="link" depends="lib"
- description="link objects and library to create executable">
-
- <link command="${arch}g++" out="${build}/inkscape"
- strip="true" symfile="${build}/inkscape.dbg"
- stripcommand="${archutil}strip"
- objcopycommand="${archutil}objcopy">
- <flags>
- </flags>
- <fileset dir="${build}">
- <include name="obj/main.o"/>
- <include name="libinkscape.a"/>
- </fileset>
- <libs>
- -L${devlibs}/lib
- ${pcl.poppler} ${pcl.poppler-cairo} ${pcl.poppler-glib}
- ${pcl.gtkmm-2.4}
- ${pcl.cairo} ${pcl.cairomm-1.0}
- ${pcl.gthread-2.0}
- ${pcl.libxslt}
- ${pcl.libwpg-0.1} ${pcl.libwpg-stream-0.1}
- ${pcl.ImageMagick++}
- ${pcl.fontconfig} ${pcl.freetype2}
- ${pcl.lcms}
- ${pcl.gsl}
- -lssl -lcrypto
- -lpng -ljpeg -ltiff -lpopt -lz
- -lgc -lm
- </libs>
- </link>
- </target>
-
-
-
-
-
- <!--
- ########################################################################
- ## T A R G E T : L I N K I N K V I E W
- ########################################################################
- -->
- <target name="linkinkview" depends="lib"
- description="link objects and library to create Inkview executable">
-
- <link command="${arch}g++" out="${build}/inkview"
- strip="true" symfile="${build}/inkview.dbg"
- stripcommand="${archutil}strip"
- objcopycommand="${archutil}objcopy">
- <flags>
- </flags>
- <fileset dir="${build}">
- <include name="obj/inkview.o"/>
- <include name="libinkscape.a"/>
- </fileset>
- <libs>
- -L${devlibs}/lib
- ${pcl.poppler}
- ${pcl.gtkmm-2.4}
- ${pcl.cairo} ${pcl.cairomm-1.0}
- <!-- PERL -->
- -L${devlibs}/perl/lib/CORE -lperl58
- <!-- PYTHON -->
- -L${devlibs}/python/libs -lpython25
- -lxml2 -lxslt
- -lwpg-0.1 -lwpg-stream-0.1
- ${pcl.ImageMagick++}
- ${pcl.fontconfig} ${pcl.freetype2}
- ${pcl.lcms}
- -lssl -lcrypto
- -lpng -ljpeg -ltiff -lpopt -lz
- -lgc
- -lintl -liconv -lm
- </libs>
- </link>
- </target>
-
-
-
- <!--
- ########################################################################
- ## T A R G E T : D I S T
- ########################################################################
- -->
- <target name="dist" depends="link,i18n"
- description="generate the distribution directory with all needed files">
-
- <!-- Create the distribution directory -->
- <mkdir dir="${dist}/bin"/>
- <mkdir dir="${dist}/lib"/>
-
- <!-- Copy Inkscape files -->
- <copy file="${build}/inkscape" todir="${dist}/bin"/>
- <copy file="${build}/inkscape.dbg" todir="${dist}/bin"/>
- <copy file="AUTHORS" todir="${dist}"/>
- <copy file="COPYING" todir="${dist}"/>
- <copy file="GPL2.txt" todir="${dist}"/>
- <copy file="GPL3.txt" todir="${dist}"/>
- <copy file="LGPL2.1.txt" todir="${dist}"/>
- <copy file="NEWS" todir="${dist}"/>
- <copy file="README" todir="${dist}"/>
- <copy file="TRANSLATORS" todir="${dist}"/>
- <copy todir="${datadir}/inkscape">
- <fileset dir="share/attributes"> <exclude name=".*\.am"/> </fileset>
- </copy>
- <copy todir="${datadir}/inkscape">
- <fileset dir="share/clipart"> <exclude name=".*\.am"/> </fileset>
- </copy>
- <copy todir="${datadir}/inkscape">
- <fileset dir="share/examples"> <exclude name=".*\.am"/> </fileset>
- </copy>
- <copy todir="${datadir}/inkscape">
- <fileset dir="share/extensions"> <exclude name=".*\.am"/> </fileset>
- </copy>
- <copy todir="${datadir}/inkscape">
- <fileset dir="share/fonts"> <exclude name=".*\.am"/> </fileset>
- </copy>
- <copy todir="${datadir}/inkscape">
- <fileset dir="share/gradients"> <exclude name=".*\.am"/> </fileset>
- </copy>
- <copy todir="${datadir}/inkscape">
- <fileset dir="share/icons"> <exclude name=".*\.am"/> </fileset>
- </copy>
- <copy todir="${datadir}/inkscape">
- <fileset dir="share/keys"> <exclude name=".*\.am"/> </fileset>
- </copy>
- <copy todir="${datadir}/inkscape">
- <fileset dir="share/markers"> <exclude name=".*\.am"/> </fileset>
- </copy>
- <copy todir="${datadir}/inkscape">
- <fileset dir="share/palettes"> <exclude name=".*\.am"/> </fileset>
- </copy>
- <copy todir="${datadir}/inkscape">
- <fileset dir="share/patterns"> <exclude name=".*\.am"/> </fileset>
- </copy>
- <copy todir="${datadir}/inkscape">
- <fileset dir="share/screens"> <exclude name=".*\.am"/> </fileset>
- </copy>
- <copy todir="${datadir}/inkscape">
- <fileset dir="share/symbols"> <exclude name=".*\.am"/> </fileset>
- </copy>
- <copy todir="${datadir}/inkscape">
- <fileset dir="share/templates"> <exclude name=".*\.am"/> </fileset>
- </copy>
- <copy todir="${datadir}/inkscape">
- <fileset dir="share/tutorials"> <exclude name=".*\.am"/> </fileset>
- </copy>
- <copy todir="${datadir}/inkscape">
- <fileset dir="share/ui"> <exclude name=".*\.am"/> </fileset>
- </copy>
- <copy todir="${datadir}">
- <fileset dir="${build}/locale"> <exclude name=".*\.am"/> </fileset>
- </copy>
-
- <!-- Copy devlibs files -->
-
-
- </target>
-
-
- <!--
- ########################################################################
- ## T A R G E T : JAVAC
- ########################################################################
- -->
- <target name="javac" depends="init"
- description="compile java binding classes">
- <javac srcdir="${src}/bind/java" destdir="${build}/java/classes"/>
- </target>
-
-
- <!--
- ########################################################################
- ## T A R G E T : JAR
- ########################################################################
- -->
- <target name="jar" depends="javac"
- description="pack java classes and resources into a jar file">
- <copy todir="${build}/java/classes"> <fileset dir="bind/data"/></copy>
- <jar basedir="${build}/java/classes" destfile="${build}/java/lib/inkscape.jar"/>
- </target>
-
- <!--
- ########################################################################
- ## T A R G E T : BINDDIST
- ########################################################################
- -->
- <target name="binddist" depends="jar"
- description="pack java classes and resources into a jar file">
- <copy todir="${datadir}/inkscape/bind"> <fileset dir="bind/java"/> </copy>
- <copy todir="${datadir}/inkscape/bind/java"> <fileset dir="${build}/java/lib"/> </copy>
-
- </target>
-
- <!--
- ########################################################################
- ## T A R G E T : BINDCLEAN
- ########################################################################
- -->
- <target name="bindclean" depends=""
- description="clean up java binding classes">
- <delete dir="${build}/java"/>
- </target>
-
-
-
-
- <!--
- ########################################################################
- ## T A R G E T : D I S T - A L L
- ########################################################################
- -->
- <target name="dist-all" depends="dist"
- description="generate the distribution, along with inkview" >
-
- <copy file="${build}/inkview" todir="${dist}/bin"/>
- <copy file="${build}/inkview.dbg" todir="${dist}/bin"/>
-
- </target>
-
-
-
-
-
- <!--
- ########################################################################
- ## T A R G E T : C L E A N
- ########################################################################
- -->
- <target name="clean" depends="bindclean"
- description="clean up. deleting build and distro dirs" >
-
- <delete dir="${build}"/>
- <delete dir="${dist}"/>
- <delete file="build.dep"/>
- <delete file="config.h"/>
- <delete file="inkscape_version.h"/>
-
- </target>
-
-
-
-</project>
-<!--
-########################################################################
-## E N D
-########################################################################
--->
-
diff --git a/build-x64-gtk3.xml b/build-x64-gtk3.xml
deleted file mode 100644
index c9f6db905..000000000
--- a/build-x64-gtk3.xml
+++ /dev/null
@@ -1,952 +0,0 @@
-<!--
- * Inkscape build file.
- *
- * See buildtool.cpp for use.
- *
- * Authors:
- * Bob Jamison
- * Others
- *
- * Copyright (C) 2006-2008 Inkscape.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--->
-
-
-
-<!--
-########################################################################
-## P R O J E C T : I N K S C A P E
-########################################################################
--->
-<project name="Inkscape" default="dist-all" basedir=".">
- <description>
- Build file for the Inkscape SVG editor. This file
- was written for GTK-3 on Win64.
-
- Note that the default target is 'dist-all'. You can execute other
- targets instead, by "btool {target}", like "btool compile", if
- you want to save time, or "dist-inkscape" if you don't want inkview.
- </description>
-
- <!-- set global properties for this build -->
- <property name="version" value="0.91+devel_64bit_gtk3"/>
- <property name="src" location="src"/>
- <property name="lib" location="lib"/>
- <property name="build" location="build"/>
- <property name="dist" location="inkscape"/>
-
- <!-- Use these settings for the native compiler -->
- <!-- -->
- <property name="arch" value="x86_64-w64-mingw32-"/>
- <property name="arch_cc" value="${arch}gcc"/>
- <property name="arch_cxx" value="${arch}g++"/>
- <property name="arch_link" value="${arch}g++"/>
- <property name="archutil" value=""/>
- <property name="devlibs" location="${env.DEVLIBS_PATH}"/>
- <property name="mingw" location="${env.MINGW_PATH}"/>
- <property name="mingw_bin" location="${env.MINGW_PATH}/bin"/>
- <property name="cxxtest" location="cxxtest"/>
- <property name="python" location="${devlibs}/python/python.exe"/>
- <!-- -->
-
- <!-- Use these settings for the cross compiler -->
- <!--
- <property name="arch" value="i686-pc-mingw32-"/>
- <property name="arch_cc" value="${arch}gcc"/>
- <property name="arch_cxx" value="${arch}g++"/>
- <property name="arch_link" value="${arch}g++"/>
- <property name="archutil" value="${arch}"/>
- <property name="devlibs" location="/target"/>
- <property name="mingw_bin" location="${env.MINGW_BIN}"/>
- <property name="cxxtest" location="cxxtest"/>
- <property name="python" location="python"/>
- -->
-
- <!-- Extra properties -->
- <property name="refresh" value="false"/>
-
- <!--
- This is for package-config. With these two settings, pkg-config
- queries can be as simple as ${pcc.packageName} for cflags, and
- ${pcl.packageName} for libs. Dependencies are calculated automatically.
- -->
- <property name="pkg-config-path" location="${devlibs}/lib/pkgconfig"/>
- <property name="pkg-config-prefix" location="${devlibs}"/>
-
-
- <!--
- ########################################################################
- ## T A R G E T : I N I T
- ########################################################################
- -->
- <target name="init"
- description=
- "Do all preparatory tasks, like make directories and copy files">
-
-
- <mkdir dir="${build}"/>
- <mkdir dir="${dist}"/>
-
- <copy file="${src}/helper/sp-marshal.h.mingw"
- tofile="${src}/helper/sp-marshal.h"/>
- <copy file="${src}/helper/sp-marshal.cpp.mingw"
- tofile="${src}/helper/sp-marshal.cpp"/>
-
- <!--makefile file="${src}/inkscape-version.cpp">
- namespace Inkscape {
- char const *version_string = "${version}";
- }
- </makefile-->
- <makefile file="${src}/inkscape-version.cpp" force="true">
- namespace Inkscape {
- char const *version_string = "${version} ${bzr.revision}";
- }
- </makefile>
- <makefile file="config.h">
- #ifndef _CONFIG_H_
- #define _CONFIG_H_
-
- #ifndef WIN32
- #define WIN32
- #endif
-
- /*######################################
- ## This is for require-config.h, whose
- ## purpose I cannot fathom.
- ######################################*/
-
- #define PACKAGE_TARNAME
-
- /*######################################
- #### RESOURCE DIRECTORIES
- ######################################*/
-
- #define INKSCAPE_DATADIR "."
- #define PACKAGE_LOCALE_DIR "locale"
-
-
- /*######################################
- #### OTHER DEFINITIONS
- ######################################*/
-
- #define GETTEXT_PACKAGE "inkscape"
-
- #define PACKAGE_STRING VERSION
-
- #define HAVE_GETOPT_H 1
- #define HAVE_STRING_H 1
- #define HAVE_LIBINTL_H 1
- #define HAVE_MALLOC_H 1
- #define HAVE_STDLIB_H 1
- #define HAVE_SYS_STAT_H 1
- #define HAVE_INTTYPES_H 1
- #define HAVE_OPENMP 1
- #define HAVE_TR1_UNORDERED_SET 1
- #define HAVE_STDINT_H 1
-
- #define HAVE_LIBLCMS2 1
-
- #define WITH_GTKMM_3_0 1
- #define WITH_GTKMM_3_10 1
- //#define WITH_GLIBMM_2_32 1
- #define HAVE_GLIBMM_THREADS_H 1
- #define WITH_EXT_GDL 1
- #define WITH_GDL_3_6 1
-
- #define ENABLE_NLS 1
- #define HAVE_BIND_TEXTDOMAIN_CODESET 1
-
- /* keep binreloc off */
- #define BR_PTHREADS 0
- #undef ENABLE_BINRELOC
-
- /* CairoPDF options */
- #define HAVE_CAIRO_PDF 1
- #define PANGO_ENABLE_ENGINE 1
- #define RENDER_WITH_PANGO_CAIRO 1
-
- #define HAVE_GTK_WINDOW_FULLSCREEN 1
-
- /* internal interpreter */
- #define WITH_PYTHON 1
-
- /* use poppler for pdf import? */
- #define HAVE_POPPLER 1
- #define HAVE_POPPLER_GLIB 1
- #define HAVE_POPPLER_CAIRO 1
-
- /* do we want bitmap manipulation? */
- #define WITH_IMAGE_MAGICK 1
-
- /* Exif and JPEG support for image resolution import */
- #define HAVE_EXIF 1
- #define HAVE_JPEG 1
-
- /* WordPerfect import filter */
- #define WITH_LIBWPG 1
- #define WITH_LIBWPG03 1
-
- /* Visio import filter */
- #define WITH_LIBVISIO 1
- #define WITH_LIBVISIO01 1
-
- /* Corel Draw import filter */
- #define WITH_LIBCDR 1
- #define WITH_LIBCDR01 1
-
- /* Do we support SVG Fonts? */
- #define ENABLE_SVG_FONTS 1
-
- /* Do we want experimental, unsupported, unguaranteed, etc., LivePathEffects enabled? */
- //#define LPE_ENABLE_TEST_EFFECTS 1
-
- /* Do we want experimental, unsupported, unguaranteed, etc., SVG2 features enabled? */
- //#define WITH_SVG2 1
- //#define WITH_CSSCOMPOSITE 1
- //#define WITH_CSSBLEND 1
- //#define WITH_MESH 1
-
- #define HAVE_ASPELL 1
-
- #define HAVE_POTRACE 1
-
- #endif /* _CONFIG_H_ */
- </makefile>
- </target>
-
- <!--
- ########################################################################
- ## T A R G E T : C X X T E S T
- ########################################################################
- -->
- <target name="cxxtest" depends="init"
- description="generate test files" >
-
- <!-- Generate CxxTest files -->
- <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
- out="${src}/test-src.cpp">
- <fileset dir="${src}">
- <include name="attributes-test.h"/>
- <include name="color-profile-test.h"/>
- <include name="dir-util-test.h"/>
- <include name="extract-uri-test.h"/>
- <include name="marker-test.h"/>
- <include name="mod360-test.h"/>
- <include name="object-test.h"/>
- <include name="preferences-test.h"/>
- <include name="round-test.h"/>
- <include name="sp-gradient-test.h"/>
- <include name="sp-style-elem-test.h"/>
- <include name="syle-test.h"/>
- <include name="test-helpers.h"/>
- <include name="verbs-test.h"/>
- </fileset>
- </cxxtestpart>
- <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
- out="${src}/display/test-display.cpp">
- <fileset dir="${src}/display">
- <include name="curve-test.h"/>
- </fileset>
- </cxxtestpart>
- <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
- out="${src}/helper/test-helper.cpp">
- <fileset dir="${src}/helper">
- <include name="units-test.h"/>
- </fileset>
- </cxxtestpart>
- <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
- out="${src}/svg/test-svg.cpp">
- <fileset dir="${src}/svg">
- <!--<include name="css-ostringstream-test.h"/>-->
- <include name="stringstream-test.h"/>
- <include name="svg-affine-test.h"/>
- <include name="svg-color-test.h"/>
- <include name="svg-length-test.h"/>
- <include name="svg-path-geom-test.h"/>
- </fileset>
- </cxxtestpart>
- <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
- out="${src}/util/test-util.cpp">
- <fileset dir="${src}/util">
- <include name="list-container-test.h"/>
- </fileset>
- </cxxtestpart>
- <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
- out="${src}/xml/test-xml.cpp">
- <fileset dir="${src}/xml">
- <include name="repr-action-test.h"/>
- <include name="quote-test.h"/>
- </fileset>
- </cxxtestpart>
- <cxxtestroot command="${python} ${cxxtest}/cxxtestgen.py"
- out="${src}/test-main.cpp"
- template="${src}/cxxtest-template.tpl">
- <fileset dir="${src}">
- <include name="MultiPrinter.h"/>
- <include name="PylogFormatter.h"/>
- <include name="TRPIFormatter.h"/>
- </fileset>
- </cxxtestroot>
- </target>
-
-
- <!--
- ########################################################################
- ## T A R G E T : C O M P I L E
- ########################################################################
- -->
- <target name="compile" depends="cxxtest"
- description="compile the source to .o" >
-
- <!-- Compile from source to build -->
- <cc cc="${arch_cc}" cxx="${arch_cxx}"
- destdir="${build}/obj"
- continueOnError="true"
- refreshCache="${refresh}">
- <fileset dir="${src}">
- <!-- THINGS TO EXCLUDE -->
- <exclude name="ast/.*"/>
- <exclude name="bonobo/.*"/>
- <exclude name="libgdl/.*"/>
- <exclude name="deptool.cpp"/>
- <exclude name="cxxtests.cpp"/>
- <!--<exclude name="test-main.cpp"/>-->
- <!--<exclude name="test-src.cpp"/>-->
- <exclude name="display/test-display.cpp"/>
- <exclude name="display/testnr.cpp"/>
- <exclude name="extension/api.cpp"/>
- <exclude name="extension/dbus/.*"/>
- <exclude name="extension/dxf2svg/.*"/>
- <exclude name="extension/implementation/plugin.cpp"/>
- <exclude name="extension/plugin/.*"/>
- <exclude name="extract-uri-test.cpp"/>
- <exclude name="helper/units-test.cpp"/>
- <!-- exclude name="inkview.cpp"/-->
- <exclude name="livarot/Path-test.cpp"/>
- <exclude name="mod360-test.cpp"/>
- <exclude name="trace/potrace/potest.cpp"/>
- <exclude name="round-test.cpp"/>
- <exclude name="sp-gradient-test.cpp"/>
- <exclude name="style-test.cpp"/>
- <exclude name="svg/ftos.cpp"/>
- <!--<exclude name="svg/test-svg.cpp"/>-->
- <exclude name="svg/test-svg-main.cpp"/>
- <exclude name="util/list-container-test.cpp"/>
- <exclude name="widgets/test-widgets.cpp"/>
- <exclude name="xml/quote-test.cpp"/>
- <exclude name="xml/repr-action-test.cpp"/>
- <exclude name="xml/test-xml.cpp"/>
- <!--<exclude name="xml/test-xml-main.cpp"/>-->
- <exclude name="io/streamtest.cpp"/>
- <!--OVERLAP-->
- <exclude name="removeoverlap/placement_SolveVPSC.cpp"/>
- <exclude name="removeoverlap/placement_SolveVPSC.h"/>
- <exclude name="removeoverlap/test.cpp"/>
- <exclude name="removeoverlap/remove_rectangle_overlap-test.cpp"/>
- <exclude name="removeoverlap/remove_rectangle_overlap-test.h"/>
- </fileset>
- <excludeinc dir="${src}">
- <file name="extension/param"/>
- </excludeinc>
- <flags>
- -Wall -Wformat -Werror=format-security -Wextra -Wpointer-arith -Wcast-align -Wsign-compare -Wswitch
- -Werror=return-type
- <!-- -Werror -->
- <!-- A list of warnings that should not error *yet*, any help is welcome in fixing the code generating these warnings! -->
- <!-- libcroco is using guchar where it should use gchar, so we need: --> -Wno-error=pointer-sign
- -Wno-error=unused-parameter -Wno-error=unused-but-set-variable -Wno-error=strict-overflow -Wno-error=write-strings
- <!-- Format warnings are obviously bad errors, but with the current old compiler on Windows (gcc 4.6.) we run into a problem with long long ints...
- The errors can be restored by removing these flags after updating to a newer compiler (soon after 0.91 release hopefully) -->
- -Wno-error=format -Wno-error=format-extra-args
- -Wno-unused-local-typedefs <!-- triggers ton of warnings in (too old?) Boost with newer gcc -->
- -O2
- -mms-bitfields
- -fopenmp
- </flags>
- <cxxflags>
- -std=gnu++11 -DCPP11
- -Woverloaded-virtual
- <!-- -Wno-unused-local-typedefs -->
- -Wno-deprecated-declarations <!-- silcence warnings about usage of auto_ptr -->
- </cxxflags>
- <defines>
- -DVERSION=\"${version}\"
- -DHAVE_CONFIG_H
- -D_INTL_REDIRECT_INLINE
- -DHAVE_SSL
- -DRELAYTOOL_SSL="static const int libssl_is_present=1; static int __attribute__((unused)) libssl_symbol_is_present(char *s){ return 1; }" <!-- inkboard -->
- -DPOPPLER_NEW_GFXFONT <!-- poppler changed the api for 0.8.3 -->
- -DPOPPLER_NEW_GFXPATCH <!-- GfxPatch no longer uses GfxColor in >= 0.15.1 -->
- -DPOPPLER_NEW_ERRORAPI <!-- poppler changed the error api for 0.20.0 -->
- -DPOPPLER_EVEN_NEWER_COLOR_SPACE_API <!-- poppler changed the colorspace api for 0.26.0 -->
- -DPOPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API <!-- poppler changed the colorspace api for 0.29.0 -->
- <!-- GTK+3 migration -->
- -DGLIBMM_DISABLE_DEPRECATED
- -DG_DISABLE_DEPRECATED
- -DGTK_DISABLE_SINGLE_INCLUDES
- <!-- -DGTKMM_DISABLE_DEPRECATED -->
- <!-- -DGTK_DISABLE_DEPRECATED -->
- -DGDKMM_DISABLE_DEPRECATED
- -DGSEAL_ENABLE
- </defines>
- <includes>
- -I${devlibs}/include
- <!-- GTK / GTKMM -->
- ${pcc.gtkmm-3.0}
- ${pcc.gdkmm-3.0}
- ${pcc.gtk+-3.0}
- ${pcc.gdk-3.0}
- ${pcc.gdl-3.0}
- ${pcc.glibmm-2.4}
-
-
- ${pcc.pangomm-1.4}
- ${pcc.cairomm-1.0}
- <!-- OTHER -->
- ${pcc.Magick++}
- ${pcc.libxml-2.0}
- ${pcc.freetype2}
- ${pcc.cairo}
- ${pcc.poppler}
- -I${devlibs}/include/gc
- -I${devlibs}/include/potracelib
- ${pcc.libwpg-0.3} ${pcc.libvisio-0.1} ${pcc.libcdr-0.1}
- -I${cxxtest}
- <!-- PERL -->
- <!-- -Wno-comment -I${devlibs}/perl/lib/CORE -->
- <!-- PYTHON -->
- -I${devlibs}/python/include
- </includes>
- </cc>
- </target>
-
-
-
- <!--
- ########################################################################
- ## T A R G E T : I 1 8 N
- ########################################################################
- -->
- <target name="i18n" depends="compile"
- description="compile gettext .po files to .mo">
-
- <msgfmt todir="${build}/locale" owndir="true"
- out="LC_MESSAGES/inkscape.mo">
- <fileset dir="po">
- </fileset>
- </msgfmt>
- </target>
-
-
-
-
-
- <!--
- ########################################################################
- ## T A R G E T : L I N K
- ########################################################################
- -->
- <target name="link" depends="compile"
- description="link objects and library to create executable">
-
- <rc command="${archutil}windres"
- file="${src}/inkscape-x64.rc"
- out="${build}/obj/inkres.o">
- <flags>
- --include-dir=${src}
- </flags>
- </rc>
- <link command="${arch_link}" out="${build}/inkscape.exe"
- strip="true" symfile="${build}/inkscape.dbg"
- stripcommand="${archutil}strip"
- objcopycommand="${archutil}objcopy">
- <flags>
- -mwindows -m64
- -mthreads
- </flags>
- <fileset dir="${build}/obj">
- <exclude name="winconsole.o"/>
- <exclude name="inkview.o"/>
- <exclude name="inkviewres.o"/>
- <!-- CxxTest -->
- <exclude name="test-main.o"/>
- <exclude name="test-src.o"/>
- <exclude name="display/test-display.o"/>
- <exclude name="helper/test-helper.o"/>
- <exclude name="svg/test-svg.o"/>
- <exclude name="util/test-util.o"/>
- <exclude name="xml/test-xml.o"/>
- </fileset>
- <!-- WARNING: If you change these libraries, don't forget to change them for inkview and cxxtests below as well! -->
- <libs>
- -L${devlibs}/lib
- ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler}
- ${pcl.pangoft2} ${pcl.gthread-2.0}
- ${pcl.gtkmm-3.0} ${pcl.gdkmm-3.0}
- ${pcl.gtk+-3.0} ${pcl.gdk-3.0}
- ${pcl.gdl-3.0}
- ${devlibs}/bin/libxml2-2.dll
- ${devlibs}/bin/libxslt-1.dll
- ${devlibs}/bin/libexslt-0.dll
- ${pcl.cairo} ${pcl.cairomm-1.0}
- ${pcl.librevenge-stream-0.0} ${pcl.libwpg-0.3} ${pcl.libvisio-0.1} ${pcl.libcdr-0.1}
- ${pcl.glibmm-2.4}
-
-
- ${pcl.pangomm-1.4}
- ${pcl.cairomm-1.0}
- -liconv
- ${pcl.Magick++}
- ${pcl.fontconfig} ${pcl.freetype2}
- ${pcl.lcms2}
- ${pcl.gsl}
- -lpng -ljpeg -ltiff -lexif -lpopt -lz
- -lgc -lpotrace
- -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
- -lgomp -lwinpthread
- -laspell
- -lmscms <!-- required for color profiles -->
- </libs>
- </link>
- </target>
-
-<!--
- ########################################################################
- ## T A R G E T : L I N K C O N S O L E
- ########################################################################
- -->
- <target name="linkconsole" depends="compile"
- description="link console helper">
-
- <link command="${arch_link}" out="${build}/inkscape-console.exe"
- strip="true" stripcommand="${archutil}strip">
- <flags>
- -mconsole
- -mthreads
- </flags>
- <fileset dir="${build}">
- <include name="obj/winconsole.o"/>
- </fileset>
- <libs></libs>
- </link>
- </target>
-
- <!--
- ########################################################################
- ## T A R G E T : L I N K I N K V I E W
- ########################################################################
- -->
- <target name="linkinkview" depends="compile"
- description="link objects and library to create Inkview executable">
-
- <rc command="${archutil}windres"
- file="${src}/inkview-x64.rc"
- out="${build}/obj/inkviewres.o">
- <flags>
- --include-dir=${src}
- </flags>
- </rc>
- <link command="${arch_link}" out="${build}/inkview.exe"
- strip="true" symfile="${build}/inkview.dbg"
- stripcommand="${archutil}strip"
- objcopycommand="${archutil}objcopy">
- <flags>
- -mwindows -m64
- -mthreads
- </flags>
- <fileset dir="${build}/obj">
- <!-- exclude the other programs -->
- <exclude name="main.o"/>
- <exclude name="winmain.o"/>
- <exclude name="winconsole.o"/>
- <exclude name="inkres.o"/>
- <!-- CxxTest -->
- <exclude name="test-main.o"/>
- <exclude name="test-src.o"/>
- <exclude name="display/test-display.o"/>
- <exclude name="helper/test-helper.o"/>
- <exclude name="svg/test-svg.o"/>
- <exclude name="util/test-util.o"/>
- <exclude name="xml/test-xml.o"/>
- </fileset>
- <libs>
- -L${devlibs}/lib
- ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler}
- ${pcl.pangoft2} ${pcl.gthread-2.0}
- ${pcl.gtkmm-3.0} ${pcl.gdkmm-3.0}
- ${pcl.gtk+-3.0} ${pcl.gdk-3.0}
- ${pcl.gdl-3.0}
- ${devlibs}/bin/libxml2-2.dll
- ${devlibs}/bin/libxslt-1.dll
- ${devlibs}/bin/libexslt-0.dll
- ${pcl.cairo} ${pcl.cairomm-1.0}
- ${pcl.librevenge-stream-0.0} ${pcl.libwpg-0.3} ${pcl.libvisio-0.1} ${pcl.libcdr-0.1}
- ${pcl.glibmm-2.4}
-
-
- ${pcl.pangomm-1.4}
- ${pcl.cairomm-1.0}
- -liconv
- ${pcl.Magick++}
- ${pcl.fontconfig} ${pcl.freetype2}
- ${pcl.lcms2}
- ${pcl.gsl}
- -lpng -ljpeg -ltiff -lexif -lpopt -lz
- -lgc -lpotrace
- -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
- -lgomp -lwinpthread
- -laspell
- -lmscms <!-- required for color profiles -->
- </libs>
- </link>
- </target>
-
-
-
- <!--
- ########################################################################
- ## T A R G E T : L I N K C X X T E S T S
- ########################################################################
- -->
- <target name="linkcxxtests" depends="compile"
- description="link objects and library to create executable">
-
- <link command="${arch_link}" out="${build}/cxxtests.exe"
- strip="true" symfile="${build}/cxxtests.dbg"
- stripcommand="${archutil}strip"
- objcopycommand="${archutil}objcopy">
- <flags>
- -mconsole
- -mthreads
- </flags>
- <fileset dir="${build}/obj">
- <!-- exclude the other programs -->
- <exclude name="main.o"/>
- <exclude name="winmain.o"/>
- <exclude name="winconsole.o"/>
- <exclude name="inkres.o"/>
- <exclude name="inkviewres.o"/>
- <exclude name="inkview.o"/>
- </fileset>
- <libs>
- -L${devlibs}/lib
- ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler}
- ${pcl.pangoft2} ${pcl.gthread-2.0}
- ${pcl.gtkmm-3.0} ${pcl.gdkmm-3.0}
- ${pcl.gtk+-3.0} ${pcl.gdk-3.0}
- ${pcl.gdl-3.0}
- ${devlibs}/bin/libxml2-2.dll
- ${devlibs}/bin/libxslt-1.dll
- ${devlibs}/bin/libexslt-0.dll
- ${pcl.cairo} ${pcl.cairomm-1.0}
- ${pcl.librevenge-stream-0.0} ${pcl.libwpg-0.3} ${pcl.libvisio-0.1} ${pcl.libcdr-0.1}
- ${pcl.glibmm-2.4}
-
-
- ${pcl.pangomm-1.4}
- ${pcl.cairomm-1.0}
- -liconv
- ${pcl.Magick++}
- ${pcl.fontconfig} ${pcl.freetype2}
- ${pcl.lcms2}
- ${pcl.gsl}
- -lpng -ljpeg -ltiff -lexif -lpopt -lz
- -lgc -lpotrace
- -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
- -lgomp -lwinpthread
- -laspell
- -lmscms <!-- required for color profiles -->
- </libs>
- </link>
- </target>
-
-
- <!--
- ########################################################################
- ## T A R G E T : D I S T B A S E
- ########################################################################
- -->
- <target name="distbase" depends="i18n"
- description="generate the distribution directory with all needed files">
-
- <!-- Create the distribution directory -->
- <copy todir="${dist}" file="AUTHORS"/>
- <copy todir="${dist}" file="COPYING"/>
- <copy todir="${dist}" file="GPL2.txt"/>
- <copy todir="${dist}" file="GPL3.txt"/>
- <copy todir="${dist}" file="LGPL2.1.txt"/>
- <copy todir="${dist}" file="NEWS"/>
- <copy todir="${dist}" file="README"/>
- <copy todir="${dist}" file="TRANSLATORS"/>
- <copy todir="${dist}" file="${devlibs}/bin/libatkmm-1.6-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libglibmm-2.4-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgiomm-2.4-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgtkmm-3.0-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgdkmm-3.0-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgdl-3-5.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpangomm-1.4-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libcairomm-1.0-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libcairo-gobject-2.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libsigc-2.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libfreetype-6.dll"/>
-
- <copy todir="${dist}" file="${devlibs}/bin/libffi-6.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgc-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgsl-19.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgslcblas-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libharfbuzz-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/liblzma-5.dll"/>
-
- <copy todir="${dist}" file="${devlibs}/bin/libaspell-15.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libatk-1.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgdk-3-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgdk_pixbuf-2.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libglib-2.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgmodule-2.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgobject-2.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgtk-3-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgthread-2.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgio-2.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libcairo-2.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpixman-1-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpoppler-58.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpoppler-glib-8.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpangocairo-1.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpango-1.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpangoft2-1.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpangowin32-1.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libfontconfig-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libxml2-2.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libxslt-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libexslt-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libexpat-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libepoxy-0.dll"/>
-
- <copy todir="${dist}" file="${devlibs}/bin/librevenge-0.0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/librevenge-stream-0.0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libwpg-0.3.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libwpd-0.10.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libvisio-0.1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libcdr-0.1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/icuin56.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/icudt56.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/icuuc56.dll"/>
-
- <copy todir="${dist}" file="${devlibs}/bin/libjpeg-9.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpng16-16.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libtiff-5.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libexif-12.dll"/>
-<!--
- <copy todir="${dist}" file="${devlibs}/bin/libopenjpeg-2.dll"/>
- -->
- <!-- <copy todir="${dist}" file="${devlibs}/bin/msvcr70.dll"/> -->
- <!-- <copy todir="${dist}" file="${devlibs}/bin/msvcr71.dll"/> -->
- <copy todir="${dist}" file="${devlibs}/bin/libcurl-4.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/zlib1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/bz2-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libiconv-2.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpopt-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/liblcms2-2.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libMagick++-6.Q16-6.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libMagickCore-6.Q16-2.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libMagickWand-6.Q16-2.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libintl-8.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpotrace-0.dll"/>
- <!-- MINGW support DLLs -->
- <copy todir="${dist}" file="${mingw_bin}/libstdc++-6.dll"/>
- <copy todir="${dist}" file="${mingw_bin}/libwinpthread-1.dll"/>
- <copy todir="${dist}" file="${mingw_bin}/libgcc_s_seh-1.dll"/>
- <!-- MINGW support DLLs needed for openmp support -->
- <copy todir="${dist}" file="${mingw_bin}/libgomp-1.dll"/>
-
- <!-- MSGFMT files -->
- <copy todir="${dist}">
- <fileset dir="${build}/locale">
- <exclude name=".*\.am"/>
- </fileset>
- </copy>
-
- <mkdir dir="${dist}/data"/>
- <mkdir dir="${dist}/locale"/>
- <mkdir dir="${dist}/modules"/>
- <mkdir dir="${dist}/plugins"/>
- <mkdir dir="${dist}/share/glib-2.0"/>
-
- <!-- GTK -->
- <copy todir="${dist}">
- <fileset dir="${devlibs}/etc">
- <exclude name="gtk-2.0/.*"/>
- </fileset>
- </copy>
- <copy todir="${dist}/share/icons"> <fileset dir="${devlibs}/share/icons/Adwaita" /> </copy>
-
- <copy todir="${dist}">
- <fileset dir="share">
- <exclude name="\.am$"/>
- <exclude name="\.in$"/>
- <exclude name="\.sh$"/>
- <exclude name="CMakeLists.txt"/>
- <exclude name="i18n.py"/>
- <exclude name="icons/hicolor/index.theme"/>
- </fileset>
- </copy>
- <delete dir="${dist}/share/icons/hicolor"/> <!-- Quick fix for the following problem: having the hicolor folder there with empty index file bugs booting inkscape... -->
- <copy todir="${dist}/share"> <fileset dir="${devlibs}/share/themes"/> </copy>
- <copy todir="${dist}/share"> <fileset dir="${devlibs}/share/icons"/> </copy>
- <copy todir="${dist}/share/glib-2.0"> <fileset dir="${devlibs}/share/glib-2.0/schemas"/> </copy>
- <copy todir="${dist}/lib">
- <fileset dir="${devlibs}/lib/gdk-pixbuf-2.0">
- <exclude name="\.la$"/>
- <exclude name="\.a$"/>
- </fileset>
- </copy>
-
- <!-- Poppler data files -->
- <copy todir="${dist}/share"> <fileset dir="${devlibs}/share/poppler"/> </copy>
-
- <!-- Locales for libraries (few should be needed) -->
- <copy todir="${dist}/share">
- <fileset dir="${devlibs}/share/locale">
- <include name="gtk30.mo"/>
- </fileset>
- </copy>
-
- <!-- Aspell dictionaries -->
- <copy todir="${dist}/lib"> <fileset dir="${devlibs}/lib/aspell-0.60"/> </copy>
-
- <!-- Necessary to run extensions on windows if it is not in the path -->
- <copy todir="${dist}" file="${devlibs}/bin/gspawn-win64-helper.exe"/>
- <copy todir="${dist}" file="${devlibs}/bin/gspawn-win64-helper-console.exe"/>
-
- <!-- PERL -->
- <copy todir="${dist}" file="${devlibs}/perl/bin/perl58.dll"/>
-
- <!-- PYTHON -->
- <copy todir="${dist}/python" file="${devlibs}/python/python.exe" />
- <copy todir="${dist}/python" file="${devlibs}/python/pythonw.exe"/>
- <copy todir="${dist}/python" file="${devlibs}/python/python27.dll"/>
- <copy todir="${dist}/python"> <fileset dir="${devlibs}/python/Lib"/> </copy>
- <copy todir="${dist}/python"> <fileset dir="${devlibs}/python/DLLs"/> </copy>
- <!-- <copy todir="${dist}/python"> <fileset dir="${devlibs}/python/Scripts"/> </copy> -->
-
- <!--<copy file="${devlibs}/share/themes/MS-Windows/gtk-2.0/gtkrc" todir="${dist}/etc/gtk-2.0"/>-->
- <makefile file="${dist}/etc/gtk-3.0/settings.ini">
-[Settings]
-#gtk-font-name = Tahoma 8
-#gtk-theme-name = Adwaita
-gtk-menu-images = true
- </makefile>
-
- </target>
-
-
- <!--
- ########################################################################
- ## T A R G E T : D I S T - I N K S C A P E
- ########################################################################
- -->
- <target name="dist-inkscape" depends="link,linkconsole,distbase"
- description="copy inkscape to the distribution directory">
-
- <!-- Create the distribution directory -->
- <copy todir="${dist}" file="${build}/inkscape.exe"/>
- <copy todir="${dist}" file="${build}/inkscape.dbg"/>
- <copy file="${build}/inkscape-console.exe" tofile="${dist}/inkscape.com"/>
- </target>
-
-
- <!--
- ########################################################################
- ## T A R G E T : D I S T - I N K V I E W
- ########################################################################
- -->
- <target name="dist-inkview" depends="linkinkview,distbase"
- description="copy inkview to the distribution directory">
-
- <!-- Create the distribution directory -->
- <copy todir="${dist}" file="${build}/inkview.exe"/>
- <copy todir="${dist}" file="${build}/inkview.dbg"/>
- </target>
-
-
- <!--
- ########################################################################
- ## T A R G E T : C H E C K
- ########################################################################
- -->
- <target name="check" depends="linkcxxtests,distbase"
- description="perform unit tests">
-
- <cxxtestrun command="${build}/cxxtests" workingdir="${dist}" />
- </target>
-
- <!--
- ########################################################################
- ## T A R G E T : D I S T - A L L
- ########################################################################
- -->
- <target name="dist-all" depends="dist-inkscape,dist-inkview"
- description="generate the distribution, along with inkview" >
- </target>
-
-
-
-
- <!--
- ########################################################################
- ## T A R G E T : D I S T - A L L - C H E C K
- ########################################################################
- -->
- <target name="dist-all-check" depends="dist-all,check"
- description="generate the distribution, along with inkview and run cxxtests" >
- </target>
-
-
-
-
-
- <!--
- ########################################################################
- ## T A R G E T : C L E A N
- ########################################################################
- -->
- <target name="clean"
- description="clean up. deleting build and distro dirs" >
-
- <delete dir="${build}"/>
- <delete dir="${dist}"/>
- <delete file="build.dep"/>
- <delete file="config.h"/>
- <delete file="${src}/inkscape-version.cpp"/>
- <delete file="${src}/test-main.cpp"/>
- <delete file="${src}/test-src.cpp"/>
- <delete file="${src}/display/test-display.cpp"/>
- <delete file="${src}/helper/test-helper.cpp"/>
- <delete file="${src}/svg/test-svg.cpp"/>
- <delete file="${src}/util/test-util.cpp"/>
- <delete file="${src}/xml/test-xml.cpp"/>
-
- </target>
-
-
-
-</project>
-<!--
-########################################################################
-## E N D
-########################################################################
--->
-
diff --git a/build-x64.xml b/build-x64.xml
deleted file mode 100644
index 1781f99ab..000000000
--- a/build-x64.xml
+++ /dev/null
@@ -1,929 +0,0 @@
-<!--
- * Inkscape build file.
- *
- * See buildtool.cpp for use.
- *
- * Authors:
- * Bob Jamison
- * Others
- *
- * Copyright (C) 2006-2008 Inkscape.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--->
-
-
-
-<!--
-########################################################################
-## P R O J E C T : I N K S C A P E
-########################################################################
--->
-<project name="Inkscape" default="dist-all" basedir=".">
- <description>
- Build file for the Inkscape SVG editor. This file
- was written for GTK-2.10 on Win32, but it should work
- well for other types of builds with only minor adjustments.
- Note that the default target is 'dist-all'. You can execute other
- targets instead, by "btool {target}", like "btool compile", if
- you want to save time, or "dist-inkscape" if you don't want inkview.
- </description>
-
- <!-- set global properties for this build -->
- <property name="version" value="0.92pre1_64bit"/>
- <property name="src" location="src"/>
- <property name="lib" location="lib"/>
- <property name="build" location="build"/>
- <property name="dist" location="inkscape"/>
-
- <!-- Use these settings for the native compiler -->
- <!-- -->
- <property name="arch" value="x86_64-w64-mingw32-"/>
- <property name="arch_cc" value="${arch}gcc"/>
- <property name="arch_cxx" value="${arch}g++"/>
- <property name="arch_link" value="${arch}g++"/>
- <property name="archutil" value=""/>
- <property name="devlibs" location="${env.DEVLIBS_PATH}"/>
- <property name="mingw" location="${env.MINGW_PATH}"/>
- <property name="mingw_bin" location="${env.MINGW_PATH}/bin"/>
- <property name="cxxtest" location="cxxtest"/>
- <property name="python" location="${devlibs}/python/python.exe"/>
- <!-- -->
-
- <!-- Use these settings for the cross compiler -->
- <!--
- <property name="arch" value="i686-pc-mingw32-"/>
- <property name="arch_cc" value="${arch}gcc"/>
- <property name="arch_cxx" value="${arch}g++"/>
- <property name="arch_link" value="${arch}g++"/>
- <property name="archutil" value="${arch}"/>
- <property name="devlibs" location="/target"/>
- <property name="mingw_bin" location="${env.MINGW_BIN}"/>
- <property name="cxxtest" location="cxxtest"/>
- <property name="python" location="python"/>
- -->
-
- <!-- Extra properties -->
- <property name="refresh" value="false"/>
-
- <!--
- This is for package-config. With these two settings, pkg-config
- queries can be as simple as ${pcc.packageName} for cflags, and
- ${pcl.packageName} for libs. Dependencies are calculated automatically.
- -->
- <property name="pkg-config-path" location="${devlibs}/lib/pkgconfig"/>
- <property name="pkg-config-prefix" location="${devlibs}"/>
-
-
- <!--
- ########################################################################
- ## T A R G E T : I N I T
- ########################################################################
- -->
- <target name="init"
- description=
- "Do all preparatory tasks, like make directories and copy files">
-
-
- <mkdir dir="${build}"/>
- <mkdir dir="${dist}"/>
-
- <copy file="${src}/helper/sp-marshal.h.mingw"
- tofile="${src}/helper/sp-marshal.h"/>
- <copy file="${src}/helper/sp-marshal.cpp.mingw"
- tofile="${src}/helper/sp-marshal.cpp"/>
-
- <!--makefile file="${src}/inkscape-version.cpp">
- namespace Inkscape {
- char const *version_string = "${version}";
- }
- </makefile-->
- <makefile file="${src}/inkscape-version.cpp" force="true">
- namespace Inkscape {
- char const *version_string = "${version} ${bzr.revision}";
- }
- </makefile>
- <makefile file="config.h">
- #ifndef _CONFIG_H_
- #define _CONFIG_H_
-
- #ifndef WIN32
- #define WIN32
- #endif
-
- /*######################################
- ## This is for require-config.h, whose
- ## purpose I cannot fathom.
- ######################################*/
-
- #define PACKAGE_TARNAME
-
- /*######################################
- #### RESOURCE DIRECTORIES
- ######################################*/
-
- #define INKSCAPE_DATADIR "."
- #define PACKAGE_LOCALE_DIR "locale"
-
-
- /*######################################
- #### OTHER DEFINITIONS
- ######################################*/
-
- #define GETTEXT_PACKAGE "inkscape"
-
- #define PACKAGE_STRING VERSION
-
- #define HAVE_GETOPT_H 1
- #define HAVE_STRING_H 1
- #define HAVE_LIBINTL_H 1
- #define HAVE_MALLOC_H 1
- #define HAVE_STDLIB_H 1
- #define HAVE_SYS_STAT_H 1
- #define HAVE_INTTYPES_H 1
- #define HAVE_OPENMP 1
- #define HAVE_TR1_UNORDERED_SET 1
- #define HAVE_STDINT_H 1
-
- #define HAVE_LIBLCMS2 1
-
- #define WITH_GTKMM_2_24 1
-
- #define ENABLE_NLS 1
- #define HAVE_BIND_TEXTDOMAIN_CODESET 1
-
- /* keep binreloc off */
- #define BR_PTHREADS 0
- #undef ENABLE_BINRELOC
-
- /* CairoPDF options */
- #define HAVE_CAIRO_PDF 1
- #define PANGO_ENABLE_ENGINE 1
- #define RENDER_WITH_PANGO_CAIRO 1
-
- #define HAVE_GTK_WINDOW_FULLSCREEN 1
-
- /* internal interpreter */
- #define WITH_PYTHON 1
-
- /* use poppler for pdf import? */
- #define HAVE_POPPLER 1
- #define HAVE_POPPLER_GLIB 1
- #define HAVE_POPPLER_CAIRO 1
-
- /* do we want bitmap manipulation? */
- #define WITH_IMAGE_MAGICK 1
-
- /* Exif and JPEG support for image resolution import */
- #define HAVE_EXIF 1
- #define HAVE_JPEG 1
-
- /* WordPerfect import filter */
- #define WITH_LIBWPG 1
- #define WITH_LIBWPG03 1
-
- /* Visio import filter */
- #define WITH_LIBVISIO 1
- #define WITH_LIBVISIO01 1
-
- /* Corel Draw import filter */
- #define WITH_LIBCDR 1
- #define WITH_LIBCDR01 1
-
- /* Do we support SVG Fonts? */
- #define ENABLE_SVG_FONTS 1
-
- /* Do we want experimental, unsupported, unguaranteed, etc., LivePathEffects enabled? */
- //#define LPE_ENABLE_TEST_EFFECTS 1
-
- /* Do we want experimental, unsupported, unguaranteed, etc., SVG2 features enabled? */
- //#define WITH_SVG2 1
- //#define WITH_CSSCOMPOSITE 1
- //#define WITH_CSSBLEND 1
- //#define WITH_MESH 1
-
- #define HAVE_ASPELL 1
-
- #define HAVE_POTRACE 1
-
- #endif /* _CONFIG_H_ */
- </makefile>
- </target>
-
- <!--
- ########################################################################
- ## T A R G E T : C X X T E S T
- ########################################################################
- -->
- <target name="cxxtest" depends="init"
- description="generate test files" >
-
- <!-- Generate CxxTest files -->
- <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
- out="${src}/test-src.cpp">
- <fileset dir="${src}">
- <include name="attributes-test.h"/>
- <include name="color-profile-test.h"/>
- <include name="dir-util-test.h"/>
- <include name="extract-uri-test.h"/>
- <include name="marker-test.h"/>
- <include name="mod360-test.h"/>
- <include name="object-test.h"/>
- <include name="preferences-test.h"/>
- <include name="round-test.h"/>
- <include name="sp-gradient-test.h"/>
- <include name="sp-style-elem-test.h"/>
- <include name="syle-test.h"/>
- <include name="test-helpers.h"/>
- <include name="verbs-test.h"/>
- </fileset>
- </cxxtestpart>
- <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
- out="${src}/display/test-display.cpp">
- <fileset dir="${src}/display">
- <include name="curve-test.h"/>
- </fileset>
- </cxxtestpart>
- <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
- out="${src}/helper/test-helper.cpp">
- <fileset dir="${src}/helper">
- <include name="units-test.h"/>
- </fileset>
- </cxxtestpart>
- <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
- out="${src}/svg/test-svg.cpp">
- <fileset dir="${src}/svg">
- <!--<include name="css-ostringstream-test.h"/>-->
- <include name="stringstream-test.h"/>
- <include name="svg-affine-test.h"/>
- <include name="svg-color-test.h"/>
- <include name="svg-length-test.h"/>
- <include name="svg-path-geom-test.h"/>
- </fileset>
- </cxxtestpart>
- <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
- out="${src}/util/test-util.cpp">
- <fileset dir="${src}/util">
- <include name="list-container-test.h"/>
- </fileset>
- </cxxtestpart>
- <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
- out="${src}/xml/test-xml.cpp">
- <fileset dir="${src}/xml">
- <include name="repr-action-test.h"/>
- <include name="quote-test.h"/>
- </fileset>
- </cxxtestpart>
- <cxxtestroot command="${python} ${cxxtest}/cxxtestgen.py"
- out="${src}/test-main.cpp"
- template="${src}/cxxtest-template.tpl">
- <fileset dir="${src}">
- <include name="MultiPrinter.h"/>
- <include name="PylogFormatter.h"/>
- <include name="TRPIFormatter.h"/>
- </fileset>
- </cxxtestroot>
- </target>
-
-
- <!--
- ########################################################################
- ## T A R G E T : C O M P I L E
- ########################################################################
- -->
- <target name="compile" depends="cxxtest"
- description="compile the source to .o" >
-
- <!-- Compile from source to build -->
- <cc cc="${arch_cc}" cxx="${arch_cxx}"
- destdir="${build}/obj"
- continueOnError="true"
- refreshCache="${refresh}">
- <fileset dir="${src}">
- <!-- THINGS TO EXCLUDE -->
- <exclude name="ast/.*"/>
- <exclude name="bonobo/.*"/>
- <exclude name="deptool.cpp"/>
- <exclude name="cxxtests.cpp"/>
- <!--<exclude name="test-main.cpp"/>-->
- <!--<exclude name="test-src.cpp"/>-->
- <exclude name="display/test-display.cpp"/>
- <exclude name="display/testnr.cpp"/>
- <exclude name="extension/api.cpp"/>
- <exclude name="extension/dbus/.*"/>
- <exclude name="extension/dxf2svg/.*"/>
- <exclude name="extension/implementation/plugin.cpp"/>
- <exclude name="extension/plugins/.*"/>
- <exclude name="extract-uri-test.cpp"/>
- <exclude name="helper/units-test.cpp"/>
- <!-- exclude name="inkview.cpp"/-->
- <exclude name="livarot/Path-test.cpp"/>
- <exclude name="mod360-test.cpp"/>
- <exclude name="trace/potrace/potest.cpp"/>
- <exclude name="round-test.cpp"/>
- <exclude name="sp-gradient-test.cpp"/>
- <exclude name="style-test.cpp"/>
- <exclude name="svg/ftos.cpp"/>
- <!--<exclude name="svg/test-svg.cpp"/>-->
- <exclude name="svg/test-svg-main.cpp"/>
- <exclude name="util/list-container-test.cpp"/>
- <exclude name="widgets/test-widgets.cpp"/>
- <exclude name="widgets/image-menu-item.c"/>
- <exclude name="xml/quote-test.cpp"/>
- <exclude name="xml/repr-action-test.cpp"/>
- <exclude name="xml/test-xml.cpp"/>
- <!--<exclude name="xml/test-xml-main.cpp"/>-->
- <exclude name="io/streamtest.cpp"/>
- <!--OVERLAP-->
- <exclude name="removeoverlap/placement_SolveVPSC.cpp"/>
- <exclude name="removeoverlap/placement_SolveVPSC.h"/>
- <exclude name="removeoverlap/test.cpp"/>
- <exclude name="removeoverlap/remove_rectangle_overlap-test.cpp"/>
- <exclude name="removeoverlap/remove_rectangle_overlap-test.h"/>
- </fileset>
- <excludeinc dir="${src}">
- <file name="extension/param"/>
- </excludeinc>
- <flags>
- -Wall -Wformat -Werror=format-security -Wextra -Wpointer-arith -Wcast-align -Wsign-compare -Wswitch
- -Werror=return-type
- <!-- -Werror -->
- <!-- A list of warnings that should not error *yet*, any help is welcome in fixing the code generating these warnings! -->
- <!-- libcroco is using guchar where it should use gchar, so we need: --> -Wno-error=pointer-sign
- -Wno-error=unused-parameter -Wno-error=unused-but-set-variable -Wno-error=strict-overflow -Wno-error=write-strings
- <!-- Format warnings are obviously bad errors, but with the current old compiler on Windows (gcc 4.6.) we run into a problem with long long ints...
- The errors can be restored by removing these flags after updating to a newer compiler (soon after 0.91 release hopefully) -->
- -Wno-error=format -Wno-error=format-extra-args
- -Wno-unused-local-typedefs <!-- triggers ton of warnings in (too old?) Boost with newer gcc -->
- -O2
- -mms-bitfields
- -fopenmp
- </flags>
- <cxxflags>
- -std=gnu++11 -DCPP11
- -Woverloaded-virtual
- <!-- -Wno-unused-local-typedefs -->
- -Wno-deprecated-declarations <!-- silcence warnings about usage of auto_ptr -->
- </cxxflags>
- <defines>
- -DVERSION=\"${version}\"
- -DHAVE_CONFIG_H
- -D_INTL_REDIRECT_INLINE
- -DHAVE_SSL
- -DRELAYTOOL_SSL="static const int libssl_is_present=1; static int __attribute__((unused)) libssl_symbol_is_present(char *s){ return 1; }" <!-- inkboard -->
- -DPOPPLER_NEW_GFXFONT <!-- poppler changed the api for 0.8.3 -->
- -DPOPPLER_NEW_GFXPATCH <!-- GfxPatch no longer uses GfxColor in >= 0.15.1 -->
- -DPOPPLER_NEW_ERRORAPI <!-- poppler changed the error api for 0.20.0 -->
- -DPOPPLER_EVEN_NEWER_COLOR_SPACE_API <!-- poppler changed the colorspace api for 0.26.0 -->
- -DPOPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API <!-- poppler changed the colorspace api for 0.29.0 -->
- <!-- GTK+3 migration -->
- -DGLIBMM_DISABLE_DEPRECATED
- -DG_DISABLE_DEPRECATED
- -DGTK_DISABLE_SINGLE_INCLUDES
- <!-- -DGTKMM_DISABLE_DEPRECATED -->
- <!-- -DGTK_DISABLE_DEPRECATED -->
- -DGDKMM_DISABLE_DEPRECATED
- -DGSEAL_ENABLE
- </defines>
- <includes>
- -I${devlibs}/include
- <!-- GTK / GTKMM -->
- ${pcc.gtkmm-2.4}
- ${pcc.glibmm-2.4}
- ${pcc.gtk+-2.0}
- ${pcc.gdkmm-2.4}
- ${pcc.pangomm-1.4}
- ${pcc.cairomm-1.0}
- ${pcc.gmodule-2.0}
- <!-- OTHER -->
- ${pcc.Magick++}
- ${pcc.libxml-2.0}
- ${pcc.freetype2}
- ${pcc.cairo}
- ${pcc.poppler}
- -I${devlibs}/include/gc
- -I${devlibs}/include/potracelib
- ${pcc.libwpg-0.3} ${pcc.libvisio-0.1} ${pcc.libcdr-0.1}
- -I${cxxtest}
- <!-- PERL -->
- <!-- -Wno-comment -I${devlibs}/perl/lib/CORE -->
- <!-- PYTHON -->
- -I${devlibs}/python/include
- </includes>
- </cc>
- </target>
-
-
-
- <!--
- ########################################################################
- ## T A R G E T : I 1 8 N
- ########################################################################
- -->
- <target name="i18n" depends="compile"
- description="compile gettext .po files to .mo">
-
- <msgfmt todir="${build}/locale" owndir="true"
- out="LC_MESSAGES/inkscape.mo">
- <fileset dir="po">
- </fileset>
- </msgfmt>
- </target>
-
-
-
-
-
- <!--
- ########################################################################
- ## T A R G E T : L I N K
- ########################################################################
- -->
- <target name="link" depends="compile"
- description="link objects and library to create executable">
-
- <rc command="${archutil}windres"
- file="${src}/inkscape-x64.rc"
- out="${build}/obj/inkres.o">
- <flags>
- --include-dir=${src}
- </flags>
- </rc>
- <link command="${arch_link}" out="${build}/inkscape.exe"
- strip="true" symfile="${build}/inkscape.dbg"
- stripcommand="${archutil}strip"
- objcopycommand="${archutil}objcopy">
- <flags>
- -mwindows -m64
- -mthreads
- </flags>
- <fileset dir="${build}/obj">
- <exclude name="winconsole.o"/>
- <exclude name="inkview.o"/>
- <exclude name="inkviewres.o"/>
- <!-- CxxTest -->
- <exclude name="test-main.o"/>
- <exclude name="test-src.o"/>
- <exclude name="display/test-display.o"/>
- <exclude name="helper/test-helper.o"/>
- <exclude name="svg/test-svg.o"/>
- <exclude name="util/test-util.o"/>
- <exclude name="xml/test-xml.o"/>
- </fileset>
- <!-- WARNING: If you change these libraries, don't forget to change them for inkview and cxxtests below as well! -->
- <libs>
- -L${devlibs}/lib
- ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler}
- ${pcl.gtkmm-2.4} ${pcl.pangoft2} ${pcl.gthread-2.0}
- ${devlibs}/bin/libxml2-2.dll
- ${devlibs}/bin/libxslt-1.dll
- ${devlibs}/bin/libexslt-0.dll
- ${pcl.cairo} ${pcl.cairomm-1.0}
- ${pcl.librevenge-stream-0.0} ${pcl.libwpg-0.3} ${pcl.libvisio-0.1} ${pcl.libcdr-0.1}
- ${pcl.gmodule-2.0}
- ${pcl.glibmm-2.4}
- ${pcl.gtk+-2.0}
- ${pcl.gdkmm-2.4}
- ${pcl.pangomm-1.4}
- ${pcl.cairomm-1.0}
- -liconv
- ${pcl.Magick++}
- ${pcl.fontconfig} ${pcl.freetype2}
- ${pcl.lcms2}
- ${pcl.gsl}
- -lpng -ljpeg -ltiff -lexif -lpopt -lz
- -lgc -lpotrace
- -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
- -lgomp -lwinpthread
- -laspell
- -lmscms <!-- required for color profiles -->
- </libs>
- </link>
- </target>
-
-<!--
- ########################################################################
- ## T A R G E T : L I N K C O N S O L E
- ########################################################################
- -->
- <target name="linkconsole" depends="compile"
- description="link console helper">
-
- <link command="${arch_link}" out="${build}/inkscape-console.exe"
- strip="true" stripcommand="${archutil}strip">
- <flags>
- -mconsole
- -mthreads
- </flags>
- <fileset dir="${build}">
- <include name="obj/winconsole.o"/>
- </fileset>
- <libs></libs>
- </link>
- </target>
-
- <!--
- ########################################################################
- ## T A R G E T : L I N K I N K V I E W
- ########################################################################
- -->
- <target name="linkinkview" depends="compile"
- description="link objects and library to create Inkview executable">
-
- <rc command="${archutil}windres"
- file="${src}/inkview-x64.rc"
- out="${build}/obj/inkviewres.o">
- <flags>
- --include-dir=${src}
- </flags>
- </rc>
- <link command="${arch_link}" out="${build}/inkview.exe"
- strip="true" symfile="${build}/inkview.dbg"
- stripcommand="${archutil}strip"
- objcopycommand="${archutil}objcopy">
- <flags>
- -mwindows -m64
- -mthreads
- </flags>
- <fileset dir="${build}/obj">
- <!-- exclude the other programs -->
- <exclude name="main.o"/>
- <exclude name="winmain.o"/>
- <exclude name="winconsole.o"/>
- <exclude name="inkres.o"/>
- <!-- CxxTest -->
- <exclude name="test-main.o"/>
- <exclude name="test-src.o"/>
- <exclude name="display/test-display.o"/>
- <exclude name="helper/test-helper.o"/>
- <exclude name="svg/test-svg.o"/>
- <exclude name="util/test-util.o"/>
- <exclude name="xml/test-xml.o"/>
- </fileset>
- <libs>
- -L${devlibs}/lib
- ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler}
- ${pcl.gtkmm-2.4} ${pcl.pangoft2} ${pcl.gthread-2.0}
- ${devlibs}/bin/libxml2-2.dll
- ${devlibs}/bin/libxslt-1.dll
- ${devlibs}/bin/libexslt-0.dll
- ${pcl.cairo} ${pcl.cairomm-1.0}
- ${pcl.librevenge-stream-0.0} ${pcl.libwpg-0.3} ${pcl.libvisio-0.1} ${pcl.libcdr-0.1}
- ${pcl.gmodule-2.0}
- ${pcl.glibmm-2.4}
- ${pcl.gtk+-2.0}
- ${pcl.gdkmm-2.4}
- ${pcl.pangomm-1.4}
- ${pcl.cairomm-1.0}
- -liconv
- ${pcl.Magick++}
- ${pcl.fontconfig} ${pcl.freetype2}
- ${pcl.lcms2}
- ${pcl.gsl}
- -lpng -ljpeg -ltiff -lexif -lpopt -lz
- -lgc -lpotrace
- -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
- -lgomp -lwinpthread
- -laspell
- -lmscms <!-- required for color profiles -->
- </libs>
- </link>
- </target>
-
-
-
- <!--
- ########################################################################
- ## T A R G E T : L I N K C X X T E S T S
- ########################################################################
- -->
- <target name="linkcxxtests" depends="compile"
- description="link objects and library to create executable">
-
- <link command="${arch_link}" out="${build}/cxxtests.exe"
- strip="true" symfile="${build}/cxxtests.dbg"
- stripcommand="${archutil}strip"
- objcopycommand="${archutil}objcopy">
- <flags>
- -mconsole
- -mthreads
- </flags>
- <fileset dir="${build}/obj">
- <!-- exclude the other programs -->
- <exclude name="main.o"/>
- <exclude name="winmain.o"/>
- <exclude name="winconsole.o"/>
- <exclude name="inkres.o"/>
- <exclude name="inkviewres.o"/>
- <exclude name="inkview.o"/>
- </fileset>
- <libs>
- -L${devlibs}/lib
- ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler}
- ${pcl.gtkmm-2.4} ${pcl.pangoft2} ${pcl.gthread-2.0}
- ${pcl.gmodule-2.0}
- ${devlibs}/bin/libxml2-2.dll
- ${devlibs}/bin/libxslt-1.dll
- ${devlibs}/bin/libexslt-0.dll
- ${pcl.cairo} ${pcl.cairomm-1.0}
- ${pcl.librevenge-stream-0.0} ${pcl.libwpg-0.3} ${pcl.libvisio-0.1} ${pcl.libcdr-0.1}
- ${pcl.glibmm-2.4}
- ${pcl.gtk+-2.0}
- ${pcl.gdkmm-2.4}
- ${pcl.pangomm-1.4}
- ${pcl.cairomm-1.0}
- -liconv
- ${pcl.Magick++}
- ${pcl.fontconfig} ${pcl.freetype2}
- ${pcl.lcms2}
- ${pcl.gsl}
- -lpng -ljpeg -ltiff -lexif -lpopt -lz
- -lgc -lpotrace
- -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
- -lgomp -lwinpthread
- -laspell
- -lmscms <!-- required for color profiles -->
- </libs>
- </link>
- </target>
-
-
- <!--
- ########################################################################
- ## T A R G E T : D I S T B A S E
- ########################################################################
- -->
- <target name="distbase" depends="i18n"
- description="generate the distribution directory with all needed files">
-
- <!-- Create the distribution directory -->
- <copy todir="${dist}" file="AUTHORS"/>
- <copy todir="${dist}" file="COPYING"/>
- <copy todir="${dist}" file="GPL2.txt"/>
- <copy todir="${dist}" file="GPL3.txt"/>
- <copy todir="${dist}" file="LGPL2.1.txt"/>
- <copy todir="${dist}" file="NEWS"/>
- <copy todir="${dist}" file="README"/>
- <copy todir="${dist}" file="TRANSLATORS"/>
- <copy todir="${dist}" file="${devlibs}/bin/libatkmm-1.6-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libglibmm-2.4-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgiomm-2.4-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgtkmm-2.4-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgdkmm-2.4-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpangomm-1.4-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libcairomm-1.0-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libsigc-2.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libfreetype-6.dll"/>
-
- <copy todir="${dist}" file="${devlibs}/bin/libffi-6.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgc-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgsl-19.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgslcblas-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libharfbuzz-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/liblzma-5.dll"/>
-
- <copy todir="${dist}" file="${devlibs}/bin/libaspell-15.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libatk-1.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgdk-win32-2.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgdk_pixbuf-2.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libglib-2.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgmodule-2.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgobject-2.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgtk-win32-2.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgthread-2.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgio-2.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libcairo-2.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpixman-1-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpoppler-58.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpoppler-glib-8.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpangocairo-1.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpango-1.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpangoft2-1.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpangowin32-1.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libfontconfig-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libxml2-2.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libxslt-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libexslt-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libexpat-1.dll"/>
-
- <copy todir="${dist}" file="${devlibs}/bin/librevenge-0.0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/librevenge-stream-0.0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libwpg-0.3.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libwpd-0.10.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libvisio-0.1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libcdr-0.1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/icuin56.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/icudt56.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/icuuc56.dll"/>
-
- <copy todir="${dist}" file="${devlibs}/bin/libjpeg-9.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpng16-16.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libtiff-5.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libexif-12.dll"/>
-<!--
- <copy todir="${dist}" file="${devlibs}/bin/libopenjpeg-2.dll"/>
- -->
- <!-- <copy todir="${dist}" file="${devlibs}/bin/msvcr70.dll"/> -->
- <!-- <copy todir="${dist}" file="${devlibs}/bin/msvcr71.dll"/> -->
- <copy todir="${dist}" file="${devlibs}/bin/libcurl-4.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/zlib1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/bz2-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libiconv-2.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpopt-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/liblcms2-2.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libMagick++-6.Q16-6.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libMagickCore-6.Q16-2.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libMagickWand-6.Q16-2.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libintl-8.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpotrace-0.dll"/>
- <!-- MINGW support DLLs -->
- <copy todir="${dist}" file="${mingw_bin}/libstdc++-6.dll"/>
- <copy todir="${dist}" file="${mingw_bin}/libwinpthread-1.dll"/>
- <copy todir="${dist}" file="${mingw_bin}/libgcc_s_seh-1.dll"/>
- <!-- MINGW support DLLs needed for openmp support -->
- <copy todir="${dist}" file="${mingw_bin}/libgomp-1.dll"/>
-
- <!-- MSGFMT files -->
- <copy todir="${dist}">
- <fileset dir="${build}/locale">
- <exclude name=".*\.am"/>
- </fileset>
- </copy>
-
- <mkdir dir="${dist}/data"/>
- <mkdir dir="${dist}/locale"/>
- <mkdir dir="${dist}/modules"/>
- <mkdir dir="${dist}/plugins"/>
-
- <!-- GTK -->
- <copy todir="${dist}">
- <fileset dir="${devlibs}/etc">
- <exclude name="gtk-3.0/.*"/>
- </fileset>
- </copy>
- <copy todir="${dist}/lib">
- <fileset dir="${devlibs}/lib/gtk-2.0">
- <exclude name="\.la$"/>
- <exclude name="\.a$"/>
- <exclude name="include/"/>
- </fileset>
- </copy>
- <!-- <copy todir="${dist}/lib"> <fileset dir="${devlibs}/lib/glib-2.0"/> </copy> -->
- <copy todir="${dist}">
- <fileset dir="share">
- <exclude name="\.am$"/>
- <exclude name="\.in$"/>
- <exclude name="\.sh$"/>
- <exclude name="CMakeLists.txt"/>
- <exclude name="i18n.py"/>
- </fileset>
- </copy>
- <delete dir="${dist}/share/icons/hicolor"/> <!-- Quick fix for the following problem: having the hicolor folder there with empty index file bugs booting inkscape... -->
- <copy todir="${dist}/share"> <fileset dir="${devlibs}/share/themes"/> </copy>
- <copy todir="${dist}/lib">
- <fileset dir="${devlibs}/lib/gdk-pixbuf-2.0">
- <exclude name="\.la$"/>
- <exclude name="\.a$"/>
- </fileset>
- </copy>
-
- <!-- Poppler data files -->
- <copy todir="${dist}/share"> <fileset dir="${devlibs}/share/poppler"/> </copy>
-
- <!-- Locales for libraries (few should be needed) -->
- <copy todir="${dist}/share">
- <fileset dir="${devlibs}/share/locale">
- <include name="gtk20.mo"/>
- </fileset>
- </copy>
-
- <!-- Aspell dictionaries -->
- <copy todir="${dist}/lib"> <fileset dir="${devlibs}/lib/aspell-0.60"/> </copy>
-
- <!-- Necessary to run extensions on windows if it is not in the path -->
- <copy todir="${dist}" file="${devlibs}/bin/gspawn-win64-helper.exe"/>
- <copy todir="${dist}" file="${devlibs}/bin/gspawn-win64-helper-console.exe"/>
-
- <!-- PERL -->
- <copy todir="${dist}" file="${devlibs}/perl/bin/perl58.dll"/>
-
- <!-- PYTHON -->
- <copy todir="${dist}/python" file="${devlibs}/python/python.exe" />
- <copy todir="${dist}/python" file="${devlibs}/python/pythonw.exe"/>
- <copy todir="${dist}/python" file="${devlibs}/python/python27.dll"/>
- <copy todir="${dist}/python"> <fileset dir="${devlibs}/python/Lib"/> </copy>
- <copy todir="${dist}/python"> <fileset dir="${devlibs}/python/DLLs"/> </copy>
- <!-- <copy todir="${dist}/python"> <fileset dir="${devlibs}/python/Scripts"/> </copy> -->
-
- </target>
-
-
- <!--
- ########################################################################
- ## T A R G E T : D I S T - I N K S C A P E
- ########################################################################
- -->
- <target name="dist-inkscape" depends="link,linkconsole,distbase"
- description="copy inkscape to the distribution directory">
-
- <!-- Create the distribution directory -->
- <copy todir="${dist}" file="${build}/inkscape.exe"/>
- <copy todir="${dist}" file="${build}/inkscape.dbg"/>
- <copy file="${build}/inkscape-console.exe" tofile="${dist}/inkscape.com"/>
- </target>
-
-
- <!--
- ########################################################################
- ## T A R G E T : D I S T - I N K V I E W
- ########################################################################
- -->
- <target name="dist-inkview" depends="linkinkview,distbase"
- description="copy inkview to the distribution directory">
-
- <!-- Create the distribution directory -->
- <copy todir="${dist}" file="${build}/inkview.exe"/>
- <copy todir="${dist}" file="${build}/inkview.dbg"/>
- </target>
-
-
- <!--
- ########################################################################
- ## T A R G E T : C H E C K
- ########################################################################
- -->
- <target name="check" depends="linkcxxtests,distbase"
- description="perform unit tests">
- <copy todir="${dist}" file="${build}/cxxtests.exe"/>
- <cxxtestrun command="${dist}/cxxtests" workingdir="${dist}" />
- </target>
-
- <!--
- ########################################################################
- ## T A R G E T : D I S T - A L L
- ########################################################################
- -->
- <target name="dist-all" depends="dist-inkscape,dist-inkview"
- description="generate the distribution, along with inkview" >
- </target>
-
-
-
-
- <!--
- ########################################################################
- ## T A R G E T : D I S T - A L L - C H E C K
- ########################################################################
- -->
- <target name="dist-all-check" depends="dist-all,check"
- description="generate the distribution, along with inkview and run cxxtests" >
- </target>
-
-
-
-
-
- <!--
- ########################################################################
- ## T A R G E T : C L E A N
- ########################################################################
- -->
- <target name="clean"
- description="clean up. deleting build and distro dirs" >
-
- <delete dir="${build}"/>
- <delete dir="${dist}"/>
- <delete file="build.dep"/>
- <delete file="config.h"/>
- <delete file="${src}/inkscape-version.cpp"/>
- <delete file="${src}/test-main.cpp"/>
- <delete file="${src}/test-src.cpp"/>
- <delete file="${src}/display/test-display.cpp"/>
- <delete file="${src}/helper/test-helper.cpp"/>
- <delete file="${src}/svg/test-svg.cpp"/>
- <delete file="${src}/util/test-util.cpp"/>
- <delete file="${src}/xml/test-xml.cpp"/>
-
- </target>
-
-
-
-</project>
-<!--
-########################################################################
-## E N D
-########################################################################
--->
-
diff --git a/build.xml b/build.xml
deleted file mode 100644
index 1e437d772..000000000
--- a/build.xml
+++ /dev/null
@@ -1,922 +0,0 @@
-<!--
- * Inkscape build file.
- *
- * See buildtool.cpp for use.
- *
- * Authors:
- * Bob Jamison
- * Others
- *
- * Copyright (C) 2006-2008 Inkscape.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--->
-
-
-
-<!--
-########################################################################
-## P R O J E C T : I N K S C A P E
-########################################################################
--->
-<project name="Inkscape" default="dist-all" basedir=".">
- <description>
- Build file for the Inkscape SVG editor. This file
- was written for GTK-2.10 on Win32, but it should work
- well for other types of builds with only minor adjustments.
- Note that the default target is 'dist-all'. You can execute other
- targets instead, by "btool {target}", like "btool compile", if
- you want to save time, or "dist-inkscape" if you don't want inkview.
- </description>
-
- <!-- set global properties for this build -->
- <property name="version" value="0.92pre1"/>
- <property name="src" location="src"/>
- <property name="lib" location="lib"/>
- <property name="build" location="build"/>
- <property name="dist" location="inkscape"/>
-
- <!-- Use these settings for the native compiler -->
- <!-- -->
- <property name="arch" value="mingw32-"/>
- <property name="arch_cc" value="${arch}gcc"/>
- <property name="arch_cxx" value="${arch}g++"/>
- <property name="arch_link" value="${arch}g++"/>
- <property name="archutil" value=""/>
- <property name="devlibs" location="${env.DEVLIBS_PATH}"/>
- <property name="mingw" location="${env.MINGW_PATH}"/>
- <property name="mingw_bin" location="${env.MINGW_PATH}/bin"/>
- <property name="cxxtest" location="cxxtest"/>
- <property name="python" location="${devlibs}/python/python.exe"/>
- <!-- -->
-
- <!-- Use these settings for the cross compiler -->
- <!--
- <property name="arch" value="i686-pc-mingw32-"/>
- <property name="arch_cc" value="${arch}gcc"/>
- <property name="arch_cxx" value="${arch}g++"/>
- <property name="arch_link" value="${arch}g++"/>
- <property name="archutil" value="${arch}"/>
- <property name="devlibs" location="/target"/>
- <property name="mingw_bin" location="${env.MINGW_BIN}"/>
- <property name="cxxtest" location="cxxtest"/>
- <property name="python" location="python"/>
- -->
-
- <!-- Extra properties -->
- <property name="refresh" value="false"/>
-
- <!--
- This is for package-config. With these two settings, pkg-config
- queries can be as simple as ${pcc.packageName} for cflags, and
- ${pcl.packageName} for libs. Dependencies are calculated automatically.
- -->
- <property name="pkg-config-path" location="${devlibs}/lib/pkgconfig"/>
- <property name="pkg-config-prefix" location="${devlibs}"/>
-
-
- <!--
- ########################################################################
- ## T A R G E T : I N I T
- ########################################################################
- -->
- <target name="init"
- description=
- "Do all preparatory tasks, like make directories and copy files">
-
-
- <mkdir dir="${build}"/>
- <mkdir dir="${dist}"/>
-
- <copy file="${src}/helper/sp-marshal.h.mingw"
- tofile="${src}/helper/sp-marshal.h"/>
- <copy file="${src}/helper/sp-marshal.cpp.mingw"
- tofile="${src}/helper/sp-marshal.cpp"/>
-
- <!--makefile file="${src}/inkscape-version.cpp">
- namespace Inkscape {
- char const *version_string = "${version}";
- }
- </makefile-->
- <makefile file="${src}/inkscape-version.cpp">
- namespace Inkscape {
- char const *version_string = "${version} ${bzr.revision}";
- }
- </makefile>
- <makefile file="config.h">
- #ifndef _CONFIG_H_
- #define _CONFIG_H_
-
- #ifndef WIN32
- #define WIN32
- #endif
-
- /*######################################
- ## This is for require-config.h, whose
- ## purpose I cannot fathom.
- ######################################*/
-
- #define PACKAGE_TARNAME
-
- /*######################################
- #### RESOURCE DIRECTORIES
- ######################################*/
-
- #define INKSCAPE_DATADIR "."
- #define PACKAGE_LOCALE_DIR "locale"
-
-
- /*######################################
- #### OTHER DEFINITIONS
- ######################################*/
-
- #define GETTEXT_PACKAGE "inkscape"
-
- #define PACKAGE_STRING VERSION
-
- #define HAVE_GETOPT_H 1
- #define HAVE_STRING_H 1
- #define HAVE_LIBINTL_H 1
- #define HAVE_MALLOC_H 1
- #define HAVE_STDLIB_H 1
- #define HAVE_SYS_STAT_H 1
- #define HAVE_INTTYPES_H 1
- #define HAVE_OPENMP 1
- #define HAVE_TR1_UNORDERED_SET 1
-
- #define HAVE_LIBLCMS2 1
-
- #define WITH_GTKMM_2_24 1
-
- #define ENABLE_NLS 1
- #define HAVE_BIND_TEXTDOMAIN_CODESET 1
-
- /* keep binreloc off */
- #define BR_PTHREADS 0
- #undef ENABLE_BINRELOC
-
- /* CairoPDF options */
- #define HAVE_CAIRO_PDF 1
- #define PANGO_ENABLE_ENGINE 1
- #define RENDER_WITH_PANGO_CAIRO 1
-
- #define HAVE_GTK_WINDOW_FULLSCREEN 1
-
- /* internal interpreter */
- #define WITH_PYTHON 1
-
- /* use poppler for pdf import? */
- #define HAVE_POPPLER 1
- #define HAVE_POPPLER_GLIB 1
- #define HAVE_POPPLER_CAIRO 1
-
- /* do we want bitmap manipulation? */
- #define WITH_IMAGE_MAGICK 1
-
- /* Exif and JPEG support for image resolution import */
- #define HAVE_EXIF 1
- #define HAVE_JPEG 1
-
- /* Allow reading WordPerfect? */
- #define WITH_LIBWPG 1
-
- /* Default to libwpg 0.2.x */
- #define WITH_LIBWPG02 1
-
- /* Visio import filter */
- #define WITH_LIBVISIO 1
- /* Librevenge based filter */
- #define WITH_LIBVISIO01 1
-
- /* Corel Draw import filter */
- #define WITH_LIBCDR 1
- /* Librevenge based filter */
- #define WITH_LIBCDR01 1
-
- /* Do we support SVG Fonts? */
- #define ENABLE_SVG_FONTS 1
-
- /* Do we want experimental, unsupported, unguaranteed, etc., LivePathEffects enabled? */
- //#define LPE_ENABLE_TEST_EFFECTS 1
-
- /* Do we want experimental, unsupported, unguaranteed, etc., SVG2 features enabled? */
- //#define WITH_SVG2 1
- //#define WITH_CSSCOMPOSITE 1
- //#define WITH_CSSBLEND 1
- //#define WITH_MESH 1
-
- #define HAVE_ASPELL 1
-
- #define HAVE_POTRACE 1
-
- #endif /* _CONFIG_H_ */
- </makefile>
- </target>
-
- <!--
- ########################################################################
- ## T A R G E T : C X X T E S T
- ########################################################################
- -->
- <target name="cxxtest" depends="init"
- description="generate test files" >
-
- <!-- Generate CxxTest files -->
- <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
- out="${src}/test-src.cpp">
- <fileset dir="${src}">
- <include name="attributes-test.h"/>
- <include name="color-profile-test.h"/>
- <include name="dir-util-test.h"/>
- <include name="extract-uri-test.h"/>
- <include name="marker-test.h"/>
- <include name="mod360-test.h"/>
- <include name="object-test.h"/>
- <include name="preferences-test.h"/>
- <include name="round-test.h"/>
- <include name="sp-gradient-test.h"/>
- <include name="sp-style-elem-test.h"/>
- <include name="syle-test.h"/>
- <include name="test-helpers.h"/>
- <include name="verbs-test.h"/>
- </fileset>
- </cxxtestpart>
- <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
- out="${src}/display/test-display.cpp">
- <fileset dir="${src}/display">
- <include name="curve-test.h"/>
- </fileset>
- </cxxtestpart>
- <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
- out="${src}/helper/test-helper.cpp">
- <fileset dir="${src}/helper">
- <include name="units-test.h"/>
- </fileset>
- </cxxtestpart>
- <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
- out="${src}/svg/test-svg.cpp">
- <fileset dir="${src}/svg">
- <!--<include name="css-ostringstream-test.h"/>-->
- <include name="stringstream-test.h"/>
- <include name="svg-affine-test.h"/>
- <include name="svg-color-test.h"/>
- <include name="svg-length-test.h"/>
- <include name="svg-path-geom-test.h"/>
- </fileset>
- </cxxtestpart>
- <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
- out="${src}/util/test-util.cpp">
- <fileset dir="${src}/util">
- <include name="list-container-test.h"/>
- </fileset>
- </cxxtestpart>
- <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
- out="${src}/xml/test-xml.cpp">
- <fileset dir="${src}/xml">
- <include name="repr-action-test.h"/>
- <include name="quote-test.h"/>
- </fileset>
- </cxxtestpart>
- <cxxtestroot command="${python} ${cxxtest}/cxxtestgen.py"
- out="${src}/test-main.cpp"
- template="${src}/cxxtest-template.tpl">
- <fileset dir="${src}">
- <include name="MultiPrinter.h"/>
- <include name="PylogFormatter.h"/>
- <include name="TRPIFormatter.h"/>
- </fileset>
- </cxxtestroot>
- </target>
-
-
- <!--
- ########################################################################
- ## T A R G E T : C O M P I L E
- ########################################################################
- -->
- <target name="compile" depends="cxxtest"
- description="compile the source to .o" >
-
- <!-- Compile from source to build -->
- <cc cc="${arch_cc}" cxx="${arch_cxx}"
- destdir="${build}/obj"
- continueOnError="true"
- refreshCache="${refresh}">
- <fileset dir="${src}">
- <!-- THINGS TO EXCLUDE -->
- <exclude name="ast/.*"/>
- <exclude name="bonobo/.*"/>
- <exclude name="deptool.cpp"/>
- <exclude name="cxxtests.cpp"/>
- <!--<exclude name="test-main.cpp"/>-->
- <!--<exclude name="test-src.cpp"/>-->
- <exclude name="display/test-display.cpp"/>
- <exclude name="display/testnr.cpp"/>
- <exclude name="extension/api.cpp"/>
- <exclude name="extension/dbus/.*"/>
- <exclude name="extension/dxf2svg/.*"/>
- <exclude name="extension/implementation/plugin.cpp"/>
- <exclude name="extension/plugins/.*"/>
- <exclude name="extract-uri-test.cpp"/>
- <exclude name="helper/units-test.cpp"/>
- <!-- exclude name="inkview.cpp"/-->
- <exclude name="livarot/Path-test.cpp"/>
- <exclude name="mod360-test.cpp"/>
- <exclude name="trace/potrace/potest.cpp"/>
- <exclude name="round-test.cpp"/>
- <exclude name="sp-gradient-test.cpp"/>
- <exclude name="style-test.cpp"/>
- <exclude name="svg/ftos.cpp"/>
- <!--<exclude name="svg/test-svg.cpp"/>-->
- <exclude name="svg/test-svg-main.cpp"/>
- <exclude name="util/list-container-test.cpp"/>
- <exclude name="widgets/test-widgets.cpp"/>
- <exclude name="widgets/image-menu-item.c"/>
- <exclude name="xml/quote-test.cpp"/>
- <exclude name="xml/repr-action-test.cpp"/>
- <exclude name="xml/test-xml.cpp"/>
- <!--<exclude name="xml/test-xml-main.cpp"/>-->
- <exclude name="io/streamtest.cpp"/>
- <!--OVERLAP-->
- <exclude name="removeoverlap/placement_SolveVPSC.cpp"/>
- <exclude name="removeoverlap/placement_SolveVPSC.h"/>
- <exclude name="removeoverlap/test.cpp"/>
- <exclude name="removeoverlap/remove_rectangle_overlap-test.cpp"/>
- <exclude name="removeoverlap/remove_rectangle_overlap-test.h"/>
- </fileset>
- <excludeinc dir="${src}">
- <file name="extension/param"/>
- </excludeinc>
- <flags>
- -Wall -Wformat -Werror=format-security -Wextra -Wpointer-arith -Wcast-align -Wsign-compare -Wswitch
- -Werror=return-type
- <!-- -Werror -->
- <!-- A list of warnings that should not error *yet*, any help is welcome in fixing the code generating these warnings! -->
- <!-- libcroco is using guchar where it should use gchar, so we need: --> -Wno-error=pointer-sign
- -Wno-error=unused-parameter -Wno-error=unused-but-set-variable -Wno-error=strict-overflow -Wno-error=write-strings
- <!-- Format warnings are obviously bad errors, but with the current old compiler on Windows (gcc 4.6.) we run into a problem with long long ints...
- The errors can be restored by removing these flags after updating to a newer compiler (soon after 0.91 release hopefully) -->
- -Wno-error=format -Wno-error=format-extra-args
- -O2
- -mms-bitfields
- -fopenmp
- </flags>
- <cxxflags>
- <!-- -std=gnu++0x -DCPP11 -Wno-unused-local-typedefs -->
- -Woverloaded-virtual
- </cxxflags>
- <defines>
- -DVERSION=\"${version}\"
- -DHAVE_CONFIG_H
- -D_INTL_REDIRECT_INLINE
- -DHAVE_SSL
- -DRELAYTOOL_SSL="static const int libssl_is_present=1; static int __attribute__((unused)) libssl_symbol_is_present(char *s){ return 1; }" <!-- inkboard -->
- -DPOPPLER_NEW_GFXFONT <!-- poppler changed the api for 0.8.3 -->
- -DPOPPLER_NEW_GFXPATCH <!-- GfxPatch no longer uses GfxColor in >= 0.15.1 -->
- -DPOPPLER_NEW_ERRORAPI <!-- poppler changed the error api for 0.20.0 -->
- -DPOPPLER_EVEN_NEWER_COLOR_SPACE_API <!-- poppler changed the colorspace api for 0.26.0 -->
- -DPOPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API <!-- poppler changed the colorspace api for 0.29.0 -->
- <!-- GTK+3 migration -->
- -DGLIBMM_DISABLE_DEPRECATED
- -DG_DISABLE_DEPRECATED
- -DGTK_DISABLE_SINGLE_INCLUDES
- <!-- -DGTKMM_DISABLE_DEPRECATED -->
- <!-- -DGTK_DISABLE_DEPRECATED -->
- -DGDKMM_DISABLE_DEPRECATED
- -DGSEAL_ENABLE
- </defines>
- <includes>
- -I${devlibs}/include
- <!-- GTK / GTKMM -->
- ${pcc.gtkmm-2.4}
- ${pcc.gmodule-2.0}
- <!-- OTHER -->
- ${pcc.Magick++}
- ${pcc.libxml-2.0}
- ${pcc.freetype2}
- ${pcc.cairo}
- ${pcc.poppler}
- -I${devlibs}/include/gc
- -I${devlibs}/include/potracelib
- ${pcc.librevenge-0.0} ${pcc.librevenge-stream-0.0}
- ${pcc.libwpg-0.2} ${pcc.libvisio-0.1} ${pcc.libcdr-0.1}
- -I${cxxtest}
- <!-- PERL -->
- <!-- -Wno-comment -I${devlibs}/perl/lib/CORE -->
- <!-- PYTHON -->
- -I${devlibs}/python/include
- </includes>
- </cc>
- </target>
-
-
-
- <!--
- ########################################################################
- ## T A R G E T : I 1 8 N
- ########################################################################
- -->
- <target name="i18n" depends="compile"
- description="compile gettext .po files to .mo">
-
- <msgfmt todir="${build}/locale" owndir="true"
- out="LC_MESSAGES/inkscape.mo">
- <fileset dir="po">
- </fileset>
- </msgfmt>
- </target>
-
-
-
-
-
- <!--
- ########################################################################
- ## T A R G E T : L I N K
- ########################################################################
- -->
- <target name="link" depends="compile"
- description="link objects and library to create executable">
-
- <rc command="${archutil}windres"
- file="${src}/inkscape.rc"
- out="${build}/obj/inkres.o">
- <flags>
- --include-dir=${src}
- </flags>
- </rc>
- <link command="${arch_link}" out="${build}/inkscape.exe"
- strip="true" symfile="${build}/inkscape.dbg"
- stripcommand="${archutil}strip"
- objcopycommand="${archutil}objcopy">
- <flags>
- -mwindows
- -mthreads
- </flags>
- <fileset dir="${build}/obj">
- <exclude name="winconsole.o"/>
- <exclude name="inkview.o"/>
- <exclude name="inkviewres.o"/>
- <!-- CxxTest -->
- <exclude name="test-main.o"/>
- <exclude name="test-src.o"/>
- <exclude name="display/test-display.o"/>
- <exclude name="helper/test-helper.o"/>
- <exclude name="svg/test-svg.o"/>
- <exclude name="util/test-util.o"/>
- <exclude name="xml/test-xml.o"/>
- </fileset>
- <!-- WARNING: If you change these libraries, don't forget to change them for inkview and cxxtests below as well! -->
- <libs>
- -L${devlibs}/lib
- ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler}
- ${pcl.gmodule-2.0}
- ${pcl.gtkmm-2.4} ${pcl.pangoft2} ${pcl.gthread-2.0}
- ${devlibs}/bin/libxml2.dll
- ${devlibs}/bin/libxslt.dll
- ${devlibs}/bin/libexslt.dll
- ${pcl.cairo} ${pcl.cairomm-1.0}
- ${pcl.librevenge-0.0} ${pcl.librevenge-stream-0.0}
- ${pcl.libwpg-0.2} ${pcl.libvisio-0.1} ${pcl.libcdr-0.1}
- -liconv
- ${pcl.Magick++}
- ${pcl.fontconfig} ${pcl.freetype2}
- ${pcl.lcms2}
- ${pcl.gsl}
- -lpng -ljpeg -ltiff -lexif -lpopt -lz
- -lgc -lpotrace
- -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
- -lgomp -lpthreadGC2 -laspell
- -lmscms <!-- required for color profiles -->
- </libs>
- </link>
- </target>
-
-<!--
- ########################################################################
- ## T A R G E T : L I N K C O N S O L E
- ########################################################################
- -->
- <target name="linkconsole" depends="compile"
- description="link console helper">
-
- <link command="${arch_link}" out="${build}/inkscape-console.exe"
- strip="true" stripcommand="${archutil}strip">
- <flags>
- -mconsole
- -mthreads
- </flags>
- <fileset dir="${build}">
- <include name="obj/winconsole.o"/>
- </fileset>
- <libs></libs>
- </link>
- </target>
-
- <!--
- ########################################################################
- ## T A R G E T : L I N K I N K V I E W
- ########################################################################
- -->
- <target name="linkinkview" depends="compile"
- description="link objects and library to create Inkview executable">
-
- <rc command="${archutil}windres"
- file="${src}/inkview.rc"
- out="${build}/obj/inkviewres.o">
- <flags>
- --include-dir=${src}
- </flags>
- </rc>
- <link command="${arch_link}" out="${build}/inkview.exe"
- strip="true" symfile="${build}/inkview.dbg"
- stripcommand="${archutil}strip"
- objcopycommand="${archutil}objcopy">
- <flags>
- -mwindows
- -mthreads
- </flags>
- <fileset dir="${build}/obj">
- <!-- exclude the other programs -->
- <exclude name="main.o"/>
- <exclude name="winmain.o"/>
- <exclude name="winconsole.o"/>
- <exclude name="inkres.o"/>
- <!-- CxxTest -->
- <exclude name="test-main.o"/>
- <exclude name="test-src.o"/>
- <exclude name="display/test-display.o"/>
- <exclude name="helper/test-helper.o"/>
- <exclude name="svg/test-svg.o"/>
- <exclude name="util/test-util.o"/>
- <exclude name="xml/test-xml.o"/>
- </fileset>
- <libs>
- -L${devlibs}/lib
- ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler}
- ${pcl.gtkmm-2.4} ${pcl.pangoft2} ${pcl.gthread-2.0}
- ${pcl.gmodule-2.0}
- ${devlibs}/bin/libxml2.dll
- ${devlibs}/bin/libxslt.dll
- ${devlibs}/bin/libexslt.dll
- ${pcl.cairo} ${pcl.cairomm-1.0}
- ${pcl.librevenge-0.0} ${pcl.librevenge-stream-0.0}
- ${pcl.libwpg-0.2} ${pcl.libvisio-0.1} ${pcl.libcdr-0.1}
- -liconv
- ${pcl.Magick++}
- ${pcl.fontconfig} ${pcl.freetype2}
- ${pcl.lcms2}
- ${pcl.gsl}
- -lpng -ljpeg -ltiff -lexif -lpopt -lz
- -lgc -lpotrace
- -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
- -lgomp -lpthreadGC2 -laspell
- -lmscms <!-- required for color profiles -->
- </libs>
- </link>
- </target>
-
-
-
- <!--
- ########################################################################
- ## T A R G E T : L I N K C X X T E S T S
- ########################################################################
- -->
- <target name="linkcxxtests" depends="compile"
- description="link objects and library to create executable">
-
- <link command="${arch_link}" out="${build}/cxxtests.exe"
- strip="true" symfile="${build}/cxxtests.dbg"
- stripcommand="${archutil}strip"
- objcopycommand="${archutil}objcopy">
- <flags>
- -mconsole
- -mthreads
- </flags>
- <fileset dir="${build}/obj">
- <!-- exclude the other programs -->
- <exclude name="main.o"/>
- <exclude name="winmain.o"/>
- <exclude name="winconsole.o"/>
- <exclude name="inkres.o"/>
- <exclude name="inkviewres.o"/>
- <exclude name="inkview.o"/>
- </fileset>
- <libs>
- -L${devlibs}/lib
- ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler}
- ${pcl.gtkmm-2.4} ${pcl.pangoft2} ${pcl.gthread-2.0}
- ${pcl.gmodule-2.0}
- ${devlibs}/bin/libxml2.dll
- ${devlibs}/bin/libxslt.dll
- ${devlibs}/bin/libexslt.dll
- ${pcl.cairo} ${pcl.cairomm-1.0}
- ${pcl.librevenge-0.0} ${pcl.librevenge-stream-0.0}
- ${pcl.libwpg-0.2} ${pcl.libvisio-0.1} ${pcl.libcdr-0.1}
- -liconv
- ${pcl.Magick++}
- ${pcl.fontconfig} ${pcl.freetype2}
- ${pcl.lcms2}
- ${pcl.gsl}
- -lpng -ljpeg -ltiff -lexif -lpopt -lz
- -lgc -lpotrace
- -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
- -lgomp -lpthreadGC2 -laspell
- -lmscms <!-- required for color profiles -->
- </libs>
- </link>
- </target>
-
-
- <!--
- ########################################################################
- ## T A R G E T : D I S T B A S E
- ########################################################################
- -->
- <target name="distbase" depends="i18n"
- description="generate the distribution directory with all needed files">
-
- <!-- Create the distribution directory -->
- <copy todir="${dist}" file="AUTHORS"/>
- <copy todir="${dist}" file="COPYING"/>
- <copy todir="${dist}" file="GPL2.txt"/>
- <copy todir="${dist}" file="GPL3.txt"/>
- <copy todir="${dist}" file="LGPL2.1.txt"/>
- <copy todir="${dist}" file="NEWS"/>
- <copy todir="${dist}" file="README"/>
- <copy todir="${dist}" file="TRANSLATORS"/>
- <copy todir="${dist}" file="${devlibs}/bin/libatkmm-1.6-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libglibmm-2.4-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgiomm-2.4-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgtkmm-2.4-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgdkmm-2.4-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpangomm-1.4-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libcairomm-1.0-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libsigc-2.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/freetype6.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libatk-1.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgcc_s_sjlj-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgdk-win32-2.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgdk_pixbuf-2.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libglib-2.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgmodule-2.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgobject-2.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgtk-win32-2.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgthread-2.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libgio-2.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libcairo-2.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpixman-1-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpoppler-58.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpoppler-glib-8.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpangocairo-1.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpango-1.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpangoft2-1.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpangowin32-1.0-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libfontconfig-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libxml2.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libxslt.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libexslt.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libexpat-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/librevenge-0.0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/librevenge-stream-0.0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libwpg-0.2.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libwpd-0.9.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libwpd-stream-0.9.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libvisio-0.1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libcdr-0.1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/icui18n50.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/icudata50.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/icuuc50.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libjpeg-7.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpng12-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpng14-14.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libtiff-3.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libexif-12.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libopenjpeg-2.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/msvcr70.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/msvcr71.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/zlib1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/bzip2.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/iconv.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libpopt-0.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/liblcms-1.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/liblcms2-2.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libMagick++-3.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libMagickCore-3.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libMagickWand-3.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/intl.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/libintl-8.dll"/>
- <copy todir="${dist}" file="${devlibs}/bin/pthreadGC2.dll"/>
- <!-- MINGW support DLLs needed for openmp support -->
- <copy todir="${dist}" file="${mingw_bin}/mingwm10.dll"/>
- <copy todir="${dist}" file="${mingw_bin}/libgomp-1.dll"/>
-
- <!-- MSGFMT files -->
- <copy todir="${dist}">
- <fileset dir="${build}/locale">
- <exclude name="\.am$"/>
- </fileset>
- </copy>
-
- <mkdir dir="${dist}/data"/>
- <mkdir dir="${dist}/locale"/>
- <mkdir dir="${dist}/modules"/>
- <mkdir dir="${dist}/plugins"/>
-
- <!-- GTK -->
- <copy todir="${dist}"> <fileset dir="${devlibs}/etc"/> </copy>
- <copy todir="${dist}/lib"> <fileset dir="${devlibs}/lib/gtk-2.0"/> </copy>
- <copy todir="${dist}/lib"> <fileset dir="${devlibs}/lib/glib-2.0"/> </copy>
- <copy todir="${dist}">
- <fileset dir="share">
- <exclude name="\.am$"/>
- <exclude name="\.in$"/>
- <exclude name="\.sh$"/>
- </fileset>
- </copy>
- <copy todir="${dist}/share"> <fileset dir="${devlibs}/share/locale"/> </copy>
- <copy todir="${dist}/share"> <fileset dir="${devlibs}/share/themes"/> </copy>
- <copy todir="${dist}/share"> <fileset dir="${devlibs}/share/poppler"/> </copy>
- <copy todir="${dist}" file="${devlibs}/bin/gdb.exe"/>
-
- <!-- Aspell dictionaries -->
- <copy todir="${dist}/lib"> <fileset dir="${devlibs}/lib/aspell-0.60"/> </copy>
-
- <!-- Necessary to run extensions on windows if it is not in the path -->
- <copy todir="${dist}" file="${devlibs}/bin/gspawn-win32-helper.exe"/>
- <copy todir="${dist}" file="${devlibs}/bin/gspawn-win32-helper-console.exe"/>
-
- <!-- PERL -->
- <copy todir="${dist}" file="${devlibs}/perl/bin/perl58.dll"/>
-
- <!-- PYTHON -->
- <copy todir="${dist}" file="${devlibs}/python/python27.dll"/>
- <copy todir="${dist}/python" file="${devlibs}/python/python.exe" />
- <copy todir="${dist}/python" file="${devlibs}/python/pythonw.exe"/>
- <copy todir="${dist}/python"> <fileset dir="${devlibs}/python/Lib"/> </copy>
- <copy todir="${dist}/python"> <fileset dir="${devlibs}/python/DLLs"/> </copy>
- <copy todir="${dist}/python"> <fileset dir="${devlibs}/python/Scripts"/> </copy>
-
- <!--<copy file="${devlibs}/share/themes/MS-Windows/gtk-2.0/gtkrc" todir="${dist}/etc/gtk-2.0"/>-->
- <makefile file="${dist}/etc/gtk-2.0/gtkrc">
- gtk-icon-sizes = "gtk-menu=16,16:gtk-small-toolbar=16,16:gtk-large-toolbar=24,24:gtk-dnd=32,32:inkscape-decoration=16,16"
- gtk-toolbar-icon-size = small-toolbar
-
- # disable images in buttons. i've only seen ugly delphi apps use this feature.
- gtk-button-images = 0
-
- # disable the annoying beep in editable controls
- gtk-error-bell = 0
-
- # enable/disable images in menus. most "stock" microsoft apps don't use these, except sparingly.
- # the office apps use them heavily, though.
- gtk-menu-images = 1
-
- # use the win32 button ordering instead of the GNOME HIG one, where applicable
- gtk-alternative-button-order = 1
-
- style "msw-default"
- {
- GtkWidget::interior-focus = 1
- GtkOptionMenu::indicator-size = { 9, 5 }
- GtkOptionMenu::indicator-spacing = { 7, 5, 2, 2 }
- GtkSpinButton::shadow-type = in
-
- # Owen and I disagree that these should be themable
- #GtkUIManager::add-tearoffs = 0
- #GtkComboBox::add-tearoffs = 0
-
- GtkComboBox::appears-as-list = 1
- GtkComboBox::focus-on-click = 0
-
- GOComboBox::add_tearoffs = 0
-
- GtkTreeView::allow-rules = 0
- GtkTreeView::expander-size = 12
-
- GtkExpander::expander-size = 12
-
- GtkScrolledWindow::scrollbar_spacing = 1
-
- GtkSeparatorMenuItem::horizontal-padding = 2
-
- engine "wimp"
- {
- }
- }
- class "*" style "msw-default"
- </makefile>
-
- </target>
-
-
- <!--
- ########################################################################
- ## T A R G E T : D I S T - I N K S C A P E
- ########################################################################
- -->
- <target name="dist-inkscape" depends="link,linkconsole,distbase"
- description="copy inkscape to the distribution directory">
-
- <!-- Create the distribution directory -->
- <copy todir="${dist}" file="${build}/inkscape.exe"/>
- <copy todir="${dist}" file="${build}/inkscape.dbg"/>
- <copy file="${build}/inkscape-console.exe" tofile="${dist}/inkscape.com"/>
- </target>
-
-
- <!--
- ########################################################################
- ## T A R G E T : D I S T - I N K V I E W
- ########################################################################
- -->
- <target name="dist-inkview" depends="linkinkview,distbase"
- description="copy inkview to the distribution directory">
-
- <!-- Create the distribution directory -->
- <copy todir="${dist}" file="${build}/inkview.exe"/>
- <copy todir="${dist}" file="${build}/inkview.dbg"/>
- </target>
-
-
- <!--
- ########################################################################
- ## T A R G E T : C H E C K
- ########################################################################
- -->
- <target name="check" depends="linkcxxtests,distbase"
- description="perform unit tests">
- <copy todir="${dist}" file="${build}/cxxtests.exe"/>
- <cxxtestrun command="${dist}/cxxtests" workingdir="${dist}" />
- </target>
-
- <!--
- ########################################################################
- ## T A R G E T : D I S T - A L L
- ########################################################################
- -->
- <target name="dist-all" depends="dist-inkscape,dist-inkview"
- description="generate the distribution, along with inkview" >
- </target>
-
-
-
-
- <!--
- ########################################################################
- ## T A R G E T : D I S T - A L L - C H E C K
- ########################################################################
- -->
- <target name="dist-all-check" depends="dist-all,check"
- description="generate the distribution, along with inkview and run cxxtests" >
- </target>
-
-
-
-
-
- <!--
- ########################################################################
- ## T A R G E T : C L E A N
- ########################################################################
- -->
- <target name="clean"
- description="clean up. deleting build and distro dirs" >
-
- <delete dir="${build}"/>
- <delete dir="${dist}"/>
- <delete file="build.dep"/>
- <delete file="config.h"/>
- <delete file="${src}/inkscape-version.cpp"/>
- <delete file="${src}/test-main.cpp"/>
- <delete file="${src}/test-src.cpp"/>
- <delete file="${src}/display/test-display.cpp"/>
- <delete file="${src}/helper/test-helper.cpp"/>
- <delete file="${src}/svg/test-svg.cpp"/>
- <delete file="${src}/util/test-util.cpp"/>
- <delete file="${src}/xml/test-xml.cpp"/>
-
- </target>
-
-
-
-</project>
-<!--
-########################################################################
-## E N D
-########################################################################
--->
-
diff --git a/buildtool.cpp b/buildtool.cpp
deleted file mode 100644
index cb70a25c2..000000000
--- a/buildtool.cpp
+++ /dev/null
@@ -1,10333 +0,0 @@
-/**
- * Simple build automation tool.
- *
- * Authors:
- * Bob Jamison
- * Jasper van de Gronde
- * Johan Engelen
- *
- * Copyright (C) 2006-2008 Bob Jamison
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/**
- * To use this file, compile with:
- * <pre>
- * g++ -O3 buildtool.cpp -o btool.exe -fopenmp
- * (or whatever your compiler might be)
- * Then
- * btool
- * or
- * btool {target}
- *
- * Note: if you are using MinGW, and a not very recent version of it,
- * gettimeofday() might be missing. If so, just build this file with
- * this command:
- * g++ -O3 -DNEED_GETTIMEOFDAY buildtool.cpp -o btool.exe -fopenmp
- *
- */
-
-#define BUILDTOOL_VERSION "BuildTool v0.9.9multi"
-
-#include <stdio.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdarg.h>
-#include <sys/stat.h>
-#include <time.h>
-#include <sys/time.h>
-#include <utime.h>
-#include <dirent.h>
-
-#include <iostream>
-#include <list>
-#include <string>
-#include <map>
-#include <set>
-#include <vector>
-#include <algorithm>
-
-
-#ifdef __WIN32__
-#define WIN32_LEAN_AND_MEAN
-#define NOGDI
-#include <windows.h>
-#endif
-
-#include <errno.h>
-
-
-//########################################################################
-//# Definition of gettimeofday() for those who don't have it
-//########################################################################
-#ifdef NEED_GETTIMEOFDAY
-#include <sys/timeb.h>
-
-struct timezone {
- int tz_minuteswest; /* minutes west of Greenwich */
- int tz_dsttime; /* type of dst correction */
- };
-
-static int gettimeofday (struct timeval *tv, struct timezone *tz)
-{
- struct _timeb tb;
-
- if (!tv)
- return (-1);
-
- _ftime (&tb);
- tv->tv_sec = tb.time;
- tv->tv_usec = tb.millitm * 1000 + 500;
- if (tz)
- {
- tz->tz_minuteswest = -60 * _timezone;
- tz->tz_dsttime = _daylight;
- }
- return 0;
-}
-
-#endif
-
-
-
-
-
-
-
-namespace buildtool
-{
-
-
-
-
-//########################################################################
-//########################################################################
-//## R E G E X P
-//########################################################################
-//########################################################################
-
-/**
- * This is the SLRE (Super Light Regular Expression library)
- * SLRE is an ISO C library that implements a subset of Perl
- * regular expression syntax.
- *
- * See https://github.com/cesanta/slre for details
- *
- * It's clean code and small size allow us to
- * embed it in BuildTool without adding a dependency
- *
- */
-
-//begin slre.h
-
-/*
- * Copyright (c) 2004-2013 Sergey Lyubka <valenok@gmail.com>
- * Copyright (c) 2013 Cesanta Software Limited
- * All rights reserved
- *
- * This library is dual-licensed: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation. For the terms of this
- * license, see <http://www.gnu.org/licenses/>.
- *
- * You are free to use this library under the terms of the GNU General
- * Public License, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details.
- *
- * Alternatively, you can license this library under a commercial
- * license, as set out in <http://cesanta.com/products.html>.
- */
-
-/*
- * This is a regular expression library that implements a subset of Perl RE.
- * Please refer to README.md for a detailed reference.
- */
-
-#ifndef SLRE_HEADER_DEFINED
-#define SLRE_HEADER_DEFINED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct slre_cap {
- const char *ptr;
- int len;
-};
-
-
-int slre_match(const char *regexp, const char *buf, int buf_len,
- struct slre_cap *caps, int num_caps, int flags);
-
-/* Possible flags for slre_match() */
-enum { SLRE_IGNORE_CASE = 1 };
-
-
-/* slre_match() failure codes */
-#define SLRE_NO_MATCH -1
-#define SLRE_UNEXPECTED_QUANTIFIER -2
-#define SLRE_UNBALANCED_BRACKETS -3
-#define SLRE_INTERNAL_ERROR -4
-#define SLRE_INVALID_CHARACTER_SET -5
-#define SLRE_INVALID_METACHARACTER -6
-#define SLRE_CAPS_ARRAY_TOO_SMALL -7
-#define SLRE_TOO_MANY_BRANCHES -8
-#define SLRE_TOO_MANY_BRACKETS -9
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* SLRE_HEADER_DEFINED */
-
-//end slre.h
-
-//start slre.c
-
-/*
- * Copyright (c) 2004-2013 Sergey Lyubka <valenok@gmail.com>
- * Copyright (c) 2013 Cesanta Software Limited
- * All rights reserved
- *
- * This library is dual-licensed: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation. For the terms of this
- * license, see <http://www.gnu.org/licenses/>.
- *
- * You are free to use this library under the terms of the GNU General
- * Public License, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details.
- *
- * Alternatively, you can license this library under a commercial
- * license, as set out in <http://cesanta.com/products.html>.
- */
-
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-
-//#include "slre.h"
-
-#define MAX_BRANCHES 100
-#define MAX_BRACKETS 100
-#define FAIL_IF(condition, error_code) if (condition) return (error_code)
-
-#ifndef ARRAY_SIZE
-#define ARRAY_SIZE(ar) (sizeof(ar) / sizeof((ar)[0]))
-#endif
-
-#ifdef SLRE_DEBUG
-#define DBG(x) printf x
-#else
-#define DBG(x)
-#endif
-
-struct bracket_pair {
- const char *ptr; /* Points to the first char after '(' in regex */
- int len; /* Length of the text between '(' and ')' */
- int branches; /* Index in the branches array for this pair */
- int num_branches; /* Number of '|' in this bracket pair */
-};
-
-struct branch {
- int bracket_index; /* index for 'struct bracket_pair brackets' */
- /* array defined below */
- const char *schlong; /* points to the '|' character in the regex */
-};
-
-struct regex_info {
- /*
- * Describes all bracket pairs in the regular expression.
- * First entry is always present, and grabs the whole regex.
- */
- struct bracket_pair brackets[MAX_BRACKETS];
- int num_brackets;
-
- /*
- * Describes alternations ('|' operators) in the regular expression.
- * Each branch falls into a specific branch pair.
- */
- struct branch branches[MAX_BRANCHES];
- int num_branches;
-
- /* Array of captures provided by the user */
- struct slre_cap *caps;
- int num_caps;
-
- /* E.g. SLRE_IGNORE_CASE. See enum below */
- int flags;
-};
-
-static int is_metacharacter(const unsigned char *s) {
- static const char *metacharacters = "^$().[]*+?|\\Ssdbfnrtv";
- return strchr(metacharacters, *s) != NULL;
-}
-
-static int op_len(const char *re) {
- return re[0] == '\\' && re[1] == 'x' ? 4 : re[0] == '\\' ? 2 : 1;
-}
-
-static int set_len(const char *re, int re_len) {
- int len = 0;
-
- while (len < re_len && re[len] != ']') {
- len += op_len(re + len);
- }
-
- return len <= re_len ? len + 1 : -1;
-}
-
-static int get_op_len(const char *re, int re_len) {
- return re[0] == '[' ? set_len(re + 1, re_len - 1) + 1 : op_len(re);
-}
-
-static int is_quantifier(const char *re) {
- return re[0] == '*' || re[0] == '+' || re[0] == '?';
-}
-
-static int toi(int x) {
- return isdigit(x) ? x - '0' : x - 'W';
-}
-
-static int hextoi(const unsigned char *s) {
- return (toi(tolower(s[0])) << 4) | toi(tolower(s[1]));
-}
-
-static int match_op(const unsigned char *re, const unsigned char *s,
- struct regex_info *info) {
- int result = 0;
- switch (*re) {
- case '\\':
- /* Metacharacters */
- switch (re[1]) {
- case 'S': FAIL_IF(isspace(*s), SLRE_NO_MATCH); result++; break;
- case 's': FAIL_IF(!isspace(*s), SLRE_NO_MATCH); result++; break;
- case 'd': FAIL_IF(!isdigit(*s), SLRE_NO_MATCH); result++; break;
- case 'b': FAIL_IF(*s != '\b', SLRE_NO_MATCH); result++; break;
- case 'f': FAIL_IF(*s != '\f', SLRE_NO_MATCH); result++; break;
- case 'n': FAIL_IF(*s != '\n', SLRE_NO_MATCH); result++; break;
- case 'r': FAIL_IF(*s != '\r', SLRE_NO_MATCH); result++; break;
- case 't': FAIL_IF(*s != '\t', SLRE_NO_MATCH); result++; break;
- case 'v': FAIL_IF(*s != '\v', SLRE_NO_MATCH); result++; break;
-
- case 'x':
- /* Match byte, \xHH where HH is hexadecimal byte representaion */
- FAIL_IF(hextoi(re + 2) != *s, SLRE_NO_MATCH);
- result++;
- break;
-
- default:
- /* Valid metacharacter check is done in bar() */
- FAIL_IF(re[1] != s[0], SLRE_NO_MATCH);
- result++;
- break;
- }
- break;
-
- case '|': FAIL_IF(1, SLRE_INTERNAL_ERROR); break;
- case '$': FAIL_IF(1, SLRE_NO_MATCH); break;
- case '.': result++; break;
-
- default:
- if (info->flags & SLRE_IGNORE_CASE) {
- FAIL_IF(tolower(*re) != tolower(*s), SLRE_NO_MATCH);
- } else {
- FAIL_IF(*re != *s, SLRE_NO_MATCH);
- }
- result++;
- break;
- }
-
- return result;
-}
-
-static int match_set(const char *re, int re_len, const char *s,
- struct regex_info *info) {
- int len = 0, result = -1, invert = re[0] == '^';
-
- if (invert) re++, re_len--;
-
- while (len <= re_len && re[len] != ']' && result <= 0) {
- /* Support character range */
- if (re[len] != '-' && re[len + 1] == '-' && re[len + 2] != ']' &&
- re[len + 2] != '\0') {
- result = info->flags & SLRE_IGNORE_CASE ?
- tolower(*s) >= tolower(re[len]) && tolower(*s) <= tolower(re[len + 2]) :
- *s >= re[len] && *s <= re[len + 2];
- len += 3;
- } else {
- result = match_op((unsigned char *) re + len, (unsigned char *) s, info);
- len += op_len(re + len);
- }
- }
- return (!invert && result > 0) || (invert && result <= 0) ? 1 : -1;
-}
-
-static int doh(const char *s, int s_len, struct regex_info *info, int bi);
-
-static int bar(const char *re, int re_len, const char *s, int s_len,
- struct regex_info *info, int bi) {
- /* i is offset in re, j is offset in s, bi is brackets index */
- int i, j, n, step;
-
- for (i = j = 0; i < re_len && j <= s_len; i += step) {
-
- /* Handle quantifiers. Get the length of the chunk. */
- step = re[i] == '(' ? info->brackets[bi + 1].len + 2 :
- get_op_len(re + i, re_len - i);
-
- DBG(("%s [%.*s] [%.*s] re_len=%d step=%d i=%d j=%d\n", __func__,
- re_len - i, re + i, s_len - j, s + j, re_len, step, i, j));
-
- FAIL_IF(is_quantifier(&re[i]), SLRE_UNEXPECTED_QUANTIFIER);
- FAIL_IF(step <= 0, SLRE_INVALID_CHARACTER_SET);
-
- if (i + step < re_len && is_quantifier(re + i + step)) {
- DBG(("QUANTIFIER: [%.*s]%c [%.*s]\n", step, re + i,
- re[i + step], s_len - j, s + j));
- if (re[i + step] == '?') {
- int result = bar(re + i, step, s + j, s_len - j, info, bi);
- j += result > 0 ? result : 0;
- i++;
- } else if (re[i + step] == '+' || re[i + step] == '*') {
- int j2 = j, nj = j, n1, n2 = -1, ni, non_greedy = 0;
-
- /* Points to the regexp code after the quantifier */
- ni = i + step + 1;
- if (ni < re_len && re[ni] == '?') {
- non_greedy = 1;
- ni++;
- }
-
- do {
- if ((n1 = bar(re + i, step, s + j2, s_len - j2, info, bi)) > 0) {
- j2 += n1;
- }
- if (re[i + step] == '+' && n1 < 0) break;
-
- if (ni >= re_len) {
- /* After quantifier, there is nothing */
- nj = j2;
- } else if ((n2 = bar(re + ni, re_len - ni, s + j2,
- s_len - j2, info, bi)) >= 0) {
- /* Regex after quantifier matched */
- nj = j2 + n2;
- }
- if (nj > j && non_greedy) break;
- } while (n1 > 0);
-
- /*
- * Even if we found one or more pattern, this branch will be executed,
- * changing the next captures.
- */
- if (n1 < 0 && n2 < 0 && re[i + step] == '*' &&
- (n2 = bar(re + ni, re_len - ni, s + j, s_len - j, info, bi)) > 0) {
- nj = j + n2;
- }
-
- DBG(("STAR/PLUS END: %d %d %d %d %d\n", j, nj, re_len - ni, n1, n2));
- FAIL_IF(re[i + step] == '+' && nj == j, SLRE_NO_MATCH);
-
- /* If while loop body above was not executed for the * quantifier, */
- /* make sure the rest of the regex matches */
- FAIL_IF(nj == j && ni < re_len && n2 < 0, SLRE_NO_MATCH);
-
- /* Returning here cause we've matched the rest of RE already */
- return nj;
- }
- continue;
- }
-
- if (re[i] == '[') {
- n = match_set(re + i + 1, re_len - (i + 2), s + j, info);
- DBG(("SET %.*s [%.*s] -> %d\n", step, re + i, s_len - j, s + j, n));
- FAIL_IF(n <= 0, SLRE_NO_MATCH);
- j += n;
- } else if (re[i] == '(') {
- n = SLRE_NO_MATCH;
- bi++;
- FAIL_IF(bi >= info->num_brackets, SLRE_INTERNAL_ERROR);
- DBG(("CAPTURING [%.*s] [%.*s] [%s]\n",
- step, re + i, s_len - j, s + j, re + i + step));
-
- if (re_len - (i + step) <= 0) {
- /* Nothing follows brackets */
- n = doh(s + j, s_len - j, info, bi);
- } else {
- int j2;
- for (j2 = 0; j2 <= s_len - j; j2++) {
- if ((n = doh(s + j, s_len - (j + j2), info, bi)) >= 0 &&
- bar(re + i + step, re_len - (i + step),
- s + j + n, s_len - (j + n), info, bi) >= 0) break;
- }
- }
-
- DBG(("CAPTURED [%.*s] [%.*s]:%d\n", step, re + i, s_len - j, s + j, n));
- FAIL_IF(n < 0, n);
- if (info->caps != NULL && n > 0) {
- info->caps[bi - 1].ptr = s + j;
- info->caps[bi - 1].len = n;
- }
- j += n;
- } else if (re[i] == '^') {
- FAIL_IF(j != 0, SLRE_NO_MATCH);
- } else if (re[i] == '$') {
- FAIL_IF(j != s_len, SLRE_NO_MATCH);
- } else {
- FAIL_IF(j >= s_len, SLRE_NO_MATCH);
- n = match_op((unsigned char *) (re + i), (unsigned char *) (s + j), info);
- FAIL_IF(n <= 0, n);
- j += n;
- }
- }
-
- return j;
-}
-
-/* Process branch points */
-static int doh(const char *s, int s_len, struct regex_info *info, int bi) {
- const struct bracket_pair *b = &info->brackets[bi];
- int i = 0, len, result;
- const char *p;
-
- do {
- p = i == 0 ? b->ptr : info->branches[b->branches + i - 1].schlong + 1;
- len = b->num_branches == 0 ? b->len :
- i == b->num_branches ? (int) (b->ptr + b->len - p) :
- (int) (info->branches[b->branches + i].schlong - p);
- DBG(("%s %d %d [%.*s] [%.*s]\n", __func__, bi, i, len, p, s_len, s));
- result = bar(p, len, s, s_len, info, bi);
- DBG(("%s <- %d\n", __func__, result));
- } while (result <= 0 && i++ < b->num_branches); /* At least 1 iteration */
-
- return result;
-}
-
-static int baz(const char *s, int s_len, struct regex_info *info) {
- int i, result = -1, is_anchored = info->brackets[0].ptr[0] == '^';
-
- for (i = 0; i <= s_len; i++) {
- result = doh(s + i, s_len - i, info, 0);
- if (result >= 0) {
- result += i;
- break;
- }
- if (is_anchored) break;
- }
-
- return result;
-}
-
-static void setup_branch_points(struct regex_info *info) {
- int i, j;
- struct branch tmp;
-
- /* First, sort branches. Must be stable, no qsort. Use bubble algo. */
- for (i = 0; i < info->num_branches; i++) {
- for (j = i + 1; j < info->num_branches; j++) {
- if (info->branches[i].bracket_index > info->branches[j].bracket_index) {
- tmp = info->branches[i];
- info->branches[i] = info->branches[j];
- info->branches[j] = tmp;
- }
- }
- }
-
- /*
- * For each bracket, set their branch points. This way, for every bracket
- * (i.e. every chunk of regex) we know all branch points before matching.
- */
- for (i = j = 0; i < info->num_brackets; i++) {
- info->brackets[i].num_branches = 0;
- info->brackets[i].branches = j;
- while (j < info->num_branches && info->branches[j].bracket_index == i) {
- info->brackets[i].num_branches++;
- j++;
- }
- }
-}
-
-static int foo(const char *re, int re_len, const char *s, int s_len,
- struct regex_info *info) {
- int i, step, depth = 0;
-
- /* First bracket captures everything */
- info->brackets[0].ptr = re;
- info->brackets[0].len = re_len;
- info->num_brackets = 1;
-
- /* Make a single pass over regex string, memorize brackets and branches */
- for (i = 0; i < re_len; i += step) {
- step = get_op_len(re + i, re_len - i);
-
- if (re[i] == '|') {
- FAIL_IF(info->num_branches >= (int) ARRAY_SIZE(info->branches),
- SLRE_TOO_MANY_BRANCHES);
- info->branches[info->num_branches].bracket_index =
- info->brackets[info->num_brackets - 1].len == -1 ?
- info->num_brackets - 1 : depth;
- info->branches[info->num_branches].schlong = &re[i];
- info->num_branches++;
- } else if (re[i] == '\\') {
- FAIL_IF(i >= re_len - 1, SLRE_INVALID_METACHARACTER);
- if (re[i + 1] == 'x') {
- /* Hex digit specification must follow */
- FAIL_IF(re[i + 1] == 'x' && i >= re_len - 3,
- SLRE_INVALID_METACHARACTER);
- FAIL_IF(re[i + 1] == 'x' && !(isxdigit(re[i + 2]) &&
- isxdigit(re[i + 3])), SLRE_INVALID_METACHARACTER);
- } else {
- FAIL_IF(!is_metacharacter((unsigned char *) re + i + 1),
- SLRE_INVALID_METACHARACTER);
- }
- } else if (re[i] == '(') {
- FAIL_IF(info->num_brackets >= (int) ARRAY_SIZE(info->brackets),
- SLRE_TOO_MANY_BRACKETS);
- depth++; /* Order is important here. Depth increments first. */
- info->brackets[info->num_brackets].ptr = re + i + 1;
- info->brackets[info->num_brackets].len = -1;
- info->num_brackets++;
- FAIL_IF(info->num_caps > 0 && info->num_brackets - 1 > info->num_caps,
- SLRE_CAPS_ARRAY_TOO_SMALL);
- } else if (re[i] == ')') {
- int ind = info->brackets[info->num_brackets - 1].len == -1 ?
- info->num_brackets - 1 : depth;
- info->brackets[ind].len = (int) (&re[i] - info->brackets[ind].ptr);
- DBG(("SETTING BRACKET %d [%.*s]\n",
- ind, info->brackets[ind].len, info->brackets[ind].ptr));
- depth--;
- FAIL_IF(depth < 0, SLRE_UNBALANCED_BRACKETS);
- FAIL_IF(i > 0 && re[i - 1] == '(', SLRE_NO_MATCH);
- }
- }
-
- FAIL_IF(depth != 0, SLRE_UNBALANCED_BRACKETS);
- setup_branch_points(info);
-
- return baz(s, s_len, info);
-}
-
-int slre_match(const char *regexp, const char *s, int s_len,
- struct slre_cap *caps, int num_caps, int flags) {
- struct regex_info info;
-
- /* Initialize info structure */
- info.flags = flags;
- info.num_brackets = info.num_branches = 0;
- info.num_caps = num_caps;
- info.caps = caps;
-
- DBG(("========================> [%s] [%.*s]\n", regexp, s_len, s));
- return foo(regexp, (int) strlen(regexp), s, s_len, &info);
-}
-
-//end slre.c
-
-//########################################################################
-//########################################################################
-//## E N D R E G E X P
-//########################################################################
-//########################################################################
-
-
-
-
-
-//########################################################################
-//########################################################################
-//## X M L
-//########################################################################
-//########################################################################
-
-// Note: This mini-dom library comes from Pedro, another little project
-// of mine.
-
-typedef std::string String;
-typedef unsigned int XMLCh;
-
-
-class Namespace
-{
-public:
- Namespace()
- {}
-
- Namespace(const String &prefixArg, const String &namespaceURIArg)
- {
- prefix = prefixArg;
- namespaceURI = namespaceURIArg;
- }
-
- Namespace(const Namespace &other)
- {
- assign(other);
- }
-
- Namespace &operator=(const Namespace &other)
- {
- assign(other);
- return *this;
- }
-
- virtual ~Namespace()
- {}
-
- virtual String getPrefix()
- { return prefix; }
-
- virtual String getNamespaceURI()
- { return namespaceURI; }
-
-protected:
-
- void assign(const Namespace &other)
- {
- prefix = other.prefix;
- namespaceURI = other.namespaceURI;
- }
-
- String prefix;
- String namespaceURI;
-
-};
-
-class Attribute
-{
-public:
- Attribute()
- {}
-
- Attribute(const String &nameArg, const String &valueArg)
- {
- name = nameArg;
- value = valueArg;
- }
-
- Attribute(const Attribute &other)
- {
- assign(other);
- }
-
- Attribute &operator=(const Attribute &other)
- {
- assign(other);
- return *this;
- }
-
- virtual ~Attribute()
- {}
-
- virtual String getName()
- { return name; }
-
- virtual String getValue()
- { return value; }
-
-protected:
-
- void assign(const Attribute &other)
- {
- name = other.name;
- value = other.value;
- }
-
- String name;
- String value;
-
-};
-
-
-class Element
-{
-friend class Parser;
-
-public:
- Element()
- {
- init();
- }
-
- Element(const String &nameArg)
- {
- init();
- name = nameArg;
- }
-
- Element(const String &nameArg, const String &valueArg)
- {
- init();
- name = nameArg;
- value = valueArg;
- }
-
- Element(const Element &other)
- {
- assign(other);
- }
-
- Element &operator=(const Element &other)
- {
- assign(other);
- return *this;
- }
-
- virtual Element *clone();
-
- virtual ~Element()
- {
- for (std::size_t i=0 ; i<children.size() ; i++)
- delete children[i];
- }
-
- virtual String getName()
- { return name; }
-
- virtual String getValue()
- { return value; }
-
- Element *getParent()
- { return parent; }
-
- std::vector<Element *> getChildren()
- { return children; }
-
- std::vector<Element *> findElements(const String &name);
-
- String getAttribute(const String &name);
-
- std::vector<Attribute> &getAttributes()
- { return attributes; }
-
- String getTagAttribute(const String &tagName, const String &attrName);
-
- String getTagValue(const String &tagName);
-
- void addChild(Element *child);
-
- void addAttribute(const String &name, const String &value);
-
- void addNamespace(const String &prefix, const String &namespaceURI);
-
-
- /**
- * Prettyprint an XML tree to an output stream. Elements are indented
- * according to element hierarchy.
- * @param f a stream to receive the output
- * @param elem the element to output
- */
- void writeIndented(FILE *f);
-
- /**
- * Prettyprint an XML tree to standard output. This is the equivalent of
- * writeIndented(stdout).
- * @param elem the element to output
- */
- void print();
-
- int getLine()
- { return line; }
-
-protected:
-
- void init()
- {
- parent = NULL;
- line = 0;
- }
-
- void assign(const Element &other)
- {
- parent = other.parent;
- children = other.children;
- attributes = other.attributes;
- namespaces = other.namespaces;
- name = other.name;
- value = other.value;
- line = other.line;
- }
-
- void findElementsRecursive(std::vector<Element *>&res, const String &name);
-
- void writeIndentedRecursive(FILE *f, int indent);
-
- Element *parent;
-
- std::vector<Element *>children;
-
- std::vector<Attribute> attributes;
- std::vector<Namespace> namespaces;
-
- String name;
- String value;
-
- int line;
-};
-
-
-
-
-
-class Parser
-{
-public:
- /**
- * Constructor
- */
- Parser()
- { init(); }
-
- virtual ~Parser()
- {}
-
- /**
- * Parse XML in a char buffer.
- * @param buf a character buffer to parse
- * @param pos position to start parsing
- * @param len number of chars, from pos, to parse.
- * @return a pointer to the root of the XML document;
- */
- Element *parse(const char *buf,int pos,int len);
-
- /**
- * Parse XML in a char buffer.
- * @param buf a character buffer to parse
- * @param pos position to start parsing
- * @param len number of chars, from pos, to parse.
- * @return a pointer to the root of the XML document;
- */
- Element *parse(const String &buf);
-
- /**
- * Parse a named XML file. The file is loaded like a data file;
- * the original format is not preserved.
- * @param fileName the name of the file to read
- * @return a pointer to the root of the XML document;
- */
- Element *parseFile(const String &fileName);
-
- /**
- * Utility method to preprocess a string for XML
- * output, escaping its entities.
- * @param str the string to encode
- */
- static String encode(const String &str);
-
- /**
- * Removes whitespace from beginning and end of a string
- */
- String trim(const String &s);
-
-private:
-
- void init()
- {
- keepGoing = true;
- currentNode = NULL;
- parselen = 0;
- parsebuf = NULL;
- currentPosition = 0;
- }
-
- int countLines(int begin, int end);
-
- void getLineAndColumn(int pos, int *lineNr, int *colNr);
-
- void error(const char *fmt, ...);
-
- int peek(int pos);
-
- int match(int pos, const char *text);
-
- int skipwhite(int p);
-
- int getWord(int p0, String &buf);
-
- int getQuoted(int p0, String &buf, int do_i_parse);
-
- int parseVersion(int p0);
-
- int parseDoctype(int p0);
-
- int parseElement(int p0, Element *par,int depth);
-
- Element *parse(XMLCh *buf,int pos,int len);
-
- bool keepGoing;
- Element *currentNode;
- int parselen;
- XMLCh *parsebuf;
- String cdatabuf;
- int currentPosition;
-};
-
-
-
-
-//########################################################################
-//# E L E M E N T
-//########################################################################
-
-Element *Element::clone()
-{
- Element *elem = new Element(name, value);
- elem->parent = parent;
- elem->attributes = attributes;
- elem->namespaces = namespaces;
- elem->line = line;
-
- std::vector<Element *>::iterator iter;
- for (iter = children.begin(); iter != children.end() ; iter++)
- {
- elem->addChild((*iter)->clone());
- }
- return elem;
-}
-
-
-void Element::findElementsRecursive(std::vector<Element *>&res, const String &name)
-{
- if (getName() == name)
- {
- res.push_back(this);
- }
- for (std::size_t i=0; i<children.size() ; i++)
- children[i]->findElementsRecursive(res, name);
-}
-
-std::vector<Element *> Element::findElements(const String &name)
-{
- std::vector<Element *> res;
- findElementsRecursive(res, name);
- return res;
-}
-
-String Element::getAttribute(const String &name)
-{
- for (std::size_t i=0 ; i<attributes.size() ; i++)
- if (attributes[i].getName() ==name)
- return attributes[i].getValue();
- return "";
-}
-
-String Element::getTagAttribute(const String &tagName, const String &attrName)
-{
- std::vector<Element *>elems = findElements(tagName);
- if (elems.size() <1)
- return "";
- String res = elems[0]->getAttribute(attrName);
- return res;
-}
-
-String Element::getTagValue(const String &tagName)
-{
- std::vector<Element *>elems = findElements(tagName);
- if (elems.size() <1)
- return "";
- String res = elems[0]->getValue();
- return res;
-}
-
-void Element::addChild(Element *child)
-{
- if (!child)
- return;
- child->parent = this;
- children.push_back(child);
-}
-
-
-void Element::addAttribute(const String &name, const String &value)
-{
- Attribute attr(name, value);
- attributes.push_back(attr);
-}
-
-void Element::addNamespace(const String &prefix, const String &namespaceURI)
-{
- Namespace ns(prefix, namespaceURI);
- namespaces.push_back(ns);
-}
-
-void Element::writeIndentedRecursive(FILE *f, int indent)
-{
- int i;
- if (!f)
- return;
- //Opening tag, and attributes
- for (i=0;i<indent;i++)
- fputc(' ',f);
- fprintf(f,"<%s",name.c_str());
- for (std::size_t i=0 ; i<attributes.size() ; i++)
- {
- fprintf(f," %s=\"%s\"",
- attributes[i].getName().c_str(),
- attributes[i].getValue().c_str());
- }
- for (std::size_t i=0 ; i<namespaces.size() ; i++)
- {
- fprintf(f," xmlns:%s=\"%s\"",
- namespaces[i].getPrefix().c_str(),
- namespaces[i].getNamespaceURI().c_str());
- }
- fprintf(f,">\n");
-
- //Between the tags
- if (value.size() > 0)
- {
- for (int i=0;i<indent;i++)
- fputc(' ', f);
- fprintf(f," %s\n", value.c_str());
- }
-
- for (std::size_t i=0 ; i<children.size() ; i++)
- children[i]->writeIndentedRecursive(f, indent+2);
-
- //Closing tag
- for (int i=0; i<indent; i++)
- fputc(' ',f);
- fprintf(f,"</%s>\n", name.c_str());
-}
-
-void Element::writeIndented(FILE *f)
-{
- writeIndentedRecursive(f, 0);
-}
-
-void Element::print()
-{
- writeIndented(stdout);
-}
-
-
-//########################################################################
-//# P A R S E R
-//########################################################################
-
-
-
-typedef struct
- {
- const char *escaped;
- char value;
- } EntityEntry;
-
-static EntityEntry entities[] =
-{
- { "&amp;" , '&' },
- { "&lt;" , '<' },
- { "&gt;" , '>' },
- { "&apos;", '\'' },
- { "&quot;", '"' },
- { NULL , '\0' }
-};
-
-
-
-/**
- * Removes whitespace from beginning and end of a string
- */
-String Parser::trim(const String &s)
-{
- if (s.size() < 1)
- return s;
-
- //Find first non-ws char
- std::size_t begin = 0;
- for ( ; begin < s.size() ; begin++)
- {
- if (!isspace(s[begin]))
- break;
- }
-
- //Find first non-ws char, going in reverse
- std::size_t end = s.size() - 1;
- for ( ; end > begin ; end--)
- {
- if (!isspace(s[end]))
- break;
- }
- //trace("begin:%d end:%d", begin, end);
-
- String res = s.substr(begin, end-begin+1);
- return res;
-}
-
-
-int Parser::countLines(int begin, int end)
-{
- int count = 0;
- for (int i=begin ; i<end ; i++)
- {
- XMLCh ch = parsebuf[i];
- if (ch == '\n' || ch == '\r')
- count++;
- }
- return count;
-}
-
-
-void Parser::getLineAndColumn(int pos, int *lineNr, int *colNr)
-{
- int line = 1;
- int col = 1;
- for (long i=0 ; i<pos ; i++)
- {
- XMLCh ch = parsebuf[i];
- if (ch == '\n' || ch == '\r')
- {
- col = 0;
- line ++;
- }
- else
- col++;
- }
- *lineNr = line;
- *colNr = col;
-
-}
-
-
-void Parser::error(const char *fmt, ...)
-{
- int lineNr;
- int colNr;
- getLineAndColumn(currentPosition, &lineNr, &colNr);
- va_list args;
- fprintf(stderr, "xml error at line %d, column %d:", lineNr, colNr);
- va_start(args,fmt);
- vfprintf(stderr,fmt,args);
- va_end(args) ;
- fprintf(stderr, "\n");
-}
-
-
-
-int Parser::peek(int pos)
-{
- if (pos >= parselen)
- return -1;
- currentPosition = pos;
- int ch = parsebuf[pos];
- //printf("ch:%c\n", ch);
- return ch;
-}
-
-
-
-String Parser::encode(const String &str)
-{
- String ret;
- for (std::size_t i=0 ; i<str.size() ; i++)
- {
- XMLCh ch = (XMLCh)str[i];
- if (ch == '&')
- ret.append("&amp;");
- else if (ch == '<')
- ret.append("&lt;");
- else if (ch == '>')
- ret.append("&gt;");
- else if (ch == '\'')
- ret.append("&apos;");
- else if (ch == '"')
- ret.append("&quot;");
- else
- ret.push_back(ch);
-
- }
- return ret;
-}
-
-
-int Parser::match(int p0, const char *text)
-{
- int p = p0;
- while (*text)
- {
- if (peek(p) != *text)
- return p0;
- p++; text++;
- }
- return p;
-}
-
-
-
-int Parser::skipwhite(int p)
-{
-
- while (p<parselen)
- {
- int p2 = match(p, "<!--");
- if (p2 > p)
- {
- p = p2;
- while (p<parselen)
- {
- p2 = match(p, "-->");
- if (p2 > p)
- {
- p = p2;
- break;
- }
- p++;
- }
- }
- XMLCh b = peek(p);
- if (!isspace(b))
- break;
- p++;
- }
- return p;
-}
-
-/* modify this to allow all chars for an element or attribute name*/
-int Parser::getWord(int p0, String &buf)
-{
- int p = p0;
- while (p<parselen)
- {
- XMLCh b = peek(p);
- if (b<=' ' || b=='/' || b=='>' || b=='=')
- break;
- buf.push_back(b);
- p++;
- }
- return p;
-}
-
-int Parser::getQuoted(int p0, String &buf, int do_i_parse)
-{
-
- int p = p0;
- if (peek(p) != '"' && peek(p) != '\'')
- return p0;
- p++;
-
- while ( p<parselen )
- {
- XMLCh b = peek(p);
- if (b=='"' || b=='\'')
- break;
- if (b=='&' && do_i_parse)
- {
- bool found = false;
- for (EntityEntry *ee = entities ; ee->value ; ee++)
- {
- int p2 = match(p, ee->escaped);
- if (p2>p)
- {
- buf.push_back(ee->value);
- p = p2;
- found = true;
- break;
- }
- }
- if (!found)
- {
- error("unterminated entity");
- return false;
- }
- }
- else
- {
- buf.push_back(b);
- p++;
- }
- }
- return p;
-}
-
-int Parser::parseVersion(int p0)
-{
- //printf("### parseVersion: %d\n", p0);
-
- int p = p0;
-
- p = skipwhite(p0);
-
- if (peek(p) != '<')
- return p0;
-
- p++;
- if (p>=parselen || peek(p)!='?')
- return p0;
-
- p++;
-
- String buf;
-
- while (p<parselen)
- {
- XMLCh ch = peek(p);
- if (ch=='?')
- {
- p++;
- break;
- }
- buf.push_back(ch);
- p++;
- }
-
- if (peek(p) != '>')
- return p0;
- p++;
-
- //printf("Got version:%s\n",buf.c_str());
- return p;
-}
-
-int Parser::parseDoctype(int p0)
-{
- //printf("### parseDoctype: %d\n", p0);
-
- int p = p0;
- p = skipwhite(p);
-
- if (p>=parselen || peek(p)!='<')
- return p0;
-
- p++;
-
- if (peek(p)!='!' || peek(p+1)=='-')
- return p0;
- p++;
-
- String buf;
- while (p<parselen)
- {
- XMLCh ch = peek(p);
- if (ch=='>')
- {
- p++;
- break;
- }
- buf.push_back(ch);
- p++;
- }
-
- //printf("Got doctype:%s\n",buf.c_str());
- return p;
-}
-
-
-
-int Parser::parseElement(int p0, Element *par,int lineNr)
-{
-
- int p = p0;
-
- int p2 = p;
-
- p = skipwhite(p);
-
- //## Get open tag
- XMLCh ch = peek(p);
- if (ch!='<')
- return p0;
-
- //int line, col;
- //getLineAndColumn(p, &line, &col);
-
- p++;
-
- String openTagName;
- p = skipwhite(p);
- p = getWord(p, openTagName);
- //printf("####tag :%s\n", openTagName.c_str());
- p = skipwhite(p);
-
- //Add element to tree
- Element *n = new Element(openTagName);
- n->line = lineNr + countLines(p0, p);
- n->parent = par;
- par->addChild(n);
-
- // Get attributes
- if (peek(p) != '>')
- {
- while (p<parselen)
- {
- p = skipwhite(p);
- ch = peek(p);
- //printf("ch:%c\n",ch);
- if (ch=='>')
- break;
- else if (ch=='/' && p<parselen+1)
- {
- p++;
- p = skipwhite(p);
- ch = peek(p);
- if (ch=='>')
- {
- p++;
- //printf("quick close\n");
- return p;
- }
- }
- String attrName;
- p2 = getWord(p, attrName);
- if (p2==p)
- break;
- //printf("name:%s",buf);
- p=p2;
- p = skipwhite(p);
- ch = peek(p);
- //printf("ch:%c\n",ch);
- if (ch!='=')
- break;
- p++;
- p = skipwhite(p);
- // ch = parsebuf[p];
- // printf("ch:%c\n",ch);
- String attrVal;
- p2 = getQuoted(p, attrVal, true);
- p=p2+1;
- //printf("name:'%s' value:'%s'\n",attrName.c_str(),attrVal.c_str());
- char *namestr = (char *)attrName.c_str();
- if (strncmp(namestr, "xmlns:", 6)==0)
- n->addNamespace(attrName, attrVal);
- else
- n->addAttribute(attrName, attrVal);
- }
- }
-
- bool cdata = false;
-
- p++;
- // ### Get intervening data ### */
- String data;
- while (p<parselen)
- {
- //# COMMENT
- p2 = match(p, "<!--");
- if (!cdata && p2>p)
- {
- p = p2;
- while (p<parselen)
- {
- p2 = match(p, "-->");
- if (p2 > p)
- {
- p = p2;
- break;
- }
- p++;
- }
- }
-
- ch = peek(p);
- //# END TAG
- if (ch=='<' && !cdata && peek(p+1)=='/')
- {
- break;
- }
- //# CDATA
- p2 = match(p, "<![CDATA[");
- if (p2 > p)
- {
- cdata = true;
- p = p2;
- continue;
- }
-
- //# CHILD ELEMENT
- if (ch == '<')
- {
- p2 = parseElement(p, n, lineNr + countLines(p0, p));
- if (p2 == p)
- {
- /*
- printf("problem on element:%s. p2:%d p:%d\n",
- openTagName.c_str(), p2, p);
- */
- return p0;
- }
- p = p2;
- continue;
- }
- //# ENTITY
- if (ch=='&' && !cdata)
- {
- bool found = false;
- for (EntityEntry *ee = entities ; ee->value ; ee++)
- {
- int p2 = match(p, ee->escaped);
- if (p2>p)
- {
- data.push_back(ee->value);
- p = p2;
- found = true;
- break;
- }
- }
- if (!found)
- {
- error("unterminated entity");
- return -1;
- }
- continue;
- }
-
- //# NONE OF THE ABOVE
- data.push_back(ch);
- p++;
- }/*while*/
-
-
- n->value = data;
- //printf("%d : data:%s\n",p,data.c_str());
-
- //## Get close tag
- p = skipwhite(p);
- ch = peek(p);
- if (ch != '<')
- {
- error("no < for end tag\n");
- return p0;
- }
- p++;
- ch = peek(p);
- if (ch != '/')
- {
- error("no / on end tag");
- return p0;
- }
- p++;
- ch = peek(p);
- p = skipwhite(p);
- String closeTagName;
- p = getWord(p, closeTagName);
- if (openTagName != closeTagName)
- {
- error("Mismatched closing tag. Expected </%S>. Got '%S'.",
- openTagName.c_str(), closeTagName.c_str());
- return p0;
- }
- p = skipwhite(p);
- if (peek(p) != '>')
- {
- error("no > on end tag for '%s'", closeTagName.c_str());
- return p0;
- }
- p++;
- // printf("close element:%s\n",closeTagName.c_str());
- p = skipwhite(p);
- return p;
-}
-
-
-
-
-Element *Parser::parse(XMLCh *buf,int pos,int len)
-{
- parselen = len;
- parsebuf = buf;
- Element *rootNode = new Element("root");
- pos = parseVersion(pos);
- pos = parseDoctype(pos);
- pos = parseElement(pos, rootNode, 1);
- return rootNode;
-}
-
-
-Element *Parser::parse(const char *buf, int pos, int len)
-{
- XMLCh *charbuf = new XMLCh[len + 1];
- long i = 0;
- for ( ; i < len ; i++)
- charbuf[i] = (XMLCh)buf[i];
- charbuf[i] = '\0';
-
- Element *n = parse(charbuf, pos, len);
- delete[] charbuf;
- return n;
-}
-
-Element *Parser::parse(const String &buf)
-{
- long len = (long)buf.size();
- XMLCh *charbuf = new XMLCh[len + 1];
- long i = 0;
- for ( ; i < len ; i++)
- charbuf[i] = (XMLCh)buf[i];
- charbuf[i] = '\0';
-
- Element *n = parse(charbuf, 0, len);
- delete[] charbuf;
- return n;
-}
-
-Element *Parser::parseFile(const String &fileName)
-{
-
- //##### LOAD INTO A CHAR BUF, THEN CONVERT TO XMLCh
- FILE *f = fopen(fileName.c_str(), "rb");
- if (!f)
- return NULL;
-
- struct stat statBuf;
- if (fstat(fileno(f),&statBuf)<0)
- {
- fclose(f);
- return NULL;
- }
- long filelen = statBuf.st_size;
-
- //printf("length:%d\n",filelen);
- XMLCh *charbuf = new XMLCh[filelen + 1];
- for (XMLCh *p=charbuf ; !feof(f) ; p++)
- {
- *p = (XMLCh)fgetc(f);
- }
- fclose(f);
- charbuf[filelen] = '\0';
-
-
- /*
- printf("nrbytes:%d\n",wc_count);
- printf("buf:%ls\n======\n",charbuf);
- */
- Element *n = parse(charbuf, 0, filelen);
- delete[] charbuf;
- return n;
-}
-
-//########################################################################
-//########################################################################
-//## E N D X M L
-//########################################################################
-//########################################################################
-
-
-
-
-
-
-//########################################################################
-//########################################################################
-//## U R I
-//########################################################################
-//########################################################################
-
-//This would normally be a call to a UNICODE function
-#define isLetter(x) isalpha(x)
-
-/**
- * A class that implements the W3C URI resource reference.
- */
-class URI
-{
-public:
-
- typedef enum
- {
- SCHEME_NONE =0,
- SCHEME_DATA,
- SCHEME_HTTP,
- SCHEME_HTTPS,
- SCHEME_FTP,
- SCHEME_FILE,
- SCHEME_LDAP,
- SCHEME_MAILTO,
- SCHEME_NEWS,
- SCHEME_TELNET
- } SchemeTypes;
-
- /**
- *
- */
- URI()
- {
- init();
- }
-
- /**
- *
- */
- URI(const String &str)
- {
- init();
- parse(str);
- }
-
-
- /**
- *
- */
- URI(const char *str)
- {
- init();
- String domStr = str;
- parse(domStr);
- }
-
-
- /**
- *
- */
- URI(const URI &other)
- {
- init();
- assign(other);
- }
-
-
- /**
- *
- */
- URI &operator=(const URI &other)
- {
- init();
- assign(other);
- return *this;
- }
-
-
- /**
- *
- */
- virtual ~URI()
- {}
-
-
-
- /**
- *
- */
- virtual bool parse(const String &str);
-
- /**
- *
- */
- virtual String toString() const;
-
- /**
- *
- */
- virtual int getScheme() const;
-
- /**
- *
- */
- virtual String getSchemeStr() const;
-
- /**
- *
- */
- virtual String getAuthority() const;
-
- /**
- * Same as getAuthority, but if the port has been specified
- * as host:port , the port will not be included
- */
- virtual String getHost() const;
-
- /**
- *
- */
- virtual int getPort() const;
-
- /**
- *
- */
- virtual String getPath() const;
-
- /**
- *
- */
- virtual String getNativePath() const;
-
- /**
- *
- */
- virtual bool isAbsolute() const;
-
- /**
- *
- */
- virtual bool isOpaque() const;
-
- /**
- *
- */
- virtual String getQuery() const;
-
- /**
- *
- */
- virtual String getFragment() const;
-
- /**
- *
- */
- virtual URI resolve(const URI &other) const;
-
- /**
- *
- */
- virtual void normalize();
-
-private:
-
- /**
- *
- */
- void init()
- {
- parsebuf = NULL;
- parselen = 0;
- scheme = SCHEME_NONE;
- schemeStr = "";
- port = 0;
- authority = "";
- path = "";
- absolute = false;
- opaque = false;
- query = "";
- fragment = "";
- }
-
-
- /**
- *
- */
- void assign(const URI &other)
- {
- scheme = other.scheme;
- schemeStr = other.schemeStr;
- authority = other.authority;
- port = other.port;
- path = other.path;
- absolute = other.absolute;
- opaque = other.opaque;
- query = other.query;
- fragment = other.fragment;
- }
-
- int scheme;
-
- String schemeStr;
-
- String authority;
-
- bool portSpecified;
-
- int port;
-
- String path;
-
- bool absolute;
-
- bool opaque;
-
- String query;
-
- String fragment;
-
- void error(const char *fmt, ...);
-
- void trace(const char *fmt, ...);
-
-
- int peek(int p);
-
- int match(int p, const char *key);
-
- int parseScheme(int p);
-
- int parseHierarchicalPart(int p0);
-
- int parseQuery(int p0);
-
- int parseFragment(int p0);
-
- int parse(int p);
-
- char *parsebuf;
-
- int parselen;
-
-};
-
-
-
-typedef struct
-{
- int ival;
- const char *sval;
- int port;
-} LookupEntry;
-
-LookupEntry schemes[] =
-{
- { URI::SCHEME_DATA, "data:", 0 },
- { URI::SCHEME_HTTP, "http:", 80 },
- { URI::SCHEME_HTTPS, "https:", 443 },
- { URI::SCHEME_FTP, "ftp", 12 },
- { URI::SCHEME_FILE, "file:", 0 },
- { URI::SCHEME_LDAP, "ldap:", 123 },
- { URI::SCHEME_MAILTO, "mailto:", 25 },
- { URI::SCHEME_NEWS, "news:", 117 },
- { URI::SCHEME_TELNET, "telnet:", 23 },
- { 0, NULL, 0 }
-};
-
-
-String URI::toString() const
-{
- String str = schemeStr;
- if (authority.size() > 0)
- {
- str.append("//");
- str.append(authority);
- }
- str.append(path);
- if (query.size() > 0)
- {
- str.append("?");
- str.append(query);
- }
- if (fragment.size() > 0)
- {
- str.append("#");
- str.append(fragment);
- }
- return str;
-}
-
-
-int URI::getScheme() const
-{
- return scheme;
-}
-
-String URI::getSchemeStr() const
-{
- return schemeStr;
-}
-
-
-String URI::getAuthority() const
-{
- String ret = authority;
- if (portSpecified && port>=0)
- {
- char buf[7];
- snprintf(buf, 6, ":%6d", port);
- ret.append(buf);
- }
- return ret;
-}
-
-String URI::getHost() const
-{
- return authority;
-}
-
-int URI::getPort() const
-{
- return port;
-}
-
-
-String URI::getPath() const
-{
- return path;
-}
-
-String URI::getNativePath() const
-{
- String npath;
-#ifdef __WIN32__
- std::size_t firstChar = 0;
- if (path.size() >= 3)
- {
- if (path[0] == '/' &&
- isLetter(path[1]) &&
- path[2] == ':')
- firstChar++;
- }
- for (std::size_t i=firstChar ; i<path.size() ; i++)
- {
- XMLCh ch = (XMLCh) path[i];
- if (ch == '/')
- npath.push_back((XMLCh)'\\');
- else
- npath.push_back(ch);
- }
-#else
- npath = path;
-#endif
- return npath;
-}
-
-
-bool URI::isAbsolute() const
-{
- return absolute;
-}
-
-bool URI::isOpaque() const
-{
- return opaque;
-}
-
-
-String URI::getQuery() const
-{
- return query;
-}
-
-
-String URI::getFragment() const
-{
- return fragment;
-}
-
-
-URI URI::resolve(const URI &other) const
-{
- //### According to w3c, this is handled in 3 cases
-
- //## 1
- if (opaque || other.isAbsolute())
- return other;
-
- //## 2
- if (other.fragment.size() > 0 &&
- other.path.size() == 0 &&
- other.scheme == SCHEME_NONE &&
- other.authority.size() == 0 &&
- other.query.size() == 0 )
- {
- URI fragUri = *this;
- fragUri.fragment = other.fragment;
- return fragUri;
- }
-
- //## 3 http://www.ietf.org/rfc/rfc2396.txt, section 5.2
- URI newUri;
- //# 3.1
- newUri.scheme = scheme;
- newUri.schemeStr = schemeStr;
- newUri.query = other.query;
- newUri.fragment = other.fragment;
- if (other.authority.size() > 0)
- {
- //# 3.2
- if (absolute || other.absolute)
- newUri.absolute = true;
- newUri.authority = other.authority;
- newUri.port = other.port;//part of authority
- newUri.path = other.path;
- }
- else
- {
- //# 3.3
- if (other.absolute)
- {
- newUri.absolute = true;
- newUri.path = other.path;
- }
- else
- {
- std::size_t pos = path.find_last_of('/');
- if (pos != path.npos)
- {
- String tpath = path.substr(0, pos+1);
- tpath.append(other.path);
- newUri.path = tpath;
- }
- else
- newUri.path = other.path;
- }
- }
-
- newUri.normalize();
- return newUri;
-}
-
-
-
-/**
- * This follows the Java URI algorithm:
- * 1. All "." segments are removed.
- * 2. If a ".." segment is preceded by a non-".." segment
- * then both of these segments are removed. This step
- * is repeated until it is no longer applicable.
- * 3. If the path is relative, and if its first segment
- * contains a colon character (':'), then a "." segment
- * is prepended. This prevents a relative URI with a path
- * such as "a:b/c/d" from later being re-parsed as an
- * opaque URI with a scheme of "a" and a scheme-specific
- * part of "b/c/d". (Deviation from RFC 2396)
- */
-void URI::normalize()
-{
- std::vector<String> segments;
-
- //## Collect segments
- if (path.size()<2)
- return;
- bool abs = false;
- std::size_t pos=0;
- if (path[0]=='/')
- {
- abs = true;
- pos++;
- }
- while (pos < path.size())
- {
- std::size_t pos2 = path.find('/', pos);
- if (pos2==path.npos)
- {
- String seg = path.substr(pos);
- //printf("last segment:%s\n", seg.c_str());
- segments.push_back(seg);
- break;
- }
- if (pos2>pos)
- {
- String seg = path.substr(pos, pos2-pos);
- //printf("segment:%s\n", seg.c_str());
- segments.push_back(seg);
- }
- pos = pos2;
- pos++;
- }
-
- //## Clean up (normalize) segments
- bool edited = false;
- std::vector<String>::iterator iter;
- for (iter=segments.begin() ; iter!=segments.end() ; )
- {
- String s = *iter;
- if (s == ".")
- {
- iter = segments.erase(iter);
- edited = true;
- }
- else if (s == ".." &&
- iter != segments.begin() &&
- *(iter-1) != "..")
- {
- iter--; //back up, then erase two entries
- iter = segments.erase(iter);
- iter = segments.erase(iter);
- edited = true;
- }
- else
- iter++;
- }
-
- //## Rebuild path, if necessary
- if (edited)
- {
- path.clear();
- if (abs)
- {
- path.append("/");
- }
- std::vector<String>::iterator iter;
- for (iter=segments.begin() ; iter!=segments.end() ; iter++)
- {
- if (iter != segments.begin())
- path.append("/");
- path.append(*iter);
- }
- }
-
-}
-
-
-
-//#########################################################################
-//# M E S S A G E S
-//#########################################################################
-
-void URI::error(const char *fmt, ...)
-{
- va_list args;
- fprintf(stderr, "URI error: ");
- va_start(args, fmt);
- vfprintf(stderr, fmt, args);
- va_end(args);
- fprintf(stderr, "\n");
-}
-
-void URI::trace(const char *fmt, ...)
-{
- va_list args;
- fprintf(stdout, "URI: ");
- va_start(args, fmt);
- vfprintf(stdout, fmt, args);
- va_end(args);
- fprintf(stdout, "\n");
-}
-
-
-
-
-//#########################################################################
-//# P A R S I N G
-//#########################################################################
-
-
-
-int URI::peek(int p)
-{
- if (p<0 || p>=parselen)
- return -1;
- return parsebuf[p];
-}
-
-
-
-int URI::match(int p0, const char *key)
-{
- int p = p0;
- while (p < parselen)
- {
- if (*key == '\0')
- return p;
- else if (*key != parsebuf[p])
- break;
- p++; key++;
- }
- return p0;
-}
-
-//#########################################################################
-//# Parsing is performed according to:
-//# http://www.gbiv.com/protocols/uri/rfc/rfc3986.html#components
-//#########################################################################
-
-int URI::parseScheme(int p0)
-{
- int p = p0;
- for (LookupEntry *entry = schemes; entry->sval ; entry++)
- {
- int p2 = match(p, entry->sval);
- if (p2 > p)
- {
- schemeStr = entry->sval;
- scheme = entry->ival;
- port = entry->port;
- p = p2;
- return p;
- }
- }
-
- return p;
-}
-
-
-int URI::parseHierarchicalPart(int p0)
-{
- int p = p0;
- int ch;
-
- //# Authority field (host and port, for example)
- int p2 = match(p, "//");
- if (p2 > p)
- {
- p = p2;
- portSpecified = false;
- String portStr;
- while (p < parselen)
- {
- ch = peek(p);
- if (ch == '/')
- break;
- else if (ch == ':')
- portSpecified = true;
- else if (portSpecified)
- portStr.push_back((XMLCh)ch);
- else
- authority.push_back((XMLCh)ch);
- p++;
- }
- if (portStr.size() > 0)
- {
- char *pstr = (char *)portStr.c_str();
- char *endStr;
- long val = strtol(pstr, &endStr, 10);
- if (endStr > pstr) //successful parse?
- port = val;
- }
- }
-
- //# Are we absolute?
- ch = peek(p);
- if (isLetter(ch) && peek(p+1)==':')
- {
- absolute = true;
- path.push_back((XMLCh)'/');
- }
- else if (ch == '/')
- {
- absolute = true;
- if (p>p0) //in other words, if '/' is not the first char
- opaque = true;
- path.push_back((XMLCh)ch);
- p++;
- }
-
- while (p < parselen)
- {
- ch = peek(p);
- if (ch == '?' || ch == '#')
- break;
- path.push_back((XMLCh)ch);
- p++;
- }
-
- return p;
-}
-
-int URI::parseQuery(int p0)
-{
- int p = p0;
- int ch = peek(p);
- if (ch != '?')
- return p0;
-
- p++;
- while (p < parselen)
- {
- ch = peek(p);
- if (ch == '#')
- break;
- query.push_back((XMLCh)ch);
- p++;
- }
-
-
- return p;
-}
-
-int URI::parseFragment(int p0)
-{
-
- int p = p0;
- int ch = peek(p);
- if (ch != '#')
- return p0;
-
- p++;
- while (p < parselen)
- {
- ch = peek(p);
- if (ch == '?')
- break;
- fragment.push_back((XMLCh)ch);
- p++;
- }
-
-
- return p;
-}
-
-
-int URI::parse(int p0)
-{
-
- int p = p0;
-
- int p2 = parseScheme(p);
- if (p2 < 0)
- {
- error("Scheme");
- return -1;
- }
- p = p2;
-
-
- p2 = parseHierarchicalPart(p);
- if (p2 < 0)
- {
- error("Hierarchical part");
- return -1;
- }
- p = p2;
-
- p2 = parseQuery(p);
- if (p2 < 0)
- {
- error("Query");
- return -1;
- }
- p = p2;
-
-
- p2 = parseFragment(p);
- if (p2 < 0)
- {
- error("Fragment");
- return -1;
- }
- p = p2;
-
- return p;
-
-}
-
-
-
-bool URI::parse(const String &str)
-{
- init();
-
- parselen = str.size();
-
- String tmp;
- for (std::size_t i=0 ; i<str.size() ; i++)
- {
- XMLCh ch = (XMLCh) str[i];
- if (ch == '\\')
- tmp.push_back((XMLCh)'/');
- else
- tmp.push_back(ch);
- }
- parsebuf = (char *) tmp.c_str();
-
-
- int p = parse(0);
- normalize();
-
- if (p < 0)
- {
- error("Syntax error");
- return false;
- }
-
- //printf("uri:%s\n", toString().c_str());
- //printf("path:%s\n", path.c_str());
-
- return true;
-
-}
-
-
-
-
-
-
-
-
-//########################################################################
-//########################################################################
-//## M A K E
-//########################################################################
-//########################################################################
-
-//########################################################################
-//# Stat cache to speed up stat requests
-//########################################################################
-struct StatResult {
- int result;
- struct stat statInfo;
-};
-typedef std::map<String, StatResult> statCacheType;
-static statCacheType statCache;
-static int cachedStat(const String &f, struct stat *s) {
- //printf("Stat path: %s\n", f.c_str());
- std::pair<statCacheType::iterator, bool> result = statCache.insert(statCacheType::value_type(f, StatResult()));
- if (result.second) {
- result.first->second.result = stat(f.c_str(), &(result.first->second.statInfo));
- }
- *s = result.first->second.statInfo;
- return result.first->second.result;
-}
-static void removeFromStatCache(const String f) {
- //printf("Removing from cache: %s\n", f.c_str());
- statCache.erase(f);
-}
-
-//########################################################################
-//# Dir cache to speed up dir requests
-//########################################################################
-/*struct DirListing {
- bool available;
- std::vector<String> files;
- std::vector<String> dirs;
-};
-typedef std::map<String, DirListing > dirCacheType;
-static dirCacheType dirCache;
-static const DirListing &cachedDir(String fullDir)
-{
- String dirNative = getNativePath(fullDir);
- std::pair<dirCacheType::iterator,bool> result = dirCache.insert(dirCacheType::value_type(dirNative, DirListing()));
- if (result.second) {
- DIR *dir = opendir(dirNative.c_str());
- if (!dir)
- {
- error("Could not open directory %s : %s",
- dirNative.c_str(), strerror(errno));
- result.first->second.available = false;
- }
- else
- {
- result.first->second.available = true;
- while (true)
- {
- struct dirent *de = readdir(dir);
- if (!de)
- break;
-
- //Get the directory member name
- String s = de->d_name;
- if (s.size() == 0 || s[0] == '.')
- continue;
- String childName;
- if (dirName.size()>0)
- {
- childName.append(dirName);
- childName.append("/");
- }
- childName.append(s);
- String fullChild = baseDir;
- fullChild.append("/");
- fullChild.append(childName);
-
- if (isDirectory(fullChild))
- {
- //trace("directory: %s", childName.c_str());
- if (!listFiles(baseDir, childName, res))
- return false;
- continue;
- }
- else if (!isRegularFile(fullChild))
- {
- error("unknown file:%s", childName.c_str());
- return false;
- }
-
- //all done!
- res.push_back(childName);
-
- }
- closedir(dir);
- }
- }
- return result.first->second;
-}*/
-
-//########################################################################
-//# F I L E S E T
-//########################################################################
-/**
- * This is the descriptor for a <fileset> item
- */
-class FileSet
-{
-public:
-
- /**
- *
- */
- FileSet()
- {}
-
- /**
- *
- */
- FileSet(const FileSet &other)
- { assign(other); }
-
- /**
- *
- */
- FileSet &operator=(const FileSet &other)
- { assign(other); return *this; }
-
- /**
- *
- */
- virtual ~FileSet()
- {}
-
- /**
- *
- */
- String getDirectory() const
- { return directory; }
-
- /**
- *
- */
- void setDirectory(const String &val)
- { directory = val; }
-
- /**
- *
- */
- void setFiles(const std::vector<String> &val)
- { files = val; }
-
- /**
- *
- */
- std::vector<String> getFiles() const
- { return files; }
-
- /**
- *
- */
- void setIncludes(const std::vector<String> &val)
- { includes = val; }
-
- /**
- *
- */
- std::vector<String> getIncludes() const
- { return includes; }
-
- /**
- *
- */
- void setExcludes(const std::vector<String> &val)
- { excludes = val; }
-
- /**
- *
- */
- std::vector<String> getExcludes() const
- { return excludes; }
-
- /**
- *
- */
- std::size_t size() const
- { return files.size(); }
-
- /**
- *
- */
- String operator[](int index) const
- { return files[index]; }
-
- /**
- *
- */
- void clear()
- {
- directory = "";
- files.clear();
- includes.clear();
- excludes.clear();
- }
-
-
-private:
-
- void assign(const FileSet &other)
- {
- directory = other.directory;
- files = other.files;
- includes = other.includes;
- excludes = other.excludes;
- }
-
- String directory;
- std::vector<String> files;
- std::vector<String> includes;
- std::vector<String> excludes;
-};
-
-
-//########################################################################
-//# F I L E L I S T
-//########################################################################
-/**
- * This is a simpler, explicitly-named list of files
- */
-class FileList
-{
-public:
-
- /**
- *
- */
- FileList()
- {}
-
- /**
- *
- */
- FileList(const FileList &other)
- { assign(other); }
-
- /**
- *
- */
- FileList &operator=(const FileList &other)
- { assign(other); return *this; }
-
- /**
- *
- */
- virtual ~FileList()
- {}
-
- /**
- *
- */
- String getDirectory()
- { return directory; }
-
- /**
- *
- */
- void setDirectory(const String &val)
- { directory = val; }
-
- /**
- *
- */
- void setFiles(const std::vector<String> &val)
- { files = val; }
-
- /**
- *
- */
- std::vector<String> getFiles()
- { return files; }
-
- /**
- *
- */
- std::size_t size()
- { return files.size(); }
-
- /**
- *
- */
- String operator[](int index)
- { return files[index]; }
-
- /**
- *
- */
- void clear()
- {
- directory = "";
- files.clear();
- }
-
-
-private:
-
- void assign(const FileList &other)
- {
- directory = other.directory;
- files = other.files;
- }
-
- String directory;
- std::vector<String> files;
-};
-
-
-
-
-//########################################################################
-//# M A K E B A S E
-//########################################################################
-/**
- * Base class for all classes in this file
- */
-class MakeBase
-{
-public:
-
- MakeBase()
- { line = 0; }
- virtual ~MakeBase()
- {}
-
- /**
- * Return the URI of the file associated with this object
- */
- URI getURI()
- { return uri; }
-
- /**
- * Set the uri to the given string
- */
- void setURI(const String &uristr)
- { uri.parse(uristr); }
-
- /**
- * Set the number of threads that can be used
- */
- void setNumThreads(const int num)
- { numThreads = num; }
-
- /**
- * Resolve another path relative to this one
- */
- String resolve(const String &otherPath);
-
- /**
- * replace variable refs like ${a} with their values
- * Assume that the string has already been syntax validated
- */
- String eval(const String &s, const String &defaultVal);
-
- /**
- * replace variable refs like ${a} with their values
- * return true or false
- * Assume that the string has already been syntax validated
- */
- bool evalBool(const String &s, bool defaultVal);
-
- /**
- * replace variable refs like ${a} with their values
- * return the value parsed as an integer
- * Assume that the string has already been syntax validated
- */
- int evalInt(const String &s, int defaultVal);
-
- /**
- * Get an element attribute, performing substitutions if necessary
- */
- bool getAttribute(Element *elem, const String &name, String &result);
-
- /**
- * Get an element value, performing substitutions if necessary
- */
- bool getValue(Element *elem, String &result);
-
- /**
- * Set the current line number in the file
- */
- void setLine(int val)
- { line = val; }
-
- /**
- * Get the current line number in the file
- */
- int getLine()
- { return line; }
-
-
- /**
- * Set a property to a given value
- */
- virtual void setProperty(const String &name, const String &val)
- {
- properties[name] = val;
- }
-
- /**
- * Return a named property is found, else a null string
- */
- virtual String getProperty(const String &name)
- {
- String val;
- std::map<String, String>::iterator iter = properties.find(name);
- if (iter != properties.end())
- val = iter->second;
- String sval;
- if (!getSubstitutions(val, sval))
- return String();
- return sval;
- }
-
- /**
- * Return true if a named property is found, else false
- */
- virtual bool hasProperty(const String &name)
- {
- std::map<String, String>::iterator iter = properties.find(name);
- if (iter == properties.end())
- return false;
- return true;
- }
-
-
-protected:
-
- /**
- * The path to the file associated with this object
- */
- URI uri;
-
- /**
- * The number of threads that can be used
- */
- static int numThreads;
-
- /**
- * If this prefix is seen in a substitution, use an environment
- * variable.
- * example: <property environment="env"/>
- * ${env.JAVA_HOME}
- */
- String envPrefix;
-
- /**
- * If this prefix is seen in a substitution, use as a
- * pkg-config 'all' query
- * example: <property pkg-config="pc"/>
- * ${pc.gtkmm}
- */
- String pcPrefix;
-
- /**
- * If this prefix is seen in a substitution, use as a
- * pkg-config 'cflags' query
- * example: <property pkg-config="pcc"/>
- * ${pcc.gtkmm}
- */
- String pccPrefix;
-
- /**
- * If this prefix is seen in a substitution, use as a
- * pkg-config 'libs' query
- * example: <property pkg-config-libs="pcl"/>
- * ${pcl.gtkmm}
- */
- String pclPrefix;
-
- /**
- * If this prefix is seen in a substitution, use as a
- * Bazaar "bzr revno" query
- * example: <property subversion="svn"/> ???
- * ${bzr.Revision}
- */
- String bzrPrefix;
-
-
-
-
-
- /**
- * Print a printf()-like formatted error message
- */
- void error(const char *fmt, ...);
-
- /**
- * Print a printf()-like formatted trace message
- */
- void status(const char *fmt, ...);
-
- /**
- * Show target status
- */
- void targetstatus(const char *fmt, ...);
-
- /**
- * Print a printf()-like formatted trace message
- */
- void trace(const char *fmt, ...);
-
- /**
- * Check if a given string matches a given regex pattern
- */
- bool regexMatch(const String &str, const String &pattern);
-
- /**
- *
- */
- String getSuffix(const String &fname);
-
- /**
- * Break up a string into substrings delimited the characters
- * in delimiters. Null-length substrings are ignored
- */
- std::vector<String> tokenize(const String &val,
- const String &delimiters);
-
- /**
- * replace runs of whitespace with a space
- */
- String strip(const String &s);
-
- /**
- * remove leading whitespace from each line
- */
- String leftJustify(const String &s);
-
- /**
- * remove leading and trailing whitespace from string
- */
- String trim(const String &s);
-
- /**
- * Return a lower case version of the given string
- */
- String toLower(const String &s);
-
- /**
- * Return the native format of the canonical
- * path which we store
- */
- String getNativePath(const String &path);
-
- /**
- * Execute a shell command. Outbuf is a ref to a string
- * to catch the result.
- */
- bool executeCommand(const String &call,
- const String &inbuf,
- String &outbuf,
- String &errbuf);
- /**
- * List all directories in a given base and starting directory
- * It is usually called like:
- * bool ret = listDirectories("src", "", result);
- */
- bool listDirectories(const String &baseName,
- const String &dirname,
- std::vector<String> &res);
-
- /**
- * Find all files in the named directory
- */
- bool listFiles(const String &baseName,
- const String &dirname,
- std::vector<String> &result);
-
- /**
- * Perform a listing for a fileset
- */
- bool listFiles(MakeBase &propRef, FileSet &fileSet);
-
- /**
- * Parse a <patternset>
- */
- bool parsePatternSet(Element *elem,
- MakeBase &propRef,
- std::vector<String> &includes,
- std::vector<String> &excludes);
-
- /**
- * Parse a <fileset> entry, and determine which files
- * should be included
- */
- bool parseFileSet(Element *elem,
- MakeBase &propRef,
- FileSet &fileSet);
- /**
- * Parse a <filelist> entry
- */
- bool parseFileList(Element *elem,
- MakeBase &propRef,
- FileList &fileList);
-
- /**
- * Return this object's property list
- */
- virtual std::map<String, String> &getProperties()
- { return properties; }
-
-
- std::map<String, String> properties;
-
- /**
- * Create a directory, making intermediate dirs
- * if necessary
- */
- bool createDirectory(const String &dirname);
-
- /**
- * Delete a directory and its children if desired
- */
- bool removeDirectory(const String &dirName);
-
- /**
- * Copy a file from one name to another. Perform only if needed
- */
- bool copyFile(const String &srcFile, const String &destFile);
-
- /**
- * Delete a file
- */
- bool removeFile(const String &file);
-
- /**
- * Tests if the file exists
- */
- bool fileExists(const String &fileName);
-
- /**
- * Tests if the file exists and is a regular file
- */
- bool isRegularFile(const String &fileName);
-
- /**
- * Tests if the file exists and is a directory
- */
- bool isDirectory(const String &fileName);
-
- /**
- * Tests is the modification date of fileA is newer than fileB
- */
- bool isNewerThan(const String &fileA, const String &fileB);
-
-private:
-
- bool pkgConfigRecursive(const String packageName,
- const String &path,
- const String &prefix,
- int query,
- String &result,
- std::set<String> &deplist);
-
- /**
- * utility method to query for "all", "cflags", or "libs" for this package and its
- * dependencies. 0, 1, 2
- */
- bool pkgConfigQuery(const String &packageName, int query, String &result);
-
- /**
- * replace a variable ref like ${a} with a value
- */
- bool lookupProperty(const String &s, String &result);
-
- /**
- * called by getSubstitutions(). This is in case a looked-up string
- * has substitutions also.
- */
- bool getSubstitutionsRecursive(const String &s, String &result, int depth);
-
- /**
- * replace variable refs in a string like ${a} with their values
- */
- bool getSubstitutions(const String &s, String &result);
-
- int line;
-
-
-};
-
-int MakeBase::numThreads = 1;
-
-/**
- * Define the pkg-config class here, since it will be used in MakeBase method
- * implementations.
- */
-class PkgConfig : public MakeBase
-{
-
-public:
-
- /**
- *
- */
- PkgConfig()
- {
- path = ".";
- prefix = "/target";
- init();
- }
-
- /**
- *
- */
- PkgConfig(const PkgConfig &other)
- { assign(other); }
-
- /**
- *
- */
- PkgConfig &operator=(const PkgConfig &other)
- { assign(other); return *this; }
-
- /**
- *
- */
- virtual ~PkgConfig()
- { }
-
- /**
- *
- */
- virtual String getName()
- { return name; }
-
- /**
- *
- */
- virtual String getPath()
- { return path; }
-
- /**
- *
- */
- virtual void setPath(const String &val)
- { path = val; }
-
- /**
- *
- */
- virtual String getPrefix()
- { return prefix; }
-
- /**
- * Allow the user to override the prefix in the file
- */
- virtual void setPrefix(const String &val)
- { prefix = val; }
-
- /**
- *
- */
- virtual String getDescription()
- { return description; }
-
- /**
- *
- */
- virtual String getCflags()
- { return cflags; }
-
- /**
- *
- */
- virtual String getLibs()
- { return libs; }
-
- /**
- *
- */
- virtual String getAll()
- {
- String ret = cflags;
- ret.append(" ");
- ret.append(libs);
- return ret;
- }
-
- /**
- *
- */
- virtual String getVersion()
- { return version; }
-
- /**
- *
- */
- virtual int getMajorVersion()
- { return majorVersion; }
-
- /**
- *
- */
- virtual int getMinorVersion()
- { return minorVersion; }
-
- /**
- *
- */
- virtual int getMicroVersion()
- { return microVersion; }
-
- /**
- *
- */
- virtual std::map<String, String> &getAttributes()
- { return attrs; }
-
- /**
- *
- */
- virtual std::vector<String> &getRequireList()
- { return requireList; }
-
- /**
- * Read a file for its details
- */
- virtual bool readFile(const String &fileName);
-
- /**
- * Read a file for its details
- */
- virtual bool query(const String &name);
-
-private:
-
- void init()
- {
- //do not set path and prefix here
- name = "";
- description = "";
- cflags = "";
- libs = "";
- requires = "";
- version = "";
- majorVersion = 0;
- minorVersion = 0;
- microVersion = 0;
- fileName = "";
- attrs.clear();
- requireList.clear();
- }
-
- void assign(const PkgConfig &other)
- {
- name = other.name;
- path = other.path;
- prefix = other.prefix;
- description = other.description;
- cflags = other.cflags;
- libs = other.libs;
- requires = other.requires;
- version = other.version;
- majorVersion = other.majorVersion;
- minorVersion = other.minorVersion;
- microVersion = other.microVersion;
- fileName = other.fileName;
- attrs = other.attrs;
- requireList = other.requireList;
- }
-
-
-
- int get(int pos);
-
- int skipwhite(int pos);
-
- int getword(int pos, String &ret);
-
- /**
- * Very important
- */
- bool parseRequires();
-
- void parseVersion();
-
- bool parseLine(const String &lineBuf);
-
- bool parse(const String &buf);
-
- void dumpAttrs();
-
- String name;
-
- String path;
-
- String prefix;
-
- String description;
-
- String cflags;
-
- String libs;
-
- String requires;
-
- String version;
-
- int majorVersion;
-
- int minorVersion;
-
- int microVersion;
-
- String fileName;
-
- std::map<String, String> attrs;
-
- std::vector<String> requireList;
-
- char *parsebuf;
- int parselen;
-};
-
-/**
- * Execute the "bzr revno" command and return the result.
- * This is a simple, small class.
- */
-class BzrRevno : public MakeBase
-{
-public:
-
- /**
- * Safe way. Execute "bzr revno" and return the result.
- * Safe from changes in format.
- */
- bool query(String &res)
- {
- String cmd = "bzr revno";
-
- String outString, errString;
- bool ret = executeCommand(cmd.c_str(), "", outString, errString);
- if (!ret)
- {
- error("error executing '%s': %s", cmd.c_str(), errString.c_str());
- return false;
- }
- res = outString;
- return true;
- }
-};
-
-/**
- * Execute the "svn info" command and parse the result.
- * This is a simple, small class. Define here, because it
- * is used by MakeBase implementation methods.
- */
-class SvnInfo : public MakeBase
-{
-public:
-
-#if 0
- /**
- * Safe way. Execute "svn info --xml" and parse the result. Search for
- * elements/attributes. Safe from changes in format.
- */
- bool query(const String &name, String &res)
- {
- String cmd = "svn info --xml";
-
- String outString, errString;
- bool ret = executeCommand(cmd.c_str(), "", outString, errString);
- if (!ret)
- {
- error("error executing '%s': %s", cmd.c_str(), errString.c_str());
- return false;
- }
- Parser parser;
- Element *elem = parser.parse(outString);
- if (!elem)
- {
- error("error parsing 'svn info' xml result: %s", outString.c_str());
- return false;
- }
-
- res = elem->getTagValue(name);
- if (res.size()==0)
- {
- res = elem->getTagAttribute("entry", name);
- }
- return true;
- }
-#else
-
-
- /**
- * Universal way. Parse the file directly. Not so safe from
- * changes in format.
- */
- bool query(const String &name, String &res)
- {
- String fileName = resolve(".svn/entries");
- String nFileName = getNativePath(fileName);
-
- std::map<String, String> properties;
-
- FILE *f = fopen(nFileName.c_str(), "r");
- if (!f)
- {
- error("could not open SVN 'entries' file");
- return false;
- }
-
- const char *fieldNames[] =
- {
- "format-nbr",
- "name",
- "kind",
- "revision",
- "url",
- "repos",
- "schedule",
- "text-time",
- "checksum",
- "committed-date",
- "committed-rev",
- "last-author",
- "has-props",
- "has-prop-mods",
- "cachable-props",
- };
-
- for (int i=0 ; i<15 ; i++)
- {
- inbuf[0] = '\0';
- if (feof(f) || !fgets(inbuf, 255, f))
- break;
- properties[fieldNames[i]] = trim(inbuf);
- }
- fclose(f);
-
- res = properties[name];
-
- return true;
- }
-
-private:
-
- char inbuf[256];
-
-#endif
-
-};
-
-
-
-
-
-
-/**
- * Print a printf()-like formatted error message
- */
-void MakeBase::error(const char *fmt, ...)
-{
- va_list args;
- va_start(args,fmt);
- fprintf(stderr, "Make error line %d: ", line);
- vfprintf(stderr, fmt, args);
- fprintf(stderr, "\n");
- va_end(args) ;
-}
-
-
-
-/**
- * Print a printf()-like formatted trace message
- */
-void MakeBase::status(const char *fmt, ...)
-{
- va_list args;
- //fprintf(stdout, " ");
- va_start(args,fmt);
- vfprintf(stdout, fmt, args);
- va_end(args);
- fprintf(stdout, "\n");
- fflush(stdout);
-}
-
-
-/**
- * Print a printf()-like formatted trace message
- */
-void MakeBase::trace(const char *fmt, ...)
-{
- va_list args;
- fprintf(stdout, "Make: ");
- va_start(args,fmt);
- vfprintf(stdout, fmt, args);
- va_end(args) ;
- fprintf(stdout, "\n");
- fflush(stdout);
-}
-
-
-
-/**
- * Resolve another path relative to this one
- */
-String MakeBase::resolve(const String &otherPath)
-{
- URI otherURI(otherPath);
- URI fullURI = uri.resolve(otherURI);
- String ret = fullURI.toString();
- return ret;
-}
-
-
-
-/**
- * Check if a given string matches a given regex pattern
- */
-bool MakeBase::regexMatch(const String &str, const String &pattern)
-{
- int res = slre_match(pattern.c_str(), str.c_str(), str.length(), NULL, 0, SLRE_IGNORE_CASE);
-
- bool ret = true;
- if (res < 0)
- {
- ret = false;
-
- // error cases
- if (res < -1)
- {
- String err;
- switch(res)
- {
- case SLRE_UNEXPECTED_QUANTIFIER:
- err = "unexpected quantifier"; break;
- case SLRE_UNBALANCED_BRACKETS:
- err = "unbalanced brackets"; break;
- case SLRE_INTERNAL_ERROR:
- err = "internal error"; break;
- case SLRE_INVALID_CHARACTER_SET:
- err = "invald character set"; break;
- case SLRE_INVALID_METACHARACTER:
- err = "invalid meta character"; break;
- default:
- err = "unknown error"; break;
- }
- error("regex failure (%s) while parsing [%s]!\n", err.c_str(), pattern.c_str());
- }
- }
-
- return ret;
-}
-
-/**
- * Return the suffix, if any, of a file name
- */
-String MakeBase::getSuffix(const String &fname)
-{
- if (fname.size() < 2)
- return "";
- std::size_t pos = fname.find_last_of('.');
- if (pos == fname.npos)
- return "";
- pos++;
- String res = fname.substr(pos, fname.size()-pos);
- //trace("suffix:%s", res.c_str());
- return res;
-}
-
-
-
-/**
- * Break up a string into substrings delimited the characters
- * in delimiters. Null-length substrings are ignored
- */
-std::vector<String> MakeBase::tokenize(const String &str,
- const String &delimiters)
-{
-
- std::vector<String> res;
- char *del = (char *)delimiters.c_str();
- String dmp;
- for (std::size_t i=0 ; i<str.size() ; i++)
- {
- char ch = str[i];
- char *p = (char *)0;
- for (p=del ; *p ; p++)
- if (*p == ch)
- break;
- if (*p)
- {
- if (dmp.size() > 0)
- {
- res.push_back(dmp);
- dmp.clear();
- }
- }
- else
- {
- dmp.push_back(ch);
- }
- }
- //Add tail
- if (dmp.size() > 0)
- {
- res.push_back(dmp);
- dmp.clear();
- }
-
- return res;
-}
-
-
-
-/**
- * replace runs of whitespace with a single space
- */
-String MakeBase::strip(const String &s)
-{
- int len = s.size();
- String stripped;
- for (int i = 0 ; i<len ; i++)
- {
- char ch = s[i];
- if (isspace(ch))
- {
- stripped.push_back(' ');
- for ( ; i<len ; i++)
- {
- ch = s[i];
- if (!isspace(ch))
- {
- stripped.push_back(ch);
- break;
- }
- }
- }
- else
- {
- stripped.push_back(ch);
- }
- }
- return stripped;
-}
-
-/**
- * remove leading whitespace from each line
- */
-String MakeBase::leftJustify(const String &s)
-{
- String out;
- int len = s.size();
- for (int i = 0 ; i<len ; )
- {
- char ch;
- //Skip to first visible character
- while (i<len)
- {
- ch = s[i];
- if (ch == '\n' || ch == '\r'
- || !isspace(ch))
- break;
- i++;
- }
- //Copy the rest of the line
- while (i<len)
- {
- ch = s[i];
- if (ch == '\n' || ch == '\r')
- {
- if (ch != '\r')
- out.push_back('\n');
- i++;
- break;
- }
- else
- {
- out.push_back(ch);
- }
- i++;
- }
- }
- return out;
-}
-
-
-/**
- * Removes whitespace from beginning and end of a string
- */
-String MakeBase::trim(const String &s)
-{
- if (s.size() < 1)
- return s;
-
- //Find first non-ws char
- std::size_t begin = 0;
- for ( ; begin < s.size() ; begin++)
- {
- if (!isspace(s[begin]))
- break;
- }
-
- //Find first non-ws char, going in reverse
- std::size_t end = s.size() - 1;
- for ( ; end > begin ; end--)
- {
- if (!isspace(s[end]))
- break;
- }
- //trace("begin:%d end:%d", begin, end);
-
- String res = s.substr(begin, end-begin+1);
- return res;
-}
-
-
-/**
- * Return a lower case version of the given string
- */
-String MakeBase::toLower(const String &s)
-{
- if (s.size()==0)
- return s;
-
- String ret;
- for(std::size_t i=0; i<s.size() ; i++)
- {
- ret.push_back(tolower(s[i]));
- }
- return ret;
-}
-
-
-/**
- * Return the native format of the canonical
- * path which we store
- */
-String MakeBase::getNativePath(const String &path)
-{
-#ifdef __WIN32__
- String npath;
- std::size_t firstChar = 0;
- if (path.size() >= 3)
- {
- if (path[0] == '/' &&
- isalpha(path[1]) &&
- path[2] == ':')
- firstChar++;
- }
- for (std::size_t i=firstChar ; i<path.size() ; i++)
- {
- char ch = path[i];
- if (ch == '/')
- npath.push_back('\\');
- else
- npath.push_back(ch);
- }
- return npath;
-#else
- return path;
-#endif
-}
-
-
-#ifdef __WIN32__
-#include <tchar.h>
-
-static String win32LastError()
-{
-
- DWORD dw = GetLastError();
-
- LPVOID str;
- FormatMessage(
- FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- dw,
- 0,
- (LPTSTR) &str,
- 0, NULL );
- LPTSTR p = _tcschr((const char *)str, _T('\r'));
- if(p != NULL)
- { // lose CRLF
- *p = _T('\0');
- }
- String ret = (char *)str;
- LocalFree(str);
-
- return ret;
-}
-#endif
-
-
-
-
-#ifdef __WIN32__
-
-/**
- * Execute a system call, using pipes to send data to the
- * program's stdin, and reading stdout and stderr.
- */
-bool MakeBase::executeCommand(const String &command,
- const String &inbuf,
- String &outbuf,
- String &errbuf)
-{
-
-// status("============ cmd ============\n%s\n=============================",
-// command.c_str());
-
- outbuf.clear();
- errbuf.clear();
-
-
- /*
- I really hate having win32 code in this program, but the
- read buffer in command.com and cmd.exe are just too small
- for the large commands we need for compiling and linking.
- */
-
- bool ret = true;
-
- //# Allocate a separate buffer for safety
- char *paramBuf = new char[command.size() + 1];
- if (!paramBuf)
- {
- error("executeCommand cannot allocate command buffer");
- return false;
- }
- strcpy(paramBuf, (char *)command.c_str());
-
- //# Go to http://msdn2.microsoft.com/en-us/library/ms682499.aspx
- //# to see how Win32 pipes work
-
- //# Create pipes
- SECURITY_ATTRIBUTES saAttr;
- saAttr.nLength = sizeof(SECURITY_ATTRIBUTES);
- saAttr.bInheritHandle = TRUE;
- saAttr.lpSecurityDescriptor = NULL;
- HANDLE stdinRead, stdinWrite;
- HANDLE stdoutRead, stdoutWrite;
- HANDLE stderrRead, stderrWrite;
- if (!CreatePipe(&stdinRead, &stdinWrite, &saAttr, 0))
- {
- error("executeProgram: could not create pipe");
- delete[] paramBuf;
- return false;
- }
- SetHandleInformation(stdinWrite, HANDLE_FLAG_INHERIT, 0);
- if (!CreatePipe(&stdoutRead, &stdoutWrite, &saAttr, 0))
- {
- error("executeProgram: could not create pipe");
- delete[] paramBuf;
- return false;
- }
- SetHandleInformation(stdoutRead, HANDLE_FLAG_INHERIT, 0);
- if (&outbuf != &errbuf) {
- if (!CreatePipe(&stderrRead, &stderrWrite, &saAttr, 0))
- {
- error("executeProgram: could not create pipe");
- delete[] paramBuf;
- return false;
- }
- SetHandleInformation(stderrRead, HANDLE_FLAG_INHERIT, 0);
- } else {
- stderrRead = stdoutRead;
- stderrWrite = stdoutWrite;
- }
-
- // Create the process
- STARTUPINFO siStartupInfo;
- PROCESS_INFORMATION piProcessInfo;
- memset(&siStartupInfo, 0, sizeof(siStartupInfo));
- memset(&piProcessInfo, 0, sizeof(piProcessInfo));
- siStartupInfo.cb = sizeof(siStartupInfo);
- siStartupInfo.hStdError = stderrWrite;
- siStartupInfo.hStdOutput = stdoutWrite;
- siStartupInfo.hStdInput = stdinRead;
- siStartupInfo.dwFlags |= STARTF_USESTDHANDLES;
-
- if (!CreateProcess(NULL, paramBuf, NULL, NULL, true,
- 0, NULL, NULL, &siStartupInfo,
- &piProcessInfo))
- {
- error("executeCommand : could not create process : %s",
- win32LastError().c_str());
- ret = false;
- }
-
- delete[] paramBuf;
-
- DWORD bytesWritten;
- if (inbuf.size()>0 &&
- !WriteFile(stdinWrite, inbuf.c_str(), inbuf.size(),
- &bytesWritten, NULL))
- {
- error("executeCommand: could not write to pipe");
- return false;
- }
- if (!CloseHandle(stdinWrite))
- {
- error("executeCommand: could not close write pipe");
- return false;
- }
- if (!CloseHandle(stdoutWrite))
- {
- error("executeCommand: could not close read pipe");
- return false;
- }
- if (stdoutWrite != stderrWrite && !CloseHandle(stderrWrite))
- {
- error("executeCommand: could not close read pipe");
- return false;
- }
-
- bool lastLoop = false;
- while (true)
- {
- DWORD avail;
- DWORD bytesRead;
- char readBuf[4096];
-
- //trace("## stderr");
- PeekNamedPipe(stderrRead, NULL, 0, NULL, &avail, NULL);
- if (avail > 0)
- {
- bytesRead = 0;
- if (avail>4096) avail = 4096;
- ReadFile(stderrRead, readBuf, avail, &bytesRead, NULL);
- if (bytesRead > 0)
- {
- for (unsigned int i=0 ; i<bytesRead ; i++)
- errbuf.push_back(readBuf[i]);
- }
- }
-
- //trace("## stdout");
- PeekNamedPipe(stdoutRead, NULL, 0, NULL, &avail, NULL);
- if (avail > 0)
- {
- bytesRead = 0;
- if (avail>4096) avail = 4096;
- ReadFile(stdoutRead, readBuf, avail, &bytesRead, NULL);
- if (bytesRead > 0)
- {
- for (unsigned int i=0 ; i<bytesRead ; i++)
- outbuf.push_back(readBuf[i]);
- }
- }
-
- //Was this the final check after program done?
- if (lastLoop)
- break;
-
- DWORD exitCode;
- GetExitCodeProcess(piProcessInfo.hProcess, &exitCode);
- if (exitCode != STILL_ACTIVE)
- lastLoop = true;
-
- Sleep(10);
- }
- //trace("outbuf:%s", outbuf.c_str());
- if (!CloseHandle(stdoutRead))
- {
- error("executeCommand: could not close read pipe");
- return false;
- }
- if (stdoutRead != stderrRead && !CloseHandle(stderrRead))
- {
- error("executeCommand: could not close read pipe");
- return false;
- }
-
- DWORD exitCode;
- GetExitCodeProcess(piProcessInfo.hProcess, &exitCode);
- //trace("exit code:%d", exitCode);
- if (exitCode != 0)
- {
- ret = false;
- }
-
- CloseHandle(piProcessInfo.hProcess);
- CloseHandle(piProcessInfo.hThread);
-
- return ret;
-
-}
-
-#else /*do it unix style*/
-
-#include <sys/wait.h>
-
-
-
-/**
- * Execute a system call, using pipes to send data to the
- * program's stdin, and reading stdout and stderr.
- */
-bool MakeBase::executeCommand(const String &command,
- const String &inbuf,
- String &outbuf,
- String &errbuf)
-{
-
- status("============ cmd ============\n%s\n=============================",
- command.c_str());
-
- outbuf.clear();
- errbuf.clear();
-
-
- int outfds[2];
- if (pipe(outfds) < 0)
- return false;
- int errfds[2];
- if (pipe(errfds) < 0)
- return false;
- int pid = fork();
- if (pid < 0)
- {
- close(outfds[0]);
- close(outfds[1]);
- close(errfds[0]);
- close(errfds[1]);
- error("launch of command '%s' failed : %s",
- command.c_str(), strerror(errno));
- return false;
- }
- else if (pid > 0) // parent
- {
- close(outfds[1]);
- close(errfds[1]);
- }
- else // == 0, child
- {
- close(outfds[0]);
- dup2(outfds[1], STDOUT_FILENO);
- close(outfds[1]);
- close(errfds[0]);
- dup2(errfds[1], STDERR_FILENO);
- close(errfds[1]);
-
- char *args[4];
- args[0] = (char *)"sh";
- args[1] = (char *)"-c";
- args[2] = (char *)command.c_str();
- args[3] = NULL;
- execv("/bin/sh", args);
- exit(EXIT_FAILURE);
- }
-
- String outb;
- String errb;
-
- int outRead = outfds[0];
- int errRead = errfds[0];
- int max = outRead;
- if (errRead > max)
- max = errRead;
-
- bool outOpen = true;
- bool errOpen = true;
-
- while (outOpen || errOpen)
- {
- char ch;
- fd_set fdset;
- FD_ZERO(&fdset);
- if (outOpen)
- FD_SET(outRead, &fdset);
- if (errOpen)
- FD_SET(errRead, &fdset);
- int ret = select(max+1, &fdset, NULL, NULL, NULL);
- if (ret < 0)
- break;
- if (FD_ISSET(outRead, &fdset))
- {
- if (read(outRead, &ch, 1) <= 0)
- { outOpen = false; }
- else if (ch <= 0)
- { /* outOpen = false; */ }
- else
- { outb.push_back(ch); }
- }
- if (FD_ISSET(errRead, &fdset))
- {
- if (read(errRead, &ch, 1) <= 0)
- { errOpen = false; }
- else if (ch <= 0)
- { /* errOpen = false; */ }
- else
- { errb.push_back(ch); }
- }
- }
-
- int childReturnValue;
- wait(&childReturnValue);
-
- close(outRead);
- close(errRead);
-
- outbuf = outb;
- errbuf = errb;
-
- if (childReturnValue != 0)
- {
- error("exec of command '%s' failed : %s",
- command.c_str(), strerror(childReturnValue));
- return false;
- }
-
- return true;
-}
-
-#endif
-
-
-
-
-bool MakeBase::listDirectories(const String &baseName,
- const String &dirName,
- std::vector<String> &res)
-{
- res.push_back(dirName);
- String fullPath = baseName;
- if (dirName.size()>0)
- {
- if (dirName[0]!='/') fullPath.append("/");
- fullPath.append(dirName);
- }
- DIR *dir = opendir(fullPath.c_str());
- while (true)
- {
- struct dirent *de = readdir(dir);
- if (!de)
- break;
-
- //Get the directory member name
- String s = de->d_name;
- if (s.size() == 0 || s[0] == '.')
- continue;
- String childName = dirName;
- childName.append("/");
- childName.append(s);
-
- String fullChildPath = baseName;
- fullChildPath.append("/");
- fullChildPath.append(childName);
- struct stat finfo;
- String childNative = getNativePath(fullChildPath);
- if (cachedStat(childNative, &finfo)<0)
- {
- error("cannot stat file:%s", childNative.c_str());
- }
- else if (S_ISDIR(finfo.st_mode))
- {
- //trace("directory: %s", childName.c_str());
- if (!listDirectories(baseName, childName, res))
- return false;
- }
- }
- closedir(dir);
-
- return true;
-}
-
-
-bool MakeBase::listFiles(const String &baseDir,
- const String &dirName,
- std::vector<String> &res)
-{
- String fullDir = baseDir;
- if (dirName.size()>0)
- {
- fullDir.append("/");
- fullDir.append(dirName);
- }
- String dirNative = getNativePath(fullDir);
-
- std::vector<String> subdirs;
- DIR *dir = opendir(dirNative.c_str());
- if (!dir)
- {
- error("Could not open directory %s : %s",
- dirNative.c_str(), strerror(errno));
- return false;
- }
- while (true)
- {
- struct dirent *de = readdir(dir);
- if (!de)
- break;
-
- //Get the directory member name
- String s = de->d_name;
- if (s.size() == 0 || s[0] == '.')
- continue;
- String childName;
- if (dirName.size()>0)
- {
- childName.append(dirName);
- childName.append("/");
- }
- childName.append(s);
- String fullChild = baseDir;
- fullChild.append("/");
- fullChild.append(childName);
-
- if (isDirectory(fullChild))
- {
- //trace("directory: %s", childName.c_str());
- if (!listFiles(baseDir, childName, res))
- return false;
- continue;
- }
- else if (!isRegularFile(fullChild))
- {
- error("unknown file:%s", childName.c_str());
- return false;
- }
-
- //all done!
- res.push_back(childName);
-
- }
- closedir(dir);
-
- return true;
-}
-
-
-/**
- * Several different classes extend MakeBase. By "propRef", we mean
- * the one holding the properties. Likely "Make" itself
- */
-bool MakeBase::listFiles(MakeBase &propRef, FileSet &fileSet)
-{
- //before doing the list, resolve any property references
- //that might have been specified in the directory name, such as ${src}
- String fsDir = fileSet.getDirectory();
- String dir;
- if (!propRef.getSubstitutions(fsDir, dir))
- return false;
- String baseDir = propRef.resolve(dir);
- std::vector<String> fileList;
- if (!listFiles(baseDir, "", fileList))
- return false;
-
- std::vector<String> includes = fileSet.getIncludes();
- std::vector<String> excludes = fileSet.getExcludes();
-
- std::vector<String> incs;
- std::vector<String>::iterator iter;
-
- std::sort(fileList.begin(), fileList.end());
-
- //If there are <includes>, then add files to the output
- //in the order of the include list
- if (includes.size()==0)
- incs = fileList;
- else
- {
- for (iter = includes.begin() ; iter != includes.end() ; iter++)
- {
- String &pattern = *iter;
- std::vector<String>::iterator siter;
- for (siter = fileList.begin() ; siter != fileList.end() ; siter++)
- {
- String s = *siter;
- if (regexMatch(s, pattern))
- {
- //trace("INCLUDED:%s", s.c_str());
- incs.push_back(s);
- }
- }
- }
- }
-
- //Now trim off the <excludes>
- std::vector<String> res;
- for (iter = incs.begin() ; iter != incs.end() ; iter++)
- {
- String s = *iter;
- bool skipme = false;
- std::vector<String>::iterator siter;
- for (siter = excludes.begin() ; siter != excludes.end() ; siter++)
- {
- String &pattern = *siter;
- if (regexMatch(s, pattern))
- {
- //trace("EXCLUDED:%s", s.c_str());
- skipme = true;
- break;
- }
- }
- if (!skipme)
- res.push_back(s);
- }
-
- fileSet.setFiles(res);
-
- return true;
-}
-
-
-/**
- * 0 == all, 1 = cflags, 2 = libs
- */
-bool MakeBase::pkgConfigRecursive(const String packageName,
- const String &path,
- const String &prefix,
- int query,
- String &result,
- std::set<String> &deplist)
-{
- PkgConfig pkgConfig;
- if (path.size() > 0)
- pkgConfig.setPath(path);
- if (prefix.size() > 0)
- pkgConfig.setPrefix(prefix);
- if (!pkgConfig.query(packageName))
- return false;
- if (query == 0)
- result = pkgConfig.getAll();
- else if (query == 1)
- result = pkgConfig.getCflags();
- else
- result = pkgConfig.getLibs();
- deplist.insert(packageName);
- std::vector<String> list = pkgConfig.getRequireList();
- for (std::size_t i = 0 ; i<list.size() ; i++)
- {
- String depPkgName = list[i];
- if (deplist.find(depPkgName) != deplist.end())
- continue;
- String val;
- if (!pkgConfigRecursive(depPkgName, path, prefix, query, val, deplist))
- {
- error("Based on 'requires' attribute of package '%s'", packageName.c_str());
- return false;
- }
- result.append(" ");
- result.append(val);
- }
-
- return true;
-}
-
-bool MakeBase::pkgConfigQuery(const String &packageName, int query, String &result)
-{
- std::set<String> deplist;
- String path = getProperty("pkg-config-path");
- if (path.size()>0)
- path = resolve(path);
- String prefix = getProperty("pkg-config-prefix");
- String val;
- if (!pkgConfigRecursive(packageName, path, prefix, query, val, deplist))
- return false;
- result = val;
- return true;
-}
-
-
-
-/**
- * replace a variable ref like ${a} with a value
- */
-bool MakeBase::lookupProperty(const String &propertyName, String &result)
-{
- String varname = propertyName;
- if (envPrefix.size() > 0 &&
- varname.compare(0, envPrefix.size(), envPrefix) == 0)
- {
- varname = varname.substr(envPrefix.size());
- char *envstr = getenv(varname.c_str());
- if (!envstr)
- {
- error("environment variable '%s' not defined", varname.c_str());
- return false;
- }
- result = envstr;
- }
- else if (pcPrefix.size() > 0 &&
- varname.compare(0, pcPrefix.size(), pcPrefix) == 0)
- {
- varname = varname.substr(pcPrefix.size());
- String val;
- if (!pkgConfigQuery(varname, 0, val))
- return false;
- result = val;
- }
- else if (pccPrefix.size() > 0 &&
- varname.compare(0, pccPrefix.size(), pccPrefix) == 0)
- {
- varname = varname.substr(pccPrefix.size());
- String val;
- if (!pkgConfigQuery(varname, 1, val))
- return false;
- result = val;
- }
- else if (pclPrefix.size() > 0 &&
- varname.compare(0, pclPrefix.size(), pclPrefix) == 0)
- {
- varname = varname.substr(pclPrefix.size());
- String val;
- if (!pkgConfigQuery(varname, 2, val))
- return false;
- result = val;
- }
- else if (bzrPrefix.size() > 0 &&
- varname.compare(0, bzrPrefix.size(), bzrPrefix) == 0)
- {
- varname = varname.substr(bzrPrefix.size());
- String val;
- //SvnInfo svnInfo;
- BzrRevno bzrRevno;
- if (varname == "revision")
- {
- if (!bzrRevno.query(val))
- return "";
- result = "r"+val;
- }
- /*if (!svnInfo.query(varname, val))
- return false;
- result = val;*/
- }
- else
- {
- std::map<String, String>::iterator iter;
- iter = properties.find(varname);
- if (iter != properties.end())
- {
- result = iter->second;
- }
- else
- {
- error("property '%s' not found", varname.c_str());
- return false;
- }
- }
- return true;
-}
-
-
-
-
-/**
- * Analyse a string, looking for any substitutions or other
- * things that need resolution
- */
-bool MakeBase::getSubstitutionsRecursive(const String &str,
- String &result, int depth)
-{
- if (depth > 10)
- {
- error("nesting of substitutions too deep (>10) for '%s'",
- str.c_str());
- return false;
- }
- String s = trim(str);
- int len = (int)s.size();
- String val;
- for (int i=0 ; i<len ; i++)
- {
- char ch = s[i];
- if (ch == '$' && s[i+1] == '{')
- {
- String varname;
- int j = i+2;
- for ( ; j<len ; j++)
- {
- ch = s[j];
- if (ch == '$' && s[j+1] == '{')
- {
- error("attribute %s cannot have nested variable references",
- s.c_str());
- return false;
- }
- else if (ch == '}')
- {
- varname = trim(varname);
- String varval;
- if (!lookupProperty(varname, varval))
- return false;
- String varval2;
- //Now see if the answer has ${} in it, too
- if (!getSubstitutionsRecursive(varval, varval2, depth + 1))
- return false;
- val.append(varval2);
- break;
- }
- else
- {
- varname.push_back(ch);
- }
- }
- i = j;
- }
- else
- {
- val.push_back(ch);
- }
- }
- result = val;
- return true;
-}
-
-/**
- * Analyse a string, looking for any substitutions or other
- * things that need resilution
- */
-bool MakeBase::getSubstitutions(const String &str, String &result)
-{
- return getSubstitutionsRecursive(str, result, 0);
-}
-
-
-
-/**
- * replace variable refs like ${a} with their values
- * Assume that the string has already been syntax validated
- */
-String MakeBase::eval(const String &s, const String &defaultVal)
-{
- if (s.size()==0)
- return defaultVal;
- String ret;
- if (getSubstitutions(s, ret))
- return ret;
- else
- return defaultVal;
-}
-
-
-/**
- * replace variable refs like ${a} with their values
- * return true or false
- * Assume that the string has already been syntax validated
- */
-bool MakeBase::evalBool(const String &s, bool defaultVal)
-{
- if (s.size()==0)
- return defaultVal;
- String val = eval(s, "false");
- if (val.size()==0)
- return defaultVal;
- if (val == "true" || val == "TRUE")
- return true;
- else
- return false;
-}
-
-int MakeBase::evalInt(const String &s, int defaultVal)
-{
- if (s.size()==0) {
- return defaultVal;
- }
- int val = atoi(s.c_str());
- // perhaps some error checking, but... bah! waste of time
- return val;
-}
-
-/**
- * Get a string attribute, testing it for proper syntax and
- * property names.
- */
-bool MakeBase::getAttribute(Element *elem, const String &name,
- String &result)
-{
- String s = elem->getAttribute(name);
- String tmp;
- bool ret = getSubstitutions(s, tmp);
- if (ret)
- result = s; //assign -if- ok
- return ret;
-}
-
-
-/**
- * Get a string value, testing it for proper syntax and
- * property names.
- */
-bool MakeBase::getValue(Element *elem, String &result)
-{
- String s = elem->getValue();
- String tmp;
- bool ret = getSubstitutions(s, tmp);
- if (ret)
- result = s; //assign -if- ok
- return ret;
-}
-
-
-
-
-/**
- * Parse a <patternset> entry
- */
-bool MakeBase::parsePatternSet(Element *elem,
- MakeBase &propRef,
- std::vector<String> &includes,
- std::vector<String> &excludes
- )
-{
- std::vector<Element *> children = elem->getChildren();
- for (std::size_t i=0 ; i<children.size() ; i++)
- {
- Element *child = children[i];
- String tagName = child->getName();
- if (tagName == "exclude")
- {
- String fname;
- if (!propRef.getAttribute(child, "name", fname))
- return false;
- //trace("EXCLUDE: %s", fname.c_str());
- excludes.push_back(fname);
- }
- else if (tagName == "include")
- {
- String fname;
- if (!propRef.getAttribute(child, "name", fname))
- return false;
- //trace("INCLUDE: %s", fname.c_str());
- includes.push_back(fname);
- }
- }
-
- return true;
-}
-
-
-
-
-/**
- * Parse a <fileset> entry, and determine which files
- * should be included
- */
-bool MakeBase::parseFileSet(Element *elem,
- MakeBase &propRef,
- FileSet &fileSet)
-{
- String name = elem->getName();
- if (name != "fileset")
- {
- error("expected <fileset>");
- return false;
- }
-
-
- std::vector<String> includes;
- std::vector<String> excludes;
-
- //A fileset has one implied patternset
- if (!parsePatternSet(elem, propRef, includes, excludes))
- {
- return false;
- }
- //Look for child tags, including more patternsets
- std::vector<Element *> children = elem->getChildren();
- for (std::size_t i=0 ; i<children.size() ; i++)
- {
- Element *child = children[i];
- String tagName = child->getName();
- if (tagName == "patternset")
- {
- if (!parsePatternSet(child, propRef, includes, excludes))
- {
- return false;
- }
- }
- }
-
- String dir;
- //Now do the stuff
- //Get the base directory for reading file names
- if (!propRef.getAttribute(elem, "dir", dir))
- return false;
-
- fileSet.setDirectory(dir);
- fileSet.setIncludes(includes);
- fileSet.setExcludes(excludes);
-
- /*
- std::vector<String> fileList;
- if (dir.size() > 0)
- {
- String baseDir = propRef.resolve(dir);
- if (!listFiles(baseDir, "", includes, excludes, fileList))
- return false;
- }
- std::sort(fileList.begin(), fileList.end());
- result = fileList;
- */
-
-
- /*
- for (std::size_t i=0 ; i<result.size() ; i++)
- {
- trace("RES:%s", result[i].c_str());
- }
- */
-
-
- return true;
-}
-
-/**
- * Parse a <filelist> entry. This is far simpler than FileSet,
- * since no directory scanning is needed. The file names are listed
- * explicitly.
- */
-bool MakeBase::parseFileList(Element *elem,
- MakeBase &propRef,
- FileList &fileList)
-{
- std::vector<String> fnames;
- //Look for child tags, namely "file"
- std::vector<Element *> children = elem->getChildren();
- for (std::size_t i=0 ; i<children.size() ; i++)
- {
- Element *child = children[i];
- String tagName = child->getName();
- if (tagName == "file")
- {
- String fname = child->getAttribute("name");
- if (fname.size()==0)
- {
- error("<file> element requires name="" attribute");
- return false;
- }
- fnames.push_back(fname);
- }
- else
- {
- error("tag <%s> not allowed in <fileset>", tagName.c_str());
- return false;
- }
- }
-
- String dir;
- //Get the base directory for reading file names
- if (!propRef.getAttribute(elem, "dir", dir))
- return false;
- fileList.setDirectory(dir);
- fileList.setFiles(fnames);
-
- return true;
-}
-
-
-
-/**
- * Create a directory, making intermediate dirs
- * if necessary
- */
-bool MakeBase::createDirectory(const String &dirname)
-{
- //trace("## createDirectory: %s", dirname.c_str());
- //## first check if it exists
- struct stat finfo;
- String nativeDir = getNativePath(dirname);
- char *cnative = (char *) nativeDir.c_str();
-#ifdef __WIN32__
- if (strlen(cnative)==2 && cnative[1]==':')
- return true;
-#endif
- if (cachedStat(nativeDir, &finfo)==0)
- {
- if (!S_ISDIR(finfo.st_mode))
- {
- error("mkdir: file %s exists but is not a directory",
- cnative);
- return false;
- }
- else //exists
- {
- return true;
- }
- }
-
- //## 2: pull off the last path segment, if any,
- //## to make the dir 'above' this one, if necessary
- std::size_t pos = dirname.find_last_of('/');
- if (pos>0 && pos != dirname.npos)
- {
- String subpath = dirname.substr(0, pos);
- //A letter root (c:) ?
- if (!createDirectory(subpath))
- return false;
- }
-
- //## 3: now make
-#ifdef __WIN32__
- if (mkdir(cnative)<0)
-#else
- if (mkdir(cnative, S_IRWXU | S_IRWXG | S_IRWXO)<0)
-#endif
- {
- error("cannot make directory '%s' : %s",
- cnative, strerror(errno));
- return false;
- }
-
- removeFromStatCache(nativeDir);
-
- return true;
-}
-
-
-/**
- * Remove a directory recursively
- */
-bool MakeBase::removeDirectory(const String &dirName)
-{
- char *dname = (char *)dirName.c_str();
-
- DIR *dir = opendir(dname);
- if (!dir)
- {
- //# Let this fail nicely.
- return true;
- //error("error opening directory %s : %s", dname, strerror(errno));
- //return false;
- }
-
- while (true)
- {
- struct dirent *de = readdir(dir);
- if (!de)
- break;
-
- //Get the directory member name
- String s = de->d_name;
- if (s.size() == 0 || s[0] == '.')
- continue;
- String childName;
- if (dirName.size() > 0)
- {
- childName.append(dirName);
- childName.append("/");
- }
- childName.append(s);
-
-
- struct stat finfo;
- String childNative = getNativePath(childName);
- char *cnative = (char *)childNative.c_str();
- if (cachedStat(childNative, &finfo)<0)
- {
- error("cannot stat file:%s", cnative);
- }
- else if (S_ISDIR(finfo.st_mode))
- {
- //trace("DEL dir: %s", childName.c_str());
- if (!removeDirectory(childName))
- {
- return false;
- }
- }
- else if (!S_ISREG(finfo.st_mode))
- {
- //trace("not regular: %s", cnative);
- }
- else
- {
- //trace("DEL file: %s", childName.c_str());
- if (!removeFile(childName))
- {
- return false;
- }
- }
- }
- closedir(dir);
-
- //Now delete the directory
- String native = getNativePath(dirName);
- if (rmdir(native.c_str())<0)
- {
- error("could not delete directory %s : %s",
- native.c_str() , strerror(errno));
- return false;
- }
-
- removeFromStatCache(native);
-
- return true;
-
-}
-
-
-/**
- * Copy a file from one name to another. Perform only if needed
- */
-bool MakeBase::copyFile(const String &srcFile, const String &destFile)
-{
- //# 1 Check up-to-date times
- String srcNative = getNativePath(srcFile);
- struct stat srcinfo;
- if (cachedStat(srcNative, &srcinfo)<0)
- {
- error("source file %s for copy does not exist",
- srcNative.c_str());
- return false;
- }
-
- String destNative = getNativePath(destFile);
- struct stat destinfo;
- if (cachedStat(destNative, &destinfo)==0)
- {
- if (destinfo.st_mtime >= srcinfo.st_mtime)
- return true;
- }
-
- //# 2 prepare a destination directory if necessary
- std::size_t pos = destFile.find_last_of('/');
- if (pos != destFile.npos)
- {
- String subpath = destFile.substr(0, pos);
- if (!createDirectory(subpath))
- return false;
- }
-
- //# 3 do the data copy
-#ifndef __WIN32__
-
- FILE *srcf = fopen(srcNative.c_str(), "rb");
- if (!srcf)
- {
- error("copyFile cannot open '%s' for reading", srcNative.c_str());
- return false;
- }
- FILE *destf = fopen(destNative.c_str(), "wb");
- if (!destf)
- {
- fclose(srcf);
- error("copyFile cannot open %s for writing", srcNative.c_str());
- return false;
- }
-
- while (!feof(srcf))
- {
- int ch = fgetc(srcf);
- if (ch<0)
- break;
- fputc(ch, destf);
- }
-
- fclose(destf);
- fclose(srcf);
-
-#else
-
- if (!CopyFile(srcNative.c_str(), destNative.c_str(), false))
- {
- error("copyFile from %s to %s failed",
- srcNative.c_str(), destNative.c_str());
- return false;
- }
-
-#endif /* __WIN32__ */
-
- removeFromStatCache(destNative);
-
- return true;
-}
-
-
-/**
- * Delete a file
- */
-bool MakeBase::removeFile(const String &file)
-{
- String native = getNativePath(file);
-
- if (!fileExists(native))
- {
- return true;
- }
-
-#ifdef WIN32
- // On Windows 'remove' will only delete files
-
- if (remove(native.c_str())<0)
- {
- if (errno==EACCES)
- {
- error("File %s is read-only", native.c_str());
- }
- else if (errno==ENOENT)
- {
- error("File %s does not exist or is a directory", native.c_str());
- }
- else
- {
- error("Failed to delete file %s: %s", native.c_str(), strerror(errno));
- }
- return false;
- }
-
-#else
-
- if (!isRegularFile(native))
- {
- error("File %s does not exist or is not a regular file", native.c_str());
- return false;
- }
-
- if (remove(native.c_str())<0)
- {
- if (errno==EACCES)
- {
- error("File %s is read-only", native.c_str());
- }
- else
- {
- error(
- errno==EACCES ? "File %s is read-only" :
- errno==ENOENT ? "File %s does not exist or is a directory" :
- "Failed to delete file %s: %s", native.c_str());
- }
- return false;
- }
-
-#endif
-
- removeFromStatCache(native);
-
- return true;
-}
-
-
-/**
- * Tests if the file exists
- */
-bool MakeBase::fileExists(const String &fileName)
-{
- String native = getNativePath(fileName);
- struct stat finfo;
-
- //Exists?
- if (cachedStat(native, &finfo)<0)
- return false;
-
- return true;
-}
-
-
-/**
- * Tests if the file exists and is a regular file
- */
-bool MakeBase::isRegularFile(const String &fileName)
-{
- String native = getNativePath(fileName);
- struct stat finfo;
-
- //Exists?
- if (cachedStat(native, &finfo)<0)
- return false;
-
-
- //check the file mode
- if (!S_ISREG(finfo.st_mode))
- return false;
-
- return true;
-}
-
-/**
- * Tests if the file exists and is a directory
- */
-bool MakeBase::isDirectory(const String &fileName)
-{
- String native = getNativePath(fileName);
- struct stat finfo;
-
- //Exists?
- if (cachedStat(native, &finfo)<0)
- return false;
-
-
- //check the file mode
- if (!S_ISDIR(finfo.st_mode))
- return false;
-
- return true;
-}
-
-
-
-/**
- * Tests is the modification of fileA is newer than fileB
- */
-bool MakeBase::isNewerThan(const String &fileA, const String &fileB)
-{
- //trace("isNewerThan:'%s' , '%s'", fileA.c_str(), fileB.c_str());
- String nativeA = getNativePath(fileA);
- struct stat infoA;
- //IF source does not exist, NOT newer
- if (cachedStat(nativeA, &infoA)<0)
- {
- return false;
- }
-
- String nativeB = getNativePath(fileB);
- struct stat infoB;
- //IF dest does not exist, YES, newer
- if (cachedStat(nativeB, &infoB)<0)
- {
- return true;
- }
-
- //check the actual times
- if (infoA.st_mtime > infoB.st_mtime)
- {
- return true;
- }
-
- return false;
-}
-
-
-//########################################################################
-//# P K G C O N F I G
-//########################################################################
-
-
-/**
- * Get a character from the buffer at pos. If out of range,
- * return -1 for safety
- */
-int PkgConfig::get(int pos)
-{
- if (pos>parselen)
- return -1;
- return parsebuf[pos];
-}
-
-
-
-/**
- * Skip over all whitespace characters beginning at pos. Return
- * the position of the first non-whitespace character.
- * Pkg-config is line-oriented, so check for newline
- */
-int PkgConfig::skipwhite(int pos)
-{
- while (pos < parselen)
- {
- int ch = get(pos);
- if (ch < 0)
- break;
- if (!isspace(ch))
- break;
- pos++;
- }
- return pos;
-}
-
-
-/**
- * Parse the buffer beginning at pos, for a word. Fill
- * 'ret' with the result. Return the position after the
- * word.
- */
-int PkgConfig::getword(int pos, String &ret)
-{
- while (pos < parselen)
- {
- int ch = get(pos);
- if (ch < 0)
- break;
- if (!isalnum(ch) && ch != '_' && ch != '-' && ch != '+' && ch != '.')
- break;
- ret.push_back((char)ch);
- pos++;
- }
- return pos;
-}
-
-bool PkgConfig::parseRequires()
-{
- if (requires.size() == 0)
- return true;
- parsebuf = (char *)requires.c_str();
- parselen = requires.size();
- int pos = 0;
- while (pos < parselen)
- {
- pos = skipwhite(pos);
- String val;
- int pos2 = getword(pos, val);
- if (pos2 == pos)
- break;
- pos = pos2;
- //trace("val %s", val.c_str());
- requireList.push_back(val);
- }
- return true;
-}
-
-
-static int getint(const String str)
-{
- char *s = (char *)str.c_str();
- char *ends = NULL;
- long val = strtol(s, &ends, 10);
- if (ends == s)
- return 0L;
- else
- return val;
-}
-
-void PkgConfig::parseVersion()
-{
- if (version.size() == 0)
- return;
- String s1, s2, s3;
- std::size_t pos = 0;
- std::size_t pos2 = version.find('.', pos);
- if (pos2 == version.npos)
- {
- s1 = version;
- }
- else
- {
- s1 = version.substr(pos, pos2-pos);
- pos = pos2;
- pos++;
- if (pos < version.size())
- {
- pos2 = version.find('.', pos);
- if (pos2 == version.npos)
- {
- s2 = version.substr(pos, version.size()-pos);
- }
- else
- {
- s2 = version.substr(pos, pos2-pos);
- pos = pos2;
- pos++;
- if (pos < version.size())
- s3 = version.substr(pos, pos2-pos);
- }
- }
- }
-
- majorVersion = getint(s1);
- minorVersion = getint(s2);
- microVersion = getint(s3);
- //trace("version:%d.%d.%d", majorVersion,
- // minorVersion, microVersion );
-}
-
-
-bool PkgConfig::parseLine(const String &lineBuf)
-{
- parsebuf = (char *)lineBuf.c_str();
- parselen = lineBuf.size();
- int pos = 0;
-
- while (pos < parselen)
- {
- String attrName;
- pos = skipwhite(pos);
- int ch = get(pos);
- if (ch == '#')
- {
- //comment. eat the rest of the line
- while (pos < parselen)
- {
- ch = get(pos);
- if (ch == '\n' || ch < 0)
- break;
- pos++;
- }
- continue;
- }
- pos = getword(pos, attrName);
- if (attrName.size() == 0)
- continue;
-
- pos = skipwhite(pos);
- ch = get(pos);
- if (ch != ':' && ch != '=')
- {
- error("expected ':' or '='");
- return false;
- }
- pos++;
- pos = skipwhite(pos);
- String attrVal;
- while (pos < parselen)
- {
- ch = get(pos);
- if (ch == '\n' || ch < 0)
- break;
- else if (ch == '$' && get(pos+1) == '{')
- {
- //# this is a ${substitution}
- pos += 2;
- String subName;
- while (pos < parselen)
- {
- ch = get(pos);
- if (ch < 0)
- {
- error("unterminated substitution");
- return false;
- }
- else if (ch == '}')
- break;
- else
- subName.push_back((char)ch);
- pos++;
- }
- //trace("subName:%s %s", subName.c_str(), prefix.c_str());
- if (subName == "prefix" && prefix.size()>0)
- {
- attrVal.append(prefix);
- //trace("prefix override:%s", prefix.c_str());
- }
- else
- {
- String subVal = attrs[subName];
- //trace("subVal:%s", subVal.c_str());
- attrVal.append(subVal);
- }
- }
- else
- attrVal.push_back((char)ch);
- pos++;
- }
-
- attrVal = trim(attrVal);
- attrs[attrName] = attrVal;
-
- String attrNameL = toLower(attrName);
-
- if (attrNameL == "name")
- name = attrVal;
- else if (attrNameL == "description")
- description = attrVal;
- else if (attrNameL == "cflags")
- cflags = attrVal;
- else if (attrNameL == "libs")
- libs = attrVal;
- else if (attrNameL == "requires")
- requires = attrVal;
- else if (attrNameL == "version")
- version = attrVal;
-
- //trace("name:'%s' value:'%s'",
- // attrName.c_str(), attrVal.c_str());
- }
-
- return true;
-}
-
-
-bool PkgConfig::parse(const String &buf)
-{
- init();
-
- String line;
- int lineNr = 0;
- for (std::size_t p=0 ; p<buf.size() ; p++)
- {
- int ch = buf[p];
- if (ch == '\n' || ch == '\r')
- {
- if (!parseLine(line))
- return false;
- line.clear();
- lineNr++;
- }
- else
- {
- line.push_back(ch);
- }
- }
- if (line.size()>0)
- {
- if (!parseLine(line))
- return false;
- }
-
- parseRequires();
- parseVersion();
-
- return true;
-}
-
-
-
-
-void PkgConfig::dumpAttrs()
-{
- //trace("### PkgConfig attributes for %s", fileName.c_str());
- std::map<String, String>::iterator iter;
- for (iter=attrs.begin() ; iter!=attrs.end() ; iter++)
- {
- trace(" %s = %s", iter->first.c_str(), iter->second.c_str());
- }
-}
-
-
-bool PkgConfig::readFile(const String &fname)
-{
- fileName = getNativePath(fname);
-
- FILE *f = fopen(fileName.c_str(), "r");
- if (!f)
- {
- error("cannot open file '%s' for reading", fileName.c_str());
- return false;
- }
- String buf;
- while (true)
- {
- int ch = fgetc(f);
- if (ch < 0)
- break;
- buf.push_back((char)ch);
- }
- fclose(f);
-
- //trace("####### File:\n%s", buf.c_str());
- if (!parse(buf))
- {
- return false;
- }
-
- //dumpAttrs();
-
- return true;
-}
-
-
-
-bool PkgConfig::query(const String &pkgName)
-{
- name = pkgName;
-
- String fname = path;
- fname.append("/");
- fname.append(name);
- fname.append(".pc");
-
- if (!readFile(fname))
- {
- error("Cannot find package '%s'. Do you have it installed?",
- pkgName.c_str());
- return false;
- }
-
- return true;
-}
-
-
-//########################################################################
-//# D E P T O O L
-//########################################################################
-
-
-
-/**
- * Class which holds information for each file.
- */
-class FileRec
-{
-public:
-
- typedef enum
- {
- UNKNOWN,
- CFILE,
- HFILE,
- OFILE
- } FileType;
-
- /**
- * Constructor
- */
- FileRec()
- { init(); type = UNKNOWN; }
-
- /**
- * Copy constructor
- */
- FileRec(const FileRec &other)
- { init(); assign(other); }
- /**
- * Constructor
- */
- FileRec(int typeVal)
- { init(); type = typeVal; }
- /**
- * Assignment operator
- */
- FileRec &operator=(const FileRec &other)
- { init(); assign(other); return *this; }
-
-
- /**
- * Destructor
- */
- ~FileRec()
- {}
-
- /**
- * Directory part of the file name
- */
- String path;
-
- /**
- * Base name, sans directory and suffix
- */
- String baseName;
-
- /**
- * File extension, such as cpp or h
- */
- String suffix;
-
- /**
- * Type of file: CFILE, HFILE, OFILE
- */
- int type;
-
- /**
- * Used to list files ref'd by this one
- */
- std::map<String, FileRec *> files;
-
-
-private:
-
- void init()
- {
- }
-
- void assign(const FileRec &other)
- {
- type = other.type;
- baseName = other.baseName;
- suffix = other.suffix;
- files = other.files;
- }
-
-};
-
-
-
-/**
- * Simpler dependency record
- */
-class DepRec
-{
-public:
-
- /**
- * Constructor
- */
- DepRec()
- {init();}
-
- /**
- * Copy constructor
- */
- DepRec(const DepRec &other)
- {init(); assign(other);}
- /**
- * Constructor
- */
- DepRec(const String &fname)
- {init(); name = fname; }
- /**
- * Assignment operator
- */
- DepRec &operator=(const DepRec &other)
- {init(); assign(other); return *this;}
-
-
- /**
- * Destructor
- */
- ~DepRec()
- {}
-
- /**
- * Directory part of the file name
- */
- String path;
-
- /**
- * Base name, without the path and suffix
- */
- String name;
-
- /**
- * Suffix of the source
- */
- String suffix;
-
-
- /**
- * Used to list files ref'd by this one
- */
- std::vector<String> files;
-
-
-private:
-
- void init()
- {
- }
-
- void assign(const DepRec &other)
- {
- path = other.path;
- name = other.name;
- suffix = other.suffix;
- files = other.files; //avoid recursion
- }
-
-};
-
-
-class DepTool : public MakeBase
-{
-public:
-
- /**
- * Constructor
- */
- DepTool()
- { init(); }
-
- /**
- * Copy constructor
- */
- DepTool(const DepTool &other)
- { init(); assign(other); }
-
- /**
- * Assignment operator
- */
- DepTool &operator=(const DepTool &other)
- { init(); assign(other); return *this; }
-
-
- /**
- * Destructor
- */
- ~DepTool()
- {}
-
-
- /**
- * Reset this section of code
- */
- virtual void init();
-
- /**
- * Reset this section of code
- */
- virtual void assign(const DepTool &other)
- {
- }
-
- /**
- * Sets the source directory which will be scanned
- */
- virtual void setSourceDirectory(const String &val)
- { sourceDir = val; }
-
- /**
- * Returns the source directory which will be scanned
- */
- virtual String getSourceDirectory()
- { return sourceDir; }
-
- /**
- * Sets the list of files within the directory to analyze
- */
- virtual void setFileList(const std::vector<String> &list)
- { fileList = list; }
-
- /**
- * Creates the list of all file names which will be
- * candidates for further processing. Reads make.exclude
- * to see which files for directories to leave out.
- */
- virtual bool createFileList();
-
-
- /**
- * Generates the forward dependency list
- */
- virtual bool generateDependencies();
-
-
- /**
- * Generates the forward dependency list, saving the file
- */
- virtual bool generateDependencies(const String &);
-
-
- /**
- * Load a dependency file
- */
- std::vector<DepRec> loadDepFile(const String &fileName);
-
- /**
- * Load a dependency file, generating one if necessary
- */
- std::vector<DepRec> getDepFile(const String &fileName,
- bool forceRefresh);
-
- /**
- * Save a dependency file
- */
- bool saveDepFile(const String &fileName);
-
-
-private:
-
-
- /**
- *
- */
- void parseName(const String &fullname,
- String &path,
- String &basename,
- String &suffix);
-
- /**
- *
- */
- int get(int pos);
-
- /**
- *
- */
- int skipwhite(int pos);
-
- /**
- *
- */
- int getword(int pos, String &ret);
-
- /**
- *
- */
- bool sequ(int pos, const char *key);
-
- /**
- *
- */
- bool addIncludeFile(FileRec *frec, const String &fname);
-
- /**
- *
- */
- bool scanFile(const String &fname, FileRec *frec);
-
- /**
- *
- */
- bool processDependency(FileRec *ofile, FileRec *include);
-
- /**
- *
- */
- String sourceDir;
-
- /**
- *
- */
- std::vector<String> fileList;
-
- /**
- *
- */
- std::vector<String> directories;
-
- /**
- * A list of all files which will be processed for
- * dependencies.
- */
- std::map<String, FileRec *> allFiles;
-
- /**
- * The list of .o files, and the
- * dependencies upon them.
- */
- std::map<String, FileRec *> oFiles;
-
- int depFileSize;
- char *depFileBuf;
-
- static const int readBufSize = 8192;
- char readBuf[8193];//byte larger
-
-};
-
-
-
-
-
-/**
- * Clean up after processing. Called by the destructor, but should
- * also be called before the object is reused.
- */
-void DepTool::init()
-{
- sourceDir = ".";
-
- fileList.clear();
- directories.clear();
-
- //clear output file list
- std::map<String, FileRec *>::iterator iter;
- for (iter=oFiles.begin(); iter!=oFiles.end() ; iter++)
- delete iter->second;
- oFiles.clear();
-
- //allFiles actually contains the master copies. delete them
- for (iter= allFiles.begin(); iter!=allFiles.end() ; iter++)
- delete iter->second;
- allFiles.clear();
-
-}
-
-
-
-
-/**
- * Parse a full path name into path, base name, and suffix
- */
-void DepTool::parseName(const String &fullname,
- String &path,
- String &basename,
- String &suffix)
-{
- if (fullname.size() < 2)
- return;
-
- std::size_t pos = fullname.find_last_of('/');
- if (pos != fullname.npos && pos<fullname.size()-1)
- {
- path = fullname.substr(0, pos);
- pos++;
- basename = fullname.substr(pos, fullname.size()-pos);
- }
- else
- {
- path = "";
- basename = fullname;
- }
-
- pos = basename.find_last_of('.');
- if (pos != basename.npos && pos<basename.size()-1)
- {
- suffix = basename.substr(pos+1, basename.size()-pos-1);
- basename = basename.substr(0, pos);
- }
-
- //trace("parsename:%s %s %s", path.c_str(),
- // basename.c_str(), suffix.c_str());
-}
-
-
-
-/**
- * Generate our internal file list.
- */
-bool DepTool::createFileList()
-{
-
- for (std::size_t i=0 ; i<fileList.size() ; i++)
- {
- String fileName = fileList[i];
- //trace("## FileName:%s", fileName.c_str());
- String path;
- String basename;
- String sfx;
- parseName(fileName, path, basename, sfx);
- if (sfx == "cpp" || sfx == "c" || sfx == "cxx" ||
- sfx == "cc" || sfx == "CC")
- {
- FileRec *fe = new FileRec(FileRec::CFILE);
- fe->path = path;
- fe->baseName = basename;
- fe->suffix = sfx;
- allFiles[fileName] = fe;
- }
- else if (sfx == "h" || sfx == "hh" ||
- sfx == "hpp" || sfx == "hxx")
- {
- FileRec *fe = new FileRec(FileRec::HFILE);
- fe->path = path;
- fe->baseName = basename;
- fe->suffix = sfx;
- allFiles[fileName] = fe;
- }
- }
-
- if (!listDirectories(sourceDir, "", directories))
- return false;
-
- return true;
-}
-
-
-
-
-
-/**
- * Get a character from the buffer at pos. If out of range,
- * return -1 for safety
- */
-int DepTool::get(int pos)
-{
- if (pos>depFileSize)
- return -1;
- return depFileBuf[pos];
-}
-
-
-
-/**
- * Skip over all whitespace characters beginning at pos. Return
- * the position of the first non-whitespace character.
- */
-int DepTool::skipwhite(int pos)
-{
- while (pos < depFileSize)
- {
- int ch = get(pos);
- if (ch < 0)
- break;
- if (!isspace(ch))
- break;
- pos++;
- }
- return pos;
-}
-
-
-/**
- * Parse the buffer beginning at pos, for a word. Fill
- * 'ret' with the result. Return the position after the
- * word.
- */
-int DepTool::getword(int pos, String &ret)
-{
- while (pos < depFileSize)
- {
- int ch = get(pos);
- if (ch < 0)
- break;
- if (isspace(ch))
- break;
- ret.push_back((char)ch);
- pos++;
- }
- return pos;
-}
-
-/**
- * Return whether the sequence of characters in the buffer
- * beginning at pos match the key, for the length of the key
- */
-bool DepTool::sequ(int pos, const char *key)
-{
- while (*key)
- {
- if (*key != get(pos))
- return false;
- key++; pos++;
- }
- return true;
-}
-
-
-
-/**
- * Add an include file name to a file record. If the name
- * is not found in allFiles explicitly, try prepending include
- * directory names to it and try again.
- */
-bool DepTool::addIncludeFile(FileRec *frec, const String &iname)
-{
- //# if the name is an exact match to a path name
- //# in allFiles, like "myinc.h"
- std::map<String, FileRec *>::iterator iter =
- allFiles.find(iname);
- if (iter != allFiles.end()) //already exists
- {
- //h file in same dir
- FileRec *other = iter->second;
- //trace("local: '%s'", iname.c_str());
- frec->files[iname] = other;
- return true;
- }
- else
- {
- //## Ok, it was not found directly
- //look in other dirs
- std::vector<String>::iterator diter;
- for (diter=directories.begin() ;
- diter!=directories.end() ; diter++)
- {
- String dfname = *diter;
- dfname.append("/");
- dfname.append(iname);
- URI fullPathURI(dfname); //normalize path name
- String fullPath = fullPathURI.getPath();
- if (fullPath[0] == '/')
- fullPath = fullPath.substr(1);
- //trace("Normalized %s to %s", dfname.c_str(), fullPath.c_str());
- iter = allFiles.find(fullPath);
- if (iter != allFiles.end())
- {
- FileRec *other = iter->second;
- //trace("other: '%s'", iname.c_str());
- frec->files[fullPath] = other;
- return true;
- }
- }
- }
- return true;
-}
-
-
-
-/**
- * Lightly parse a file to find the #include directives. Do
- * a bit of state machine stuff to make sure that the directive
- * is valid. (Like not in a comment).
- */
-bool DepTool::scanFile(const String &fname, FileRec *frec)
-{
- String fileName;
- if (sourceDir.size() > 0)
- {
- fileName.append(sourceDir);
- fileName.append("/");
- }
- fileName.append(fname);
- String nativeName = getNativePath(fileName);
- FILE *f = fopen(nativeName.c_str(), "r");
- if (!f)
- {
- error("Could not open '%s' for reading", fname.c_str());
- return false;
- }
- String buf;
- while (!feof(f))
- {
- int nrbytes = fread(readBuf, 1, readBufSize, f);
- readBuf[nrbytes] = '\0';
- buf.append(readBuf);
- }
- fclose(f);
-
- depFileSize = buf.size();
- depFileBuf = (char *)buf.c_str();
- int pos = 0;
-
-
- while (pos < depFileSize)
- {
- //trace("p:%c", get(pos));
-
- //# Block comment
- if (get(pos) == '/' && get(pos+1) == '*')
- {
- pos += 2;
- while (pos < depFileSize)
- {
- if (get(pos) == '*' && get(pos+1) == '/')
- {
- pos += 2;
- break;
- }
- else
- pos++;
- }
- }
- //# Line comment
- else if (get(pos) == '/' && get(pos+1) == '/')
- {
- pos += 2;
- while (pos < depFileSize)
- {
- if (get(pos) == '\n')
- {
- pos++;
- break;
- }
- else
- pos++;
- }
- }
- //# #include! yaay
- else if (sequ(pos, "#include"))
- {
- pos += 8;
- pos = skipwhite(pos);
- String iname;
- pos = getword(pos, iname);
- if (iname.size()>2)
- {
- iname = iname.substr(1, iname.size()-2);
- addIncludeFile(frec, iname);
- }
- }
- else
- {
- pos++;
- }
- }
-
- return true;
-}
-
-
-
-/**
- * Recursively check include lists to find all files in allFiles to which
- * a given file is dependent.
- */
-bool DepTool::processDependency(FileRec *ofile, FileRec *include)
-{
- std::map<String, FileRec *>::iterator iter;
- for (iter=include->files.begin() ; iter!=include->files.end() ; iter++)
- {
- String fname = iter->first;
- if (ofile->files.find(fname) != ofile->files.end())
- {
- //trace("file '%s' already seen", fname.c_str());
- continue;
- }
- FileRec *child = iter->second;
- ofile->files[fname] = child;
-
- processDependency(ofile, child);
- }
-
-
- return true;
-}
-
-
-
-
-
-/**
- * Generate the file dependency list.
- */
-bool DepTool::generateDependencies()
-{
- std::map<String, FileRec *>::iterator iter;
- //# First pass. Scan for all includes
- for (iter=allFiles.begin() ; iter!=allFiles.end() ; iter++)
- {
- FileRec *frec = iter->second;
- if (!scanFile(iter->first, frec))
- {
- //quit?
- }
- }
-
- //# Second pass. Scan for all includes
- for (iter=allFiles.begin() ; iter!=allFiles.end() ; iter++)
- {
- FileRec *include = iter->second;
- if (include->type == FileRec::CFILE)
- {
- //String cFileName = iter->first;
- FileRec *ofile = new FileRec(FileRec::OFILE);
- ofile->path = include->path;
- ofile->baseName = include->baseName;
- ofile->suffix = include->suffix;
- String fname = include->path;
- if (fname.size()>0)
- fname.append("/");
- fname.append(include->baseName);
- fname.append(".o");
- oFiles[fname] = ofile;
- //add the .c file first? no, don't
- //ofile->files[cFileName] = include;
-
- //trace("ofile:%s", fname.c_str());
-
- processDependency(ofile, include);
- }
- }
-
-
- return true;
-}
-
-
-
-/**
- * High-level call to generate deps and optionally save them
- */
-bool DepTool::generateDependencies(const String &fileName)
-{
- if (!createFileList())
- return false;
- if (!generateDependencies())
- return false;
- if (!saveDepFile(fileName))
- return false;
- return true;
-}
-
-
-/**
- * This saves the dependency cache.
- */
-bool DepTool::saveDepFile(const String &fileName)
-{
- time_t tim;
- time(&tim);
-
- FILE *f = fopen(fileName.c_str(), "w");
- if (!f)
- {
- trace("cannot open '%s' for writing", fileName.c_str());
- }
- fprintf(f, "<?xml version='1.0'?>\n");
- fprintf(f, "<!--\n");
- fprintf(f, "########################################################\n");
- fprintf(f, "## File: build.dep\n");
- fprintf(f, "## Generated by BuildTool at :%s", ctime(&tim));
- fprintf(f, "########################################################\n");
- fprintf(f, "-->\n");
-
- fprintf(f, "<dependencies source='%s'>\n\n", sourceDir.c_str());
- std::map<String, FileRec *>::iterator iter;
- for (iter=oFiles.begin() ; iter!=oFiles.end() ; iter++)
- {
- FileRec *frec = iter->second;
- if (frec->type == FileRec::OFILE)
- {
- fprintf(f, "<object path='%s' name='%s' suffix='%s'>\n",
- frec->path.c_str(), frec->baseName.c_str(), frec->suffix.c_str());
- std::map<String, FileRec *>::iterator citer;
- for (citer=frec->files.begin() ; citer!=frec->files.end() ; citer++)
- {
- String cfname = citer->first;
- fprintf(f, " <dep name='%s'/>\n", cfname.c_str());
- }
- fprintf(f, "</object>\n\n");
- }
- }
-
- fprintf(f, "</dependencies>\n");
- fprintf(f, "\n");
- fprintf(f, "<!--\n");
- fprintf(f, "########################################################\n");
- fprintf(f, "## E N D\n");
- fprintf(f, "########################################################\n");
- fprintf(f, "-->\n");
-
- fclose(f);
-
- return true;
-}
-
-
-
-
-/**
- * This loads the dependency cache.
- */
-std::vector<DepRec> DepTool::loadDepFile(const String &depFile)
-{
- std::vector<DepRec> result;
-
- Parser parser;
- Element *root = parser.parseFile(depFile.c_str());
- if (!root)
- {
- //error("Could not open %s for reading", depFile.c_str());
- return result;
- }
-
- if (root->getChildren().size()==0 ||
- root->getChildren()[0]->getName()!="dependencies")
- {
- error("loadDepFile: main xml element should be <dependencies>");
- delete root;
- return result;
- }
-
- //########## Start parsing
- Element *depList = root->getChildren()[0];
-
- std::vector<Element *> objects = depList->getChildren();
- for (std::size_t i=0 ; i<objects.size() ; i++)
- {
- Element *objectElem = objects[i];
- String tagName = objectElem->getName();
- if (tagName != "object")
- {
- error("loadDepFile: <dependencies> should have only <object> children");
- return result;
- }
-
- String objName = objectElem->getAttribute("name");
- //trace("object:%s", objName.c_str());
- DepRec depObject(objName);
- depObject.path = objectElem->getAttribute("path");
- depObject.suffix = objectElem->getAttribute("suffix");
- //########## DESCRIPTION
- std::vector<Element *> depElems = objectElem->getChildren();
- for (std::size_t i=0 ; i<depElems.size() ; i++)
- {
- Element *depElem = depElems[i];
- tagName = depElem->getName();
- if (tagName != "dep")
- {
- error("loadDepFile: <object> should have only <dep> children");
- return result;
- }
- String depName = depElem->getAttribute("name");
- //trace(" dep:%s", depName.c_str());
- depObject.files.push_back(depName);
- }
-
- //Insert into the result list, in a sorted manner
- bool inserted = false;
- std::vector<DepRec>::iterator iter;
- for (iter = result.begin() ; iter != result.end() ; iter++)
- {
- String vpath = iter->path;
- vpath.append("/");
- vpath.append(iter->name);
- String opath = depObject.path;
- opath.append("/");
- opath.append(depObject.name);
- if (vpath > opath)
- {
- inserted = true;
- iter = result.insert(iter, depObject);
- break;
- }
- }
- if (!inserted)
- result.push_back(depObject);
- }
-
- delete root;
-
- return result;
-}
-
-
-/**
- * This loads the dependency cache.
- */
-std::vector<DepRec> DepTool::getDepFile(const String &depFile,
- bool forceRefresh)
-{
- std::vector<DepRec> result;
- if (forceRefresh)
- {
- generateDependencies(depFile);
- result = loadDepFile(depFile);
- }
- else
- {
- //try once
- result = loadDepFile(depFile);
- if (result.size() == 0)
- {
- //fail? try again
- generateDependencies(depFile);
- result = loadDepFile(depFile);
- }
- }
- return result;
-}
-
-
-
-
-//########################################################################
-//# T A S K
-//########################################################################
-//forward decl
-class Target;
-class Make;
-
-/**
- *
- */
-class Task : public MakeBase
-{
-
-public:
-
- typedef enum
- {
- TASK_NONE,
- TASK_CC,
- TASK_COPY,
- TASK_CXXTEST_PART,
- TASK_CXXTEST_ROOT,
- TASK_CXXTEST_RUN,
- TASK_DELETE,
- TASK_ECHO,
- TASK_JAR,
- TASK_JAVAC,
- TASK_LINK,
- TASK_MAKEFILE,
- TASK_MKDIR,
- TASK_MSGFMT,
- TASK_PKG_CONFIG,
- TASK_RANLIB,
- TASK_RC,
- TASK_SHAREDLIB,
- TASK_STATICLIB,
- TASK_STRIP,
- TASK_TOUCH,
- TASK_TSTAMP
- } TaskType;
-
-
- /**
- *
- */
- Task(MakeBase &par) : parent(par)
- { init(); }
-
- /**
- *
- */
- Task(const Task &other) : parent(other.parent)
- { init(); assign(other); }
-
- /**
- *
- */
- Task &operator=(const Task &other)
- { assign(other); return *this; }
-
- /**
- *
- */
- virtual ~Task()
- { }
-
-
- /**
- *
- */
- virtual MakeBase &getParent()
- { return parent; }
-
- /**
- *
- */
- virtual int getType()
- { return type; }
-
- /**
- *
- */
- virtual void setType(int val)
- { type = val; }
-
- /**
- *
- */
- virtual String getName()
- { return name; }
-
- /**
- *
- */
- virtual bool execute()
- { return true; }
-
- /**
- *
- */
- virtual bool parse(Element *elem)
- { return true; }
-
- /**
- *
- */
- Task *createTask(Element *elem, int lineNr);
-
-
-protected:
-
- void init()
- {
- type = TASK_NONE;
- name = "none";
- }
-
- void assign(const Task &other)
- {
- type = other.type;
- name = other.name;
- }
-
- /**
- * Show task status
- */
- void taskstatus(const char *fmt, ...)
- {
- va_list args;
- va_start(args,fmt);
- fprintf(stdout, " %s : ", name.c_str());
- vfprintf(stdout, fmt, args);
- fprintf(stdout, "\n");
- va_end(args) ;
- }
-
- String getAttribute(Element *elem, const String &attrName)
- {
- String str;
- return str;
- }
-
- MakeBase &parent;
-
- int type;
-
- String name;
-};
-
-
-
-/**
- * This task runs the C/C++ compiler. The compiler is invoked
- * for all .c or .cpp files which are newer than their correcsponding
- * .o files.
- */
-class TaskCC : public Task
-{
-public:
-
- TaskCC(MakeBase &par) : Task(par)
- {
- type = TASK_CC;
- name = "cc";
- }
-
- virtual ~TaskCC()
- {}
-
- virtual bool isExcludedInc(const String &dirname)
- {
- for (std::size_t i=0 ; i<excludeInc.size() ; i++)
- {
- String fname = excludeInc[i];
- if (fname == dirname)
- return true;
- }
- return false;
- }
-
- virtual bool execute()
- {
- //evaluate our parameters
- String command = parent.eval(commandOpt, "gcc");
- String ccCommand = parent.eval(ccCommandOpt, "gcc");
- String cxxCommand = parent.eval(cxxCommandOpt, "g++");
- String source = parent.eval(sourceOpt, ".");
- String dest = parent.eval(destOpt, ".");
- String ccflags = parent.eval(flagsOpt, "");
- String cxxflags = parent.eval(cxxflagsOpt, "");
- String defines = parent.eval(definesOpt, "");
- String includes = parent.eval(includesOpt, "");
- bool continueOnError = parent.evalBool(continueOnErrorOpt, true);
- bool refreshCache = parent.evalBool(refreshCacheOpt, false);
-
- if (!listFiles(parent, fileSet))
- return false;
-
- FILE *f = NULL;
- f = fopen("compile.lst", "w");
-
- //refreshCache is probably false here, unless specified otherwise
- String fullName = parent.resolve("build.dep");
- if (refreshCache || isNewerThan(parent.getURI().getPath(), fullName))
- {
- taskstatus("regenerating C/C++ dependency cache");
- refreshCache = true;
- }
-
- DepTool depTool;
- depTool.setSourceDirectory(source);
- depTool.setFileList(fileSet.getFiles());
- std::vector<DepRec> deps =
- depTool.getDepFile("build.dep", refreshCache);
-
- String incs;
- incs.append("-I");
- incs.append(parent.resolve("."));
- incs.append(" ");
- if (includes.size()>0)
- {
- incs.append(includes);
- incs.append(" ");
- }
- std::set<String> paths;
- std::vector<DepRec>::iterator viter;
- for (viter=deps.begin() ; viter!=deps.end() ; viter++)
- {
- DepRec dep = *viter;
- if (dep.path.size()>0)
- paths.insert(dep.path);
- }
- if (source.size()>0)
- {
- incs.append(" -I");
- incs.append(parent.resolve(source));
- incs.append(" ");
- }
- std::set<String>::iterator setIter;
- for (setIter=paths.begin() ; setIter!=paths.end() ; setIter++)
- {
- String dirName = *setIter;
- //check excludeInc to see if we dont want to include this dir
- if (isExcludedInc(dirName))
- continue;
- incs.append(" -I");
- String dname;
- if (source.size()>0)
- {
- dname.append(source);
- dname.append("/");
- }
- dname.append(dirName);
- incs.append(parent.resolve(dname));
- }
-
-// First create all directories, fails if done in OpenMP parallel loop below... goes superfast anyway, so don't optimize
- for (std::size_t fi = 0; fi < deps.size() ; ++fi)
- {
- DepRec dep = deps[fi];
-
- //## Make paths
- String destPath = dest;
- if (dep.path.size()>0)
- {
- destPath.append("/");
- destPath.append(dep.path);
- }
- //## Make sure destination directory exists
- if (!createDirectory(destPath))
- {
- taskstatus("problem creating folder: %s", destPath.c_str());
- if (f) {
- fclose(f);
- }
- return false;
- }
- }
-
- /**
- * Compile each of the C files that need it
- */
- bool errorOccurred = false;
-
-#ifdef _OPENMP
- taskstatus("compile with %d threads in parallel", numThreads);
-# pragma omp parallel for num_threads(numThreads)
-#endif
-
- for (std::size_t fi = 0; fi < deps.size() ; ++fi)
- {
- DepRec dep = deps[fi];
-
- //## Select command
- String sfx = dep.suffix;
- String command = ccCommand;
- String flags = ccflags;
- if (sfx == "cpp" || sfx == "cxx" || sfx == "c++" ||
- sfx == "cc" || sfx == "CC")
- {
- command = cxxCommand;
- flags += " " + cxxflags;
- }
-
- //## Make paths
- String destPath = dest;
- String srcPath = source;
- if (dep.path.size()>0)
- {
- destPath.append("/");
- destPath.append(dep.path);
- srcPath.append("/");
- srcPath.append(dep.path);
- }
-
- //## Check whether it needs to be done
- String destName;
- if (destPath.size()>0)
- {
- destName.append(destPath);
- destName.append("/");
- }
- destName.append(dep.name);
- destName.append(".o");
- String destFullName = parent.resolve(destName);
- String srcName;
- if (srcPath.size()>0)
- {
- srcName.append(srcPath);
- srcName.append("/");
- }
- srcName.append(dep.name);
- srcName.append(".");
- srcName.append(dep.suffix);
- String srcFullName = parent.resolve(srcName);
- bool compileMe = false;
- //# First we check if the source is newer than the .o
- if (isNewerThan(srcFullName, destFullName))
- {
-// taskstatus("compile of %s (req. by: %s)",
-// destFullName.c_str(), srcFullName.c_str());
- fprintf(stdout, "compile %s\n", srcFullName.c_str());
- compileMe = true;
- }
- else
- {
- //# secondly, we check if any of the included dependencies
- //# of the .c/.cpp is newer than the .o
- for (std::size_t i=0 ; i<dep.files.size() ; i++)
- {
- String depName;
- if (source.size()>0)
- {
- depName.append(source);
- depName.append("/");
- }
- depName.append(dep.files[i]);
- String depFullName = parent.resolve(depName);
- bool depRequires = isNewerThan(depFullName, destFullName);
- //trace("%d %s %s\n", depRequires,
- // destFullName.c_str(), depFullName.c_str());
- if (depRequires)
- {
- taskstatus("compile %s (%s modified)",
- srcFullName.c_str(), depFullName.c_str());
- compileMe = true;
- break;
- }
- }
- }
- if (!compileMe)
- {
- continue;
- }
-
- //## Assemble the command
- String cmd = command;
- cmd.append(" -c ");
- cmd.append(flags);
- cmd.append(" ");
- cmd.append(defines);
- cmd.append(" ");
- cmd.append(incs);
- cmd.append(" ");
- cmd.append(srcFullName);
- cmd.append(" -o ");
- cmd.append(destFullName);
-
- //## Execute the command
-
- String outString, errString;
- bool ret = executeCommand(cmd.c_str(), "", outString, errString);
-
- if (f)
- {
- fprintf(f, "########################### File : %s\n",
- srcFullName.c_str());
- fprintf(f, "#### COMMAND ###\n");
- int col = 0;
- for (std::size_t i = 0 ; i < cmd.size() ; i++)
- {
- char ch = cmd[i];
- if (isspace(ch) && col > 63)
- {
- fputc('\n', f);
- col = 0;
- }
- else
- {
- fputc(ch, f);
- col++;
- }
- if (col > 76)
- {
- fputc('\n', f);
- col = 0;
- }
- }
- fprintf(f, "\n");
- fprintf(f, "#### STDOUT ###\n%s\n", outString.c_str());
- fprintf(f, "#### STDERR ###\n%s\n\n", errString.c_str());
- fflush(f);
- }
- if (!ret) {
- error("problem compiling: %s", errString.c_str());
- errorOccurred = true;
- } else if (!errString.empty()) {
- fprintf(stdout, "STDERR: \n%s\n", errString.c_str());
- }
-
-
- if (errorOccurred && !continueOnError) {
-#ifndef _OPENMP // figure out a way to break the loop here with OpenMP
- break;
-#endif
- }
-
- removeFromStatCache(getNativePath(destFullName));
- }
-
- if (f)
- {
- fclose(f);
- }
-
- return !errorOccurred;
- }
-
-
- virtual bool parse(Element *elem)
- {
- String s;
- if (!parent.getAttribute(elem, "command", commandOpt))
- return false;
- if (commandOpt.size()>0)
- { cxxCommandOpt = ccCommandOpt = commandOpt; }
- if (!parent.getAttribute(elem, "cc", ccCommandOpt))
- return false;
- if (!parent.getAttribute(elem, "cxx", cxxCommandOpt))
- return false;
- if (!parent.getAttribute(elem, "destdir", destOpt))
- return false;
- if (!parent.getAttribute(elem, "continueOnError", continueOnErrorOpt))
- return false;
- if (!parent.getAttribute(elem, "refreshCache", refreshCacheOpt))
- return false;
-
- std::vector<Element *> children = elem->getChildren();
- for (std::size_t i=0 ; i<children.size() ; i++)
- {
- Element *child = children[i];
- String tagName = child->getName();
- if (tagName == "flags")
- {
- if (!parent.getValue(child, flagsOpt))
- return false;
- flagsOpt = strip(flagsOpt);
- }
- else if (tagName == "cxxflags")
- {
- if (!parent.getValue(child, cxxflagsOpt))
- return false;
- cxxflagsOpt = strip(cxxflagsOpt);
- }
- else if (tagName == "includes")
- {
- if (!parent.getValue(child, includesOpt))
- return false;
- includesOpt = strip(includesOpt);
- }
- else if (tagName == "defines")
- {
- if (!parent.getValue(child, definesOpt))
- return false;
- definesOpt = strip(definesOpt);
- }
- else if (tagName == "fileset")
- {
- if (!parseFileSet(child, parent, fileSet))
- return false;
- sourceOpt = fileSet.getDirectory();
- }
- else if (tagName == "excludeinc")
- {
- if (!parseFileList(child, parent, excludeInc))
- return false;
- }
- }
-
- return true;
- }
-
-protected:
-
- String commandOpt;
- String ccCommandOpt;
- String cxxCommandOpt;
- String sourceOpt;
- String destOpt;
- String flagsOpt;
- String cxxflagsOpt;
- String definesOpt;
- String includesOpt;
- String continueOnErrorOpt;
- String refreshCacheOpt;
- FileSet fileSet;
- FileList excludeInc;
-
-};
-
-
-
-/**
- *
- */
-class TaskCopy : public Task
-{
-public:
-
- typedef enum
- {
- CP_NONE,
- CP_TOFILE,
- CP_TODIR
- } CopyType;
-
- TaskCopy(MakeBase &par) : Task(par)
- {
- type = TASK_COPY;
- name = "copy";
- cptype = CP_NONE;
- haveFileSet = false;
- }
-
- virtual ~TaskCopy()
- {}
-
- virtual bool execute()
- {
- String fileName = parent.eval(fileNameOpt , ".");
- String toFileName = parent.eval(toFileNameOpt , ".");
- String toDirName = parent.eval(toDirNameOpt , ".");
- bool verbose = parent.evalBool(verboseOpt, false);
- switch (cptype)
- {
- case CP_TOFILE:
- {
- if (fileName.size()>0)
- {
- taskstatus("%s to %s",
- fileName.c_str(), toFileName.c_str());
- String fullSource = parent.resolve(fileName);
- String fullDest = parent.resolve(toFileName);
- if (verbose)
- taskstatus("copy %s to file %s", fullSource.c_str(),
- fullDest.c_str());
- if (!isRegularFile(fullSource))
- {
- error("copy : file %s does not exist", fullSource.c_str());
- return false;
- }
- if (!isNewerThan(fullSource, fullDest))
- {
- taskstatus("skipped");
- return true;
- }
- if (!copyFile(fullSource, fullDest))
- return false;
- taskstatus("1 file copied");
- }
- return true;
- }
- case CP_TODIR:
- {
- if (haveFileSet)
- {
- if (!listFiles(parent, fileSet))
- return false;
- String fileSetDir = parent.eval(fileSet.getDirectory(), ".");
-
- taskstatus("%s to %s",
- fileSetDir.c_str(), toDirName.c_str());
-
- int nrFiles = 0;
- for (std::size_t i=0 ; i<fileSet.size() ; i++)
- {
- String fileName = fileSet[i];
-
- String sourcePath;
- if (fileSetDir.size()>0)
- {
- sourcePath.append(fileSetDir);
- sourcePath.append("/");
- }
- sourcePath.append(fileName);
- String fullSource = parent.resolve(sourcePath);
-
- //Get the immediate parent directory's base name
- String baseFileSetDir = fileSetDir;
- std::size_t pos = baseFileSetDir.find_last_of('/');
- if (pos!=baseFileSetDir.npos &&
- pos < baseFileSetDir.size()-1)
- baseFileSetDir =
- baseFileSetDir.substr(pos+1,
- baseFileSetDir.size());
- //Now make the new path
- String destPath;
- if (toDirName.size()>0)
- {
- destPath.append(toDirName);
- destPath.append("/");
- }
- if (baseFileSetDir.size()>0)
- {
- destPath.append(baseFileSetDir);
- destPath.append("/");
- }
- destPath.append(fileName);
- String fullDest = parent.resolve(destPath);
- //trace("fileName:%s", fileName.c_str());
- if (verbose)
- taskstatus("copy %s to new dir : %s",
- fullSource.c_str(), fullDest.c_str());
- if (!isNewerThan(fullSource, fullDest))
- {
- if (verbose)
- taskstatus("copy skipping %s", fullSource.c_str());
- continue;
- }
- if (!copyFile(fullSource, fullDest))
- return false;
- nrFiles++;
- }
- taskstatus("%d file(s) copied", nrFiles);
- }
- else //file source
- {
- //For file->dir we want only the basename of
- //the source appended to the dest dir
- taskstatus("%s to %s",
- fileName.c_str(), toDirName.c_str());
- String baseName = fileName;
- std::size_t pos = baseName.find_last_of('/');
- if (pos!=baseName.npos && pos<baseName.size()-1)
- baseName = baseName.substr(pos+1, baseName.size());
- String fullSource = parent.resolve(fileName);
- String destPath;
- if (toDirName.size()>0)
- {
- destPath.append(toDirName);
- destPath.append("/");
- }
- destPath.append(baseName);
- String fullDest = parent.resolve(destPath);
- if (verbose)
- taskstatus("file %s to new dir : %s", fullSource.c_str(),
- fullDest.c_str());
- if (!isRegularFile(fullSource))
- {
- error("copy : file %s does not exist", fullSource.c_str());
- return false;
- }
- if (!isNewerThan(fullSource, fullDest))
- {
- taskstatus("skipped");
- return true;
- }
- if (!copyFile(fullSource, fullDest))
- return false;
- taskstatus("1 file copied");
- }
- return true;
- }
- }
- return true;
- }
-
-
- virtual bool parse(Element *elem)
- {
- if (!parent.getAttribute(elem, "file", fileNameOpt))
- return false;
- if (!parent.getAttribute(elem, "tofile", toFileNameOpt))
- return false;
- if (toFileNameOpt.size() > 0)
- cptype = CP_TOFILE;
- if (!parent.getAttribute(elem, "todir", toDirNameOpt))
- return false;
- if (toDirNameOpt.size() > 0)
- cptype = CP_TODIR;
- if (!parent.getAttribute(elem, "verbose", verboseOpt))
- return false;
-
- haveFileSet = false;
-
- std::vector<Element *> children = elem->getChildren();
- for (std::size_t i=0 ; i<children.size() ; i++)
- {
- Element *child = children[i];
- String tagName = child->getName();
- if (tagName == "fileset")
- {
- if (!parseFileSet(child, parent, fileSet))
- {
- error("problem getting fileset");
- return false;
- }
- haveFileSet = true;
- }
- }
-
- //Perform validity checks
- if (fileNameOpt.size()>0 && fileSet.size()>0)
- {
- error("<copy> can only have one of : file= and <fileset>");
- return false;
- }
- if (toFileNameOpt.size()>0 && toDirNameOpt.size()>0)
- {
- error("<copy> can only have one of : tofile= or todir=");
- return false;
- }
- if (haveFileSet && toDirNameOpt.size()==0)
- {
- error("a <copy> task with a <fileset> must have : todir=");
- return false;
- }
- if (cptype == CP_TOFILE && fileNameOpt.size()==0)
- {
- error("<copy> tofile= must be associated with : file=");
- return false;
- }
- if (cptype == CP_TODIR && fileNameOpt.size()==0 && !haveFileSet)
- {
- error("<copy> todir= must be associated with : file= or <fileset>");
- return false;
- }
-
- return true;
- }
-
-private:
-
- int cptype;
- bool haveFileSet;
-
- FileSet fileSet;
- String fileNameOpt;
- String toFileNameOpt;
- String toDirNameOpt;
- String verboseOpt;
-};
-
-
-/**
- * Generate CxxTest files
- */
-class TaskCxxTestPart: public Task
-{
-public:
-
- TaskCxxTestPart(MakeBase &par) : Task(par)
- {
- type = TASK_CXXTEST_PART;
- name = "cxxtestpart";
- }
-
- virtual ~TaskCxxTestPart()
- {}
-
- virtual bool execute()
- {
- if (!listFiles(parent, fileSet))
- return false;
- String fileSetDir = parent.eval(fileSet.getDirectory(), ".");
-
- String fullDest = parent.resolve(parent.eval(destPathOpt, "."));
- String cmd = parent.eval(commandOpt, "cxxtestgen.py");
- cmd.append(" --part -o ");
- cmd.append(fullDest);
-
- unsigned int newFiles = 0;
- for (std::size_t i=0 ; i<fileSet.size() ; i++)
- {
- String fileName = fileSet[i];
- if (getSuffix(fileName) != "h")
- continue;
- String sourcePath;
- if (fileSetDir.size()>0)
- {
- sourcePath.append(fileSetDir);
- sourcePath.append("/");
- }
- sourcePath.append(fileName);
- String fullSource = parent.resolve(sourcePath);
-
- cmd.append(" ");
- cmd.append(fullSource);
- if (isNewerThan(fullSource, fullDest)) newFiles++;
- }
-
- if (newFiles>0) {
- size_t const lastSlash = fullDest.find_last_of('/');
- if (lastSlash != fullDest.npos) {
- String directory(fullDest, 0, lastSlash);
- if (!createDirectory(directory))
- return false;
- }
-
- String outString, errString;
- if (!executeCommand(cmd.c_str(), "", outString, errString))
- {
- error("<cxxtestpart> problem: %s", errString.c_str());
- return false;
- }
- removeFromStatCache(getNativePath(fullDest));
- }
-
- return true;
- }
-
- virtual bool parse(Element *elem)
- {
- if (!parent.getAttribute(elem, "command", commandOpt))
- return false;
- if (!parent.getAttribute(elem, "out", destPathOpt))
- return false;
-
- std::vector<Element *> children = elem->getChildren();
- for (std::size_t i=0 ; i<children.size() ; i++)
- {
- Element *child = children[i];
- String tagName = child->getName();
- if (tagName == "fileset")
- {
- if (!parseFileSet(child, parent, fileSet))
- return false;
- }
- }
- return true;
- }
-
-private:
-
- String commandOpt;
- String destPathOpt;
- FileSet fileSet;
-
-};
-
-
-/**
- * Generate the CxxTest root file
- */
-class TaskCxxTestRoot: public Task
-{
-public:
-
- TaskCxxTestRoot(MakeBase &par) : Task(par)
- {
- type = TASK_CXXTEST_ROOT;
- name = "cxxtestroot";
- }
-
- virtual ~TaskCxxTestRoot()
- {}
-
- virtual bool execute()
- {
- if (!listFiles(parent, fileSet))
- return false;
- String fileSetDir = parent.eval(fileSet.getDirectory(), ".");
- unsigned int newFiles = 0;
-
- String fullDest = parent.resolve(parent.eval(destPathOpt, "."));
- String cmd = parent.eval(commandOpt, "cxxtestgen.py");
- cmd.append(" --root -o ");
- cmd.append(fullDest);
- String templateFile = parent.eval(templateFileOpt, "");
- if (templateFile.size()>0) {
- String fullTemplate = parent.resolve(templateFile);
- cmd.append(" --template=");
- cmd.append(fullTemplate);
- if (isNewerThan(fullTemplate, fullDest)) newFiles++;
- }
-
- for (std::size_t i=0 ; i<fileSet.size() ; i++)
- {
- String fileName = fileSet[i];
- if (getSuffix(fileName) != "h")
- continue;
- String sourcePath;
- if (fileSetDir.size()>0)
- {
- sourcePath.append(fileSetDir);
- sourcePath.append("/");
- }
- sourcePath.append(fileName);
- String fullSource = parent.resolve(sourcePath);
-
- cmd.append(" ");
- cmd.append(fullSource);
- if (isNewerThan(fullSource, fullDest)) newFiles++;
- }
-
- if (newFiles>0) {
- size_t const lastSlash = fullDest.find_last_of('/');
- if (lastSlash != fullDest.npos) {
- String directory(fullDest, 0, lastSlash);
- if (!createDirectory(directory))
- return false;
- }
-
- String outString, errString;
- if (!executeCommand(cmd.c_str(), "", outString, errString))
- {
- error("<cxxtestroot> problem: %s", errString.c_str());
- return false;
- }
- removeFromStatCache(getNativePath(fullDest));
- }
-
- return true;
- }
-
- virtual bool parse(Element *elem)
- {
- if (!parent.getAttribute(elem, "command", commandOpt))
- return false;
- if (!parent.getAttribute(elem, "template", templateFileOpt))
- return false;
- if (!parent.getAttribute(elem, "out", destPathOpt))
- return false;
-
- std::vector<Element *> children = elem->getChildren();
- for (std::size_t i=0 ; i<children.size() ; i++)
- {
- Element *child = children[i];
- String tagName = child->getName();
- if (tagName == "fileset")
- {
- if (!parseFileSet(child, parent, fileSet))
- return false;
- }
- }
- return true;
- }
-
-private:
-
- String commandOpt;
- String templateFileOpt;
- String destPathOpt;
- FileSet fileSet;
-
-};
-
-
-/**
- * Execute the CxxTest test executable
- */
-class TaskCxxTestRun: public Task
-{
-public:
-
- TaskCxxTestRun(MakeBase &par) : Task(par)
- {
- type = TASK_CXXTEST_RUN;
- name = "cxxtestrun";
- }
-
- virtual ~TaskCxxTestRun()
- {}
-
- virtual bool execute()
- {
- unsigned int newFiles = 0;
-
- String workingDir = parent.resolve(parent.eval(workingDirOpt, "inkscape"));
- String rawCmd = parent.eval(commandOpt, "build/cxxtests");
-
- String cmdExe;
- if (fileExists(rawCmd)) {
- cmdExe = rawCmd;
- } else if (fileExists(rawCmd + ".exe")) {
- cmdExe = rawCmd + ".exe";
- } else {
- error("<cxxtestrun> problem: cxxtests executable not found! (command=\"%s\")", rawCmd.c_str());
- }
- // Note that the log file names are based on the exact name used to call cxxtests (it uses argv[0] + ".log"/".xml")
- if (isNewerThan(cmdExe, rawCmd + ".log") || isNewerThan(cmdExe, rawCmd + ".xml")) newFiles++;
-
- // Prepend the necessary ../'s
- String cmd = rawCmd;
- unsigned int workingDirDepth = 0;
- bool wasSlash = true;
- for(size_t i=0; i<workingDir.size(); i++) {
- // This assumes no . and .. parts
- if (wasSlash && workingDir[i]!='/') workingDirDepth++;
- wasSlash = workingDir[i] == '/';
- }
- for(size_t i=0; i<workingDirDepth; i++) {
- cmd = "../" + cmd;
- }
-
- if (newFiles>0) {
- char olddir[1024];
- if (workingDir.size()>0) {
- // TODO: Double-check usage of getcwd and handle chdir errors
- getcwd(olddir, 1024);
- chdir(workingDir.c_str());
- }
-
- String outString;
- if (!executeCommand(cmd.c_str(), "", outString, outString))
- {
- error("<cxxtestrun> problem: %s", outString.c_str());
- return false;
- }
-
- if (workingDir.size()>0) {
- // TODO: Handle errors?
- chdir(olddir);
- }
-
- removeFromStatCache(getNativePath(cmd + ".log"));
- removeFromStatCache(getNativePath(cmd + ".xml"));
- }
-
- return true;
- }
-
- virtual bool parse(Element *elem)
- {
- if (!parent.getAttribute(elem, "command", commandOpt))
- return false;
- if (!parent.getAttribute(elem, "workingdir", workingDirOpt))
- return false;
- return true;
- }
-
-private:
-
- String commandOpt;
- String workingDirOpt;
-
-};
-
-
-/**
- *
- */
-class TaskDelete : public Task
-{
-public:
-
- typedef enum
- {
- DEL_FILE,
- DEL_DIR,
- DEL_FILESET
- } DeleteType;
-
- TaskDelete(MakeBase &par) : Task(par)
- {
- type = TASK_DELETE;
- name = "delete";
- delType = DEL_FILE;
- }
-
- virtual ~TaskDelete()
- {}
-
- virtual bool execute()
- {
- String dirName = parent.eval(dirNameOpt, ".");
- String fileName = parent.eval(fileNameOpt, ".");
- bool verbose = parent.evalBool(verboseOpt, false);
- bool quiet = parent.evalBool(quietOpt, false);
- bool failOnError = parent.evalBool(failOnErrorOpt, true);
- switch (delType)
- {
- case DEL_FILE:
- {
- taskstatus("file: %s", fileName.c_str());
- String fullName = parent.resolve(fileName);
- char *fname = (char *)fullName.c_str();
- if (!quiet && verbose)
- taskstatus("path: %s", fname);
- if (failOnError && !removeFile(fullName))
- {
- //error("Could not delete file '%s'", fullName.c_str());
- return false;
- }
- return true;
- }
- case DEL_DIR:
- {
- taskstatus("dir: %s", dirName.c_str());
- String fullDir = parent.resolve(dirName);
- if (!quiet && verbose)
- taskstatus("path: %s", fullDir.c_str());
- if (failOnError && !removeDirectory(fullDir))
- {
- //error("Could not delete directory '%s'", fullDir.c_str());
- return false;
- }
- return true;
- }
- }
- return true;
- }
-
- virtual bool parse(Element *elem)
- {
- if (!parent.getAttribute(elem, "file", fileNameOpt))
- return false;
- if (fileNameOpt.size() > 0)
- delType = DEL_FILE;
- if (!parent.getAttribute(elem, "dir", dirNameOpt))
- return false;
- if (dirNameOpt.size() > 0)
- delType = DEL_DIR;
- if (fileNameOpt.size()>0 && dirNameOpt.size()>0)
- {
- error("<delete> can have one attribute of file= or dir=");
- return false;
- }
- if (fileNameOpt.size()==0 && dirNameOpt.size()==0)
- {
- error("<delete> must have one attribute of file= or dir=");
- return false;
- }
- if (!parent.getAttribute(elem, "verbose", verboseOpt))
- return false;
- if (!parent.getAttribute(elem, "quiet", quietOpt))
- return false;
- if (!parent.getAttribute(elem, "failonerror", failOnErrorOpt))
- return false;
- return true;
- }
-
-private:
-
- int delType;
- String dirNameOpt;
- String fileNameOpt;
- String verboseOpt;
- String quietOpt;
- String failOnErrorOpt;
-};
-
-
-/**
- * Send a message to stdout
- */
-class TaskEcho : public Task
-{
-public:
-
- TaskEcho(MakeBase &par) : Task(par)
- { type = TASK_ECHO; name = "echo"; }
-
- virtual ~TaskEcho()
- {}
-
- virtual bool execute()
- {
- //let message have priority over text
- String message = parent.eval(messageOpt, "");
- String text = parent.eval(textOpt, "");
- if (message.size() > 0)
- {
- fprintf(stdout, "%s\n", message.c_str());
- }
- else if (text.size() > 0)
- {
- fprintf(stdout, "%s\n", text.c_str());
- }
- return true;
- }
-
- virtual bool parse(Element *elem)
- {
- if (!parent.getValue(elem, textOpt))
- return false;
- textOpt = leftJustify(textOpt);
- if (!parent.getAttribute(elem, "message", messageOpt))
- return false;
- return true;
- }
-
-private:
-
- String messageOpt;
- String textOpt;
-};
-
-
-
-/**
- *
- */
-class TaskJar : public Task
-{
-public:
-
- TaskJar(MakeBase &par) : Task(par)
- { type = TASK_JAR; name = "jar"; }
-
- virtual ~TaskJar()
- {}
-
- virtual bool execute()
- {
- String command = parent.eval(commandOpt, "jar");
- String basedir = parent.eval(basedirOpt, ".");
- String destfile = parent.eval(destfileOpt, ".");
-
- String cmd = command;
- cmd.append(" -cf ");
- cmd.append(destfile);
- cmd.append(" -C ");
- cmd.append(basedir);
- cmd.append(" .");
-
- String execCmd = cmd;
-
- String outString, errString;
- bool ret = executeCommand(execCmd.c_str(), "", outString, errString);
- if (!ret)
- {
- error("<jar> command '%s' failed :\n %s",
- execCmd.c_str(), errString.c_str());
- return false;
- }
- removeFromStatCache(getNativePath(destfile));
- return true;
- }
-
- virtual bool parse(Element *elem)
- {
- if (!parent.getAttribute(elem, "command", commandOpt))
- return false;
- if (!parent.getAttribute(elem, "basedir", basedirOpt))
- return false;
- if (!parent.getAttribute(elem, "destfile", destfileOpt))
- return false;
- if (basedirOpt.size() == 0 || destfileOpt.size() == 0)
- {
- error("<jar> required both basedir and destfile attributes to be set");
- return false;
- }
- return true;
- }
-
-private:
-
- String commandOpt;
- String basedirOpt;
- String destfileOpt;
-};
-
-
-/**
- *
- */
-class TaskJavac : public Task
-{
-public:
-
- TaskJavac(MakeBase &par) : Task(par)
- {
- type = TASK_JAVAC; name = "javac";
- }
-
- virtual ~TaskJavac()
- {}
-
- virtual bool execute()
- {
- String command = parent.eval(commandOpt, "javac");
- String srcdir = parent.eval(srcdirOpt, ".");
- String destdir = parent.eval(destdirOpt, ".");
- String target = parent.eval(targetOpt, "");
-
- std::vector<String> fileList;
- if (!listFiles(srcdir, "", fileList))
- {
- return false;
- }
- String cmd = command;
- cmd.append(" -d ");
- cmd.append(destdir);
- cmd.append(" -classpath ");
- cmd.append(destdir);
- cmd.append(" -sourcepath ");
- cmd.append(srcdir);
- cmd.append(" ");
- if (target.size()>0)
- {
- cmd.append(" -target ");
- cmd.append(target);
- cmd.append(" ");
- }
- String fname = "javalist.btool";
- FILE *f = fopen(fname.c_str(), "w");
- int count = 0;
- for (std::size_t i=0 ; i<fileList.size() ; i++)
- {
- String fname = fileList[i];
- String srcName = fname;
- if (fname.size()<6) //x.java
- continue;
- if (fname.compare(fname.size()-5, 5, ".java") != 0)
- continue;
- String baseName = fname.substr(0, fname.size()-5);
- String destName = baseName;
- destName.append(".class");
-
- String fullSrc = srcdir;
- fullSrc.append("/");
- fullSrc.append(fname);
- String fullDest = destdir;
- fullDest.append("/");
- fullDest.append(destName);
- //trace("fullsrc:%s fulldest:%s", fullSrc.c_str(), fullDest.c_str());
- if (!isNewerThan(fullSrc, fullDest))
- continue;
-
- count++;
- fprintf(f, "%s\n", fullSrc.c_str());
- }
- fclose(f);
- if (!count)
- {
- taskstatus("nothing to do");
- return true;
- }
-
- taskstatus("compiling %d files", count);
-
- String execCmd = cmd;
- execCmd.append("@");
- execCmd.append(fname);
-
- String outString, errString;
- bool ret = executeCommand(execCmd.c_str(), "", outString, errString);
- if (!ret)
- {
- error("<javac> command '%s' failed :\n %s",
- execCmd.c_str(), errString.c_str());
- return false;
- }
- // TODO:
- //removeFromStatCache(getNativePath(........));
- return true;
- }
-
- virtual bool parse(Element *elem)
- {
- if (!parent.getAttribute(elem, "command", commandOpt))
- return false;
- if (!parent.getAttribute(elem, "srcdir", srcdirOpt))
- return false;
- if (!parent.getAttribute(elem, "destdir", destdirOpt))
- return false;
- if (srcdirOpt.size() == 0 || destdirOpt.size() == 0)
- {
- error("<javac> required both srcdir and destdir attributes to be set");
- return false;
- }
- if (!parent.getAttribute(elem, "target", targetOpt))
- return false;
- return true;
- }
-
-private:
-
- String commandOpt;
- String srcdirOpt;
- String destdirOpt;
- String targetOpt;
-
-};
-
-
-/**
- *
- */
-class TaskLink : public Task
-{
-public:
-
- TaskLink(MakeBase &par) : Task(par)
- {
- type = TASK_LINK; name = "link";
- }
-
- virtual ~TaskLink()
- {}
-
- virtual void UniqueParams(std::string& source) {
- size_t prev = 0;
- size_t next = 0;
- std::list<std::string> thelist;
- std::list<std::string>::iterator it;
- std::string tstring=" ";
- source +=std::string(" "); // else the last token may be lost
- while ((next = source.find_first_of(" ", prev)) != std::string::npos){
- if (next - prev != 0){
- thelist.push_back(source.substr(prev, next - prev));
- }
- prev = next + 1;
- }
- thelist.sort();
- source.clear();
- source +=std::string(" ");
- for(it=thelist.begin(); it!=thelist.end();it++){
- if(*it != tstring){
- tstring = *it;
- source +=tstring;
- source +=std::string(" ");
- }
- }
- }
-
- virtual bool execute()
- {
- String command = parent.eval(commandOpt, "g++");
- String fileName = parent.eval(fileNameOpt, "");
- String flags = parent.eval(flagsOpt, "");
- String libs = parent.eval(libsOpt, "");
- bool doStrip = parent.evalBool(doStripOpt, false);
- String symFileName = parent.eval(symFileNameOpt, "");
- String stripCommand = parent.eval(stripCommandOpt, "strip");
- String objcopyCommand = parent.eval(objcopyCommandOpt, "objcopy");
-
- if (!listFiles(parent, fileSet))
- return false;
- String fileSetDir = parent.eval(fileSet.getDirectory(), ".");
- //trace("%d files in %s", fileSet.size(), fileSetDir.c_str());
- bool doit = false;
- String fullTarget = parent.resolve(fileName);
- String cmd = command;
- cmd.append(" -o ");
- cmd.append(fullTarget);
- cmd.append(" ");
- cmd.append(flags);
- for (std::size_t i=0 ; i<fileSet.size() ; i++)
- {
- cmd.append(" ");
- String obj;
- if (fileSetDir.size()>0)
- {
- obj.append(fileSetDir);
- obj.append("/");
- }
- obj.append(fileSet[i]);
- String fullObj = parent.resolve(obj);
- String nativeFullObj = getNativePath(fullObj);
- cmd.append(nativeFullObj);
- //trace("link: tgt:%s obj:%s", fullTarget.c_str(),
- // fullObj.c_str());
- if (isNewerThan(fullObj, fullTarget))
- doit = true;
- }
- cmd.append(" ");
- // trim it down to unique elements, reduce command line size
- UniqueParams(libs);
- cmd.append(libs);
- if (!doit)
- {
- //trace("link not needed");
- return true;
- }
- //trace("LINK cmd:%s", cmd.c_str());
-
-
- String outbuf, errbuf;
- // std::cout << "DEBUG command = " << cmd << std::endl;
- if (!executeCommand(cmd.c_str(), "", outbuf, errbuf))
- {
- error("LINK problem: %s", errbuf.c_str());
- return false;
- }
- removeFromStatCache(getNativePath(fullTarget));
-
- if (symFileName.size()>0)
- {
- String symFullName = parent.resolve(symFileName);
- cmd = objcopyCommand;
- cmd.append(" --only-keep-debug ");
- cmd.append(getNativePath(fullTarget));
- cmd.append(" ");
- cmd.append(getNativePath(symFullName));
- if (!executeCommand(cmd, "", outbuf, errbuf))
- {
- error("<strip> symbol file failed : %s", errbuf.c_str());
- return false;
- }
- removeFromStatCache(getNativePath(symFullName));
- }
-
- if (doStrip)
- {
- cmd = stripCommand;
- cmd.append(" ");
- cmd.append(getNativePath(fullTarget));
- if (!executeCommand(cmd, "", outbuf, errbuf))
- {
- error("<strip> failed : %s", errbuf.c_str());
- return false;
- }
- removeFromStatCache(getNativePath(fullTarget));
- }
-
- return true;
- }
-
- virtual bool parse(Element *elem)
- {
- if (!parent.getAttribute(elem, "command", commandOpt))
- return false;
- if (!parent.getAttribute(elem, "objcopycommand", objcopyCommandOpt))
- return false;
- if (!parent.getAttribute(elem, "stripcommand", stripCommandOpt))
- return false;
- if (!parent.getAttribute(elem, "out", fileNameOpt))
- return false;
- if (!parent.getAttribute(elem, "strip", doStripOpt))
- return false;
- if (!parent.getAttribute(elem, "symfile", symFileNameOpt))
- return false;
-
- std::vector<Element *> children = elem->getChildren();
- for (std::size_t i=0 ; i<children.size() ; i++)
- {
- Element *child = children[i];
- String tagName = child->getName();
- if (tagName == "fileset")
- {
- if (!parseFileSet(child, parent, fileSet))
- return false;
- }
- else if (tagName == "flags")
- {
- if (!parent.getValue(child, flagsOpt))
- return false;
- flagsOpt = strip(flagsOpt);
- }
- else if (tagName == "libs")
- {
- if (!parent.getValue(child, libsOpt))
- return false;
- libsOpt = strip(libsOpt);
- }
- }
- return true;
- }
-
-private:
-
- FileSet fileSet;
-
- String commandOpt;
- String fileNameOpt;
- String flagsOpt;
- String libsOpt;
- String doStripOpt;
- String symFileNameOpt;
- String stripCommandOpt;
- String objcopyCommandOpt;
-
-};
-
-
-
-/**
- * Create a named file
- */
-class TaskMakeFile : public Task
-{
-public:
-
- TaskMakeFile(MakeBase &par) : Task(par)
- { type = TASK_MAKEFILE; name = "makefile"; }
-
- virtual ~TaskMakeFile()
- {}
-
- virtual bool execute()
- {
- String fileName = parent.eval(fileNameOpt, "");
- bool force = parent.evalBool(forceOpt, false);
- String text = parent.eval(textOpt, "");
-
- taskstatus("%s", fileName.c_str());
- String fullName = parent.resolve(fileName);
- if (!force && !isNewerThan(parent.getURI().getPath(), fullName))
- {
- taskstatus("skipped");
- return true;
- }
- String fullNative = getNativePath(fullName);
- //trace("fullName:%s", fullName.c_str());
- FILE *f = fopen(fullNative.c_str(), "w");
- if (!f)
- {
- error("<makefile> could not open %s for writing : %s",
- fullName.c_str(), strerror(errno));
- return false;
- }
- for (std::size_t i=0 ; i<text.size() ; i++)
- fputc(text[i], f);
- fputc('\n', f);
- fclose(f);
- removeFromStatCache(fullNative);
- return true;
- }
-
- virtual bool parse(Element *elem)
- {
- if (!parent.getAttribute(elem, "file", fileNameOpt))
- return false;
- if (!parent.getAttribute(elem, "force", forceOpt))
- return false;
- if (fileNameOpt.size() == 0)
- {
- error("<makefile> requires 'file=\"filename\"' attribute");
- return false;
- }
- if (!parent.getValue(elem, textOpt))
- return false;
- textOpt = leftJustify(textOpt);
- //trace("dirname:%s", dirName.c_str());
- return true;
- }
-
-private:
-
- String fileNameOpt;
- String forceOpt;
- String textOpt;
-};
-
-
-
-/**
- * Create a named directory
- */
-class TaskMkDir : public Task
-{
-public:
-
- TaskMkDir(MakeBase &par) : Task(par)
- { type = TASK_MKDIR; name = "mkdir"; }
-
- virtual ~TaskMkDir()
- {}
-
- virtual bool execute()
- {
- String dirName = parent.eval(dirNameOpt, ".");
-
- taskstatus("%s", dirName.c_str());
- String fullDir = parent.resolve(dirName);
- //trace("fullDir:%s", fullDir.c_str());
- if (!createDirectory(fullDir))
- return false;
- return true;
- }
-
- virtual bool parse(Element *elem)
- {
- if (!parent.getAttribute(elem, "dir", dirNameOpt))
- return false;
- if (dirNameOpt.size() == 0)
- {
- error("<mkdir> requires 'dir=\"dirname\"' attribute");
- return false;
- }
- return true;
- }
-
-private:
-
- String dirNameOpt;
-};
-
-
-
-/**
- * Create a named directory
- */
-class TaskMsgFmt: public Task
-{
-public:
-
- TaskMsgFmt(MakeBase &par) : Task(par)
- { type = TASK_MSGFMT; name = "msgfmt"; }
-
- virtual ~TaskMsgFmt()
- {}
-
- virtual bool execute()
- {
- String command = parent.eval(commandOpt, "msgfmt");
- String toDirName = parent.eval(toDirNameOpt, ".");
- String outName = parent.eval(outNameOpt, "");
- bool owndir = parent.evalBool(owndirOpt, false);
-
- if (!listFiles(parent, fileSet))
- return false;
- String fileSetDir = fileSet.getDirectory();
-
- //trace("msgfmt: %d", fileSet.size());
- for (std::size_t i=0 ; i<fileSet.size() ; i++)
- {
- String fileName = fileSet[i];
- if (getSuffix(fileName) != "po")
- continue;
- String sourcePath;
- if (fileSetDir.size()>0)
- {
- sourcePath.append(fileSetDir);
- sourcePath.append("/");
- }
- sourcePath.append(fileName);
- String fullSource = parent.resolve(sourcePath);
-
- String destPath;
- if (toDirName.size()>0)
- {
- destPath.append(toDirName);
- destPath.append("/");
- }
- if (owndir)
- {
- String subdir = fileName;
- std::size_t pos = subdir.find_last_of('.');
- if (pos != subdir.npos)
- subdir = subdir.substr(0, pos);
- destPath.append(subdir);
- destPath.append("/");
- }
- //Pick the output file name
- if (outName.size() > 0)
- {
- destPath.append(outName);
- }
- else
- {
- destPath.append(fileName);
- destPath[destPath.size()-2] = 'm';
- }
-
- String fullDest = parent.resolve(destPath);
-
- if (!isNewerThan(fullSource, fullDest))
- {
- //trace("skip %s", fullSource.c_str());
- continue;
- }
-
- String cmd = command;
- cmd.append(" ");
- cmd.append(fullSource);
- cmd.append(" -o ");
- cmd.append(fullDest);
-
- int pos = fullDest.find_last_of('/');
- if (pos>0)
- {
- String fullDestPath = fullDest.substr(0, pos);
- if (!createDirectory(fullDestPath))
- return false;
- }
-
-
-
- String outString, errString;
- if (!executeCommand(cmd.c_str(), "", outString, errString))
- {
- error("<msgfmt> problem: %s", errString.c_str());
- return false;
- }
- removeFromStatCache(getNativePath(fullDest));
- }
-
- return true;
- }
-
- virtual bool parse(Element *elem)
- {
- if (!parent.getAttribute(elem, "command", commandOpt))
- return false;
- if (!parent.getAttribute(elem, "todir", toDirNameOpt))
- return false;
- if (!parent.getAttribute(elem, "out", outNameOpt))
- return false;
- if (!parent.getAttribute(elem, "owndir", owndirOpt))
- return false;
-
- std::vector<Element *> children = elem->getChildren();
- for (std::size_t i=0 ; i<children.size() ; i++)
- {
- Element *child = children[i];
- String tagName = child->getName();
- if (tagName == "fileset")
- {
- if (!parseFileSet(child, parent, fileSet))
- return false;
- }
- }
- return true;
- }
-
-private:
-
- FileSet fileSet;
-
- String commandOpt;
- String toDirNameOpt;
- String outNameOpt;
- String owndirOpt;
-
-};
-
-
-
-/**
- * Perform a Package-Config query similar to pkg-config
- */
-class TaskPkgConfig : public Task
-{
-public:
-
- typedef enum
- {
- PKG_CONFIG_QUERY_CFLAGS,
- PKG_CONFIG_QUERY_LIBS,
- PKG_CONFIG_QUERY_ALL
- } QueryTypes;
-
- TaskPkgConfig(MakeBase &par) : Task(par)
- {
- type = TASK_PKG_CONFIG;
- name = "pkg-config";
- }
-
- virtual ~TaskPkgConfig()
- {}
-
- virtual bool execute()
- {
- String pkgName = parent.eval(pkgNameOpt, "");
- String prefix = parent.eval(prefixOpt, "");
- String propName = parent.eval(propNameOpt, "");
- String pkgConfigPath = parent.eval(pkgConfigPathOpt,"");
- String query = parent.eval(queryOpt, "all");
-
- String path = parent.resolve(pkgConfigPath);
- PkgConfig pkgconfig;
- pkgconfig.setPath(path);
- pkgconfig.setPrefix(prefix);
- if (!pkgconfig.query(pkgName))
- {
- error("<pkg-config> query failed for '%s", name.c_str());
- return false;
- }
-
- String val = "";
- if (query == "cflags")
- val = pkgconfig.getCflags();
- else if (query == "libs")
- val =pkgconfig.getLibs();
- else if (query == "all")
- val = pkgconfig.getAll();
- else
- {
- error("<pkg-config> unhandled query : %s", query.c_str());
- return false;
- }
- taskstatus("property %s = '%s'", propName.c_str(), val.c_str());
- parent.setProperty(propName, val);
- return true;
- }
-
- virtual bool parse(Element *elem)
- {
- //# NAME
- if (!parent.getAttribute(elem, "name", pkgNameOpt))
- return false;
- if (pkgNameOpt.size()==0)
- {
- error("<pkg-config> requires 'name=\"package\"' attribute");
- return false;
- }
-
- //# PROPERTY
- if (!parent.getAttribute(elem, "property", propNameOpt))
- return false;
- if (propNameOpt.size()==0)
- {
- error("<pkg-config> requires 'property=\"name\"' attribute");
- return false;
- }
- //# PATH
- if (!parent.getAttribute(elem, "path", pkgConfigPathOpt))
- return false;
- //# PREFIX
- if (!parent.getAttribute(elem, "prefix", prefixOpt))
- return false;
- //# QUERY
- if (!parent.getAttribute(elem, "query", queryOpt))
- return false;
-
- return true;
- }
-
-private:
-
- String queryOpt;
- String pkgNameOpt;
- String prefixOpt;
- String propNameOpt;
- String pkgConfigPathOpt;
-
-};
-
-
-
-
-
-
-/**
- * Process an archive to allow random access
- */
-class TaskRanlib : public Task
-{
-public:
-
- TaskRanlib(MakeBase &par) : Task(par)
- { type = TASK_RANLIB; name = "ranlib"; }
-
- virtual ~TaskRanlib()
- {}
-
- virtual bool execute()
- {
- String fileName = parent.eval(fileNameOpt, "");
- String command = parent.eval(commandOpt, "ranlib");
-
- String fullName = parent.resolve(fileName);
- //trace("fullDir:%s", fullDir.c_str());
- String cmd = command;
- cmd.append(" ");
- cmd.append(fullName);
- String outbuf, errbuf;
- if (!executeCommand(cmd, "", outbuf, errbuf))
- return false;
- // TODO:
- //removeFromStatCache(getNativePath(fullDest));
- return true;
- }
-
- virtual bool parse(Element *elem)
- {
- if (!parent.getAttribute(elem, "command", commandOpt))
- return false;
- if (!parent.getAttribute(elem, "file", fileNameOpt))
- return false;
- if (fileNameOpt.size() == 0)
- {
- error("<ranlib> requires 'file=\"fileNname\"' attribute");
- return false;
- }
- return true;
- }
-
-private:
-
- String fileNameOpt;
- String commandOpt;
-};
-
-
-
-/**
- * Compile a resource file into a binary object
- */
-class TaskRC : public Task
-{
-public:
-
- TaskRC(MakeBase &par) : Task(par)
- { type = TASK_RC; name = "rc"; }
-
- virtual ~TaskRC()
- {}
-
- virtual bool execute()
- {
- String command = parent.eval(commandOpt, "windres");
- String flags = parent.eval(flagsOpt, "");
- String fileName = parent.eval(fileNameOpt, "");
- String outName = parent.eval(outNameOpt, "");
-
- String fullFile = parent.resolve(fileName);
- String fullOut = parent.resolve(outName);
- if (!isNewerThan(fullFile, fullOut))
- return true;
- String cmd = command;
- cmd.append(" -o ");
- cmd.append(fullOut);
- cmd.append(" ");
- cmd.append(flags);
- cmd.append(" ");
- cmd.append(fullFile);
-
- String outString, errString;
- if (!executeCommand(cmd.c_str(), "", outString, errString))
- {
- error("RC problem: %s", errString.c_str());
- return false;
- }
- removeFromStatCache(getNativePath(fullOut));
- return true;
- }
-
- virtual bool parse(Element *elem)
- {
- if (!parent.getAttribute(elem, "command", commandOpt))
- return false;
- if (!parent.getAttribute(elem, "file", fileNameOpt))
- return false;
- if (!parent.getAttribute(elem, "out", outNameOpt))
- return false;
- std::vector<Element *> children = elem->getChildren();
- for (std::size_t i=0 ; i<children.size() ; i++)
- {
- Element *child = children[i];
- String tagName = child->getName();
- if (tagName == "flags")
- {
- if (!parent.getValue(child, flagsOpt))
- return false;
- }
- }
- return true;
- }
-
-private:
-
- String commandOpt;
- String flagsOpt;
- String fileNameOpt;
- String outNameOpt;
-
-};
-
-
-
-/**
- * Collect .o's into a .so or DLL
- */
-class TaskSharedLib : public Task
-{
-public:
-
- TaskSharedLib(MakeBase &par) : Task(par)
- { type = TASK_SHAREDLIB; name = "dll"; }
-
- virtual ~TaskSharedLib()
- {}
-
- virtual bool execute()
- {
- String command = parent.eval(commandOpt, "dllwrap");
- String fileName = parent.eval(fileNameOpt, "");
- String defFileName = parent.eval(defFileNameOpt, "");
- String impFileName = parent.eval(impFileNameOpt, "");
- String libs = parent.eval(libsOpt, "");
-
- //trace("###########HERE %d", fileSet.size());
- bool doit = false;
-
- String fullOut = parent.resolve(fileName);
- //trace("ar fullout: %s", fullOut.c_str());
-
- if (!listFiles(parent, fileSet))
- return false;
- String fileSetDir = parent.eval(fileSet.getDirectory(), ".");
-
- for (std::size_t i=0 ; i<fileSet.size() ; i++)
- {
- String fname;
- if (fileSetDir.size()>0)
- {
- fname.append(fileSetDir);
- fname.append("/");
- }
- fname.append(fileSet[i]);
- String fullName = parent.resolve(fname);
- //trace("ar : %s/%s", fullOut.c_str(), fullName.c_str());
- if (isNewerThan(fullName, fullOut))
- doit = true;
- }
- //trace("Needs it:%d", doit);
- if (!doit)
- {
- return true;
- }
-
- String cmd = "dllwrap";
- cmd.append(" -o ");
- cmd.append(fullOut);
- if (defFileName.size()>0)
- {
- cmd.append(" --def ");
- cmd.append(defFileName);
- cmd.append(" ");
- }
- if (impFileName.size()>0)
- {
- cmd.append(" --implib ");
- cmd.append(impFileName);
- cmd.append(" ");
- }
- for (std::size_t i=0 ; i<fileSet.size() ; i++)
- {
- String fname;
- if (fileSetDir.size()>0)
- {
- fname.append(fileSetDir);
- fname.append("/");
- }
- fname.append(fileSet[i]);
- String fullName = parent.resolve(fname);
-
- cmd.append(" ");
- cmd.append(fullName);
- }
- cmd.append(" ");
- cmd.append(libs);
-
- String outString, errString;
- if (!executeCommand(cmd.c_str(), "", outString, errString))
- {
- error("<sharedlib> problem: %s", errString.c_str());
- return false;
- }
- removeFromStatCache(getNativePath(fullOut));
- return true;
- }
-
- virtual bool parse(Element *elem)
- {
- if (!parent.getAttribute(elem, "command", commandOpt))
- return false;
- if (!parent.getAttribute(elem, "file", fileNameOpt))
- return false;
- if (!parent.getAttribute(elem, "import", impFileNameOpt))
- return false;
- if (!parent.getAttribute(elem, "def", defFileNameOpt))
- return false;
-
- std::vector<Element *> children = elem->getChildren();
- for (std::size_t i=0 ; i<children.size() ; i++)
- {
- Element *child = children[i];
- String tagName = child->getName();
- if (tagName == "fileset")
- {
- if (!parseFileSet(child, parent, fileSet))
- return false;
- }
- else if (tagName == "libs")
- {
- if (!parent.getValue(child, libsOpt))
- return false;
- libsOpt = strip(libsOpt);
- }
- }
- return true;
- }
-
-private:
-
- FileSet fileSet;
-
- String commandOpt;
- String fileNameOpt;
- String defFileNameOpt;
- String impFileNameOpt;
- String libsOpt;
-
-};
-
-
-
-/**
- * Run the "ar" command to archive .o's into a .a
- */
-class TaskStaticLib : public Task
-{
-public:
-
- TaskStaticLib(MakeBase &par) : Task(par)
- { type = TASK_STATICLIB; name = "staticlib"; }
-
- virtual ~TaskStaticLib()
- {}
-
- virtual bool execute()
- {
- String command = parent.eval(commandOpt, "ar crv");
- String fileName = parent.eval(fileNameOpt, "");
-
- bool doit = false;
-
- String fullOut = parent.resolve(fileName);
- //trace("ar fullout: %s", fullOut.c_str());
-
- if (!listFiles(parent, fileSet))
- return false;
- String fileSetDir = parent.eval(fileSet.getDirectory(), ".");
- //trace("###########HERE %s", fileSetDir.c_str());
-
- for (std::size_t i=0 ; i<fileSet.size() ; i++)
- {
- String fname;
- if (fileSetDir.size()>0)
- {
- fname.append(fileSetDir);
- fname.append("/");
- }
- fname.append(fileSet[i]);
- String fullName = parent.resolve(fname);
- //trace("ar : %s/%s", fullOut.c_str(), fullName.c_str());
- if (isNewerThan(fullName, fullOut))
- doit = true;
- }
- //trace("Needs it:%d", doit);
- if (!doit)
- {
- return true;
- }
-
- String cmd = command;
- cmd.append(" ");
- cmd.append(fullOut);
- for (std::size_t i=0 ; i<fileSet.size() ; i++)
- {
- String fname;
- if (fileSetDir.size()>0)
- {
- fname.append(fileSetDir);
- fname.append("/");
- }
- fname.append(fileSet[i]);
- String fullName = parent.resolve(fname);
-
- cmd.append(" ");
- cmd.append(fullName);
- }
-
- String outString, errString;
- if (!executeCommand(cmd.c_str(), "", outString, errString))
- {
- error("<staticlib> problem: %s", errString.c_str());
- return false;
- }
- removeFromStatCache(getNativePath(fullOut));
- return true;
- }
-
-
- virtual bool parse(Element *elem)
- {
- if (!parent.getAttribute(elem, "command", commandOpt))
- return false;
- if (!parent.getAttribute(elem, "file", fileNameOpt))
- return false;
-
- std::vector<Element *> children = elem->getChildren();
- for (std::size_t i=0 ; i<children.size() ; i++)
- {
- Element *child = children[i];
- String tagName = child->getName();
- if (tagName == "fileset")
- {
- if (!parseFileSet(child, parent, fileSet))
- return false;
- }
- }
- return true;
- }
-
-private:
-
- FileSet fileSet;
-
- String commandOpt;
- String fileNameOpt;
-
-};
-
-
-
-
-/**
- * Strip an executable
- */
-class TaskStrip : public Task
-{
-public:
-
- TaskStrip(MakeBase &par) : Task(par)
- { type = TASK_STRIP; name = "strip"; }
-
- virtual ~TaskStrip()
- {}
-
- virtual bool execute()
- {
- String command = parent.eval(commandOpt, "strip");
- String fileName = parent.eval(fileNameOpt, "");
- String symFileName = parent.eval(symFileNameOpt, "");
-
- String fullName = parent.resolve(fileName);
- //trace("fullDir:%s", fullDir.c_str());
- String cmd;
- String outbuf, errbuf;
-
- if (symFileName.size()>0)
- {
- String symFullName = parent.resolve(symFileName);
- cmd = "objcopy --only-keep-debug ";
- cmd.append(getNativePath(fullName));
- cmd.append(" ");
- cmd.append(getNativePath(symFullName));
- if (!executeCommand(cmd, "", outbuf, errbuf))
- {
- error("<strip> symbol file failed : %s", errbuf.c_str());
- return false;
- }
- }
-
- cmd = command;
- cmd.append(getNativePath(fullName));
- if (!executeCommand(cmd, "", outbuf, errbuf))
- {
- error("<strip> failed : %s", errbuf.c_str());
- return false;
- }
- removeFromStatCache(getNativePath(fullName));
- return true;
- }
-
- virtual bool parse(Element *elem)
- {
- if (!parent.getAttribute(elem, "command", commandOpt))
- return false;
- if (!parent.getAttribute(elem, "file", fileNameOpt))
- return false;
- if (!parent.getAttribute(elem, "symfile", symFileNameOpt))
- return false;
- if (fileNameOpt.size() == 0)
- {
- error("<strip> requires 'file=\"fileName\"' attribute");
- return false;
- }
- return true;
- }
-
-private:
-
- String commandOpt;
- String fileNameOpt;
- String symFileNameOpt;
-};
-
-
-/**
- *
- */
-class TaskTouch : public Task
-{
-public:
-
- TaskTouch(MakeBase &par) : Task(par)
- { type = TASK_TOUCH; name = "touch"; }
-
- virtual ~TaskTouch()
- {}
-
- virtual bool execute()
- {
- String fileName = parent.eval(fileNameOpt, "");
-
- String fullName = parent.resolve(fileName);
- String nativeFile = getNativePath(fullName);
- if (!isRegularFile(fullName) && !isDirectory(fullName))
- {
- // S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH
- int ret = creat(nativeFile.c_str(), 0666);
- if (ret != 0)
- {
- error("<touch> could not create '%s' : %s",
- nativeFile.c_str(), strerror(ret));
- return false;
- }
- return true;
- }
- int ret = utime(nativeFile.c_str(), (struct utimbuf *)0);
- if (ret != 0)
- {
- error("<touch> could not update the modification time for '%s' : %s",
- nativeFile.c_str(), strerror(ret));
- return false;
- }
- removeFromStatCache(nativeFile);
- return true;
- }
-
- virtual bool parse(Element *elem)
- {
- //trace("touch parse");
- if (!parent.getAttribute(elem, "file", fileNameOpt))
- return false;
- if (fileNameOpt.size() == 0)
- {
- error("<touch> requires 'file=\"fileName\"' attribute");
- return false;
- }
- return true;
- }
-
- String fileNameOpt;
-};
-
-
-/**
- *
- */
-class TaskTstamp : public Task
-{
-public:
-
- TaskTstamp(MakeBase &par) : Task(par)
- { type = TASK_TSTAMP; name = "tstamp"; }
-
- virtual ~TaskTstamp()
- {}
-
- virtual bool execute()
- {
- return true;
- }
-
- virtual bool parse(Element *elem)
- {
- //trace("tstamp parse");
- return true;
- }
-};
-
-
-
-/**
- *
- */
-Task *Task::createTask(Element *elem, int lineNr)
-{
- String tagName = elem->getName();
- //trace("task:%s", tagName.c_str());
- Task *task = NULL;
- if (tagName == "cc")
- task = new TaskCC(parent);
- else if (tagName == "copy")
- task = new TaskCopy(parent);
- else if (tagName == "cxxtestpart")
- task = new TaskCxxTestPart(parent);
- else if (tagName == "cxxtestroot")
- task = new TaskCxxTestRoot(parent);
- else if (tagName == "cxxtestrun")
- task = new TaskCxxTestRun(parent);
- else if (tagName == "delete")
- task = new TaskDelete(parent);
- else if (tagName == "echo")
- task = new TaskEcho(parent);
- else if (tagName == "jar")
- task = new TaskJar(parent);
- else if (tagName == "javac")
- task = new TaskJavac(parent);
- else if (tagName == "link")
- task = new TaskLink(parent);
- else if (tagName == "makefile")
- task = new TaskMakeFile(parent);
- else if (tagName == "mkdir")
- task = new TaskMkDir(parent);
- else if (tagName == "msgfmt")
- task = new TaskMsgFmt(parent);
- else if (tagName == "pkg-config")
- task = new TaskPkgConfig(parent);
- else if (tagName == "ranlib")
- task = new TaskRanlib(parent);
- else if (tagName == "rc")
- task = new TaskRC(parent);
- else if (tagName == "sharedlib")
- task = new TaskSharedLib(parent);
- else if (tagName == "staticlib")
- task = new TaskStaticLib(parent);
- else if (tagName == "strip")
- task = new TaskStrip(parent);
- else if (tagName == "touch")
- task = new TaskTouch(parent);
- else if (tagName == "tstamp")
- task = new TaskTstamp(parent);
- else
- {
- error("Unknown task '%s'", tagName.c_str());
- return NULL;
- }
-
- task->setLine(lineNr);
-
- if (!task->parse(elem))
- {
- delete task;
- return NULL;
- }
- return task;
-}
-
-
-
-//########################################################################
-//# T A R G E T
-//########################################################################
-
-/**
- *
- */
-class Target : public MakeBase
-{
-
-public:
-
- /**
- *
- */
- Target(Make &par) : parent(par)
- { init(); }
-
- /**
- *
- */
- Target(const Target &other) : parent(other.parent)
- { init(); assign(other); }
-
- /**
- *
- */
- Target &operator=(const Target &other)
- { init(); assign(other); return *this; }
-
- /**
- *
- */
- virtual ~Target()
- { cleanup() ; }
-
-
- /**
- *
- */
- virtual Make &getParent()
- { return parent; }
-
- /**
- *
- */
- virtual String getName()
- { return name; }
-
- /**
- *
- */
- virtual void setName(const String &val)
- { name = val; }
-
- /**
- *
- */
- virtual String getDescription()
- { return description; }
-
- /**
- *
- */
- virtual void setDescription(const String &val)
- { description = val; }
-
- /**
- *
- */
- virtual void addDependency(const String &val)
- { deps.push_back(val); }
-
- /**
- *
- */
- virtual void parseDependencies(const String &val)
- { deps = tokenize(val, ", "); }
-
- /**
- *
- */
- virtual std::vector<String> &getDependencies()
- { return deps; }
-
- /**
- *
- */
- virtual String getIf()
- { return ifVar; }
-
- /**
- *
- */
- virtual void setIf(const String &val)
- { ifVar = val; }
-
- /**
- *
- */
- virtual String getUnless()
- { return unlessVar; }
-
- /**
- *
- */
- virtual void setUnless(const String &val)
- { unlessVar = val; }
-
- /**
- *
- */
- virtual void addTask(Task *val)
- { tasks.push_back(val); }
-
- /**
- *
- */
- virtual std::vector<Task *> &getTasks()
- { return tasks; }
-
-private:
-
- void init()
- {
- }
-
- void cleanup()
- {
- tasks.clear();
- }
-
- void assign(const Target &other)
- {
- //parent = other.parent;
- name = other.name;
- description = other.description;
- ifVar = other.ifVar;
- unlessVar = other.unlessVar;
- deps = other.deps;
- tasks = other.tasks;
- }
-
- Make &parent;
-
- String name;
-
- String description;
-
- String ifVar;
-
- String unlessVar;
-
- std::vector<String> deps;
-
- std::vector<Task *> tasks;
-
-};
-
-
-
-
-
-
-
-
-//########################################################################
-//# M A K E
-//########################################################################
-
-
-/**
- *
- */
-class Make : public MakeBase
-{
-
-public:
-
- /**
- *
- */
- Make()
- { init(); }
-
- /**
- *
- */
- Make(const Make &other)
- { assign(other); }
-
- /**
- *
- */
- Make &operator=(const Make &other)
- { assign(other); return *this; }
-
- /**
- *
- */
- virtual ~Make()
- { cleanup(); }
-
- /**
- *
- */
- virtual std::map<String, Target> &getTargets()
- { return targets; }
-
-
- /**
- *
- */
- virtual String version()
- { return BUILDTOOL_VERSION; }
-
- /**
- * Overload a <property>
- */
- virtual bool specifyProperty(const String &name,
- const String &value);
-
- /**
- *
- */
- virtual bool run();
-
- /**
- *
- */
- virtual bool run(const String &target);
-
-
-
-private:
-
- /**
- *
- */
- void init();
-
- /**
- *
- */
- void cleanup();
-
- /**
- *
- */
- void assign(const Make &other);
-
- /**
- *
- */
- bool executeTask(Task &task);
-
-
- /**
- *
- */
- bool executeTarget(Target &target,
- std::set<String> &targetsCompleted);
-
-
- /**
- *
- */
- bool execute();
-
- /**
- *
- */
- bool checkTargetDependencies(Target &prop,
- std::vector<String> &depList);
-
- /**
- *
- */
- bool parsePropertyFile(const String &fileName,
- const String &prefix);
-
- /**
- *
- */
- bool parseProperty(Element *elem);
-
- /**
- *
- */
- bool parseFile();
-
- /**
- *
- */
- std::vector<String> glob(const String &pattern);
-
-
- //###############
- //# Fields
- //###############
-
- String projectName;
-
- String currentTarget;
-
- String defaultTarget;
-
- String specifiedTarget;
-
- String baseDir;
-
- String description;
-
- //std::vector<Property> properties;
-
- std::map<String, Target> targets;
-
- std::vector<Task *> allTasks;
-
- std::map<String, String> specifiedProperties;
-
-};
-
-
-//########################################################################
-//# C L A S S M A I N T E N A N C E
-//########################################################################
-
-/**
- *
- */
-void Make::init()
-{
- uri = "build.xml";
- projectName = "";
- currentTarget = "";
- defaultTarget = "";
- specifiedTarget = "";
- baseDir = "";
- description = "";
- envPrefix = "env.";
- pcPrefix = "pc.";
- pccPrefix = "pcc.";
- pclPrefix = "pcl.";
- bzrPrefix = "bzr.";
- properties.clear();
- for (std::size_t i = 0 ; i < allTasks.size() ; i++)
- delete allTasks[i];
- allTasks.clear();
-}
-
-
-
-/**
- *
- */
-void Make::cleanup()
-{
- for (std::size_t i = 0 ; i < allTasks.size() ; i++)
- delete allTasks[i];
- allTasks.clear();
-}
-
-
-
-/**
- *
- */
-void Make::assign(const Make &other)
-{
- uri = other.uri;
- projectName = other.projectName;
- currentTarget = other.currentTarget;
- defaultTarget = other.defaultTarget;
- specifiedTarget = other.specifiedTarget;
- baseDir = other.baseDir;
- description = other.description;
- properties = other.properties;
-}
-
-
-
-//########################################################################
-//# U T I L I T Y T A S K S
-//########################################################################
-
-/**
- * Perform a file globbing
- */
-std::vector<String> Make::glob(const String &pattern)
-{
- std::vector<String> res;
- return res;
-}
-
-
-//########################################################################
-//# P U B L I C A P I
-//########################################################################
-
-
-
-/**
- *
- */
-bool Make::executeTarget(Target &target,
- std::set<String> &targetsCompleted)
-{
-
- String name = target.getName();
-
- //First get any dependencies for this target
- std::vector<String> deps = target.getDependencies();
- for (std::size_t i=0 ; i<deps.size() ; i++)
- {
- String dep = deps[i];
- //Did we do it already? Skip
- if (targetsCompleted.find(dep)!=targetsCompleted.end())
- continue;
-
- std::map<String, Target> &tgts =
- target.getParent().getTargets();
- std::map<String, Target>::iterator iter =
- tgts.find(dep);
- if (iter == tgts.end())
- {
- error("Target '%s' dependency '%s' not found",
- name.c_str(), dep.c_str());
- return false;
- }
- Target depTarget = iter->second;
- if (!executeTarget(depTarget, targetsCompleted))
- {
- return false;
- }
- }
-
- status("##### Target : %s\n##### %s", name.c_str(),
- target.getDescription().c_str());
-
- //Now let's do the tasks
- std::vector<Task *> &tasks = target.getTasks();
- for (std::size_t i=0 ; i<tasks.size() ; i++)
- {
- Task *task = tasks[i];
- status("--- %s / %s", name.c_str(), task->getName().c_str());
- if (!task->execute())
- {
- return false;
- }
- }
-
- targetsCompleted.insert(name);
-
- return true;
-}
-
-
-
-/**
- * Main execute() method. Start here and work
- * up the dependency tree
- */
-bool Make::execute()
-{
- status("######## EXECUTE");
-
- //Determine initial target
- if (specifiedTarget.size()>0)
- {
- currentTarget = specifiedTarget;
- }
- else if (defaultTarget.size()>0)
- {
- currentTarget = defaultTarget;
- }
- else
- {
- error("execute: no specified or default target requested");
- return false;
- }
-
- std::map<String, Target>::iterator iter =
- targets.find(currentTarget);
- if (iter == targets.end())
- {
- error("Initial target '%s' not found",
- currentTarget.c_str());
- return false;
- }
-
- //Now run
- Target target = iter->second;
- std::set<String> targetsCompleted;
- if (!executeTarget(target, targetsCompleted))
- {
- return false;
- }
-
- status("######## EXECUTE COMPLETE");
- return true;
-}
-
-
-
-
-/**
- *
- */
-bool Make::checkTargetDependencies(Target &target,
- std::vector<String> &depList)
-{
- String tgtName = target.getName().c_str();
- depList.push_back(tgtName);
-
- std::vector<String> deps = target.getDependencies();
- for (std::size_t i=0 ; i<deps.size() ; i++)
- {
- String dep = deps[i];
- //First thing entered was the starting Target
- if (dep == depList[0])
- {
- error("Circular dependency '%s' found at '%s'",
- dep.c_str(), tgtName.c_str());
- std::vector<String>::iterator diter;
- for (diter=depList.begin() ; diter!=depList.end() ; diter++)
- {
- error(" %s", diter->c_str());
- }
- return false;
- }
-
- std::map<String, Target> &tgts =
- target.getParent().getTargets();
- std::map<String, Target>::iterator titer = tgts.find(dep);
- if (titer == tgts.end())
- {
- error("Target '%s' dependency '%s' not found",
- tgtName.c_str(), dep.c_str());
- return false;
- }
- if (!checkTargetDependencies(titer->second, depList))
- {
- return false;
- }
- }
- return true;
-}
-
-
-
-
-
-static int getword(int pos, const String &inbuf, String &result)
-{
- int p = pos;
- int len = (int)inbuf.size();
- String val;
- while (p < len)
- {
- char ch = inbuf[p];
- if (!isalnum(ch) && ch!='.' && ch!='_')
- break;
- val.push_back(ch);
- p++;
- }
- result = val;
- return p;
-}
-
-
-
-
-/**
- *
- */
-bool Make::parsePropertyFile(const String &fileName,
- const String &prefix)
-{
- FILE *f = fopen(fileName.c_str(), "r");
- if (!f)
- {
- error("could not open property file %s", fileName.c_str());
- return false;
- }
- int linenr = 0;
- while (!feof(f))
- {
- char buf[256];
- if (!fgets(buf, 255, f))
- break;
- linenr++;
- String s = buf;
- s = trim(s);
- int len = s.size();
- if (len == 0)
- continue;
- if (s[0] == '#')
- continue;
- String key;
- String val;
- int p = 0;
- int p2 = getword(p, s, key);
- if (p2 <= p)
- {
- error("property file %s, line %d: expected keyword",
- fileName.c_str(), linenr);
- fclose(f);
- return false;
- }
- if (prefix.size() > 0)
- {
- key.insert(0, prefix);
- }
-
- //skip whitespace
- for (p=p2 ; p<len ; p++)
- if (!isspace(s[p]))
- break;
-
- if (p>=len || s[p]!='=')
- {
- error("property file %s, line %d: expected '='",
- fileName.c_str(), linenr);
- return false;
- }
- p++;
-
- //skip whitespace
- for ( ; p<len ; p++)
- if (!isspace(s[p]))
- break;
-
- /* This way expects a word after the =
- p2 = getword(p, s, val);
- if (p2 <= p)
- {
- error("property file %s, line %d: expected value",
- fileName.c_str(), linenr);
- return false;
- }
- */
- // This way gets the rest of the line after the =
- if (p>=len)
- {
- error("property file %s, line %d: expected value",
- fileName.c_str(), linenr);
- return false;
- }
- val = s.substr(p);
- if (key.size()==0)
- continue;
- //allow property to be set, even if val=""
-
- //trace("key:'%s' val:'%s'", key.c_str(), val.c_str());
- //See if we wanted to overload this property
- std::map<String, String>::iterator iter =
- specifiedProperties.find(key);
- if (iter!=specifiedProperties.end())
- {
- val = iter->second;
- status("overloading property '%s' = '%s'",
- key.c_str(), val.c_str());
- }
- properties[key] = val;
- }
- fclose(f);
- return true;
-}
-
-
-
-
-/**
- *
- */
-bool Make::parseProperty(Element *elem)
-{
- std::vector<Attribute> &attrs = elem->getAttributes();
- for (std::size_t i=0 ; i<attrs.size() ; i++)
- {
- String attrName = attrs[i].getName();
- String attrVal = attrs[i].getValue();
-
- if (attrName == "name")
- {
- String val;
- if (!getAttribute(elem, "value", val))
- return false;
- if (val.size() > 0)
- {
- properties[attrVal] = val;
- }
- else
- {
- if (!getAttribute(elem, "location", val))
- return false;
- //let the property exist, even if not defined
- properties[attrVal] = val;
- }
- //See if we wanted to overload this property
- std::map<String, String>::iterator iter =
- specifiedProperties.find(attrVal);
- if (iter != specifiedProperties.end())
- {
- val = iter->second;
- status("overloading property '%s' = '%s'",
- attrVal.c_str(), val.c_str());
- properties[attrVal] = val;
- }
- }
- else if (attrName == "file")
- {
- String prefix;
- if (!getAttribute(elem, "prefix", prefix))
- return false;
- if (prefix.size() > 0)
- {
- if (prefix[prefix.size()-1] != '.')
- prefix.push_back('.');
- }
- if (!parsePropertyFile(attrName, prefix))
- return false;
- }
- else if (attrName == "environment")
- {
- if (attrVal.find('.') != attrVal.npos)
- {
- error("environment prefix cannot have a '.' in it");
- return false;
- }
- envPrefix = attrVal;
- envPrefix.push_back('.');
- }
- else if (attrName == "pkg-config")
- {
- if (attrVal.find('.') != attrVal.npos)
- {
- error("pkg-config prefix cannot have a '.' in it");
- return false;
- }
- pcPrefix = attrVal;
- pcPrefix.push_back('.');
- }
- else if (attrName == "pkg-config-cflags")
- {
- if (attrVal.find('.') != attrVal.npos)
- {
- error("pkg-config-cflags prefix cannot have a '.' in it");
- return false;
- }
- pccPrefix = attrVal;
- pccPrefix.push_back('.');
- }
- else if (attrName == "pkg-config-libs")
- {
- if (attrVal.find('.') != attrVal.npos)
- {
- error("pkg-config-libs prefix cannot have a '.' in it");
- return false;
- }
- pclPrefix = attrVal;
- pclPrefix.push_back('.');
- }
- else if (attrName == "subversion")
- {
- if (attrVal.find('.') != attrVal.npos)
- {
- error("bzr prefix cannot have a '.' in it");
- return false;
- }
- bzrPrefix = attrVal;
- bzrPrefix.push_back('.');
- }
- }
-
- return true;
-}
-
-
-
-
-/**
- *
- */
-bool Make::parseFile()
-{
- status("######## PARSE : %s", uri.getPath().c_str());
-
- setLine(0);
-
- Parser parser;
- Element *root = parser.parseFile(uri.getNativePath());
- if (!root)
- {
- error("Could not open %s for reading",
- uri.getNativePath().c_str());
- return false;
- }
-
- setLine(root->getLine());
-
- if (root->getChildren().size()==0 ||
- root->getChildren()[0]->getName()!="project")
- {
- error("Main xml element should be <project>");
- delete root;
- return false;
- }
-
- //########## Project attributes
- Element *project = root->getChildren()[0];
- String s = project->getAttribute("name");
- if (s.size() > 0)
- projectName = s;
- s = project->getAttribute("default");
- if (s.size() > 0)
- defaultTarget = s;
- s = project->getAttribute("basedir");
- if (s.size() > 0)
- baseDir = s;
-
- //######### PARSE MEMBERS
- std::vector<Element *> children = project->getChildren();
- for (std::size_t i=0 ; i<children.size() ; i++)
- {
- Element *elem = children[i];
- setLine(elem->getLine());
- String tagName = elem->getName();
-
- //########## DESCRIPTION
- if (tagName == "description")
- {
- description = parser.trim(elem->getValue());
- }
-
- //######### PROPERTY
- else if (tagName == "property")
- {
- if (!parseProperty(elem))
- return false;
- }
-
- //######### TARGET
- else if (tagName == "target")
- {
- String tname = elem->getAttribute("name");
- String tdesc = elem->getAttribute("description");
- String tdeps = elem->getAttribute("depends");
- String tif = elem->getAttribute("if");
- String tunless = elem->getAttribute("unless");
- Target target(*this);
- target.setName(tname);
- target.setDescription(tdesc);
- target.parseDependencies(tdeps);
- target.setIf(tif);
- target.setUnless(tunless);
- std::vector<Element *> telems = elem->getChildren();
- for (std::size_t i=0 ; i<telems.size() ; i++)
- {
- Element *telem = telems[i];
- Task breeder(*this);
- Task *task = breeder.createTask(telem, telem->getLine());
- if (!task)
- return false;
- allTasks.push_back(task);
- target.addTask(task);
- }
-
- //Check name
- if (tname.size() == 0)
- {
- error("no name for target");
- return false;
- }
- //Check for duplicate name
- if (targets.find(tname) != targets.end())
- {
- error("target '%s' already defined", tname.c_str());
- return false;
- }
- //more work than targets[tname]=target, but avoids default allocator
- targets.insert(std::make_pair<String, Target>(tname, target));
- }
- //######### none of the above
- else
- {
- error("unknown toplevel tag: <%s>", tagName.c_str());
- return false;
- }
-
- }
-
- std::map<String, Target>::iterator iter;
- for (iter = targets.begin() ; iter!= targets.end() ; iter++)
- {
- Target tgt = iter->second;
- std::vector<String> depList;
- if (!checkTargetDependencies(tgt, depList))
- {
- return false;
- }
- }
-
-
- delete root;
- status("######## PARSE COMPLETE");
- return true;
-}
-
-
-/**
- * Overload a <property>
- */
-bool Make::specifyProperty(const String &name, const String &value)
-{
- if (specifiedProperties.find(name) != specifiedProperties.end())
- {
- error("Property %s already specified", name.c_str());
- return false;
- }
- specifiedProperties[name] = value;
- return true;
-}
-
-
-
-/**
- *
- */
-bool Make::run()
-{
- if (!parseFile())
- return false;
-
- if (!execute())
- return false;
-
- return true;
-}
-
-
-
-
-/**
- * Get a formatted MM:SS.sss time elapsed string
- */
-static String
-timeDiffString(struct timeval &x, struct timeval &y)
-{
- long microsX = x.tv_usec;
- long secondsX = x.tv_sec;
- long microsY = y.tv_usec;
- long secondsY = y.tv_sec;
- if (microsX < microsY)
- {
- microsX += 1000000;
- secondsX -= 1;
- }
-
- int seconds = (int)(secondsX - secondsY);
- int millis = (int)((microsX - microsY)/1000);
-
- int minutes = seconds/60;
- seconds -= minutes*60;
- char buf[80];
- snprintf(buf, 79, "%dm %d.%03ds", minutes, seconds, millis);
- String ret = buf;
- return ret;
-
-}
-
-/**
- *
- */
-bool Make::run(const String &target)
-{
- status("####################################################");
- status("# %s", version().c_str());
- status("####################################################");
- struct timeval timeStart, timeEnd;
- ::gettimeofday(&timeStart, NULL);
- specifiedTarget = target;
- if (!run())
- return false;
- ::gettimeofday(&timeEnd, NULL);
- String timeStr = timeDiffString(timeEnd, timeStart);
- status("####################################################");
- status("# BuildTool Completed : %s", timeStr.c_str());
- status("####################################################");
- return true;
-}
-
-
-
-
-
-
-
-}// namespace buildtool
-//########################################################################
-//# M A I N
-//########################################################################
-
-typedef buildtool::String String;
-
-/**
- * Format an error message in printf() style
- */
-static void error(const char *fmt, ...)
-{
- va_list ap;
- va_start(ap, fmt);
- fprintf(stderr, "BuildTool error: ");
- vfprintf(stderr, fmt, ap);
- fprintf(stderr, "\n");
- va_end(ap);
-}
-
-
-static bool parseProperty(const String &s, String &name, String &val)
-{
- int len = s.size();
- int i;
- for (i=0 ; i<len ; i++)
- {
- char ch = s[i];
- if (ch == '=')
- break;
- name.push_back(ch);
- }
- if (i>=len || s[i]!='=')
- {
- error("property requires -Dname=value");
- return false;
- }
- i++;
- for ( ; i<len ; i++)
- {
- char ch = s[i];
- val.push_back(ch);
- }
- return true;
-}
-
-
-/**
- * Compare a buffer with a key, for the length of the key
- */
-static bool sequ(const String &buf, const char *key)
-{
- int len = buf.size();
- for (int i=0 ; key[i] && i<len ; i++)
- {
- if (key[i] != buf[i])
- return false;
- }
- return true;
-}
-
-static void usage(int argc, char **argv)
-{
- printf("usage:\n");
- printf(" %s [options] [target]\n", argv[0]);
- printf("Options:\n");
- printf(" -help, -h print this message\n");
- printf(" -version print the version information and exit\n");
- printf(" -file <file> use given buildfile\n");
- printf(" -f <file> ''\n");
- printf(" -D<property>=<value> use value for given property\n");
- printf(" -j [N] build using N threads or infinite number of threads if no argument\n");
-}
-
-
-
-
-/**
- * Parse the command-line args, get our options,
- * and run this thing
- */
-static bool parseOptions(int argc, char **argv)
-{
- if (argc < 1)
- {
- error("Cannot parse arguments");
- return false;
- }
-
- buildtool::Make make;
-
- String target;
-
- //char *progName = argv[0];
- for (int i=1 ; i<argc ; i++)
- {
- String arg = argv[i];
- if (arg.size()>1 && arg[0]=='-')
- {
- if (arg == "-h" || arg == "-help")
- {
- usage(argc,argv);
- return true;
- }
- else if (arg == "-version")
- {
- printf("%s", make.version().c_str());
- return true;
- }
- else if (arg == "-f" || arg == "-file")
- {
- if (i>=argc-1)
- {
- usage(argc, argv);
- return false;
- }
- i++; //eat option
- make.setURI(argv[i]);
- }
- else if (arg == "-j")
- {
- if (i>=argc-1) { // if -j is given as last argument
- make.setNumThreads(20); // default to some high value
- } else {
- i++; //eat option
- if (argv[i] && (*argv[i] == '-')) { // if -j is followed by another '-...' option
- make.setNumThreads(20); // default to some high value
- } else {
- make.setNumThreads(atoi(argv[i]));
- }
- }
- }
- else if (arg.size()>2 && sequ(arg, "-D"))
- {
- String s = arg.substr(2, arg.size());
- String name, value;
- if (!parseProperty(s, name, value))
- {
- usage(argc, argv);
- return false;
- }
- if (!make.specifyProperty(name, value))
- return false;
- }
- else
- {
- error("Unknown option:%s", arg.c_str());
- return false;
- }
- }
- else
- {
- if (target.size()>0)
- {
- error("only one initial target");
- usage(argc, argv);
- return false;
- }
- target = arg;
- }
- }
-
- //We have the options. Now execute them
- if (!make.run(target))
- return false;
-
- return true;
-}
-
-
-
-
-/*
-static bool runMake()
-{
- buildtool::Make make;
- if (!make.run())
- return false;
- return true;
-}
-
-
-static bool pkgConfigTest()
-{
- buildtool::PkgConfig pkgConfig;
- if (!pkgConfig.readFile("gtk+-2.0.pc"))
- return false;
- return true;
-}
-
-
-
-static bool depTest()
-{
- buildtool::DepTool deptool;
- deptool.setSourceDirectory("/dev/ink/inkscape/src");
- if (!deptool.generateDependencies("build.dep"))
- return false;
- std::vector<buildtool::FileRec> res =
- deptool.loadDepFile("build.dep");
- if (res.size() == 0)
- return false;
- return true;
-}
-
-static bool popenTest()
-{
- buildtool::Make make;
- buildtool::String out, err;
- bool ret = make.executeCommand("gcc xx.cpp", "", out, err);
- printf("Popen test:%d '%s' '%s'\n", ret, out.c_str(), err.c_str());
- return true;
-}
-
-
-static bool propFileTest()
-{
- buildtool::Make make;
- make.parsePropertyFile("test.prop", "test.");
- return true;
-}
-*/
-
-int main(int argc, char **argv)
-{
-
- if (!parseOptions(argc, argv))
- return 1;
- /*
- if (!popenTest())
- return 1;
-
- if (!depTest())
- return 1;
- if (!propFileTest())
- return 1;
- if (runMake())
- return 1;
- */
- return 0;
-}
-
-
-//########################################################################
-//# E N D
-//########################################################################
-
-
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index 4cef05f70..000000000
--- a/configure.ac
+++ /dev/null
@@ -1,1202 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ([2.64])
-
-# Always use 0.xx+devel instead of 0.xxdevel for the version, e.g. 0.46+devel.
-# Rationale: (i) placate simple version comparison software such as
-# `dpkg --compare-versions'. (ii) We don't always know what the next
-# version is going to be called until about the time we release it
-# (whereas we always know what the previous version was called).
-#
-# Pre-releases are named "M.NNpreX" where X starts at 0 for the first alpha.
-AC_INIT([inkscape], [0.92pre1],
- [http://bugs.launchpad.net/inkscape/+filebug],
- [inkscape],
- [http://inkscape.org/])
-
-AC_CONFIG_HEADERS([config.h])
-AC_CONFIG_SRCDIR([src/main.cpp])
-AC_CONFIG_MACRO_DIR([m4])
-AC_CONFIG_AUX_DIR([build-aux])
-AC_CANONICAL_HOST
-
-# We need version 1.9 of Automake or higher since we no longer distribute the
-# obsolete mkinstalldirs script
-AM_INIT_AUTOMAKE([-Wall dist-zip dist-bzip2 tar-pax 1.9])
-
-m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) dnl Workaround for Automake 1.12
-
-AC_ARG_ENABLE([lsb], AS_HELP_STRING([--enable-lsb], [LSB-compatible build configuration]), [
- prefix=/opt/inkscape
- PATH="/opt/lsb/bin:$PATH"
- CC=lsbcc
- CXX=lsbc++
- export CC CXX
-])
-
-AC_LANG(C++)
-AC_PROG_CXX
-AC_PROG_CC
-AM_PROG_AS
-# Initialize libtool
-LT_PREREQ([2.2])
-LT_INIT
-AC_HEADER_STDC
-INK_BZR_SNAPSHOT_BUILD
-
-dnl If automake 1.11 shave the output to look nice
-m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
-
-dnl *********************************************************
-dnl Configure a strict set of build rules to prevent usage of
-dnl deprecated features in external libraries and code that
-dnl triggers compiler warnings.
-dnl *********************************************************
-AC_ARG_ENABLE(strict-build,
- [AS_HELP_STRING([--enable-strict-build], [Enable strict build configuration [[default=yes]]. Usage of most deprecated symbols is forbidden by default. Set the argument to "high" to introduce very strict checking that will cause the build to fail on many systems.])],
- [enable_strict_build=$enableval],
- [enable_strict_build=yes])
-
-if test "x$enable_strict_build" = "xno"; then
- AC_MSG_WARN([Strict build options disabled])
-elif test "x$enable_strict_build" = "xhigh"; then
- AC_MSG_WARN([Strictest build options enabled. This will cause build failure on most systems])
-else
- AC_MSG_RESULT([Strict build options enabled])
-fi
-
-dnl These next few lines are needed only while libcroco is in our source tree.
-AM_PROG_CC_C_O
-if test "$GCC" = "yes"; then
- # Enable some warnings from gcc.
- AC_LANG_PUSH(C)
-
- ####
- # Generic cpp flags...
-
- # What is just plain "-W" ?
- # Fortify source requires -O2 or higher, which is handled with newer autoconf
- CPPFLAGS="-W -D_FORTIFY_SOURCE=2 $CPPFLAGS"
- # Enable format and format security warnings
- CPPFLAGS="-Wformat -Wformat-security $CPPFLAGS"
- # Enable all default warnings
- CPPFLAGS="-Wall $CPPFLAGS"
-
- # Permit only top-level Glib headers to be used.
- #
- # TODO: This is already used in Glib >= 2.32 so this flag can be
- # dropped when all targeted distros use higher Glib versions.
- CPPFLAGS="-DG_DISABLE_SINGLE_INCLUDES $CPPFLAGS"
-
- # Ensure that private GTK+ fields are not accessible. This strictly
- # enforced in Gtk+ 3, so it is important to check this in Gtk+ 2 builds
- CPPFLAGS="-DGSEAL_ENABLE $CPPFLAGS"
-
- # Unfortunately, we cannot (yet) build with -Werror, so we have to manually
- # change a ton of warnings into errors.
- # After some more work on fixing warning-inducing code, we can change this set into
- # it's complement and use -Wno-error=...
- # Test for -Werror=... (introduced some time post-4.0)
- AC_MSG_CHECKING([compiler support for -Werror=...])
- ink_svd_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="-Werror=format-security -Wswitch -Werror=return-type $CPPFLAGS"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [ink_opt_ok=yes], [ink_opt_ok=no])
- AC_MSG_RESULT([$ink_opt_ok])
- if test "x$ink_opt_ok" != "xyes"; then
- CPPFLAGS="$ink_svd_CPPFLAGS"
- fi
-
- # Uncomment for SVG2 stuff
- CPPFLAGS="-DWITH_MESH -DWITH_CSSBLEND -DWITH_CSSCOMPOSITE -DWITH_SVG2 $CPPFLAGS"
-
- # Uncomment for LPE Tool and All LPEs
- CPPFLAGS="-DWITH_LPETOOL -DLPE_ENABLE_TEST_EFFECTS $CPPFLAGS"
-
- ####
- # C-specific flags...
-
- # -Wno-pointer-sign is probably new in gcc 4.0; certainly it isn't accepted
- # by gcc 2.95.
- AC_MSG_CHECKING([compiler support for -Wno-pointer-sign])
- ink_svd_CFLAGS="$CFLAGS"
- CFLAGS="-Wno-pointer-sign $CFLAGS"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [ink_opt_ok=yes], [ink_opt_ok=no])
- AC_MSG_RESULT([$ink_opt_ok])
- if test "x$ink_opt_ok" != "xyes"; then
- CFLAGS="$ink_svd_CFLAGS"
- fi
-
-
- # This Automake variable is only used to suppress warnings in our internal
- # fork of GDL. Once we get rid of our GDL fork, we can delete this test
- AC_MSG_CHECKING([compiler support for -Wno-unused-but-set-variable])
- ink_svd_CFLAGS="$CFLAGS"
- CFLAGS="-Wno-unused-but-set-variable $CFLAGS"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [ink_opt_ok=yes], [ink_opt_ok=no])
- AC_MSG_RESULT([$ink_opt_ok])
- CFLAGS="$ink_svd_CFLAGS"
- AM_CONDITIONAL(CC_WNO_UNUSED_BUT_SET_VARIABLE_SUPPORTED, test "$ink_opt_ok" = "yes")
-
-
- ####
- # Linker flags...
-
- # Have linker produce read-only relocations, if it knows how
- AC_MSG_CHECKING([linker tolerates -z relro])
- ink_svd_LDFLAGS="$LDFLAGS"
- LDFLAGS="-Wl,-z,relro $LDFLAGS"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([])], [ink_opt_ok=yes], [ink_opt_ok=no])
- AC_MSG_RESULT([$ink_opt_ok])
- if test "x$ink_opt_ok" != "xyes"; then
- LDFLAGS="$ink_svd_LDFLAGS"
- fi
-
- AC_LANG_POP
-
- # C++-specific flags are defined further below. Look for CXXFLAGS...
-fi
-
-# Test whether GCC emits a spurious warning when using boost::optional
-# If yes, turn off strict aliasing warnings to reduce noise
-# and allow the legitimate warnings to stand out
-AC_MSG_CHECKING([for overzealous strict aliasing warnings])
-ignore_strict_aliasing=no
-CXXFLAGS_SAVE=$CXXFLAGS
-CXXFLAGS="$CXXFLAGS -Werror=strict-aliasing"
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-#include <boost/optional.hpp>
-boost::optional<int> x;
-int func() {
- return *x;
-}
-])], [ignore_strict_aliasing=no], [ignore_strict_aliasing=yes])
-AC_MSG_RESULT($ignore_strict_aliasing)
-CXXFLAGS=$CXXFLAGS_SAVE
-if test "x$ignore_strict_aliasing" = "xyes"; then
- CXXFLAGS="$CXXFLAGS -Wno-strict-aliasing"
-fi
-
-dnl ******************************
-dnl Gettext stuff
-dnl ******************************
-IT_PROG_INTLTOOL([0.40.0])
-
-AM_GNU_GETTEXT_VERSION([0.17])
-AM_GNU_GETTEXT([external])
-
-GETTEXT_PACKAGE="AC_PACKAGE_NAME"
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Translation domain used])
-
-AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-if test "x$PKG_CONFIG" = "xno"; then
- AC_MSG_ERROR(You have to install pkg-config to compile inkscape.)
-fi
-
-dnl Find msgfmt. Without this, po/Makefile fails to set MSGFMT on some platforms.
-AC_PATH_PROG(MSGFMT, msgfmt, msgfmt)
-AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-
-dnl ******************************
-dnl Check for OpenMP
-dnl ******************************
-AC_OPENMP
-if test "x$ac_cv_prog_cxx_openmp" != "xunsupported"; then
- openmp_ok=yes
- dnl We have it, now set up the flags
- CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
- AC_DEFINE(HAVE_OPENMP, 1, [Use OpenMP])
-fi
-
-dnl ********************
-dnl Check for libpotrace
-dnl ********************
-AC_CHECK_LIB(potrace, potrace_trace, [AC_CHECK_HEADER(potracelib.h, potrace_ok=yes, potrace_ok=no)], potrace_ok=no)
-if test "x$potrace_ok" = "xyes"; then
- LIBS="-lpotrace $LIBS"
- AC_DEFINE(HAVE_POTRACE, 1, [Use Potrace])
-fi
-
-AM_CONDITIONAL(HAVE_POTRACE, test "x$potrace_ok" = "xyes")
-
-dnl ******************************
-dnl Check for libexif
-dnl ******************************
-PKG_CHECK_MODULES(EXIF, libexif, exif_ok=yes, exif_ok=no)
-if test "x$exif_ok" = "xyes"; then
- AC_DEFINE(HAVE_EXIF, 1, [Use libexif])
-fi
-AC_SUBST(EXIF_LIBS)
-AC_SUBST(EXIF_CFLAGS)
-
-dnl ******************************
-dnl Check for libjpeg
-dnl ******************************
-AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, [AC_CHECK_HEADER(jpeglib.h, jpeg_ok=yes, jpeg_ok=no)], jpeg_ok=no)
-if test "x$jpeg_ok" = "xyes"; then
- LIBS="-ljpeg $LIBS"
- AC_DEFINE(HAVE_JPEG, 1, [Use libjpeg])
-fi
-
-dnl This check is to get a FIONREAD definition on Solaris 8
-AC_CHECK_HEADERS([sys/filio.h])
-
-
-AC_CHECK_HEADERS([malloc.h])
-AC_CHECK_FUNCS([mallinfo], [
- AC_CHECK_MEMBERS([struct mallinfo.usmblks,
- struct mallinfo.fsmblks,
- struct mallinfo.uordblks,
- struct mallinfo.fordblks,
- struct mallinfo.hblkhd],,,
- [#include <malloc.h>])
-])
-
-AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
-if test "x$FREETYPE_CONFIG" = "xno"; then
- AC_MSG_ERROR([Cannot find freetype-config])
-fi
-FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
-FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
-AC_SUBST(FREETYPE_CFLAGS)
-AC_SUBST(FREETYPE_LIBS)
-
-dnl ******************************
-dnl Win32
-dnl ******************************
-AC_MSG_CHECKING([for Win32 platform])
-case "$host" in
- *-*-mingw*)
- platform_win32=yes
- WIN32_CFLAGS="-mms-bitfields -DLIBXML_STATIC"
- ;;
- *)
- platform_win32=no
- ;;
-esac
-AC_MSG_RESULT([$platform_win32])
-AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
-AC_SUBST(WIN32_CFLAGS)
-
-dnl TODO - switch to a linker/libtool/feature check, not OS check:
-dnl ******************************
-dnl MacOS X
-dnl ******************************
-AC_MSG_CHECKING([for OSX platform])
-if test "x$build_vendor" = "xapple" ; then
- platform_osx=yes
-else
- platform_osx=no
-fi
-AC_MSG_RESULT([$platform_osx])
-
-AC_MSG_CHECKING([for Solaris platform])
-case "$host" in
- *-solaris2.*)
- platform_solaris=yes
- solaris_version=`echo $host|sed -e 's/^.*-solaris2\.//' -e s'/\..*$//'`
- CFLAGS="$CFLAGS -DSOLARIS=$solaris_version"
- CXXFLAGS="$CXXFLAGS -DSOLARIS=$solaris_version"
- ;;
- *)
- platform_solaris=no
- ;;
-esac
-AC_MSG_RESULT([$platform_solaris])
-AM_CONDITIONAL(PLATFORM_SOLARIS, test "$platform_solaris" = "yes")
-
-dnl ******************************
-dnl gnome vfs checking
-dnl ******************************
-
-AC_ARG_WITH(gnome-vfs,
- AS_HELP_STRING([--with-gnome-vfs],[use gnome vfs for loading files]),
- [with_gnome_vfs=$withval], [with_gnome_vfs=auto])
-
-if test "x$with_gnome_vfs" = "xno"; then
- dnl Asked to ignore gnome-vfs
- gnome_vfs=no
-else
- dnl Have to test gnome-vfs presence
- PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0 >= 2.0, gnome_vfs=yes, gnome_vfs=no)
- if test "x$gnome_vfs" != "xyes"; then
- dnl No gnome-vfs found
- if test "x$with_gnome_vfs" = "xyes"; then
- dnl Gnome-VFS was explicitly asked for, so stop
- AC_MSG_ERROR([--with-gnome-vfs was specified, but appropriate libgnomevfs development packages could not be found])
- else
- # gnome-vfs is no, tell us for the log file
- AC_MSG_RESULT($gnome_vfs)
- fi
- fi
-fi
-
-AM_CONDITIONAL(USE_GNOME_VFS, test "x$gnome_vfs" = "xyes")
-if test "x$gnome_vfs" = "xyes"; then
- AC_DEFINE(WITH_GNOME_VFS, 1, [Use gnome vfs file load functionality])
-fi
-
-AC_SUBST(GNOME_VFS_CFLAGS)
-AC_SUBST(GNOME_VFS_LIBS)
-
-dnl ******************************
-dnl libinkjar checking
-dnl ******************************
-
-AC_ARG_WITH(inkjar,
- AS_HELP_STRING([--without-inkjar],[disable openoffice files (SVG jars)]),[with_ij=$withval], [with_ij=yes])
-
-if test "x$with_ij" = "xyes"; then
- AC_DEFINE(WITH_INKJAR, 1, [enable openoffice files (SVG jars)])
- AC_C_BIGENDIAN
- AC_CHECK_HEADERS(zlib.h)
- ij=yes
-else
- ij=no
-fi
-AM_CONDITIONAL(INKJAR, test "$with_ij" = "yes")
-
-dnl ******************************
-dnl LittleCms checking
-dnl ******************************
-
-AC_ARG_ENABLE(lcms,
- AS_HELP_STRING([--enable-lcms],[enable LittleCms for color management]),
- [enable_lcms=$enableval], [enable_lcms=yes])
-
-if test "x$enable_lcms" = "xno"; then
- # Asked to ignore LittleCms
- lcms=no
- have_lcms2=no
-else
- # Have to test LittleCms presence
- PKG_CHECK_MODULES(LCMS2, lcms2, have_lcms2="yes", have_lcms2="no")
-
- if test "x${have_lcms2}" = "xyes"; then
- LIBS="$LIBS $LCMS2_LIBS"
- AC_DEFINE(HAVE_LIBLCMS2, 1, [define to 1 if you have lcms version 2.x])
- AC_SUBST(LCMS2_CFLAGS)
- AC_SUBST(LCMS2_LIBS)
- else
- PKG_CHECK_MODULES(LCMS, lcms >= 1.13, lcms=yes, lcms=no)
- if test "x$lcms" = "xyes"; then
- LIBS="$LIBS $LCMS_LIBS"
- AC_DEFINE(HAVE_LIBLCMS1, 1, [define to 1 if you have lcms version 1.x])
- AC_SUBST(LCMS_CFLAGS)
- AC_SUBST(LCMS_LIBS)
- else
- # No lcms found. LittleCms was explicitly asked for, so stop
- AC_MSG_ERROR([--enable-lcms was specified, but appropriate LittleCms development packages could not be found])
- fi
- fi
-fi
-
-dnl ******************************
-dnl Libpoppler checking
-dnl ******************************
-
-AC_ARG_ENABLE(poppler-cairo,
- AS_HELP_STRING([--enable-poppler-cairo],[Enable libpoppler-cairo for rendering PDF preview]),
- [enable_poppler_cairo=$enableval], [enable_poppler_cairo=yes])
-
-POPPLER_CFLAGS=""
-PKG_CHECK_MODULES(POPPLER, poppler >= 0.20.0, poppler=yes, poppler=no)
-
-if test "x$poppler" = "xyes"; then
- dnl Working libpoppler
- dnl Have to test libpoppler-glib presence
- PKG_CHECK_MODULES(POPPLER_GLIB, poppler-glib >= 0.20.0, poppler_glib=yes, poppler_glib=no)
- if test "x$poppler_glib" = "xyes"; then
- dnl Working libpoppler-glib found
- dnl Check whether the Cairo SVG backend is available
- PKG_CHECK_MODULES(CAIRO_SVG, cairo-svg, cairo_svg=yes, cairo_svg=no)
- if test "x$cairo_svg" = "xyes"; then
- POPPLER_LIBS="$POPPLER_LIBS $POPPLER_GLIB_LIBS "
- fi
- fi
- if test "x$enable_poppler_cairo" = "xyes"; then
- dnl Have to test libpoppler-cairo presence for PDF preview
- dnl AC_CHECK_HEADER(Magick++.h, magick_ok=yes, magick_ok=no)
- PKG_CHECK_MODULES(POPPLER_CAIRO, poppler-cairo >= 0.20.0, poppler_cairo=yes, poppler_cairo=no)
- if test "x$poppler_glib" = "xyes" -a "x$poppler_cairo" = "xyes" -a \
- "x$cairo_svg" = "xno"
- then
- POPPLER_LIBS="$POPPLER_LIBS $POPPLER_CAIRO_LIBS "
- fi
- fi
-fi
-
-if test "x$poppler" = "xyes"; then
- LIBS="$LIBS $POPPLER_LIBS"
- AC_DEFINE(HAVE_POPPLER, 1, [Use libpoppler for direct PDF import])
-fi
-if test "x$poppler_cairo" = "xyes" -a "x$poppler_glib" = "xyes"; then
- AC_DEFINE(HAVE_POPPLER_CAIRO, 1, [Use libpoppler-cairo for rendering PDF preview])
-fi
-if test "x$poppler_glib" = "xyes" -a "x$cairo_svg" = "xyes"; then
- AC_DEFINE(HAVE_POPPLER_GLIB, 1, [Use libpoppler-glib and Cairo-SVG for PDF import])
-fi
-AC_SUBST(POPPLER_CFLAGS)
-AC_SUBST(POPPLER_LIBS)
-
-ink_svd_CPPFLAGS=$CPPFLAGS
-ink_svd_LIBS=$LIBS
-CPPFLAGS="$CPPFLAGS $POPPLER_CFLAGS"
-LIBS="$LIBS $POPPLER_LIBS"
-
-PKG_CHECK_MODULES(POPPLER_EVEN_NEWER_COLOR_SPACE_API, poppler >= 0.26.0, popplernewercolorspaceapi=yes, popplernewercolorspaceapi=no)
-if test "x$popplernewercolorspaceapi" = "xyes"; then
- AC_DEFINE(POPPLER_EVEN_NEWER_COLOR_SPACE_API, 1, [Use even newer color space API from Poppler >= 0.26.0])
-fi
-
-PKG_CHECK_MODULES(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API, poppler >= 0.29.0, popplernewernewcolorspaceapi=yes, popplernewernewcolorspaceapi=no)
-if test "x$popplernewernewcolorspaceapi" = "xyes"; then
- AC_DEFINE(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API, 1, [Use even newer new color space API from Poppler >= 0.29.0])
-fi
-
-CPPFLAGS=$ink_svd_CPPFLAGS
-LIBS=$ink_svd_LIBS
-
-dnl ******************************
-dnl Check for libwpg for extension
-dnl ******************************
-
-AC_ARG_ENABLE(wpg,
- AS_HELP_STRING([--disable-wpg], [compile without support for WordPerfect Graphics]),
- enable_wpg=$enableval,enable_wpg=yes)
-
-with_libwpg=no
-
-if test "x$enable_wpg" = "xyes"; then
- dnl **************************************************************
- dnl Try using librevenge framework first. Fall back to old libs
- dnl if unavailable.
- dnl TODO: Drop subsequent tests once this is widespread in distros
- dnl **************************************************************
- PKG_CHECK_MODULES(LIBWPG03, libwpg-0.3 librevenge-0.0 librevenge-stream-0.0, with_libwpg03=yes, with_libwpg03=no)
- if test "x$with_libwpg03" = "xyes"; then
- AC_DEFINE(WITH_LIBWPG03,1,[Build using libwpg 0.3.x])
- with_libwpg=yes
- AC_SUBST(LIBWPG_LIBS, $LIBWPG03_LIBS)
- AC_SUBST(LIBWPG_CFLAGS, $LIBWPG03_CFLAGS)
- else
- PKG_CHECK_MODULES(LIBWPG02, libwpg-0.2 libwpd-0.9 libwpd-stream-0.9, with_libwpg02=yes, with_libwpg02=no)
- if test "x$with_libwpg02" = "xyes"; then
- AC_DEFINE(WITH_LIBWPG02,1,[Build using libwpg 0.2.x])
- with_libwpg=yes
- AC_SUBST(LIBWPG_LIBS, $LIBWPG02_LIBS)
- AC_SUBST(LIBWPG_CFLAGS, $LIBWPG02_CFLAGS)
- fi
- fi
-
- if test "x$with_libwpg" = "xyes"; then
- AC_DEFINE(WITH_LIBWPG,1,[Build in libwpg])
- fi
-fi
-AM_CONDITIONAL(WITH_LIBWPG03, test "x$with_libwpg03" = "xyes")
-AM_CONDITIONAL(WITH_LIBWPG02, test "x$with_libwpg02" = "xyes")
-AM_CONDITIONAL(WITH_LIBWPG, test "x$with_libwpg" = "xyes")
-
-dnl ********************************
-dnl Check for libvisio for extension
-dnl ********************************
-
-AC_ARG_ENABLE(visio,
- AS_HELP_STRING([--disable-visio], [compile without support for Microsoft Visio Diagrams]),
- enable_visio=$enableval,enable_visio=yes)
-
-with_libvisio=no
-
-if test "x$enable_visio" = "xyes"; then
- dnl **************************************************************
- dnl Try using librevenge framework first. Fall back to old libs
- dnl if unavailable.
- dnl TODO: Drop subsequent tests once this is widespread in distros
- dnl **************************************************************
- PKG_CHECK_MODULES(LIBVISIO01, libvisio-0.1 librevenge-0.0 librevenge-stream-0.0, with_libvisio01=yes, with_libvisio01=no)
- if test "x$with_libvisio01" = "xyes"; then
- AC_DEFINE(WITH_LIBVISIO01,1,[Build using libvisio 0.1.x])
- with_libvisio=yes
- AC_SUBST(LIBVISIO_LIBS, $LIBVISIO01_LIBS)
- AC_SUBST(LIBVISIO_CFLAGS, $LIBVISIO01_CFLAGS)
- else
- PKG_CHECK_MODULES(LIBVISIO00, libvisio-0.0 >= 0.0.20 libwpd-0.9 libwpd-stream-0.9 libwpg-0.2, with_libvisio00=yes, with_libvisio00=no)
- if test "x$with_libvisio00" = "xyes"; then
- AC_DEFINE(WITH_LIBVISIO00,1,[Build using libvisio 0.0.x])
- with_libvisio=yes
- AC_SUBST(LIBVISIO_LIBS, $LIBVISIO00_LIBS)
- AC_SUBST(LIBVISIO_CFLAGS, $LIBVISIO00_CFLAGS)
- fi
- fi
-
- if test "x$with_libvisio" = "xyes"; then
- AC_DEFINE(WITH_LIBVISIO,1,[Build in libvisio])
- fi
-fi
-AM_CONDITIONAL(WITH_LIBVISIO01, test "x$with_libvisio01" = "xyes")
-AM_CONDITIONAL(WITH_LIBVISIO00, test "x$with_libvisio00" = "xyes")
-AM_CONDITIONAL(WITH_LIBVISIO, test "x$with_libvisio" = "xyes")
-
-dnl ********************************
-dnl Check for libcdr for extension
-dnl ********************************
-
-AC_ARG_ENABLE(cdr,
- AS_HELP_STRING([--disable-cdr], [compile without support for CorelDRAW Diagrams]),
- enable_cdr=$enableval,enable_cdr=yes)
-
-with_libcdr=no
-
-if test "x$enable_cdr" = "xyes"; then
- dnl **************************************************************
- dnl Try using librevenge framework first. Fall back to old libs
- dnl if unavailable.
- dnl TODO: Drop subsequent tests once this is widespread in distros
- dnl **************************************************************
- PKG_CHECK_MODULES(LIBCDR01, libcdr-0.1 librevenge-0.0 librevenge-stream-0.0, with_libcdr01=yes, with_libcdr01=no)
- if test "x$with_libcdr01" = "xyes"; then
- AC_DEFINE(WITH_LIBCDR01,1,[Build using libcdr 0.1.x])
- with_libcdr=yes
- AC_SUBST(LIBCDR_LIBS, $LIBCDR01_LIBS)
- AC_SUBST(LIBCDR_CFLAGS, $LIBCDR01_CFLAGS)
- else
- PKG_CHECK_MODULES(LIBCDR00, libcdr-0.0 >= 0.0.3 libwpd-0.9 libwpd-stream-0.9 libwpg-0.2, with_libcdr00=yes, with_libcdr00=no)
- if test "x$with_libcdr00" = "xyes"; then
- AC_DEFINE(WITH_LIBCDR00,1,[Build using libcdr 0.0.x])
- with_libcdr=yes
- AC_SUBST(LIBCDR_LIBS, $LIBCDR00_LIBS)
- AC_SUBST(LIBCDR_CFLAGS, $LIBCDR00_CFLAGS)
- fi
- fi
-
- if test "x$with_libcdr" = "xyes"; then
- AC_DEFINE(WITH_LIBCDR,1,[Build in libcdr])
- fi
-fi
-AM_CONDITIONAL(WITH_LIBCDR01, test "x$with_libcdr01" = "xyes")
-AM_CONDITIONAL(WITH_LIBCDR00, test "x$with_libcdr00" = "xyes")
-AM_CONDITIONAL(WITH_LIBCDR, test "x$with_libcdr" = "xyes")
-
-dnl ******************************
-dnl Support doing a local install
-dnl (mostly for distcheck)
-dnl ******************************
-
-with_localinstall="no"
-AC_ARG_ENABLE(localinstall, AS_HELP_STRING([--enable-localinstall], [install system files in the local path (for distcheck)]), with_localinstall=$enableval, with_localinstall=no)
-
-dnl ******************************
-dnl Check for dbus functionality
-dnl ******************************
-
-AC_ARG_ENABLE(dbusapi,
- AS_HELP_STRING([--enable-dbusapi], [compile with support for DBus interface]),
- enable_dbusapi=$enableval,enable_dbusapi=no)
-
-with_dbus="no"
-if test "x$enable_dbusapi" = "xyes"; then
- PKG_CHECK_MODULES(DBUS, dbus-glib-1, with_dbus=yes, with_dbus=no)
- if test "x$with_dbus" = "xyes"; then
- if test "x$with_localinstall" = "xyes"; then
- DBUSSERVICEDIR="${datadir}/dbus-1/services/"
- else
- DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`
- fi
- AC_SUBST(DBUSSERVICEDIR)
- AC_DEFINE(WITH_DBUS,1,[Build in dbus])
- fi
-fi
-AC_SUBST(DBUS_LIBS)
-AC_SUBST(DBUS_CFLAGS)
-AM_CONDITIONAL(WITH_DBUS, test "x$with_dbus" = "xyes")
-
-dnl ******************************
-dnl Check for ImageMagick Magick++
-dnl ******************************
-
-PKG_CHECK_MODULES(IMAGEMAGICK, ImageMagick++, magick_ok=yes, magick_ok=no)
-if test "x$magick_ok" = "xyes"; then
- AC_DEFINE(WITH_IMAGE_MAGICK,1,[Image Magick++ support for bitmap effects])
-fi
-AM_CONDITIONAL(USE_IMAGE_MAGICK, test "x$magick_ok" = "xyes")
-
-AC_SUBST(IMAGEMAGICK_LIBS)
-AC_SUBST(IMAGEMAGICK_CFLAGS)
-
-dnl ******************************
-dnl Unconditional dependencies
-dnl ******************************
-
-dnl Separate out dependencies that are known to introduce
-dnl C++-specific compiler flags
-PKG_CHECK_MODULES(INKSCAPE_CXX_DEPS,
- cairomm-1.0 >= 1.9.8
- glibmm-2.4 >= 2.28
- giomm-2.4
- sigc++-2.0 >= 2.0.12
- )
-
-PKG_CHECK_MODULES(INKSCAPE,
- bdw-gc >= 7.2
- cairo >= 1.10
- glib-2.0 >= 2.28
- gmodule-2.0
- gsl
- gthread-2.0 >= 2.0
- libpng >= 1.2
- libxml-2.0 >= 2.6.11
- libxslt >= 1.0.15
- pango >= 1.24
- pangoft2 >= 1.24
- )
-
-# test whether depenencies require C++11
-AC_MSG_CHECKING([whether C++11 mode is required])
-CXXFLAGS_SAVE="$CXXFLAGS"
-CXXFLAGS="$INKSCAPE_CXX_DEPS_CFLAGS $CXXFLAGS"
-cxx11_required=unknown
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-#include <glibmm.h>
-int main() {}
-])], [cxx11_required=no], [cxx11_required=unknown])
-if test "x$cxx11_required" = "xunknown"; then
- CXXFLAGS="-std=c++11 $CXXFLAGS"
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
- #include <glibmm.h>
- int main() {}
- ])], [cxx11_required=yes], [cxx11_required=unknown])
-fi
-CXXFLAGS="$CXXFLAGS_SAVE"
-if test "x$cxx11_required" = "xunknown"; then
- AC_MSG_RESULT([unknown])
- AC_MSG_ERROR([cannot detect whether C++11 is required])
-fi
-if test "x$cxx11_required" = "xyes"; then
- AC_MSG_RESULT([yes])
- CXXFLAGS="-std=c++11 $CXXFLAGS"
-else
- AC_MSG_RESULT([no])
-fi
-
-# Detect a working version of unordered containers.
-# First try looking for native support (C++11 feature)
-AC_MSG_CHECKING([native support for unordered_set])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unordered_set>]],
-[[
- std::unordered_set<int> i, j;
- i = j;
-]])],
-[native_unordered_set_works=yes], [native_unordered_set_works=no])
-
-if test "x$native_unordered_set_works" = "xyes"; then
- AC_MSG_RESULT([ok])
- AC_DEFINE(HAVE_NATIVE_UNORDERED_SET, 1, [Has working native unordered_set])
-else
- AC_MSG_RESULT([not working])
-fi
-
-AC_MSG_CHECKING([TR1 unordered_set usability])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <tr1/unordered_set>]],
-[[
- std::tr1::unordered_set<int> i, j;
- i = j;
-]])],
-[tr1_unordered_set_works=yes], [tr1_unordered_set_works=no])
-
-if test "x$tr1_unordered_set_works" = "xyes"; then
- AC_MSG_RESULT([ok])
- AC_DEFINE(HAVE_TR1_UNORDERED_SET, 1, [Has working standard TR1 unordered_set])
-else
- AC_MSG_RESULT([not working])
-fi
-
-AC_CHECK_HEADER([boost/unordered_set.hpp], [AC_DEFINE(HAVE_BOOST_UNORDERED_SET, 1, [Boost unordered_set (Boost >= 1.36)])], [])
-
-dnl *********************************
-dnl Allow experimental GTK+3 build
-dnl *********************************
-AC_ARG_ENABLE(gtk3-experimental,
- AS_HELP_STRING([--enable-gtk3-experimental], [enable compilation with GTK+3 (EXPERIMENTAL!)]),
- [enable_gtk3=$enableval], [enable_gtk3=no])
-
-with_gtkmm_3_0="no"
-if test "x$enable_gtk3" = "xyes"; then
-
- ink_spell_pkg=
- if pkg-config --exists gtkspell-3.0; then
- ink_spell_pkg=gtkspell-3.0
- AC_DEFINE(WITH_GTKSPELL, 1, [enable gtk spelling widget])
- fi
-
- PKG_CHECK_MODULES(GTK,
- gtk+-3.0 >= 3.8
- gdk-3.0 >= 3.8
- gdl-3.0 > 3.4
- $ink_spell_pkg)
-
- dnl Separate out dependencies that are known to introduce
- dnl C++-specific compiler flags
- PKG_CHECK_MODULES(GTKMM,
- gtkmm-3.0 >= 3.8
- gdkmm-3.0 >= 3.8,
- with_gtkmm_3_0=yes,
- with_gtkmm_3_0=no)
-
- if test "x$with_gtkmm_3_0" = "xyes"; then
- AC_MSG_RESULT([Using EXPERIMENTAL Gtkmm 3 build])
- AC_DEFINE(WITH_GTKMM_3_0,1,[Build with Gtkmm 3.x])
-
- AC_MSG_RESULT([Using external GDL])
- AC_DEFINE(WITH_EXT_GDL,1,[Build with external GDL])
- else
- AC_MSG_ERROR([Some dependencies were not fulfilled for the experimental GTK+ 3 build. One possible cause for this is a new dependency on the gdl-3.0 development package.])
- fi
-
- # Check whether we can use new features in Gtkmm 3.10
- # TODO: Drop this test and bump the version number in the GTK test above
- # as soon as all supported distributions provide Gtkmm >= 3.10
- PKG_CHECK_MODULES(GTKMM_3_10,
- gtkmm-3.0 >= 3.10,
- with_gtkmm_3_10=yes,
- with_gtkmm_3_10=no)
-
- if test "x$with_gtkmm_3_10" = "xyes"; then
- AC_MSG_RESULT([Using Gtkmm 3.10 build])
- AC_DEFINE(WITH_GTKMM_3_10,1,[Build with Gtkmm 3.10.x or higher])
- fi
-
- # Check whether we are using Gdl >= 3.6. This version introduced an API/ABI change.
- # TODO: We should drop support for older versions of Gdl once all supported distros
- # provide Gdl 3.6 or higher
- PKG_CHECK_MODULES(GDL_3_6, gdl-3.0 >= 3.6, with_gdl_3_6=yes, with_gdl_3_6=no)
-
- if test "x$with_gdl_3_6" = "xyes"; then
- AC_MSG_RESULT([Using Gdl 3.6 or higher])
- AC_DEFINE(WITH_GDL_3_6,1,[Build with Gdl 3.6 or higher])
- fi
-
- dnl The following test is only defined if Gtk+ 3 development libraries
- dnl are installed on the system. Therefore, it is guarded by an
- dnl m4_ifdef statement. The ifdef can be probably be removed once we
- dnl switch to Gtk+ 3 as a hard dependency
-
- # Check whether we are using the X11 backend target for Gtk+ 3.
- m4_ifdef([GTK_CHECK_BACKEND],
- [GTK_CHECK_BACKEND([x11], , [have_x11=yes], [have_x11=no])])
-
- # Enable strict build options that should work on most systems unless
- # the build has been configured not to do so
- if test "x$enable_strict_build" != "xno"; then
- # Add build flags here as soon as Inkscape trunk can build
- # against Gtk+ 3 with the option enabled
- echo ""
- fi
-
- # Enable strict build options that are known to cause failure in
- # Gtk+ 3 builds
- if test "x$enable_strict_build" = "xhigh"; then
- # Disable deprecated Gtk+ symbols that have been removed since
- # Gtk+ 3.
- CPPFLAGS="-DGTKMM_DISABLE_DEPRECATED $CPPFLAGS"
- CPPFLAGS="-DGTK_DISABLE_DEPRECATED $CPPFLAGS"
- CPPFLAGS="-DGDK_DISABLE_DEPRECATED $CPPFLAGS"
- fi
-else
-
- ink_spell_pkg=
- if pkg-config --exists gtkspell-2.0; then
- ink_spell_pkg=gtkspell-2.0
- AC_DEFINE(WITH_GTKSPELL, 1, [enable gtk spelling widget])
- fi
-
- PKG_CHECK_MODULES(GTK,
- gtk+-2.0 >= 2.24
- $ink_spell_pkg)
-
- dnl Separate out dependencies that are known to introduce C++-specific
- dnl compiler flags
- PKG_CHECK_MODULES(GTKMM,
- gdkmm-2.4 >= 2.24
- gtkmm-2.4 >= 2.24)
-
- # Check whether we are using the X11 backend for Gtk+ 2.
- AC_MSG_CHECKING([if Gtk+ 2.0 is using the X11 backend target])
- if test "x`$PKG_CONFIG --variable=target gtk+-2.0`" = "xx11"; then
- have_x11=yes
- else
- have_x11=no
- fi
- AC_MSG_RESULT($have_x11)
-
- # Enable build strict options that should work on most systems unless
- # the build has been configured explicitly not to do so
- if test "x$enable_strict_build" != "xno"; then
- # Prevent usage of deprecated Gtk+ symbols. These have all
- # been removed in Gtk+ 3 so these checks are important.
- CPPFLAGS="-DGTKMM_DISABLE_DEPRECATED $CPPFLAGS"
- CPPFLAGS="-DGTK_DISABLE_DEPRECATED $CPPFLAGS"
-
- # Allow only top-level GTK+ headers to be used. This is mandatory
- # for GTK+ >= 3.0 so there is no need to apply the flag in GTK+ 3
- # builds.
- CPPFLAGS="-DGTK_DISABLE_SINGLE_INCLUDES $CPPFLAGS"
- fi
-
- # Optionally enable strict build options that are known to cause build
- # failure in many/most systems
- if test "x$enable_strict_build" == "xhigh"; then
- # FIXME: This causes build failure because our internal
- # copy of GDL uses deprecated GDK symbols.
- #
- # This specific issue isn't a problem for GTK+ 3 builds because
- # we build against external GDL >= 3.3.4 rather than using
- # the deprecated internal code
- CPPFLAGS="-DGDK_DISABLE_DEPRECATED $CPPFLAGS"
- fi
-fi
-AM_CONDITIONAL(WITH_GTKMM_3_0, test "x$with_gtkmm_3_0" = "xyes")
-
-INKSCAPE_CFLAGS="$GTK_CFLAGS $INKSCAPE_CFLAGS"
-INKSCAPE_CXX_DEPS_CFLAGS="$GTKMM_CFLAGS $INKSCAPE_CXX_DEPS_CFLAGS"
-INKSCAPE_LIBS="$GTK_LIBS $INKSCAPE_LIBS"
-INKSCAPE_CXX_DEPS_LIBS="$GTKMM_LIBS $INKSCAPE_CXX_DEPS_LIBS"
-
-dnl Configure x11 library if Gtk+ uses it as a backend.
-dnl Note that this is only here because we directly use X11 functionality. We
-dnl wouldn't need this check if we were only using X as the Gtk+ backend.
-if test "x$have_x11" = "xyes"; then
- PKG_CHECK_MODULES(X11, x11)
-fi
-AC_SUBST(X11_CFLAGS)
-AC_SUBST(X11_LIBS)
-
-AM_CONDITIONAL(WITH_EXT_GDL, test "x$with_gtkmm_3_0" = "xyes")
-
-# Prevent usage of deprecated library symbols unless strict build
-# checking has been disabled
-if test "x$enable_strict_build" != "xno"; then
- CPPFLAGS="-DGDKMM_DISABLE_DEPRECATED $CPPFLAGS"
-
- # Ensure that no deprecated glibmm symbols are introduced.
- # lp:inkscape builds cleanly with this option at r10957
- CPPFLAGS="-DGLIBMM_DISABLE_DEPRECATED $CPPFLAGS"
-
- dnl Pango 1.32.4 uses a deprecated Glib symbol:
- dnl https://bugzilla.gnome.org/show_bug.cgi?id=689843
- dnl
- dnl TODO: Get rid of this check once we are sure that all targeted
- dnl platforms have got rid of this Pango version. Apply the
- dnl G_DISABLE_DEPRECATED flag to all builds.
- pango_uses_deprecated_glib_symbols=no
-
- PKG_CHECK_MODULES(PANGO_USES_DEPRECATED_GLIB_SYMBOLS,
- pango = 1.32.4,
- pango_uses_deprecated_glib_symbols=yes,
- pango_uses_deprecated_glib_symbols=no)
-
- # Don't disable deprecated Glib symbols if it will break stuff in an
- # external library header that we use
- if test "x$pango_uses_deprecated_glib_symbols" = "xyes"; then
- AC_MSG_WARN([The available version of Pango uses deprecated Glib symbols. Deprecated Glib symbol usage will be allowed])
- else
- CPPFLAGS="-DG_DISABLE_DEPRECATED $CPPFLAGS"
- fi
-fi
-
-# Disable all deprecated symbols if very strict build is requested.
-# TODO: Make this a default option for Gtk+ 2 or 3 builds as soon as
-# possible.
-if test "x$enable_strict_build" = "xhigh"; then
- CPPFLAGS="-Werror=deprecated-declarations $CPPFLAGS"
-fi
-
-# Check for some boost header files
-AC_CHECK_HEADERS([boost/concept_check.hpp], [], AC_MSG_ERROR([You need the boost package (e.g. libboost-dev)]))
-
-PKG_CHECK_MODULES(CAIRO_PDF, cairo-pdf, cairo_pdf=yes, cairo_pdf=no)
-if test "x$cairo_pdf" = "xyes"; then
- AC_DEFINE(HAVE_CAIRO_PDF, 1, [Whether the Cairo PDF backend is available])
-fi
-
-dnl Shouldn't we test for libz?
-INKSCAPE_LIBS="$INKSCAPE_LIBS -lz"
-if test "x$openmp_ok" = "xyes"; then
- INKSCAPE_LIBS="$INKSCAPE_LIBS -lgomp"
-fi
-
-AC_CHECK_HEADER(popt.h,
- [INKSCAPE_LIBS="$INKSCAPE_LIBS -lpopt"],
- AC_MSG_ERROR([libpopt is required]))
-
-dnl **************************
-dnl Check for aspell
-dnl ******************************
-AC_CHECK_LIB(aspell, new_aspell_config, [AC_CHECK_HEADER(aspell.h, aspell_ok=yes, aspell_ok=no)], aspell_ok=no, -lz -lm)
-if test "x$aspell_ok" = "xyes"; then
- AC_DEFINE(HAVE_ASPELL, 1, [Use aspell for built-in spellchecker])
- INKSCAPE_LIBS="$INKSCAPE_LIBS -laspell"
-else
- AC_MSG_CHECKING([Aspell not found, spell checker will be disabled])
-fi
-
-dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
-sp_save_LIBS=$LIBS
-LIBS="$LIBS $INKSCAPE_LIBS"
-AC_CHECK_FUNCS(bind_textdomain_codeset)
-LIBS=$sp_save_LIBS
-
-
-dnl Check for binary relocation support
-dnl Hongli Lai <h.lai@chello.nl>
-
-AC_ARG_ENABLE(binreloc,
- AS_HELP_STRING([--enable-binreloc], [compile with binary relocation support]),
- enable_binreloc=$enableval,enable_binreloc=no)
-
-AC_MSG_CHECKING(whether binary relocation support should be enabled)
-if test "$enable_binreloc" = "yes"; then
- AC_MSG_RESULT(yes)
- AC_MSG_CHECKING(for linker mappings at /proc/self/maps)
- if test -e /proc/self/maps; then
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- AC_MSG_ERROR(/proc/self/maps is not available. Binary relocation cannot be enabled.)
- enable_binreloc="no"
- fi
-
-elif test "$enable_binreloc" = "auto"; then
- AC_MSG_RESULT(yes when available)
- AC_MSG_CHECKING(for linker mappings at /proc/self/maps)
- if test -e /proc/self/maps; then
- AC_MSG_RESULT(yes)
- enable_binreloc=yes
-
- AC_MSG_CHECKING(whether everything is installed to the same prefix)
- if test "$bindir" = '${exec_prefix}/bin' -a "$sbindir" = '${exec_prefix}/sbin' -a \
- "$datadir" = '${prefix}/share' -a "$libdir" = '${exec_prefix}/lib' -a \
- "$libexecdir" = '${exec_prefix}/libexec' -a "$sysconfdir" = '${prefix}/etc'
- then
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- AC_MSG_NOTICE(Binary relocation support will be disabled.)
- enable_binreloc=no
- fi
-
- else
- AC_MSG_RESULT(no)
- enable_binreloc=no
- fi
-
-elif test "$enable_binreloc" = "no"; then
- AC_MSG_RESULT(no)
-else
- AC_MSG_RESULT([no (unknown value "$enable_binreloc")])
- enable_binreloc=no
-fi
-AC_DEFINE(BR_PTHREADS,[0],[Use binreloc thread support?])
-if test "$enable_binreloc" = "yes"; then
- AC_DEFINE(ENABLE_BINRELOC,,[Use AutoPackage?])
-fi
-
-AC_ARG_ENABLE(osxapp,
- AS_HELP_STRING([--enable-osxapp], [compile with OSX .app data dir paths]),
- enable_osxapp=$enableval,enable_osxapp=no)
-if test "$enable_osxapp" = "yes"; then
- AC_DEFINE(ENABLE_OSX_APP_LOCATIONS,,[Build with OSX .app data dir paths?])
- LDFLAGS="$LDFLAGS -headerpad_max_install_names"
-fi
-
-dnl ******************************
-dnl Reported by autoscan
-dnl ******************************
-AC_CHECK_FUNCS(pow)
-# if we did not find pow(), see if it's in libm.
-if test x"$ac_cv_func_pow" = x"no" ; then
- AC_CHECK_LIB(m,pow)
-fi
-AC_CHECK_FUNCS(sqrt)
-AC_CHECK_FUNCS(floor)
-AC_CHECK_FUNCS(gettimeofday)
-AC_CHECK_FUNCS(memmove)
-AC_CHECK_FUNCS(memset)
-AC_CHECK_FUNCS(mkdir)
-AC_CHECK_FUNCS(strncasecmp)
-AC_CHECK_FUNCS(strpbrk)
-AC_CHECK_FUNCS(strrchr)
-AC_CHECK_FUNCS(strspn)
-AC_CHECK_FUNCS(strstr)
-AC_CHECK_FUNCS(strtoul)
-AC_CHECK_FUNCS(fpsetmask)
-AC_CHECK_FUNCS(ecvt)
-AC_CHECK_HEADERS(ieeefp.h)
-AC_CHECK_HEADERS(fcntl.h)
-AC_CHECK_HEADERS(libintl.h)
-AC_CHECK_HEADERS(stddef.h)
-AC_CHECK_HEADERS(sys/time.h)
-AC_FUNC_STAT
-AC_FUNC_STRFTIME
-AC_FUNC_STRTOD
-AC_HEADER_STAT
-AC_HEADER_TIME
-AC_STRUCT_TM
-AC_TYPE_MODE_T
-
-dnl Work around broken gcc 3.3 (seen on OSX) where "ENABLE_NLS" isn't
-dnl set correctly because the gettext function isn't noticed.
-if test "$ac_cv_header_libintl_h" = "yes" &&
- test "$ac_cv_func_bind_textdomain_codeset" = "yes" &&
- test "$gt_cv_func_have_gettext" != "yes"; then
- AC_DEFINE([ENABLE_NLS], [], [Description])
-fi
-
-dnl ******************************
-dnl Compilation warnings
-dnl ******************************
-if test "$GXX" = "yes"; then
- # Enable some warnings from g++.
-
- # Rationale: a number of bugs in inkscape have been fixed by enabling g++
- # warnings and addressing the produced warnings. Usually the committing
- # developer is the best person to address the warnings.
-
- ink_svd_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS="-Wno-unused-parameter $CXXFLAGS"
- # -Wno-unused-parameter isn't accepted by gcc 2.95.
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([int dummy;])
-], , CXXFLAGS="-Wno-unused $ink_svd_CXXFLAGS",)
- # Note: At least one bug has been caught from unused parameter warnings,
- # so it might be worth trying not to disable it.
- # One way of selectively disabling the warnings (i.e. only where the
- # programmer deliberately isn't using the parameter, e.g. for a callback)
- # is to remove the parameter name (leaving just its type), as is done
- # in src/seltrans.cpp:sp_seltrans_handle_event; this indicates that the
- # programmer deliberately has an unused parameter (e.g. because it's used
- # as a callback or similar function pointer use).
-
- # Add even more stuff
- CXXFLAGS="-Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch $CXXFLAGS"
-
-fi
-
-dnl ******************************
-dnl libinkscape
-dnl ******************************
-dnl
-dnl AC_ARG_ENABLE(libinkscape, AS_HELP_STRING([--enable-libinkscape],[Compile dynamic library (experimental)]), [splib=$enableval], [splib=no])
-dnl
-dnl AM_CONDITIONAL(ENABLE_LIBINKSCAPE, test "x$splib" != "xno")
-dnl
-
-AC_SUBST(INKSCAPE_CFLAGS)
-AC_SUBST(INKSCAPE_LIBS)
-AC_SUBST(INKSCAPE_CXX_DEPS_CFLAGS)
-AC_SUBST(INKSCAPE_CXX_DEPS_LIBS)
-
-dnl Define our data paths for config.h
-AC_DEFINE_DIR([INKSCAPE_DATADIR], [datadir], [Base data directory])
-AC_DEFINE_DIR([PACKAGE_LOCALE_DIR], [localedir], [Locatization directory])
-
-AC_CONFIG_FILES([
-Makefile
-src/Makefile
-src/check-header-compile
-src/debug/makefile
-src/display/makefile
-src/extension/implementation/makefile
-src/extension/internal/makefile
-src/extension/makefile
-src/extension/dbus/wrapper/inkdbus.pc
-src/filters/makefile
-src/helper/makefile
-src/io/makefile
-src/libcroco/makefile
-src/libgdl/makefile
-src/libnrtype/makefile
-src/libavoid/makefile
-src/libuemf/makefile
-src/livarot/makefile
-src/live_effects/makefile
-src/live_effects/parameter/makefile
-src/svg/makefile
-src/trace/makefile
-src/ui/cache/makefile
-src/ui/dialog/makefile
-src/ui/makefile
-src/ui/view/makefile
-src/ui/widget/makefile
-src/util/makefile
-src/widgets/makefile
-src/xml/makefile
-src/2geom/makefile
-doc/Makefile
-po/Makefile.in
-share/Makefile
-share/attributes/Makefile
-share/branding/Makefile
-share/examples/Makefile
-share/extensions/Makefile
-share/extensions/alphabet_soup/Makefile
-share/extensions/Barcode/Makefile
-share/extensions/Poly3DObjects/Makefile
-share/extensions/test/Makefile
-share/extensions/xaml2svg/Makefile
-share/extensions/ink2canvas/Makefile
-share/filters/Makefile
-share/fonts/Makefile
-share/gradients/Makefile
-share/icons/Makefile
-share/icons/application/Makefile
-share/icons/application/16x16/Makefile
-share/icons/application/22x22/Makefile
-share/icons/application/24x24/Makefile
-share/icons/application/32x32/Makefile
-share/icons/application/48x48/Makefile
-share/icons/application/256x256/Makefile
-share/keys/Makefile
-share/markers/Makefile
-share/palettes/Makefile
-share/patterns/Makefile
-share/screens/Makefile
-share/symbols/Makefile
-share/templates/Makefile
-share/tutorials/Makefile
-share/ui/Makefile
-packaging/autopackage/default.apspec
-inkscape.spec
-Info.plist
-inkview.1
-])
-
-AH_BOTTOM([
-
-
-])
-
-AC_OUTPUT
-
-echo "
-Configuration:
-
- Source code location: ${srcdir}
- Destination path prefix: ${prefix}
- Compiler: ${CXX}
- CPPFLAGS: ${CPPFLAGS}
- CXXFLAGS: ${CXXFLAGS}
- CFLAGS: ${CFLAGS}
- LDFLAGS: ${LDFLAGS}
-
- Use gnome-vfs: ${gnome_vfs}
- Use openoffice files: ${ij}
- Use relocation support: ${enable_binreloc}
- Enable LittleCms: ${enable_lcms}
- Enable DBUS: ${with_dbus}
- Enable Poppler-Cairo: ${enable_poppler_cairo}
- Enable Potrace: ${potrace_ok}
- ImageMagick Magick++: ${magick_ok}
- Libwpg: ${with_libwpg}
- Libvisio: ${with_libvisio}
- Libcdr: ${with_libcdr}
- Doing Local Install: ${with_localinstall}
-"
diff --git a/delautogen.sh b/delautogen.sh
deleted file mode 100755
index bc955a913..000000000
--- a/delautogen.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# delautogen.sh: Remove files created by autogen.sh, and files created by make
-# if compiling in the source directory.
-#
-# Requires gnu find, gnu xargs.
-
-set -e
-mydir=`dirname "$0"`
-cd "$mydir"
-rm -rf autom4te.cache
-rm -rf src/.libs
-for d in `find -name .cvsignore -printf '%h '`; do
- (cd "$d" && rm -f *~ && rm -rf .deps && rm -f $(grep '^[][a-zA-Z0-9_.*?-]*$' .cvsignore) )
-done
diff --git a/doc/Makefile.am b/doc/Makefile.am
deleted file mode 100644
index dd22e7710..000000000
--- a/doc/Makefile.am
+++ /dev/null
@@ -1,20 +0,0 @@
-EXTRA_DIST = README.document \
- architecture.svg \
- architecture.txt \
- class-hierarchy.dia \
- coordinates.txt \
- HACKING.de.txt \
- HACKING.fr.txt \
- HACKING.it.txt \
- HACKING.pt_BR.txt \
- HACKING.txt \
- keys.css \
- keys.README \
- keys.be.html\
- keys.de.html \
- keys.el.html \
- keys.en.html \
- keys.fr.html \
- keys.ja.html \
- keys.zh_TW.html \
- refcounting.txt
diff --git a/inkscape.fr.pod b/inkscape.fr.pod
index 55f60d9a5..294130658 100644
--- a/inkscape.fr.pod
+++ b/inkscape.fr.pod
@@ -14,38 +14,38 @@ If the PO get lost, keeping this translation up-to-date will be harder.
=head1 NOM
-Inkscape — programme d'édition de SVG (Scalable Vector Graphics).
+Inkscape - programme d'édition SVG (Scalable Vector Graphics).
=head1 SYNOPSIS
C<inkscape [options] [nom_de_fichier ...]>
-S<options :>
+options:
- -?, --help
- --usage
+ -?, --help
+ --usage
-V, --version
- -f, --file=NOM_DE_FICHIER
+ -f, --file=NOMDEFICHIER
- -e, --export-png=NOM_DE_FICHIER
- -a, --export-area=x0:y0:x1:y1
+ -e, --export-png=NOMDEFICHIER
+ -a, --export-area=x0:y0:x1:y1
-C, --export-area-page
-D, --export-area-drawing
--export-area-snap
- -i, --export-id=ID
- -j, --export-id-only
+ -i, --export-id=ID
+ -j, --export-id-only
-t, --export-use-hints
- -b, --export-background=COULEUR
- -y, --export-background-opacity=VALEUR
- -d, --export-dpi=PPP
- -w, --export-width=LARGEUR
- -h, --export-height=HAUTEUR
-
- -P, --export-ps=NOM_DE_FICHIER
- -E, --export-eps=NOM_DE_FICHIER
- -A, --export-pdf=NOM_DE_FICHIER
- --export-pdf-version=NUMÉRO_DE_VERSION
+ -b, --export-background=COULEUR
+ -y, --export-background-opacity=VALEUR
+ -d, --export-dpi=DPI
+ -w, --export-width=LARGEUR
+ -h, --export-height=HAUTEUR
+
+ -P, --export-ps=NOMDEFICHIER
+ -E, --export-eps=NOMDEFICHIER
+ -A, --export-pdf=NOMDEFICHIER
+ --export-pdf-version=NUMERODEVERSION
--export-latex
--export-ps-level {2,3}
@@ -53,11 +53,11 @@ S<options :>
-T, --export-text-to-path
--export-ignore-filters
- -l, --export-plain-svg=NOM_DE_FICHIER
+ -l, --export-plain-svg=NOMDEFICHIER
-p, --print=IMPRIMANTE
- -I, --query-id=ID
+ -I, --query-id=ID
-X, --query-x
-Y, --query-y
-W, --query-width
@@ -67,13 +67,13 @@ S<options :>
-x, --extension-directory
--verb-list
- --verb=ID_ACTION
- --select=ID_OBJET
+ --verb=VERB-ID
+ --select=OBJECT-ID
--shell
- -g, --with-gui
- -z, --without-gui
+ -g, --with-gui
+ -z, --without-gui
--vacuum-defs
@@ -86,25 +86,24 @@ B<Inkscape> est un éditeur de dessin au format B<Scalable Vector Graphics
B<Adobe Illustrator>, B<CorelDraw>, B<Xara Xtreme>, etc. Les fonctionnalités
d'Inkscape comprennent une gestion versatile des formes, le dessin à main
levée et les courbes de Bézier, le texte multiligne, le texte suivant un
-chemin, la transparence alpha, les transformations affines, les remplissages
-par motif ou dégradé, l'édition de nœuds, l'import et l'export avec de
-nombreux formats incluant PNG et PDF, le groupement, les calques, les clones
-interactifs, et bien plus encore. L'interface est conçue pour être agréable
-et efficace pour les utilisateurs expérimentés, tout en restant conforme aux
-spécifications de B<GNOME> de sorte que les utilisateurs familiers avec
-d'autres applications GNOME puissent rapidement prendre en main l'interface.
+chemin, la transparence, les transformations affines, les remplissages par
+motif ou dégradé, l'édition de nœuds, l'export SVG vers PNG, le groupement,
+les calques, les clones interactifs et bien plus encore. L'interface est
+conçue pour être confortable et efficace pour les utilisateurs expérimentés
+tout en restant conforme aux spécifications de B<GNOME> permettant ainsi aux
+utilisateurs d'applications GNOME de s'y habituer rapidement.
-Le format B<SVG> est un format XML normalisé par le W3C pour le dessin
-vectoriel en 2D. Il permet de définir des objets sur un dessin en utilisant
-des points, des chemins et des formes primitives. Les couleurs, les polices
-de caractères, l'épaisseur du contour et autres sont spécifiés comme
-attributs du style de ces objets. Le but, SVG étant un standard et ses
-fichiers du texte/XML, est de rendre possible l'utilisation de fichiers SVG
-pour un grand nombre de programmes et de pratiques.
+Le format B<SVG> est un format XML standard pour le dessin vectoriel 2D. Il
+permet de définir des objets sur un dessin par l'utilisation de points,
+chemins et formes primitives. Les couleurs, fontes, largeur de contour et
+autres sont spécifiés en tant qu'attributs de 'style' de ces objets. Le but
+est de rendre possible l'utilisation de fichiers SVG pour un grand nombre de
+programmes et d'utilisation, SVG étant un standard et ses fichiers du type
+texte/xml.
-B<Inkscape> utilise le SVG comme format de document natif, et vise à devenir
-le programme de dessin vectoriel le plus respectueux du format SVG,
-disponible dans la communauté du logiciel libre.
+B<Inkscape> utilise le SVG comme format natif de ses documents, et a pour
+but de devenir le plus conforme des programmes de dessin SVG, disponible
+pour la communauté du logiciel libre.
@@ -114,304 +113,299 @@ disponible dans la communauté du logiciel libre.
=item B<-?>, B<--help>
-Afficher un message d'aide.
+Affiche un message d'aide.
=item B<-V>, B<--version>
-Afficher la version d'Inkscape et la date de compilation.
+Affiche la version d'Inkscape et la date de compilation.
=item B<-a> I<x0:y0:x1:y1>, B<--export-area>=I<x0:y0:x1:y1>
-Pour l'export en PNG, définit la zone à exporter en unités utilisateur SVG
-(unité anonyme de longueur utilisée normalement par le format SVG
-d'Inkscape). Le comportement par défaut est d'exporter la page complète du
-document. Le point S<(0 ; 0)> correspond au coin inférieur gauche.
+Pour l'export en PNG, définit la zone à exporter en pixels SVG (unité
+anonyme de longueur utilisée normalement par le format SVG Inkscape). Le
+comportement par défaut est d'exporter la page du document. Le point (0,0)
+est le coin inférieur gauche.
=item B<-C>, B<--export-area-page>
-Pour l'export en PNG, PDF, PS et EPS, définit la page comme zone à
-exporter. C'est le comportement par défaut pour les formats PNG, PDF et PS,
-et vous n'avez donc pas besoin de spécifier cette option pour ces formats à
-moins que vous utilisiez l'option --export-id pour exporter un objet
-spécifique. En EPS, cependant, il ne s'agit pas du comportement par S<défaut ;>
-de plus, la spécification du format EPS n'autorise pas son cadre englobant à
-s'étendre au-delà de son contenu. Cela signifie que lorsque l'option
---export-area-page est utilisée pour l'export en EPS, la boîte englobante de
-la page sera redimensionnée pour s'adapter à la taille de son contenu si
-elle est plus petite.
+Pour l'export en PNG, PDF, PS et EPS, la zone exportée est la page. C'est
+habituellement le comportement par défaut pour les formats PNG, PDF et PS,
+aussi spécifier cette option n'est pas nécessaire pour ces formats sauf si
+l'option --export-id est utilisée pour exporter un objet spécifique. En EPS,
+cependant, il ne s'agit pas du comportement par défaut. De plus, pour l'EPS,
+la spécification du format n'autorise pas sa boîte englobante à s'étendre
+au-delà de son contenu, ce qui signifie que lorsque l'option
+--export-area-page est utilisée pour l'export EPS, la boîte englobante de la
+page sera redimensionnée pour s'adapter à la boîte englobante de son contenu
+si elle est plus petite.
=item B<-D>, B<--export-area-drawing>
-Pour l'export en PNG, PDF, PS et EPS, définit le dessin entier (pas la page)
-comme zone à exporter, c'est-à-dire le cadre englobant l'ensemble des objets
-du document (ou des objets exportés lorsque l'option --export-id est
+Pour l'export en PNG, PDF, PS et EPS, la zone à exporter est le dessin
+entier (pas la page), c'est à dire la boîte englobante de l'ensemble des
+objets du document (ou des objets exportés lorsque l'option --export-id est
utilisée). Avec cette option, l'image exportée n'affichera que les objets
visibles du document sans marge ni massicotage. Il s'agit de l'option par
-défaut pour l'export au format EPS. Lors de l'export en PNG, elle peut être
-combinée avec --export-use-hints.
+défaut pour l'export au format EPS. Peut être combiné, lors de l'export en
+PNG, avec --export-use-hints.
=item B<--export-area-snap>
-Pour l'export en PNG, arrondir les dimensions de la zone à exporter aux
-valeurs entières supérieures en unités SVG utilisateur (px). Si vous
-utilisez une résolution d'export de 96 ppp et que vos objets sont alignés
-aux pixels afin de minimiser l'anti-crénelage, cette option permet de
-préserver cet alignement même si l'export se fait selon des boîtes de
-contour (avec --export-id ou --export-area-drawing) qui ne sont pas
-correctement alignées sur les pixels.
+Arrondi les dimensions de la zone à exporter aux valeurs entières
+supérieures en unités SVG utilisateur (px). Si vous utilisez une résolution
+d'export de 96 ppp et que vos objets sont alignés aux pixels afin de
+minimiser l'anti-crénelage, cette option permet de préserver cet alignement
+même si l'export se fait selon des boîtes de contour (avec --export-id ou
+--export-area-drawing) qui ne sont pas correctement alignées sur les pixels.
=item B<-b> I<COULEUR>, B<--export-background>=I<COULEUR>
-Définit la couleur d'arrière-plan du PNG exporté. La couleur peut être
-décrite de toutes les manières supportées par le format SVG, par exemple
-"#ff007f" ou "rgb(255, 0, 128)". Si cette couleur n'est pas définie, la
-couleur de page définie dans Inkscape via la boîte de dialogue Préférences
-du document sera utilisée (enregistrée dans l'attribut pagecolor= de
-sodipodi:namedview).
+Couleur de fond du PNG exporté. Cette valeur peut être n'importe quelle
+chaîne de couleur supportée par le format SVG, par exemple "#ff007f" ou
+"rgb(255, 0, 128)". Si cette couleur n'est pas définie, la couleur de page
+définie dans Inkscape via la boîte de dialogue Préférences du document sera
+utilisée (enregistrée dans l'attribut pagecolor= de sodipodi:namedview).
=item B<-d> I<PPP>, B<--export-dpi>=I<PPP>
-Définit la résolution utilisée pour l'export en PNG. Elle est également
-utilisée pour définir le niveau de rastérisation des objets filtrés lors de
-l'export en PS, EPS ou PDF (sauf si l'option --export-ignore-filters est
+La résolution utilisée pour l'export en PNG. Elle est également utilisée
+pour définir le niveau de rastérisation des objets filtrés lors de l'export
+en PS, EPS ou PDF (sauf si l'option --export-ignore-filters est
utilisée). Elle est de 96 par défaut, correspondant à 1 pixel SVG (px, aussi
appelé « unité utilisateur ») s'exportant vers 1 pixel bitmap. Cette valeur
préempte la PPP enregistrée avec le document si la commande est utilisée
avec --export-use-hints.
-=item B<-e> I<NOM_DE_FICHIER>, B<--export-png>=I<NOM_DE_FICHIER>
+=item B<-e> I<NOMDEFICHIER>, B<--export-png>=I<NOMDEFICHIER>
-Exporter au format PNG sous le nom I<NOM_DE_FICHIER>. Si un fichier portant
-ce nom existe déjà, il sera écrasé sans demande de confirmation.
+Spécifie le nom de fichier pour l'export en PNG. S'il existe déjà, il sera
+écrasé sans demande de confirmation.
-=item B<-f> I<NOM_DE_FICHIER>, B<--file>=I<NOM_DE_FICHIER>
+=item B<-f> I<NOMDEFICHIER>, B<--file>=I<NOMDEFICHIER>
-Ouvrir le(s) document(s) spécifié(s). La chaîne d'option peut être omise,
-c'est-à-dire que vous pouvez lister les fichiers sans -f.
+Ouvre le(s) document(s) spécifié(s). La chaîne d'option peut être omise,
+c'est à dire que vous pouvez lister les noms de fichier sans -f.
=item B<-g>, B<--with-gui>
-Essayer d'utiliser l'interface graphique (sous Unix, utiliser le serveur X,
+Tente d'utiliser l'interface graphique (sous Unix, utilise le serveur X,
même si $DISPLAY n'est pas défini).
=item B<-h> I<HAUTEUR>, B<--export-height>=I<HAUTEUR>
-Définit la hauteur de l'image matricielle générée en pixels. Cette valeur
-écrase le paramètre --export-dpi (ou la PPP enregistrée avec le document si
---export-use-hints est aussi utilisé).
+Hauteur du bitmap généré en pixels. Cette valeur préempte l'option
+--export-dpi (ou la PPP enregistrée avec le document si --export-use-hints
+est aussi utilisé).
=item B<-i> I<ID>, B<--export-id>=I<ID>
-Pour l'export en PNG, PS, EPS, PDF et SVG simple, exporter l'objet portant
-l'identifiant (valeur de l'attribut id) S<I<ID> ;> les autres objets du
-document ne seront pas exportés. Par défaut, la zone exportée est le cadre
-englobant l'objet ; vous pouvez changer ce comportement en utilisant
---export-area (PNG seulement) ou --export-area-page.
+Lors des exportations PNG, PS, EPS, PDF et SVG simple, valeur de l'attribut
+id de l'objet que vous voulez exporter depuis le document (aucun autre objet
+n'est exporté). Par défaut la zone exportée est la boîte englobante de
+l'objet ; vous pouvez préempter ce comportement en utilisant --export-area
+(pour le PNG seulement) ou --export-area-page.
=item B<-j>, B<--export-id-only>
-Pour les formats PNG et SVG simple, n'exporter que l'objet dont
-l'identifiant est spécifié avec avec l'option --export-id. Tous les autres
-objets seront cachés et n'apparaîtront pas dans l'export même s'ils
-chevauchent l'objet exporté. Si --export-id n'est pas spécifié, cette option
-est ignorée. Pour l'export au format PDF, il s'agit du comportement par
-défaut, et cette option n'a donc pas d'effet.
+Pour les formats PNG et SVG simple, n'exporte que l'objet dont l'id est
+spécifiée avec avec l'option --export-id. Tout les autres objets seront
+cachés et n'apparaîtront pas dans le fichier exporté même s'ils chevauchent
+l'objet effectivement exporté. Cette option est ignorée si --export-id n'est
+pas aussi utilisé.
-=item B<-l>, B<--export-plain-svg>=I<NOM_DE_FICHIER>
+=item B<-l>, B<--export-plain-svg>=I<NOMDEFICHIER>
-Exporter le(s) document(s) au format SVG simple, sans espace de noms
-sodipodi: ou inkscape: et sans métadonnées RDF.
+Exporte le(s) document(s) en SVG brut, sans espace de nom sodipodi: ou
+inkscape: et sans métadonnées RDF.
=item B<-x>, B<--extension-directory>
-Lister le contenu du répertoire d'extensions utilisé par Inkscape et
-quitter. Cela permet aux extensions externes d'utiliser la même
-configuration que l'installation originale d'Inkscape.
+Liste le contenu du répertoire d'extensions configuré en tant que tel par
+Inkscape, puis sort. Cette option est utilisée afin que les extensions
+externes utilisent la configuration originale générée à l'installation
+d'Inkscape.
=item B<--verb-list>
-Lister toutes les actions disponibles dans Inkscape par identifiant. Cet
+Liste tous les verbes disponibles dans Inkscape par identifiant. Cet
identifiant peut être utilisé pour définir les actions du clavier ou les
menus. Il peut également être utilisé avec l'option de ligne de commande
--verb.
-=item B<--verb>=I<ID_ACTION>, B<--select>=I<ID_OBJET>
+=item B<--verb>=I<VERB-ID>, B<--select>=I<OBJECT-ID>
-Ces deux options fonctionnent de concert pour permettre aux scripts
-d'utiliser Inkscape en ligne de commande. Elles peuvent apparaître sur la
-ligne de commande aussi souvent que nécessaire et sont exécutées dans
-l'ordre pour tous les documents spécifiés.
+Ces deux options fonctionnent de concert pour offrir la possibilité d'écrire
+des scripts simples pour Inkscape depuis la ligne de commande. Il peuvent
+apparaître sur la ligne de commande aussi souvent que nécessaire et sont
+exécutés dans l'ordre pour tous les documents spécifiés.
La commande --verb exécute une action spécifique comme si elle était appelée
-depuis un menu ou un bouton. Une boîte de dialogue apparaîtra si elle fait
+depuis un menu ou un bouton. Un boîte de dialogue apparaît lorsqu'elle fait
partie de l'action. Utilisez l'option --verb-list pour lister les
identifiants d'action disponibles.
-La commande --select sélectionne les objets correspondant aux identifiants
-spécifiés. Les actions suivantes ne s'appliquent alors qu'à cette
+La commande --select sélectionne les objects correspondants à l'identifiant
+spécifié. Les actions suivantes ne s'appliquent alors qu'à cette
sélection. Pour désélectionner tous les objets, utilisez
--verb=EditDeselect. Les identifiants d'objet disponibles dépendent du
document ouvert.
=item B<-p> I<IMPRIMANTE>, B<--print>=I<IMPRIMANTE>
-Imprimer le(s) document(s) avec l'imprimante spécifiée en utilisant `lpr -P
-IMPRIMANTE'. Vous pouvez également utiliser `| COMMANDE' pour envoyer la
-sortie vers une autre commande, ou `> NOMDEFICHIER' pour écrire la sortie
-PostScript dans un fichier au lieu de l'imprimer. Faites attention à placer
-les guillemets correctement pour votre shell, par S<exemple :>
+Imprime le(s) document(s) vers l'imprimante spécifiée en utilisant `lpr -P
+IMPRIMANTE'. Vous pouvez aussi utiliser `| COMMANDE' pour spécifier un tube
+de commande différent, ou utiliser `> NOMDEFICHIER' pour écrire le résultat
+PostScript dans un fichier au lieu de l'imprimer. N'oubliez pas d'utiliser
+les guillemets appropriés pour votre shell, par S<exemple :>
-inkscape --print='| ps2pdf - mon_doc.pdf' mon_doc.svg
+inkscape --print='| ps2pdf - mondoc.pdf' mondoc.svg
=item B<-t>, B<--export-use-hints>
-Utiliser le nom de fichier et la résolution enregistrés avec l'objet exporté
-(uniquement si --export-id est spécifié). Ces valeurs sont configurées
-automatiquement lorsque vous exportez la sélection depuis Inkscape. Donc,
-par exemple, si vous exportez une forme avec id="path231" sous
-/home/me/shape.png avec une résolution de 300 ppp depuis document.svg en
-utilisant l'interface graphique d'Inkscape, et enregistrez le document, vous
-pourrez réexporter plus tard cette forme vers le même fichier et avec la
-même résolution en utilisant simplement la S<commande :>
+Utilise le nom de fichier et la PPP enregistrés avec l'objet exporté
+(uniquement si --export-id est spécifié). Ces valeurs sont automatiquement
+spécifiées si vous exportez la sélection depuis Inkscape. Donc, si par
+exemple, vous exportez la forme id="path231" en tant que /home/me/shape.png
+avec une résolution de 300 ppp depuis document.svg en utilisant l'interface
+graphique d'Inkscape, et sauvez le document, vous pourrez réexporter plus
+tard cette forme vers le même fichier et avec la même résolution en
+utilisant simplement la S<commande :>
inkscape -i path231 -t document.svg
Si vous utilisez --export-dpi, --export-width, ou --export-height avec cette
-option, alors la résolution enregistrée sera ignorée et la valeur fournie
-sur la ligne de commande sera utilisée. Si vous utilisez --export-png avec
+option, la PPP enregistrée avec le document sera ignorée et la valeur
+fournie à la ligne de commande utilisée. Si vous utilisez --export-png avec
cette option, le nom de fichier enregistré avec le document sera ignoré et
-le nom de fichier fourni sur la ligne de commande utilisé.
+le nom de fichier fourni à la ligne de commande utilisé.
=item B<-w> I<LARGEUR>, B<--export-width>=I<LARGEUR>
-Définit la largeur de l'image matricielle générée en pixels. Cette valeur
-écrase l'option --export-dpi (ou la résolution enregistrée avec le document
-si --export-use-hints est aussi utilisé).
+Largeur du bitmap généré en pixels. Cette valeur préempte l'option
+--export-dpi setting (ou la PPP enregistrée avec le document si
+--export-use-hints est aussi utilisé).
=item B<-y> I<VALEUR>, B<--export-background-opacity>=I<VALEUR>
-Définit l'opacité de l'arrière-plan du PNG exporté. Cela peut être une
-valeur entre 0.0 et 1.0 (0.0 signifiant la transparence complète, 1.0
-l'opacité complète) ou supérieure à 1 et inférieure à 255 S<(255 :>
-complètement opaque). Si cette valeur n'est pas spécifiée et si l'option -b
-n'est pas utilisée, l'opacité de la page enregistrée avec le document (dans
-l'attribut inkscape:pageopacity= de sodipodi:namedview) sera utilisée. Si
-cette valeur n'est pas spécifiée mais que l'option -b est utilisée, la
-valeur 255 (opacité complète) sera utilisée.
+Opacité du fond du PNG exporté. Cela peut être une valeur entre 0.0 et 1.0
+S<(0.0 :> complètement transparent, 1.0 complètement opaque) ou supérieure à 1
+et inférieure à 255 S<(255 :> complètement opaque). Si cette valeur n'est pas
+spécifiée et si l'option -b n'est pas utilisée, l'opacité de la page
+enregistrée avec le document (dans l'attribut inkscape:pageopacity= de
+sodipodi:namedview) sera utilisée. Si cette valeur n'est pas spécifiée mais
+que l'option -b est utilisée, la valeur 255 (opacité complète) sera
+utilisée.
-=item B<-P> I<NOM_DE_FICHIER>, B<--export-ps>=I<NOM_DE_FICHIER>
+=item B<-P> I<NOMDEFICHIER>, B<--export-ps>=I<NOMDEFICHIER>
-Exporter le(s) document(s) au format PostScript. Notez que PostScript ne
+Exporte le ou les documents au format PostScript. Notez que PostScript ne
supporte pas la transparence, et que tout objet transparent dans le SVG
-original sera automatiquement rastérisé. Les polices utilisées sont
+original sera automatiquement rastérisé. Les polices utilisés sont
incorporées en tant que sous-ensemble. La zone d'exportation par défaut est
-la S<page ;> vous pouvez la configurer comme étant le dessin avec l'option
---export-area-drawing. Vous pouvez spécifier --export-id pour exporter un
-unique objet (tous les autres objets seront S<cachés) ;> dans ce cas, la zone
-d'exportation correspond au cadre englobant l'objet choisi, à moins que vous
-n'ajoutiez l'option --export-area-page pour qu'il s'agisse de la page.
+la page, mais vous pouvez choisir de limiter cette zone au dessin avec
+l'option --export-area-drawing. Il est également possible de n'exporter
+qu'un objet en spécifiant --export-id (tous les autres objets sont
+cachés). Dans ce cas, la zone d'exportation correspond à celle de l'objet
+choisi, à moins que vous n'ajoutiez l'option --export-area-page pour que
+cette zone prenne la taille de la page.
-=item B<-E> I<NOM_DE_FICHIER>, B<--export-eps>=I<NOM_DE_FICHIER>
+=item B<-E> I<NOMDEFICHIER>, B<--export-eps>=I<NOMDEFICHIER>
-Exporter le(s) document(s) au format PostScript encapsulé. Notez que
+Exporte le ou les documents au format Encapsulated PostScript. Notez que
PostScript ne supporte pas la transparence, et que tout objet transparent
-dans le SVG original sera automatiquement rastérisé. Les polices utilisées
+dans le SVG original sera automatiquement rastérisé. Les polices utilisés
sont incorporées en tant que sous-ensemble. La zone d'exportation par défaut
-est le S<dessin ;> vous pouvez la configurer comme étant la page, mais
-consultez --export-area-page pour la limitation applicable. Vous pouvez
-spécifier --export-id pour exporter un unique objet (tous les autres objets
-seront cachés).
+est la page, mais vous pouvez choisir de limiter cette zone au dessin avec
+l'option --export-area-drawing. Il est également possible de n'exporter
+qu'un objet en spécifiant --export-id (tous les autres objets sont cachés).
-=item B<-A> I<NOM_DE_FICHIER>, B<--export-pdf>=I<NOM_DE_FICHIER>
+=item B<-A> I<FILENAME>, B<--export-pdf>=I<FILENAME>
-Exporter le(s) document(s) au format PDF. Ce format préserve la transparence
-des objets présents dans le SVG original. Les polices utilisées sont
-incorporées en tant que sous-ensemble. La zone d'exportation par défaut est
-la S<page ;> vous pouvez la configurer comme étant le dessin avec l'option
---export-area-drawing. Vous pouvez spécifier --export-id pour exporter un
-unique objet (tous les autres objets seront S<cachés) ;> dans ce cas, la zone
-d'exportation correspond au cadre englobant l'objet choisi, à moins que vous
-n'ajoutiez l'option --export-area-page pour qu'il s'agisse de la page.
+Exporte le ou les documents au format PDF. Ce format préserve la
+transparence des objets présents dans le SVG original. Les polices utilisés
+sont incorporées en tant que sous-ensemble. La zone d'exportation par défaut
+est la page, mais vous pouvez choisir de limiter cette zone au dessin avec
+l'option --export-area-drawing. Il est également possible de n'exporter
+qu'un objet en spécifiant --export-id (tous les autres objets sont
+cachés). Dans ce cas, la zone d'exportation correspond à celle de l'objet
+choisi, à moins que vous n'ajoutiez l'option --export-area-page pour que
+cette zone prenne la taille de la page.
-=item B<--export-pdf-version>=I<NUMÉRO_DE_VERSION>
+=item B<--export-pdf-version>=I<VERSION-PDF>
-Sélectionne la version du format PDF utilisée pour exporter le
-fichier. Cette option correspond au sélecteur de version PDF présent dans la
-boîte de dialogue d'exportation en PDF de l'interface graphique. Vous devez
-indiquer une des versions proposées par ce sélecteur, par exemple « 1.4
-». La version par défaut est « 1.4 ».
+Sélectionne la version PDF utilisée pour exporter le fichier. Cette option
+ne fait que réutiliser le sélecteur de version PDF présent dans la boîte de
+dialogue d'exportation en PDF de l'interface graphique. Vous devez donc
+fournir une des versions proposées par ce sélecteur (par exemple « 1.4 ». La
+version par défaut est « 1.4 ».
=item B<--export-latex>
-Pour l'export en PS, EPS ou PDF, crée des images pour les documents LaTeX,
-dans lesquels les textes de l'image sont composés par LaTeX. Lors de
-l'export au format PDF/PS/EPS, cette option divise la sortie en un fichier
-PDF/PS/EPS (lorsque, par exemple, l'option --export-pdf est spécifiée) et un
-fichier LaTeX. Le texte ne sera pas enregistré dans le fichier PDF/PS/EPS,
-mais apparaîtra à la place dans le fichier LaTeX. Ce fichier LaTeX inclut le
-PDF/PS/EPS. Inclure le fichier LaTeX (\input{image.tex}) dans un document
-LaTeX fait alors apparaître l'image, et tout le texte sera composé par
-LaTeX. Consultez le document LaTeX généré pour en savoir plus. Consultez
-également la sortie de la commande `epslatex' de GNUPlot dans un terminal.
+Pour l'exportation en PS, EPS ou PDF. Utilisé pour créer des images pour les
+documents LaTeX, pour lesquels les textes sont composés par LaTeX. Lors de
+l'exportation PS, EPS ou PDF, cette option sépare la sortie en un fichier
+PS, EPS ou PDF (lorsque, par exemple, l'option --export-pdf est positionnée)
+et en un fichier LaTeX. Le text n'est pas enregistré dans le PS, EPS ou PDF,
+mais apparaît dans le fichier LaTex, qui lui-même inclut le PS, EPS ou
+PDF. Inclure le fichier LaTeX (\input{image.tex}) dans un document LaTeX
+fait alors apparaître l'image, et tout le texte composé par LaTeX. Se
+référer au document LaTeX généré pour de plus amples informations (voir
+également la sortie terminal de la commande GNUPlot `epslatex').
=item B<-T>, B<--export-text-to-path>
-Convertir les objets texte en chemins lors de l'export, si applicable (pour
-l'export en PS, EPS, PDF ou SVG).
+Convertit les objets texte en chemins lors de l'export, si applicable (pour
+l'exportation en PS, EPS, PDF ou SVG).
=item B<--export-ignore-filters>
-Exporter les objets filtrés (avec du flou, par exemple) comme des vecteurs,
-en ignorant les filtres (pour l'export en PS, EPS ou PDF). Par défaut, tous
-les objets filtrés sont rastérisés à une résolution choisie par --export-dpi
-(par défaut 96 ppp), ce qui préserve leur apparence.
+Exporte les objets filtrés (avec du flou, par exemple) comme des vecteurs,
+en ignorant les filtres (pour l'exportation en PS, EPS ou PDF). Par défaut,
+tous les objets filtrés sont rastérisés à une définition choisie par
+--export-dpi (par défaut 96 ppp), en préservant son apparence.
=item B<-I>, B<--query-id>
-Définit l'identifiant de l'objet dont les dimensions sont demandées. Si
-cette option n'est pas utilisée, la commande retournera les dimensions du
-dessin (c'est-à-dire de tous les objets du document), pas de la page ou de
-la zone affichée.
+Identifiant de l'objet dont les dimensions sont demandées. Si cette option
+n'est pas utilisée, la commande retournera les dimensions du dessin, pas de
+la page ou de la zone affichée.
=item B<-X>, B<--query-x>
-Demander l'abscisse (coordonnée X) du dessin ou, si spécifié avec
---query-id, de l'objet. La valeur retournée est en px (unités utilisateur
-SVG).
+Demande l'abscisse (coordonnée X) du dessin ou, si spécifié avec --query-id,
+de l'objet. La valeur retournée est en pixels (unité utilisateur SVG).
=item B<-Y>, B<--query-y>
-Demande l'ordonnée (coordonnée Y) du dessin ou, si spécifié avec --query-id,
-de l'objet. La valeur retournée est en px (unités utilisateur SVG).
+Demande l'ordonnée (coordonnée Y) du dessin ou, si spécifié avec --query-id
+de l'objet. La valeur retournée est en pixels (unité utilisateur SVG).
=item B<-W>, B<--query-width>
Demande la largeur du dessin ou, si spécifié avec --query-id, de l'objet. La
-valeur retournée est en px (unités utilisateur SVG).
+valeur retournée est en pixels (unité utilisateur SVG).
=item B<-H>, B<--query-height>
Demande la hauteur du dessin ou, si spécifié avec --query-id, de l'objet. La
-valeur retournée est en px (unités utilisateur SVG).
+valeur retournée est en pixels (unité utilisateur SVG).
=item B<-S>, B<--query-all>
-Affiche une liste de tous les objets du document SVG avec leur identifiant,
-et les valeurs x, y, largeur et hauteur, en utilisant la virgule comme
-séparateur.
+Affiche un liste délimitée par des virgules des tous les objets du document
+SVG comprenant leur identifiant, et les valeurs x, y, largeur et hauteur.
=item B<--shell>
-Utiliser Inkscape en mode ligne de commande interactif. Dans ce mode, vous
-pouvez entrer des commandes sur l'invite et Inkscape les exécute, sans que
-vous ayez à lancer une nouvelle instance du logiciel à chaque
-commande. Cette fonctionnalité est principalement utile pour les scripts et
-l'exécution à S<distance :> elle n'ajoute aucune fonctionnalité mais permet
-d'améliorer la vitesse et l'occupation en mémoire des scripts qui appellent
-Inkscape de façon répétée pour effectuer des tâches en ligne de commande
-(telles que des exports ou des conversions). Chaque commande, en mode
-interactif, doit contenir tous les paramètres d'une ligne de commande
-classique sans le nom du programme (inkscape), par S<exemple :> "fichier.svg
+Avec ce paramètre, Inkscape entre en mode de ligne de commande
+interactif. Dans ce mode, vous pouvez envoyer des commandes à Inkscape par
+le prompt, sans avoir à lancer une nouvelle instance du logiciel à chaque
+commande. Cette fonctionnalité est particulièrement utile pour une
+utilisation en scripts et en serveur. Elle permet d'améliorer la vitesse
+d'exécution et l'occupation en mémoire des scripts utilisés de façon
+répétée. Chaque commande, dans ce mode, doit contenir tous les paramètres
+d'une ligne de commande classique, à l'exception du nom du programme
+(inkscape), comme dans l'exemple S<suivant :> "fichier.svg
--export-pdf=fichier.pdf".
=item B<--vacuum-defs>
@@ -423,37 +417,38 @@ spécifié sera modifié.
=item B<-z>, B<--without-gui>
-Ne pas ouvrir l'interface graphique (sous Unix, ne pas utiliser le serveur
-S<X) ;> ne traiter les fichiers que depuis la console. Ceci est présupposé pour
-les options -p, -e, -l et --vacuum-defs.
+Ne lance pas l'interface graphique (sous Unix, n'utilise pas le server S<X) ;>
+ne traite les fichiers que depuis la console. Ceci est présupposé pour les
+options -p, -e, -l et --vacuum-defs.
=item B<--g-fatal-warnings>
Cette option GTK standard force l'arrêt d'Inkscape dès qu'un message
-d'avertissement (généralement sans gravité) est envoyé (utile pour le
-débogage).
+d'avertssement (généralement sans gravité) est envoyé (utilisée à des fins
+de déboggage).
=item B<--usage>
-Afficher un bref message sur d'usage.
+Affiche un bref message sur l'utilisation d'Inkscape.
=back
=head1 CONFIGURATION
-Le fichier de configuration principal se trouve dans
-S<~/.config/Inkscape/preferences.xml ;> il contient de nombreux types de
+Le fichier de configuration principal est placé dans
+~/.config/Inkscape/preferences.xml. Il contient plusieurs types de
paramétrages dont vous pouvez changer la valeur dans Inkscape (la plupart
-dans la boîte de dialogue Préférences d'Inkscape). Vous pouvez également
-ajouter des configurations spécifiques dans les sous-répertoires S<suivants :>
+dans la boîte de dialogue Préférences d'Inkscape). Vous pouvez ajouter des
+configurations spécifiques dans les sous-répertoires S<suivants :>
-B<$HOME>/.config/Inkscape/extensions/ — extensions.
+B<$HOME>/.config/Inkscape/extensions/ - extensions.
-B<$HOME>/.config/Inkscape/icons/ — icônes.
+B<$HOME>/.config/Inkscape/icons/ - icônes.
-B<$HOME>/.config/Inkscape/keys/ — configuration des raccourcis clavier.
+B<$HOME>/.config/Inkscape/keys/ - association des touches du clavier aux
+commandes.
-B<$HOME>/.config/Inkscape/templates/ — modèles de document.
+B<$HOME>/.config/Inkscape/templates/ - modèles de fichiers.
=head1 DIAGNOSTICS
@@ -461,74 +456,73 @@ Le programme retourne la valeur zéro après une utilisation réussie ou
différente de zéro après un problème.
Des messages d'erreur et des avertissements divers peuvent être envoyés vers
-STDERR ou STDOUT. Si le programme se comporte de façon inconsistante avec un
-fichier SVG particulier ou plante, ces messages peuvent comporter des
-indices.
+STDERR ou STDOUT. Si le programme se comporte de façon erratique avec un
+fichier SVG particulier, ou se plante, il est utile de chercher des indices
+dans ces messages.
=head1 EXEMPLES
Bien qu'B<Inkscape> soit principalement conçu comme une application
graphique, il peut aussi être utilisé depuis la ligne de commande pour
-effectuer des opérations SVG.
+certaines opérations SVG.
Ouvrir un fichier SVG avec l'interface S<graphique :>
- inkscape fichier.svg
+ inkscape nomdefichier.svg
Imprimer un fichier S<SVG :>
- inkscape fichier.svg -p '| lpr'
+ inkscape nomdefichier.svg -p '| lpr'
-Exporter un fichier SVG en PNG avec la résolution par défaut de 96 ppp (une
-unité utilisateur SVG devient un pixel de l'image S<matricielle) :>
+Exporter un fichier SVG en PNG avec la résolution par défaut de 96 ppp (un
+pixel bitmap correspondant à une unité utilisateur S<SVG) :>
- inkscape fichier.svg --export-png=fichier.png
+ inkscape nomdefichier.svg --export-png=nomdefichier.png
-Idem, mais en forçant les dimensions du fichier à 600×400 S<pixels :>
+Idem, mais en forçant les dimensions du fichier à 600x400 S<pixels :>
- inkscape fichier.svg --export-png=fichier.png -w600 -h400
+ inkscape nomdefichier.svg --export-png=nomdefichier.png -w600 -h400
Idem, mais en exportant le dessin (la boîte englobante de tous les objets),
et pas la S<page :>
- inkscape fichier.svg --export-png=fichier.png --export-area-drawing
+ inkscape nomdefichier.svg --export-png=nomdefichier.png --export-area-drawing
-Exporter en PNG l'objet avec id="text1555", en utilisant le nom de fichier
-et la résolution utilisés la dernière fois qu'il a été exporté depuis
-l'interface S<graphique :>
+Exporter en PNG l'objet id="text1555", en utilisant le nom de fichier et la
+résolution utilisés la dernière fois qu'il a été exporté depuis l'interface
+S<graphique :>
- inkscape fichier.svg --export-id=text1555 --export-use-hints
+ inkscape nomdefichier.svg --export-id=text1555 --export-use-hints
Idem, mais en utilisant une résolution de 96 ppp, en spécifiant un nom de
-fichier et en arrondissant la zone à exporter aux valeurs entières les plus
-proches en unités utilisateur SVG (afin de préserver l'alignement des objets
-sur des pixels et minimiser S<l'anti-crénelage) :>
+fichier et en arrondissant la zone à exporter aux valeurs entières juste
+supérieures en unités utilisateur SVG (afin de préserver l'alignement des
+objets sur des pixels et minimiser S<l'anti-crénelage) :>
- inkscape fichier.svg --export-id=text1555 --export-png=text.png --export-area-snap
+ inkscape nomdefichier.svg --export-id=text1555 --export-png=text.png --export-area-snap
-Convertir un document du format SVG Inkscape au format SVG S<simple :>
+Convertir un document du format SVG Inkscape au format SVG S<brut :>
- inkscape fichier1.svg --export-plain-svg=fichier2.svg
+ inkscape nomdefichier1.svg --export-plain-svg=nomdefichier2.svg
Convertir un document SVG en EPS, en convertissant les textes en S<chemins :>
- inkscape fichier.svg --export-eps=fichier.eps --export-text-to-path
+ inkscape nomdefichier.svg --export-eps=nomdefichier.eps --export-text-to-path
-Demander la largeur de l'objet avec S<id="text1555" :>
+Demander la largeur de l'objet avec un S<id="text1555" :>
- inkscape fichier.svg --query-width --query-id text1555
+ inkscape nomdefichier.svg --query-width --query-id text1555
-Dupliquer l'objet avec id="path1555", appliquer une rotation de 90 degrés
-sur le duplicata, enregistrer le SVG et S<quitter :>
+Dupliquer l'objet ayant pour identifiant id="path1555", puis appliquer une
+rotation de 90 degrés sur le duplicat, enregistrer le SVG et S<quitter :>
- inkscape fichier.svg --select=path1555 --verb=EditDuplicate --verb=ObjectRotate90 --verb=FileSave --verb=FileClose
+ inkscape nomdefichier.svg --select=path1555 --verb=EditDuplicate --verb=ObjectRotate90 --verb=FileSave --verb=FileClose
-=head1 ENVIRONNEMENT
+=head1 ENVIRONEMENT
-B<DISPLAY> pour obtenir l'hôte par défaut et le numéro de la session
-graphique.
+B<DISPLAY> pour obtenir l'hôte par défaut et le numéro d'affichage.
B<TMPDIR> pour définir le chemin par défaut du répertoire à utiliser pour
stocker les fichier temporaires. Le répertoire doit exister.
@@ -545,11 +539,11 @@ I<fill_none.svg>) ou, si elles sont introuvables, depuis le fichier
I<icons.svg>. Si une icône n'est pas trouvée dans l'un de ces emplacements,
elle est chargée depuis l'emplacement par défaut du système.
-Les icônes nécessaires sont chargées depuis les fichiers SVG en cherchant
-l'identifiant SVG correspondant (par exemple, pour charger l'icône
-S<« fill_none »> depuis un fichier, le contenu identifié par l'identifiant SVG
-S<« fill_none »> est rendu en tant que cette icône, qu'il vienne du fichier
-I<fill_none.svg> ou du fichier I<icons.svg>).
+Les icônes nécessaires sont chargées depuis les fichiers SVG par recherche
+de l'id SVG correspondant (Par exemple, pour charger l'icône "fill_none"
+depuis un fichier, le contenu identifié par l'id SVG "fill_none" est rendu
+en tant que cette icône, qu'il vienne du fichier I<fill_none.svg> ou du
+fichier I<icons.svg>).
@@ -557,20 +551,20 @@ I<fill_none.svg> ou du fichier I<icons.svg>).
=head1 AUTRES INFORMATIONS
-La référence principale où trouver des informations sur B<Inkscape> est
-http://www.inkscape.org/. Le site web comporte des actualités, de la
-documentation, des didacticiels, des exemples, des archives des listes de
-diffusion, la dernière version du programme, les bases de données contenant
-les bogues et les demandes de fonctionnalité, des forums, et encore
-davantage.
+L'endroit principal pour trouver des informations sur B<Inkscape> est
+http://www.inkscape.org/. Le site web contient des liens vers d'autres
+éléments S<pertinents :> documentation, didacticiels, manuel de l'utilisateur,
+exemples, archives des listes de diffusion, la dernière version d'Inkscape,
+les bases contenant les défauts et les demandes d'évolution, et bien
+d'autres choses.
=head1 VOIR AUSSI
potrace, cairo, rsvg(1), batik, ghostscript, pstoedit.
-Suite de tests de conformité S<SVG :> http://www.w3.org/Graphics/SVG/Test/
+Suite de tests de conformité S<SVG :> http://www.w3.org/Graphics/SVG/Test/
-Validation de S<SVG :> http://jiggles.w3.org/svgvalidator/
+Validation de S<SVG :> http://jiggles.w3.org/svgvalidator/
I<Scalable Vector Graphics (SVG) 1.1 Specification> I<W3C Recommendation 14
January 2003> L<http://www.w3.org/TR/SVG11/>
@@ -591,49 +585,49 @@ W3C> L<http://www.w3.org/TR/DOM-Level-2-Core/>
Pour vous familiariser avec l'utilisation de l'interface graphique
d'Inkscape, consultez les didacticiels dans Aide > Didacticiels.
-En plus du SVG, Inkscape peut importer (Fichier > Importer) la plupart des
-formats d'images matricielles (PNG, BMP, JPG, XPM, GIF, etc.), du texte brut
-(nécessite Perl), les formats PS et EPS (nécessite Ghostscript) et les
-formats PDF et AI (AI version 9.0 ou ultérieur).
+Inkscape permet d'importer (Fichier > Importer) la plupart des formats
+bitmaps PNG, BMP, JPG, XPM, GIF, etc.), du texte brut (nécessite Perl), PS
+et EPS (nécessite Ghostscript) et les formats PDF et AI (documents Adobe
+Illustrato 9.0 ou plus récent).
-Inkscape peut exporter (Fichier > Exporter une image PNG) des images PNG 32
-bits, mais aussi aux formats AI, PS, EPS, PDF, DXF et plusieurs autres
-formats via Fichier > Enregistrer sous.
+Inkscape permet d'exporter (Fichier > Exporter une image PNG) des images PNG
+32-bits, mais aussi aux formats AI, PS, EPS, PDF, DXF et plusieurs autres
+formats (via Fichier > Enregistrer sous).
Inkscape supporte la pression et l'inclinaison du stylet d'une tablette
-graphique pour la largeur, l'angle et la force d'action de plusieurs outils,
-dont la plume calligraphique.
+graphique pour la largeur, la force et l'angle de plusieurs outils dont la
+plume calligraphique.
-Inkscape comporte une interface graphique pour le moteur de vectorisation
-d'image matricielle Potrace (http://potrace.sf.net) qui est inclus dans
-Inkscape.
+Inkscape comporte une interface graphique pour le moteur de vectorisation de
+bitmaps Potrace (http://potrace.sf.net) qui est inclus dans Inkscape.
Inkscape peut utiliser des scripts externes (filtres de stdin vers stdout)
-représentés par des commandes dans le menu Effets. Un script peut faire
-intervenir les boîtes de dialogue de l'interface graphique pour définir
-différents paramètres et peut obtenir les identifiants des objets
-sélectionnés sur lesquels agir depuis la ligne de commande. Inkscape est
-livré avec un assortiment d'effets écrits en Python.
+représentés par des commandes dans le menu Effets. Un script peut avoir une
+interface graphique, sous forme de boîte de dialogue, permettant de définir
+différents paramètres et peut obtenir les IDs des objets sélectionnés sur
+lesquels agir depuis la ligne de commande. Inkscape est livré avec un
+assortiment d'effets écrits en Python dédiés principalement à la
+manipulation de chemin.
=head1 RACCOURCIS CLAVIER
Pour obtenir une liste complète des raccourcis clavier et souris, consultez
le fichier doc/keys.html, ou utilisez la commande Clavier et souris dans le
-menu Aide.
+menu d'aide de l'interface graphique.
-=head1 BOGUES
+=head1 DÉFAUTS
-Beaucoup de bogues sont S<connus ;> veuillez vous référer au site web
-(inkscape.org) pour vérifier ceux qui ont déjà été rapportés et pour
-soumettre de nouveaux problèmes. Consultez aussi la section S<« Known> S<Issues »>
-des notes de livraison de votre version (dans le fichier `NEWS').
+Beaucoup de bugs sont S<connus ;> veuillez s'il vous plaît consulter le site
+web pour vérifier ceux qui ont déjà été rapportés et pour soumettre de
+nouveaux problèmes. Consultez aussi la section "Known Issues" des notes de
+votre version (dans le fichier `NEWS').
=head1 AUTEURS
Ce code doit son existence à un grand nombre de contributeurs tout au long
de ses différentes incarnations. La liste qui suit est certainement
incomplète mais permet de reconnaître les nombreuses épaules sur lesquelles
-cette application S<repose :>
+cette application s'est S<appuyée :>
[% INCLUDE "AUTHORS" %]
@@ -644,7 +638,7 @@ E<lt>brycehar@bryceharrington.orgE<gt>.
Le code qui allait devenir Inkscape est né en 1999, avec le programme Gill,
GNOME Illustrator, créé par Raph Levien. L'objectif défini pour Gill était
-de supporter complètement le format SVG. Raph a codé le modèle PostScript de
+de supporter complètement le format SVG. Raph a codé le modèle Postcript de
courbes de Bézier, incluant le remplissage et le contour, les coiffes et
raccords de lignes, le texte, etc. La page de Raph consacrée à Gill se
trouve sur http://www.levien.com/svg/. Le travail sur Gill semble avoir
@@ -654,45 +648,44 @@ L'incarnation suivante du code allait devenir le très populaire Sodipodi,
mené par Lauris Kaplinski. Le code est devenu un outil d'illustration
puissant après plusieurs années de travail, ajoutant plusieurs nouvelles
fonctionnalités, le support multilingue, le portage sous Windows et d'autres
-systèmes d'exploitation, et éliminant certaines dépendances.
-
-Inkscape a été lancé en 2003 par quatre développeurs actifs de Sodipodi,
-Bryce Harrington, MenTaLguY, Nathan Hurst et Ted Gould, qui voulaient faire
-prendre une orientation différente au code en termes de focalisation sur la
-conformité SVG, d'aspect et de fonctionnement de l'interface, et d'ouverture
-du développement à plus de participants. Le projet a progressé rapidement,
-gagnant de nombreux contributeurs très actifs et une multitude de
+systèmes d'exploitation et éliminant certaines dépendances.
+
+Inkscape a été lancé en 2003 par quatre développeurs actifs de Sodipodi
+(Bryce Harrington, MenTaLguY, Nathan Hurst et Ted Gould), qui voulaient
+faire prendre une orientation différente au code en termes de focalisation
+sur la conformité SVG, aspect et fonctionnement de l'interface, et
+d'opportunités de développement ouvertes à plus de participants. Le projet a
+progressé rapidement, gagnant de nombreux contributeurs et une multitude de
fonctionnalités.
Beaucoup de travail a été depuis consacré à la stabilisation du code et à
l'internationalisation. Le moteur de rendu hérité de Sodipodi comportait de
-nombreux cas limites mathématiques qui entraînaient des plantages lorsque le
-programme était utilisé à des fins S<inhabituelles ;> ce moteur a alors été
-remplacé par Livarot qui, bien qu'imparfait, générait moins d'erreurs. Le
-projet a également adopté la bonne habitude de publier son code
-régulièrement, et encouragé les utilisateurs à tester des versions en
-développement du S<logiciel ;> cela a aidé à identifier les nouveaux bogues
-rapidement, et à assurer qu'il était facile pour les utilisateurs de
-vérifier les correctifs. Inkscape a ainsi acquis une réputation de programme
-robuste et fiable.
+nombreuses spécificités qui entrainaient de plantages lorsque l'utilisation
+du programme sortait des sentiers battus. Ce moteur a alors été remplacé par
+Livarot qui, bien qu'imparfait, générait moins d'erreurs. Le projet a
+également adopté la bonne habitude de publier son code régulièrement, et
+encouragé les utilisateurs à tester des versions en développement du
+logiciel, ce qui a bien aidé dans l'identification des nouveaux défauts, et
+donné les moyens aux utilisateurs de vérifier que les anciens étaient bien
+corrigés. Inkscape a ainsi acquis une réputation de programme robuste et
+fiable.
En parallèle, des efforts ont été faits pour améliorer
l'internationalisation et la localisation de l'interface, ce qui a apporté
-au projet de nouveaux contributeurs du monde entier.
+au projet de nouveaux contributeurs tout autour du monde.
Inkscape a eu un impact positif sur l'attractivité visuelle de l'Open Source
-en général, en offrant un outil pour créer et partager des icônes, des
-écrans d'accueil, de l'art pour le web, etc. D'une certaine façon, bien que
-n'étant qu'un S<« simple> outil de S<dessin »,> Inkscape a joué un rôle important
-en rendant l'Open Source plus stimulant visuellement pour un plus large
-public.
+en général, en offrant un outil pour créer et partager des icônes, écrans
+d'accueil, art pour le web, etc. D'une certaine façon, bien que n'étant
+qu'un "simple outil de dessin", Inkscape a joué un rôle important en rendant
+l'Open Source plus stimulant visuellement parlant pour un plus large public.
-=head1 COPYRIGHT ET LICENCE
+=head1 COPYRIGHT ET LICENSE
B<Copyright (C)> 1999-2015 par les auteurs.
-B<Inkscape> est un logiciel S<libre ;> vous pouvez le redistribuer et/ou le
-modifier selon les conditions de la licence GPL.
+B<Inkscape> est un logiciel libre; vous pouvez le redistribuer et/ou le
+modifier selon les termes de la license GPL.
diff --git a/m4/Makefile.am b/m4/Makefile.am
deleted file mode 100644
index e1b0207fe..000000000
--- a/m4/Makefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
-EXTRA_DIST = \
- ac_define_dir.m4 \
- codeset.m4 \
- gettext.m4 \
- glibc21.m4 \
- iconv.m4 \
- isc-posix.m4 \
- lcmessage.m4 \
- progtest.m4 \
- relaytool.m4
-
diff --git a/m4/ac_define_dir.m4 b/m4/ac_define_dir.m4
deleted file mode 100644
index db42d3eb0..000000000
--- a/m4/ac_define_dir.m4
+++ /dev/null
@@ -1,49 +0,0 @@
-# ===========================================================================
-# http://autoconf-archive.cryp.to/ac_define_dir.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
-#
-# DESCRIPTION
-#
-# This macro sets VARNAME to the expansion of the DIR variable, taking
-# care of fixing up ${prefix} and such.
-#
-# VARNAME is then offered as both an output variable and a C preprocessor
-# symbol.
-#
-# Example:
-#
-# AC_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.])
-#
-# LAST MODIFICATION
-#
-# 2008-04-12
-#
-# COPYLEFT
-#
-# Copyright (c) 2008 Stepan Kasal <kasal@ucw.cz>
-# Copyright (c) 2008 Andreas Schwab <schwab@suse.de>
-# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
-# Copyright (c) 2008 Alexandre Oliva
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved.
-
-AC_DEFUN([AC_DEFINE_DIR], [
- prefix_NONE=
- exec_prefix_NONE=
- test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
- test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
-dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
-dnl refers to ${prefix}. Thus we have to use `eval' twice.
- eval ac_define_dir="\"[$]$2\""
- eval ac_define_dir="\"$ac_define_dir\""
- AC_SUBST($1, "$ac_define_dir")
- AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3])
- test "$prefix_NONE" && prefix=NONE
- test "$exec_prefix_NONE" && exec_prefix=NONE
-])
diff --git a/m4/ink_bzr_snapshot_build.m4 b/m4/ink_bzr_snapshot_build.m4
deleted file mode 100644
index 4dc2df54f..000000000
--- a/m4/ink_bzr_snapshot_build.m4
+++ /dev/null
@@ -1,14 +0,0 @@
-# Check for BZR snapshot build
-# (c) 2009 Krzysztof Kosiński
-# Released under GNU GPL; see the file COPYING for more information
-
-AC_DEFUN([INK_BZR_SNAPSHOT_BUILD],
-[
- AC_CACHE_CHECK([for BZR snapshot build], ink_cv_bzr_snapshot_build,
- [ink_cv_bzr_snapshot_build=no
- if which bzr > /dev/null && test -e $srcdir/.bzr/branch/last-revision; then
- ink_cv_bzr_snapshot_build=yes
- fi
- ])
- AM_CONDITIONAL([USE_BZR_VERSION], [test "x$ink_cv_bzr_snapshot_build" = "xyes"])
-])
diff --git a/m4/relaytool.m4 b/m4/relaytool.m4
deleted file mode 100644
index 5cd65aea0..000000000
--- a/m4/relaytool.m4
+++ /dev/null
@@ -1,30 +0,0 @@
-dnl Usage: RELAYTOOL(LIBRARY_NAME, LIBS, CFLAGS, ACTION-IF-WEAK-LINK-IS-POSSIBLE)
-
-dnl Example:
-dnl RELAYTOOL("gtkspell", GTKSPELL_LIBS, GTKSPELL_CFLAGS, gtkspell_weak=yes)
-dnl Will modify GTKSPELL_LIBS to include a call to relaytool if available
-dnl or if not, will modify GTKSPELL_CFLAGS to include -D switches to define
-dnl libgtkspell_is_present=1 and libgtkspell_symbol_is_present=1
-
-AC_DEFUN([RELAYTOOL], [
- if test -z "$RELAYTOOL_PROG"; then
- AC_PATH_PROG(RELAYTOOL_PROG, relaytool, no)
- fi
-
- AC_MSG_CHECKING(whether we can weak link $1)
-
- _RELAYTOOL_PROCESSED_NAME=`echo "$1" | sed 's/-/_/g;s/\./_/g;'`
- _RELAYTOOL_UPPER_NAME=`echo $_RELAYTOOL_PROCESSED_NAME | tr '[[:lower:]]' '[[:upper:]]'`
-
- if test "$RELAYTOOL_PROG" = "no"; then
- AC_MSG_RESULT(no)
- $3="-DRELAYTOOL_${_RELAYTOOL_UPPER_NAME}='static const int lib${_RELAYTOOL_PROCESSED_NAME}_is_present = 1; static int __attribute__((unused)) lib${_RELAYTOOL_PROCESSED_NAME}_symbol_is_present(char *m) { return 1; }' $$3"
- else
- AC_MSG_RESULT(yes)
- $2=`echo $$2|sed 's/\`/\\\\\`/g;'`
- $2="-Wl,--gc-sections \`relaytool --relay $1 $$2\`"
- $3="-DRELAYTOOL_${_RELAYTOOL_UPPER_NAME}='extern int lib${_RELAYTOOL_PROCESSED_NAME}_is_present; extern int lib${_RELAYTOOL_PROCESSED_NAME}_symbol_is_present(char *s);' $$3"
- $4
- fi
-])
-
diff --git a/packaging/snappy/snapcraft.sh b/packaging/snappy/snapcraft.sh
new file mode 100755
index 000000000..7e12fe964
--- /dev/null
+++ b/packaging/snappy/snapcraft.sh
@@ -0,0 +1,6 @@
+#!/bin/sh -e
+
+export INKSCAPE_PORTABLE_PROFILE_DIR="${SNAP_USER_DATA}"
+export INKSCAPE_LOCALEDIR="${SNAP}/share/locale/"
+
+exec $@
diff --git a/setup/gui/inkscape.desktop b/setup/gui/inkscape.desktop
new file mode 100644
index 000000000..f7eb9cbef
--- /dev/null
+++ b/setup/gui/inkscape.desktop
@@ -0,0 +1,302 @@
+[Desktop Entry]
+Version=1.0
+Name[ar]=إنكسكيب
+Name[as]=ইনসà§à¦•েপ
+Name[be]=Inkscape
+Name[bn_BD]=ইনà§à¦•সà§à¦•েপ
+Name[br]=Inkscape
+Name[brx]=इङà¥à¤•सà¥à¤•ेप
+Name[ca]=Inkscape
+Name[ca@valencia]=Inkscape
+Name[cs]=Inkscape
+Name[da]=Inkscape
+Name[de]=Inkscape
+Name[doi]=इंकसà¥à¤•ेप
+Name[el]=Inkscape
+Name[en_GB]=Inkscape
+Name[en_US@piglatin]=Inkscape
+Name[es]=Inkscape
+Name[eu]=Inkscape
+Name[fr]=Inkscape
+Name[gl]=Inkscape
+Name[gu]=Inkscape
+Name[he]=×ינקסקייפ
+Name[hi]=इंकसà¥à¤•ेप
+Name[hu]=Inkscape
+Name[id]=Inkscape
+Name[is]=Inkscape
+Name[it]=Inkscape
+Name[ja]=Inkscape
+Name[km]=Inkscape
+Name[kn]=ಇಂಕà³â€Œà²¸à³à²•ೇಪà³
+Name[ko]=Inkscape
+Name[kok]=इंकसà¥à¤•ेप
+Name[kok@latin]=Inkscape
+Name[ks@aran]=اÙنکسکیپ
+Name[ks@deva]=इनकसकेप
+Name[lv]=Inkscape
+Name[mai]=Inkscape
+Name[ml]=ഇങàµà´•àµà´¸àµà´•െയàµà´ªàµ
+Name[mni]=ê¯ê¯ªê¯›ê¯ê¯­ê¯€ê¯¦ê¯ž
+Name[mni@beng]=ইঙà§à¦•সà§à¦•েপ
+Name[mr]=इंकसà¥à¤•ेप
+Name[nl]=Inkscape
+Name[or]=ଇଙà­à¬•à­à¬¸à­à¬•େପ
+Name[pl]=Inkscape
+Name[pt_BR]=Inkscape
+Name[ro]=Inkscape
+Name[ru]=Inkscape
+Name[sa]=इङà¥à¤•à¥à¤¸à¥à¤•ेपà¥
+Name[sat@deva]=काली ञेनेल
+Name[sat]=ᱠᱟᱞᱤ ᱧᱮᱱᱮᱞ
+Name[sd]=اÙنڪسڪيپ
+Name[sd@deva]=इंकसà¥à¤•ेप
+Name[sk]=Inkscape
+Name[sl]=Inkscape
+Name[sr@latin]=Inkscape
+Name[sr]=Inkscape
+Name[ta]=Inkscape
+Name[te]=ఇంకà±â€Œà°¸à±à°•ేపà±
+Name[tr]=Inkscape
+Name[uk]=Inkscape
+Name[ur]=انك اسكیپ
+Name[vi]=Inkscape
+Name[zh_CN]=Inkscape
+Name[zh_TW]=Inkscape
+Name=Inkscape
+GenericName[ar]=محرر الرسومات الشعاعية
+GenericName[as]=ভেকà§à¦Ÿà§° গà§à§°à¦¾à¦«à¦¿à¦•à§à¦¸ সমà§à¦ªà¦¾à¦¦à¦¨à¦•à§°à§à¦¤à¦¾
+GenericName[be]=РÑдактар вÑктарнай ґрафікі
+GenericName[bn_BD]=ভেকà§à¦Ÿà¦° গà§à¦°à¦¾à¦«à¦¿à¦•à§à¦¸ সমà§à¦ªà¦¾à¦¦à¦•
+GenericName[br]=Embanner kevregadoù sturiadel
+GenericName[brx]=भेकà¥à¤Ÿà¤° गà¥à¤°à¤¾à¤«à¤¿à¤•à¥à¤¸ सà¥à¤œà¥à¤—िरि
+GenericName[ca]=Editor de gràfics vectorials
+GenericName[ca@valencia]=Editor de gràfics vectorials
+GenericName[cs]=editor vektorové grafiky
+GenericName[da]=Vectorgrafik redigering
+GenericName[de]=Vektorgrafikeditor
+GenericName[doi]=वैकà¥à¤Ÿà¤° गà¥à¤°à¤¾à¤«à¤¿à¤•à¥à¤¸ संपादक
+GenericName[el]=ΕπεξεÏγαστής διανυσματικών γÏαφικών
+GenericName[en_GB]=Vector Graphics Editor
+GenericName[en_US@piglatin]=Ectorvay Aphicsgray Editorway
+GenericName[es]=Editor de gráficos vectoriales
+GenericName[eu]=Bektore-grafikoen editorea
+GenericName[fr]=Éditeur d'images vectorielles SVG Inkscape
+GenericName[gl]=Editor de imaxes vectoriais
+GenericName[gu]=વà«àª¹à«‡àª•à«àªŸàª° ગà«àª°àª¾àª«àª¿àª•à«àª¸ સંપાદક
+GenericName[he]=עורך גרפיקה וקטורית
+GenericName[hi]=वेकà¥à¤Ÿà¤° गà¥à¤°à¤¾à¤«à¤¿à¤•à¥à¤¸ संपादक
+GenericName[hu]=Vektorgrafikai szerkesztő
+GenericName[id]=Penyunting Grafik Vektor
+GenericName[is]=Teikniforrit fyrir vigramyndir / línuteikningar
+GenericName[it]=Grafica vettoriale SVG
+GenericName[ja]=ベクターグラフィックエディター
+GenericName[km]=កម្មវិធី​កែ​សម្រួល​ក្រាហ្វិក​វ៉ិចទáŸážš
+GenericName[kn]=ವೆಕà³à²Ÿà²°à³ ಗà³à²°à²¾à²«à²¿à²•à³à²¸à³ ಸಂಪಾದಕ
+GenericName[ko]=벡터 그래픽 편집기
+GenericName[kok]=वà¥à¤¹à¥‡à¤•à¥à¤Ÿà¤° गà¥à¤°à¤¾à¤«à¤¿à¤•à¥à¤¸ संपादक
+GenericName[kok@latin]=vekttor grafiks edittor
+GenericName[ks@aran]=ویکٹر گراÙکس اڈیٹر
+GenericName[ks@deva]=वयकà¥à¤Ÿà¤° गà¥à¤°à¤¾à¤«à¤¼à¤¿à¤•à¥à¤¸ अडीटर
+GenericName[lv]=Vektoru grafikas redaktors
+GenericName[mai]=सदिश आलेखी संपादक
+GenericName[ml]=വെകàµà´Ÿà´°àµâ€ à´—àµà´°à´¾à´«à´¿à´•àµà´¸àµ à´Žà´¡à´¿à´±àµà´±à´°àµâ€
+GenericName[mni]=ꯚꯦꯛꯇꯔ ꯒ꯭ꯔꯥê¯ê¯¤ê¯›ê¯ ê¯ê¯—ꯤꯇꯔ
+GenericName[mni@beng]=ভেকà§à¦¤à¦° গà§à¦°à¦¾à¦«à¦¿à¦•à§à¦¸ ইদিতর
+GenericName[mr]=वà¥à¤¹à¥‡à¤•à¥à¤Ÿà¤° गà¥à¤°à¤¾à¤«à¤¿à¤•à¥à¤¸ संपादक
+GenericName[nl]=Vector tekenpakket
+GenericName[or]=ଭେକà­à¬Ÿà¬° ଗà­à¬°à¬¾à¬«à¬¿à¬•à­à¬¸ ସଂପାଦà­à¬•
+GenericName[pl]=Edytor grafiki wektorowej
+GenericName[pt_BR]=Editor de Imagens Vetoriais
+GenericName[ro]=Editor de grafică vectorială
+GenericName[ru]=Редактор векторной графики
+GenericName[sa]=वेकà¥à¤Ÿà¤°à¥ सà¥à¤šà¤¿à¤¤à¥à¤°à¥€à¤¯à¤¸à¤‚पादकः
+GenericName[sat@deva]=वेकà¥à¤Ÿà¤° गार चिता़र सासापड़ाव
+GenericName[sat]=ᱣᱮᱠᱴᱨ ᱜᱟᱨ ᱪᱤᱛᱟᱹᱨ ᱥᱟᱥᱟᱯᱲᱟᱣ
+GenericName[sd]=ويڪٽر اکري چٽ سمپادڪ
+GenericName[sd@deva]=वेकà¥à¤Ÿà¤° अखिरी चिट संपादकà¥
+GenericName[sk]=editor vektorovej grafiky
+GenericName[sl]=Urejevalnik vektorskih slik
+GenericName[sr@latin]=Program za vektorsko crtanje
+GenericName[sr]=Програм за векторÑко цртање
+GenericName[ta]=வெகà¯à®Ÿà®¾à®°à¯ வரைகலை எடிடà¯à®Ÿà®°à¯
+GenericName[te]=సదిశ రేఖాచితà±à°°à°¾à°² కూరà±à°ªà°°à°¿
+GenericName[tr]=Vektörel Grafik Düzenleyici
+GenericName[uk]=Редактор векторної графіки
+GenericName[ur]=انك اسكیپ ویكٹر گراÙیكس ایڈیٹر
+GenericName[vi]=Trình xử lý ảnh Véc-tơ
+GenericName[zh_CN]=矢é‡å›¾å½¢ç¼–辑器
+GenericName[zh_TW]=å‘é‡ç¹ªåœ–軟體
+GenericName=Vector Graphics Editor
+X-GNOME-FullName[ar]=إنكسكيب محرر الرسومات الشعاعية
+X-GNOME-FullName[as]=ইনসà§à¦•েপ ভেকà§à¦Ÿà§° গà§à§°à¦¾à¦«à¦¿à¦•à§à¦¸ সমà§à¦ªà¦¾à¦¦à¦¨à¦•à§°à§à¦¤à¦¾
+X-GNOME-FullName[be]=РÑдактар вÑктарнай ґрафікі Inkscape
+X-GNOME-FullName[bg]=Inkscape илюÑтратор за векторна графика
+X-GNOME-FullName[bn_BD]=ইনà§à¦•সà§à¦•েপ ভেকà§à¦Ÿà¦° গà§à¦°à¦¾à¦«à¦¿à¦•à§à¦¸ সমà§à¦ªà¦¾à¦¦à¦•
+X-GNOME-FullName[br]=Inkscape Embanner kevregadoù sturiadel
+X-GNOME-FullName[brx]=इङà¥à¤•सà¥à¤•ेप भेकà¥à¤Ÿà¤° गà¥à¤°à¤¾à¤«à¤¿à¤•à¥à¤¸ सà¥à¤œà¥à¤—िरि
+X-GNOME-FullName[ca]=Editor de gràfics vectorials Inkscape
+X-GNOME-FullName[ca@valencia]=Editor de gràfics vectorials Inkscape
+X-GNOME-FullName[cs]=Inkscape - editor vektorové grafiky
+X-GNOME-FullName[da]=Inkscape vektorgrafik redigering
+X-GNOME-FullName[de]=Vektorgrafikeditor Inkscape
+X-GNOME-FullName[doi]=इंकसà¥à¤•ेप वैकà¥à¤Ÿà¤° गà¥à¤°à¤¾à¤«à¤¿à¤•à¥à¤¸ संपादक
+X-GNOME-FullName[el]=ΕπεξεÏγαστής διανυσματικών γÏαφικών Inkscape
+X-GNOME-FullName[en_GB]=Inkscape Vector Graphics Editor
+X-GNOME-FullName[en_US@piglatin]=Inkscape Ectorvay Aphicsgray Editorway
+X-GNOME-FullName[eo]=Inkscape: Ilustrilo por Vektoraj Bildoj
+X-GNOME-FullName[es]=Editor de gráficos vectoriales Inkscape
+X-GNOME-FullName[et]=Inkscape, vektorgraafika redaktor
+X-GNOME-FullName[eu]=Inkscape bektore-grafikoen editorea
+X-GNOME-FullName[fi]=Inkscape vektorigrafiikkatyökalu
+X-GNOME-FullName[fr]=Éditeur d'images vectorielles SVG Inkscape
+X-GNOME-FullName[gl]=Editor de imaxes vectoriais Inkscape
+X-GNOME-FullName[gu]=Inkscape વà«àª¹à«‡àª•à«àªŸàª° ગà«àª°àª¾àª«àª¿àª•à«àª¸ સંપાદક
+X-GNOME-FullName[he]=×ינקסקייפ — עורך גרפיקה וקטורית
+X-GNOME-FullName[hi]=इंकसà¥à¤•ेप वेकà¥à¤Ÿà¤° गà¥à¤°à¤¾à¤«à¤¿à¤•à¥à¤¸ संपादक
+X-GNOME-FullName[hr]=Inkscape - program za vektorsko crtanje
+X-GNOME-FullName[hu]=Inkscape - vektorgrafikai szerkesztő
+X-GNOME-FullName[hy]=Inkscape ÕŽÕ¥Õ¯Õ¿Õ¸Ö€Õ¡ÕµÕ«Õ¶ Ô³Ö€Õ¡Ö†Õ«Õ¯Õ¡ÕµÕ« Ô½Õ´Õ¢Õ¡Õ£Õ«Ö€
+X-GNOME-FullName[id]=Penyunting Grafik Vektor Inkscape
+X-GNOME-FullName[is]=Inkscape teikniforrit fyrir vigramyndir
+X-GNOME-FullName[it]=Inkscape - Grafica vettoriale SVG
+X-GNOME-FullName[ja]=Inkscape ベクターグラフィックエディター
+X-GNOME-FullName[km]=កម្មវិធី​កែ​សម្រួល​ក្រាហ្វិក​វ៉ិចទáŸážšâ€‹ážšáž”ស់​ Inkscape
+X-GNOME-FullName[kn]=ಇಂಕà³â€Œà²¸à³à²•ೇಪೠವೆಕà³à²Ÿà²°à³ ಗà³à²°à²¾à²«à²¿à²•à³à²¸à³ ಸಂಪಾದಕ
+X-GNOME-FullName[ko]=Inkscape 벡터 그래픽 편집기
+X-GNOME-FullName[kok]=इंकसà¥à¤•ेप वà¥à¤¹à¥‡à¤•à¥à¤Ÿà¤° गà¥à¤°à¤¾à¤«à¤¿à¤•à¥à¤¸ संपादक
+X-GNOME-FullName[kok@latin]=Inkscape vekttor grafiks edittor
+X-GNOME-FullName[ks@aran]=اÙنسکیپ ویکٹر گراÙکس اڈیٹر
+X-GNOME-FullName[ks@deva]=इनकसकेप वेकà¥à¤Ÿà¤° गà¥à¤°à¤¾à¤«à¤¼à¤¿à¤•à¥à¤¸ अडीटर
+X-GNOME-FullName[lt]=Inkscape vektorinÄ—s grafikos rengyklÄ—
+X-GNOME-FullName[lv]=Vektoru grafikas redaktors Inkscape
+X-GNOME-FullName[mai]=Inkscape सदिश आलेखी संपादक
+X-GNOME-FullName[ml]=ഇങàµà´•àµà´¸àµà´•െയàµà´ªàµ വെകàµà´Ÿà´°àµâ€ à´—àµà´°à´¾à´«à´¿à´•àµà´¸àµ à´Žà´¡à´¿à´±àµà´±à´°àµâ€
+X-GNOME-FullName[mni]=ê¯ê¯ªê¯›ê¯ê¯­ê¯€ê¯¦ê¯ž ꯚꯦꯛꯇꯔ ꯒ꯭ꯔꯥê¯ê¯¤ê¯›ê¯ ê¯ê¯—ꯤꯇꯔ
+X-GNOME-FullName[mni@beng]=ইঙà§à¦•সà§à¦•েপ ভেকà§à¦¤à¦° গà§à¦°à¦¾à¦«à¦¿à¦•à§à¦¸ ইদিতর
+X-GNOME-FullName[mr]=इंकसà¥à¤•ेप वà¥à¤¹à¥‡à¤•à¥à¤Ÿà¤° गà¥à¤°à¤¾à¤«à¤¿à¤•à¥à¤¸ संपादक
+X-GNOME-FullName[nb]=Inkscape vektor-tegneprogram
+X-GNOME-FullName[nl]=Inkscape vector tekenpakket
+X-GNOME-FullName[or]=ଇଙà­à¬•ସà­à¬•େପ ଭେକà­à¬Ÿà¬° ଗà­à¬°à¬¾à¬«à¬¿à¬•à­à¬¸ ସଂପାଦକ
+X-GNOME-FullName[pl]=Inkscape - edytor grafiki wektorowej
+X-GNOME-FullName[pt_BR]=Editor de Imagens Vetoriais Inkscape
+X-GNOME-FullName[pt]=Inkscape Editor de Imagem Vectorial
+X-GNOME-FullName[ro]=Inkscape – Editor de grafică vectorială
+X-GNOME-FullName[ru]=Редактор векторной графики Inkscape
+X-GNOME-FullName[sa]=इङà¥à¤•à¥à¤¸à¥à¤•ेपॠवेकà¥à¤Ÿà¤°à¥ सà¥à¤šà¤¿à¤¤à¥à¤°à¥€à¤¯à¤¸à¤‚पादकः
+X-GNOME-FullName[sat@deva]=काली ञेनेल वेकà¥à¤Ÿà¤° गार चिता़र सासापड़ाव
+X-GNOME-FullName[sat]=ᱠᱟᱞᱤ ᱧᱮᱱᱮᱞ ᱣᱮᱠᱴᱨ ᱜᱟᱨ ᱪᱤᱛᱟᱹᱨ ᱥᱟᱥᱟᱯᱲᱟᱣ
+X-GNOME-FullName[sd]=اÙنڪسڪيپ ويڪٽر اکري Ú†Ù½
+X-GNOME-FullName[sd@deva]=इंकसà¥à¤•ेप वेकà¥à¤Ÿà¤° अखिरी चिट संपादकà¥
+X-GNOME-FullName[sk]=Inkscape - editor vektorovej grafiky
+X-GNOME-FullName[sl]=Urejevalnik vektorskih slik Inkscape
+X-GNOME-FullName[sr@latin]=Inkscape program za vektorsko crtanje
+X-GNOME-FullName[sr]=Inkscape програм за векторÑко цртање
+X-GNOME-FullName[sv]=Vektorillustratören Inkscape
+X-GNOME-FullName[ta]=Inkscape வெகà¯à®Ÿà®°à¯ வரைகலை எடிடà¯à®Ÿà®°à¯
+X-GNOME-FullName[te]=ఇంకà±â€Œà°¸à±à°•ేపౠసదిశ రేఖాచితà±à°°à°¾à°² కూరà±à°ªà°°à°¿
+X-GNOME-FullName[tr]=Inkscape Vektörel Grafik Düzenleyici
+X-GNOME-FullName[uk]=Редактор векторної графіки Inkscape
+X-GNOME-FullName[ur]=انك اسكیپ ویكٹر گراÙیكس ایڈیٹر
+X-GNOME-FullName[vi]=Inkscape - Trình Xử lý Ảnh Véc-tơ
+X-GNOME-FullName[zh_CN]=Inkscape 矢é‡ç»˜å›¾è½¯ä»¶
+X-GNOME-FullName[zh_TW]=Inkscape å‘é‡ç¹ªåœ–軟體
+X-GNOME-FullName=Inkscape Vector Graphics Editor
+Comment[ar]=إنشاء و تحرير الرسومات الشعاعية
+Comment[as]=জà§à¦–িব পৰা ভেকà§à¦Ÿà§° গà§à§°à¦¾à¦«à¦¿à¦•à§à¦¸ ছবিবোৰ তৈয়াৰ আৰৠসমà§à¦ªà¦¾à¦¦à¦¨à¦¾ কৰক
+Comment[be]=СтварÑньне й зьмÑненьне відарыÑаў вÑктарнай ґрафікі (SVG)
+Comment[bg]=Създаване и Ñ€ÐµÐ´Ð°ÐºÑ†Ð¸Ñ Ð½Ð° Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Scalable Vector Graphics
+Comment[bn]=সà§à¦•েলেবল ভেকà§à¦Ÿà¦° গà§à¦°à¦¾à¦«à¦¿à¦•à§à¦¸ ছবি তৈরী ও সমà§à¦ªà¦¾à¦¦à¦¨à¦¾ করà§à¦¨
+Comment[bn_BD]=সà§à¦•েলেবল ভেকà§à¦Ÿà¦° গà§à¦°à¦¾à¦«à¦¿à¦•à§à¦¸ ছবি তৈরী ও সমà§à¦ªà¦¾à¦¦à¦¨à¦¾ করà§à¦¨
+Comment[br]=Krouiñ hag embann skeudennoù mod SVG (Scalable Vector Graphics)
+Comment[brx]=सà¥à¤œà¤¾à¤¥à¤¾à¤µ भेकà¥à¤Ÿà¤° गà¥à¤°à¤¾à¤«à¤¿à¤•à¥à¤¸ मà¥à¤¸à¥à¤–ाफोर सोरजि आरो सà¥à¤œà¥
+Comment[ca]=Creeu i editeu imatges de gràfics de vectors escalables
+Comment[ca@valencia]=Creeu i editeu imatges de gràfics de vectors escalables
+Comment[cs]=Vytvářejte a upravujte vektorovou grafiku (SVG)
+Comment[da]=Opret og redigér SVG-billeder
+Comment[de]=Skalierbare Vektorgrafiken erstellen und bearbeiten
+Comment[doi]=मापजोग वैकà¥à¤Ÿà¤° गà¥à¤°à¤¾à¤«à¤¿à¤•à¥à¤¸ बिंब बनाओ ते संपादत करो
+Comment[dz]=ཆ་ཚད་འཇལ་བà½à½´à½–་པའི་མཉམ་à½à½²à½‚་ཚད་རིས་ཀྱི་གཟུགས་བརྙན་ཚུ་གསར་བསà¾à¾²à½´à½“་དང་ཞུན་དག་འབདà¼
+Comment[el]=ΔημιουÏγία και Ï„Ïοποποίηση κλιμακώσιμων διανυσματικών εικόνων γÏαφικών
+Comment[en_AU]=Create and edit Scalable Vector Graphics images
+Comment[en_GB]=Create and edit Scalable Vector Graphics images
+Comment[en_US@piglatin]=Eatecray andway editway Alablescay Ectorvay Aphicsgray imagesway
+Comment[eo]=Kreu kaj redaktu bildoj en formato SVG (Scalable Vector Graphics)
+Comment[es]=Cree y edite Gráficos Vectoriales Escalables (SVG)
+Comment[et]=SVG-vektorgraafikas piltide joonistamine ja muutmine
+Comment[eu]=Sortu eta editatu Grafiko Bektorial Eskalakor (SVG) irudiak
+Comment[fi]=Luo ja muokkaa Scalable Vector Graphics -piirroksia
+Comment[fr]=Créer et éditer des images Scalable Vector Graphics
+Comment[gl]=Cree e edite imaxes Scalable Vector Graphics
+Comment[gu]=માપવાયોગà«àª¯ વà«àª¹à«‡àª•à«àªŸàª° ગà«àª°àª¾àª«àª¿àª•à«àª¸ છવિઓ બનાવો અને સંપાદિત કરો
+Comment[he]=יצירה ועריכה של תמונות בגרפיקת ×•×§×˜×•×¨×™× × ×ž×ª×—×ª
+Comment[hi]=मापनीय वेकà¥à¤Ÿà¤° गà¥à¤°à¤¾à¤«à¤¿à¤•à¥à¤¸ छवियां बनाà¤à¤‚ और संपादित करें
+Comment[hr]=Stvaranje i uređivanje vektorskih crteža
+Comment[hu]=Scalable Vector Graphics (méretezhető vektorgrafika, SVG)-képek létrehozása és szerkesztése
+Comment[id]=Membuat dan mengedit gambar Scalable Vector Graphics
+Comment[is]=Vinna með SVG vektorteikningar (Scalable Vector Graphics)
+Comment[it]=Crea e modifica immagini Scalable Vector Graphics
+Comment[ja]=Scalable Vector Graphics (SVG) ç”»åƒã®ä½œæˆã¨ç·¨é›†ã‚’行ã„ã¾ã™
+Comment[km]=បង្កើហនិង​កែសម្រួល​​​រូបភាព​ក្រាហ្វិក​វ៉ិចទáŸážšâ€‹ážŠáŸ‚ល​អាច​ធ្វើ​មាážáŸ’រដ្ឋាន​បាន​​
+Comment[kn]=ಸà³à²•ೇಲೆಬಲೠವೆಕà³à²Ÿà²°à³ ಗà³à²°à²¾à²«à²¿à²•à³à²¸à³ ಚಿತà³à²°à²—ಳನà³à²¨à³ ರಚಿಸಿ ಹಾಗೠಸಂಪಾದಿಸಿ
+Comment[ko]=SVG ì´ë¯¸ì§€ ìƒì„± ë° íŽ¸ì§‘
+Comment[kok]=सà¥à¤•ेलेबल वà¥à¤¹à¥‡à¤•à¥à¤Ÿà¤° गà¥à¤°à¤¾à¤«à¤¿à¤•à¥à¤¸ पà¥à¤°à¤¤à¤¿à¤®à¤¾ तयार आणि संपादित करात
+Comment[kok@latin]=Mapache vekttor grafiks rupnnem roch ani sompadit kor
+Comment[ks@aran]=بناویوتÛÙ• ادارت کٔریو قابلئ پیمائش ویکٹر گراÙکس Ø´Ú©Ù„ÛÙ•
+Comment[ks@deva]=बनावीव तअ. इदारत कॲरीव क़ाबलिअ पेयमाईश वयकà¥à¤Ÿà¤° गà¥à¤°à¤¾à¤«à¤¼à¤¿à¤•à¥à¤¸ शकलअ.
+Comment[lt]=Kurti ir redaguoti vektorinius grafinius piešinius
+Comment[lv]=Izveidojiet un labojiet mÄ“rogojamÄs vektoru grafikas (SVG) attÄ“lus
+Comment[mai]=मापनीय सदिश आलेखी छवि बनाउ आओर संपादित करू
+Comment[ml]=à´¸àµà´•െയിലബിളàµâ€ വെകàµà´±àµà´±à´°àµâ€ à´—àµà´°à´¾à´«à´¿à´•àµà´¸àµ à´šà´¿à´¤àµà´°à´™àµà´™à´³àµ† നിരàµâ€à´®àµà´®à´¿à´•àµà´•àµà´•യൊ à´Žà´¡à´¿à´±àµà´±àµ†à´¾ ചെയàµà´¯àµà´•
+Comment[mni]=ê¯ê¯­ê¯€ê¯¦ê¯‚ꯦꯕꯜ ꯚꯦꯛꯇꯔ ꯒ꯭ꯔꯥê¯ê¯¤ê¯›ê¯ ê¯ê¯ƒê¯¦ê¯–ê¯ê¯¤ê¯¡ ê¯ê¯¦ê¯ê¯’ꯠꯂꯣ ꯑꯃê¯ê¯¨ê¯¡ ê¯ê¯¦ê¯ê¯—ꯣꯛꯎ
+Comment[mni@beng]=সà§à¦•েলেবল ভেকà§à¦¤à¦° গà§à¦°à¦¾à¦«à¦¿à¦•à§à¦¸ ইমেজশিং শেমগৎলো অমসà§à¦‚ শেমদোকউ
+Comment[mr]=सà¥à¤•ेलेबल वà¥à¤¹à¥‡à¤•à¥à¤Ÿà¤° गà¥à¤°à¤¾à¤«à¤¿à¤•à¥à¤¸ पà¥à¤°à¤¤à¤¿à¤®à¤¾ तयार आणि संपादित करा
+Comment[nb]=Lag og rediger Skalerbar VektorGrafikk-bilder
+Comment[ne]=सà¥à¤•ेलेबà¥à¤² भेकà¥à¤Ÿà¤° गà¥à¤°à¤¾à¤«à¤¿à¤•à¥à¤¸ छविहरू सिरà¥à¤œà¤¨à¤¾ गरà¥à¤¨à¥à¤¹à¥‹à¤¸à¥ र समà¥à¤ªà¤¾à¤¦à¤¨ गरà¥à¤¨à¥à¤¹à¥‹à¤¸à¥
+Comment[nl]=Scalable Vector Graphics-afbeeldingen maken en bewerken
+Comment[nn]=Lag og rediger skalerbare vektorbilete (SVG)
+Comment[or]=ସà­à¬•େଲେବଲ େଭକà­à¬Ÿà¬° ଗà­à¬°à¬¾à¬«à¬¿à¬•à­à¬¸ ଚିତà­à¬°à¬¸à¬¬à­ ସୃଷà­à¬Ÿà¬¿ à¬à¬¬à¬‚ ସଂପାଦନା କରନà­à­à¬¤à­
+Comment[pa]=ਸਕੇਲੇਬਲ ਵੈਕਟਰ ਗਰਾਫਿਕਸ ਚਿੱਤਰ ਬਣਾਓ ਅਤੇ ਸੋਧੋ
+Comment[pl]=Tworzenie i edycja grafiki wektorowej SVG
+Comment[pt_BR]=Crie e edite desenhos vetoriais escaláveis (SVG)
+Comment[pt]=Crie e edite imagens Gráficas Vectoriais Escalaveis
+Comment[ro]=Creează și editează imagini în format Scalable Vector Graphics
+Comment[ru]=Создание и редактирование маÑштабируемой векторной графики в формате SVG
+Comment[sa]=मापà¥à¤¯-वेकà¥à¤Ÿà¤°à¥-सà¥à¤šà¤¿à¤¤à¥à¤°à¥€à¤¯-चितà¥à¤°à¤¾à¤£à¤¿ उतà¥à¤ªà¤¾à¤¦à¥à¤¯ समà¥à¤ªà¤¾à¤¦à¤¯
+Comment[sat@deva]=नाप दाड़ेयाकॠवेकà¥à¤Ÿà¤° गार चिता़र आहला तेयार मे आर सासापड़ाव मे
+Comment[sat]=ᱱᱟᱯ ᱫᱟᱲᱮᱭᱟᱜ ᱣᱮᱠᱴᱨ ᱜᱟᱨ ᱪᱤᱛᱟᱹᱨ ᱟᱦᱞᱟ ᱛᱮᱭᱟᱨ ᱢᱮ ᱟᱨ ᱥᱟᱥᱟᱯᱲᱟᱣ ᱢᱮ
+Comment[sd]=ماپڻ جوڳا ويڪٽر اکري چٽ ۽ عڪس خلقيو ۽ سمپادت ڪريو
+Comment[sd@deva]=मापण जोॻो वेकà¥à¤Ÿà¤° अखिरी चिट à¤à¤‚ अकà¥à¤¸ खलिकियो à¤à¤‚ संपादित करियो.
+Comment[sk]=Tvorba a úprava obrázkov Scalable Vector Graphics
+Comment[sl]=Ustvarjajte in urejajte vektorske slike SVG
+Comment[sr@latin]=Pravljenje i uređivanje SVG vektorskih slika
+Comment[sr]=Прављење и уређивање SVG векторÑких Ñлика
+Comment[sv]=Skapa och redigera SVG-bilder
+Comment[ta]=அளவிடகà¯à®•ூடிய வெகà¯à®Ÿà®¾à®°à¯ வரைகலைகளின௠படஙà¯à®•ளை உரà¯à®µà®¾à®•à¯à®•ி திரà¯à®¤à¯à®¤à®µà¯à®®à¯
+Comment[te]=సదిశ రేఖాచితà±à°°à°¾à°²à°¨à°¿ సృషà±à°Ÿà°¿à°‚à°šà°‚à°¡à°¿ మరియౠదిదà±à°¦à±à°¬à°¾à°Ÿà± చేయండి
+Comment[th]=สร้างà¹à¸¥à¸°à¹à¸à¹‰à¹„ขภาพ Scalable Vector Graphics
+Comment[tr]=Ölçeklenebilir Vektör İmgeleri oluşturur ve düzenler
+Comment[uk]=Ð¡Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ñ‚Ð° Ñ€ÐµÐ´Ð°Ð³ÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½ÑŒ у форматі SVG
+Comment[ur]=اسكیلیبل ویكٹر گراÙیكس امیجس تخلیق اور مرتب كریں
+Comment[vi]=Tạo và sửa ảnh véc-tơ co giãn được
+Comment[zh_CN]=创建ã€ç¼–辑å¯ç¼©æ”¾çŸ¢é‡å›¾å½¢å›¾åƒ
+Comment[zh_TW]=建立和編輯å¯ç¸®æ”¾å‘é‡ç¹ªåœ–圖形
+Comment=Create and edit Scalable Vector Graphics images
+Keywords[de]=image;editor;vector;drawing;
+Keywords[en_GB]=image;editor;vector;drawing;
+Keywords[fr]=image;éditeur;vectoriel;dessin;
+Keywords[is]=mynd;ritill;vigur;vektor;línur;teikning;
+Keywords[it]=immagine;editor;vettoriale;disegno;
+Keywords[lv]=attēls;redaktors;vektors;zīmējums;
+Keywords[nl]=image;editor;vector;drawing;
+Keywords[uk]=image;editor;vector;drawing;зображеннÑ;редактор;векторне;вектор;малюваннÑ;
+Keywords[zh_CN]=image;editor;vector;drawing;矢é‡;图åƒ;编辑;编辑器;å‘é‡;绘图;
+Keywords=image;editor;vector;drawing;
+Type=Application
+Categories=Graphics;VectorGraphics;GTK;
+MimeType=image/svg+xml;image/svg+xml-compressed;application/vnd.corel-draw;application/pdf;application/postscript;image/x-eps;application/illustrator;image/cgm;image/x-wmf;application/x-xccx;application/x-xcgm;application/x-xcdt;application/x-xsk1;application/x-xcmx;image/x-xcdr;application/visio;application/x-visio;application/vnd.visio;application/visio.drawing;application/vsd;application/x-vsd;image/x-vsd;
+Exec=inkscape %F
+TryExec=inkscape
+Terminal=false
+StartupNotify=true
+Icon=inkscape
diff --git a/setup/gui/inkscape.svg b/setup/gui/inkscape.svg
new file mode 120000
index 000000000..494db289d
--- /dev/null
+++ b/setup/gui/inkscape.svg
@@ -0,0 +1 @@
+../../share/branding/inkscape.svg \ No newline at end of file
diff --git a/share/Makefile.am b/share/Makefile.am
deleted file mode 100644
index fa778b031..000000000
--- a/share/Makefile.am
+++ /dev/null
@@ -1,25 +0,0 @@
-SUBDIRS = attributes \
- branding \
- examples \
- extensions \
- filters \
- fonts \
- gradients \
- icons \
- keys \
- markers \
- palettes \
- patterns \
- screens \
- symbols \
- templates \
- tutorials \
- ui
-
-## COPY THE REST OF THE FOLDERS TO THE PROPER LOCATION
-
-## dist-hook:
-## mkdir $(distdir)/samples
-## cp $(datadir)/samples/*svg $(distdir)/samples
-## cp $(datadir)/samples/*png $(distdir)/samples
-
diff --git a/share/attributes/Makefile.am b/share/attributes/Makefile.am
deleted file mode 100644
index 9834c5b14..000000000
--- a/share/attributes/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-
-attributesdir = $(datadir)/inkscape/attributes
-
-attributes_DATA = \
- svgprops \
- cssprops \
- css_defaults \
- README
-
-EXTRA_DIST = $(attributes_DATA)
diff --git a/share/branding/Makefile.am b/share/branding/Makefile.am
deleted file mode 100644
index 1561dbf2c..000000000
--- a/share/branding/Makefile.am
+++ /dev/null
@@ -1,18 +0,0 @@
-
-brandingdir = $(datadir)/inkscape/branding
-iconsdir = $(datadir)/inkscape/icons
-
-branding_DATA = \
- README \
- inkscape.svg \
- inkscape-flat.svg \
- inkscape-text.svg \
- sodipodi.svg \
- LinLibertine_DR.otf \
- EuphoriaScript-Regular.otf \
- tux.svg
-
-icons_DATA = \
- inkscape.svg
-
-EXTRA_DIST = $(branding_DATA) $(icons_DATA)
diff --git a/share/examples/Makefile.am b/share/examples/Makefile.am
deleted file mode 100644
index a89246048..000000000
--- a/share/examples/Makefile.am
+++ /dev/null
@@ -1,37 +0,0 @@
-
-exampledir = $(datadir)/inkscape/examples
-
-example_DATA = \
- README \
- istest.pov \
- gradient.svg \
- tiger.svgz \
- markers.svg \
- i18n.svg \
- stars.svgz \
- text-on-path.svg \
- flowsample.svg \
- data_uri.svg \
- tesselation-P3.svg \
- art-nouveau-P3.svg \
- eastern-motive-P4G.svg \
- l-systems.svgz \
- glass.svg \
- car.svgz \
- gallardo.svgz \
- gradient-mesh-experimental.svgz \
- rope-3D.svg \
- animated-clock.svg \
- blend_modes.svg \
- flow-go.svg \
- lighting_filters.svg \
- turbulence_filters.svg \
- live-path-effects-curvestitch.svg \
- live-path-effects-gears.svg \
- live-path-effects-pathalongpath.svg \
- filters.svg \
- svgfont.svg \
- tref.svg \
- replace-hue.svg
-
-EXTRA_DIST = $(example_DATA)
diff --git a/share/extensions/Barcode/Makefile.am b/share/extensions/Barcode/Makefile.am
deleted file mode 100644
index 08e2f58b4..000000000
--- a/share/extensions/Barcode/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-
-barcodedir = $(datadir)/inkscape/extensions/Barcode
-
-barcode_DATA = \
- Base.py \
- BaseEan.py \
- Code128.py \
- Code39Ext.py \
- Code39.py \
- Code25i.py \
- Code93.py \
- Ean13.py \
- Ean8.py \
- Ean5.py \
- Ean2.py \
- __init__.py \
- Rm4scc.py \
- Upca.py \
- Upce.py
-
-EXTRA_DIST = \
- $(barcode_DATA)
-
diff --git a/share/extensions/Makefile.am b/share/extensions/Makefile.am
deleted file mode 100644
index f247cd8bb..000000000
--- a/share/extensions/Makefile.am
+++ /dev/null
@@ -1,42 +0,0 @@
-
-SUBDIRS = \
- alphabet_soup \
- Barcode \
- ink2canvas \
- Poly3DObjects \
- test \
- xaml2svg
-
-extensiondir = $(datadir)/inkscape/extensions
-
-otherstuffdir = $(datadir)/inkscape/extensions
-
-moduledir = $(datadir)/inkscape/extensions
-
-extension_SCRIPTS = \
- $(wildcard $(srcdir)/*.py) \
- $(wildcard $(srcdir)/*.pl) \
- $(wildcard $(srcdir)/*.sh) \
- $(wildcard $(srcdir)/*.rb)
-
-otherstuff_DATA = \
- fontfix.conf \
- inkweb.js \
- jessyInk.js \
- jessyInk_core_mouseHandler_noclick.js \
- jessyInk_core_mouseHandler_zoomControl.js \
- aisvg.xslt \
- colors.xml \
- jessyInk_video.svg \
- seamless_pattern.svg \
- svg2fxg.xsl \
- svg2xaml.xsl \
- xaml2svg.xsl \
- inkscape.extension.rng
-
-module_DATA = $(wildcard $(srcdir)/*.inx)
-
-EXTRA_DIST = \
- $(extension_SCRIPTS) $(otherstuff_DATA) $(module_DATA)
-
-
diff --git a/share/extensions/Poly3DObjects/Makefile.am b/share/extensions/Poly3DObjects/Makefile.am
deleted file mode 100644
index 82a81af42..000000000
--- a/share/extensions/Poly3DObjects/Makefile.am
+++ /dev/null
@@ -1,33 +0,0 @@
-
-Poly3DObjectsdir = $(datadir)/inkscape/extensions/Poly3DObjects
-
-Poly3DObjects_DATA = \
- cube.obj \
- cuboct.obj \
- dodec.obj \
- great_dodec.obj \
- great_rhombicosidodec.obj \
- great_rhombicuboct.obj \
- great_stel_dodec.obj \
- icos.obj \
- icosidodec.obj \
- jessens_orthog_icos.obj \
- methane.obj \
- oct.obj \
- rhomb_dodec.obj \
- rhomb_triacont.obj \
- rh_axes.obj \
- small_rhombicosidodec.obj \
- small_rhombicuboct.obj \
- small_triam_icos.obj \
- snub_cube.obj \
- snub_dodec.obj \
- szilassi.obj \
- tet.obj \
- trunc_cube.obj \
- trunc_dodec.obj \
- trunc_icos.obj \
- trunc_oct.obj \
- trunc_tet.obj
-
-EXTRA_DIST = $(Poly3DObjects_DATA)
diff --git a/share/extensions/alphabet_soup/Makefile.am b/share/extensions/alphabet_soup/Makefile.am
deleted file mode 100644
index 004da4e8c..000000000
--- a/share/extensions/alphabet_soup/Makefile.am
+++ /dev/null
@@ -1,78 +0,0 @@
-
-alphabet_soupdir = $(datadir)/inkscape/extensions/alphabet_soup
-
-alphabet_soup_DATA = \
- 2.svg \
- 3.svg \
- 6.svg \
- 7.svg \
- abase.svg \
- a.svg \
- acap.svg \
- bar2.svg \
- barcap.svg \
- bar.svg \
- b.svg \
- Cblob.svg \
- Chook.svg \
- cross.svg \
- cserif.svg \
- c.svg \
- Ctail.svg \
- Delta.svg \
- Eb.svg \
- epsilon.svg \
- Eserif.svg \
- e.svg \
- Et.svg \
- f.svg \
- gamma.svg \
- G.svg \
- h2.svg \
- hcap.svg \
- h.svg \
- IBSerif.svg \
- idot.svg \
- ITSerif.svg \
- j.svg \
- k.svg \
- Lb.svg \
- lserif.svg \
- l.svg \
- Lt.svg \
- mcap.svg \
- m.svg \
- n.svg \
- ocap.svg \
- Ocross.svg \
- o.svg \
- Oterm.svg \
- P.svg \
- Q.svg \
- question.svg \
- Rblock.svg \
- rcap.svg \
- r.svg \
- serif.svg \
- s.svg \
- Tb.svg \
- tserif.svg \
- t.svg \
- Tt.svg \
- U.svg \
- vcap.svg \
- vserl.svg \
- vserr.svg \
- Vser.svg \
- v.svg \
- Xh.svg \
- Xne.svg \
- Xnw.svg \
- x.svg \
- Xvb.svg \
- Xvt.svg \
- yogh.svg \
- y.svg \
- z.svg
-
-EXTRA_DIST = $(alphabet_soup_DATA)
diff --git a/share/extensions/ink2canvas/Makefile.am b/share/extensions/ink2canvas/Makefile.am
deleted file mode 100644
index ab6e7661d..000000000
--- a/share/extensions/ink2canvas/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-
-ink2canvasdir = $(datadir)/inkscape/extensions/ink2canvas
-
-ink2canvas_DATA = \
- __init__.py \
- canvas.py \
- svg.py
-
-EXTRA_DIST = $(ink2canvas_DATA)
diff --git a/share/extensions/restack.inx b/share/extensions/restack.inx
index e14d2d5d5..4f5f577cb 100644
--- a/share/extensions/restack.inx
+++ b/share/extensions/restack.inx
@@ -9,7 +9,7 @@
<_param name="desc_dir" type="description" appearance="header">Restack Direction</_param>
<param name="nb_direction" type="notebook">
<page name="presets" _gui-text="Presets">
- <param name="direction" type="enum" gui-text="">
+ <param name="direction" type="enum" _gui-text="">
<_item value="lr">Left to Right (0)</_item>
<_item value="bt">Bottom to Top (90)</_item>
<_item value="rl">Right to Left (180)</_item>
@@ -36,7 +36,7 @@
</page>
<page name="z_order" _gui-text="Based on Z-Order">
<_param name="desc_zsort" type="description" appearance="header">Restack Mode</_param>
- <param name="zsort" type="enum" gui-text="">
+ <param name="zsort" type="enum" _gui-text="">
<_item value="rev">Reverse Z-Order</_item>
<_item value="rand">Shuffle Z-Order</_item>
</param>
diff --git a/share/extensions/test/Makefile.am b/share/extensions/test/Makefile.am
deleted file mode 100644
index cd1929a7f..000000000
--- a/share/extensions/test/Makefile.am
+++ /dev/null
@@ -1,60 +0,0 @@
-
-# List of all tests to be run.
-#TESTS = svgcalendar.test.py
-# that is not working :-/
-
-EXTRA_DIST = \
- addnodes.test.py \
- chardataeffect.test.py \
- color_randomize_test.py \
- coloreffect.test.py \
- create_test_from_template.sh \
- dots.test.py \
- draw_from_triangle.test.py \
- dxf_outlines.test.py \
- edge3d.test.py \
- embedimage.test.py \
- eqtexsvg.test.py \
- extractimage.test.py \
- extrude.test.py \
- flatten.test.py \
- foldablebox.test.py \
- fractalize.test.py \
- funcplot.test.py \
- gimp_xcf.test.py \
- grid_cartesian.test.py \
- grid_polar.test.py \
- guides_creator.test.py \
- handles.test.py \
- hpgl_output.test.py \
- inkweb-debug.js \
- inkwebeffect.test.py \
- inkwebjs-move.test.svg \
- interp_att_g.test.py \
- interp.test.py \
- lindenmayer.test.py \
- lorem_ipsum.test.py \
- markers_strokepaint.test.py \
- measure.test.py \
- minimal-blank.svg \
- motion.test.py \
- pathmodifier.test.py \
- perfectboundcover.test.py \
- perspective.test.py \
- polyhedron_3d.test.py \
- radiusrand.test.py \
- render_alphabetsoup.test.py \
- render_barcode.test.py \
- render_barcode.data \
- render_gears.test.py \
- restack.test.py \
- rtree.test.py \
- run-all-extension-tests \
- spirograph.test.py \
- straightseg.test.py \
- summersnight.test.py \
- svg_and_media_zip_output.test.py \
- svgcalendar.test.py \
- test_template.py.txt \
- triangle.test.py \
- whirl.test.py
diff --git a/share/extensions/xaml2svg/Makefile.am b/share/extensions/xaml2svg/Makefile.am
deleted file mode 100644
index 89a901fde..000000000
--- a/share/extensions/xaml2svg/Makefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
-
-xaml2svg_otherstuffdir = $(datadir)/inkscape/extensions/xaml2svg
-
-xaml2svg_otherstuff = \
- animation.xsl \
- brushes.xsl \
- canvas.xsl \
- geometry.xsl \
- Makefile.am \
- properties.xsl \
- shapes.xsl \
- transform.xsl
-
-xaml2svg_otherstuff_DATA = \
- $(xaml2svg_otherstuff)
-
-EXTRA_DIST = \
- $(xaml2svg_otherstuff_DATA)
-
diff --git a/share/filters/Makefile.am b/share/filters/Makefile.am
deleted file mode 100644
index 1a871a992..000000000
--- a/share/filters/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-
-filtersdir = $(datadir)/inkscape/filters
-
-filters_DATA = \
- README \
- filters.svg \
- filters.svg.h
-
-filters.svg.h: filters.svg i18n.py
- $(srcdir)/i18n.py $(srcdir)/filters.svg > $(srcdir)/filters.svg.h
-
-EXTRA_DIST = $(filters_DATA) \
- i18n.py
diff --git a/share/fonts/Makefile.am b/share/fonts/Makefile.am
deleted file mode 100644
index 30a2f6997..000000000
--- a/share/fonts/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-
-fontsdir = $(datadir)/inkscape/fonts
-
-fonts_DATA = \
- README
-
-EXTRA_DIST = $(fonts_DATA)
diff --git a/share/gradients/Makefile.am b/share/gradients/Makefile.am
deleted file mode 100644
index 9eadc5e57..000000000
--- a/share/gradients/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-
-gradientsdir = $(datadir)/inkscape/gradients
-
-gradients_DATA = \
- README
-
-EXTRA_DIST = $(gradients_DATA)
diff --git a/share/icons/Makefile.am b/share/icons/Makefile.am
deleted file mode 100644
index 5830f1254..000000000
--- a/share/icons/Makefile.am
+++ /dev/null
@@ -1,58 +0,0 @@
-SUBDIRS = application
-
-iconsdir = $(datadir)/inkscape/icons
-
-pixmaps = \
- too-much-ink-icon.png \
- too-much-ink-icon.svg \
- out-of-gamut-icon.png \
- out-of-gamut-icon.svg \
- color-management-icon.png \
- remove-color.png \
- remove-color.svg \
- ticotico.jpg \
- feBlend-icon.png \
- feBlend-icon.svg \
- feColorMatrix-icon.png \
- feColorMatrix-icon.svg \
- feComposite-icon.png \
- feComposite-icon.svg \
- feConvolveMatrix-icon.png \
- feConvolveMatrix-icon.svg \
- feDiffuseLighting-icon.png \
- feDiffuseLighting-icon.svg \
- feDisplacementMap-icon.png \
- feDisplacementMap-icon.svg \
- feFlood-icon.png \
- feFlood-icon.svg \
- feGaussianBlur-icon.png \
- feGaussianBlur-icon.svg \
- feImage-icon.png \
- feImage-icon.svg \
- feMerge-icon.png \
- feMerge-icon.svg \
- feMorphology-icon.png \
- feMorphology-icon.svg \
- feOffset-icon.png \
- feOffset-icon.svg \
- feSpecularLighting-icon.png \
- feSpecularLighting-icon.svg \
- feTurbulence-icon.png \
- feTurbulence-icon.svg \
- OCAL.png
-
-icons_DATA = \
- $(pixmaps) \
- \
- icons.svg \
- tango_icons.svg \
- symbolic_icons.svg \
- \
- inkscape.file.svg \
- inkscape.file.png \
- README
-
-EXTRA_DIST = \
- $(icons_DATA) \
- hicolor/index.theme
-
diff --git a/share/icons/application/16x16/Makefile.am b/share/icons/application/16x16/Makefile.am
deleted file mode 100644
index a87c2cbfa..000000000
--- a/share/icons/application/16x16/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-icondir = $(datadir)/icons/hicolor/16x16/apps
-icon_DATA = inkscape.png
-
-EXTRA_DIST = $(icon_DATA)
-
diff --git a/share/icons/application/22x22/Makefile.am b/share/icons/application/22x22/Makefile.am
deleted file mode 100644
index 8beeed331..000000000
--- a/share/icons/application/22x22/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-icondir = $(datadir)/icons/hicolor/22x22/apps
-icon_DATA = inkscape.png
-
-EXTRA_DIST = $(icon_DATA)
-
diff --git a/share/icons/application/24x24/Makefile.am b/share/icons/application/24x24/Makefile.am
deleted file mode 100644
index 8fc9b59aa..000000000
--- a/share/icons/application/24x24/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-icondir = $(datadir)/icons/hicolor/24x24/apps
-icon_DATA = inkscape.png
-
-EXTRA_DIST = $(icon_DATA)
-
diff --git a/share/icons/application/256x256/Makefile.am b/share/icons/application/256x256/Makefile.am
deleted file mode 100644
index 34969a4a9..000000000
--- a/share/icons/application/256x256/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-icondir = $(datadir)/icons/hicolor/256x256/apps
-icon_DATA = inkscape.png
-
-EXTRA_DIST = $(icon_DATA)
-
diff --git a/share/icons/application/32x32/Makefile.am b/share/icons/application/32x32/Makefile.am
deleted file mode 100644
index cdccebd02..000000000
--- a/share/icons/application/32x32/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-icondir = $(datadir)/icons/hicolor/32x32/apps
-icon_DATA = inkscape.png
-
-EXTRA_DIST = $(icon_DATA)
-
diff --git a/share/icons/application/48x48/Makefile.am b/share/icons/application/48x48/Makefile.am
deleted file mode 100644
index ffa5c1a55..000000000
--- a/share/icons/application/48x48/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-icondir = $(datadir)/icons/hicolor/48x48/apps
-icon_DATA = inkscape.png
-
-EXTRA_DIST = $(icon_DATA)
-
diff --git a/share/icons/application/Makefile.am b/share/icons/application/Makefile.am
deleted file mode 100644
index 0e9bb7d7d..000000000
--- a/share/icons/application/Makefile.am
+++ /dev/null
@@ -1,15 +0,0 @@
-SUBDIRS = 16x16 22x22 24x24 32x32 48x48 256x256
-
-gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
-
-install-data-hook: update-icon-cache
-uninstall-hook: update-icon-cache
-
-update-icon-cache:
- @-if test -z "$(DESTDIR)"; then \
- echo "Updating Gtk icon cache."; \
- $(gtk_update_icon_cache); \
- else \
- echo "*** Icon cache not updated. After (un)install, run this:"; \
- echo "*** $(gtk_update_icon_cache)"; \
- fi
diff --git a/share/keys/Makefile.am b/share/keys/Makefile.am
deleted file mode 100644
index 98b720c2b..000000000
--- a/share/keys/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-
-keysdir = $(datadir)/inkscape/keys
-
-keys_DATA = \
- default.xml \
- inkscape.xml \
- xara.xml \
- macromedia-freehand-mx.xml \
- adobe-illustrator-cs2.xml \
- right-handed-illustration.xml \
- corel-draw-x4.xml \
- corel-draw-x8.xml \
- zoner-draw.xml \
- acd-canvas.xml
-
-EXTRA_DIST = $(keys_DATA)
-
diff --git a/share/markers/Makefile.am b/share/markers/Makefile.am
deleted file mode 100644
index 5db048146..000000000
--- a/share/markers/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-
-markersdir = $(datadir)/inkscape/markers
-
-markers_DATA = \
- markers.svg
-
-
-EXTRA_DIST = $(markers_DATA)
-
diff --git a/share/palettes/Makefile.am b/share/palettes/Makefile.am
deleted file mode 100644
index b25b35a06..000000000
--- a/share/palettes/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-
-palettesdir = $(datadir)/inkscape/palettes
-
-palettes_DATA = \
- README \
- Android-icon-palette.gpl \
- Blues.gpl \
- echo-palette.gpl \
- Gold.gpl \
- Greens.gpl \
- Gray.gpl \
- Hilite.gpl \
- inkscape.gpl \
- LaTeX-Beamer.gpl \
- Khaki.gpl \
- MATLAB-Jet-72.gpl \
- Reds.gpl \
- Royal.gpl \
- svg.gpl \
- Tango-Palette.gpl \
- Topographic.gpl \
- Ubuntu.gpl \
- webhex.gpl \
- websafe22.gpl \
- windowsXP.gpl \
- palettes.h
-
-palettes_i18n = \
- inkscape.gpl \
- svg.gpl \
- Tango-Palette.gpl
-
-palettes.h: i18n.py $(palettes_i18n)
- $(srcdir)/i18n.py $(foreach i,$(palettes_i18n),$(srcdir)/$(i)) > $(srcdir)/palettes.h
-
-EXTRA_DIST = $(palettes_DATA) \
- i18n.py
-
diff --git a/share/patterns/Makefile.am b/share/patterns/Makefile.am
deleted file mode 100644
index 8a0f02ba8..000000000
--- a/share/patterns/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-
-patternsdir = $(datadir)/inkscape/patterns
-
-patterns_DATA = \
- README \
- patterns.svg \
- patterns.svg.h
-
-patterns.svg.h: patterns.svg i18n.py
- $(srcdir)/i18n.py $(srcdir)/patterns.svg > $(srcdir)/patterns.svg.h
-
-EXTRA_DIST = $(patterns_DATA) i18n.py
diff --git a/share/screens/Makefile.am b/share/screens/Makefile.am
deleted file mode 100644
index f18982221..000000000
--- a/share/screens/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-
-screensdir = $(datadir)/inkscape/screens
-
-screens_DATA = \
- about.svg
-
-EXTRA_DIST = $(screens_DATA)
-
diff --git a/share/symbols/Makefile.am b/share/symbols/Makefile.am
deleted file mode 100644
index a7d21d2a8..000000000
--- a/share/symbols/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-
-symbolsdir = $(datadir)/inkscape/symbols
-
-# Adding srcdir allows out-of-src builds to work
-symbols_DATA = \
- README \
- $(wildcard $(srcdir)/*.svg) \
- symbols.h
-
-symbols_i18n = $(wildcard $(srcdir)/*.svg)
-
-symbols.h: i18n.py $(symbols_i18n)
- $(srcdir)/i18n.py $(symbols_i18n) > $(srcdir)/symbols.h
-
-EXTRA_DIST = $(symbols_DATA) \
- i18n.py
-
diff --git a/share/templates/Makefile.am b/share/templates/Makefile.am
deleted file mode 100644
index 9bd6a0ddc..000000000
--- a/share/templates/Makefile.am
+++ /dev/null
@@ -1,67 +0,0 @@
-
-templatesdir = $(datadir)/inkscape/templates
-
-templates_DATA = \
- README \
- CD_label_120x120.svg \
- default.svg \
- default.be.svg \
- default.ca.svg \
- default.cs.svg \
- default.de.svg \
- default.en_US.svg \
- default.eo.svg \
- default.eu.svg \
- default.es.svg \
- default.fi.svg \
- default.fr.svg \
- default.hu.svg \
- default.is.svg \
- default.it.svg \
- default.ja.svg \
- default.lt.svg \
- default.nl.svg \
- default.pl.svg \
- default.pt_BR.svg \
- default.sk.svg \
- default_pt.svg \
- default_px.svg \
- no_layers.svg \
- LaTeX_Beamer.svg \
- Typography_Canvas.svg \
- templates.h
-
-templates_i18n = \
- CD_label_120x120.svg \
- default.svg \
- default.be.svg \
- default.ca.svg \
- default.cs.svg \
- default.de.svg \
- default.en_US.svg \
- default.eo.svg \
- default.eu.svg \
- default.es.svg \
- default.fi.svg \
- default.fr.svg \
- default.hu.svg \
- default.is.svg \
- default.it.svg \
- default.ja.svg \
- default.lt.svg \
- default.nl.svg \
- default.pl.svg \
- default.pt_BR.svg \
- default.sk.svg \
- default_pt.svg \
- default_px.svg \
- no_layers.svg \
- LaTeX_Beamer.svg \
- Typography_Canvas.svg
-
-templates.h: i18n.py $(templates_i18n)
- $(srcdir)/i18n.py $(foreach i,$(templates_i18n),$(srcdir)/$(i)) > $(srcdir)/templates.h
-
-EXTRA_DIST = $(templates_DATA) \
- i18n.py
-
diff --git a/share/tutorials/Makefile.am b/share/tutorials/Makefile.am
deleted file mode 100644
index d625826cb..000000000
--- a/share/tutorials/Makefile.am
+++ /dev/null
@@ -1,214 +0,0 @@
-
-tutorialdir = $(datadir)/inkscape/tutorials
-
-tutorial_DATA = \
- README \
- edge3d.svg \
- gpl-2.svg \
- making_markers.svg \
- oldguitar.jpg \
- potrace-be.png \
- potrace-ca.png \
- potrace-de.png \
- potrace-el.png \
- potrace-en.png \
- potrace-es.png \
- potrace-eu.png \
- potrace-fr.png \
- potrace-gl.png \
- potrace-hu.png \
- potrace-id.png \
- potrace-ja.png \
- potrace-nl.png \
- potrace.png \
- potrace-pl.png \
- potrace-pt_BR.png \
- potrace-ru.png \
- potrace-sk.png \
- potrace-sl.png \
- potrace-vi.png \
- potrace-zh_CN.png \
- potrace-zh_TW.png \
- tutorial-advanced.svg \
- tutorial-advanced.be.svg \
- tutorial-advanced.ca.svg \
- tutorial-advanced.cs.svg \
- tutorial-advanced.de.svg \
- tutorial-advanced.el.svg \
- tutorial-advanced.es.svg \
- tutorial-advanced.eu.svg \
- tutorial-advanced.fa.svg \
- tutorial-advanced.fr.svg \
- tutorial-advanced.hu.svg \
- tutorial-advanced.id.svg \
- tutorial-advanced.it.svg \
- tutorial-advanced.ja.svg \
- tutorial-advanced.nl.svg \
- tutorial-advanced.pl.svg \
- tutorial-advanced.pt_BR.svg \
- tutorial-advanced.ru.svg \
- tutorial-advanced.sk.svg \
- tutorial-advanced.sl.svg \
- tutorial-advanced.vi.svg \
- tutorial-advanced.zh_CN.svg \
- tutorial-advanced.zh_TW.svg \
- tutorial-basic.svg \
- tutorial-basic.be.svg \
- tutorial-basic.bg.svg \
- tutorial-basic.ca.svg \
- tutorial-basic.cs.svg \
- tutorial-basic.da.svg \
- tutorial-basic.de.svg \
- tutorial-basic.el.svg \
- tutorial-basic.eo.svg \
- tutorial-basic.es.svg \
- tutorial-basic.eu.svg \
- tutorial-basic.fa.svg \
- tutorial-basic.fr.svg \
- tutorial-basic.gl.svg \
- tutorial-basic.hu.svg \
- tutorial-basic.id.svg \
- tutorial-basic.it.svg \
- tutorial-basic.ja.svg \
- tutorial-basic.nl.svg \
- tutorial-basic.nn.svg \
- tutorial-basic.pl.svg \
- tutorial-basic.pt_BR.svg \
- tutorial-basic.ru.svg \
- tutorial-basic.sk.svg \
- tutorial-basic.sl.svg \
- tutorial-basic.tr.svg \
- tutorial-basic.vi.svg \
- tutorial-basic.zh_CN.svg \
- tutorial-basic.zh_TW.svg \
- tutorial-calligraphy.svg \
- tutorial-calligraphy.be.svg \
- tutorial-calligraphy.ca.svg \
- tutorial-calligraphy.cs.svg \
- tutorial-calligraphy.de.svg \
- tutorial-calligraphy.el.svg \
- tutorial-calligraphy.es.svg \
- tutorial-calligraphy.eu.svg \
- tutorial-calligraphy.fa.svg \
- tutorial-calligraphy.fr.svg \
- tutorial-calligraphy.hu.svg \
- tutorial-calligraphy.id.svg \
- tutorial-calligraphy.ja.svg \
- tutorial-calligraphy.nl.svg \
- tutorial-calligraphy.pl.svg \
- tutorial-calligraphy.pt_BR.svg \
- tutorial-calligraphy.ru.svg \
- tutorial-calligraphy.sk.svg \
- tutorial-calligraphy.sl.svg \
- tutorial-calligraphy.vi.svg \
- tutorial-calligraphy.zh_TW.svg \
- tutorial-elements.svg \
- tutorial-elements.be.svg \
- tutorial-elements.ca.svg \
- tutorial-elements.de.svg \
- tutorial-elements.el.svg \
- tutorial-elements.es.svg \
- tutorial-elements.eu.svg \
- tutorial-elements.fa.svg \
- tutorial-elements.fr.svg \
- tutorial-elements.hu.svg \
- tutorial-elements.id.svg \
- tutorial-elements.ja.svg \
- tutorial-elements.nl.svg \
- tutorial-elements.pl.svg \
- tutorial-elements.pt_BR.svg \
- tutorial-elements.ru.svg \
- tutorial-elements.sk.svg \
- tutorial-elements.sl.svg \
- tutorial-elements.zh_TW.svg \
- tutorial-interpolate.svg \
- tutorial-interpolate.be.svg \
- tutorial-interpolate.de.svg \
- tutorial-interpolate.el.svg \
- tutorial-interpolate.fr.svg \
- tutorial-interpolate.hu.svg \
- tutorial-interpolate.ja.svg \
- tutorial-interpolate.nl.svg \
- tutorial-interpolate.pl.svg \
- tutorial-interpolate.pt_BR.svg \
- tutorial-interpolate.ru.svg \
- tutorial-interpolate.sk.svg \
- tutorial-interpolate.sl.svg \
- tutorial-interpolate.vi.svg \
- tutorial-interpolate.zh_TW.svg \
- tutorial-shapes.svg \
- tutorial-shapes.be.svg \
- tutorial-shapes.ca.svg \
- tutorial-shapes.cs.svg \
- tutorial-shapes.de.svg \
- tutorial-shapes.el.svg \
- tutorial-shapes.es.svg \
- tutorial-shapes.eu.svg \
- tutorial-shapes.fa.svg \
- tutorial-shapes.fr.svg \
- tutorial-shapes.hu.svg \
- tutorial-shapes.id.svg \
- tutorial-shapes.it.svg \
- tutorial-shapes.ja.svg \
- tutorial-shapes.nl.svg \
- tutorial-shapes.pl.svg \
- tutorial-shapes.pt_BR.svg \
- tutorial-shapes.ru.svg \
- tutorial-shapes.sk.svg \
- tutorial-shapes.sl.svg \
- tutorial-shapes.vi.svg \
- tutorial-shapes.zh_CN.svg \
- tutorial-shapes.zh_TW.svg \
- tutorial-tips.svg \
- tutorial-tips.be.svg \
- tutorial-tips.ca.svg \
- tutorial-tips.de.svg \
- tutorial-tips.el.svg \
- tutorial-tips.es.svg \
- tutorial-tips.eu.svg \
- tutorial-tips.fa.svg \
- tutorial-tips.fr.svg \
- tutorial-shapes.gl.svg \
- tutorial-tips.hu.svg \
- tutorial-tips.ja.svg \
- tutorial-tips.id.svg \
- tutorial-tips.it.svg \
- tutorial-tips.nl.svg \
- tutorial-tips.pl.svg \
- tutorial-tips.pt_BR.svg \
- tutorial-tips.ru.svg \
- tutorial-tips.sk.svg \
- tutorial-tips.sl.svg \
- tutorial-tips.vi.svg \
- tutorial-tips.zh_TW.svg \
- tutorial-tracing.svg \
- tutorial-tracing.be.svg \
- tutorial-tracing.ca.svg \
- tutorial-tracing.de.svg \
- tutorial-tracing.el.svg \
- tutorial-tracing.es.svg \
- tutorial-tracing.eu.svg \
- tutorial-tracing.fa.svg \
- tutorial-tracing.fr.svg \
- tutorial-tracing.gl.svg \
- tutorial-tracing.hu.svg \
- tutorial-tracing.id.svg \
- tutorial-tracing.ja.svg \
- tutorial-tracing.nl.svg \
- tutorial-tracing.pl.svg \
- tutorial-tracing.pt_BR.svg \
- tutorial-tracing.ru.svg \
- tutorial-tracing.sk.svg \
- tutorial-tracing.sl.svg \
- tutorial-tracing.vi.svg \
- tutorial-tracing.zh_TW.svg \
- tutorial-tracing-pixelart.svg \
- tutorial-tracing-pixelart.el.svg \
- tutorial-tracing-pixelart.fr.svg \
- tutorial-tracing-pixelart.nl.svg \
- tutorial-tracing-pixelart.zh_TW.svg \
- tux.png
-
-
-EXTRA_DIST = $(tutorial_DATA)
-
diff --git a/share/tutorials/tutorial-advanced.de.svg b/share/tutorials/tutorial-advanced.de.svg
index 4137908eb..beff5e51e 100644
--- a/share/tutorials/tutorial-advanced.de.svg
+++ b/share/tutorials/tutorial-advanced.de.svg
@@ -341,7 +341,7 @@ Bulia Byak (buliabyak@users.sf.net) und Josh Andler (scislac@users.sf.net)
<flowRegion>
<use y="0" x="0" xlink:href="#d0e522"/>
</flowRegion>
- <flowDiv xml:space="preserve">Wählen Sie das rote Objekt und bearbeiten Sie es mit dem Knotenwerkzeug. Achten Sie dabei darauf, wie sich die beiden verbundene Versatzobjekte verhalten. Jetzt wählen Sie ein Versatzobjekt aus und ziehen an seinem Anfasser, um den Versatzabstand anzupassen. Beachten Sie, dass Sie die Versatzobjekte unabhängig bewegen oder verändern können, ohne dass sie ihre Verbindung zum Ursprungspfad verlieren.</flowDiv>
+ <flowDiv xml:space="preserve">Wählen Sie das rote Objekt und bearbeiten Sie seine Knoten. Sehen Sie, wie sich beide verbundene Versätze anpassen? Jetzt wählen Sie einen Versatz und ziehen an seinem Anfasser, um den Versatzabstand anzupassen. Beobachten Sie, wie ein Verschieben des Ursprungspfades alle seine verbundenen Versatzobjekte bewegt, und wie Sie die Versatzobjekte unabhängig bewegen oder verändern können, ohne dass sie ihre Verbindung zum Ursprungspfad verlieren.</flowDiv>
</flowRoot>
<g id="advanced-f11-de.svgg8809" xmlns:cc="http://creativecommons.org/ns#" transform="translate(10 3835.8)">
<path id="advanced-f11-de.svgpath1987" d="m113.67 73.853c-16.593-6.2126-28.727-20.624-26.506-37.584 1.0744-8.2045 7.151-22.522 11.082-29.183 2.3174-3.9267 0.06287 6.3871-0.15929 8.3469-0.91169 8.0423-0.66462 17.609 6.2279 23.314 3.4417 2.8487 8.3216 3.3459 6.8865-2.8132-2.1819-9.3644 10.903-16.851 20.11-13.935 7.1073 2.2509 12.728 9.4197 10.968 16.949-1.9067 8.1575-11.609 4.7505-13.16-2.7849-1.5341-7.452-10.93 1.6922-9.8554 7.2857 1.4757 7.6817 9.5717 9.5136 16.01 10.234 7.9762 0.892 18.699-2.9107 19.601-11.738 0.7287-7.1304 3.8134-14.344 11.819-15.244 9.3783-1.0545 19.572-0.8772 33.297-0.1784-15.926 0-23.984 10.502-28.311 19.012-4.0019 7.8719-13.273 12.644-21.559 13.805-10.357 1.4509-24.134-0.7852-30.181-0.7852 0 10.717 9.0837 15.683 16.616 15.405 6.9546-0.2568 11.568-8.6819 18.445-11.49 8.5192-3.4786 18.514-3.2501 26.134 2.2007 6.039 4.3193 12.03 12.117 8.6618 19.643-3.3562 7.4991-13.903 8.7109-20.324 3.8681-5.8264-4.3942-12.202-9.1596-20.204-9.1204-7.0617 0.0345-11.043 2.4957-12.624 10.319-2.5288-6.8607-7.0498-9.8139-22.975-15.526z" sodipodi:nodetypes="csssssssssssscsscsssssscs" inkscape:connector-curvature="0" stroke="#ff0100" stroke-width="0.675" fill="none"/>
diff --git a/share/tutorials/tutorial-basic.de.svg b/share/tutorials/tutorial-basic.de.svg
index 56dce768c..fc7299de9 100644
--- a/share/tutorials/tutorial-basic.de.svg
+++ b/share/tutorials/tutorial-basic.de.svg
@@ -110,36 +110,36 @@
<flowRegion>
<use y="0" x="0" xlink:href="#d0e111"/>
</flowRegion>
- <flowDiv xml:space="preserve">Um ein neues, leeres Dokument zu erzeugen, benutzt man <flowSpan font-family="sans-serif">Datei &gt; Neu</flowSpan> oder drückt <flowSpan font-weight="bold">Strg+N</flowSpan>. Um ein neues Dokument aus einer der vielen verfügbaren Vorlagen für Inkscape zu erstellen, verwendet man <flowSpan font-family="sans-serif">Datei &gt; Neu aus Vorlage</flowSpan> oder drückt <flowSpan font-weight="bold">Strg+Alt+N</flowSpan>.</flowDiv>
+ <flowDiv xml:space="preserve">Um ein neues, leeres Dokument zu erzeugen, benutzt man <flowSpan font-family="sans-serif">Datei &gt; Neu &gt; Standard</flowSpan> oder drückt <flowSpan font-weight="bold">Strg+N</flowSpan>. Um ein neues Dokument aus einer der vielen verfügbaren Vorlagen für Inkscape zu erstellen, verwendet man <flowSpan font-family="sans-serif">Datei &gt; Neu &gt; Vorlagen...</flowSpan> oder drückt <flowSpan font-weight="bold">Strg+Alt+N</flowSpan></flowDiv>
</flowRoot>
- <rect id="d0e126" display="none" height="1e3px" width="288" y="679.55" x="10"/>
+ <rect id="d0e125" display="none" height="1e3px" width="288" y="679.55" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e126"/>
+ <use y="0" x="0" xlink:href="#d0e125"/>
</flowRegion>
<flowDiv xml:space="preserve">Ein bestehendes SVG-Dokument öffnet man mit <flowSpan font-family="sans-serif">Datei &gt; Öffnen...</flowSpan> (<flowSpan font-weight="bold">Strg+O</flowSpan>). Zum Speichern wählt man <flowSpan font-family="sans-serif">Datei &gt; Speichern</flowSpan> (<flowSpan font-weight="bold">Strg+S</flowSpan>), oder <flowSpan font-family="sans-serif">Speichern unter…</flowSpan> (<flowSpan font-weight="bold">Umschalt+Strg+S</flowSpan>), um das Dokument unter einem neuen Namen zu speichern (Inkscape kann gelegentlich noch abstürzen, daher besser öfter speichern!).</flowDiv>
</flowRoot>
- <rect id="d0e147" display="none" height="1e3px" width="288" y="741.08" x="10"/>
+ <rect id="d0e146" display="none" height="1e3px" width="288" y="741.08" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e147"/>
+ <use y="0" x="0" xlink:href="#d0e146"/>
</flowRegion>
<flowDiv xml:space="preserve">Inkscape verwendet das SVG-Format (Scalable Vector Graphics) für seine Dateien. SVG ist ein offener Standard, der von vielen Zeichenprogrammen unterstützt wird. SVG-Dateien basieren auf dem XML-Standard und können mit jedem Text- oder XML-Editor (zusätzlich zu dem in Inkscape, natürlich) verändert werden. Neben SVG kann Inkscape auch einige andere Formate importieren und exportieren (z. B. EPS und PNG).</flowDiv>
</flowRoot>
- <rect id="d0e150" display="none" height="1e3px" width="288" y="822.71" x="10"/>
+ <rect id="d0e149" display="none" height="1e3px" width="288" y="822.71" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e150"/>
+ <use y="0" x="0" xlink:href="#d0e149"/>
</flowRegion>
<flowDiv xml:space="preserve">Inkscape öffnet ein separates Programmfenster für jedes einzelne Dokument. Man kann mit dem Fenster-Manager dazwischen wechseln (z. B. durch <flowSpan font-weight="bold">Alt+Tab</flowSpan>) oder auch mit dem Inkscape-eigenen Kurzbefehl <flowSpan font-weight="bold">Strg+Tab</flowSpan>, der durch alle geöffneten Dokument-Fenster wandert (erstellen Sie jetzt ein neues Dokument und schalten Sie zur Übung zwischen diesem und dem Tutorial hin und her). Hinweis: Inkscape behandelt diese Fenster wie Reiter in einem Webbrowser. Das bedeutet, dass der Kurzbefehl </flowDiv>
</flowRoot>
<text style="writing-mode:lr" font-weight="bold" font-size="8" y="927.212349" x="10" font-family="sans-serif" fill="#000000">
<tspan y="927.212349" x="10">Formen erstellen</tspan>
</text>
- <rect id="d0e165" display="none" height="1e3px" width="288" y="932.41" x="10"/>
+ <rect id="d0e164" display="none" height="1e3px" width="288" y="932.41" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e165"/>
+ <use y="0" x="0" xlink:href="#d0e164"/>
</flowRegion>
<flowDiv xml:space="preserve">Nun ist es Zeit, ein paar schicke Formen zu erstellen! Klicken Sie auf das Rechteckwerkzeug in der Werkzeugleiste links (oder drücken Sie <flowSpan font-weight="bold">F4</flowSpan>) und klicken und ziehen Sie, entweder in einem neuen, leeren Dokument oder gleich hier:</flowDiv>
</flowRoot>
@@ -154,10 +154,10 @@
<rect id="basic-f01-de.svgrect743" fill-rule="evenodd" transform="translate(10 990.19)" height="4.1162" width="7.0564" stroke="#000" y="28.116" x="232.79" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#00f"/>
<rect id="basic-f01-de.svgrect744" fill-rule="evenodd" transform="translate(10 990.19)" height="1.7641" width="4.1162" stroke="#000" y="20.472" x="247.49" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#00f"/>
<rect id="basic-f01-de.svgrect745" fill-rule="evenodd" transform="translate(10 990.19)" height="1.1761" width="2.9402" stroke="#000" y="17.532" x="259.25" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#00f"/>
- <rect id="d0e181" display="none" height="1e3px" width="288" y="1051.9" x="10"/>
+ <rect id="d0e180" display="none" height="1e3px" width="288" y="1051.9" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e181"/>
+ <use y="0" x="0" xlink:href="#d0e180"/>
</flowRegion>
<flowDiv xml:space="preserve">Wie Sie sehen können, sind Standard-Rechtecke blau gefüllt, mit einer schwarzen <flowSpan font-style="italic">Kontur</flowSpan> (der Umrandung), und vollständig deckend. Wir werden noch sehen, wie man das ändern kann. Mit anderen Werkzeugen lassen sich auch Ellipsen, Sterne und Spiralen erstellen:</flowDiv>
</flowRoot>
@@ -177,173 +177,173 @@
<path id="basic-f02-de.svgpath1312" sodipodi:sides="5" fill-opacity=".75" inkscape:flatsided="false" stroke="#000" stroke-width="1pt" fill="#ff0" style="color:#000000" fill-rule="evenodd" transform="translate(26.429 1064.8)" inkscape:rounded="0.0000000" sodipodi:r1="16.043627" sodipodi:r2="8.0218134" sodipodi:arg1="0.29358899" sodipodi:arg2="0.92190752" sodipodi:type="star" d="m144.64 71.291l-10.51 1.748-4.51 9.649-4.91-9.455-10.58-1.315 7.48-7.592-2.02-10.461 9.53 4.763 9.33-5.151-1.59 10.536 7.78 7.278z" inkscape:randomized="0.0000000" sodipodi:cy="66.647896" sodipodi:cx="129.28571"/>
<path id="basic-f02-de.svgpath1314" sodipodi:sides="5" fill-opacity=".75" inkscape:flatsided="false" stroke="#000" stroke-width="1pt" fill="#ff0" style="color:#000000" fill-rule="evenodd" transform="translate(26.429 1064.8)" inkscape:rounded="0.0000000" sodipodi:r1="7.9859571" sodipodi:r2="3.9929783" sodipodi:arg1="0.46364761" sodipodi:arg2="1.0919661" sodipodi:type="star" d="m162.5 66.648l-5.3-0.028-3.03 4.353-1.61-5.052-5.08-1.535 4.31-3.095-0.11-5.302 4.27 3.139 5.01-1.741-1.66 5.035 3.2 4.226z" inkscape:randomized="0.0000000" sodipodi:cy="63.076466" sodipodi:cx="155.35715"/>
<path id="basic-f02-de.svgpath1316" sodipodi:sides="5" fill-opacity=".75" inkscape:flatsided="false" stroke="#000" stroke-width="1pt" fill="#ff0" style="color:#000000" fill-rule="evenodd" transform="translate(26.429 1064.8)" inkscape:rounded="0.0000000" sodipodi:r1="5.8138647" sodipodi:r2="2.9069321" sodipodi:arg1="0.74194727" sodipodi:arg2="1.3702658" sodipodi:type="star" d="m180 69.505l-3.71-1.08-2.99 2.441-0.12-3.859-3.24-2.09 3.63-1.305 0.99-3.733 2.36 3.052 3.85-0.216-2.17 3.191 1.4 3.599z" inkscape:randomized="0.0000000" sodipodi:cy="65.576469" sodipodi:cx="175.71429"/>
- <rect id="d0e197" display="none" height="1e3px" width="288" y="1182.3" x="10"/>
+ <rect id="d0e196" display="none" height="1e3px" width="288" y="1182.3" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e197"/>
+ <use y="0" x="0" xlink:href="#d0e196"/>
</flowRegion>
<flowDiv xml:space="preserve">Diese Werkzeuge werden unter dem Begriff <flowSpan font-style="italic">Form-Werkzeuge</flowSpan> zusammengefasst. Jede erzeugte Form zeigt einen oder mehrere rautenförmige <flowSpan font-style="italic">Anfasser</flowSpan>. Ziehen Sie mit der Maus daran, um zu sehen wie sich die Form dadurch verändert. Die Werkzeugeinstellungsleiste für Formen bietet ebenfalls die Möglichkeit, die Form zu verändern. Die Einstellungen verändern die aktuell ausgewählten Objekte (die, die die entsprechenden Anfasser haben) <flowSpan font-style="italic">und</flowSpan> setzt den Standard für alle neuen Objekte.</flowDiv>
</flowRoot>
- <rect id="d0e209" display="none" height="1e3px" width="288" y="1274.6" x="10"/>
+ <rect id="d0e208" display="none" height="1e3px" width="288" y="1274.6" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e209"/>
+ <use y="0" x="0" xlink:href="#d0e208"/>
</flowRegion>
<flowDiv xml:space="preserve">Um die letzte Aktion <flowSpan font-style="italic">rückgängig</flowSpan> zu machen, drückt man <flowSpan font-weight="bold">Strg+Z</flowSpan>. (Oder, wenn Sie es sich wieder anders überlegen, benutzen Sie <flowSpan font-style="italic">Wiederherstellen</flowSpan> durch <flowSpan font-weight="bold">Umschalt+Strg+Z</flowSpan>.)</flowDiv>
</flowRoot>
<text style="writing-mode:lr" font-weight="bold" font-size="8" y="1326.6269360000001" x="10" font-family="sans-serif" fill="#000000">
<tspan y="1326.6269360000001" x="10">Bewegen, Größe ändern, Drehen</tspan>
</text>
- <rect id="d0e230" display="none" height="1e3px" width="288" y="1331.8" x="10"/>
+ <rect id="d0e229" display="none" height="1e3px" width="288" y="1331.8" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e230"/>
+ <use y="0" x="0" xlink:href="#d0e229"/>
</flowRegion>
<flowDiv xml:space="preserve">Das am häufigsten verwendete Werkzeug in Inkscape ist das <flowSpan font-style="italic">Auswahlwerkzeug</flowSpan>. Klicken Sie den obersten Knopf (mit dem Pfeil) in der Werkzeugleiste, oder drücken Sie <flowSpan font-weight="bold">F1</flowSpan> oder <flowSpan font-weight="bold">Leertaste</flowSpan>. Nun können Sie jedes Objekt auf der Seite auswählen. Probieren Sie das an dem Rechteck unten.</flowDiv>
</flowRoot>
<rect id="basic-f03-de.svgrect804" fill-rule="evenodd" fill-opacity=".75" transform="translate(10 1398.6)" height="38.81" width="40.574" stroke="#000" y="-.47140" x="25.427" stroke-width="1pt" fill="#00f"/>
- <rect id="d0e252" display="none" height="1e3px" width="288" y="1450.8" x="10"/>
+ <rect id="d0e251" display="none" height="1e3px" width="288" y="1450.8" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e252"/>
+ <use y="0" x="0" xlink:href="#d0e251"/>
</flowRegion>
<flowDiv xml:space="preserve">Sie sehen jetzt acht pfeilförmige Anfasser um das markierte Objekt. Jetzt haben Sie mehrere Möglichkeiten:</flowDiv>
</flowRoot>
<circle cy="0" cx="0" r="2" transform="translate(15 1485.3)"/>
- <rect id="d0e259" display="none" height="1e3px" width="258" y="1479.3" x="20"/>
+ <rect id="d0e258" display="none" height="1e3px" width="258" y="1479.3" x="20"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e259"/>
+ <use y="0" x="0" xlink:href="#d0e258"/>
</flowRegion>
<flowDiv xml:space="preserve"><flowSpan font-style="italic">Verschieben</flowSpan> des Objekts durch Ziehen mit gedrückter linker Maustaste. (Drücken Sie <flowSpan font-weight="bold">Strg</flowSpan>, um die Bewegung auf horizontale oder vertikale Richtung zu beschränken.)</flowDiv>
</flowRoot>
<circle cy="0" cx="0" r="2" transform="translate(15 1524.5)"/>
- <rect id="d0e270" display="none" height="1e3px" width="258" y="1518.5" x="20"/>
+ <rect id="d0e269" display="none" height="1e3px" width="258" y="1518.5" x="20"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e270"/>
+ <use y="0" x="0" xlink:href="#d0e269"/>
</flowRegion>
<flowDiv xml:space="preserve"><flowSpan font-style="italic">Ändern Sie die Größe</flowSpan> des Objektes durch Klicken und Ziehen an einem Anfasser. (Drücken Sie <flowSpan font-weight="bold">Strg</flowSpan> zum Beibehalten des Seitenverhältnisses.)</flowDiv>
</flowRoot>
- <rect id="d0e279" display="none" height="1e3px" width="288" y="1558.4" x="10"/>
+ <rect id="d0e278" display="none" height="1e3px" width="288" y="1558.4" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e279"/>
+ <use y="0" x="0" xlink:href="#d0e278"/>
</flowRegion>
<flowDiv xml:space="preserve">Nun klicken Sie noch einmal auf das Rechteck. Die Anfasser sehen jetzt anders aus. Jetzt gibt es folgende Möglichkeiten:</flowDiv>
</flowRoot>
<circle cy="0" cx="0" r="2" transform="translate(15 1592.9)"/>
- <rect id="d0e286" display="none" height="1e3px" width="258" y="1586.9" x="20"/>
+ <rect id="d0e285" display="none" height="1e3px" width="258" y="1586.9" x="20"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e286"/>
+ <use y="0" x="0" xlink:href="#d0e285"/>
</flowRegion>
<flowDiv xml:space="preserve"><flowSpan font-style="italic">Drehen</flowSpan> des Objektes durch Klicken und Ziehen an den Eck-Anfassern. (Zum stufenweisen Drehen in Schritten von 15° halten Sie <flowSpan font-weight="bold">Strg</flowSpan> gedrückt. Verschieben Sie das Kreuz, um den Drehmittelpunkt festzulegen.)</flowDiv>
</flowRoot>
<circle cy="0" cx="0" r="2" transform="translate(15 1642.7)"/>
- <rect id="d0e297" display="none" height="1e3px" width="258" y="1636.7" x="20"/>
+ <rect id="d0e296" display="none" height="1e3px" width="258" y="1636.7" x="20"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e297"/>
+ <use y="0" x="0" xlink:href="#d0e296"/>
</flowRegion>
<flowDiv xml:space="preserve"><flowSpan font-style="italic">Scheren</flowSpan> Sie das Objekt durch Klicken und Ziehen an den Anfassern an den Längsseiten. (Drücken Sie <flowSpan font-weight="bold">Strg</flowSpan> zum stufenweisen Scheren in Schritten von 15°.)</flowDiv>
</flowRoot>
- <rect id="d0e306" display="none" height="1e3px" width="288" y="1675.3" x="10"/>
+ <rect id="d0e305" display="none" height="1e3px" width="288" y="1675.3" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e306"/>
+ <use y="0" x="0" xlink:href="#d0e305"/>
</flowRegion>
<flowDiv xml:space="preserve">Wenn man das Auswahlwerkzeug verwendet und das Objekt ausgewählt ist, kann man auch die Eingabefelder (über der Zeichenfläche) benutzen, um genaue Werte für die Koordinaten (X und Y) und die Größe (B und H) einzugeben.</flowDiv>
</flowRoot>
<text style="writing-mode:lr" font-weight="bold" font-size="8" y="1737.8410750000003" x="10" font-family="sans-serif" fill="#000000">
<tspan y="1737.8410750000003" x="10">Verändern mit der Tastatur</tspan>
</text>
- <rect id="d0e315" display="none" height="1e3px" width="288" y="1743" x="10"/>
+ <rect id="d0e314" display="none" height="1e3px" width="288" y="1743" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e315"/>
+ <use y="0" x="0" xlink:href="#d0e314"/>
</flowRegion>
<flowDiv xml:space="preserve">Eine der Eigenschaften von Inkscape, die es von vielen anderen Vektorzeichenprogrammen unterscheidet, ist die gute Tastaturbedienbarkeit. Es gibt fast keinen Befehl oder keine Aktion, die nicht mit der Tastatur ausführbar sind, und Objektmanipulation ist da keine Ausnahme.</flowDiv>
</flowRoot>
- <rect id="d0e318" display="none" height="1e3px" width="288" y="1801.8" x="10"/>
+ <rect id="d0e317" display="none" height="1e3px" width="288" y="1801.8" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e318"/>
+ <use y="0" x="0" xlink:href="#d0e317"/>
</flowRegion>
<flowDiv xml:space="preserve">Man kann Objekte mit der Tastatur verschieben (<flowSpan font-weight="bold">Pfeil</flowSpan>-Tasten), ihre Größe ändern (<flowSpan font-weight="bold">&lt;</flowSpan>- und <flowSpan font-weight="bold">&gt;</flowSpan>-Tasten) und sie drehen (<flowSpan font-weight="bold">[</flowSpan>- und <flowSpan font-weight="bold">]</flowSpan>-Tasten). Die Standardschrittweite für Bewegung und Größenänderung mit der Tastatur ist 2 px, mit <flowSpan font-weight="bold">Umschalt</flowSpan> das Zehnfache davon. <flowSpan font-weight="bold">Strg+&lt;</flowSpan> und <flowSpan font-weight="bold">Strg+&gt;</flowSpan> vergrößern auf 200% oder verkleinern auf 50% der Originalgröße. Standardmäßig werden Objekte in Schritten von 15° gedreht, mit gedrückter <flowSpan font-weight="bold">Strg</flowSpan>-Taste in 90°-Schritten.</flowDiv>
</flowRoot>
- <rect id="d0e348" display="none" height="1e3px" width="288" y="1883.5" x="10"/>
+ <rect id="d0e347" display="none" height="1e3px" width="288" y="1883.5" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e348"/>
+ <use y="0" x="0" xlink:href="#d0e347"/>
</flowRegion>
<flowDiv xml:space="preserve">Besonders nützlich sind <flowSpan font-style="italic">pixelgenaue Manipulationen</flowSpan> durch gleichzeitiges Drücken von <flowSpan font-weight="bold">Alt</flowSpan> mit den entsprechenden Tasten. Mit <flowSpan font-weight="bold">Alt+Pfeiltaste</flowSpan> verschiebt man das markierte Objekt um 1 Pixel <flowSpan font-style="italic">bei gewähltem Zoomfaktor</flowSpan> (also 1 <flowSpan font-style="italic">Bildschirm-Pixel</flowSpan>, nicht zu verwechseln mit der px-Einheit, welche eine SVG-Längeneinheit unabhängig vom Zoomfaktor ist). Das bedeutet, wenn man hineinzoomt, dann entspricht ein einmaliger Druck auf <flowSpan font-weight="bold">Alt+Pfeil</flowSpan> einer <flowSpan font-style="italic">kleineren</flowSpan> absoluten Bewegung, obwohl es auf dem Bildschirm immer noch eine Bewegung um 1 Pixel ist. So ist es möglich, Objekte mit einer beliebig hohen Präzision zu positionieren, einfach indem man hinein- oder herauszoomt.</flowDiv>
</flowRoot>
- <rect id="d0e372" display="none" height="1e3px" width="288" y="2006.1" x="10"/>
+ <rect id="d0e371" display="none" height="1e3px" width="288" y="2006.1" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e372"/>
+ <use y="0" x="0" xlink:href="#d0e371"/>
</flowRegion>
<flowDiv xml:space="preserve">Genauso ändern <flowSpan font-weight="bold">Alt+&lt;</flowSpan> und <flowSpan font-weight="bold">Alt+&gt;</flowSpan> die Objektgröße so, das die sichtbare Größe um jeweils ein Bildschirm-Pixel verändert wird. Die Tasten <flowSpan font-weight="bold">Alt+[</flowSpan> und <flowSpan font-weight="bold">Alt+]</flowSpan> drehen den Punkt, der am weitesten vom Zentrum entfernt ist, um ein Bildschirm-Pixel weiter.</flowDiv>
</flowRoot>
- <rect id="d0e387" display="none" height="1e3px" width="288" y="2055.3" x="10"/>
+ <rect id="d0e386" display="none" height="1e3px" width="288" y="2055.3" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e387"/>
+ <use y="0" x="0" xlink:href="#d0e386"/>
</flowRegion>
<flowDiv xml:space="preserve">Anmerkung: Linux-Benutzer erhalten möglicherweise nicht den gewünschten Effekt mit <flowSpan font-weight="bold">Alt+Pfeiltaste</flowSpan> und ein paar anderen Tastenkombinationen, wenn ihr Fenstermanager diese Tastendrücke abfängt, bevor sie zu Inkscape gelangen. Eine Lösung ist es, die Einstellungen des Fenstermanagers entsprechend zu ändern.</flowDiv>
</flowRoot>
<text style="writing-mode:lr" font-weight="bold" font-size="8" y="2128.5351450000007" x="10" font-family="sans-serif" fill="#000000">
<tspan y="2128.5351450000007" x="10">Mehrfachauswahl</tspan>
</text>
- <rect id="d0e399" display="none" height="1e3px" width="288" y="2133.7" x="10"/>
+ <rect id="d0e398" display="none" height="1e3px" width="288" y="2133.7" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e399"/>
+ <use y="0" x="0" xlink:href="#d0e398"/>
</flowRegion>
<flowDiv xml:space="preserve">Man kann mehrere Objekte gleichzeitig durch <flowSpan font-weight="bold">Umschalt+Klick</flowSpan>, oder durch <flowSpan font-weight="bold">Ziehen</flowSpan> um die Objekte herum auswählen. Letzteres wird <flowSpan font-style="italic">Gummibandauswahl</flowSpan> genannt. (Das Auswahlwerkzeug erzeugt das Gummiband durch Ziehen über einem leeren Teil der Seite, aber immer auch, wenn vor dem Ziehen <flowSpan font-weight="bold">Umschalt</flowSpan> gedrückt wird.) Üben Sie das Markieren aller drei Formen hier unten:</flowDiv>
</flowRoot>
<rect id="basic-f04-de.svgrect878" fill-rule="evenodd" fill-opacity=".75" transform="translate(10 2211.1)" height="26.656" width="25.253" stroke="#000" y="5.9827" x="58.428" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".80106pt" fill="#00f"/>
<path id="basic-f04-de.svgpath879" d="m134.86 1251.7c0 9.8339-9.8015 17.806-21.892 17.806-12.091 0-21.892-7.9719-21.892-17.806 0-9.8338 9.8015-17.806 21.892-17.806 12.091 0 21.892 7.9719 21.892 17.806z" fill-rule="evenodd" fill-opacity=".75" transform="translate(10 2211.1) matrix(.80106 0 0 .80106 32.311 -983.83)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#f00"/>
<path id="basic-f04-de.svgpath1290" style="color:#000000" d="m182.84 29.583-13.183-3.2184-10.125 9.0355-1.013-13.533-11.722-6.8373 12.557-5.1452 2.8804-13.261 8.7737 10.353 13.502-1.3585-7.1347 11.543z" fill-rule="evenodd" fill-opacity=".75" transform="translate(10 2211.1) matrix(.87302 0 0 .87302 27.6 4.0534)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".91757pt" fill="#ff0"/>
- <rect id="d0e424" display="none" height="1e3px" width="288" y="2259.3" x="10"/>
+ <rect id="d0e423" display="none" height="1e3px" width="288" y="2259.3" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e424"/>
+ <use y="0" x="0" xlink:href="#d0e423"/>
</flowRegion>
<flowDiv xml:space="preserve">Jetzt benutzen Sie das Gummiband (durch Ziehen oder <flowSpan font-weight="bold">Umschalt+Ziehen</flowSpan>), um beide Ellipsen, aber nicht das Rechteck zu markieren:</flowDiv>
</flowRoot>
<rect id="basic-f05-de.svgrect894" fill-rule="evenodd" fill-opacity=".75" transform="translate(10 2295.7)" height="39.698" width="151.14" stroke="#000" y="1.7363" x="46.657" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".93523pt" fill="#00f"/>
<path id="basic-f05-de.svgpath1290" style="color:#000000" d="m94.643 25.041c0 6.9036-2.9581 12.5-6.6071 12.5s-6.6071-5.5964-6.6071-12.5 2.9581-12.5 6.6071-12.5 6.6071 5.5964 6.6071 12.5z" fill-rule="evenodd" fill-opacity=".75" transform="translate(10 2295.7) matrix(.70711 -.70711 .70711 .70711 28.793 65.478)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".48693pt" fill="#f00"/>
<path id="basic-f05-de.svgpath1292" style="color:#000000" d="m94.643 25.041c0 6.9036-2.9581 12.5-6.6071 12.5s-6.6071-5.5964-6.6071-12.5 2.9581-12.5 6.6071-12.5 6.6071 5.5964 6.6071 12.5z" fill-rule="evenodd" fill-opacity=".75" transform="translate(10 2295.7) matrix(.70711 -.70711 .70711 .70711 56.471 65.835)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".48693pt" fill="#f00"/>
- <rect id="d0e440" display="none" height="1e3px" width="288" y="2348.6" x="10"/>
+ <rect id="d0e439" display="none" height="1e3px" width="288" y="2348.6" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e440"/>
+ <use y="0" x="0" xlink:href="#d0e439"/>
</flowRegion>
<flowDiv xml:space="preserve">Jedes einzelne Objekt einer Auswahl zeigt einen <flowSpan font-style="italic">Objektrahmen</flowSpan> – normalerweise einen gestrichelten, rechteckigen Rahmen. So kann man ganz einfach sehen, was ausgewählt ist und was nicht. Wenn man zum Beispiel beide Ellipsen und das Rechteck auswählt, dann hätte man es ohne diese Hinweise schwer zu sagen, ob die Ellipsen markiert sind oder nicht.</flowDiv>
</flowRoot>
- <rect id="d0e446" display="none" height="1e3px" width="288" y="2418" x="10"/>
+ <rect id="d0e445" display="none" height="1e3px" width="288" y="2418" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e446"/>
+ <use y="0" x="0" xlink:href="#d0e445"/>
</flowRegion>
<flowDiv xml:space="preserve"><flowSpan font-weight="bold">Umschalt+Klick</flowSpan> auf ein markiertes Objekt entfernt es aus der Auswahl. Wählen Sie alle drei Objekte oben aus, dann benutzen Sie <flowSpan font-weight="bold">Umschalt+Klick</flowSpan>, um beide Ellipsen aus der Auswahl herauszunehmen und nur das Rechteck ausgewählt zu lassen.</flowDiv>
</flowRoot>
- <rect id="d0e454" display="none" height="1e3px" width="288" y="2467.8" x="10"/>
+ <rect id="d0e453" display="none" height="1e3px" width="288" y="2467.8" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e454"/>
+ <use y="0" x="0" xlink:href="#d0e453"/>
</flowRegion>
<flowDiv xml:space="preserve">Nach einem Druck auf <flowSpan font-weight="bold">Esc</flowSpan> sind keine Objekte mehr ausgewählt. <flowSpan font-weight="bold">Strg+A</flowSpan> wählt dagegen alle Objekte der momentan aktivierten Ebene aus. (Wenn Sie keine weiteren Ebenen erstellt haben, entspricht das allen Objekten im Dokument).</flowDiv>
</flowRoot>
<text style="writing-mode:lr" font-weight="bold" font-size="8" y="2530.3891730000005" x="10" font-family="sans-serif" fill="#000000">
<tspan y="2530.3891730000005" x="10">Gruppieren</tspan>
</text>
- <rect id="d0e469" display="none" height="1e3px" width="288" y="2535.6" x="10"/>
+ <rect id="d0e468" display="none" height="1e3px" width="288" y="2535.6" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e469"/>
+ <use y="0" x="0" xlink:href="#d0e468"/>
</flowRegion>
<flowDiv xml:space="preserve">Mehrere Objekte können zu einer <flowSpan font-style="italic">Gruppe</flowSpan> zusammengefasst werden. Eine Gruppe verhält sich wie ein einzelnes Objekt, wenn man sie verschiebt oder mit den Anfassern verformt. Die drei Objekte unten links sind alle noch einzeln; die gleichen drei Objekte auf der rechten Seite sind gruppiert. Versuchen Sie, die Gruppe zu verschieben.</flowDiv>
</flowRoot>
@@ -355,99 +355,99 @@
<path id="basic-f06-de.svgpath1374" d="m134.86 1251.7c0 9.8339-9.8015 17.806-21.892 17.806-12.091 0-21.892-7.9719-21.892-17.806 0-9.8338 9.8015-17.806 21.892-17.806 12.091 0 21.892 7.9719 21.892 17.806z" transform="translate(104.03 224.65)" fill="#f00"/>
<path id="basic-f06-de.svgpolygon1375" d="m184.48 1254.9-15.238-3.72-11.703 10.444-1.1708-15.642-13.549-7.9029 14.514-5.9471 3.3293-15.328 10.141 11.966 15.607-1.5703-8.2467 13.343z" transform="translate(86.386 261.2)" fill="#ff0"/>
</g>
- <rect id="d0e485" display="none" height="1e3px" width="288" y="2682.4" x="10"/>
+ <rect id="d0e484" display="none" height="1e3px" width="288" y="2682.4" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e485"/>
+ <use y="0" x="0" xlink:href="#d0e484"/>
</flowRegion>
<flowDiv xml:space="preserve">Um eine Gruppe zu erzeugen, wählt man ein oder mehrere Objekte aus und drückt <flowSpan font-weight="bold">Strg+G</flowSpan>. Um die Gruppierung bei einer oder mehreren Gruppen aufzuheben, markiert man diese und drückt <flowSpan font-weight="bold">Strg+U</flowSpan>. Gruppierungen können selbst auch gruppiert werden, wie jedes andere Objekt auch. Solche verschachtelten Gruppierungen können beliebig tief weitergeführt werden. Einmaliges <flowSpan font-weight="bold">Strg+U</flowSpan> hebt nur die oberste (letzte) Gruppierung einer ausgewählten Gruppe auf. Um alle Gruppierungen der Auswahl aufzuheben, müssen Sie <flowSpan font-weight="bold">Strg+U</flowSpan> mehrfach drücken.</flowDiv>
</flowRoot>
- <rect id="d0e500" display="none" height="1e3px" width="288" y="2783.8" x="10"/>
+ <rect id="d0e499" display="none" height="1e3px" width="288" y="2783.8" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e500"/>
+ <use y="0" x="0" xlink:href="#d0e499"/>
</flowRegion>
<flowDiv xml:space="preserve">Es ist nicht unbedingt nötig, alle Gruppierungen aufzuheben, wenn man ein Objekt in einer Gruppe bearbeiten will. <flowSpan font-weight="bold">Strg+Klick</flowSpan> auf ein solches Objekt wählt es aus und erlaubt, es zu bearbeiten. Um mehrere Objekte innerhalb oder außerhalb einer Gruppe auszuwählen, drücken Sie <flowSpan font-weight="bold">Umschalt+Strg+Klick</flowSpan>. Versuchen Sie, einzelne Objekte in der Gruppe (oben rechts) zu verschieben oder zu verändern, ohne die Gruppierung aufzuheben. Anschließend heben Sie die Markierung wieder auf und markieren die Gruppe normal, um zu sehen, dass die Gruppierung erhalten geblieben ist.</flowDiv>
</flowRoot>
<text style="writing-mode:lr" font-weight="bold" font-size="8" y="2899.6010450000003" x="10" font-family="sans-serif" fill="#000000">
<tspan y="2899.6010450000003" x="10">Füllung und Kontur</tspan>
</text>
- <rect id="d0e515" display="none" height="1e3px" width="288" y="2904.8" x="10"/>
+ <rect id="d0e514" display="none" height="1e3px" width="288" y="2904.8" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e515"/>
+ <use y="0" x="0" xlink:href="#d0e514"/>
</flowRegion>
- <flowDiv xml:space="preserve">Die wohl einfachste Möglichkeit, wie man ein Objekt einfärben kann, ist es auszuwählen und dann auf eines der farbigen Kästchen unterhalb der Zeichenfläche zu klicken (dies ändert die Füllfarbe). Alternativ kann der Farbmuster-Dialog vom Ansicht-Menü aus geöffnet werden (oder mittels <flowSpan font-weight="bold">Shift+Ctrl+W<flowSpan font-weight="bold">), das Objekt markiert werden, und ein Farbfeld angeklickt werden (auch dies ändert die Füllfarbe).</flowSpan></flowSpan></flowDiv>
+ <flowDiv xml:space="preserve">Viele der Funktionen von Inkscape sind durch <flowSpan font-style="italic">Dialoge</flowSpan> verfügbar. Der wahrscheinlich einfachste Weg, einem Objekt eine Farbe zuzuweisen, ist es, den Farbfelder-Dialog im Ansicht-Menü zu öffnen (oder mittels <flowSpan font-weight="bold">Shift+Ctrl+W<flowSpan font-weight="bold">), das Objekt zu markieren, und ein Farbfeld zu wählen. Dies ändert die Füllfarbe.</flowSpan></flowSpan></flowDiv>
</flowRoot>
- <rect id="d0e522" display="none" height="1e3px" width="288" y="2986" x="10"/>
+ <rect id="d0e524" display="none" height="1e3px" width="288" y="2963.6" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e522"/>
+ <use y="0" x="0" xlink:href="#d0e524"/>
</flowRegion>
<flowDiv xml:space="preserve">Viel leistungsfähiger ist der Dialog »Füllung und Kontur« aus dem Objekt-Menü (<flowSpan font-weight="bold">Umschalt+Strg+F</flowSpan>). Wählen Sie das Objekt unten aus und öffnen Sie den Dialog.</flowDiv>
</flowRoot>
- <path id="basic-f07-de.svgpath930" d="m190.32 1450.2c0 9.0277-29.666 16.346-66.261 16.346s-66.261-7.3185-66.261-16.346c0-9.0278 29.666-16.346 66.261-16.346s66.261 7.3185 66.261 16.346z" fill-rule="evenodd" fill-opacity=".75" transform="translate(13.066 1600.9)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#f00"/>
- <rect id="d0e541" display="none" height="1e3px" width="288" y="3079.2" x="10"/>
+ <path id="basic-f07-de.svgpath930" d="m190.32 1450.2c0 9.0277-29.666 16.346-66.261 16.346s-66.261-7.3185-66.261-16.346c0-9.0278 29.666-16.346 66.261-16.346s66.261 7.3185 66.261 16.346z" fill-rule="evenodd" fill-opacity=".75" transform="translate(13.066 1578.5)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#f00"/>
+ <rect id="d0e543" display="none" height="1e3px" width="288" y="3056.8" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e541"/>
+ <use y="0" x="0" xlink:href="#d0e543"/>
</flowRegion>
<flowDiv xml:space="preserve">Sie werden sehen, dass der Dialog drei Reiter hat: Füllung, Farbe der Kontur, und Muster der Kontur. Im Reiter »Füllung« ändert man die <flowSpan font-style="italic">Füllfarbe</flowSpan> (Innenfarbe) des markierten Objekts. Mit den Knöpfen direkt unter dem Reiter kann man die Füllungsart verändern: die Füllung ganz ausschalten (mit dem Knopf mit dem X), einfach (einfarbig) füllen, oder einen Linear- und Radialverlauf auswählen. Bei dem Objekt oben ist der Knopf »Einfache Farbe« aktiviert.</flowDiv>
</flowRoot>
- <rect id="d0e547" display="none" height="1e3px" width="288" y="3161" x="10"/>
+ <rect id="d0e549" display="none" height="1e3px" width="288" y="3138.6" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e547"/>
+ <use y="0" x="0" xlink:href="#d0e549"/>
</flowRegion>
<flowDiv xml:space="preserve">Weiter unten sieht man verschiedene <flowSpan font-style="italic">Farbwahlmöglichkeiten</flowSpan>. Jede hat einen eigenen Reiter: RGB, HSL, CMYK und Farbrad. Wahrscheinlich am praktischsten ist das Farbrad, bei dem man das Dreieck verdrehen kann, um den Farbton zu wählen und dann die gewünschte Helligkeit im Dreieck auswählt. Alle Farbwähler besitzen einen Schieberegler, um den <flowSpan font-style="italic">Alpha-Kanal</flowSpan> (die Deckkraft) der Objektfarbe einzustellen.</flowDiv>
</flowRoot>
- <rect id="d0e556" display="none" height="1e3px" width="288" y="3242.7" x="10"/>
+ <rect id="d0e558" display="none" height="1e3px" width="288" y="3220.3" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e556"/>
+ <use y="0" x="0" xlink:href="#d0e558"/>
</flowRegion>
<flowDiv xml:space="preserve">Immer, wenn Sie ein Objekt auswählen, zeigt der Farbwähler dessen aktuelle Farbe und Kontur. Bei mehr als einem markierten Objekt wird die <flowSpan font-style="italic">Durchschnittsfarbe</flowSpan> angezeigt. Üben Sie an diesen Beispielobjekten oder erzeugen Sie selbst welche:</flowDiv>
</flowRoot>
- <path id="basic-f08-de.svgpath969" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" fill-opacity="0.75" transform="translate(10 3300.5) matrix(.99777 0 0 .93574 .12843 -1529.6)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#80765b"/>
- <path id="basic-f08-de.svgpath970" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" fill-opacity=".26769" transform="translate(10 3300.5) matrix(.99777 0 0 .93574 35.037 -1529)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#d0765b"/>
- <path id="basic-f08-de.svgpath971" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3300.5) matrix(.99777 0 0 .93574 70.391 -1529)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#12c097"/>
- <path id="basic-f08-de.svgpath972" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3300.5) matrix(.99777 0 0 .93574 104.18 -1529)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#e7da05"/>
- <path id="basic-f08-de.svgpath973" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3300.5) matrix(.99777 0 0 .93574 135.99 -1529)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#3d0fa1"/>
- <path id="basic-f08-de.svgpath974" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" fill-opacity=".74902" transform="translate(10 3300.5) matrix(.99777 0 0 .93574 167.81 -1529)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#6fe225"/>
- <path id="basic-f08-de.svgpath975" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3300.5) matrix(.99777 0 0 .93574 199.63 -1529)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#ff3077"/>
- <rect id="d0e572" display="none" height="1e3px" width="288" y="3347.7" x="10"/>
+ <path id="basic-f08-de.svgpath969" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" fill-opacity="0.75" transform="translate(10 3278.1) matrix(.99777 0 0 .93574 .12843 -1529.6)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#80765b"/>
+ <path id="basic-f08-de.svgpath970" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" fill-opacity=".26769" transform="translate(10 3278.1) matrix(.99777 0 0 .93574 35.037 -1529)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#d0765b"/>
+ <path id="basic-f08-de.svgpath971" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3278.1) matrix(.99777 0 0 .93574 70.391 -1529)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#12c097"/>
+ <path id="basic-f08-de.svgpath972" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3278.1) matrix(.99777 0 0 .93574 104.18 -1529)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#e7da05"/>
+ <path id="basic-f08-de.svgpath973" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3278.1) matrix(.99777 0 0 .93574 135.99 -1529)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#3d0fa1"/>
+ <path id="basic-f08-de.svgpath974" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" fill-opacity=".74902" transform="translate(10 3278.1) matrix(.99777 0 0 .93574 167.81 -1529)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#6fe225"/>
+ <path id="basic-f08-de.svgpath975" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3278.1) matrix(.99777 0 0 .93574 199.63 -1529)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#ff3077"/>
+ <rect id="d0e574" display="none" height="1e3px" width="288" y="3325.3" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e572"/>
+ <use y="0" x="0" xlink:href="#d0e574"/>
</flowRegion>
<flowDiv xml:space="preserve">Mit dem Reiter »Farbe der Kontur« kann man die <flowSpan font-style="italic">Kontur</flowSpan> (Außenlinie) des Objektes entfernen, oder ihr eine beliebige Farbe und Deckkraft zuordnen:</flowDiv>
</flowRoot>
- <path id="basic-f09-de.svgpath1010" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3393.1) matrix(.99850 0 0 .93643 .81318 -1530.2)" xmlns:cc="http://creativecommons.org/ns#" fill="#dbdbdb"/>
- <path id="basic-f09-de.svgpath1011" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3393.1) matrix(.99850 0 0 .93643 27.358 -1530.2)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#dbdbdb"/>
- <path id="basic-f09-de.svgpath1012" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" stroke-opacity=".15692" fill-rule="evenodd" transform="translate(10 3393.1) matrix(.99850 0 0 .93643 57.22 -1530.2)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#dbdbdb"/>
- <path id="basic-f09-de.svgpath1013" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3393.1) matrix(.99850 0 0 .93643 83.765 -1530.2)" stroke="#f00" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#dbdbdb"/>
- <path id="basic-f09-de.svgpath1014" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3393.1) matrix(.99850 0 0 .93643 113.63 -1530.2)" stroke="#00ff7c" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#dbdbdb"/>
- <path id="basic-f09-de.svgpath1015" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3393.1) matrix(.99850 0 0 .93643 146.81 -1530.2)" stroke="#16417c" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#dbdbdb"/>
- <path id="basic-f09-de.svgpath1016" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3393.1) matrix(.99850 0 0 .93643 176.67 -1530.2)" stroke="#7c7016" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#dbdbdb"/>
- <path id="basic-f09-de.svgpath1017" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3393.1) matrix(.99850 0 0 .93643 203.21 -1530.2)" xmlns:cc="http://creativecommons.org/ns#" fill="#dbdbdb"/>
- <rect id="d0e588" display="none" height="1e3px" width="288" y="3439.7" x="10"/>
+ <path id="basic-f09-de.svgpath1010" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3370.7) matrix(.99850 0 0 .93643 .81318 -1530.2)" xmlns:cc="http://creativecommons.org/ns#" fill="#dbdbdb"/>
+ <path id="basic-f09-de.svgpath1011" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3370.7) matrix(.99850 0 0 .93643 27.358 -1530.2)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#dbdbdb"/>
+ <path id="basic-f09-de.svgpath1012" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" stroke-opacity=".15692" fill-rule="evenodd" transform="translate(10 3370.7) matrix(.99850 0 0 .93643 57.22 -1530.2)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#dbdbdb"/>
+ <path id="basic-f09-de.svgpath1013" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3370.7) matrix(.99850 0 0 .93643 83.765 -1530.2)" stroke="#f00" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#dbdbdb"/>
+ <path id="basic-f09-de.svgpath1014" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3370.7) matrix(.99850 0 0 .93643 113.63 -1530.2)" stroke="#00ff7c" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#dbdbdb"/>
+ <path id="basic-f09-de.svgpath1015" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3370.7) matrix(.99850 0 0 .93643 146.81 -1530.2)" stroke="#16417c" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#dbdbdb"/>
+ <path id="basic-f09-de.svgpath1016" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3370.7) matrix(.99850 0 0 .93643 176.67 -1530.2)" stroke="#7c7016" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="#dbdbdb"/>
+ <path id="basic-f09-de.svgpath1017" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3370.7) matrix(.99850 0 0 .93643 203.21 -1530.2)" xmlns:cc="http://creativecommons.org/ns#" fill="#dbdbdb"/>
+ <rect id="d0e590" display="none" height="1e3px" width="288" y="3417.3" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e588"/>
+ <use y="0" x="0" xlink:href="#d0e590"/>
</flowRegion>
<flowDiv xml:space="preserve">Der letzte Reiter »Muster der Kontur« dient zum Einstellen der Breite und anderer Eigenschaften der Kontur:</flowDiv>
</flowRoot>
- <path id="basic-f10-de.svgpath1033" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3476.2) matrix(.98881 0 0 .92734 3.8016 -1511.2)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".012105" fill="#dbdbdb"/>
- <path id="basic-f10-de.svgpath1034" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3476.2) matrix(.98881 0 0 .92734 30.089 -1511.2)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="2.4211" fill="#dbdbdb"/>
- <path id="basic-f10-de.svgpath1035" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3476.2) matrix(.98881 0 0 .92734 62.947 -1511.2)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="9.6842" fill="#dbdbdb"/>
- <path id="basic-f10-de.svgpath1036" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3476.2) matrix(.98881 0 0 .92734 95.806 -1511.2)" stroke="#000" stroke-dasharray="1.81578, 3.63157" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1.8158" fill="#dbdbdb"/>
- <path id="basic-f10-de.svgpath1037" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3476.2) matrix(.98881 0 0 .92734 131.95 -1511.2)" stroke="#000" stroke-dasharray="7.26312, 7.26312" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1.8158" fill="#dbdbdb"/>
- <path id="basic-f10-de.svgpath1038" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3476.2) matrix(.98881 0 0 .92734 168.1 -1511.2)" stroke="#000" stroke-dasharray="7.26312, 3.63156, 1.81578, 3.63156" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1.8158" fill="#dbdbdb"/>
- <path id="basic-f10-de.svgpath1039" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3476.2) matrix(.98881 0 0 .92734 204.24 -1511.2)" stroke="#000" stroke-dasharray="0.847366, 0.847366" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".84737" fill="#dbdbdb"/>
- <rect id="d0e601" display="none" height="1e3px" width="288" y="3530.2" x="10"/>
+ <path id="basic-f10-de.svgpath1033" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3453.8) matrix(.98881 0 0 .92734 3.8016 -1511.2)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".012105" fill="#dbdbdb"/>
+ <path id="basic-f10-de.svgpath1034" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3453.8) matrix(.98881 0 0 .92734 30.089 -1511.2)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="2.4211" fill="#dbdbdb"/>
+ <path id="basic-f10-de.svgpath1035" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3453.8) matrix(.98881 0 0 .92734 62.947 -1511.2)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="9.6842" fill="#dbdbdb"/>
+ <path id="basic-f10-de.svgpath1036" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3453.8) matrix(.98881 0 0 .92734 95.806 -1511.2)" stroke="#000" stroke-dasharray="1.81578, 3.63157" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1.8158" fill="#dbdbdb"/>
+ <path id="basic-f10-de.svgpath1037" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3453.8) matrix(.98881 0 0 .92734 131.95 -1511.2)" stroke="#000" stroke-dasharray="7.26312, 7.26312" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1.8158" fill="#dbdbdb"/>
+ <path id="basic-f10-de.svgpath1038" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3453.8) matrix(.98881 0 0 .92734 168.1 -1511.2)" stroke="#000" stroke-dasharray="7.26312, 3.63156, 1.81578, 3.63156" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1.8158" fill="#dbdbdb"/>
+ <path id="basic-f10-de.svgpath1039" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3453.8) matrix(.98881 0 0 .92734 204.24 -1511.2)" stroke="#000" stroke-dasharray="0.847366, 0.847366" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".84737" fill="#dbdbdb"/>
+ <rect id="d0e603" display="none" height="1e3px" width="288" y="3507.8" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e601"/>
+ <use y="0" x="0" xlink:href="#d0e603"/>
</flowRegion>
<flowDiv xml:space="preserve">Statt einer einfachen Farbe kann man auch <flowSpan font-style="italic">Farbverläufe</flowSpan> für Füllung und/oder Kontur benutzen:</flowDiv>
</flowRoot>
@@ -488,42 +488,42 @@
<stop id="basic-f11-de.svgstop1089" stop-color="#aba6a6" stop-opacity=".24314" offset="1"/>
</radialGradient>
</defs>
- <path id="basic-f11-de.svgpath1053" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3565.7) matrix(1.0663 0 0 1 -1.6488 -1632.8)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f11-de.svglinearGradient1054)"/>
- <path id="basic-f11-de.svgpath1055" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3565.7) matrix(1.0663 0 0 1 26.698 -1632.8)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f11-de.svglinearGradient1059)"/>
- <path id="basic-f11-de.svgpath1060" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3565.7) matrix(1.0663 0 0 1 62.131 -1632.8)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f11-de.svgradialGradient1061)"/>
- <path id="basic-f11-de.svgpath1065" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3565.7) matrix(1.0663 0 0 1 94.02 -1632.8)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f11-de.svgradialGradient1069)"/>
- <path id="basic-f11-de.svgpath1073" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3565.7) matrix(1.0663 0 0 1 136.54 -1632.8)" stroke="url(#basic-f11-de.svglinearGradient1074)" xmlns:cc="http://creativecommons.org/ns#" stroke-width="3.6437" fill="url(#basic-f11-de.svgradialGradient1090)"/>
- <path id="basic-f11-de.svgpath1075" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3565.7) matrix(-1.0663 0 0 -1 263.1 1673.3)" stroke="url(#basic-f11-de.svgradialGradient1076)" xmlns:cc="http://creativecommons.org/ns#" stroke-width="3.6437" fill="url(#basic-f11-de.svgradialGradient1083)"/>
- <path id="basic-f11-de.svgpath1084" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3565.7) matrix(1.0663 0 0 1 214.49 -1632.8)" stroke="url(#basic-f11-de.svgradialGradient1085)" stroke-dasharray="3.64368, 3.64368" xmlns:cc="http://creativecommons.org/ns#" stroke-width="3.6437" fill="url(#basic-f11-de.svgradialGradient1086)"/>
- <rect id="d0e617" display="none" height="1e3px" width="288" y="3617" x="10"/>
+ <path id="basic-f11-de.svgpath1053" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3543.3) matrix(1.0663 0 0 1 -1.6488 -1632.8)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f11-de.svglinearGradient1054)"/>
+ <path id="basic-f11-de.svgpath1055" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3543.3) matrix(1.0663 0 0 1 26.698 -1632.8)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f11-de.svglinearGradient1059)"/>
+ <path id="basic-f11-de.svgpath1060" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3543.3) matrix(1.0663 0 0 1 62.131 -1632.8)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f11-de.svgradialGradient1061)"/>
+ <path id="basic-f11-de.svgpath1065" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3543.3) matrix(1.0663 0 0 1 94.02 -1632.8)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f11-de.svgradialGradient1069)"/>
+ <path id="basic-f11-de.svgpath1073" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3543.3) matrix(1.0663 0 0 1 136.54 -1632.8)" stroke="url(#basic-f11-de.svglinearGradient1074)" xmlns:cc="http://creativecommons.org/ns#" stroke-width="3.6437" fill="url(#basic-f11-de.svgradialGradient1090)"/>
+ <path id="basic-f11-de.svgpath1075" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3543.3) matrix(-1.0663 0 0 -1 263.1 1673.3)" stroke="url(#basic-f11-de.svgradialGradient1076)" xmlns:cc="http://creativecommons.org/ns#" stroke-width="3.6437" fill="url(#basic-f11-de.svgradialGradient1083)"/>
+ <path id="basic-f11-de.svgpath1084" d="m67.136 1653c0 9.8338-12.415 17.806-27.73 17.806s-27.73-7.9719-27.73-17.806c0-9.8338 12.415-17.806 27.73-17.806s27.73 7.9719 27.73 17.806z" fill-rule="evenodd" transform="translate(10 3543.3) matrix(1.0663 0 0 1 214.49 -1632.8)" stroke="url(#basic-f11-de.svgradialGradient1085)" stroke-dasharray="3.64368, 3.64368" xmlns:cc="http://creativecommons.org/ns#" stroke-width="3.6437" fill="url(#basic-f11-de.svgradialGradient1086)"/>
+ <rect id="d0e619" display="none" height="1e3px" width="288" y="3594.6" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e617"/>
+ <use y="0" x="0" xlink:href="#d0e619"/>
</flowRegion>
<flowDiv xml:space="preserve">Wenn man von einer einfachen Farbe auf einen Farbverlauf umschaltet, hat der neue Farbverlauf an beiden Enden zunächst die zuvor eingestellte Farbe - an einem Ende ist diese voll deckend, am anderen komplett transparent. Schalten Sie zum Farbverlaufswerkzeug (<flowSpan font-weight="bold">Strg+F1</flowSpan>), um die <flowSpan font-style="italic">Verlaufs-Anfasser</flowSpan> zu verschieben – das sind durch Linien verbundene Anfasser, mit denen man Richtung und Länge des Verlaufs einstellen kann. Wenn einer der Verlaufs-Anfasser ausgewählt ist (blau hervorgehoben), dann setzt der Dialog »Füllung und Kontur« nur die Farbe dieses einen Anfassers statt der Farbe des ganzen Objekts.</flowDiv>
</flowRoot>
- <rect id="d0e626" display="none" height="1e3px" width="288" y="3730.6" x="10"/>
+ <rect id="d0e628" display="none" height="1e3px" width="288" y="3708.2" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e626"/>
+ <use y="0" x="0" xlink:href="#d0e628"/>
</flowRegion>
<flowDiv xml:space="preserve">Eine andere praktische Möglichkeit, die Farbe eines Objektes zu ändern, ist die Pipette (<flowSpan font-weight="bold">F7</flowSpan>). <flowSpan font-weight="bold">Klicken</flowSpan> Sie einfach mit der Pipette auf die Zeichnung, und die dort gewählte Farbe wird automatisch als Füllfarbe für das aktuelle Objekt benutzt. (<flowSpan font-weight="bold">Umschalt+Klick</flowSpan> ändert die Farbe der Kontur.)</flowDiv>
</flowRoot>
- <text style="writing-mode:lr" font-weight="bold" font-size="8" y="3803.352469000001" x="10" font-family="sans-serif" fill="#000000">
- <tspan y="3803.352469000001" x="10">Duplizieren, Ausrichten, Verteilen</tspan>
+ <text style="writing-mode:lr" font-weight="bold" font-size="8" y="3780.9396580000007" x="10" font-family="sans-serif" fill="#000000">
+ <tspan y="3780.9396580000007" x="10">Duplizieren, Ausrichten, Verteilen</tspan>
</text>
- <rect id="d0e644" display="none" height="1e3px" width="288" y="3808.6" x="10"/>
+ <rect id="d0e646" display="none" height="1e3px" width="288" y="3786.1" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e644"/>
+ <use y="0" x="0" xlink:href="#d0e646"/>
</flowRegion>
<flowDiv xml:space="preserve">Einer der häufigsten Arbeitsschritte ist das <flowSpan font-style="italic">Duplizieren</flowSpan> eines Objekts (<flowSpan font-weight="bold">Strg+D</flowSpan>). Die Kopie des Objektes liegt danach direkt über dem kopierten Objekt und ist ausgewählt, so dass es sofort mit der Maus oder den Pfeiltasten verschoben werden kann. Versuchen Sie doch einmal zur Übung, Kopien des schwarzen Quadrats in einer Linie nebeneinander anzuordnen:</flowDiv>
</flowRoot>
- <rect id="basic-f12-de.svgrect1117" fill-rule="evenodd" transform="translate(10 3886)" height="11.092" width="11.092" y=".90725" x="-.11450"/>
- <rect id="d0e663" display="none" height="1e3px" width="288" y="3909.1" x="10"/>
+ <rect id="basic-f12-de.svgrect1117" fill-rule="evenodd" transform="translate(10 3863.6)" height="11.092" width="11.092" y=".90725" x="-.11450"/>
+ <rect id="d0e665" display="none" height="1e3px" width="288" y="3886.7" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e663"/>
+ <use y="0" x="0" xlink:href="#d0e665"/>
</flowRegion>
<flowDiv xml:space="preserve">Es ist gut möglich, dass Ihre Quadrate jetzt einigermaßen zufällig platziert sind. Hier hilft der Dialog »Ausrichten und Verteilen« (<flowSpan font-weight="bold">Strg+Umschalt+A</flowSpan>). Wählen Sie alle Quadrate aus (mit <flowSpan font-weight="bold">Umschalt+Klick</flowSpan> oder dem Gummiband), öffnen Sie dann den Dialog und drücken »Zentren horizontal ausrichten«. Danach benutzen Sie »Horizontale Abstände zwischen Objekten ausgleichen« (lesen Sie die Tooltips der Schaltflächen). Die Objekte sind jetzt gleichmäßig ausgerichtet und verteilt. Hier sind weitere Übungsmöglichkeiten für Sie:</flowDiv>
</flowRoot>
@@ -542,187 +542,187 @@
<stop id="basic-f13-de.svgstop843" stop-color="#0082ab" stop-opacity="0" offset="1"/>
</linearGradient>
</defs>
- <path id="basic-f13-de.svgpolygon1671" d="m223 2147.6-20.927 0.3454-20.927 0.3453 10.165-18.296 10.165-18.296 10.763 17.951z" fill-rule="evenodd" fill-opacity=".75" transform="translate(10 4009.5) matrix(-1 0 0 1 413.56 -2103.4)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1670)"/>
- <path id="basic-f13-de.svgpolygon1672" d="m207.75 2141.8 10.137-17.003 10.137-17.003 9.6564 17.28 9.6564 17.28-19.793-0.2772z" fill-rule="evenodd" fill-opacity=".75" transform="translate(10 4009.5) matrix(-1 0 0 1 413.44 -2098.4)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1669)"/>
- <path id="basic-f13-de.svgpolygon1673" d="m218.9 2147.6 5.4312-11.938 5.4312-11.938 7.6235 10.673 7.6235 10.673-13.055 1.2656z" fill-rule="evenodd" fill-opacity=".75" transform="translate(10 4009.5) matrix(-1 0 0 1 433.5 -2109.1)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1668)"/>
- <path id="basic-f13-de.svgpolygon1674" d="m221.83 2157 7.5821-10.246 7.5821-10.246 5.0823 11.689 5.0823 11.689-12.664-1.4432z" fill-rule="evenodd" fill-opacity=".75" transform="translate(10 4009.5) matrix(-1 0 0 1 445.33 -2121.6)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1667)"/>
- <path id="basic-f13-de.svgpolygon1675" d="m232.98 2163.5 3.6889-6.8247 3.6889-6.8246 4.0658 6.607 4.0658 6.607-7.7548 0.2176z" fill-rule="evenodd" fill-opacity=".75" transform="translate(10 4009.5) matrix(-1 0 0 1 411.97 -2130)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1666)"/>
- <path id="basic-f13-de.svgpolygon1676" d="m241.78 2168.2 4.8233-6.8928 4.8233-6.8927 3.5576 7.6235 3.5576 7.6234-8.3809-0.7307z" fill-rule="evenodd" fill-opacity=".75" transform="translate(10 4009.5) matrix(-1 0 0 1 429.68 -2135.4)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1665)"/>
- <path id="basic-f13-de.svgpolygon1677" d="m254.11 2170.5 2.1825-5.3681 2.1825-5.368 3.5576 4.5741 3.5576 4.5741-5.7401 0.7939z" fill-rule="evenodd" fill-opacity=".75" transform="translate(10 4009.5) matrix(-1 0 0 1 450.9 -2138.5)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1664)"/>
- <path id="basic-f13-de.svgpath1622" d="m30.105 4.9279l53.602 14.362" transform="translate(10 4009.5)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="none"/>
- <path id="basic-f13-de.svgpath1623" d="m27.562 9.2561l53.602 14.363" transform="translate(10 4009.5)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="none"/>
- <path id="basic-f13-de.svgpath1624" d="m25.019 13.584l53.602 14.363" transform="translate(10 4009.5)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="none"/>
- <path id="basic-f13-de.svgpath1625" d="m22.476 17.913l53.602 14.362" transform="translate(10 4009.5)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="none"/>
- <path id="basic-f13-de.svgpath1626" d="m19.933 22.241l53.602 14.362" transform="translate(10 4009.5)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="none"/>
- <path id="basic-f13-de.svgpath1627" d="m17.39 26.569l53.602 14.363" transform="translate(10 4009.5)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="none"/>
- <path id="basic-f13-de.svgpath1628" d="m14.847 30.897l53.602 14.363" transform="translate(10 4009.5)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="none"/>
- <path id="basic-f13-de.svgpath1629" d="m12.304 35.225l53.602 14.363" transform="translate(10 4009.5)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="none"/>
- <path id="basic-f13-de.svgpath1630" d="m9.761 39.554l53.602 14.362" transform="translate(10 4009.5)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="none"/>
- <path id="basic-f13-de.svgpath1641" sodipodi:revolution="3.0000000" sodipodi:radius="9.1857243" d="m131.46 2120.6c0.41 0.2-0.08 0.7-0.35 0.7-0.72 0.1-1.12-0.7-1.02-1.4 0.17-1.1 1.39-1.6 2.39-1.3 1.47 0.4 2.15 2 1.71 3.4-0.58 1.8-2.69 2.7-4.45 2.1-2.21-0.8-3.19-3.4-2.39-5.5 0.96-2.6 4-3.7 6.5-2.8 2.95 1.2 4.25 4.7 3.08 7.6-1.34 3.3-5.3 4.7-8.56 3.4-3.69-1.5-5.29-6-3.76-9.6 1.72-4.1 6.61-5.8 10.61-4.1 4.44 1.9 6.36 7.3 4.45 11.6" transform="translate(10 4009.5) matrix(1.9012e-16 .61410 -.61410 1.9012e-16 1424.3 -31.314)" stroke="#000" sodipodi:argument="-18.385908" sodipodi:cy="2120.6279" sodipodi:cx="131.45540" sodipodi:expansion="1.0000000" sodipodi:type="spiral" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" sodipodi:t0="0.0000000" fill="none"/>
- <path id="basic-f13-de.svgpath1642" sodipodi:revolution="3.0000000" sodipodi:radius="12.600299" d="m143.19 2128.8c0.56 0.3-0.12 0.9-0.49 1-0.99 0.1-1.52-1.1-1.37-1.9 0.27-1.5 1.96-2.2 3.33-1.8 2 0.5 2.89 2.8 2.25 4.7-0.85 2.5-3.77 3.6-6.16 2.7-3.01-1.1-4.29-4.7-3.13-7.6 1.39-3.5 5.59-5 9-3.6 4.01 1.7 5.68 6.5 4.01 10.5-1.94 4.5-7.42 6.3-11.84 4.4-5.02-2.2-7.1-8.3-4.89-13.2 2.48-5.6 9.23-7.8 14.67-5.4 6.04 2.8 8.51 10.2 5.77 16.1" transform="translate(10 4009.5) matrix(1.9012e-16 .61410 -.61410 1.9012e-16 1440.6 -40.555)" stroke="#000" sodipodi:argument="-18.365078" sodipodi:cy="2128.8440" sodipodi:cx="143.19247" sodipodi:expansion="1.0000000" sodipodi:type="spiral" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" sodipodi:t0="0.0000000" fill="none"/>
- <path id="basic-f13-de.svgpath1643" sodipodi:revolution="3.0000000" sodipodi:radius="25.200598" d="m154.34 2141.8c1.12 0.5-0.24 1.8-0.98 1.8-1.99 0.2-3.03-2.1-2.73-3.8 0.53-3 3.92-4.4 6.65-3.6 4 1.1 5.77 5.7 4.5 9.5-1.7 5-7.55 7.1-12.33 5.3-6.01-2.2-8.57-9.3-6.26-15.1 2.8-7 11.18-10 18-7.2 8.03 3.4 11.38 13 8.02 20.9-3.88 9-14.82 12.8-23.67 8.9-10.05-4.4-14.2-16.7-9.78-26.5 4.95-11.1 18.47-15.6 29.34-10.7 12.07 5.5 17.02 20.3 11.54 32.2" transform="translate(10 4009.5) matrix(1.9012e-16 .61410 -.61410 1.9012e-16 1424.3 -54.931)" stroke="#000" sodipodi:argument="-18.365078" sodipodi:cy="2141.7546" sodipodi:cx="154.34271" sodipodi:expansion="1.0000000" sodipodi:type="spiral" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" sodipodi:t0="0.0000000" fill="none"/>
- <path id="basic-f13-de.svgpath1644" sodipodi:revolution="3.0000000" sodipodi:radius="19.674946" d="m177.23 2161.1c0.94 0.3 0.07 1.4-0.49 1.6-1.51 0.4-2.63-1.2-2.64-2.6-0.01-2.3 2.39-3.9 4.6-3.7 3.23 0.3 5.24 3.6 4.79 6.7-0.6 4.1-4.78 6.5-8.71 5.8-4.93-0.8-7.89-5.9-6.94-10.7 1.16-5.8 7.18-9.2 12.81-8 6.64 1.4 10.57 8.3 9.1 14.8-1.7 7.5-9.58 11.9-16.92 10.2-8.34-2-13.25-10.8-11.25-19 2.24-9.2 11.98-14.6 21.03-12.3 10.04 2.5 15.93 13.2 13.4 23.1" transform="translate(10 4009.5) matrix(1.9012e-16 .61410 -.61410 1.9012e-16 1424.3 -65.819)" stroke="#000" sodipodi:argument="-18.546671" sodipodi:cy="2161.1208" sodipodi:cx="177.23004" sodipodi:expansion="1.0000000" sodipodi:type="spiral" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" sodipodi:t0="0.0000000" fill="none"/>
- <path id="basic-f13-de.svgpath1645" sodipodi:revolution="3.0000000" sodipodi:radius="12.600299" d="m143.19 2128.8c0.56 0.3-0.12 0.9-0.49 1-0.99 0.1-1.52-1.1-1.37-1.9 0.27-1.5 1.96-2.2 3.33-1.8 2 0.5 2.89 2.8 2.25 4.7-0.85 2.5-3.77 3.6-6.16 2.7-3.01-1.1-4.29-4.7-3.13-7.6 1.39-3.5 5.59-5 9-3.6 4.01 1.7 5.68 6.5 4.01 10.5-1.94 4.5-7.42 6.3-11.84 4.4-5.02-2.2-7.1-8.3-4.89-13.2 2.48-5.6 9.23-7.8 14.67-5.4 6.04 2.8 8.51 10.2 5.77 16.1" transform="translate(10 4009.5) matrix(4.753e-17 .15352 -.15352 4.753e-17 473.62 31.043)" stroke="#000" sodipodi:argument="-18.365078" sodipodi:cy="2128.8440" sodipodi:cx="143.19247" sodipodi:expansion="1.0000000" sodipodi:type="spiral" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" sodipodi:t0="0.0000000" fill="none"/>
- <path id="basic-f13-de.svgpath1646" sodipodi:revolution="3.0000000" sodipodi:radius="12.600299" d="m143.19 2128.8c0.56 0.3-0.12 0.9-0.49 1-0.99 0.1-1.52-1.1-1.37-1.9 0.27-1.5 1.96-2.2 3.33-1.8 2 0.5 2.89 2.8 2.25 4.7-0.85 2.5-3.77 3.6-6.16 2.7-3.01-1.1-4.29-4.7-3.13-7.6 1.39-3.5 5.59-5 9-3.6 4.01 1.7 5.68 6.5 4.01 10.5-1.94 4.5-7.42 6.3-11.84 4.4-5.02-2.2-7.1-8.3-4.89-13.2 2.48-5.6 9.23-7.8 14.67-5.4 6.04 2.8 8.51 10.2 5.77 16.1" transform="translate(10 4009.5) matrix(9.506e-17 .30705 -.30705 9.506e-17 806.81 7.1768)" stroke="#000" sodipodi:argument="-18.365078" sodipodi:cy="2128.8440" sodipodi:cx="143.19247" sodipodi:expansion="1.0000000" sodipodi:type="spiral" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" sodipodi:t0="0.0000000" fill="none"/>
- <path id="basic-f13-de.svgpath1647" sodipodi:revolution="3.0000000" sodipodi:radius="12.600299" d="m143.19 2128.8c0.56 0.3-0.12 0.9-0.49 1-0.99 0.1-1.52-1.1-1.37-1.9 0.27-1.5 1.96-2.2 3.33-1.8 2 0.5 2.89 2.8 2.25 4.7-0.85 2.5-3.77 3.6-6.16 2.7-3.01-1.1-4.29-4.7-3.13-7.6 1.39-3.5 5.59-5 9-3.6 4.01 1.7 5.68 6.5 4.01 10.5-1.94 4.5-7.42 6.3-11.84 4.4-5.02-2.2-7.1-8.3-4.89-13.2 2.48-5.6 9.23-7.8 14.67-5.4 6.04 2.8 8.51 10.2 5.77 16.1" transform="translate(10 4009.5) matrix(3.8024e-16 1.2282 -1.2282 3.8024e-16 2753.8 -136.02)" stroke="#000" sodipodi:argument="-18.365078" sodipodi:cy="2128.8440" sodipodi:cx="143.19247" sodipodi:expansion="1.0000000" sodipodi:type="spiral" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" sodipodi:t0="0.0000000" fill="none"/>
- <path id="basic-f13-de.svgpath1648" sodipodi:revolution="3.0000000" sodipodi:radius="12.600299" d="m143.19 2128.8c0.56 0.3-0.12 0.9-0.49 1-0.99 0.1-1.52-1.1-1.37-1.9 0.27-1.5 1.96-2.2 3.33-1.8 2 0.5 2.89 2.8 2.25 4.7-0.85 2.5-3.77 3.6-6.16 2.7-3.01-1.1-4.29-4.7-3.13-7.6 1.39-3.5 5.59-5 9-3.6 4.01 1.7 5.68 6.5 4.01 10.5-1.94 4.5-7.42 6.3-11.84 4.4-5.02-2.2-7.1-8.3-4.89-13.2 2.48-5.6 9.23-7.8 14.67-5.4 6.04 2.8 8.51 10.2 5.77 16.1" transform="translate(10 4009.5) matrix(7.6048e-16 2.4564 -2.4564 7.6048e-16 5347.5 -326.94)" stroke="#000" sodipodi:argument="-18.365078" sodipodi:cy="2128.8440" sodipodi:cx="143.19247" sodipodi:expansion="1.0000000" sodipodi:type="spiral" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".125" sodipodi:t0="0.0000000" fill="none"/>
- <path id="basic-f13-de.svgpolygon1649" d="m223 2147.6-20.927 0.3454-20.927 0.3453 10.165-18.296 10.165-18.296 10.763 17.951z" fill-rule="evenodd" fill-opacity=".75" transform="translate(13.589 1906.1)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1670)"/>
- <path id="basic-f13-de.svgpolygon1650" d="m207.75 2141.8 10.137-17.003 10.137-17.003 9.6564 17.28 9.6564 17.28-19.793-0.2772z" fill-rule="evenodd" fill-opacity=".75" transform="translate(13.701 1911.1)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1669)"/>
- <path id="basic-f13-de.svgpolygon1651" d="m218.9 2147.6 5.4312-11.938 5.4312-11.938 7.6235 10.673 7.6235 10.673-13.055 1.2656z" fill-rule="evenodd" fill-opacity=".75" transform="translate(-6.352 1900.4)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1668)"/>
- <path id="basic-f13-de.svgpolygon1652" d="m221.83 2157 7.5821-10.246 7.5821-10.246 5.0823 11.689 5.0823 11.689-12.664-1.4432z" fill-rule="evenodd" fill-opacity=".75" transform="translate(-18.189 1887.9)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1667)"/>
- <path id="basic-f13-de.svgpolygon1653" d="m232.98 2163.5 3.6889-6.8247 3.6889-6.8246 4.0658 6.607 4.0658 6.607-7.7548 0.2176z" fill-rule="evenodd" fill-opacity=".75" transform="translate(15.175 1879.5)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1666)"/>
- <path id="basic-f13-de.svgpolygon1654" d="m241.78 2168.2 4.8233-6.8928 4.8233-6.8927 3.5576 7.6235 3.5576 7.6234-8.3809-0.7307z" fill-rule="evenodd" fill-opacity=".75" transform="translate(-2.53 1874.1)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1665)"/>
- <path id="basic-f13-de.svgpolygon1655" d="m254.11 2170.5 2.1825-5.3681 2.1825-5.368 3.5576 4.5741 3.5576 4.5741-5.7401 0.7939z" fill-rule="evenodd" fill-opacity=".75" transform="translate(-23.757 1871)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1664)"/>
- <path id="basic-f13-de.svgpath1678" sodipodi:revolution="3.0000000" sodipodi:radius="12.600299" d="m143.19 2128.8c0.56 0.3-0.12 0.9-0.49 1-0.99 0.1-1.52-1.1-1.37-1.9 0.27-1.5 1.96-2.2 3.33-1.8 2 0.5 2.89 2.8 2.25 4.7-0.85 2.5-3.77 3.6-6.16 2.7-3.01-1.1-4.29-4.7-3.13-7.6 1.39-3.5 5.59-5 9-3.6 4.01 1.7 5.68 6.5 4.01 10.5-1.94 4.5-7.42 6.3-11.84 4.4-5.02-2.2-7.1-8.3-4.89-13.2 2.48-5.6 9.23-7.8 14.67-5.4 6.04 2.8 8.51 10.2 5.77 16.1" transform="translate(10 4009.5) matrix(1.0825e-16 .34966 -.34966 1.0825e-16 853.98 .69279)" stroke="#000" sodipodi:argument="-18.365078" sodipodi:cy="2128.8440" sodipodi:cx="143.19247" sodipodi:expansion="1.0000000" sodipodi:type="spiral" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" sodipodi:t0="0.0000000" fill="none"/>
- <path id="basic-f13-de.svgpath1679" d="m175.2 51.728c-0.04 0.96-0.08 2.054-1.1 2.797" transform="translate(10 4009.5)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".36291pt" fill="none"/>
- <path id="basic-f13-de.svgpath1680" d="m182.3 51.84c0 0.743-0.46 2.115-0.37 3.02" transform="translate(10 4009.5)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".36291pt" fill="none"/>
- <path id="basic-f13-de.svgpath1681" d="m188.65 51.951c0.2 0.696 0.08 1.788 1.84 2.574" transform="translate(10 4009.5)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".36291pt" fill="none"/>
- <path id="basic-f13-de.svgpath1682" d="m197.68 51.504c-0.21 0.667-1.86 2.562-1.1 3.245" transform="translate(10 4009.5)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".36291pt" fill="none"/>
- <path id="basic-f13-de.svgpath1683" d="m204.82 52.287c-0.28 0.399-1.35 1.802 0 2.35" transform="translate(10 4009.5)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".36291pt" fill="none"/>
- <path id="basic-f13-de.svgpath1684" d="m211.03 51.504c0.09 0.927-0.48 1.881 1.84 2.909" transform="translate(10 4009.5)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".36291pt" fill="none"/>
- <path id="basic-f13-de.svgpath1685" d="m220.14 51.951c0.08 0.57-0.99 1.563-1.47 2.462" transform="translate(10 4009.5)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".36291pt" fill="none"/>
- <path id="basic-f13-de.svgpath1686" d="m225.4 51.84c0.02 0.436 0.19 1.722 2.94 2.349" transform="translate(10 4009.5)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".36291pt" fill="none"/>
- <path id="basic-f13-de.svgpath1687" d="m233.97 52.063c0 0.158-0.21 1.613 0.74 2.238" transform="translate(10 4009.5)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".36291pt" fill="none"/>
- <path id="basic-f13-de.svgpath1688" d="m238.47 51.84c1.06 1.233 1.13 2.685 6.63 3.58" transform="translate(10 4009.5)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".36291pt" fill="none"/>
- <path id="basic-f13-de.svgpath1689" d="m248.88 52.511c0 0.84-0.1 1.67 0.74 2.461" transform="translate(10 4009.5)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".36291pt" fill="none"/>
- <text style="writing-mode:lr" font-weight="bold" font-size="8" y="4090.343688000001" x="10" font-family="sans-serif" fill="#000000">
- <tspan y="4090.343688000001" x="10">Z-Ordnung</tspan>
+ <path id="basic-f13-de.svgpolygon1671" d="m223 2147.6-20.927 0.3454-20.927 0.3453 10.165-18.296 10.165-18.296 10.763 17.951z" fill-rule="evenodd" fill-opacity=".75" transform="translate(10 3987.1) matrix(-1 0 0 1 413.56 -2103.4)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1670)"/>
+ <path id="basic-f13-de.svgpolygon1672" d="m207.75 2141.8 10.137-17.003 10.137-17.003 9.6564 17.28 9.6564 17.28-19.793-0.2772z" fill-rule="evenodd" fill-opacity=".75" transform="translate(10 3987.1) matrix(-1 0 0 1 413.44 -2098.4)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1669)"/>
+ <path id="basic-f13-de.svgpolygon1673" d="m218.9 2147.6 5.4312-11.938 5.4312-11.938 7.6235 10.673 7.6235 10.673-13.055 1.2656z" fill-rule="evenodd" fill-opacity=".75" transform="translate(10 3987.1) matrix(-1 0 0 1 433.5 -2109.1)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1668)"/>
+ <path id="basic-f13-de.svgpolygon1674" d="m221.83 2157 7.5821-10.246 7.5821-10.246 5.0823 11.689 5.0823 11.689-12.664-1.4432z" fill-rule="evenodd" fill-opacity=".75" transform="translate(10 3987.1) matrix(-1 0 0 1 445.33 -2121.6)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1667)"/>
+ <path id="basic-f13-de.svgpolygon1675" d="m232.98 2163.5 3.6889-6.8247 3.6889-6.8246 4.0658 6.607 4.0658 6.607-7.7548 0.2176z" fill-rule="evenodd" fill-opacity=".75" transform="translate(10 3987.1) matrix(-1 0 0 1 411.97 -2130)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1666)"/>
+ <path id="basic-f13-de.svgpolygon1676" d="m241.78 2168.2 4.8233-6.8928 4.8233-6.8927 3.5576 7.6235 3.5576 7.6234-8.3809-0.7307z" fill-rule="evenodd" fill-opacity=".75" transform="translate(10 3987.1) matrix(-1 0 0 1 429.68 -2135.4)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1665)"/>
+ <path id="basic-f13-de.svgpolygon1677" d="m254.11 2170.5 2.1825-5.3681 2.1825-5.368 3.5576 4.5741 3.5576 4.5741-5.7401 0.7939z" fill-rule="evenodd" fill-opacity=".75" transform="translate(10 3987.1) matrix(-1 0 0 1 450.9 -2138.5)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1664)"/>
+ <path id="basic-f13-de.svgpath1622" d="m30.105 4.9279l53.602 14.362" transform="translate(10 3987.1)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="none"/>
+ <path id="basic-f13-de.svgpath1623" d="m27.562 9.2561l53.602 14.363" transform="translate(10 3987.1)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="none"/>
+ <path id="basic-f13-de.svgpath1624" d="m25.019 13.584l53.602 14.363" transform="translate(10 3987.1)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="none"/>
+ <path id="basic-f13-de.svgpath1625" d="m22.476 17.913l53.602 14.362" transform="translate(10 3987.1)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="none"/>
+ <path id="basic-f13-de.svgpath1626" d="m19.933 22.241l53.602 14.362" transform="translate(10 3987.1)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="none"/>
+ <path id="basic-f13-de.svgpath1627" d="m17.39 26.569l53.602 14.363" transform="translate(10 3987.1)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="none"/>
+ <path id="basic-f13-de.svgpath1628" d="m14.847 30.897l53.602 14.363" transform="translate(10 3987.1)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="none"/>
+ <path id="basic-f13-de.svgpath1629" d="m12.304 35.225l53.602 14.363" transform="translate(10 3987.1)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="none"/>
+ <path id="basic-f13-de.svgpath1630" d="m9.761 39.554l53.602 14.362" transform="translate(10 3987.1)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" fill="none"/>
+ <path id="basic-f13-de.svgpath1641" sodipodi:revolution="3.0000000" sodipodi:radius="9.1857243" d="m131.46 2120.6c0.41 0.2-0.08 0.7-0.35 0.7-0.72 0.1-1.12-0.7-1.02-1.4 0.17-1.1 1.39-1.6 2.39-1.3 1.47 0.4 2.15 2 1.71 3.4-0.58 1.8-2.69 2.7-4.45 2.1-2.21-0.8-3.19-3.4-2.39-5.5 0.96-2.6 4-3.7 6.5-2.8 2.95 1.2 4.25 4.7 3.08 7.6-1.34 3.3-5.3 4.7-8.56 3.4-3.69-1.5-5.29-6-3.76-9.6 1.72-4.1 6.61-5.8 10.61-4.1 4.44 1.9 6.36 7.3 4.45 11.6" transform="translate(10 3987.1) matrix(1.9012e-16 .61410 -.61410 1.9012e-16 1424.3 -31.314)" stroke="#000" sodipodi:argument="-18.385908" sodipodi:cy="2120.6279" sodipodi:cx="131.45540" sodipodi:expansion="1.0000000" sodipodi:type="spiral" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" sodipodi:t0="0.0000000" fill="none"/>
+ <path id="basic-f13-de.svgpath1642" sodipodi:revolution="3.0000000" sodipodi:radius="12.600299" d="m143.19 2128.8c0.56 0.3-0.12 0.9-0.49 1-0.99 0.1-1.52-1.1-1.37-1.9 0.27-1.5 1.96-2.2 3.33-1.8 2 0.5 2.89 2.8 2.25 4.7-0.85 2.5-3.77 3.6-6.16 2.7-3.01-1.1-4.29-4.7-3.13-7.6 1.39-3.5 5.59-5 9-3.6 4.01 1.7 5.68 6.5 4.01 10.5-1.94 4.5-7.42 6.3-11.84 4.4-5.02-2.2-7.1-8.3-4.89-13.2 2.48-5.6 9.23-7.8 14.67-5.4 6.04 2.8 8.51 10.2 5.77 16.1" transform="translate(10 3987.1) matrix(1.9012e-16 .61410 -.61410 1.9012e-16 1440.6 -40.555)" stroke="#000" sodipodi:argument="-18.365078" sodipodi:cy="2128.8440" sodipodi:cx="143.19247" sodipodi:expansion="1.0000000" sodipodi:type="spiral" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" sodipodi:t0="0.0000000" fill="none"/>
+ <path id="basic-f13-de.svgpath1643" sodipodi:revolution="3.0000000" sodipodi:radius="25.200598" d="m154.34 2141.8c1.12 0.5-0.24 1.8-0.98 1.8-1.99 0.2-3.03-2.1-2.73-3.8 0.53-3 3.92-4.4 6.65-3.6 4 1.1 5.77 5.7 4.5 9.5-1.7 5-7.55 7.1-12.33 5.3-6.01-2.2-8.57-9.3-6.26-15.1 2.8-7 11.18-10 18-7.2 8.03 3.4 11.38 13 8.02 20.9-3.88 9-14.82 12.8-23.67 8.9-10.05-4.4-14.2-16.7-9.78-26.5 4.95-11.1 18.47-15.6 29.34-10.7 12.07 5.5 17.02 20.3 11.54 32.2" transform="translate(10 3987.1) matrix(1.9012e-16 .61410 -.61410 1.9012e-16 1424.3 -54.931)" stroke="#000" sodipodi:argument="-18.365078" sodipodi:cy="2141.7546" sodipodi:cx="154.34271" sodipodi:expansion="1.0000000" sodipodi:type="spiral" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" sodipodi:t0="0.0000000" fill="none"/>
+ <path id="basic-f13-de.svgpath1644" sodipodi:revolution="3.0000000" sodipodi:radius="19.674946" d="m177.23 2161.1c0.94 0.3 0.07 1.4-0.49 1.6-1.51 0.4-2.63-1.2-2.64-2.6-0.01-2.3 2.39-3.9 4.6-3.7 3.23 0.3 5.24 3.6 4.79 6.7-0.6 4.1-4.78 6.5-8.71 5.8-4.93-0.8-7.89-5.9-6.94-10.7 1.16-5.8 7.18-9.2 12.81-8 6.64 1.4 10.57 8.3 9.1 14.8-1.7 7.5-9.58 11.9-16.92 10.2-8.34-2-13.25-10.8-11.25-19 2.24-9.2 11.98-14.6 21.03-12.3 10.04 2.5 15.93 13.2 13.4 23.1" transform="translate(10 3987.1) matrix(1.9012e-16 .61410 -.61410 1.9012e-16 1424.3 -65.819)" stroke="#000" sodipodi:argument="-18.546671" sodipodi:cy="2161.1208" sodipodi:cx="177.23004" sodipodi:expansion="1.0000000" sodipodi:type="spiral" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" sodipodi:t0="0.0000000" fill="none"/>
+ <path id="basic-f13-de.svgpath1645" sodipodi:revolution="3.0000000" sodipodi:radius="12.600299" d="m143.19 2128.8c0.56 0.3-0.12 0.9-0.49 1-0.99 0.1-1.52-1.1-1.37-1.9 0.27-1.5 1.96-2.2 3.33-1.8 2 0.5 2.89 2.8 2.25 4.7-0.85 2.5-3.77 3.6-6.16 2.7-3.01-1.1-4.29-4.7-3.13-7.6 1.39-3.5 5.59-5 9-3.6 4.01 1.7 5.68 6.5 4.01 10.5-1.94 4.5-7.42 6.3-11.84 4.4-5.02-2.2-7.1-8.3-4.89-13.2 2.48-5.6 9.23-7.8 14.67-5.4 6.04 2.8 8.51 10.2 5.77 16.1" transform="translate(10 3987.1) matrix(4.753e-17 .15352 -.15352 4.753e-17 473.62 31.043)" stroke="#000" sodipodi:argument="-18.365078" sodipodi:cy="2128.8440" sodipodi:cx="143.19247" sodipodi:expansion="1.0000000" sodipodi:type="spiral" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" sodipodi:t0="0.0000000" fill="none"/>
+ <path id="basic-f13-de.svgpath1646" sodipodi:revolution="3.0000000" sodipodi:radius="12.600299" d="m143.19 2128.8c0.56 0.3-0.12 0.9-0.49 1-0.99 0.1-1.52-1.1-1.37-1.9 0.27-1.5 1.96-2.2 3.33-1.8 2 0.5 2.89 2.8 2.25 4.7-0.85 2.5-3.77 3.6-6.16 2.7-3.01-1.1-4.29-4.7-3.13-7.6 1.39-3.5 5.59-5 9-3.6 4.01 1.7 5.68 6.5 4.01 10.5-1.94 4.5-7.42 6.3-11.84 4.4-5.02-2.2-7.1-8.3-4.89-13.2 2.48-5.6 9.23-7.8 14.67-5.4 6.04 2.8 8.51 10.2 5.77 16.1" transform="translate(10 3987.1) matrix(9.506e-17 .30705 -.30705 9.506e-17 806.81 7.1768)" stroke="#000" sodipodi:argument="-18.365078" sodipodi:cy="2128.8440" sodipodi:cx="143.19247" sodipodi:expansion="1.0000000" sodipodi:type="spiral" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" sodipodi:t0="0.0000000" fill="none"/>
+ <path id="basic-f13-de.svgpath1647" sodipodi:revolution="3.0000000" sodipodi:radius="12.600299" d="m143.19 2128.8c0.56 0.3-0.12 0.9-0.49 1-0.99 0.1-1.52-1.1-1.37-1.9 0.27-1.5 1.96-2.2 3.33-1.8 2 0.5 2.89 2.8 2.25 4.7-0.85 2.5-3.77 3.6-6.16 2.7-3.01-1.1-4.29-4.7-3.13-7.6 1.39-3.5 5.59-5 9-3.6 4.01 1.7 5.68 6.5 4.01 10.5-1.94 4.5-7.42 6.3-11.84 4.4-5.02-2.2-7.1-8.3-4.89-13.2 2.48-5.6 9.23-7.8 14.67-5.4 6.04 2.8 8.51 10.2 5.77 16.1" transform="translate(10 3987.1) matrix(3.8024e-16 1.2282 -1.2282 3.8024e-16 2753.8 -136.02)" stroke="#000" sodipodi:argument="-18.365078" sodipodi:cy="2128.8440" sodipodi:cx="143.19247" sodipodi:expansion="1.0000000" sodipodi:type="spiral" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" sodipodi:t0="0.0000000" fill="none"/>
+ <path id="basic-f13-de.svgpath1648" sodipodi:revolution="3.0000000" sodipodi:radius="12.600299" d="m143.19 2128.8c0.56 0.3-0.12 0.9-0.49 1-0.99 0.1-1.52-1.1-1.37-1.9 0.27-1.5 1.96-2.2 3.33-1.8 2 0.5 2.89 2.8 2.25 4.7-0.85 2.5-3.77 3.6-6.16 2.7-3.01-1.1-4.29-4.7-3.13-7.6 1.39-3.5 5.59-5 9-3.6 4.01 1.7 5.68 6.5 4.01 10.5-1.94 4.5-7.42 6.3-11.84 4.4-5.02-2.2-7.1-8.3-4.89-13.2 2.48-5.6 9.23-7.8 14.67-5.4 6.04 2.8 8.51 10.2 5.77 16.1" transform="translate(10 3987.1) matrix(7.6048e-16 2.4564 -2.4564 7.6048e-16 5347.5 -326.94)" stroke="#000" sodipodi:argument="-18.365078" sodipodi:cy="2128.8440" sodipodi:cx="143.19247" sodipodi:expansion="1.0000000" sodipodi:type="spiral" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".125" sodipodi:t0="0.0000000" fill="none"/>
+ <path id="basic-f13-de.svgpolygon1649" d="m223 2147.6-20.927 0.3454-20.927 0.3453 10.165-18.296 10.165-18.296 10.763 17.951z" fill-rule="evenodd" fill-opacity=".75" transform="translate(13.589 1883.7)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1670)"/>
+ <path id="basic-f13-de.svgpolygon1650" d="m207.75 2141.8 10.137-17.003 10.137-17.003 9.6564 17.28 9.6564 17.28-19.793-0.2772z" fill-rule="evenodd" fill-opacity=".75" transform="translate(13.701 1888.7)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1669)"/>
+ <path id="basic-f13-de.svgpolygon1651" d="m218.9 2147.6 5.4312-11.938 5.4312-11.938 7.6235 10.673 7.6235 10.673-13.055 1.2656z" fill-rule="evenodd" fill-opacity=".75" transform="translate(-6.352 1878)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1668)"/>
+ <path id="basic-f13-de.svgpolygon1652" d="m221.83 2157 7.5821-10.246 7.5821-10.246 5.0823 11.689 5.0823 11.689-12.664-1.4432z" fill-rule="evenodd" fill-opacity=".75" transform="translate(-18.189 1865.5)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1667)"/>
+ <path id="basic-f13-de.svgpolygon1653" d="m232.98 2163.5 3.6889-6.8247 3.6889-6.8246 4.0658 6.607 4.0658 6.607-7.7548 0.2176z" fill-rule="evenodd" fill-opacity=".75" transform="translate(15.175 1857.1)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1666)"/>
+ <path id="basic-f13-de.svgpolygon1654" d="m241.78 2168.2 4.8233-6.8928 4.8233-6.8927 3.5576 7.6235 3.5576 7.6234-8.3809-0.7307z" fill-rule="evenodd" fill-opacity=".75" transform="translate(-2.53 1851.7)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1665)"/>
+ <path id="basic-f13-de.svgpolygon1655" d="m254.11 2170.5 2.1825-5.3681 2.1825-5.368 3.5576 4.5741 3.5576 4.5741-5.7401 0.7939z" fill-rule="evenodd" fill-opacity=".75" transform="translate(-23.757 1848.6)" xmlns:cc="http://creativecommons.org/ns#" fill="url(#basic-f13-de.svgradialGradient1664)"/>
+ <path id="basic-f13-de.svgpath1678" sodipodi:revolution="3.0000000" sodipodi:radius="12.600299" d="m143.19 2128.8c0.56 0.3-0.12 0.9-0.49 1-0.99 0.1-1.52-1.1-1.37-1.9 0.27-1.5 1.96-2.2 3.33-1.8 2 0.5 2.89 2.8 2.25 4.7-0.85 2.5-3.77 3.6-6.16 2.7-3.01-1.1-4.29-4.7-3.13-7.6 1.39-3.5 5.59-5 9-3.6 4.01 1.7 5.68 6.5 4.01 10.5-1.94 4.5-7.42 6.3-11.84 4.4-5.02-2.2-7.1-8.3-4.89-13.2 2.48-5.6 9.23-7.8 14.67-5.4 6.04 2.8 8.51 10.2 5.77 16.1" transform="translate(10 3987.1) matrix(1.0825e-16 .34966 -.34966 1.0825e-16 853.98 .69279)" stroke="#000" sodipodi:argument="-18.365078" sodipodi:cy="2128.8440" sodipodi:cx="143.19247" sodipodi:expansion="1.0000000" sodipodi:type="spiral" xmlns:cc="http://creativecommons.org/ns#" stroke-width="1pt" sodipodi:t0="0.0000000" fill="none"/>
+ <path id="basic-f13-de.svgpath1679" d="m175.2 51.728c-0.04 0.96-0.08 2.054-1.1 2.797" transform="translate(10 3987.1)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".36291pt" fill="none"/>
+ <path id="basic-f13-de.svgpath1680" d="m182.3 51.84c0 0.743-0.46 2.115-0.37 3.02" transform="translate(10 3987.1)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".36291pt" fill="none"/>
+ <path id="basic-f13-de.svgpath1681" d="m188.65 51.951c0.2 0.696 0.08 1.788 1.84 2.574" transform="translate(10 3987.1)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".36291pt" fill="none"/>
+ <path id="basic-f13-de.svgpath1682" d="m197.68 51.504c-0.21 0.667-1.86 2.562-1.1 3.245" transform="translate(10 3987.1)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".36291pt" fill="none"/>
+ <path id="basic-f13-de.svgpath1683" d="m204.82 52.287c-0.28 0.399-1.35 1.802 0 2.35" transform="translate(10 3987.1)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".36291pt" fill="none"/>
+ <path id="basic-f13-de.svgpath1684" d="m211.03 51.504c0.09 0.927-0.48 1.881 1.84 2.909" transform="translate(10 3987.1)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".36291pt" fill="none"/>
+ <path id="basic-f13-de.svgpath1685" d="m220.14 51.951c0.08 0.57-0.99 1.563-1.47 2.462" transform="translate(10 3987.1)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".36291pt" fill="none"/>
+ <path id="basic-f13-de.svgpath1686" d="m225.4 51.84c0.02 0.436 0.19 1.722 2.94 2.349" transform="translate(10 3987.1)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".36291pt" fill="none"/>
+ <path id="basic-f13-de.svgpath1687" d="m233.97 52.063c0 0.158-0.21 1.613 0.74 2.238" transform="translate(10 3987.1)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".36291pt" fill="none"/>
+ <path id="basic-f13-de.svgpath1688" d="m238.47 51.84c1.06 1.233 1.13 2.685 6.63 3.58" transform="translate(10 3987.1)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".36291pt" fill="none"/>
+ <path id="basic-f13-de.svgpath1689" d="m248.88 52.511c0 0.84-0.1 1.67 0.74 2.461" transform="translate(10 3987.1)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".36291pt" fill="none"/>
+ <text style="writing-mode:lr" font-weight="bold" font-size="8" y="4067.9308770000007" x="10" font-family="sans-serif" fill="#000000">
+ <tspan y="4067.9308770000007" x="10">Z-Ordnung</tspan>
</text>
- <rect id="d0e688" display="none" height="1e3px" width="288" y="4095.5" x="10"/>
+ <rect id="d0e690" display="none" height="1e3px" width="288" y="4073.1" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e688"/>
+ <use y="0" x="0" xlink:href="#d0e690"/>
</flowRegion>
- <flowDiv xml:space="preserve">Der Begriff <flowSpan font-style="italic">Z-Ordnung</flowSpan> beschreibt die Stapelordnung von Objekten in einer Zeichnung – d.h. welche Objekte oben liegen und dadurch andere, darunterliegende, Objekte verdecken. Die zwei Befehle im Objektmenü, »Nach ganz oben anheben« (die <flowSpan font-weight="bold">Pos 1</flowSpan>-Taste) und »Nach ganz unten absenken« (die <flowSpan font-weight="bold">Ende</flowSpan>-Taste), bringen das ausgewählte Objekt nach ganz oben oder ganz unten in der Z-Ordnung der aktuellen Ebene. Zwei weitere Befehle, »Anheben« (<flowSpan font-weight="bold">Bild hoch</flowSpan>) und »Absenken« (<flowSpan font-weight="bold">Bild runter</flowSpan>), heben oder senken das ausgewählte Objekt <flowSpan font-style="italic">nur um eine Stufe</flowSpan>; das heißt, sie bewegen das Objekt an einem einzigen, nicht ausgewählten, Objekt in der Z-Ordnung vorbei. (Dazu zählen nur Objekte, die mit ihrem Begrenzungsrahmen die Auswahl überdecken).</flowDiv>
+ <flowDiv xml:space="preserve">Der Begriff <flowSpan font-style="italic">Z-Ordnung</flowSpan> beschreibt die Stapelordnung von Objekten in einer Zeichnung – d.h. welche Objekte oben liegen und dadurch andere, darunterliegende, Objekte verdecken. Die zwei Befehle im Objektmenü, »Nach ganz oben anheben« (die <flowSpan font-weight="bold">Pos 1</flowSpan>-Taste) und »Nach ganz unten absenken« (die <flowSpan font-weight="bold">Ende</flowSpan>-Taste), bringen das ausgewählte Objekt nach ganz oben oder ganz unten in der Z-Ordnung der aktuellen Ebene. Zwei weitere Befehle, »Anheben« (<flowSpan font-weight="bold">Bild hoch</flowSpan>) und »Absenken« (<flowSpan font-weight="bold">Bild runter</flowSpan>), heben oder senken das ausgewählte Objekt <flowSpan font-style="italic">nur um eine Stufe</flowSpan>; das heißt, sie bewegen das Objekt an einem einzigen, nicht ausgewählten, Objekt in der Z-Ordnung vorbei. (Dazu zählen nur Objekte, die die Auswahl überdecken. Wenn nichts die Auswahl überdeckt, dann bewirken Bild hoch und Bild runter das gleiche wie die Tasten Pos1 und Ende).</flowDiv>
</flowRoot>
- <rect id="d0e709" display="none" height="1e3px" width="288" y="4229.9" x="10"/>
+ <rect id="d0e711" display="none" height="1e3px" width="288" y="4218.7" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e709"/>
+ <use y="0" x="0" xlink:href="#d0e711"/>
</flowRegion>
<flowDiv xml:space="preserve">Üben Sie diese Befehle, indem Sie die Z-Ordnung der Objekte unten umkehren, so dass am Ende die ganz linke Ellipse oben und die ganz rechte Ellipse unten liegt:</flowDiv>
</flowRoot>
- <path id="basic-f14-de.svgpath1127" d="m70.423 2348c0 7.6166-10.51 13.791-23.474 13.791s-23.474-6.1744-23.474-13.791 10.51-13.791 23.474-13.791 23.474 6.1745 23.474 13.791z" fill-rule="evenodd" transform="translate(10 4278.3) matrix(1.3625 0 0 1.7447 16.798 -4067.1)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".39901" fill="#f90"/>
- <path id="basic-f14-de.svgpath1128" d="m100.94 2351.2c0 9.7234-11.429 17.606-25.528 17.606s-25.528-7.8823-25.528-17.606c0-9.7233 11.429-17.606 25.528-17.606s25.528 7.8823 25.528 17.606z" fill-rule="evenodd" transform="translate(10 4278.3) matrix(1 0 0 1.0513 31.763 -2451.9)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="0.6" fill="#f90"/>
- <path id="basic-f14-de.svgpath1129" d="m119.72 2349.5c0 7.4546-9.7215 13.498-21.714 13.498s-21.714-6.0431-21.714-13.498c0-7.4545 9.7215-13.498 21.714-13.498s21.714 6.0431 21.714 13.498z" fill-rule="evenodd" transform="translate(10 4278.3) matrix(1 0 0 1.0513 34.11 -2439.6)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="0.6" fill="#f90"/>
- <path id="basic-f14-de.svgpath1130" d="m129.69 2348c0 5.3478-5.7804 9.6831-12.911 9.6831-7.1304 0-12.911-4.3353-12.911-9.6831 0-5.3479 5.7804-9.6831 12.911-9.6831 7.1304 0 12.911 4.3352 12.911 9.6831z" fill-rule="evenodd" transform="translate(10 4278.3) matrix(1 0 0 1.0513 36.436 -2449.6)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="0.6" fill="#f90"/>
- <path id="basic-f14-de.svgpath1131" d="m142.61 2347.1c0 4.2135-5.2549 7.6291-11.737 7.6291-6.4822 0-11.737-3.4156-11.737-7.6291 0-4.2134 5.2549-7.6291 11.737-7.6291 6.4822 0 11.737 3.4157 11.737 7.6291z" fill-rule="evenodd" transform="translate(10 4278.3) matrix(1 0 0 1.0513 37.632 -2444.9)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="0.6" fill="#f90"/>
- <path id="basic-f14-de.svgpath1132" d="m150.23 2347.4c0 3.079-3.2843 5.5751-7.3357 5.5751s-7.3357-2.4961-7.3357-5.5751c0-3.0791 3.2843-5.5751 7.3357-5.5751s7.3357 2.496 7.3357 5.5751z" fill-rule="evenodd" transform="translate(10 4278.3) matrix(1 0 0 1.0513 37.045 -2450.2)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="0.6" fill="#f90"/>
- <rect id="d0e722" display="none" height="1e3px" width="288" y="4343.1" x="10"/>
+ <path id="basic-f14-de.svgpath1127" d="m70.423 2348c0 7.6166-10.51 13.791-23.474 13.791s-23.474-6.1744-23.474-13.791 10.51-13.791 23.474-13.791 23.474 6.1745 23.474 13.791z" fill-rule="evenodd" transform="translate(10 4267.1) matrix(1.3625 0 0 1.7447 16.798 -4067.1)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width=".39901" fill="#f90"/>
+ <path id="basic-f14-de.svgpath1128" d="m100.94 2351.2c0 9.7234-11.429 17.606-25.528 17.606s-25.528-7.8823-25.528-17.606c0-9.7233 11.429-17.606 25.528-17.606s25.528 7.8823 25.528 17.606z" fill-rule="evenodd" transform="translate(10 4267.1) matrix(1 0 0 1.0513 31.763 -2451.9)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="0.6" fill="#f90"/>
+ <path id="basic-f14-de.svgpath1129" d="m119.72 2349.5c0 7.4546-9.7215 13.498-21.714 13.498s-21.714-6.0431-21.714-13.498c0-7.4545 9.7215-13.498 21.714-13.498s21.714 6.0431 21.714 13.498z" fill-rule="evenodd" transform="translate(10 4267.1) matrix(1 0 0 1.0513 34.11 -2439.6)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="0.6" fill="#f90"/>
+ <path id="basic-f14-de.svgpath1130" d="m129.69 2348c0 5.3478-5.7804 9.6831-12.911 9.6831-7.1304 0-12.911-4.3353-12.911-9.6831 0-5.3479 5.7804-9.6831 12.911-9.6831 7.1304 0 12.911 4.3352 12.911 9.6831z" fill-rule="evenodd" transform="translate(10 4267.1) matrix(1 0 0 1.0513 36.436 -2449.6)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="0.6" fill="#f90"/>
+ <path id="basic-f14-de.svgpath1131" d="m142.61 2347.1c0 4.2135-5.2549 7.6291-11.737 7.6291-6.4822 0-11.737-3.4156-11.737-7.6291 0-4.2134 5.2549-7.6291 11.737-7.6291 6.4822 0 11.737 3.4157 11.737 7.6291z" fill-rule="evenodd" transform="translate(10 4267.1) matrix(1 0 0 1.0513 37.632 -2444.9)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="0.6" fill="#f90"/>
+ <path id="basic-f14-de.svgpath1132" d="m150.23 2347.4c0 3.079-3.2843 5.5751-7.3357 5.5751s-7.3357-2.4961-7.3357-5.5751c0-3.0791 3.2843-5.5751 7.3357-5.5751s7.3357 2.496 7.3357 5.5751z" fill-rule="evenodd" transform="translate(10 4267.1) matrix(1 0 0 1.0513 37.045 -2450.2)" stroke="#000" xmlns:cc="http://creativecommons.org/ns#" stroke-width="0.6" fill="#f90"/>
+ <rect id="d0e724" display="none" height="1e3px" width="288" y="4331.9" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e722"/>
+ <use y="0" x="0" xlink:href="#d0e724"/>
</flowRegion>
<flowDiv xml:space="preserve">Eine sehr nützliche Auswahlhilfe ist die <flowSpan font-weight="bold">Tab</flowSpan>-Taste. Wenn nichts ausgewählt ist, dann wählt sie das unterste Objekt; andernfalls wählt sie das Objekt <flowSpan font-style="italic">über den markierten Objekten</flowSpan> in Z-Ordnung. <flowSpan font-weight="bold">Umschalt+Tab</flowSpan> arbeitet genau anders herum – man beginnt beim obersten Objekt und arbeitet sich dann nach unten. Objekte, die man neu erzeugt, liegen zuoberst auf dem Stapel, und so wählt <flowSpan font-weight="bold">Umschalt+Tab</flowSpan> praktischerweise das zuletzt erzeugte Objekt, solange nichts anderes markiert ist. Üben Sie <flowSpan font-weight="bold">Tab</flowSpan> und <flowSpan font-weight="bold">Umschalt+Tab</flowSpan> ein wenig an dem Stapel Ellipsen oben.</flowDiv>
</flowRoot>
- <text style="writing-mode:lr" font-weight="bold" font-size="8" y="4458.831041" x="10" font-family="sans-serif" fill="#000000">
- <tspan y="4458.831041" x="10">Verdeckte Objekte auswählen und verschieben</tspan>
+ <text style="writing-mode:lr" font-weight="bold" font-size="8" y="4447.58948" x="10" font-family="sans-serif" fill="#000000">
+ <tspan y="4447.58948" x="10">Verdeckte Objekte auswählen und verschieben</tspan>
</text>
- <rect id="d0e749" display="none" height="1e3px" width="288" y="4464" x="10"/>
+ <rect id="d0e751" display="none" height="1e3px" width="288" y="4452.8" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e749"/>
+ <use y="0" x="0" xlink:href="#d0e751"/>
</flowRegion>
<flowDiv xml:space="preserve">Wie kommt man an ein Objekt heran, das von einem anderen verdeckt wird? Es kann sein, das man das untere Objekt zwar sehen kann, wenn das obere Objekt (teilweise) durchsichtig ist. Doch bei dem Versuch, es auszuwählen, markiert man das obere Objekt und nicht das, das man haben möchte.</flowDiv>
</flowRoot>
- <rect id="d0e752" display="none" height="1e3px" width="288" y="4523.8" x="10"/>
+ <rect id="d0e754" display="none" height="1e3px" width="288" y="4512.5" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e752"/>
+ <use y="0" x="0" xlink:href="#d0e754"/>
</flowRegion>
<flowDiv xml:space="preserve">Dafür gibt es <flowSpan font-weight="bold">Alt+Klick</flowSpan>. Mit dem ersten <flowSpan font-weight="bold">Alt+Klick</flowSpan> wählt man das oberste Objekt, genau wie mit einem gewöhnlichen Klick. Das nächste Mal <flowSpan font-weight="bold">Alt+Klick</flowSpan> an der gleichen Stelle wählt jedoch das Objekt <flowSpan font-style="italic">unter</flowSpan> dem obersten; dann das nächste darunter, noch eines tiefer u.s.w. Auf diese Weise kommt man durch mehrere <flowSpan font-weight="bold">Alt+Klick</flowSpan>s nacheinander von ganz oben nach ganz unten, durch den ganzen Z-Ordnungsstapel von Objekten an der Stelle des Klicks. Wenn das unterste Objekt erreicht ist, wird durch das nächste <flowSpan font-weight="bold">Alt+Klick</flowSpan> natürlich wieder das oberste Objekt markiert.</flowDiv>
</flowRoot>
- <rect id="d0e773" display="none" height="1e3px" width="288" y="4626.8" x="10"/>
+ <rect id="d0e775" display="none" height="1e3px" width="288" y="4615.5" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e773"/>
+ <use y="0" x="0" xlink:href="#d0e775"/>
</flowRegion>
<flowDiv xml:space="preserve">[Wenn Sie unter Linux arbeiten, dann könnte es sein, dass <flowSpan font-weight="bold">Alt+Klick</flowSpan> nicht korrekt funktioniert und stattdessen z.B. das ganze Inkscape-Fenster verschiebt. Dies passiert, wenn Ihr Fenstermanager Alt+Klick für eine andere Aktion reserviert hat. Sie können in diesem Fall im Einstellungsdialog für Ihren Fenstermanager das Fensterverhalten anders einstellen, indem Sie die Aktion für diese Tastenkombination abschalten, oder sie auf die Meta-Taste (meist gleichbedeutend mit der Windows-Taste) umstellen. Dies erlaubt es Inkscape und anderen Anwendungen, die Alt-Taste frei zu verwenden.]</flowDiv>
</flowRoot>
- <rect id="d0e779" display="none" height="1e3px" width="288" y="4729.8" x="10"/>
+ <rect id="d0e781" display="none" height="1e3px" width="288" y="4718.6" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e779"/>
+ <use y="0" x="0" xlink:href="#d0e781"/>
</flowRegion>
<flowDiv xml:space="preserve">Das ist zwar schön, aber was kann man mit einem markierten und verdeckten Objekt anfangen? Man kann es durch Tastaturbefehle verändern, und man kann die Anfasser benutzen. Aber beim Versuch, das Objekt selbst mit der Maus zu verschieben, wird automatisch wieder das oberste Objekt markiert. (So funktioniert »Klicken und Ziehen« nunmal – es wählt das (oberste) Objekt unter dem Mauszeiger, dann verschiebt es das gewählte Objekt). Um Inkscape mitzuteilen, das man das <flowSpan font-style="italic">gerade gewählte</flowSpan> Objekt verschieben will, und nicht etwa ein anderes auswählen möchte, benutzt man <flowSpan font-weight="bold">Alt+Ziehen</flowSpan>. Das verschiebt das aktuell markierte Objekt, egal wo man mit der Maus hinklickt.</flowDiv>
</flowRoot>
- <rect id="d0e788" display="none" height="1e3px" width="288" y="4852.5" x="10"/>
+ <rect id="d0e790" display="none" height="1e3px" width="288" y="4841.2" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e788"/>
+ <use y="0" x="0" xlink:href="#d0e790"/>
</flowRegion>
<flowDiv xml:space="preserve">Üben Sie <flowSpan font-weight="bold">Alt+Klick</flowSpan> und <flowSpan font-weight="bold">Alt+Ziehen</flowSpan> an den zwei braunen Objekten unter dem transparent-grünen Rechteck:</flowDiv>
</flowRoot>
- <path id="basic-f15-de.svgpath2575" sodipodi:sides="7" inkscape:flatsided="false" fill="#ac7335" style="color:#000000" transform="translate(10 4890.2) matrix(.39512 .68437 -.68437 .39512 2780 -1592.9)" inkscape:rounded="0.21000000" sodipodi:r1="28.739008" sodipodi:r2="16.983238" sodipodi:arg1="0.52143444" sodipodi:arg2="0.97023339" sodipodi:type="star" d="m126.89 3940.5c-1.71 2.8-13.23-2-15.92-0.2-2.69 1.7-2.72 13.9-5.86 14.5-3.14 0.5-6.349-10.3-9.539-11.1s-13.307 5.7-15.627 3.5 6.076-11.8 4.656-14.7c-1.419-3-12.432-3.1-12.315-6.3s12.009-3.8 13.505-6.6c1.495-2.7-2.945-13.2-0.399-15.1 2.547-1.8 10.874 5.7 14.077 5.1 3.202-0.6 7.302-9.5 10.362-8.7 3.07 0.9 0.25 11.3 2.78 13.4 2.53 2 12.65-0.8 13.8 2.2 1.16 3.1-8.72 9.8-8.76 13-0.04 3.1 10.95 8.3 9.24 11z" inkscape:randomized="0.047000000" sodipodi:cy="3927.1016" sodipodi:cx="100.73942"/>
- <path id="basic-f15-de.svgpath2574" sodipodi:sides="6" inkscape:flatsided="false" fill="#ff9400" style="color:#000000" transform="translate(10 4890.2) matrix(.83260 .48070 -.48070 .83260 1947.5 -3288.4)" inkscape:rounded="0.21000000" sodipodi:r1="19.212250" sodipodi:r2="9.3934679" sodipodi:arg1="0.48833395" sodipodi:arg2="0.77161843" sodipodi:type="star" d="m107.62 3941.6c-0.53 2.1-9.076-3.5-10.951-2.4-2.497 1.5-1.972 11.9-4.862 12.6-2.17 0.6-1.585-8.5-3.563-9.5-2.636-1.2-11.029 4.1-13.221 2.2-1.646-1.5 6.95-5.7 6.894-8-0.075-3-9.644-9.8-9.082-12.7 0.421-2.2 9.473 5.2 11.397 4 2.564-1.5 2.337-12.6 5.229-13.2 2.17-0.5 1.693 9 3.66 10.1 2.621 1.3 12.059-3.4 14.219-1.4 1.61 1.6-7.377 4.8-7.27 7 0.15 3 8.25 8.5 7.55 11.3z" inkscape:randomized="0.047000000" sodipodi:cy="3933.4641" sodipodi:cx="90.665482"/>
- <rect id="basic-f15-de.svgrect3197" ry="10.424" style="color:#000000" fill-opacity=".29609" rx="10.424" transform="translate(10 4890.2)" height="56.564" width="171.79" y="-.21458" x="44.416" fill="#2dd268"/>
- <text style="writing-mode:lr" font-weight="bold" font-size="8" y="4971.594589" x="10" font-family="sans-serif" fill="#000000">
- <tspan y="4971.594589" x="10">Ähnliche Objekte auswählen</tspan>
+ <path id="basic-f15-de.svgpath2575" sodipodi:sides="7" inkscape:flatsided="false" fill="#ac7335" style="color:#000000" transform="translate(10 4879) matrix(.39512 .68437 -.68437 .39512 2780 -1592.9)" inkscape:rounded="0.21000000" sodipodi:r1="28.739008" sodipodi:r2="16.983238" sodipodi:arg1="0.52143444" sodipodi:arg2="0.97023339" sodipodi:type="star" d="m126.89 3940.5c-1.71 2.8-13.23-2-15.92-0.2-2.69 1.7-2.72 13.9-5.86 14.5-3.14 0.5-6.349-10.3-9.539-11.1s-13.307 5.7-15.627 3.5 6.076-11.8 4.656-14.7c-1.419-3-12.432-3.1-12.315-6.3s12.009-3.8 13.505-6.6c1.495-2.7-2.945-13.2-0.399-15.1 2.547-1.8 10.874 5.7 14.077 5.1 3.202-0.6 7.302-9.5 10.362-8.7 3.07 0.9 0.25 11.3 2.78 13.4 2.53 2 12.65-0.8 13.8 2.2 1.16 3.1-8.72 9.8-8.76 13-0.04 3.1 10.95 8.3 9.24 11z" inkscape:randomized="0.047000000" sodipodi:cy="3927.1016" sodipodi:cx="100.73942"/>
+ <path id="basic-f15-de.svgpath2574" sodipodi:sides="6" inkscape:flatsided="false" fill="#ff9400" style="color:#000000" transform="translate(10 4879) matrix(.83260 .48070 -.48070 .83260 1947.5 -3288.4)" inkscape:rounded="0.21000000" sodipodi:r1="19.212250" sodipodi:r2="9.3934679" sodipodi:arg1="0.48833395" sodipodi:arg2="0.77161843" sodipodi:type="star" d="m107.62 3941.6c-0.53 2.1-9.076-3.5-10.951-2.4-2.497 1.5-1.972 11.9-4.862 12.6-2.17 0.6-1.585-8.5-3.563-9.5-2.636-1.2-11.029 4.1-13.221 2.2-1.646-1.5 6.95-5.7 6.894-8-0.075-3-9.644-9.8-9.082-12.7 0.421-2.2 9.473 5.2 11.397 4 2.564-1.5 2.337-12.6 5.229-13.2 2.17-0.5 1.693 9 3.66 10.1 2.621 1.3 12.059-3.4 14.219-1.4 1.61 1.6-7.377 4.8-7.27 7 0.15 3 8.25 8.5 7.55 11.3z" inkscape:randomized="0.047000000" sodipodi:cy="3933.4641" sodipodi:cx="90.665482"/>
+ <rect id="basic-f15-de.svgrect3197" ry="10.424" style="color:#000000" fill-opacity=".29609" rx="10.424" transform="translate(10 4879)" height="56.564" width="171.79" y="-.21458" x="44.416" fill="#2dd268"/>
+ <text style="writing-mode:lr" font-weight="bold" font-size="8" y="4960.3530279999995" x="10" font-family="sans-serif" fill="#000000">
+ <tspan y="4960.3530279999995" x="10">Ähnliche Objekte auswählen</tspan>
</text>
- <rect id="d0e813" display="none" height="1e3px" width="288" y="4976.8" x="10"/>
+ <rect id="d0e815" display="none" height="1e3px" width="288" y="4965.6" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e813"/>
+ <use y="0" x="0" xlink:href="#d0e815"/>
</flowRegion>
<flowDiv xml:space="preserve">Inkscape kann Objekte auswählen, die dem aktuell gewählten Objekt ähneln. Wenn man z.B. alle blauen Quadrate unten auswählen möchte, kann man einfach eines davon auswählen, und dann über das Menü <flowSpan font-family="sans-serif">Bearbeiten &gt; Das Gleiche auswählen &gt; Füllfarbe</flowSpan> verwenden. Alle Objekte mit derselben blauen Füllfarbe sind nun ausgewählt.</flowDiv>
</flowRoot>
- <rect id="basic-f16-de.svgrect4101" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="4.0448" x="48.992" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4105" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="21.722" x="48.992" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4107" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="38.895" x="48.992" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4115" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="4.0448" x="68.185" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4121" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="4.0448" x="86.873" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4127" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="4.0448" x="105.06" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4133" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="4.0448" x="122.73" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4139" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="4.0448" x="140.92" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4145" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="4.0448" x="159.6" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4151" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="4.0448" x="177.28" xmlns:cc="http://creativecommons.org/ns#" fill="#4e9a06"/>
- <rect id="basic-f16-de.svgrect4109" opacity="0.924" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" ry="0" width="15.152" y="4.0448" x="195.46" xmlns:cc="http://creativecommons.org/ns#" height="14.205" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4117" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="21.722" x="68.185" xmlns:cc="http://creativecommons.org/ns#" fill="#4e9a06"/>
- <rect id="basic-f16-de.svgrect4123" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="21.722" x="86.873" xmlns:cc="http://creativecommons.org/ns#" fill="#4e9a06"/>
- <rect id="basic-f16-de.svgrect4129" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="21.722" x="105.06" xmlns:cc="http://creativecommons.org/ns#" fill="#4e9a06"/>
- <rect id="basic-f16-de.svgrect4135" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="21.722" x="122.73" xmlns:cc="http://creativecommons.org/ns#" fill="#4e9a06"/>
- <rect id="basic-f16-de.svgrect4141" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="21.722" x="140.92" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4147" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="21.722" x="159.6" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4153" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="21.722" x="177.28" xmlns:cc="http://creativecommons.org/ns#" fill="#4e9a06"/>
- <rect id="basic-f16-de.svgrect4111" opacity="0.924" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" ry="0" width="15.152" y="21.722" x="195.46" xmlns:cc="http://creativecommons.org/ns#" height="14.205" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4119" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="38.895" x="68.185" xmlns:cc="http://creativecommons.org/ns#" fill="#4e9a06"/>
- <rect id="basic-f16-de.svgrect4125" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="38.895" x="86.873" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4131" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="38.895" x="105.06" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4137" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="38.895" x="122.73" xmlns:cc="http://creativecommons.org/ns#" fill="#4e9a06"/>
- <rect id="basic-f16-de.svgrect4143" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="38.895" x="140.92" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4149" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="38.895" x="159.6" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4155" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="38.895" x="177.28" xmlns:cc="http://creativecommons.org/ns#" fill="#4e9a06"/>
- <rect id="basic-f16-de.svgrect4113" opacity="0.924" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" ry="0" width="15.152" y="38.895" x="195.46" xmlns:cc="http://creativecommons.org/ns#" height="14.205" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4169" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="4.0448" x="9.5964" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4157" opacity="0.924" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" ry="0" width="15.152" y="4.0448" x="214.66" xmlns:cc="http://creativecommons.org/ns#" height="14.205" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4171" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="21.722" x="9.5964" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4159" opacity="0.924" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" ry="0" width="15.152" y="21.722" x="214.66" xmlns:cc="http://creativecommons.org/ns#" height="14.205" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4173" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="38.895" x="9.5964" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4161" opacity="0.924" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" ry="0" width="15.152" y="38.895" x="214.66" xmlns:cc="http://creativecommons.org/ns#" height="14.205" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4175" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="4.0448" x="28.789" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4163" opacity="0.924" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" ry="0" width="15.152" y="4.0448" x="233.85" xmlns:cc="http://creativecommons.org/ns#" height="14.205" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4177" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="21.722" x="28.789" xmlns:cc="http://creativecommons.org/ns#" fill="#4e9a06"/>
- <rect id="basic-f16-de.svgrect4165" opacity="0.924" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" ry="0" width="15.152" y="21.722" x="233.85" xmlns:cc="http://creativecommons.org/ns#" height="14.205" fill="#4e9a06"/>
- <rect id="basic-f16-de.svgrect4179" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" height="14.205" width="15.152" y="38.895" x="28.789" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
- <rect id="basic-f16-de.svgrect4167" opacity="0.924" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5045.3)" ry="0" width="15.152" y="38.895" x="233.85" xmlns:cc="http://creativecommons.org/ns#" height="14.205" fill="#204a87"/>
- <rect id="d0e829" display="none" height="1e3px" width="288" y="5106.3" x="10"/>
- <flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
- <flowRegion>
- <use y="0" x="0" xlink:href="#d0e829"/>
+ <rect id="basic-f16-de.svgrect4101" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="4.0448" x="48.992" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4105" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="21.722" x="48.992" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4107" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="38.895" x="48.992" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4115" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="4.0448" x="68.185" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4121" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="4.0448" x="86.873" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4127" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="4.0448" x="105.06" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4133" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="4.0448" x="122.73" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4139" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="4.0448" x="140.92" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4145" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="4.0448" x="159.6" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4151" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="4.0448" x="177.28" xmlns:cc="http://creativecommons.org/ns#" fill="#4e9a06"/>
+ <rect id="basic-f16-de.svgrect4109" opacity="0.924" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" ry="0" width="15.152" y="4.0448" x="195.46" xmlns:cc="http://creativecommons.org/ns#" height="14.205" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4117" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="21.722" x="68.185" xmlns:cc="http://creativecommons.org/ns#" fill="#4e9a06"/>
+ <rect id="basic-f16-de.svgrect4123" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="21.722" x="86.873" xmlns:cc="http://creativecommons.org/ns#" fill="#4e9a06"/>
+ <rect id="basic-f16-de.svgrect4129" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="21.722" x="105.06" xmlns:cc="http://creativecommons.org/ns#" fill="#4e9a06"/>
+ <rect id="basic-f16-de.svgrect4135" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="21.722" x="122.73" xmlns:cc="http://creativecommons.org/ns#" fill="#4e9a06"/>
+ <rect id="basic-f16-de.svgrect4141" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="21.722" x="140.92" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4147" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="21.722" x="159.6" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4153" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="21.722" x="177.28" xmlns:cc="http://creativecommons.org/ns#" fill="#4e9a06"/>
+ <rect id="basic-f16-de.svgrect4111" opacity="0.924" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" ry="0" width="15.152" y="21.722" x="195.46" xmlns:cc="http://creativecommons.org/ns#" height="14.205" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4119" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="38.895" x="68.185" xmlns:cc="http://creativecommons.org/ns#" fill="#4e9a06"/>
+ <rect id="basic-f16-de.svgrect4125" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="38.895" x="86.873" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4131" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="38.895" x="105.06" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4137" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="38.895" x="122.73" xmlns:cc="http://creativecommons.org/ns#" fill="#4e9a06"/>
+ <rect id="basic-f16-de.svgrect4143" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="38.895" x="140.92" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4149" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="38.895" x="159.6" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4155" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="38.895" x="177.28" xmlns:cc="http://creativecommons.org/ns#" fill="#4e9a06"/>
+ <rect id="basic-f16-de.svgrect4113" opacity="0.924" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" ry="0" width="15.152" y="38.895" x="195.46" xmlns:cc="http://creativecommons.org/ns#" height="14.205" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4169" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="4.0448" x="9.5964" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4157" opacity="0.924" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" ry="0" width="15.152" y="4.0448" x="214.66" xmlns:cc="http://creativecommons.org/ns#" height="14.205" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4171" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="21.722" x="9.5964" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4159" opacity="0.924" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" ry="0" width="15.152" y="21.722" x="214.66" xmlns:cc="http://creativecommons.org/ns#" height="14.205" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4173" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="38.895" x="9.5964" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4161" opacity="0.924" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" ry="0" width="15.152" y="38.895" x="214.66" xmlns:cc="http://creativecommons.org/ns#" height="14.205" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4175" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="4.0448" x="28.789" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4163" opacity="0.924" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" ry="0" width="15.152" y="4.0448" x="233.85" xmlns:cc="http://creativecommons.org/ns#" height="14.205" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4177" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="21.722" x="28.789" xmlns:cc="http://creativecommons.org/ns#" fill="#4e9a06"/>
+ <rect id="basic-f16-de.svgrect4165" opacity="0.924" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" ry="0" width="15.152" y="21.722" x="233.85" xmlns:cc="http://creativecommons.org/ns#" height="14.205" fill="#4e9a06"/>
+ <rect id="basic-f16-de.svgrect4179" opacity="0.924" ry="0" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" height="14.205" width="15.152" y="38.895" x="28.789" xmlns:cc="http://creativecommons.org/ns#" fill="#204a87"/>
+ <rect id="basic-f16-de.svgrect4167" opacity="0.924" style="color-rendering:auto;color:#000000;isolation:auto;shape-rendering:auto;image-rendering:auto" rx="0" transform="translate(10 5034)" ry="0" width="15.152" y="38.895" x="233.85" xmlns:cc="http://creativecommons.org/ns#" height="14.205" fill="#204a87"/>
+ <rect id="d0e831" display="none" height="1e3px" width="288" y="5095.1" x="10"/>
+ <flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
+ <flowRegion>
+ <use y="0" x="0" xlink:href="#d0e831"/>
</flowRegion>
<flowDiv xml:space="preserve">Man kann ähnliche Objekte nicht nur nach deren Füllfarbe, sondern auch nach Konturfarbe, Konturstil, Füllung und Kontur zusammen und nach Objekttyp auswählen.</flowDiv>
</flowRoot>
- <text style="writing-mode:lr" font-weight="bold" font-size="8" y="5158.302624" x="10" font-family="sans-serif" fill="#000000">
- <tspan y="5158.302624" x="10">Schlusswort</tspan>
+ <text style="writing-mode:lr" font-weight="bold" font-size="8" y="5147.061062999999" x="10" font-family="sans-serif" fill="#000000">
+ <tspan y="5147.061062999999" x="10">Schlusswort</tspan>
</text>
- <rect id="d0e838" display="none" height="1e3px" width="288" y="5163.5" x="10"/>
+ <rect id="d0e840" display="none" height="1e3px" width="288" y="5152.3" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
- <use y="0" x="0" xlink:href="#d0e838"/>
+ <use y="0" x="0" xlink:href="#d0e840"/>
</flowRegion>
<flowDiv xml:space="preserve">Dies ist das Ende des Grundlagen-Tutorials. Das waren längst noch nicht alle Funktionen in Inkscape, aber mit den hier vermittelten Techniken können Sie schon einfache, aber nützliche Grafiken erstellen. Um kompliziertere Techniken zu erlernen, schauen Sie sich das Tutorial »Inkscape: Fortgeschrittene Benutzung« und die anderen Tutorials in <flowSpan font-family="sans-serif">Hilfe &gt; Einführungen</flowSpan> an.</flowDiv>
</flowRoot>
- <g transform="translate(0 5234.5)">
+ <g transform="translate(0 5223.3)">
<defs id="defs3" xmlns:cc="http://creativecommons.org/ns#">
<linearGradient id="linearGradient2465" y2="-7528.7" xlink:href="#linearGradient841" gradientUnits="userSpaceOnUse" x2="76.847" gradientTransform="matrix(2.1496 0 0 .46519 -.13015 3495.4)" y1="-7656.4" x1="76.847" inkscape:collect="always"/>
<filter id="filter85" height="1.2" width="1.2" color-interpolation-filters="sRGB" y="-.1" x="-.1" inkscape:label="Drop shadow, custom">
diff --git a/share/tutorials/tutorial-shapes.de.svg b/share/tutorials/tutorial-shapes.de.svg
index 5ba8912e7..90de85b93 100644
--- a/share/tutorials/tutorial-shapes.de.svg
+++ b/share/tutorials/tutorial-shapes.de.svg
@@ -473,8 +473,8 @@
<rect id="shapes-f08-de.svgrect2264" transform="translate(10 3006.2) matrix(.99447 .10504 -.99521 .097739 0 0)" stroke="#000" stroke-width=".97176" fill="url(#shapes-f08-de.svglinearGradient4153)" style="color:#000000" fill-rule="evenodd" rx="10.937" ry="7.8879" width="21.022" height="15.702" y="206.94" x="372.11"/>
<rect id="shapes-f08-de.svgrect2259" transform="translate(10 3006.2) matrix(.99447 .10504 -.99521 .097739 0 0)" stroke="#000" stroke-width=".97176" fill="url(#shapes-f08-de.svglinearGradient4150)" style="color:#000000" fill-rule="evenodd" rx="13.386" ry="7.8879" width="52.249" height="47.25" y="270.51" x="440.64"/>
<rect id="shapes-f08-de.svgrect5740" transform="translate(10 3006.2) matrix(.99447 .10504 -.99521 .097739 0 0)" stroke="#000" stroke-width=".97176" fill="url(#shapes-f08-de.svglinearGradient4147)" style="color:#000000" fill-rule="evenodd" rx="4.8633" ry="5.0297" width="9.8364" height="11.479" y="170.7" x="353.52"/>
- <text style="writing-mode:lr" font-weight="bold" font-size="8" y="3144.926528" x="10" font-family="sans-serif" fill="#000000">
- <tspan y="3144.926528" x="10">Ellipsen</tspan>
+ <text style="writing-mode:lr" font-weight="bold" font-size="8" y="3144.926538" x="10" font-family="sans-serif" fill="#000000">
+ <tspan y="3144.926538" x="10">Ellipsen</tspan>
</text>
<rect id="d0e365" display="none" height="1e3px" width="288" y="3150.1" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
@@ -622,8 +622,8 @@
<path id="shapes-f12-de.svgpath2135" sodipodi:rx="23.418211" sodipodi:ry="25.328613" fill-opacity=".14716" stroke="#000" stroke-width=".75" fill="#ffd300" style="color:#000000" fill-rule="evenodd" transform="translate(10 4060.2) matrix(1.2719 .56475 -.78871 .43604 2855.3 -1599.1)" sodipodi:type="arc" d="m130.72 3607.9a23.418 25.329 0 1 1 -46.835 0 23.418 25.329 0 1 1 46.835 0z" sodipodi:cy="3607.9023" sodipodi:cx="107.30297"/>
<path id="shapes-f12-de.svgpath2774" sodipodi:rx="4.9275141" sodipodi:ry="46.998589" fill-opacity=".14716" stroke="#000" stroke-width=".75" fill="#ffd300" style="color:#000000" fill-rule="evenodd" transform="translate(10 4060.2) matrix(1.2719 .56475 -.78871 .43604 2855.3 -1599.1)" sodipodi:type="arc" d="m112.23 3607.9a4.9275 46.999 0 1 1 -9.85 0 4.9275 46.999 0 1 1 9.85 0z" sodipodi:cy="3607.9023" sodipodi:cx="107.30297"/>
<path id="shapes-f12-de.svgpath2134" sodipodi:rx="23.418211" sodipodi:ry="7.3592744" fill-opacity=".14716" stroke="#000" stroke-width=".75" fill="#ffd300" style="color:#000000" fill-rule="evenodd" transform="translate(10 4060.2) matrix(1.2719 .56475 -.78871 .43604 2855.3 -1599.1)" sodipodi:type="arc" d="m130.72 3607.9a23.418 7.3593 0 1 1 -46.835 0 23.418 7.3593 0 1 1 46.835 0z" sodipodi:cy="3607.9023" sodipodi:cx="107.30297"/>
- <text style="writing-mode:lr" font-weight="bold" font-size="8" y="4154.239846799999" x="10" font-family="sans-serif" fill="#000000">
- <tspan y="4154.239846799999" x="10">Sterne</tspan>
+ <text style="writing-mode:lr" font-weight="bold" font-size="8" y="4154.2398568" x="10" font-family="sans-serif" fill="#000000">
+ <tspan y="4154.2398568" x="10">Sterne</tspan>
</text>
<rect id="d0e508" display="none" height="1e3px" width="288" y="4159.4" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
@@ -909,8 +909,8 @@
<path id="shapes-f20-de.svgpath2857" sodipodi:type="star" sodipodi:sides="7" sodipodi:r1="1395.4882" sodipodi:r2="866.36334" transform="translate(10 6447.4) matrix(-.0089874 0 0 -.0067885 23.879 128.72)" sodipodi:arg2="-1.0962105" sodipodi:arg1="-1.6706296" inkscape:randomized="0.14" sodipodi:cy="945.83423" sodipodi:cx="-564.31024" xmlns:cc="http://creativecommons.org/ns#" inkscape:rounded="0.4" inkscape:flatsided="false" d="m-624.47-581.43c325.22 56.055 9.0386 753.22 309.98 918.23 234.37 128.49 581.31-539.04 760.22-379.94 229.74 204.3-465.84 517.23-317.07 802.08 115.86 221.83 895.34-44.69 853.46 194.02-53.76 306.54-699.31 70.34-850.97 383.64-118.1 244.04 261.11 693.64 5.9323 752.21-327.67 75.209-268.13-428.54-571.07-381.87-235.92 36.343-425.66 907.59-636.9 739.05-271.25-216.43 198.89-667.12-80.939-853.57-217.92-145.2-642.09-86.641-720.66-317.79-100.89-296.82 544.95-125.88 616.97-441.64 56.082-245.9-582.08-516.88-375.45-681.65 265.33-211.58 294.71 291.45 603.54 157.11 240.5-104.62 149.68-933.57 402.95-889.91z"/>
<path id="shapes-f20-de.svgpath2854" sodipodi:type="star" sodipodi:sides="7" sodipodi:r1="1251.4492" sodipodi:r2="717.9032" transform="translate(10 6447.4) matrix(.015753 0 0 .015753 262.21 110.75)" sodipodi:arg2="0.77790537" sodipodi:arg1="0.32910642" inkscape:randomized="0.14" sodipodi:cy="945.83423" sodipodi:cx="-564.31024" xmlns:cc="http://creativecommons.org/ns#" inkscape:rounded="0.4" inkscape:flatsided="false" d="m586.43 1426.2c-43.927 278.16-473.02-298.77-642.89-85.873-169.86 212.9 30.811 778.27-228.27 900.37s-113.21-638.05-388.63-673.98-331.62 698.53-527.43 520.94c-195.81-177.58 331.94-497.35 148.78-716.25s-587.83 148.93-658.44-126.83c-70.61-275.77 281.46-364.74 412.29-596.46s-276.92-479-71.128-630.46c205.8-151.45 366.12 220.77 643.8 138.73s182.27-375.84 449.97-389.69c267.7-13.846-241.94 460.31 23.777 552.89 265.72 92.579 626.35-408.15 720.35-156.88 93.999 251.28-346.05 473.05-354.59 754.56-8.5444 281.51 516.35 230.77 472.42 508.93z"/>
<path id="shapes-f20-de.svgpath1295" sodipodi:type="star" d="m-243.69 1096.3c-31.669 187.63 292.03 205.47 168.19 354.49s-286.2-273.04-452.9-184.99c-166.7 88.051 66.848 485.71-113.84 439.58-180.69-46.129 150.23-338.83-32.762-413.88-183-75.051-457.32 259.79-578.77 103.81s444.89-179.21 432.07-357.15c-12.827-177.94-402.62-55.064-345.92-244.35 56.695-189.29 305.07-15.841 451.17-142.57 146.11-126.73-325.36-272.92-157.71-375.45 167.66-102.53 216.43 413.99 406.72 457.3s142.12-528.03 290.43-397.43c148.32 130.6-148.45 281.4-72.598 448.02 75.85 166.62 316.87-148.25 361.58 32.567 44.715 180.82-323.99 92.409-355.66 280.04z" sodipodi:r1="292.23001" inkscape:flatsided="false" transform="translate(10 6447.4) matrix(.015753 0 0 .015753 170.82 135.17)" sodipodi:arg2="0.77809157" sodipodi:arg1="0.32929262" inkscape:randomized="0.14" sodipodi:cy="945.83423" sodipodi:cx="-564.31024" xmlns:cc="http://creativecommons.org/ns#" inkscape:rounded="0.4" sodipodi:r2="717.9032" sodipodi:sides="7"/>
- <text style="writing-mode:lr" font-weight="bold" font-size="8" y="6651.173666600001" x="10" font-family="sans-serif" fill="#000000">
- <tspan y="6651.173666600001" x="10">Spiralen</tspan>
+ <text style="writing-mode:lr" font-weight="bold" font-size="8" y="6651.173676600001" x="10" font-family="sans-serif" fill="#000000">
+ <tspan y="6651.173676600001" x="10">Spiralen</tspan>
</text>
<rect id="d0e739" display="none" height="1e3px" width="288" y="6656.4" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
@@ -1049,8 +1049,8 @@
<path id="shapes-f23-de.svgpath3032" sodipodi:argument="-36.806286" stroke="#000" stroke-width="3.75" fill="none" style="color:#000000" transform="translate(10 7381.6) matrix(-.17215 .64245 -.64245 -.17215 4263.8 1103.8)" sodipodi:t0="0.0000000" sodipodi:radius="68.998032" sodipodi:expansion="0.98582262" sodipodi:revolution="18.821123" sodipodi:type="spiral" d="m103.2 6518.4c0.37 0.5-0.43 0.7-0.76 0.6-0.87-0.3-0.89-1.4-0.45-2.1 0.77-1.1 2.44-1.1 3.45-0.3 1.47 1.2 1.37 3.5 0.15 4.8-1.61 1.8-4.43 1.6-6.101 0-2.092-2-1.871-5.4 0.134-7.4 2.417-2.4 6.427-2.1 8.747 0.3 2.72 2.8 2.37 7.4-0.43 10-3.22 3.1-8.406 2.6-11.363-0.5-3.354-3.7-2.878-9.4 0.705-12.7 4.018-3.7 10.388-3.2 13.988 0.8 3.98 4.4 3.38 11.4-0.99 15.3-4.81 4.3-12.365 3.6-16.596-1.1-4.616-5.2-3.884-13.4 1.272-17.9 5.594-4.9 14.334-4.2 19.194 1.4 5.25 6 4.39 15.3-1.55 20.5-6.38 5.6-16.299 4.6-21.796-1.7-5.875-6.8-4.889-17.3 1.835-23.1 7.16-6.2 18.261-5.1 24.391 2 6.5 7.5 5.39 19.2-2.12 25.7-7.94 6.8-20.219 5.6-26.976-2.3-7.132-8.3-5.891-21.2 2.395-28.3 8.724-7.4 22.181-6.1 29.561 2.6 7.76 9.1 6.39 23.1-2.67 30.8-9.5 8.1-24.135 6.7-32.149-2.8-8.385-9.9-6.89-25.1 2.954-33.4 10.283-8.7 26.085-7.2 34.725 3.1 9.01 10.6 7.39 27-3.23 36-11.06 9.3-28.038 7.6-37.305-3.4-9.636-11.4-7.888-29 3.511-38.6 11.839-9.9 29.984-8.1 39.884 3.7 10.26 12.2 8.38 30.9-3.79 41.1-12.62 10.6-31.937 8.7-42.455-3.9-10.886-13-8.885-32.9 4.067-43.7 13.391-11.2 33.878-9.2 45.018 4.2 11.51 13.8 9.39 34.8-4.34 46.3-14.17 11.8-35.824 9.6-47.591-4.5-12.132-14.5-9.879-36.8 4.622-48.9 14.941-12.4 37.769-10.1 50.159 4.8 12.75 15.3 10.37 38.7-4.9 51.4-15.72 13.1-39.709 10.7-52.722-5-13.378-16.1-10.873-40.7 5.176-54 16.488-13.7 41.646-11.1 55.286 5.3 14 16.9 11.37 42.6-5.46 56.6-17.26 14.3-43.581 11.6-57.839-5.6-14.622-17.7-11.865-44.6 5.729-59.1 18.033-15 45.52-12.2 60.4 5.8 15.24 18.4 12.36 46.5-6 61.7-18.81 15.6-47.461 12.6-62.963-6.1-15.864-19.2-12.856-48.5 6.282-64.3 19.576-16.2 49.391-13.1 65.511 6.4 16.49 20 13.36 50.4-6.55 66.8-20.35 16.8-51.33 13.6-68.073-6.7-17.105-20.7-13.847-52.3 6.833-69.3 21.118-17.4 53.26-14.1 70.62 7 17.73 21.5 14.34 54.2-7.11 71.9-21.88 18-55.187 14.5-73.17-7.3-18.345-22.3-14.836-56.1 7.384-74.4 22.658-18.7 57.126-15.1 75.726 7.5 18.96 23 15.33 58.1-7.66 77-23.43 19.3-59.052 15.6-78.275-7.8-19.583-23.8-15.823-60 7.934-79.6 24.197-19.9 60.981-16 80.821 8.1 20.2 24.6 16.32 62-8.21 82.1-24.96 20.5-62.906 16.6-83.367-8.3-20.82-25.4-16.811-63.9 8.485-84.7 25.733-21.1 64.832-17 85.912 8.6 21.44 26.2 17.31 65.8-8.76 87.2-26.5 21.8-66.759 17.6-88.456-8.9-22.057-26.9-17.797-67.7 9.033-89.7 27.269-22.4 68.683-18 91.003 9.2 22.68 27.6 18.29 69.6-9.31 92.2-28.03 23-70.61 18.6-93.543-9.4-23.293-28.4-18.783-71.6 9.582-94.8 28.804-23.6 72.541-19 96.091 9.7 6.5 7.9 11.19 17.3 13.62 27.3" sodipodi:cy="6518.4199" sodipodi:cx="103.19778" stroke-dasharray="1.8749997 1.8749997"/>
<path id="shapes-f23-de.svgpath3088" sodipodi:argument="-36.806286" stroke="#000" stroke-width="7.5" fill="none" style="color:#000000" transform="translate(10 7381.6) matrix(-.17929 .65451 -.66912 -.17538 4637.7 1123.6)" sodipodi:t0="0.0000000" sodipodi:radius="68.998032" sodipodi:expansion="0.98582262" sodipodi:revolution="18.821123" sodipodi:type="spiral" d="m103.2 6518.4c0.37 0.5-0.43 0.7-0.76 0.6-0.87-0.3-0.89-1.4-0.45-2.1 0.77-1.1 2.44-1.1 3.45-0.3 1.47 1.2 1.37 3.5 0.15 4.8-1.61 1.8-4.43 1.6-6.101 0-2.092-2-1.871-5.4 0.134-7.4 2.417-2.4 6.427-2.1 8.747 0.3 2.72 2.8 2.37 7.4-0.43 10-3.22 3.1-8.406 2.6-11.363-0.5-3.354-3.7-2.878-9.4 0.705-12.7 4.018-3.7 10.388-3.2 13.988 0.8 3.98 4.4 3.38 11.4-0.99 15.3-4.81 4.3-12.365 3.6-16.596-1.1-4.616-5.2-3.884-13.4 1.272-17.9 5.594-4.9 14.334-4.2 19.194 1.4 5.25 6 4.39 15.3-1.55 20.5-6.38 5.6-16.299 4.6-21.796-1.7-5.875-6.8-4.889-17.3 1.835-23.1 7.16-6.2 18.261-5.1 24.391 2 6.5 7.5 5.39 19.2-2.12 25.7-7.94 6.8-20.219 5.6-26.976-2.3-7.132-8.3-5.891-21.2 2.395-28.3 8.724-7.4 22.181-6.1 29.561 2.6 7.76 9.1 6.39 23.1-2.67 30.8-9.5 8.1-24.135 6.7-32.149-2.8-8.385-9.9-6.89-25.1 2.954-33.4 10.283-8.7 26.085-7.2 34.725 3.1 9.01 10.6 7.39 27-3.23 36-11.06 9.3-28.038 7.6-37.305-3.4-9.636-11.4-7.888-29 3.511-38.6 11.839-9.9 29.984-8.1 39.884 3.7 10.26 12.2 8.38 30.9-3.79 41.1-12.62 10.6-31.937 8.7-42.455-3.9-10.886-13-8.885-32.9 4.067-43.7 13.391-11.2 33.878-9.2 45.018 4.2 11.51 13.8 9.39 34.8-4.34 46.3-14.17 11.8-35.824 9.6-47.591-4.5-12.132-14.5-9.879-36.8 4.622-48.9 14.941-12.4 37.769-10.1 50.159 4.8 12.75 15.3 10.37 38.7-4.9 51.4-15.72 13.1-39.709 10.7-52.722-5-13.378-16.1-10.873-40.7 5.176-54 16.488-13.7 41.646-11.1 55.286 5.3 14 16.9 11.37 42.6-5.46 56.6-17.26 14.3-43.581 11.6-57.839-5.6-14.622-17.7-11.865-44.6 5.729-59.1 18.033-15 45.52-12.2 60.4 5.8 15.24 18.4 12.36 46.5-6 61.7-18.81 15.6-47.461 12.6-62.963-6.1-15.864-19.2-12.856-48.5 6.282-64.3 19.576-16.2 49.391-13.1 65.511 6.4 16.49 20 13.36 50.4-6.55 66.8-20.35 16.8-51.33 13.6-68.073-6.7-17.105-20.7-13.847-52.3 6.833-69.3 21.118-17.4 53.26-14.1 70.62 7 17.73 21.5 14.34 54.2-7.11 71.9-21.88 18-55.187 14.5-73.17-7.3-18.345-22.3-14.836-56.1 7.384-74.4 22.658-18.7 57.126-15.1 75.726 7.5 18.96 23 15.33 58.1-7.66 77-23.43 19.3-59.052 15.6-78.275-7.8-19.583-23.8-15.823-60 7.934-79.6 24.197-19.9 60.981-16 80.821 8.1 20.2 24.6 16.32 62-8.21 82.1-24.96 20.5-62.906 16.6-83.367-8.3-20.82-25.4-16.811-63.9 8.485-84.7 25.733-21.1 64.832-17 85.912 8.6 21.44 26.2 17.31 65.8-8.76 87.2-26.5 21.8-66.759 17.6-88.456-8.9-22.057-26.9-17.797-67.7 9.033-89.7 27.269-22.4 68.683-18 91.003 9.2 22.68 27.6 18.29 69.6-9.31 92.2-28.03 23-70.61 18.6-93.543-9.4-23.293-28.4-18.783-71.6 9.582-94.8 28.804-23.6 72.541-19 96.091 9.7 6.5 7.9 11.19 17.3 13.62 27.3" sodipodi:cy="6518.4199" sodipodi:cx="103.19778" stroke-dasharray="3.7499994 3.7499994"/>
<path id="shapes-f23-de.svgpath3090" sodipodi:argument="-36.806286" stroke="#000" stroke-width=".60429" fill="none" style="color:#000000" transform="translate(10 7381.6) matrix(-.17929 .65451 -.66912 -.17538 4536.4 1123.2)" sodipodi:t0="0.0000000" sodipodi:radius="68.998032" sodipodi:expansion="0.98582262" sodipodi:revolution="18.821123" sodipodi:type="spiral" d="m103.2 6518.4c0.37 0.5-0.43 0.7-0.76 0.6-0.87-0.3-0.89-1.4-0.45-2.1 0.77-1.1 2.44-1.1 3.45-0.3 1.47 1.2 1.37 3.5 0.15 4.8-1.61 1.8-4.43 1.6-6.101 0-2.092-2-1.871-5.4 0.134-7.4 2.417-2.4 6.427-2.1 8.747 0.3 2.72 2.8 2.37 7.4-0.43 10-3.22 3.1-8.406 2.6-11.363-0.5-3.354-3.7-2.878-9.4 0.705-12.7 4.018-3.7 10.388-3.2 13.988 0.8 3.98 4.4 3.38 11.4-0.99 15.3-4.81 4.3-12.365 3.6-16.596-1.1-4.616-5.2-3.884-13.4 1.272-17.9 5.594-4.9 14.334-4.2 19.194 1.4 5.25 6 4.39 15.3-1.55 20.5-6.38 5.6-16.299 4.6-21.796-1.7-5.875-6.8-4.889-17.3 1.835-23.1 7.16-6.2 18.261-5.1 24.391 2 6.5 7.5 5.39 19.2-2.12 25.7-7.94 6.8-20.219 5.6-26.976-2.3-7.132-8.3-5.891-21.2 2.395-28.3 8.724-7.4 22.181-6.1 29.561 2.6 7.76 9.1 6.39 23.1-2.67 30.8-9.5 8.1-24.135 6.7-32.149-2.8-8.385-9.9-6.89-25.1 2.954-33.4 10.283-8.7 26.085-7.2 34.725 3.1 9.01 10.6 7.39 27-3.23 36-11.06 9.3-28.038 7.6-37.305-3.4-9.636-11.4-7.888-29 3.511-38.6 11.839-9.9 29.984-8.1 39.884 3.7 10.26 12.2 8.38 30.9-3.79 41.1-12.62 10.6-31.937 8.7-42.455-3.9-10.886-13-8.885-32.9 4.067-43.7 13.391-11.2 33.878-9.2 45.018 4.2 11.51 13.8 9.39 34.8-4.34 46.3-14.17 11.8-35.824 9.6-47.591-4.5-12.132-14.5-9.879-36.8 4.622-48.9 14.941-12.4 37.769-10.1 50.159 4.8 12.75 15.3 10.37 38.7-4.9 51.4-15.72 13.1-39.709 10.7-52.722-5-13.378-16.1-10.873-40.7 5.176-54 16.488-13.7 41.646-11.1 55.286 5.3 14 16.9 11.37 42.6-5.46 56.6-17.26 14.3-43.581 11.6-57.839-5.6-14.622-17.7-11.865-44.6 5.729-59.1 18.033-15 45.52-12.2 60.4 5.8 15.24 18.4 12.36 46.5-6 61.7-18.81 15.6-47.461 12.6-62.963-6.1-15.864-19.2-12.856-48.5 6.282-64.3 19.576-16.2 49.391-13.1 65.511 6.4 16.49 20 13.36 50.4-6.55 66.8-20.35 16.8-51.33 13.6-68.073-6.7-17.105-20.7-13.847-52.3 6.833-69.3 21.118-17.4 53.26-14.1 70.62 7 17.73 21.5 14.34 54.2-7.11 71.9-21.88 18-55.187 14.5-73.17-7.3-18.345-22.3-14.836-56.1 7.384-74.4 22.658-18.7 57.126-15.1 75.726 7.5 18.96 23 15.33 58.1-7.66 77-23.43 19.3-59.052 15.6-78.275-7.8-19.583-23.8-15.823-60 7.934-79.6 24.197-19.9 60.981-16 80.821 8.1 20.2 24.6 16.32 62-8.21 82.1-24.96 20.5-62.906 16.6-83.367-8.3-20.82-25.4-16.811-63.9 8.485-84.7 25.733-21.1 64.832-17 85.912 8.6 21.44 26.2 17.31 65.8-8.76 87.2-26.5 21.8-66.759 17.6-88.456-8.9-22.057-26.9-17.797-67.7 9.033-89.7 27.269-22.4 68.683-18 91.003 9.2 22.68 27.6 18.29 69.6-9.31 92.2-28.03 23-70.61 18.6-93.543-9.4-23.293-28.4-18.783-71.6 9.582-94.8 28.804-23.6 72.541-19 96.091 9.7 6.5 7.9 11.19 17.3 13.62 27.3" sodipodi:cy="6518.4199" sodipodi:cx="103.19778" stroke-dasharray="0.60429269 7.2515122"/>
- <text style="writing-mode:lr" font-weight="bold" font-size="8" y="7503.663199799999" x="10" font-family="sans-serif" fill="#000000">
- <tspan y="7503.663199799999" x="10">Fazit</tspan>
+ <text style="writing-mode:lr" font-weight="bold" font-size="8" y="7503.6632098" x="10" font-family="sans-serif" fill="#000000">
+ <tspan y="7503.6632098" x="10">Fazit</tspan>
</text>
<rect id="d0e857" display="none" height="1e3px" width="288" y="7508.9" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
diff --git a/share/tutorials/tutorial-tracing-pixelart.fr.svg b/share/tutorials/tutorial-tracing-pixelart.fr.svg
index 706a136a8..1bc503511 100644
--- a/share/tutorials/tutorial-tracing-pixelart.fr.svg
+++ b/share/tutorials/tutorial-tracing-pixelart.fr.svg
@@ -40,52 +40,52 @@
<path id="text1896" d="m120.82 12.812 0.1105-0.44803c0.96986-0.03895 1.952-0.10388 2.9465-0.1948-0.0982 0.3896-0.14732 0.5779-0.14731 0.5649l-0.33148 1.2077-0.36831 1.4025-0.90236 3.5647c-0.72436 2.857-1.0865 4.6881-1.0865 5.4932 0 0.38959 0.0921 0.58438 0.27623 0.58438 0.27009 0 0.58929-0.30518 0.95761-0.91554 0.2087-0.35063 0.49721-0.948 0.86553-1.7921l0.38672 0.15584c-0.78573 2.1168-1.6635 3.1752-2.6334 3.1752-0.3192 0-0.57702-0.12337-0.77344-0.37011-0.19644-0.24674-0.29466-0.5649-0.29465-0.95449-0.00001-0.25972 0.0491-0.69477 0.14732-1.3051-0.38059 0.72724-0.69365 1.2532-0.93919 1.5778-0.54019 0.70126-1.1847 1.0519-1.9336 1.0519-0.61386 0-1.1172-0.23375-1.5101-0.70126-0.38058-0.48049-0.57088-1.0973-0.57088-1.8506 0-1.4415 0.51563-2.8375 1.5469-4.1881 1.0435-1.3636 2.1178-2.0453 3.2227-2.0453 0.50336 0.000008 0.92691 0.27921 1.2707 0.83762l0.92077-3.5063c0.12276-0.4675 0.18414-0.75969 0.18415-0.87658-0.00001-0.31166-0.44811-0.4675-1.3443-0.46751m-0.92078 4.4608c-0.78573-0.05194-1.5899 0.81165-2.4124 2.5908-0.76117 1.6363-1.1418 2.9609-1.1418 3.9738 0 0.38959 0.0859 0.70776 0.25781 0.95449 0.18415 0.23376 0.41743 0.35063 0.69979 0.35063 0.71206 0 1.3934-0.62984 2.0441-1.8895 0.87167-1.7012 1.3382-3.2336 1.3996-4.5972 0.0368-0.88306-0.24555-1.3441-0.84711-1.383m9.2438 5.3763 0.36831 0.19479c-0.82256 1.8441-1.7188 2.7661-2.6887 2.7661-0.34375 0-0.62613-0.12986-0.84711-0.38959-0.22099-0.27271-0.33149-0.61685-0.33149-1.0324 0-0.2857 0.0368-0.55192 0.1105-0.79866s0.27623-0.79866 0.60772-1.6558l0.69978-1.7726c0.41742-1.0519 0.62613-1.7596 0.62613-2.1233 0-0.25972-0.10436-0.38958-0.31306-0.38959-0.42971 0.000008-1.019 0.71426-1.7679 2.1427l-0.36831-0.23376c0.87166-1.6882 1.7065-2.5323 2.5045-2.5323 0.33148 0.000008 0.60157 0.12987 0.81029 0.38959 0.2087 0.25973 0.31305 0.59738 0.31306 1.0129-0.00001 0.49349-0.25168 1.409-0.75504 2.7466l-0.77345 2.0453c-0.3192 0.84411-0.4788 1.396-0.4788 1.6558 0 0.23375 0.0982 0.35063 0.29465 0.35063 0.23326 0 0.53405-0.22077 0.90235-0.6623 0.3806-0.45452 0.74276-1.0259 1.0865-1.7142m-0.27623-10.227c0.23325 0.000012 0.42969 0.09092 0.58929 0.27271 0.17188 0.16883 0.25782 0.37662 0.25782 0.62334 0 0.24675-0.0859 0.46103-0.25782 0.64282-0.1596 0.18182-0.35604 0.27272-0.58929 0.27271-0.23326 0.00001-0.43584-0.09089-0.60771-0.27271-0.17188-0.1818-0.25782-0.39607-0.25782-0.64282 0-0.24673 0.0859-0.45451 0.25782-0.62334 0.17187-0.1818 0.37445-0.2727 0.60771-0.27271m8.3563 0.38959 0.1105-0.44803c0.96987-0.03895 1.952-0.10388 2.9465-0.1948-0.0982 0.3896-0.14734 0.5779-0.14733 0.5649l-0.33148 1.2077-0.36831 1.4025-0.90236 3.5647c-0.72435 2.857-1.0865 4.6881-1.0865 5.4932 0 0.38959 0.0921 0.58438 0.27623 0.58438 0.27009 0 0.58928-0.30518 0.9576-0.91554 0.2087-0.35063 0.49722-0.948 0.86554-1.7921l0.38672 0.15584c-0.78573 2.1168-1.6636 3.1752-2.6334 3.1752-0.3192 0-0.57703-0.12337-0.77345-0.37011-0.19644-0.24674-0.29465-0.5649-0.29464-0.95449-0.00001-0.25972 0.0491-0.69477 0.14732-1.3051-0.3806 0.72724-0.69365 1.2532-0.93919 1.5778-0.5402 0.70126-1.1847 1.0519-1.9336 1.0519-0.61386 0-1.1172-0.23375-1.5101-0.70126-0.38058-0.48049-0.57088-1.0973-0.57088-1.8506 0-1.4415 0.51563-2.8375 1.5469-4.1881 1.0435-1.3636 2.1178-2.0453 3.2227-2.0453 0.50335 0.000008 0.92691 0.27921 1.2707 0.83762l0.92078-3.5063c0.12275-0.4675 0.18415-0.75969 0.18416-0.87658-0.00001-0.31166-0.44813-0.4675-1.3443-0.46751m-0.92078 4.4608c-0.78572-0.05194-1.5899 0.81165-2.4124 2.5908-0.76117 1.6363-1.1418 2.9609-1.1418 3.9738 0 0.38959 0.0859 0.70776 0.25783 0.95449 0.18414 0.23376 0.41741 0.35063 0.69978 0.35063 0.71207 0 1.3934-0.62984 2.0441-1.8895 0.87166-1.7012 1.3382-3.2336 1.3996-4.5972 0.0368-0.88306-0.24555-1.3441-0.84712-1.383m11.541-0.19479h1.3075c-0.30692 0.87009-0.72434 2.1427-1.2522 3.818-0.56475 1.8051-0.84712 3.0323-0.84711 3.6816-0.00001 0.27271 0.0982 0.40907 0.29464 0.40907 0.4297 0 1.0313-0.88307 1.8047-2.6492l0.40514 0.17532c-0.51563 1.1818-0.95761 1.9934-1.3259 2.4349-0.36832 0.44153-0.78574 0.6623-1.2522 0.6623-0.76118 0-1.1418-0.36362-1.1418-1.0909 0-0.19479 0.0553-0.59088 0.16574-1.1882-0.87166 1.5324-1.8047 2.2986-2.7992 2.2986-0.62614 0-1.1356-0.22077-1.5285-0.6623-0.39286-0.44153-0.5893-1.0194-0.5893-1.7337 0-1.4804 0.55247-2.9154 1.6574-4.305 1.1049-1.4025 2.2406-2.1038 3.4069-2.1038 0.61385 0.000008 1.0804 0.35713 1.3996 1.0714l0.29465-0.81814m-1.5469 0.23375c-0.36831-0.02596-0.79801 0.2013-1.2891 0.68178-0.4788 0.46752-0.92691 1.0974-1.3443 1.8895-0.83485 1.5713-1.2523 2.8895-1.2523 3.9543 0 0.83112 0.30693 1.2467 0.92077 1.2467 0.99444 0 1.9336-1.0324 2.8176-3.0972 0.60156-1.4025 0.93919-2.5648 1.0128-3.4868 0.0246-0.33764-0.043-0.61684-0.20257-0.83762-0.15961-0.22076-0.38059-0.33764-0.66296-0.35063m9.7893 5.3374 0.36831 0.23375c-0.88395 1.8311-1.9643 2.7466-3.2411 2.7466-0.67524 0-1.2216-0.24025-1.639-0.72074-0.41741-0.48049-0.62613-1.1038-0.62613-1.87 0-0.76619 0.17188-1.5713 0.51564-2.4155 0.35603-0.85709 0.83483-1.6168 1.4364-2.2791 0.90849-1.0129 1.8477-1.5194 2.8176-1.5194 0.4297 0.000008 0.77346 0.11039 1.0313 0.33115 0.27009 0.20779 0.40514 0.4805 0.40515 0.81814-0.00001 0.22078-0.0675 0.40908-0.20258 0.56491-0.13505 0.15584-0.30079 0.23376-0.49721 0.23375-0.17188 0.000007-0.32535-0.06492-0.46039-0.19479-0.12277-0.14284-0.18417-0.30517-0.18416-0.48699-0.00001-0.11687 0.0368-0.23375 0.1105-0.35063 0.0737-0.11687 0.11049-0.19479 0.1105-0.23375-0.00001-0.16882-0.13506-0.25323-0.40515-0.25323-0.54019 0.000008-1.0804 0.43505-1.6206 1.3051-0.42969 0.68828-0.81029 1.5584-1.1418 2.6102-0.33148 1.0389-0.49721 1.896-0.49721 2.5713 0 0.88307 0.36217 1.3246 1.0865 1.3246 0.9576 0 1.8354-0.80515 2.6334-2.4155m5.1362-8.3177h1.2891l-0.79187 2.7466h1.4548l-0.12891 0.44803h-1.4548l-0.34989 1.1298c-0.29465 0.96099-0.60771 2.1233-0.93919 3.4868-0.33147 1.3506-0.49722 2.1362-0.49722 2.357 0 0.29869 0.12891 0.44803 0.38673 0.44803 0.45425 0.000001 1.0006-0.6623 1.639-1.9869 0.0614-0.14285 0.15346-0.31816 0.27623-0.52595l0.36831 0.1948c-0.47881 1.0519-0.83484 1.7272-1.0681 2.0259-0.50336 0.63633-1.0374 0.9545-1.6022 0.9545-0.38058 0-0.68751-0.12337-0.92078-0.37011-0.23325-0.25973-0.34989-0.59088-0.34989-0.99345 0-0.36362 0.0552-0.77268 0.16574-1.2272 0.12278-0.50646 0.51564-1.9609 1.1786-4.3634l0.31306-1.1298h-1.4732l0.14731-0.44803h1.4732l0.88395-2.7466m7.1027 8.3177 0.3683 0.19479c-0.82256 1.8441-1.7188 2.7661-2.6886 2.7661-0.34376 0-0.62614-0.12986-0.84711-0.38959-0.221-0.27271-0.33149-0.61685-0.33149-1.0324 0-0.2857 0.0368-0.55192 0.11049-0.79866 0.0737-0.24674 0.27624-0.79866 0.60771-1.6558l0.69979-1.7726c0.41742-1.0519 0.62613-1.7596 0.62614-2.1233-0.00001-0.25972-0.10436-0.38958-0.31307-0.38959-0.42971 0.000008-1.019 0.71426-1.7679 2.1427l-0.36832-0.23376c0.87167-1.6882 1.7065-2.5323 2.5045-2.5323 0.33148 0.000008 0.60157 0.12987 0.81027 0.38959 0.20872 0.25973 0.31307 0.59738 0.31307 1.0129 0 0.49349-0.25168 1.409-0.75503 2.7466l-0.77345 2.0453c-0.3192 0.84411-0.47881 1.396-0.4788 1.6558-0.00001 0.23375 0.0982 0.35063 0.29463 0.35063 0.23328 0 0.53406-0.22077 0.90237-0.6623 0.38058-0.45452 0.74276-1.0259 1.0865-1.7142m-0.27624-10.227c0.23326 0.000012 0.42969 0.09092 0.58929 0.27271 0.17188 0.16883 0.25782 0.37662 0.25783 0.62334-0.00001 0.24675-0.0859 0.46103-0.25783 0.64282-0.1596 0.18182-0.35603 0.27272-0.58929 0.27271-0.23327 0.00001-0.43583-0.09089-0.60771-0.27271-0.17187-0.1818-0.25783-0.39607-0.25782-0.64282-0.00001-0.24673 0.0859-0.45451 0.25782-0.62334 0.17188-0.1818 0.37444-0.2727 0.60771-0.27271m7.3369 10.227 0.36831 0.23375c-0.88396 1.8311-1.9643 2.7466-3.2411 2.7466-0.67523 0-1.2216-0.24025-1.639-0.72074-0.41741-0.48049-0.62612-1.1038-0.62612-1.87 0-0.76619 0.17188-1.5713 0.51564-2.4155 0.35603-0.85709 0.83482-1.6168 1.4364-2.2791 0.90849-1.0129 1.8477-1.5194 2.8176-1.5194 0.42969 0.000008 0.77345 0.11039 1.0313 0.33115 0.27008 0.20779 0.40514 0.4805 0.40515 0.81814-0.00001 0.22078-0.0675 0.40908-0.20258 0.56491-0.13506 0.15584-0.30079 0.23376-0.49721 0.23375-0.17189 0.000007-0.32536-0.06492-0.46039-0.19479-0.12278-0.14284-0.18417-0.30517-0.18416-0.48699-0.00001-0.11687 0.0368-0.23375 0.11049-0.35063 0.0737-0.11687 0.11049-0.19479 0.1105-0.23375-0.00001-0.16882-0.13505-0.25323-0.40515-0.25323-0.54019 0.000008-1.0804 0.43505-1.6206 1.3051-0.42969 0.68828-0.81028 1.5584-1.1418 2.6102-0.33148 1.0389-0.49722 1.896-0.49722 2.5713 0 0.88307 0.36217 1.3246 1.0865 1.3246 0.95761 0 1.8354-0.80515 2.6334-2.4155m6.3332 0 0.36832 0.19479c-0.82257 1.8441-1.7188 2.7661-2.6887 2.7661-0.34376 0-0.62612-0.12986-0.84711-0.38959-0.22098-0.27271-0.33148-0.61685-0.33148-1.0324 0-0.2857 0.0368-0.55192 0.1105-0.79866 0.0736-0.24674 0.27622-0.79866 0.60771-1.6558l0.69979-1.7726c0.4174-1.0519 0.62612-1.7596 0.62613-2.1233-0.00001-0.25972-0.10436-0.38958-0.31308-0.38959-0.42969 0.000008-1.019 0.71426-1.7679 2.1427l-0.36831-0.23376c0.87167-1.6882 1.7065-2.5323 2.5045-2.5323 0.33147 0.000008 0.60157 0.12987 0.81028 0.38959 0.20871 0.25973 0.31306 0.59738 0.31307 1.0129-0.00001 0.49349-0.25169 1.409-0.75503 2.7466l-0.77346 2.0453c-0.31921 0.84411-0.47881 1.396-0.4788 1.6558-0.00001 0.23375 0.0982 0.35063 0.29465 0.35063 0.23325 0 0.53404-0.22077 0.90236-0.6623 0.38058-0.45452 0.74275-1.0259 1.0865-1.7142m-0.27622-10.227c0.23326 0.000012 0.42969 0.09092 0.5893 0.27271 0.17187 0.16883 0.2578 0.37662 0.25781 0.62334-0.00001 0.24675-0.0859 0.46103-0.25781 0.64282-0.15961 0.18182-0.35604 0.27272-0.5893 0.27271-0.23328 0.00001-0.43585-0.09089-0.60772-0.27271-0.17188-0.1818-0.25781-0.39607-0.25781-0.64282 0-0.24673 0.0859-0.45451 0.25781-0.62334 0.17187-0.1818 0.37444-0.2727 0.60772-0.27271m7.2632 10.383 0.34989 0.25323c-1.0681 1.7012-2.1853 2.5518-3.3516 2.5518-0.62613 0-1.1356-0.20129-1.5285-0.60386-0.39286-0.41556-0.5893-0.95449-0.5893-1.6168 0-1.1558 0.39287-2.409 1.1786-3.7595 1.0927-1.87 2.3326-2.805 3.7199-2.805 0.40513 0.000008 0.73661 0.12987 0.99443 0.38959 0.25781 0.25973 0.38672 0.59088 0.38673 0.99345-0.00001 0.94801-0.62 1.8441-1.86 2.6882-0.40514 0.27272-1.3136 0.71425-2.7255 1.3246-0.20871 0.79217-0.31306 1.4025-0.31306 1.8311 0 0.71425 0.31306 1.0714 0.9392 1.0714 0.45424 0 0.87779-0.16233 1.2707-0.48699 0.40514-0.33764 0.91463-0.948 1.5285-1.8311m-3.278-1.1103c0.23326-0.10389 0.51563-0.24024 0.84711-0.40907 0.71206-0.38959 1.3075-0.90904 1.7863-1.5584 0.49107-0.64931 0.73661-1.2597 0.73662-1.8311-0.00001-0.41555-0.17802-0.62334-0.53405-0.62334-0.50337 0.000008-1.0067 0.3896-1.5101 1.1688-0.49108 0.7662-0.93306 1.8506-1.3259 3.2531m7.1834-8.8826 0.11048-0.44803c0.92078-0.03895 1.9643-0.10388 3.1306-0.1948-0.0982 0.35064-0.17188 0.60388-0.22099 0.7597-0.13505 0.40259-0.32533 1.0129-0.57087 1.8311l-1.4917 5.1426c-0.71206 2.4544-1.0681 3.9608-1.0681 4.5192-0.00001 0.40258 0.11049 0.60386 0.33147 0.60386 0.30693 0 0.68751-0.35063 1.1418-1.0519 0.23327-0.36361 0.49722-0.84411 0.79188-1.4415l0.42355 0.21427c-0.36832 0.71425-0.64455 1.2207-0.8287 1.5194-0.56475 0.89606-1.2093 1.3441-1.9336 1.3441-0.36831 0-0.6691-0.14285-0.90236-0.42855s-0.34989-0.64931-0.34989-1.0908c0-0.54542 0.20871-1.5389 0.62613-2.9804l1.6206-5.5906c0.35603-1.2337 0.53406-1.9285 0.53406-2.0843 0-0.23374-0.0859-0.38958-0.25782-0.46751-0.17188-0.09089-0.53405-0.14284-1.0865-0.15584" sodipodi:nodetypes="cccccccsssccssscsscsssccscccssscscccssssccssccsssccsssccsssssssccccccccsssccssscsscsssccscccssscscccsssccssscssscscccssssssscccsssssssssssssssssssccccccccssscccsssssccccccccssssccssccsssccsssccssssssscccssssssssssssssssssscccssssccssccsssccsssccssssssscccsssssssscsssccccsssccccsccsssccssssccssc" inkscape:connector-curvature="0" fill="#fff"/>
<use id="use1901" opacity=".078652" style="color:black" xlink:href="#text1896" transform="matrix(3.1679 0 0 3.1679 -274.08 -31.04)" height="1052.3622" width="320" y="0" x="0" fill="black"/>
</g>
- <text id="text1920" font-family="sans-serif" font-size="7" transform="scale(1.1307)" y="30" x="35" fill="#ffffff">
+ <text id="text1920" font-family="sans-serif" font-size="7" transform="scale(1.1307)" y="18.25828" x="176.24451" fill="#ffffff">
<tspan id="tspan1668" style="letter-spacing:2.1813" fill="#ffffff" dx="0 -0.57057059 0 0 0 0 0">::VECTORISER DU PIXEL ART</tspan>
</text>
- <rect id="d0e10" display="none" height="1e3px" width="264" y="46" x="35"/>
+ <rect id="d0e10" display="none" height="1e3px" width="264" y="36" x="35"/>
<flowRoot font-family="sans-serif" font-size="7.2" font-style="italic" line-height="150%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e10"/>
</flowRegion>
- <flowDiv xml:space="preserve">Avant que nous ayons accès à des logiciels d&apos;édition vectorielle aussi puissants…</flowDiv>
+ <flowDiv xml:space="preserve">Avant que nous ayons accès à un logiciel d&apos;édition de graphismes vectoriels aussi puissant…</flowDiv>
</flowRoot>
- <rect id="d0e13" display="none" height="1e3px" width="264" y="70.056" x="35"/>
+ <rect id="d0e13" display="none" height="1e3px" width="264" y="60.056" x="35"/>
<flowRoot font-family="sans-serif" font-size="7.2" font-style="italic" line-height="150%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e13"/>
</flowRegion>
<flowDiv xml:space="preserve">Avant même que nous ayons des moniteurs en 640×480…</flowDiv>
</flowRoot>
- <rect id="d0e16" display="none" height="1e3px" width="264" y="83.312" x="35"/>
+ <rect id="d0e16" display="none" height="1e3px" width="264" y="73.312" x="35"/>
<flowRoot font-family="sans-serif" font-size="7.2" font-style="italic" line-height="150%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e16"/>
</flowRegion>
<flowDiv xml:space="preserve">Jouer à des jeux vidéo réalisés avec des pixels savamment assemblés sur des écrans à basse résolution était pratique courante.</flowDiv>
</flowRoot>
- <rect id="d0e19" display="none" height="1e3px" width="264" y="107.37" x="35"/>
+ <rect id="d0e19" display="none" height="1e3px" width="264" y="97.369" x="35"/>
<flowRoot font-family="sans-serif" font-size="7.2" font-style="italic" line-height="150%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e19"/>
</flowRegion>
<flowDiv xml:space="preserve">Ce type d&apos;art imaginé à cette époque est ce que nous appelons « pixel art ».</flowDiv>
</flowRoot>
- <rect id="d0e25" display="none" height="1e3px" width="288" y="136.03" x="10"/>
+ <rect id="d0e25" display="none" height="1e3px" width="288" y="126.03" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e25"/>
</flowRegion>
<flowDiv xml:space="preserve">Inkscape s&apos;appuie sur la bibliothèque <flowSpan font-weight="bold" font-family="sans-serif">libdepixelize</flowSpan>, ce qui lui permet de vectoriser automatiquement ces images pixel art un peu spéciales. Vous pouvez utiliser cette fonctionnalité avec d&apos;autres types d&apos;images, mais gardez à l&apos;esprit que le résultat ne sera sans doute pas aussi bon qu&apos;avec l&apos;autre outil de vectorisation d&apos;Inkscape, potrace.</flowDiv>
</flowRoot>
- <rect id="d0e31" display="none" height="1e3px" width="288" y="196.64" x="10"/>
+ <rect id="d0e31" display="none" height="1e3px" width="288" y="186.64" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e31"/>
</flowRegion>
<flowDiv xml:space="preserve">Commençons avec un exemple montrant les possibilités du moteur de vectorisation. Nous avons à gauche une image matricielle (extraite du concours Liberated Pixel Cup) et à droite sa version vectorisée.</flowDiv>
</flowRoot>
- <g id="tracing-pixelart-f01-fr.svglayer1-4" xmlns:cc="http://creativecommons.org/ns#" inkscape:label="Layer 1" transform="translate(10 243.99) matrix(1.5291 0 0 1.5291 -42.714 -435.54)">
+ <g id="tracing-pixelart-f01-fr.svglayer1-4" xmlns:cc="http://creativecommons.org/ns#" inkscape:label="Layer 1" transform="translate(10 233.99) matrix(1.5291 0 0 1.5291 -42.714 -435.54)">
<image id="tracing-pixelart-f01-fr.svgimage3063" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADUAAAA2CAYAAABnctHeAAAABmJLR0QA/wD/AP+gvaeTAAAACXBI WXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QkZBB8AiCZ5dwAABlFJREFUaN7tWk1oG0cU/lasrJoF 2xjqRhY4SG4uIQmEOkERduNAfIxDcQ8uNviSswO9mCbk1EPIpYecfYghJTnIlPjqQJzISKJNCTHG l9YSMciKVDCO0WIJyX49rN5kVtXP7uonP3RgmaCsZ+bb9973vnkzChHhc2uuVg6mJ5fpswKlJ5dJ 1Xw1gRWycfrkQGn+KaWkp6D5p5QPbioiavuTz8SIiKjct30+Fz7D1nZQhWyc3D1+rM964O7xdyS2 XJ1guuiNIQTHBxG9MfTxWqoR08mtpKcQWtxBfG0XocUdlPRU20EpTpOvnlwmq0zHH6Gkp9AXWhK/ F9MrbWFKtRkKd+QaWkD82+2dpHYAbDlRVHNJzmH9E5H3LtI7ApcWwH50Di4tALd3kmSQH5VMqhdr x3pCPPTuJfZWx6BqPuytjsGlBQS4jscUU7JnIKhYjTU9uUzam3vQTy4It+XF70fn0D8RgdI7YoiB dy9xrCdQTK8ojeZqaUx5BoKmfCNPWgtQ4fR9aFvz0AHS/FMKxxCDY5c5iE6Lj1eep/1E4RkIKpxQ XV98JS/AUaDL4HKvb8EzEDRcNZ9BIRuHk3Ftx5TbO0klPYXiQRKlRT+O85mGf1P6+x9TXw/ccT6D 0qLfGF9POYoxl11AMiUfTT4Sk9drv95Pmfp6ibp4kMTR5CNTCrALzGUXkNI7gv6JCEp6SjxW1YXV BM0PE4hdYI6Tb19oSbiMTOXVkvJfOpn6eoBkdpS9ouWW4gn2VsdMlFuZXLu9owYrrl2k0qK/7pct LfoJaxepkI1Tt3cUlRvMYnpFkfOZLWtZ2XSpJ65RLhGmfCZGuUSY1BPXqm72cokwHR2+pXwmRpGZ LpI3ibcDqmmTGJnponwmRkeHbymXCFMz8zreJHIcyW73Hzn05h4O0+tw9/ixvUEoZOPE9H9KU8R+ qpCN0/YGwd3jx2F6HdqbezUZsS+0hEqJ1bSikAmimutVulR8bRfbG4Tppy9Ezvnzkke8802swLkN j69+i+FzCoLjg1BvJJVm57cNirWbFTWtJ5ep2zuKV1eMTeHh8Pv/6942+vPPdgwrWVD7dtegOiln 1aNveZGbOglLcIvDsOR5B+NVW181xaHWEKtYn/Vg9GEB+9E5EVOylmOFwAmV6fqnp49J1Xx4dWVI di0xRxB+ALt4dWUIZ548h55cprtXDb13SjPWNzPvg/r1l8Z8gACwtzoGYMy0vmqiV5XBsJ5bn/Ug OD6I9VkPQos7KB4kxYAsTgEAp4HpSfNX+vnSGL4bsMY/m9cv47fsMe7EzCRwVH4AQNuax350wVis 5gMXcXh9ow8LrBMFOFNMsRuomg9//HgZF355LiRQ/0QEx3oC+9E5NLAUVM1XSQIymUAmk5KeQl1L nVxAX2gJnCdrrU9206pEIfs4DygHaaMYYIWwef0yDodhjqm1XXRvA2eePBcJt9F4lUTBIVEr5tTG wblETusTmzoBGwCwK37b3jCGO9NEvaPR+5a1n9I7AleZXq3kqe+fPML00xcidrjxbyU9hfD1HzB8 TiE7eaqlMqlr+GZjqfLsgpA+D866KZcIC5nz4KxbyJ1cIkwPzrqFpKJnF6iRROsavmlZJrVU+8kH AbL2yyXCdDugmjQea796Bwcd0361NJieXKaytoNna16QA+ehO7EI7l6dFiQUHB+EZ2sehWwc7h5/ zQTcaF7HMVVMryhu7yT1T1SPLWY7IXsGfoc63mDicgx5auzHKjelViVaU3W/3OtbKGTjVG2DV9k4 /3Bfq9jJwArZOOVe32p/2Zmt5SqXsViBu/MZy8K0EU2zEOYq1UEU6Ak9tmUl25bi3Whl1adRm5n3 mfq6c1RUqewCcuR+xfSKUq3qU2+rzZKH+1r5qFqVysnBge3CixxDMkPJNQQ7CxEVWi2A/omI0Hes 8ewcGTVVTWJSkBmKzb63OmYCp/mnFB0gbWveUi1dZjqnZTel2RsvstjkUwzOKxx/vHj5wI1Vt/y+ 0xhqWd2vkhWNr2wAE0XIOgdunH/4ff4ArTh8U1p5N0kOdhkAn2QABkXL51XtOElU0cImL6ySDflY pl1AbKv0Vtx2KQvcjtx66ciNF7mm0InWEVDyPYpONKUTlxitiN5PzlKdbkqnrps6kTv/W+pDWKqT 7V/otDX4FA/ZBAAAAABJRU5ErkJggg== " height="54" width="53" y="288.71" x="79.57"/>
<g id="tracing-pixelart-f01-fr.svgg3066" transform="translate(132.57 288.71)">
<path id="tracing-pixelart-f01-fr.svgpath3068" d="m0 0.5v-0.5h0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5v0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5h-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5v-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5m26.125 51.875q0.125 0.375 0.375 0.375t0.375-0.375 0.25-0.75 0.375-0.625 0.375-0.625 0.125-0.875v-0.5l0.375-0.125q0.375-0.125 0.5-0.5t0.125-0.875 0-1v-0.5 0.375 0.375-0.25q0-0.25-0.09375-0.40625l-0.09375-0.15625 0.04687 0.07813 0.04687 0.07813 0.54688-0.04687q0.547-0.047 0.922-0.172t0.625-0.375 0.625-0.375 0.875-0.125 0.875-0.125 0.625-0.375 0.625-0.375 0.75-0.25 0.625-0.375 0.5-0.5 0.5-0.5 0.5-0.5 0.359-0.609l0.11-0.36-0.11-0.015-0.109-0.016 0.219 0.031q0.219 0.031 0.406 0.094l0.187 0.063-0.281-0.094-0.281-0.094 0.375 0.125q0.375 0.125 0.625 0.375t0.625 0.375 0.75 0 0.5-0.5 0-0.75-0.375-0.625-0.375-0.625l-0.125-0.375 0.375-0.125q0.375-0.125 0.625-0.375t0.5-0.5 0.5-0.5 0.5-0.5 0.375-0.625 0.25-0.75 0.375-0.625 0.375-0.625 0.125-0.875 0.125-0.875 0.375-0.625 0.375-0.625 0.172-0.922l0.04687-0.54688-0.07813-0.04687-0.07813-0.04687 0.15625 0.09375q0.156 0.094 0.406 0.094h0.25-0.375-0.375 0.5q0.5 0 1 0t0.875-0.125 0.625-0.375 0.625-0.375 0.75-0.25 0.5-0.5l0.125-0.375h0.5q0.5 0 0.875-0.125t0.375-0.375-0.375-0.375-0.75-0.25-0.625-0.375-0.625-0.375-0.75-0.25-0.625-0.375-0.625-0.375-0.875-0.125-1 0h-0.5 0.375 0.375-0.25q-0.25 0-0.375 0.125l-0.125 0.125 0.062-0.062 0.063-0.063-0.063-0.563q-0.062-0.562-0.187-0.937t-0.375-0.625-0.375-0.625-0.125-0.875-0.125-0.875-0.375-0.625-0.375-0.625-0.25-0.75-0.375-0.625-0.5-0.5-0.5-0.5-0.5-0.5-0.625-0.375l-0.375-0.125 0.125-0.375q0.125-0.375 0.375-0.625t0.375-0.625 0-0.75-0.5-0.5-0.75 0-0.625 0.375-0.625 0.375l-0.375 0.125 0.281-0.094 0.281-0.094-0.187 0.063q-0.1875 0.0625-0.40625 0.09375l-0.219 0.031 0.109-0.016 0.11-0.015-0.11-0.36q-0.109-0.359-0.359-0.609t-0.5-0.5-0.5-0.5-0.5-0.5-0.625-0.375-0.75-0.25-0.625-0.375-0.625-0.375-0.875-0.125-0.875-0.125-0.625-0.375-0.625-0.375-0.922-0.1719l-0.547-0.0469-0.047 0.0782-0.047 0.0781 0.094-0.1563q0.094-0.1562 0.094-0.4062v-0.25 0.375 0.375-0.5q0-0.5 0-1t-0.125-0.875-0.375-0.625-0.375-0.625-0.25-0.75-0.375-0.625-0.375-0.625-0.25-0.75-0.375-0.375-0.375 0.375-0.25 0.75-0.375 0.625-0.375 0.625-0.25 0.75-0.375 0.625-0.375 0.625-0.125 0.875 0.125 0.875 0.375 0.625 0.375 0.625 0.25 0.75 0.375 0.625 0.375 0.625 0 0.75-0.375 0.625-0.5 0.5-0.5 0.5-0.375 0.625-0.125 0.875 0 1 0 1 0 1 0 1 0.125 0.875 0.5 0.5l0.375 0.125-0.125 0.375q-0.125 0.375-0.5 0.5t-0.875 0.125h-0.5v-0.5q0-0.5-0.125-0.875t-0.5-0.5-0.875-0.125-1 0h-0.5l-0.125-0.375q-0.125-0.375-0.375-0.625t-0.5-0.5-0.5-0.5-0.375-0.625-0.125-0.875-0.125-0.875-0.375-0.625-0.5-0.5-0.625-0.375-0.875-0.125-0.875-0.125-0.625-0.375-0.625-0.375-0.75 0-0.5 0.5 0 0.75 0.375 0.625 0.375 0.625l0.125 0.375-0.375 0.125q-0.375 0.125-0.625 0.375t-0.5 0.5-0.5 0.5-0.5 0.5-0.375 0.625-0.25 0.75-0.375 0.625-0.375 0.625-0.125 0.875-0.125 0.875-0.375 0.625-0.375 0.625-0.1875 0.937l-0.0625 0.563 0.0625 0.063 0.0625 0.062-0.125-0.125q-0.125-0.125-0.375-0.125h-0.25 0.375 0.375-0.5q-0.5 0-1 0t-0.875 0.125-0.625 0.375-0.625 0.375-0.75 0.25-0.625 0.375-0.625 0.375-0.75 0.25-0.375 0.375 0.375 0.375 0.875 0.125h0.5l0.125 0.375q0.125 0.375 0.5 0.5t0.75 0.25 0.625 0.375 0.625 0.375 0.875 0.125 1 0h0.5-0.375-0.375 0.25q0.25 0 0.40625-0.09375l0.1563-0.094-0.0781 0.047-0.0782 0.047 0.0469 0.547q0.0469 0.547 0.1719 0.922t0.375 0.625 0.375 0.625 0.125 0.875 0.125 0.875 0.375 0.625 0.375 0.625 0.25 0.75 0.375 0.625 0.5 0.5 0.5 0.5 0.5 0.5 0.625 0.375l0.375 0.125-0.125 0.375q-0.125 0.375-0.375 0.625t-0.375 0.625 0 0.75 0.5 0.5 0.75 0 0.625-0.375 0.625-0.375l0.375-0.125-0.281 0.094-0.281 0.094 0.187-0.063q0.1875-0.0625 0.40625-0.09375l0.219-0.031-0.10938 0.01563-0.10938 0.01563 0.10938 0.35938q0.109 0.359 0.359 0.609t0.5 0.5 0.5 0.5 0.5 0.5 0.625 0.375 0.75 0.25 0.625 0.375 0.625 0.375 0.875 0.125 0.875 0.125 0.625 0.375 0.625 0.375 0.922 0.172l0.54688 0.04687 0.04687-0.07813 0.04687-0.07813-0.09375 0.15625q-0.094 0.156-0.094 0.406v0.25-0.375-0.375 0.5q0 0.5 0 1t0.125 0.875 0.5 0.5l0.375 0.125v0.5q0 0.5 0.125 0.875t0.375 0.625 0.375 0.625 0.25 0.75m-6.125-38.875q0.25 0.25 0.5 0.25t0.5-0.25 0.5-0.5 0.25-0.5-0.25-0.5-0.5-0.5-0.5-0.25-0.5 0.25-0.5 0.5-0.25 0.5 0.25 0.5 0.5 0.5m-1-10q0.25 0.25 0.5 0.25t0.5-0.25 0.5-0.5 0.25-0.5-0.25-0.5-0.5-0.5-0.5-0.25-0.5 0.25-0.5 0.5-0.25 0.5 0.25 0.5 0.5 0.5m-5 6q0.25 0.25 0.5 0.25t0.5-0.25 0.5-0.5 0.25-0.5-0.25-0.5-0.5-0.5-0.5-0.25-0.5 0.25-0.5 0.5-0.25 0.5 0.25 0.5 0.5 0.5" fill-opacity="0" inkscape:connector-curvature="0"/>
@@ -327,14 +327,14 @@
<path id="tracing-pixelart-f01-fr.svgpath3540" d="m26 49.5v-0.5h0.5 0.5v0.5q0 0.5-0.125 0.875t-0.375 0.375-0.375-0.375-0.125-0.875" inkscape:connector-curvature="0" fill="#f8e9c7"/>
</g>
</g>
- <rect id="d0e44" display="none" height="1e3px" width="288" y="338.56" x="10"/>
+ <rect id="d0e44" display="none" height="1e3px" width="288" y="328.56" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e44"/>
</flowRegion>
<flowDiv xml:space="preserve">libdepixelize s&apos;appuie sur l&apos;algorithme Kopf-Lischinski pour vectoriser les images. Cet algorithme utilise les idées de plusieurs techniques informatiques et plusieurs concepts mathématiques pour produire un résultat satisfaisant avec les images pixel art. Détail d&apos;importance, le canal alpha est complètement ignoré par l&apos;algorithme, et il n&apos;existe pas pour l&apos;instant d&apos;extensions permettant ce traitement. Cependant, la vectorisation des images pixel art contenant un canal alpha donne un résultat similaire à celle des images reconnues par Kopf-Lischinski.</flowDiv>
</flowRoot>
- <g id="tracing-pixelart-f02-fr.svglayer1-3" xmlns:cc="http://creativecommons.org/ns#" inkscape:label="Layer 1" transform="translate(10 438.89) matrix(.74809 0 0 .74809 -90.352 -216.94)">
+ <g id="tracing-pixelart-f02-fr.svglayer1-3" xmlns:cc="http://creativecommons.org/ns#" inkscape:label="Layer 1" transform="translate(10 428.89) matrix(.74809 0 0 .74809 -90.352 -216.94)">
<image id="tracing-pixelart-f02-fr.svgimage6827" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOAAAABACAYAAAADMXsPAAAAIGNIUk0AAHolAACAgwAA+f8AAIDp AAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAApOSURBVHja7d2hbxxH FAbwlRpFQVWkqJWlEhdUqlWUopYlNDAw0KyhJZXCYhgaYimoCiwMaP+ASCWBpoVRkUGBobeek5/1 7rvvzbyZ3bN3Z+akpzv79vYc6355b97MjodxHIdfvvpiePfubYgRIzwv8WQYRhX0+/r4ENfnZece 8Nja4/3h0eiI5n4vtxUvjg5HHUv4mTb4rgGOl5eXN3F29nlzLwgDrk/PH47//v1kE4Iw3Mv3Qpw8 3f6HCTg8N+K+q5B/v+fYz2cfskPjuvo6GYhRn6tGFDm//6nwLs8/jnILj5eAkOLTAENofDoDanwB 3nXswNPnagUgQ+e5MYw1Z6V9AxR4GEtBeFMeIkCBgviuHt+UnSzrBYD6fAyfzqy1lpkWOi9EjbEF iPsGqLOgxCIyoABkUDTAcK/RCEBWclqZFAHWNA70wMNs6M2MHoi1lKlzj9E0ukWOAXUGFHSs/Az3 OCZEgIgvPKfR6fPWBNA7vmORc9MQawS4rwyFCJf0b97qUmokAk4ACkIdugTV+GQ8yDKq4Lt6PNQA cAo+DbAkG9YI8PzjySbmxrJUhDsA9diPIdQdT+x+SsjXVilaC8Cp+EoxMoS1ARQkU8vGpY79dgBe g6ClJ05BhBjPX98Ew8gaMdL9DO+1doC5+C7eP6ThBZlCuHaAiE9CsmEJHgZvsSWoANSlopX5ND6N 0Co9MfO1BFCgHR8c0YhBTHVNawKICGMYPYhY82WJ/+YtgCwLHjx9uwWQ4QsRjpNg476aAObg09h+ uHdvKxBiSaNGdUer64IiGlaistcsuemSBTBg+uu/i819DGB4/vjN582x4T58reFh6Vk7QJbxEB9D WAKxNoC5QDU2uem5v9VlQF2KCkDByABqfOE4AavLUNV0Wf160IBkKj75/h/HzzfhRejJgrXj011S jU7fNDxZ8bL4MaCGIVhSAAWfBRDBLXU52lwAvZlP8OlbTiZEjC0AZPisJWaCEG9L7oKySfKt7JYC iCWotb4U5wPXhu+fk19NFKzJ4sFnIfSWorBSpmp8VlgQ2W1JCHfm/zREDYyNAxGgHGehw2VpNQG0 Op05ABFhqhTFxzUC9OCzMK4B4WDN18lj6WyySXgEGL6WqQh9DmzIrHUpmgUwNs2ACFMAcUyYM1dY O8BPb15Gw8qIS0aYXIw9GBPxGqGEfO/nx483kZqOWBNAwTcHwBAxgPo4b1c0tk507fg0soMHR2Yg xBTCJQGkpWjAFyClEMrysxDh2JfHLzYRXsvGlmuchijNfrkIEaC3K1ojwKcHhy54GDmZ8K4R7qyE 0dlQA5RlaRqhXvupAYbXCEBZlrb2eUApHTELaoBsXi8HoZSfeEyLAGP4fjt4sBOlCBcDEGIDRgOE rShG3IqC4ROkV4+t91kdQEFoASxBiPOBXoB4XWGNABm8s08fx4uLi53HCHENCKNPBmQMIQuGTwNc +wdCZ0CrBI2tcMmJDnAXYMAl0MLnMjwOv6Nv7t/fwmghrBogwyeNmICvA8zH5wXINnWqaQzIMl/4 XAo+/ZhlQk8WXCxAHANaTZhBQWWNmBoByn1swXUHOC9AGfowfPI4VopWATB2Ua6VEWsC6GnElCKc iq8FgDF8kgWxFE1lwdUBTGVD7ILWBhARxgB6EVqvaR2gjAOl/EwBDJFbhi4Z4MDmAq0gma+mDGhO RXgQWhBjx5Xgq2kljAa4rwx41wu0swCyjZkkEB+OA2sCyMaCejG2BdATnsXYLQBEfH/+9H00A0pn NHc6YtEANcJYCcq6oPi9Gj4UbByYU4rm4MvNfrUDDFktIBRoGqF0RmPTELFLme50It4BMNkJZV1Q HAfWUhaxsWBuKbpPfDVnwBABGYMXnivBh9tbLB5gbgeU7Z5dYzfU6oqmIOZeiIvv1QJARKgxyuMU PgbwrvFllaBTV8PUAvDoaHv5mAYYy4apyMl6CP96TWlVlyFZa0Fz14HG8Old1zx70Fh70kxBnA3Q O/1Q21K0GEDrMqWp2xKmED5/9mwTNQIsvRrCc8W8xmeNAa0NfWNL2Uog+g+EMaAe9wlOPQ7UAL8+ /L0afPpDb5WiVjb0bszLylo8f/hZ3rx6tYnrn2moHWEMone7CsTH5gHZnzRjmwTP0U3N+mXIPKCG p6ca2HWC4/nrQf5mYA0A5QNvTcwjvtgeMqkxngVb/iNoASBDyK6AT+HDzX6tvxNobQ6cgl1almb/ Mp5A5hOAH9693Sk9AzyJWrKf+sBThAxjKjta4zt8DQJsDWEuRAYPMxmWkOw8sX1pdGmK5akHYv6g keDTAPVfyq0FHwKUD7weDwoIDQWnKWK4GEI5J563xSyIEBlGC4mFC7MXO0dqUyh8PneZWzFAxCcA w1/QvcqAmwh/xrqm5ov1gcfxWEk2ZMDknHJeeS6gxyzYCkALoxWp7IU7aCPo2OtTpakH4eTsp/HV 1O30AmQQdEbUcBBkboZT21iYP1NLAFNjRs/4kHU6NcJwLtwYSl4fex9jo+BJXdCd7If4WgEo+DRA jYRlL2zWxDKcd5zXCkDJZiVNm1RZyrqYCJCNO/H72ICxxpmTpiF09mP4WgOYyooMoCBkx6SaLRZA /XzNHdAShKk/dcaQ5ABEyNjUmQXgoy8f0ezXCj4PwFRWxI5pCDxOxne61GTvEfu5asYnY7qS8aFn vMYAWgjxnLEr7WMLv4saL63hiwFEfDGYuAqGQfW8b2sAsaRMIRQYnrEgW+niQcjO7UGYDRDHfgxf IwB3wDGAqY5prHxkXcyWAbJJeIEVW5/paZLEuqEphPq9chGWAGwenxfgFDgacMl5ZF6ydoCICktL jaKkG4oNGQ1N4LOuqRdhEcBWy87YWtDbBnh9P7QM0MLIpgasMtHqiFoNGQ0tnM+a42MIPTuvubNf 6/i840APQkRj4UsBrB1fbCzIvrYAWgixZDWmDShIhov9YRg8Dju5ruzX8W2Xod4syLImogpfe7Jf KiPXDNBaC2p1J1NZMrU0zbr8KLXucy8AOz4O0JsFBYpkMP21N+OmANaOL3ZVRAplztI0qyGDWdFa 6TI7wB6+LMiQYcTKzFJcHWA8C3rHgJ4laimA+jnr+Q5wJoBWaZmLLAWw4yvPgrpkzcHHroTHzihr tMSes7JfBzhzV/S237c1fNYql9j3ci7ejV1aZF0ZzwB6s18HOL0UvclUkhn3cP7omNI6pkf+wmwv Ppb9EKAHXwfYo8myNdUNjW3giwAtfPja2QH++O13p57oH4AeSyxbvd1QvX+oByfb/jB2Fcfe4JHo H4Qeiy5FY3vKxHZFY8/rlTmz7QkzAd/qs2H4DyQjTvcQ7vfv4OYByJozMXw6vBcR9ww4DeDpAqID 3CPC2IoZ65icC4dLPoRFWa8igKcLjg6woBmTu+kSYsP5x71tzNtys2Xh8Hrja8JEfgoWe54tcyv5 eSZ9AK0SrQPsANe6ya+GlXp+jp+l6MOXakxUCrCXoI3sK+p9/lYAeuE1UIL2JkyP2cOFr2V4fRqi xz7jf4MwidrFWy5FAAAAAElFTkSuQmCC " height="64" width="224" y="292.64" x="224.09"/>
<g id="tracing-pixelart-f02-fr.svgg6830" transform="translate(224.09 356.64)">
<path id="tracing-pixelart-f02-fr.svgpath6832" d="m0 0.5v-0.5h0.5 0.5 0.5 0.5 0.5 0.5l-0.125 0.375q-0.125 0.375-0.375 0.625t-0.5 0.5-0.5 0.5-0.375 0.625-0.125 0.875 0 1 0.125 0.875 0.375 0.625 0.375 0.625 0.25 0.75 0.375 0.625 0.375 0.625 0.25 0.75 0.375 0.625 0.375 0.625 0.25 0.75 0.375 0.625 0.25 0.5-0.375 0.375-0.875 0.125-0.875 0.125-0.625 0.375-0.5 0.5-0.5 0.5-0.625 0.375l-0.375 0.125v-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5-0.5" fill-opacity="0" inkscape:connector-curvature="0"/>
@@ -698,52 +698,52 @@
<path id="tracing-pixelart-f02-fr.svgpath7548" d="m206.11 59.609q0.14-0.359 0.55-0.453l0.4-0.094 0.06-0.062 0.0625-0.0625-0.125 0.125q-0.125 0.125-0.1875 0.3125l-0.0625 0.1875 0.0937-0.28125 0.1-0.28-0.125 0.375q-0.125 0.375-0.5 0.5l-0.38 0.125 0.28125-0.09375 0.28125-0.09375-0.1875 0.0625q-0.1875 0.0625-0.40625 0.09375l-0.22 0.031 0.10937-0.01563 0.10938-0.01563 0.14062-0.35938" inkscape:connector-curvature="0" fill="#cd8b6a"/>
</g>
</g>
- <rect id="d0e57" display="none" height="1e3px" width="288" y="546.65" x="10"/>
+ <rect id="d0e57" display="none" height="1e3px" width="288" y="536.65" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e57"/>
</flowRegion>
<flowDiv xml:space="preserve">L&apos;image ci-dessus contient un canal alpha et sa vectorisation est convenable. Si malgré tout vous trouvez ce résultat insatisfaisant et que vous pensez que la cause en est le canal alpha, contactez le gestionnaire de la bibliothèque libdepixelize (en saisissant un rapport de défaut sur la page du projet) qui se fera un plaisir d&apos;améliorer son algorithme (ce qu&apos;il ne peut pas faire en l&apos;absence de retour sur d&apos;éventuelles images donnant un mauvais résultat).</flowDiv>
</flowRoot>
- <rect id="d0e60" display="none" height="1e3px" width="288" y="628.34" x="10"/>
+ <rect id="d0e60" display="none" height="1e3px" width="288" y="618.34" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e60"/>
</flowRegion>
<flowDiv xml:space="preserve">L&apos;image ci-dessous est une capture d&apos;écran de la boîte de dialogue <flowSpan font-family="sans-serif">Vectoriser du pixel art</flowSpan> que vous pouvez ouvrir avec le menu <flowSpan font-family="sans-serif">Chemin &gt; Vectoriser du pixel art…</flowSpan> ou en cliquant avec le bouton droit de la souris sur une image puis en sélectionnant l&apos;entrée <flowSpan font-family="sans-serif">Vectoriser du pixel art</flowSpan>.</flowDiv>
</flowRoot>
- <g id="tracing-pixelart-f03-fr.svglayer1-42" xmlns:cc="http://creativecommons.org/ns#" inkscape:label="Camada 1" transform="translate(10 695.42) matrix(.38212 0 0 .38212 -160.25 -203)">
+ <g id="tracing-pixelart-f03-fr.svglayer1-42" xmlns:cc="http://creativecommons.org/ns#" inkscape:label="Camada 1" transform="translate(10 685.42) matrix(.38212 0 0 .38212 -160.25 -203)">
<image id="tracing-pixelart-f03-fr.svgimage3399" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATAAAAFGCAYAAADtgMMvAAAABHNCSVQICAgIfAhkiAAAIABJREFU eJzsnXlYVEf2sN+mWVvAjU0QEQX3BcctKooGiDEuuKCCGINRTJw4STTRMUMmk00nySTfqImJxjEm Loh7UHEZNRrIuKJRI2hEESSAqLigNArd3O8P0vdHszQNNCCk3ufpR7m37jmn6t4+XXWqbh0Fv5OY mGh58eLFFwsKCmYA7YHmCAQCwZPBXUmSrlhaWq729PT8pk+fPoUACoBDhw653bp1a5e3t3evTp06 oVKp6tdUgUDQoEhNTeXo0aMEBATUmo5Hjx5x/fp1fvvttzMqlWp0UFBQpuLatWvWx48fP/Hcc8/1 sLOzQ5KkWjNAIBA0Tq5fv86xY8fw8/OrdV35+fkkJCSctbe3f8r89OnTs729vYXzEggENUKhUKDV amtdj6WlJc7Ozj6ZmZkvmxcUFEzp3LkzRUVFta5YIBA0XhQKBRqNpk50OTs7k5WVFWoOdFapVHXi OQUCQeOlLh2Yubk5QBdzoElRUZEYPgoEghpRlw7sd+zMAeG8BAJBjakHB4bswIQTEwgENUE4MIFA 0GCpVwcmEAgENUGhUBi1msHMzAygTNmKjhtCOLAnFL+AZ8h/9MhgmSMH9qOysakji8rn6WdH8PBh nvy3SqWiU4cOTJwwDv9hw7iQmMiLL82mb5/eLF/y7xrr08kbNHAA//7kY4NlMzIzGTcpBIVCwfeb N9GqlYtROgoLC5EkCXNzc/lLJagchUJRqS8xMzOjR48emJmZkZycTG5uLgD29vZ4e3tTVFTEuXPn jHZiZiAc2JOIrZ0dtra22NraYmlpCYCFhYV8zNbWtp4t1KEAoIlKhZWVFWq1mjNnz/LW3/9BzK7d KBTFDkChUJhG2+/yzBSVO5ZdsXuA4ud75549Ruv44J8f4ft0APE//a96Rv5B0TkwQ5/CwkJ5yZa3 tzd2dnbY2dnh7e0NgFarlX9AKvvA7z2woqIi8UvzhHEgdpf8pf/m2+9YuvxLQidP4o3XXpXLPHr0 qNIfH0mSDDqPis5Xdl1p9sTsoFmzZjx+/Jivvl7FmrXrOPzjj4wdM5pzp05QVFREQUGB0fIqskFC 0jtfEVqtll2xe7CwsECj0bBrdywzXpiGUqmsVK/sHI3oUQiKUSgURg0hNRoNsbGxjBkzBjMzMzp2 7AgU38uioiJiY2NxcnLSrfOqFDGEfEJ5/Pix/H/dQ1FUVMSjEsPKC4lJzHh5Nn/y8eFycjKFGg1D hwzm3bcjWRD5NhcSk8jNzaVVKxeeDQxk+rTnMTc35+7du3yxYiUnTp0iN/cBrd1cCXj6aV58YRo5 d+7w2ZKlHD95Cnt7O57x9yfixelYWFgYtreggEePHlFQWCgPfW1tbTn/ywVmvDybvr178/m/P+Pv 773PgUM/EDppEq//5RVu5+QQ8vwL5OXlsXL55/To1q3aNpTk6PET3Lp9m6BRo8jIzCThzBmOnzzJ oAEDDLZdyrVUkq9cAWD+W38DoFPHjnz3n6+N1v1HxZghpFKpxMzMjJ07dzJ27FjMzc2RJAmNRsPO nTsxMzNDqVQa7ZPELGQDoOSdKXmfdJ2Tn8+dw9nJCZXKhoyMTIqKikhKukiPbl2xtrbh57Nn+c+a b7GxsWHC2CBemvMqadev4+3Vnp7du3MlJYWsrBs8evSI2X95jfTffqNP7z9x+3YO363fwMO8PObP fd2gjRNCpqDRaMjPzwdApbIhdNIkJKnY+SrMio39+1sLSbp4iY2bNzPwqf5s3raNBw8e8NqcV+jZ vTv5+fmGbZDrb/iZ3bk7FoAA/2FkZmaRcOYMMbt2M/Cppwy23eBBA8lT55GZmUXvXr1wcXbG1bWV +H5Ugq4HZkw7OTk5yT/KJXvZTk5OmJmZVamtRQ+sEdCvTx9WLv8cKL6Xjx494uDeWG7eukVqWhqu rVxYs3YdpxJOY2drS9r16zw91I9PP/onUBxY1Wq17IjZSdr16wzzG8Jf/vxntFot02e9xI6Ynbz6 59lYWVlVaMODBw+wtrbGzdWVfn37MC1sCm6urlxITNQrZ2VlxceLPuSFmREs+Fsk+Y8eMXDAU4SF TKaoqIgDh34waIMx3L59m5+OHsXe3o7evXrR0dubjz/7f8T/7yi3c3JwaNmywrYrKiriRnY2mZlZ hIWGMHTIYDl2I6gYY4eQAM2aNaNLly4AessuBg4cSFJSEvfu3TNar+iBNSRK3SfdfyUkuecDoFar eeOvCzl6/ITe5Y8ePeJ6ejoAPj176A1TAa6lpgJw+Mc4Dv8Yp3fut4xM2nm2rdC0Hw/sp1mzZkiS hFarRaPRoNVqKflY6Z4zb6/2jAsaw9btOwBY+OYbcmC3MhtKyyuP3Xv3UVRURG7uAwYOfVrv3J59 +3l+SmiFbVdSrlajKdNGgooxdhZSF/cqKipi586dAHoxsZMnTxo9CykcWANA32lV/v8t23dw9PgJ Rgx/hmlhYdy5e4dXXpsLgIdHGwASTv/MhLFj9YLkumUGzz4TyPDAQD0bnJ2dDD4j6vz8cmNU5dl4 PT2dPXv3yQ/8v5d9zofv/gOFQlGpDampaQAUFmrKtaeoqEiefbS3t5MD8oUaDXl5eezcHcuUyZMq bDv4v/VI+UZMkgiKMXYIqdFo0Gg0csBeV37nzp2MHDmSoqIiNBqN0RNIYgjZCNF9Aa+n/8ZPR49y 8dKv8rnhAQGs27CRuJ9+4oWZs2jr0YZrqWl07dyZOX9+mVWr1xD30/8wNzfH2cmJu/fuYaZQ8FS/ viZ5TjQaDe+8/yHq/Hw++Mc7bNm+ncM/xrEhehNTQ0N4JiDAoA3NmzUD4MzZsyz4WyTB48fTr09v Wf7PZ8+RkZmJV/v2bN6wTm4LtTqf54LG8ltGBmfPncfa2rpCGz3begDw6b+X8P3OXTwuKODr5Z+b bClIY0WhUFS6mkGj0fDdd98hSRLOzs44OzsDcPPmTb755hsUCgWdOnUyarYYRA+swVHRfSp5fHLw BH4+e5ZjJ06SmJRExw4dUKmKF7wqlUpWr/yKJcu+4OiJ46SmpdG6tRsuLs7YNmnCV18s470PF7N7 z15Z3pDBvpV26Y15hiRJ4uvV33Dx0iWeCfAn0P9pevboQejz01ix6j907OBN3969Ddrg6tqK0MmT iNm1iytXU7C0sNDTu+v39V4zp4frDQ0VCgXTpoaxbPmX7IyNZdKECRW2afC4caRcS+XoseOkpafT pXMn1Gq12GrdALoeWGWOR6lU0rVrVwC9pRKtWrXC0dGxzPFK9UZFRUnPPPOMwQCtoH6xtLTE0tKS wsJCvZiMUqnExsYGrVZb5stqbW3NgwcPQKHA3s5ODrDm5+ejUCiwsrLS+7XUaDQUFBRgZmaGtbU1 eXl5csDbxsZGb/lGSZo0aYJCoSAvL69cB1baRl1dNBoNjx49wszMDBsbGxQKBfn5+Wi12kptsLKy kh/yR48e6e1lZ21tjbm5OY8ePSrzXl5J3YWFheW2na79rKys5C+jVqvl8ePH4kfeALm5uVy4cAE7 O7s605mamip6YA2Bx48flxtM1mg0xU6qFJIkoVar5S95Xl5emfOlv7Q6tFoteXl5KBQKnBwdDZYF ePjwoUHbS9tYui5arbaMjMpsqMiZAgZtLa27vLYDw+0jqBhjhpCmRsTAGjE1ua9Pwo/ak2CDwDiM HUKaGtEDEwgEJkG3yr4uJzuEAxMIBDVGpVLRrFkzioqK6rQXJoaQAoHAJDg6OpKamoq9vX2dxcJE D0wgEJiE5s2bk5+fT1ZWFnZ2dlhaWta6IzMHsKnnTfEEAkHDp7CwEHd3d5o1a8bly5er9E5jdRFD SIFAYDLy8/OxsbFh0KBBta5r48aNGL/kVSAQCIygsLCQu3fv1oku0QMTCAQNFnOAgoICrvy+C6VA IBA8ySiVSjw9PYHfHdi1a9fo3bs3KpVKfmlV/Cv+Ff/+cf59+PAh06dPZ8SIETV2MA8fPqRPnz4M GTKE3NzcWrH32LFjwO8vc7u7uzN48GDUanWNjRcIBA2Ps2fPcvfuXXx9fbG3t6+RrAcPHhAXF0fL li3p2bOniSzU5/Tp06SnpyMv0hDOSyD445KSkoKfn1+NnRcU7/rRvXt3UlJSTGBZWVSq/9vWyKy8 gwKB4I9FQUEBTZo0qbEcze/bcNvY2NTadtwlO1uiByYQCEyCJEkUFBRQVFRUqysbSna2zEseFE5M IBDouHPnDhs3buT69et6m0aWxNPTk7CwMPlFbmO4e/cumzdvJj09vUK5bdu2ZfLkyTT7fQvxkqjV ak6fPg2UcGC66L4hYmJiCCyVaKEu8fLyIjMzEyjedrZ169Y888wzLF68GJVKRUZGBt7e3qxcuZLn n3++Rrp0sjZs2MC4ceMMln3jjTf46quveO+995g/f36N9AoETwobNmzAw8ODl19+udwdJjQaDXv2 7GHjxo3Mnm1cyjuA6Oho2rRpw8yZMyuUu3//fjZv3sysWbPKnFepVMTHxwOlYmDfffed/BkyZAgt W7bUO9a9e3ejjawthg0bxrfffsvy5csZNWoUGzdu5M9//jMAdnZ2REZG1trMR3loNBq2bt0KFN8Y Y7rOH374YY0drEBQ26SlpfHcc8+V62Ty8/MxNzdn5MiRpP6eCs9Yrl+/zvDhw8nNzWXVqlXyqv27 d++yatUqHjx4wLPPPsv169fLvb7kSNG8vIMAhw8fJjU1lYkTJxplVGFhIffu3aNZs2blptcqLCzk /v37ODg4lDmXm5uLlZWVUfvyt2vXjkmTJsl/Ozo68u6777J8+XLs7e2JjIw0yt7q6i/N4cOHuXXr Fm+88QafffYZFy5cqNTRX758maSkpCrrEgjqmtIJNvLz84mPjyc+Pp4PPvgApVJZ4TCwMrlbt24l JSWFVatWERwczNatW7l79y5bt24lIiKiQrkV9sAqIyMjA5VKxdy5c/Hy8sLOzo6zZ88yYsQIWrRo gYeHBw4ODsyfP1/uiWRlZREcHIyDgwNt2rShe/fuJP6erTklJYVhw4bJGUkiIiLK7N9eGY8fP5bz 0ensW7duHStWrEClUsmJMwsLC/H396dHjx7k5uaaTH90dDQdO3Zk/vz5WFlZER0dbbC9VCoVW7du 5eLFi6hUKlQqFVevXq2SToGgrsnPz+e///0vixcv5r///a9JcgYEBwfTvHlzued19+5dmjdvTnBw sMHrjOqBGeLy5cu8/fbbqFQqXF1d8fPzY9asWbi7u7N//34WLVrE4MGDGTVqFJMmTaKwsJBt27bh 6urKpUuX8PLyQqPRMG7cONq2bUtCQgIPHjxgwoQJfPLJJ7z33nsV6r5y5Qpbt25Fq9Vy5coVlixZ wvPPP4+trS3379+Xy7300kvExcUxa9YsevTowerVq/n555+Ji4vD3t6+2vpLN+TOnTt57bXXsLe3 JyAggM2bN/PBBx/o7YNUsr0sLCz46quvSEtL44svvgDAxcXF6LYXCOqaO3fusGLFCu7cuWNSuTpn tWrVKvmYzqkZomQPrFqzkCEhIXoxnIULFwLFQzGlUsmiRYv45ZdfcHBw4PTp08THx9O7d3Hy0S5d ugDFQ6/k5GQWLFggj6d9fHyIjY016EDi4uKIi4vDwcEBNzc3XnnllXKHjQqFghUrVjBgwABGjhzJ tWvXWLFiBd26dQMgPj6+WvpLEhsbS15eHhN+zzE4YcIEYmNj+emnnxgyZEiF7bVjxw5ycnLqdUJE IDCWFi1aMHfuXHnoaKqMTbrhYkl0w0dDTqzCWcjqsnnzZiIjI8nIyJDzwmk0Gn79tTgjdNu2bctc c+3aNQAiIiL0jjs5ORnU9eKLL/L5558bZZe9vT0ffPABU6dOxcfHh2nTptVYf0l0w0Wdc9axadMm PQcmEDR0bGxseOaZZxg8eLDsyGqKLual64mVjoFVRLVjYOVx7tw5wsPDmTNnDnfu3CE7O1sOhru6 ugKQnJxc5jrduXPnzqFWq+VPVWc0DKFWq1m0aBEuLi6cPXuWTZs2VVl/RbOKOTk5HDhwgNDQUL2Z 2kGDBrF9+3aDq5AVCkW1Ap8CQV1SXoBe58j+9re/AZRJHlwVucHBwbRr146IiAi9f4ODgw3KNelK /OzsbKB4NjAnJ4dVq1ZRUFAAgK+vLx4eHrzyyiscPHiQjIwMfvjhBzQajXwuLCyMgwcPkpyczMGD Bzl48GC17CiP+fPnk5WVxY8//si4ceOYM2eO3CusTL/OocfFxfHf//63TPLV7du3o9FoeOutt5g4 caL8mT17Nvfv32f//v0V2uXp6Ulqairr168nOjpaL3YnEDwpeHh4sGfPnnKdiS6r+e7du+WtbYzF 3d2dffv2YWdnpzdcbN68OREREdjb27N3795yR25g4pX4/v7+hIWFMXPmTKB4ONW+fXugOO389u3b efnllxkzZgxQvAxi27ZtdOzYke3bt/Pqq68SFBSEJEm0aNGC2bNnExAQUGU7SrN582bWrFnD5s2b cXd356uvvmLAgAGEhYURFxeHra2tQf3Nmzdn4sSJfP3112zcuJELFy5ga2sry9+0aRP9+vXDy8tL T+9zzz2Hvb09GzduLDO01DF79mx++uknXn/9dTw9PfHz86Np06Y1rrNAYEqmTJnC+vXr5Rh3aZRK Je7u7kydOrVKcidPnkx0dDR///vfK5TbunVrQkJCyj1fMgYmb6dT0ZfNWLKzsykqKsLFxaXcxJa5 ubk8fvwYR0fHMufy8/N5+PAhDg4OdZoUszL9kiSRmZmJo6MjlpaWdW6XQFBXREdHM3369BrJ0Gq1 PH78mIKCAgoKCoiNja3QCdUEXQwsPT3ddO9COjs7GzxvaJsOGxubes2MVJF+hUKBm5tbPVgkENQv kiQZ/W5jXWPyWUiBQNB40Gg0chy7qpiZmWFubl6t4L6x1HgdmEAgaFxYWlrKr9QVFBRUe5ZcqVQi SRL5+fm1FnYRPTCBQKBHu3btiIuLo2fPntjY2FR7+KhQKMjPz+fcuXPyZJ6pMbgOTPwr/hX//vH+ 1e0+ExMTw65du4iNja3WZ/fu3fzvf/9j7dq1dO/evVbsLdnZkmchnZ2d+eGHHxAIBIInFUtLS3x9 fcnOztafhfzf//7H008/TevWrevTPoFAIKiQ9PR0jh49Kg9P5SHk48ePhfMSCARPNO7u7jx69Ej+ 28xAWYFAIHiiEQ5MIBA0WIQDEwgEDRbhwAQCQYNFODCBQNBgEQ5MIBA0WIQDEwgEDRbhwAQCQYOl Wg7MxcUFlUpFTk6O3vGTJ0+iUqnw8/MziXEVodMzcuRIo8oXFBTw6NEjvTfsqypDIBA8efwhemAv v/wyLVq0YM+ePfVtikAgMCHmlRcxDZIkmWy76H79+lW4/Y+xegzJMCTHlPUQCAQ1o9Z7YNnZ2Uyd OpVWrVrRuXNn3nnnHXm3x71796JSqfTyNQYFBaFSqTh69Kg8zBs+fDguLi60bNmS6dOnlxn+SZLE 559/Tq9evWjevDkdOnRgypQpAPTv31/O3zh58mRUKhWDBg0qdwh569YtXn75Zby8vHBwcKBPnz58 9NFHBuULBIL6o0Y9sO7du2Nm9n8+sPQ2svn5+QwfPpwrV64wZMgQsrOz+fTTT8nNzWXJkiVG6/np p59wc3PD1taWq1evljm/f/9+/vrXv9K8eXOeeuopbt26xYkTJwB49tlnyc3NJS0tDV9fX1q3bl1u uia1Wk1gYCCXL1+ma9eu9OvXj4sXL5KammpQvkAgqD9q5MDu3btn8PyWLVu4fPkyo0aN4oMPPkCj 0eDv78/q1av55z//abSeoUOHEhsbK/998uRJvfMPHjwAoGvXrrz55psMGDBATtLx3nvvkZ6eTlpa Gn/5y18YPXp0uTI2b97M5cuXGT16NNHR0fIwUZIkOf15efIFAkH9UaMhZHp6ul5W6yNHjuidT0pK AmD37t306tWLvn37kpubi1arNWkG7vHjx/P++++TnJzMmDFjaNu2LW+++abethuVoUt4O2jQIL0Y l0KhMIl8gUBgemo1BtamTRsAJk6cyKZNm/Q+uiEh/F927+py8+ZNXnzxRa5cucLRo0fp3bs3K1as kGNfumGuoaB9hw4dAIiPj0eSpCrJFwgE9UOtzkJOmjSJRYsWsW/fPmxsbGjdujU3b97EzMyM0aNH 07t3b2xtbYmPj2fo0KFYWlpy7ty5KuvZtm0bCxYswM3NDVdXV7k3pXNKHTt2BGDu3LmsWbOGR48e 8fHHH+vJmDx5Mv/+97+JjY3lqaeeomPHjly8eJF+/frRuXNng/IFAkH9UKs9MAcHB3bv3o2npydr 165l8eLF/Oc//yEjIwMo3qA/KiqKnj17kpiYyIMHD+QYVVXo3bs3Q4YMIS8vj6SkJNq1a8d3333H wIEDAXjppZeYPHkyZmZm/Prrr7Rs2ZKHDx/qyVCpVBw4cICQkBCysrKIiYlBo9Hg6upaqXyBQFA/ yEk9EhMT9ZYzmJr79+9z48YNXFxcaNq0aa3pMQWSJCFJkt4Mq0AgeDJYu3YtXbt21U/qUds0bdr0 iXdcOhQKhVisKhA0AEQXQyAQNFiEAxMIBA0W4cAEAkGDRTgwgUDQYBEOTCAQNFiEAxMIBA0W4cAE AkGDpc7WgQkEjZnMzEzi4uLq24wnkpCQkFqTLRyYQGACjh8/TkBAAO7u7vVtyhNHfn5+rckWQ0iB wAQUFBQI51UPCAcmEAgaLMKBCQSCBotwYAKBoMEiHJhAIKhzcnNzCQoKIjc3t0ZyhAMTCAR1ilar JSQkRN5AVKvVVluWcGDlcP36de7fv1/fZtQLWq2WxMTE+jZD0IiZN2+enADoyJEjzJs3r9qyas2B 5ebmcvfuXYqKimpLRa3xxhtvMHXq1Po2o15Ys2YNAQEBcqo6Qf1x584dOQl0bZepS5YuXaqXzWzp 0qXVlmVSB/bw4UMiIyPx8fHBxcUFNzc3HB0dCQkJaTCO7Pz588TGxvLCCy+YXHZGRgYqlYodO3YY VW7dunVVllmVa8sjNDQUa2trVq9eXa3rBf9HQUEBmzZtYsiQISgUCmbOnGnUdbt27aJDhw60bNmS pk2bMnfuXB4/flwrZRo6JnNgGRkZ9O7dm7Vr1zJp0iS2bdvG999/z6effkqfPn0azP7yH330Ee7u 7owdO7ZO9H344Yc8//zzesfs7OyIjIykZ8+eVZZXk2sBmjRpQnh4OMuWLWt0D3tdc//+fV566SWc nZ1xdnY26ppt27YxZswY+vTpw5YtW5g3bx5Lly5l6tSpcro/U5VpDJjsVaJXX30VtVrN//73Pzkf ZF2Sm5uLlZUVVlZW5Z5Xq9VYW1sbdKS5ubns3r2byMhIzM3Ny5zLy8ujVatWQHGsKCMjAzc3N5RK ZbXtvnz5spwAWIe9vT2RkZHVklfRtZW1T0mCg4P5+OOPiY2NZfz48dWyQwCOjo7cuHEDa2trunXr Vml5jUbDggULGDduHBs2bEChUBAcHIy1tTXvvPMOJ06coE+fPiYp89RTT9VBC9Q+JukW3b17l717 9/Lyyy8bdF4ZGRnY2dmxfv16+djKlSuxs7Pj/v378vBn7ty5eHl5YWdnx6BBg3BxcdHLgv33v/8d FxcX1Go1KSkpDBs2jFatWuHo6EhERAR5eXly2Y0bN9KlSxccHBxwcnJiwYIFFdoXFxeHRqPBx8dH tlelUhEcHIyrqyvt27fH39+fd999F1dXVzp16kTHjh3loHdl9SuNj48PW7du5eLFi6hUKlQqFVev XtUbBt64cYNu3boxe/ZsPD09cXZ2Jjg4mKysrArbuOQQ0lD7lNfeZ8+epUOHDpibm5fJtC6oOtbW 1kaXvXLlCikpKcyYMUMvqcycOXMA2LNnj8nKNBZM4sDOnz8PYNSwRavV6nVhJUkqM416+fJl3n77 bVavXk1kZCS5ubnExsbK10dFRTF58mQsLS0ZN24c9vb2JCQkcPDgQfbt28cnn3wCwIULF5gxYwZj xozhzJkzbNmyBTc3twptS05OBsDLy0vvuEqlIj4+npiYGI4dO8aBAwfYuXMnp0+fpqioiHfeeadK 9dOxfPlyfH19cXd3JyYmhpiYGFxcXMq0V0pKCjk5OSxZsoTFixeTlJTE6NGjy+S2LI1GozHYPuW1 t6urKxYWFnh6eorZyDrm6tWrAHh6euodb968Oa1atSI9Pd1kZRoLJhlC6oYlpoqZhISEyHEhSZLo 2rUr69evZ8KECRw+fJisrCymT59OfHw8ycnJLFiwgPz8fMzNzfHx8SE2Npb33nsPpVKJQqEgPT2d /Px8hg4dyrBhwyrUm52djVKpxMPDQ+94YGAgvXr1AsDJyQkfHx/69+8PgK+vLwkJCdWqp653mZOT Q2BgoHz83r17ZcqOHj2aoKAgAHr06IGfnx/x8fH06NGjQvmVtY+Oku2to3379vIXQVA36MIbd+/e 1TsuSRKPHz/GysrKZGUaCybpgXXt2hWFQsHBgwdNIU4PhULBiy++yMGDB8nOzmbdunX07NkTHx8f rl27BkBERAS+vr74+vpy6NAhbt++DUDnzp3ZuXMn169fZ9CgQfTt25e9e/dWqEulUpXpQZXG1tZW 77ytrW2dz7Dqerq6nm9FVNY+higqKsLGxqbmxgqMpm3btgBcunRJ7/itW7e4c+cOHh4eJivTWDCJ A7OzsyMiIoJ169bx/fffV1hONx5Xq9VVkh8aGoq5uTmrVq1i165dTJ8+HQBXV1cAzp07p7euJDU1 Vb7W39+f+Ph4Tp48SdOmTQkJCakwftS6dWsAbt68WSX7dBhbv5IOUKFQVHklsm4I0K5du3Jl6jCm fSoiKyvL4HBbYHo6deqEt7c3W7Zs0bufmzdvBop74aYq01gw2Szkhx9+yPnz55kyZQrPPPMMw4YN w8rKisTERFJTU/n+++9xdnbGzs6O2NhYAgMDSU1N5YcffqhUdrNmzRgJeWH8AAAgAElEQVQ3bhyL Fy/G2tqayZMnA8XDNw8PD8LCwli8eDEeHh6kpaUBEBAQwOnTp0lMTKRXr15YWlrSvXt3Tp06haWl Zbl6BgwYAEBCQkK1vryV1U+lUgHFkwW2trYMHDgQT09PYmJiWL9+Pebm5owYMaJc2ampqdy7d497 9+4xb9483N3dGT58uOz8dDJL/rpW1j4VoVarSUpKkttZUD3S0tI4deoUULyk4tq1a2zduhUzMzN5 dnfKlCncv3+f2NhYFAoFn376KUFBQYSEhBAWFsaZM2dYtGgR4eHh8kymqco0CqKioqT4+HhpxYoV klqtrtHnwYMH0tKlS6WAgADJwcFBatKkidSpUyfpL3/5i5SdnS2p1Wpp9erVkpWVlQRIVlZW0siR IyVAysrKkpKTkyVAWrlyZRnZ+/fvlwBpypQpesdPnz4tDRo0SFIoFBIgtWjRQoqMjJTUarW0a9cu qXnz5hIgAZK9vb305ZdfVmh/Xl6e5OXlJYWFhUlqtbpce9q1ayeFh4fLf4eHh0tt2rSR/zZUP7Va LU2cOFECJDs7OyktLU26du2aNHDgQEmlUkldu3aVrl69qqdX93+lUinXo3v37tKpU6dknSVlHj16 VM9mQ+1TUXuvWrVKAqSEhIQaPxN/lM8333wjlWbdunXyPSv5sbKykst07NhRatmypd510dHRUvv2 7SVAatq0qfT6669Ljx49qpUydUHptoqIiNBrj4iIiCq19YoVK6T4+HgpKipKUkRFRUnu7u4kJiYy bdq0OnCZkJeXR2ZmJm3atDFZQDE/P5+HDx/i4OCgN3Ws1Wq5ffs2BQUFuLm5Vbqgds2aNbz22msk JSXJQ8qqYqh+kiSRmZmJo6NjhT3BkmRkZODt7c1XX33F4MGDsbS0xM3NTa+OxsisqH1KI0kS/fr1 w9bWlsOHDxtZY0F0dLQc2jAV2dnZODg4GFxnaKoytUnpLaW1Wi2jR4/myJEjDB06lF27dlXJtrVr 19K1a1fS09NNEwPTrWGq7KOjSZMmeHt7m3Q2xMbGBkdHxzJfTqVSibOzM+7u7ka9DRAaGkrLli1Z tmxZtW0xVD+FQoGbm5tRzqskZmZmtGvXjtatW5epozEyK2qf0hw6dIjExERee+21KtknMD3Ozs6V frFNVaYuUSqVREdHExgYSHR0dI1sM0kMTF3FoPyTjLW1NW+++abewtk/EhYWFgQFBclLNgSC2sDe 3p6YmJgayxFZicrhlVdeqW8T6g0/Pz/8/Pzq2wyBwCiEA3vCcXNza1Q9XIHAlDSMLSIEAoGgHIQD EwgEDRbhwAQCE2BlZdWoXpJuKIgYmEBgAvr3709cXNwTtXXzk0JISEityRYOTCAwAa6urvW++WNm ZiZxcXH1akNdIxyYQNBIOH78OAEBAbi7u9e3KXqUXolvSkQMTCBoJBQUFDxxzqu2EQ5MIBA0WIQD EwgEDRbhwAQCQYNFODCBQFDn5ObmEhQURG5ubo3kCAcmEAjqFK1WS0hICAcOHCAkJKTKW6qXRDiw crh+/Xq5eRwbAlqtVqRDEzzRzJs3T845euTIEebNm1dtWcKBlcMbb7zB1KlT69uMarFmzRoCAgJ4 8OBBfZsiEJTL0qVL9ZLMLF26tNqyTObApkyZIudKNIQuG/SOHTtMpVqPffv2YWdnV2nKsYo4f/48 sbGxvPDCCya2rGzWbEOo1Wr8/f3lTDLGEhoairW1NatXr66umYJGxMGDB1EoFGU+utRrDZ1GtxJf MpAJ2xg++ugj3N3dGTt2rAmtKsbOzo7IyEijMpgXFRVx7NgxgymwPvzwQ3799Vc9h9ikSRPCw8NZ tmwZs2fPblRJTAXV55///Kee02rSpEn9GWNCat2BqdVqrK2tK92PvrCwkHv37tGsWTMsLCzKnNdq tWRlZeHs7Fzu+du3b/Pw4cMKk9IaY0dubi67d+8mMjISc/OaNU1ubi5WVlZ6DsTe3p7IyMgyZR88 eIBCocDW1rZcWXl5eaSmptK6dWuaNm0qH798+TJJSUllygcHB/Pxxx8TGxtb7+/nCZ4Mnn32WXx8 fOrbDJNTazGwjRs30qVLFxwcHHBycmLBggUVlh0xYgQtWrTAw8MDBwcH5s+fjyRJ8pBr2rRpuLi4 0KFDB9zd3dmzZ4987ZUrVwgICKBNmzZ06dKF0NDQatsRFxeHRqORb/SsWbPw9vaWM29LkkS3bt34 05/+JF+jVqtxcnLiH//4BwApKSkMGzaMVq1a4ejoSEREBHl5eUDZIeTNmzcZP348Li4utGrVisGD B9OkSRM9p7Rq1Src3Nzo27cvHh4ebNiwAQAfHx+2bt3KxYsX5aQpV69eBaBDhw6Ym5vLgVKB4Mcf f2TTpk38+OOPjSrfQ604sAsXLjBjxgzGjBnDmTNn2LJli8FEsX5+fqxdu5a4uDgWLFjA8uXL2bVr l3z+8ePHrFu3joSEBDp37syrr74KFL/7FRISQn5+PnFxcVy6dEmvh1NVO5KTkwHw8vICircBycjI 4MSJEwD8/PPPpKSkcOnSJTlt+/79+3n48CGhoaFoNBrGjRuHvb09CQkJHDx4kH379vHJJ5+U0VVU VERwcDC3bt3i0KFDnDx5El9f3zI9yE6dOrFz506Sk5N5+umnmTt3LhqNhuXLl+Pr64u7uzsxMTHE xMTg4uICFCfm8PT0FLORApnXX3+dkJAQhg4dipubm0kSajwJ1IoDUyqVKBQK0tPTyc/PZ+jQoQbT dC1cuJBx48bRoUMHnnvuOQB++eUX+fyoUaN49tln6dKlCyNHjiQzM5Pc3FyOHTtGUlIS//rXv+jT pw9t2rShe/fu1bYjOzsbpVIpZ7f28/PDxcWFLVu2ALBlyxZ69+6Ns7OzPAmxZcsWevXqRadOnYiP jyc5OZlJkyaRn5+Pubk5Pj4+xMbGltH1008/kZCQwJIlS3jqqafo3LkzAwcOLFNu8ODBDBkyBDc3 N0aNGsXDhw/Jyspi0KBBuLi4YGtrS2BgIIGBgXpxjfbt23P79u0K6yr4YzBgwAB+++038vLyyM/P JykpicGDBzN58mSuXbtW3+bVmFpxYJ07d2bnzp1cv36dQYMG0bdvX/bu3Vth+c2bN+Pt7Y2LiwvP PvssABqNptyyujiRJEnykEnncGpqh0qlQqvVyr0gpVLJpEmT2L59O4WFhWzbto0pU6Ywfvx4duzY wYMHD9i3b588bNU9EBEREfj6+uLr68uhQ4fKdSS63l5VZoNsbGwA5CGtIYqKiuTygj8uTZo0wc3N DZVKhbW1NZ07d2blypU8fvyYAwcO1Ld5NabWYmD+/v7Ex8dz8uRJmjZtSkhICFlZWfJ5nZM4d+4c 4eHhzJkzhzt37pCdnW30zJmrqyuA7MiqY0dJdJm4b968KR8LCQnh5s2bfPbZZ2RmZjJ+/HiCg4O5 cOECy5Yto6CggEmTJunZc+7cOb11LqmpqWV06Yayv/76q1F1LQ+FQlHhjGtWVpbB4bLgj4tuiVFF P/wNiVqZhTx9+jSJiYn06tULS0tLunfvzqlTp7C0tJRnAePi4rC1teXhw4cAODo6kpOTw549e4ze ltfPzw8PDw/mzZvHv/71L1xcXIiPjzfKjvIYMGAAAAkJCfKXv2fPnnTs2JH3338ff39/nJ2dcXR0 xM3NjUWLFhEYGIiTkxMAvr6+eHh4EBYWxuLFi/Hw8CAtLQ2AgIAAPV1PP/00bdu25fXXX2fp0qW0 bNmS48ePG9vEAHh6ehITE8P69esxNzdnxIgRNG3aFLVaTVJSEpMnT66SPEHj49tvv+Xw4cN06dIF GxsbkpKSWL9+PcOGDePpp5+ub/NqTK04sHv37vHWW29x9+5doHj5wLJly2jZsiUAEydO5Ouvv2bj xo2cO3eOsLAwZs6cCUDv3r1p3769UXpsbGzYvn07s2bNYuTIkUCxE9I5ycrsKE2nTp3w8vJi9+7d cmZqhUJBaGgo7777LhMnTgTAzMyM4OBgli5dypQpU+TrbW1t2b59O6+++ipBQUFIkkSLFi2YPXt2 GQdmaWnJ3r17CQ8PJyAgADMzMzkIbyyzZ8/mp59+4vXXX8fT0xM/Pz+aNm3Kjh070Gq18nBc8Mel sLCQ8+fPs3XrVgoLC2nbti3vvvsuL7/8crnLkeqC1157jVWrVsl/R0REVHs1viIqKkpyd3cnMTGR adOmmcpGtFott2/fpqCgADc3N731V5IkkZmZiaOjo9wbys7OpqioCBcXFxQKRZX16d5qt7e3N9qO 8lizZg2vvfYaSUlJ8pCyOuTn5/Pw4UMcHBwqrc/9+/dRKpXs27ePadOmkZSUVO2V0pIk0a9fP2xt bTl8+HC1ZAgaJtHR0UyfPr3cc7qQTXW+WzWl9JbSWq2W0aNHc+TIEYYOHcquXbtQKpVGy1u7di1d u3YlPT3dNDEw3Tok3QeKA+DOzs64u7uXcRoKhQI3Nze9oZyzszOtWrWqdgPb29uXcV6V2VEeoaGh tGzZkmXLllXLDh02NjY4OjoaVZ+mTZtia2vLuXPnsLCwqJHjPHToEImJiQZnWwV/PHSvED0JKJVK oqOjCQwMJDo6ukrOqzQmGUKq1WpTiHkisLa25s0336yTxX4HDx4kJyeHDh06cObMGb788ktmzpxZ o7cALCwsCAoKkofAAsGTiL29vUnWojW6dyFNwSuvvFInes6ePcuGDRv49ddfcXFx4ZVXXmHhwoU1 kunn54efn5+JLBQInmyEA6tH3nzzTd58800KCgoqnBkVCAQVI/YDewIQzksgqB7CgQkEggaLcGAC QSPBysqK9PT0+jajThExMIGgkdC/f3/i4uKMfpOlrggJCak12aIHJhA0Ip4051XbiB6YQNBIOH78 OAEBAbi7u9e3KXqUXolvSkQPTCBoJBQUFDxxzqu2EQ5MIBA0WIQDEwgEDRbhwAQCQYNFODCBQFDn 5ObmEhQUJG+DVV2EAxMIBHWKVqslJCSEAwcOEBISUqNE1MKBNVCuX7/O/fv369uMPyRarVakrKsB 8+bNk3OWHjlyhHnz5lVblskdWG5uLpcvX25Ue4Q9ibzxxhtMnTq1vs34Q7JmzRoCAgJ48OBBfZvS IFm6dKle0pvqbicNJnRgly9fZvjw4bi4uODj44OTkxOjRo3iypUrplJRb5TOqG0KWbq8ktXh/Pnz xMbG8sILL1Rbf3Xrsm/fPuzs7OTMNk86Je011X0MDQ3F2tqa1atXm8jKuuH7779HoVBgbW1d36aY DJM4MEmSCA0NJTMzkxUrVnD06FHWrl1L8+bN5Yw9DRk7OzsiIyPp2bNnfZsCwEcffYS7uztjx46t 8rU1rYskSTWKWdQ1Je011X1s0qQJ4eHhLFu2jMePH5vCzFrnwYMHzJkzp77NMDkmcWA3b97k4sWL vPTSS0ybNg0fHx/Gjx/PunXryt2n3hCFhYXcunWLwsJCo69Rq9UVJnvNzc2t8UNmb29PZGQkPXr0 qNJ1VdVtqB4lZe7evZsXX3yxWltPV1QXrVbLb7/9VmG73759m9TUVDk5RH1T2XNSnr3VvY/l3Zfg 4GBu3LhRbtb1J5G///3v3L9/nz//+c/1bYpJMYkDc3R0xNnZmW+//ZYLFy6UW+bGjRt069aN2bNn 4+npibOzM8HBwXpJZkeMGEGLFi3w8PDAwcGB+fPnI0mS3PWfO3cuXl5e2NnZcfbsWTZu3EiXLl1w cHDAycmJBQsWyLJSUlIYNmwYrVq1wtHRkYiICPLy8qplW8mhx4oVK1CpVOzcuRMo/iL5+/vTo0cP eUq4KroBg/UoTVxcHBqNBh8fHwBmzZqFt7e3/AWTJIlu3brxpz/9Sb5GrVbj5OTEP/7xD7266P4/ bdo0XFxc6NChA+7u7uzZs0e+9sqVKwQEBNCmTRu6dOkiZyHXcf/+fV599VU6duyIq6srQUFBJCUl Vcu20lR03yt6Tiqzt3Td7ezsWL9+vXx+5cqV2NnZyZMjhu5Lhw4dMDc3l4PRTzKnT5/m888/58MP P2x0rxqZxIGZmZmxbt06cnJy6NevH0OHDiUqKkrv11Gr1ZKSkkJOTg5Llixh8eLFJCUlMXr0aDm5 rZ+fH2vXriUuLo4FCxawfPlydu3aJcu4fPkyb7/9NqtXryYnJ4cZM2YwZswYzpw5w5YtW+RktBqN hnHjxmFvb09CQgIHDx5k3759fPLJJ+Xab4xtOl566SXGjh3LrFmzSE1N5f333+fnn38mKioKe3v7 Kuu+cOFChfUoj+TkZAC8vLyA4q1KMjIyOHHiBAA///wzKSkpXLp0iUuXLgGwf/9+Hj58WMb56Hj8 +DHr1q0jISGBzp078+qrrwLF79aFhISQn59PXFwcly5dIjIyUq/dxo0bx4EDB3j//ff55ptvKCoq YtiwYWRkZJjENtC/766urhU+J5XZWxqtVqvXQys53KzsvlhYWODp6fnEz0ZqNBpmzZqFj49PneV6 qEtMFsT39fXl119/Zd26dVhZWTFz5ky6du3K2bNn9cqNHj2aoKAgZsyYwXfffUdSUpKcTXvhwoWM GzeODh068NxzzwHwyy+/yNeGhIQQHh7OpEmTcHV1RaFQkJ6eTn5+PkOHDpVTicXHx5OcnMykSZPI z8/H3NwcHx+fSrv7hmzToVAoWLFiBS1btmTkyJF89tlnLFmyhG7dulVLt1KprLAe5ZGdnY1SqZTT wvv5+eHi4sKWLVsA2LJlC71798bZ2VmeKNiyZQu9evWiU6dO5cocNWoUzz77LF26dGHkyJFkZmaS m5vLsWPHSEpK4l//+hd9+vShTZs2dO/eXb7up59+4vjx43z++edMnjyZZ599lg0bNqDValm1apVJ bAP9++7k5FThc1KZvVXBmPvSvn17bt++XS35dcUXX3zB2bNn+frrr2uU7epJxaTLKCwtLZkwYQL7 9+/nxx9/JDc312CWHV0wVTejtXnzZry9vXFxcZGzSms0mnKv7dy5Mzt37uT69esMGjSIvn37snfv XgCuXbsGFGf89fX1xdfXl0OHDlXpYSttW0ns7e354IMPuHbtGj4+PnoJgauq21A9ykOlUun1HJRK JZMmTWL79u0UFhaybds2pkyZwvjx49mxYwcPHjxg3759Bns4JbG1tQWKeyNXr14FkJ1laVJSUuQ6 lGwbNzc3UlJSTG6bjoqek8rsrQrG3JeioiJsbGxqrKu2SE9P5+2336Z///5cu3aNrVu38ssvv6DV atm6dWuZH+eGSK0tZO3bty9eXl7cvXu3wjK67W/btWvHuXPnCA8PZ86cOdy5c4fs7GysrKwM6vD3 9yc+Pp6TJ0/StGlTQkJCyMrKwtXVFYBz587prTdJTU012v6StpVGrVazaNEiXFxcOHv2LJs2bZLP Gau75NClonqUhy7p7c2bN+VjISEh3Lx5k88++4zMzEzGjx9PcHAwFy5cYNmyZRQUFDBp0iSj6166 LjrHUBpPT08AeTgIxZMMGRkZekNcU9pm6DmpzN6S6JK8GlqvWNl9ycrKMjjcr28OHTpEXl4ex44d Y+LEiUycOJGoqCg0Gg0TJ05k0aJF9W1ijTFJn/K3337D39+f/v37M2DAACwsLIiPj+fMmTN88cUX emVTU1O5d+8e9+7dY968ebi7uzN8+HCOHz8OFE8I5OTksGfPHoO7S54+fZrExER69eqFpaUl3bt3 59SpU1haWuLr64uHhwdhYWEsXrwYDw8P0tLSAAgICKhQZkW2lV6wOH/+fLKysjhx4gQLFy5kzpw5 +Pj40LFjx0p16zKXx8XFYWtri5WVFWlpaeXWozwGDBgAQEJCgvzl6dmzJx07duT999/H398fZ2dn HB0dcXNzY9GiRQQGBlZrOYufnx8eHh7MmzePf/3rX7i4uOj9ag8ePJg+ffrw6quv8u6772Jvb8+X X36JhYUFs2bNqhXbsrOzgfKfk8rsLYmzszN2dnbExsYSGBhIamoqP/zwg3ze0PMFxY4vKSmJyZMn V61R65Dw8HDCw8P1jn300Ue8++67dZK4uS4wSQ/s7t27dOjQgZiYGN544w1ef/11fvnlF6Kionjx xRf1yn7yySe4urrSpUsXbty4wfbt27G3t8ff35+wsDBmzpyJt7c3a9eupX379hXqvHfvHm+99Rb9 +/enV69eREdHs2zZMlq2bImtrS3bt2+nadOmBAUF0bNnT8LDw+VgckVUZFtJNm/ezJo1a/j6669x d3fnq6++wsnJibCwMNRqdaW6mzdvzsSJE/n66695/vnnycrKqrAe5dGpUye8vLzYvXu3fEyhUMjD sIkTJwLFEyvBwcEATJkyxWC9K8LGxobt27djY2PDyJEj6d27NydOnMDMrPixUSqVfP/99/j5+fHW W28xffp0lEolR44cwcXFpVZsM/ScVGZvSZRKJUuWLCE+Pp5u3boxYcIEvV6xoecLYMeOHWi1WnkI KzCe1157DZVKJX8MxXwrQxEVFSW5u7uTmJioF8upDlqtlps3b9KsWbMysYGMjAy8vb356quvGDx4 MJaWlri5ucldeR3Z2dkUFRXh4uJS5lx5+m7fvk1BQQFubm7lPqj5+fk8fPgQBweHCuUZa1tVqUi3 JElkZmbi6OiIpaWlUfUoyZo1a3jttddISkqSh5S1jW6JSFXX9dUWlT0nxtqbl5dHZmYmbdq0KROy qOi+SJJEv379sLW15fDhwyaqUc2Jjo5m+vTp9W1GGUpvKa3Vahk9ejRHjhxh6NCh7Nq1C6VSabS8 tWvX0rVrV9LT0027J75SqaRVq1YGy5iZmZUbV9Lh7OxcJX2VlbexsTE60FqZbVWlIt0KhUIvdmJM PUoSGhrK+++/z7JlyypcnmFq6sNx6YbbJdHFrCprL2PtbdKkCd7e3uWeq+i+HDp0iMTERKKioozS IdBHqVQSHR3N888/z7p166rkvErT+OZV/wBYW1vz5ptvNpo4RkU8qRsCWFhYEBQURFBQUH2b0mCx t7cnJiamxnKEA2ugNMZFiQ0FPz8//Pz86tsMAXXowNzc3J7YX9Qn2TaBQFAxYkNDgUDQYBEOTCAQ NFiEAxMIGglWVlbyGyR/FEQQXyBoJPTv35+4uDiDb7DUByEhIbUmWzgwgcAEZGZmEhcXV99m/OEQ DkwgMAHHjx8nICCg0W0YaApKr8Q3JSIGJhCYgIKCAuG86gHhwAQCQYNFODCBQNBgEQ5MIBA0WIQD EwgEdU5ubi5BQUHytkfVRTgwgUBQp2i1WkJCQjhw4AAhISE1SpQsHFgD5fr163L+wj8aWq32iU9n JqiYefPmyfk0jxw5wrx586oty+QOLDc3l8uXL4vdHWqZN954g6lTp9a3GfXCmjVrCAgIKJOroLFx 586dSlfVm6pMXbJ06VK9hDdLly6ttiyTObDLly8zfPhwXFxc8PHxwcnJiVGjRnHlyhVTqag3SmZ0 NpUsXV7E6nD+/HliY2N54YUXamxPaYy1ryptUlpmTdszNDQUa2trVq9eXa3r64qCggI2bdrEkCFD UCgUzJw506jrdu3aRYcOHWjZsiVNmzZl7ty5PH78uFbKNHRM4sAkSSI0NJTMzExWrFjB0aNHWbt2 Lc2bN69WNpwnDTs7OyIjI+VckfXNRx99hLu7O2PHjq0TfR9++CHPP/+83rGatElN27NJkyaEh4ez bNmyJ/oLef/+fV566SWcnZ2N3jJ827ZtjBkzhj59+rBlyxbmzZvH0qVLmTp1qpx0xFRlGgMmeZXo 5s2bXLx4kU8++URODOLj48P48eOrLKuwsJB79+7RrFkzLCwsjLpGrVZjbW1dbjKM3NxcrKysKs0x aQh7e3uDKeoroqq6DdWjpMzdu3cTGRlZJtNybm4ueXl5cl4CrVZLRkYGbm5uNdp3/PLlyyQlJekd q26bGLq2Ku0VHBzMxx9/TGxsbLWes7rA0dGRGzduYG1tLWduN4RGo2HBggWMGzeODRs2oFAoCA4O xtramnfeeYcTJ07Qp08fk5R56qmn6qAFah+T9MAcHR1xdnbm22+/5cKFC+WWuXHjBt26dWP27Nl4 enri7OxMcHCwXqLQESNG0KJFCzw8PHBwcGD+/PlIkiQPOebOnYuXlxd2dnacPXuWjRs30qVLFxwc HHBycmLBggWyrJSUFIYNG0arVq1wdHQkIiKCvLy8atlWcsizYsUKVCoVO3fuBIodrr+/Pz169JCn hKuiGzBYj9LExcWh0Wjw8fHRsy04OBhXV1fat2+Pv78/7777Lq6urnTq1ImOHTvKQe+MjAzs7OxY v369LHPlypXY2dmVOyng4+PD1q1buXjxopwG6+rVq3ptYsy9LUnpIaSh9qro3nfo0AFzc3M5GPyk Ym1tbXTZK1eukJKSwowZM/QyLc2ZMweAPXv2mKxMY8EkDszMzIx169aRk5NDv379GDp0KFFRURQW FspltFotKSkp5OTksGTJEhYvXkxSUhKjR4/m4cOHQPFe42vXriUuLo4FCxawfPlydu3aJcu4fPky b7/9NqtXryYnJ4cZM2YwZswYzpw5w5YtW+RMPxqNhnHjxmFvb09CQgIHDx5k3759FWbwMcY2HS+9 9BJjx45l1qxZpKam8v777/Pzzz8TFRWFvb19lXVfuHChwnqUR3JyMoCc+VqHSqUiPj6emJgYjh07 xoEDB9i5cyenT5+mqKiId955R6++JYcRkiRVOJW9fPlyfH19cXd3JyYmhpiYGDnnY3XarzTGtlfJ e+/q6oqFhQWenp6NajZSl1Fcl/FcR/PmzWnVqhXp6ekmK9NYMFkQ39fXl19//ZV169ZhZWXFzJkz 6dq1K2fPntUrN3r0aIKCgpgxYwbfffcdSUlJcvbkhQsXMm7cODp06MBzzz0HwC+//CJfGxISQnh4 OJMmTcLV1RWFQkF6ejr5+fkMHTpUTpAZHx9PcnIykyZNIj8/Hx9uYwsAACAASURBVHNzc3x8fIiN jTVYB0O26VAoFKxYsYKWLVsycuRIPvvsM5YsWSIPEaqqW6lUVliP8sjOzkapVOLh4aF3PDAwkF69 esmZrn18fOjfvz+dO3fG19eXixcvGqx7RQwaNAgXFxdsbW0JDAwkMDCQJk2alFvWmPYrjbHtVfLe 6+Kq7du35/bt29Wq15OILnRw9+5dveOSJPH48WOsrKxMVqaxYNJlFJaWlkyYMIH9+/fz448/kpub y8KFCyssrwvinj9/HijOeu3t7Y2Li4uc8Vij0ZR7befOndm5cyfXr19n0KBB9O3bl7179wJw7do1 ACIiIvD19cXX15dDhw5V6WEvbVtJ7O3t+eCDD7h27Ro+Pj56CYGrqttQPcpDpVKV6UGVxtbWVu+8 ra0tRUVFhitsYgy1X0lqcq+KioqMzvnZEGjbti0Aly5d0jt+69Yt7ty5g4eHh8nKNBZqbSFr3759 8fLyKvMrUBJdV7Zdu3acO3eO8PBw5syZw507d8jOzq70l8Lf35/4+HhOnjxJ06ZNCQkJISsrC1dX VwDOnTunt94kNTXVaPtL2lYatVrNokWLcHFx4ezZs2zatEk+Z6zukg6monqUhy4T982bN42uS0l0 MZHK1umVtE+hUFR5tXR57Vee063JvcrKyjI43G5odOrUCW9vb7Zs2aLXVps3bwaKe7imKtNYMMks 5G+//Ya/vz/9+/dnwIABWFhYEB8fz5kzZ/jiiy/0yqampnLv3j3u3bvHvHnzcHd3Z/jw4Rw/fhwo nhDIyclhz549BhffnT59msTERHr16oWlpSXdu3fn1KlTWFpa4uvri4eHB2FhYSxevBgPDw/S0tIA CAgIqFBmRbaVXjA5f/58srKyOHHiBAsXLmTOnDn4+PjQsWPHSnXrsk3HxcVha2uLlZUVaWlp5daj PAYMGABAQkJCtb68zs7O2NnZERsbS2BgIKmpqfzwww/y+dL2DRw4EE9PT2JiYli/fj3m5uaMGDGi Su2nc346mSV7ANW9V2q1mqSkJCZPnlzlNqgr0tLSOHXqFFC8pOLatWts3boVMzMzeeZ0ypQp3L9/ n9jYWBQKBZ9++ilBQUGEhIQQFhbGmTNnWLRoEeHh4XKYwlRlGgVRUVFSfHy8tGLFCkmtVlfrc+LE Ccnf31+ysLCQAMnMzEzq1KmTFBUVJZdJTk6WAEmpVEqABEjdu3eXTp06JanVaunBgwdSWFiYfK53 796Sl5eX9Ne//lW+duXKlbK8Xbt2Sc2bN5fL29vbS19++aV8/vTp09KgQYMkhUIhAVKLFi2kyMjI cu2vzLaS+r/99lsJkDZv3iyp1Wrpxo0bkqenp9SlSxfp9u3bRumeOHGiBEh2dnbSN998Y7AepT95 eXmSl5eXFBYWVsY2XZl27dpJ4eHh8t/h4eFSmzZt5L9Xr14tWVlZSYBkZWUljRw5UgKkrKysMval paVJ165dkwYOHCipVCqpa9eu0tWrV/X0VtZ+pWUePXpUz2ZD7VVe/dRqtbRq1SoJkBISEqr93Jry 880330ilWbdundweJT9WVlZymY4dO0otW7bUuy46Olpq3769BEhNmzaVXn/9denRo0e1UqYuKN1W EREReu0RERFRpbZesWKFFB8fL0VFRUmKqKgoyd3dncTERL1YTnXQarXcvHmTZs2alYlNZGRk4O3t zVdffcXgwYOxtLTEzc1Nb5oX/n97dxoVxZU2cPzf7DQNuIAiCLiAC6igqGQUg0QwcVyIO2rcos7E mLgkxjM5Jo460UycJBonxow5o4kL8ahR0TFuJDHiHnENGlwRRDGCCkKzNv1+8O2KKEsDjdD6/M7h A/atW7duWU/XLW7d58FD6uLiYtzc3B77rLT9paenU1BQgIeHR6nzp3Jzc8nOzsbFxaXM+oxtW2WV tW+9Xs+NGzdwdXXFxsbGqON42KpVq5g2bRrnzp1ThpSVlZOTw40bN/Dy8npsqP5o+ypiTP8ZU6cx 58pQV9euXdFoNPz0009GHnHNWr9+PePHjzdpnbdu3cLFxaXcOXymKlOTHl1SWqfT0b9/f/bt20fP nj3Zvn17pdq2evVq/P39SUlJMe2a+JaWlsokyrJYWFiU+lzJwNgZy4b9VVTe3t7e6Ae9FbWtssra t0qlKjH8M+Y4HjZixAjmz5/P0qVLHxuiV8Tw7MvBwQFfX99SyzzaPmOV13/G1Gnsufrhhx9ISEgg Ojq60m00J8b8nzBVmSfJ0tKS9evXM3r0aNasWVOtwCpJPcyQnZ0dM2fOJC8v75l8ad7a2prIyEgi IyNruymiipycnIiJial2PRLAzNSUKVNquwm1JjQ0lNDQ0NpuhqgDnlgA8/DwqLN3C3W5beZA+k/U FlnQUAhhtiSACSHMlgQwIUzA1tb2qXpJ2lzIQ3whTCA4OJj9+/fXqaWb64qoqKgaq1sCmBAm4O7u XmcXVnyayRBSCGG2JIAJIcyWBDAhhNmSACaEMFsSwIQQZksCmBDCbJkkgOXk5DzxNdeFEKLKASw3 N5e///3vBAQE4OrqipubGy+++CIHDhyodF0FBQXk5eVVet312qpXCFE3VCmA3b17lz/96U/861// 4vLly3h5eaHX64mLi6N3794sWbKkUvW99tprNGjQwOQJN2uqXiFE3VClADZjxgwuXLhAnz59uHLl Cr/99htpaWl88cUXWFhYMGfOHE6ePGnqtgohRAmVDmDp6els2LABJycnVq1apSQZtbS0VNKiFRUV KWnjd+7ciVqtLrHefmRkJGq1mkOHDhEcHMz69esBGD58OGq1mu7du3Ps2DHUajVjx46lU6dOuLi4 EBYWRmxsbLXqFUI8PSr9LqQh03ZAQABOTk6Pff7CCy+wdOlSTpw4YVR9L730EllZWVy7do2QkBCa Nm2qJOYE2L59O4GBgTg5OXHs2DEGDhxo1FK0FdUrhDB/lQ5gWVlZABQWFpb6uSGjjrGJNObNm0dK SgrXrl3jzTffVJJuHjt2DHiQIHf37t0AfP3117z++ut8+eWXFWaAKateIcTTo9JDSH9/f+BByvi0 tLTHPo+LiwP+SC1vSt26dQPg4sWLJq9bCGF+Kh3AWrduzUsvvYRWq+WVV14hOTkZeJCrb8uWLXz2 2WfY2dkxceJEADQaDfAgN12Zjfj/u7aK1lU3DF9btWpl0nqFEOapSuuBrVixgu7du3Po0CHatGmD t7c32dnZZGRkYGFhwdKlS/Hx8QEgKCgIjUZDXFwcPXv2xMbGhtOnT5eor3Xr1sCDv26uWrWKvLw8 PvroIwCOHz/OkCFDsLCwYO/evahUKmbOnIm/v3+V6t23b19VDlkIUQdVaRqFi4sLv/zyC2+++SZN mjTh2rVr5OfnExoayr59+3j11VeVsmq1mujoaAICAkhISOD+/fuPPY/661//yvDhw7GwsCAxMZGG DRuSnZ0NPMiBmJiYyP79++nSpQt79uyhS5cuVa5XCPH0UEVHR+s9PT1JSEgoMSWhMrKystBoNMqQ zRSOHTtGz549CQsLY8eOHSarVwhh3lavXo2/vz8pKSmmWVK6tOkUQghR02Q1CiGE2aqzST0aNGjA kCFD8PPzq+2mCCHqqDobwHx8fFi9enVtN0MIUYfJEFIIYbYkgAkhzJYEMCGE2ZIAJoQwWxLAhBBm SwKYEMJsSQATQpgtCWBCCLMlAUwIYbYkgAkhzFaNvkqUnJxMfHw8169fR6vVolar8fT0JCgoCE9P z5rctRDiGVAjAay4uJg9e/Zw8uRJGjduTMeOHXF2diY/P5+UlBSio6MJDAwkIiLCpGuICSGeLTUS Pfbs2cPZs2eJjIzk9ddfJyIigq5du9KjRw9GjhzJlClTSE1NZe/evUbV5+fnR7t27dDr9SX+Xa/X 065dO3r37l0Th1FtqampqNVqJUdmRXbt2oWjoyNnzpyp9LZCPItMHsCSk5M5efIk/fr1IygoCJVK 9VgZV1dXxo0bx4ULF0hJSamwzpEjR3LlyhUlqYfByZMnuXLlCiNHjjRZ+03J0dGR2bNnG52hSa/X o9PpqrStEM8ikwew+Ph4mjRpQseOHcst5+DgQI8ePYiPj6+wzqioKAA2bdpU4t83bdqEra0tAwcO rHqDjaTT6bh+/XqZ+TBL4+TkxOzZs+nQoUO55dLT00lKSipxh1natoWFhdy+fbvMNty/f1/JJWCM iurLysri5s2byu86nY7k5GQlyApR20wewK5fv46vr2+pd16Pat26tVF3YD4+PgQHB7Np0yblIi8u LmbTpk307dsXZ2dnADIzM5k6dSqtW7fG3d2dyMhIzp07B/wxnJsxYwY+Pj44Ojpy6tQpo7YZM2YM bm5utGrVCk9PT77//nulbcZsX9Yw8NKlS4SHh+Pl5YWfnx8jRoxQPnt02z59+tCgQQO8vb1xcXHh nXfeUfri999/Z9CgQbi5udGkSRN69OiBg4MD586dK/O4y6rPUH7IkCG4u7vTsmVLevXqxdy5c3F3 d6dNmza0bt2ahISECs+bEDXN5AFMq9Xi6OhoVFlnZ2ejczaOGjWKlJQUJWP3sWPHuH79ujJ81Ol0 DBw4kL179zJ//nxWrlxJcXExYWFhpKamKvVcuHCB9957j//+9780btzYqG3y8/NZs2YNx48fp23b tkydOrVS+yxNQUEBUVFR5Obmsn//fn777Tdmz55dZvnQ0FBWr17N/v37mTVrFsuWLWP79u0UFxcz ZMgQbt++zQ8//MCxY8cICQl57Hnhw8ft7u5eZn0GarWauLg4YmJiOHz4MHv37mXbtm3Ex8dTXFzM nDlzjDpvQtQkk/8VUq1WU1BQYFTZvLw81Gq1UWUHDx7MzJkz2bhxI8HBwWzcuJGGDRsSEREBwIED Bzhy5Ajbtm0jPDwceJDJu0WLFnz11VdMmjQJeDAcHT16NAA///yzUdv069ePl156CYC+ffsyZ84c srKyOHnypFHbl+bw4cOcO3eO2NhYOnfuDED79u3LLP+3v/0NeDCss7S0ZMGCBZw9e5Z69epx/Phx 4uLiCAoKUtrw2Wefldj+4eMurz5DHREREcpjgEaNGhEYGEhwcDAAISEhHD9+vMy2CvGkmPwOzNPT s8K7D4Pr16/j5eVlVNn69evTp08fNm/eTGFhIZs3b2bYsGFYW1sDcOXKFQDatm2rbOPk5ISHh4fy 2aOqso0hI7her6/S9gaXL18GwNvbu9xyBhs2bMDX1xc3NzclmBYVFXHx4kUAmjVrZlQ9FdVXGo1G U+KOTqPRUFxcXKn9CVETTB7AgoKCSExMJD09vcKyhw4dUr7xjTFq1CjS0tJYtGgRt27dKvHXx+bN mwPw22+/Kf+WlZVFamqqkiX8UVXZxlTbu7u7A38EsvKcPn2acePG8cYbb3Dnzh1u3bqFra0tAB4e HgAkJiZWWI8x9QlhTmrkDiwgIIANGzaU+RcxvV7P3r17adCgAU2bNjW67t69e9OgQQMWLFhAq1at 6NSpk/JZjx496Ny5M1OnTmXjxo3s3r2b0aNHY21tzV/+8pdS66vKNqbaPjQ0FG9vb9566y1++ukn zp8/T1xcXKllb926BTyYfpKRkcFXX32lDNNfeOEFmjVrxvTp0zl8+DAXLlzgyJEj5e67vPqEMCc1 MpE1IiICd3d3li1bxsGDB0lPT0en05Gdnc358+dZuXIlOTk5yvMrY9nY2DBs2DAARowYUeIvnZaW lmzdupXQ0FDeffddxo8fj6WlJfv27cPNza3U+qqyjam2t7e3Z/Pmzdjb29O3b1+CgoI4evRoqW8m 9OrVi1GjRjFx4kR8fX1ZvXo1LVu2VPpk586dODg4EB4eTlBQEBs2bCh33+XVJ4Q5UUVHR+s9PT1J SEhgzJgxJq08JSWF+Ph4UlJS0Gq1ODg40LRpU7p06aIMfcSDYSdUnOH81q1bFBcX4+bmVuo0lczM TCwtLdm1axdjxozh3Llz5T4bq6g+Ieqi1atX4+/vT0pKSs2+zO3p6WmSl7aN+UulsdMx6qKKApdB 48aNy/3cMB/u9OnTWFtbVzg8r6g+Ieq6OpvY9mHmHJyehNjYWDIyMmjVqhUnTpzgiy++YOLEiVhZ mcXpFaLK5H/4U+DUqVOsW7eOxMRE3NzcmDJlijLPS4inmQSwp8DMmTOZOXMmBQUF2NjY1HZzhHhi ZDGup4gEL/GskQAmhDBbEsCEEGZLApgQwmxJABNCmC0JYEIIsyUBTAhhtiSACSHMliS2FUKYLbNN bJuVlYVOp8PZ2VmS4wrxjDKLxLYG2dnZzJ49m8DAQNzc3PDw8MDV1ZWoqChZ4vj/+fj4oFarlZ+W LVsyc+ZM8vLyamyfhkxGW7ZsKfG7JOUVNc3kd2CGxLYvv/wynTp14ptvvuHjjz/m6tWrNG/enJkz ZzJ27FjGjRvHsmXL8PPzM2o4mZqaygsvvIBWq2Xy5Ml07NgRS0tLUlNTycjIqLN3YR988AGJiYkV XszGljNGaGgoY8aMIT8/n8TERJYvX079+vXLzXpkSpKUVzwpJg9gDye2Xb58OfPmzWPixIk0aNCA 9PR0pkyZogQhQ2JbYwLY1KlT0Wq1HDx40OhEIOXR6XTcvHmTxo0bK4lBjJWVlYWtra1R68hfuHBB yRNpinLG8PHxKZFj8uTJk49lNS+PVqvFzs6uyl8KhqS8j6qozyvTr/AgMW9mZiYuLi5VamdlVNS2 6vaZqJoaTWy7ePFiJkyYwO+//86ePXvYs2cPOTk5LF68GDA+se3du3fZuXMnr732WoXBqzqJaqdM mYKbm1uJ4db777+Pm5sbWq2WK1euEBYWRpMmTXB1dWXSpEnk5OSUqPvhBLJqtZpNmzZx/vx5ZUhX WhKPwMDAMsuVdzxlKSgo4N69e/z666+sXr2a+Ph4ZSnu8nz77bf4+fnh4uJCo0aNmDVrFgBpaWm0 a9eOyZMn07x5cxo3bsyQIUNKZO1+2MNDSGOSA5fXr6W5efMmQ4YMwcXFBS8vL9q3b09CQgKpqak4 Ojqydu1apex//vMfHB0dyczMLPUcde/evcrnvLw+E09GjSa2TU5OpmHDhiQnJ7N7927i4+MBuHbt GmB8YtszZ84AVDgkMTbRbFmJasePH09WVhY7duxQ6ouOjmb48OHY2NgwcOBAnJycOH78OLGxseza tYtFixaVaMPDCWTXrVtHSEgInp6exMTEEBMTU+pa+cuWLSu1XFUT565ZswZ3d3e6du3Ka6+9hrOz M+3atQMgPT2d/fv3l/jJzs7m119/ZcKECQwYMIATJ06wceNGZdlvnU7HlStXyMjIYMmSJSxcuJBz 587Rv3//MhO3PKqsPi8qKjKqXw2Ki4sZNmwY169f57vvvuP48ePMmzdPyQKl0+lKpIDT6/XodLoy z9Hs2bOrfM7L6zPxZNRoYlsvLy/S09MfS7FmyIVobGJbw217fn5+ueWMTW5bVqLaoKAg/P39Wbt2 LYMHD+ann37i5s2bjB8/nri4OC5evMisWbPIzc3FysqKwMBAduzYwbx585Q2PJpAdsuWLWRkZJSb wMRwF/BouYoS786dO7fU+vr27cuMGTMoKioiLS2NVatW8fzzz3PkyBHOnDnDqFGjSpQ/cuQI1tbW qFQqUlJSyM3NpWfPnoSFhZUo179/fyIjIwHo0KEDoaGhxMXF0aFDh3LPS3l9Hh8fb1S/PtzW+Pj4 Eol8/fz8Ktz/wx4+R3q9vsrn3NLSssI+EzXL5AHs4cS2M2bM4J133nlsODBjxgzA+MS2/v7+qFQq YmNjGTx4cJnlqpuoVqVS8eqrrzJr1ixu3brFmjVrCAgIIDAwkJUrVwI8lm27UaNGFba/qqqaONfN zY1u3bopv/fr1w8PDw/WrVvHnDlzyrzr3bZtG3PnzqV79+74+fnxj3/8gz59+pRa1nA3fObMGaMC 2MMe7vOrV68CxverIf9lZRP5lqU657xt27aV6jNhejWa2Hby5MmsWLGCDh06oFar6dChA+vWrWPy 5MmA8YltHR0dmTRpEmvWrGHr1q1llqtuolp4kK7NysqKr776iu3btzN+/Hjgj0S0p0+fRqvVKj9J SUnl1qdSqR4bwhhbzhTHAw8ChV6vx87OrtxyvXr1Ii4ujmPHjuHs7ExUVFSZz7kMzy5btGhRYj+V Vdl+NZQ3ZCR/mCGzUmVzKFTnnFemz4Tp1cgdmCGx7ZgxYxg5cmSJDNrw4D96bGxspRLbfvDBB5w5 c4aRI0fSu3dvwsLCsLW1JSEhgaSkJLZu3Voi0ezcuXNxcnLiiy++UBLNGhNI6tWrx8CBA1m4cCF2 dnYMHz4cgJCQELy9vRk1ahQLFy7E29tbeZZnGN6Vpnnz5sTExLB27VqsrKzo06ePkj2oonIVHU9Z rl69ypYtW9Dr9WRkZLBmzRpsbW0fOw8Pi4+PJyEhgY4dO2JjY0P79u355ZdfsLGxUR5wJyUlce/e Pe7du8dbb72Fp6cnL774otKv+/fvR6PRKI8IjFHZfjWUnzJlCh999BFt27YlMTGR559/nsaNG+Po 6MiOHTuIiIggKSmJH3/8scI2VPWcl9dn4skwm8S2Go2GvXv38tlnn1FcXMwnn3zC+++/z8GDB/Hz 80Or1VY7Ua2B4Rt40KBBSrDRaDRs3rwZZ2dnIiMjCQgIYNy4cRw9erTcuiZPnkznzp2ZPn06n3zy SZl3B6WVq+rx/Pjjj4waNYoxY8awePFiWrZsyf79+8v9srh37x7vvvsuwcHBdOzYkfXr17N06VIa NmyolFm0aBHu7u74+fmRlpbG5s2bcXJyon79+gwdOpQVK1YwevRocnNzy+2Th1W2Xx0cHNi8eTMa jYYBAwbg6+vL1KlTuXz5MpaWlixZsoS4uDjatWvH4MGDjb4rrMo5N6bPRM2SxLZVkJubS3Z2Ni4u Lk9VQlidTkd6ejoFBQV4eHgoc5pSU1Px9fVl+fLl9OjRAxsbGzw8PEocu16v58aNG7i6ulb5DqSy /ZqVlUV+fj6urq4l/j0nJ4cbN27g5eVl9JyyqratrD4TNcfsEtvWNfb29tjb29d2Mx5T3QTAlpaW 5Sa7tbCwKPHM62EqlaraX0qV7deyEgI7ODjg6+tbrbY8qqy2VdRnomZJWrWniCQAFs8aud8VQpgt uQMTFfLw8JC7O1EnyR2YEMJsSQATQpgtCWBCCLMlAUwIYbYkgAkhzJYEMCGE2ZIAJoQwWxLAhBBm q1ITWYuLizl16hQJCQk11Z5ngq2tLT4+PgQGBtbIy7/FxcVcvnxZWfpFVI21tTXu7u60bNmyzPMk 14RpGK6JgIAALC0tjd6uUgHs1KlT3L59m5dffllZ915UXnZ2NgcOHODUqVN06tTJ5PVfvnyZtLQ0 PDw8sLKSly2qyrAkt0qlKnMBSbkmTMNwTZw+fbpS10Slvv4vXrxISEiInKhqsra2xt/fn0uXLtVI /Tdu3MDFxUWCVzWpVCocHR3LTaAi14RpVPWaqFQAKygowMHBoVI7ECUVFRWRn5+Pvb19hUlKqqqw sFCCVzXp9XqKi4uxsrKisLCwzHJyTVRfda4JeYj/BOn1egoKCpQ16kXdVVxcXNtNeCZU95qQAPYE yUUhREnVvSYkgAkhzJYEMCGE2ZIAJoQwWxLAhBBmSwKYMJnCwkLu379vVAJhIUyhTgUwHx8f1Go1 arUaJycn/Pz8mD59uqzHXsfdv3+fn3/+mZiYGHbv3s3WrVuJi4sjOzu7tpv2zLhz5w7vvfce7du3 p379+rRp04YpU6Zw9erVEuV8fHx48803ld/1ej1vv/02Go2GmJiYJ93saqtzsx3DwsIYO3Ys+fn5 nD17lm+++YbMzExWrVpV4/v+4IMPSExMZM2aNTW+r6fJ4cOH0ev1/PnPf8bb25s7d+6QkJBA69at SU9PJz8/n4SEBO7fv89zzz1X28196qSmphIeHk5WVhaTJk2iRYsW3Lx5k6+//prNmzezfft2Onfu XOq2H330EcuXL2f58uVERkY+4ZZXX50LYC1atGDYsGHK766ursydO5fPP/+8xIznrKwsbG1ty8y8 rNVqsbOzK/Ul3LK2vXDhAufOnTPRkTwb8vLyyMrKIjw8nI4dO/L7779jY2NDcHAwlpaWFBUVAQ/e ddNqtXh5eZGcnFzLrX66vPHGG9y6dYvY2NgS7xG+8sordO/enbFjx3L69OnH3s5YuXIl8+fPZ+HC hYwdO/ZJN9sk6tQQsjQFBQWoVCpllu6VK1cICwujSZMmuLq6MmnSJHJycpTy3377LX5+fri4uNCo USNmzZqlfFbetoGBgWzatInz588rw9jLly8/2YM1Q7a2ttjZ2XHmzBkuXLjA3bt3yc3NJTMzk+Tk ZHQ6Hbt37yYlJYU7d+7w6aefsmnTJmV4WVhYyIkTJ/j+++/Ztm0bBw4cIDMzE3gQHHft2sXx48f5 3//+x9atWzl48CC5ubm1ech1SmpqKrt372bEiBGPvQTt4eHB3LlzuXr1Kvv27SvxWUxMDFOnTmXm zJlMnz79CbbYtOpcALt8+TJbt27lu+++45///CdLlixh7NixaDQaioqKGDhwIE5OThw/fpzY2Fh2 7drFokWLAPj111+ZMGECAwYM4MSJE2zcuFFJd1/RtsuWLSMkJARPT09iYmKIiYnBzc2t1vrBXKhU Kp577jm0Wi0bN25k3759XLt2rcQM66CgILy8vHB2dmb06NGMHj2azp07Y21tzYEDB7h16xbPP/88 gwYNQq1W8/PPP1NcXIxeryc7OxsbGxvCw8N58cUXycvL4+jRo6hUqlo86rrj/PnzAAQHB5f6ebdu 3UqUAzh06BBjx45l6NChzJs3r+YbWYPqXADbt28fI0eOZPTo0SxYsIDp06ezZMkSAOLi4rh48SLD hg0jNzcXKysrAgMD2bFjBwCWlpaoVCpSUlLIzc2lZ8+e3RBNlgAABqpJREFUTJs2zahtu3fvjpub GxqNhoiICCIiIuQlXSO5uLgwcOBABg8ejEaj4ZdffmH37t3cu3dP+dzCwgJra2uaNWuGlZUVqamp 3Lx5k4yMDPr160fnzp3RaDR069YNvV7P7du3lSGPv78/bdq0wc3NjZ49e5Keni4BrBq8vLxwdXXl 4MGD3Lhxo7abUy11LoBNmDABrVbL2rVr0el0+Pj4YG1tDaD8RWXSpEmEhIQQEhLCDz/8QHp6OgBt 27Zl27ZtJCcn0717d7p06cLOnTuN2lZUT25uLhYWFoSHhzN69Gh0Oh0XL17E3t4eAJ1Oh16vR6fT cf/+feUHwNPTk9TUVO7du0deXh52dnbcvXuX+vXrK/VnZmaSmZmpBK6MjIwnf5B1UJs2bQA4evRo qZ8fPnwYeHBtGDRt2pTt27eTk5NDZGSkMmQ3R3UugBkMGjSIqKgopk2bxvXr1wFwd3cH4PTp02i1 WuUnKSlJ2a5Xr17ExcVx7NgxnJ2diYqK4ubNm0Ztq1KpZA5TNej1eu7du0dubi4ODg7k5eXRpEkT 5fNHX9w13OHevn2bvLw84MEzMa1WS7169ZQvrocZptQ0aNCgpg7DrDRt2pSIiAjWr1/P6dOnS3yW lpbG/Pnz8fb2pmfPniU+a9OmDVu2bCEpKYmhQ4cq/W9u6mwAA/j000/RaDRMmjSJ4uJiQkJC8Pb2 ZtSoUcTGxnLx4kViY2OJjY0FID4+ntWrV3P27Fmsra1p3749er0eGxubCrcFaN68OUlJSaxdu5b1 69eb9TfTk6LVavn+++85evQoly5d4sqVKxw9epSMjAw6deqkDAMdHBzIysri7NmzJCcnU1hYiKur Ky4uLmzbto0bN26QlpbG0aNHsbCwIDg4WFmH6+7du+Tn55OTk8PJkydxcHCgVatWtXnYdcrnn3+O i4sL/fv3Z8GCBXz77bcsXryYiIgIcnJy+Oabb0pdH65r165ER0dz5MgRxo8fb5Zf3nVuGsXD6tWr x5dffsmAAQP497//zbRp09i8eTNTp04lMjISvV5PgwYNmDx5MuHh4dy7d493332Xu3fvAuDk5MTS pUtp2LAhQLnbAkyePJkDBw4wffp0mjdvTmhoKM7OzrV2/OagsLAQJycnUlNTSUlJQaVSUa9ePfr3 70+XLl2Uu2cfHx8yMzPZtWsXjo6O+Pj4oNPp6N69O0lJSZw4cYKCggIaNWrEmDFj0Gg0yuqc+/fv V+7e6tevz9ChQ2skl4C58vT05NChQ3z88cdER0eTmpqKq6srvXr14p133qFly5Zlbtu7d29WrFjB q6++yttvv608bzYXdSqAlbacbHh4eImZ+G3btmXv3r3k5uaSnZ2Ni4uL8lykV69eJCcnk56eTkFB AR4eHiX+o5e3LUDjxo1L3JGJijk7OxMeHk6TJk3Q6/XY29tjbW1Nfn4+165dU+5i7ezsCA0Nxdvb G3t7ewoKCrh69SrW1ta0adOGsLAwHB0dsbCwICcnh0uXLilzyAYMGIC3tzdWVlY4OTmRn5//2Azz Z13Dhg358MMP+fDDD8stV9o1FhUVRVRUVE01rUbVqQBWGfb29soD4odZWlrSuHHjKm0rqiYvL4+r V6+iUqmwsrJCp9OVulBdUVFRqXPrdDqdcqdWGpVKpXzp3Lhxo9wlnp81arXa6LJP4yt5ZhvARN2j 1+trLLgYlh4WJT2NQaky5EGCEMJsSQATdZa9vT0jRoygY8eOtd0UUUdVawhpSD0lRE0pLCzkzJkz T3Sf1ckYJdfEk1XlAFZUVCTPJKrAwsICS0vLJzYNQC6oqlGpVFhYWFQqmMk1UTXVuSYqFcBsbW2V pWgKCgrkwqgCw0WRm5uLjY1NjezD2tqawsJCZV+Sg7LyDNNrioqKSn0jwECuieqrzjVRqQDm4+PD wYMHad++Pfb29nKyqsAwJeDs2bP4+vrWyD7c3d1JS0vDyckJKysrCWBVpNPpyMrKUlY0KY1cE9VX nWuiUgEsMDCQU6dOcejQoUqnABd/sLOzw8fHh4CAgBqp3zDzWuZMVY+NjQ3u7u60aNGizDJyTZhG Va+JSgUwCwsLOnXq9NjCaaJusbCwwNfXt8bu8MQf5JqoXTKNQghhtiSACSHMlgQwIYTZkgAmhDBb EsCEEGZLApgQwmwpAczW1rbcNZmEEKK2paSklJitbwVgZWVFhw4dOHjwoEzGE0LUWXZ2dgQEBChx ygqgWbNmJCUl4ePjU6uNE0KIihQUFCgJeFTR0dHyopwQwiz9H+I4ZfkOHBggAAAAAElFTkSuQmCC " height="326" width="304" y="540.79" x="685.14"/>
</g>
- <rect id="d0e82" display="none" height="1e3px" width="288" y="831.99" x="10"/>
+ <rect id="d0e82" display="none" height="1e3px" width="288" y="821.99" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e82"/>
</flowRegion>
<flowDiv xml:space="preserve">La boîte de dialogue propose deux sections : Heuristique et Résultat. Heuristique cible les usages avancés, mais comme les paramètres par défaut sont bien choisis vous ne devriez pas avoir besoin d&apos;y toucher. Nous y reviendrons plus tard après avoir abordé la section Résultat.</flowDiv>
</flowRoot>
- <rect id="d0e85" display="none" height="1e3px" width="288" y="882.08" x="10"/>
+ <rect id="d0e85" display="none" height="1e3px" width="288" y="872.08" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e85"/>
</flowRegion>
<flowDiv xml:space="preserve">L&apos;algorithme Kopf-Lischinski fonctionne (en nous plaçant à un haut niveau) comme un compilateur convertissant les données parmi plusieurs types de représentations. À chaque étape, l&apos;algorithme a le choix d&apos;explorer les opérations que cette représentation propose. Certaines de ces représentations intermédiaires ont un aspect visuel correct (comme une cellule remodelée dans un graphe de Voronoï), d&apos;autres pas (comme un graphe de similitude). Pendant le développement de libdepixelize, les utilisateurs n&apos;ont eu de cesse de demander à ce qu&apos;il soit possible d&apos;exporter ces étapes intermédiaires à partir de la bibliothèque, et l&apos;auteur original a exaucé leurs vœux.</flowDiv>
</flowRoot>
- <rect id="d0e88" display="none" height="1e3px" width="288" y="996.01" x="10"/>
+ <rect id="d0e88" display="none" height="1e3px" width="288" y="986.01" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e88"/>
</flowRegion>
<flowDiv xml:space="preserve">Le paramétrage par défaut devrait donner le résultat le plus lisse possible, ce qui est probablement l&apos;effet désiré. Vous avez déjà vu ce type de résultat dans le premier exemple de ce tutoriel. Pour l&apos;expérimenter vous-même, ouvrez la boîte de dialogue <flowSpan font-family="sans-serif">Vectoriser du pixel art</flowSpan> et cliquez sur <flowSpan font-family="sans-serif">Valider</flowSpan> après avoir sélectionné une image.</flowDiv>
</flowRoot>
- <rect id="d0e97" display="none" height="1e3px" width="288" y="1056.7" x="10"/>
+ <rect id="d0e97" display="none" height="1e3px" width="288" y="1046.7" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e97"/>
</flowRegion>
<flowDiv xml:space="preserve">Le résultat de type Voronoï ci-dessous est une image de pixels remodelée, dans laquelle les cellules (précédemment des pixels) ont été remodelées pour connecter les pixels faisant partie d&apos;une même fonction. Aucune courbe n&apos;est créée et l&apos;image est toujours composée de lignes droites. La différence peut être observée en agrandissant l&apos;image. Précédemment, les pixels ne pouvaient pas partager de bord avec un voisin en diagonale, même si il ce voisin faisait partie de la même fonction. Mais maintenant (grâce à un graphe de similitude de couleur et l&apos;heuristique que vous pouvez ajuster pour obtenir un meilleur résultat), il est possible de faire en sorte que deux cellules diagonales partagent un bord (auparavant seul un sommet pouvait être partagé entre deux voisins de ce type).</flowDiv>
</flowRoot>
- <g id="tracing-pixelart-f04-fr.svglayer1-0" xmlns:cc="http://creativecommons.org/ns#" inkscape:label="Layer 1" transform="translate(-161.02 909.29)">
+ <g id="tracing-pixelart-f04-fr.svglayer1-0" xmlns:cc="http://creativecommons.org/ns#" inkscape:label="Layer 1" transform="translate(-161.02 899.29)">
<image id="tracing-pixelart-f04-fr.svgimage6827" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOAAAABACAYAAAADMXsPAAAAIGNIUk0AAHolAACAgwAA+f8AAIDp AAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAApOSURBVHja7d2hbxxH FAbwlRpFQVWkqJWlEhdUqlWUopYlNDAw0KyhJZXCYhgaYimoCiwMaP+ASCWBpoVRkUGBobeek5/1 7rvvzbyZ3bN3Z+akpzv79vYc6355b97MjodxHIdfvvpiePfubYgRIzwv8WQYRhX0+/r4ENfnZece 8Nja4/3h0eiI5n4vtxUvjg5HHUv4mTb4rgGOl5eXN3F29nlzLwgDrk/PH47//v1kE4Iw3Mv3Qpw8 3f6HCTg8N+K+q5B/v+fYz2cfskPjuvo6GYhRn6tGFDm//6nwLs8/jnILj5eAkOLTAENofDoDanwB 3nXswNPnagUgQ+e5MYw1Z6V9AxR4GEtBeFMeIkCBgviuHt+UnSzrBYD6fAyfzqy1lpkWOi9EjbEF iPsGqLOgxCIyoABkUDTAcK/RCEBWclqZFAHWNA70wMNs6M2MHoi1lKlzj9E0ukWOAXUGFHSs/Az3 OCZEgIgvPKfR6fPWBNA7vmORc9MQawS4rwyFCJf0b97qUmokAk4ACkIdugTV+GQ8yDKq4Lt6PNQA cAo+DbAkG9YI8PzjySbmxrJUhDsA9diPIdQdT+x+SsjXVilaC8Cp+EoxMoS1ARQkU8vGpY79dgBe g6ClJ05BhBjPX98Ew8gaMdL9DO+1doC5+C7eP6ThBZlCuHaAiE9CsmEJHgZvsSWoANSlopX5ND6N 0Co9MfO1BFCgHR8c0YhBTHVNawKICGMYPYhY82WJ/+YtgCwLHjx9uwWQ4QsRjpNg476aAObg09h+ uHdvKxBiSaNGdUer64IiGlaistcsuemSBTBg+uu/i819DGB4/vjN582x4T58reFh6Vk7QJbxEB9D WAKxNoC5QDU2uem5v9VlQF2KCkDByABqfOE4AavLUNV0Wf160IBkKj75/h/HzzfhRejJgrXj011S jU7fNDxZ8bL4MaCGIVhSAAWfBRDBLXU52lwAvZlP8OlbTiZEjC0AZPisJWaCEG9L7oKySfKt7JYC iCWotb4U5wPXhu+fk19NFKzJ4sFnIfSWorBSpmp8VlgQ2W1JCHfm/zREDYyNAxGgHGehw2VpNQG0 Op05ABFhqhTFxzUC9OCzMK4B4WDN18lj6WyySXgEGL6WqQh9DmzIrHUpmgUwNs2ACFMAcUyYM1dY O8BPb15Gw8qIS0aYXIw9GBPxGqGEfO/nx483kZqOWBNAwTcHwBAxgPo4b1c0tk507fg0soMHR2Yg xBTCJQGkpWjAFyClEMrysxDh2JfHLzYRXsvGlmuchijNfrkIEaC3K1ojwKcHhy54GDmZ8K4R7qyE 0dlQA5RlaRqhXvupAYbXCEBZlrb2eUApHTELaoBsXi8HoZSfeEyLAGP4fjt4sBOlCBcDEGIDRgOE rShG3IqC4ROkV4+t91kdQEFoASxBiPOBXoB4XWGNABm8s08fx4uLi53HCHENCKNPBmQMIQuGTwNc +wdCZ0CrBI2tcMmJDnAXYMAl0MLnMjwOv6Nv7t/fwmghrBogwyeNmICvA8zH5wXINnWqaQzIMl/4 XAo+/ZhlQk8WXCxAHANaTZhBQWWNmBoByn1swXUHOC9AGfowfPI4VopWATB2Ua6VEWsC6GnElCKc iq8FgDF8kgWxFE1lwdUBTGVD7ILWBhARxgB6EVqvaR2gjAOl/EwBDJFbhi4Z4MDmAq0gma+mDGhO RXgQWhBjx5Xgq2kljAa4rwx41wu0swCyjZkkEB+OA2sCyMaCejG2BdATnsXYLQBEfH/+9H00A0pn NHc6YtEANcJYCcq6oPi9Gj4UbByYU4rm4MvNfrUDDFktIBRoGqF0RmPTELFLme50It4BMNkJZV1Q HAfWUhaxsWBuKbpPfDVnwBABGYMXnivBh9tbLB5gbgeU7Z5dYzfU6oqmIOZeiIvv1QJARKgxyuMU PgbwrvFllaBTV8PUAvDoaHv5mAYYy4apyMl6CP96TWlVlyFZa0Fz14HG8Old1zx70Fh70kxBnA3Q O/1Q21K0GEDrMqWp2xKmED5/9mwTNQIsvRrCc8W8xmeNAa0NfWNL2Uog+g+EMaAe9wlOPQ7UAL8+ /L0afPpDb5WiVjb0bszLylo8f/hZ3rx6tYnrn2moHWEMone7CsTH5gHZnzRjmwTP0U3N+mXIPKCG p6ca2HWC4/nrQf5mYA0A5QNvTcwjvtgeMqkxngVb/iNoASBDyK6AT+HDzX6tvxNobQ6cgl1almb/ Mp5A5hOAH9693Sk9AzyJWrKf+sBThAxjKjta4zt8DQJsDWEuRAYPMxmWkOw8sX1pdGmK5akHYv6g keDTAPVfyq0FHwKUD7weDwoIDQWnKWK4GEI5J563xSyIEBlGC4mFC7MXO0dqUyh8PneZWzFAxCcA w1/QvcqAmwh/xrqm5ov1gcfxWEk2ZMDknHJeeS6gxyzYCkALoxWp7IU7aCPo2OtTpakH4eTsp/HV 1O30AmQQdEbUcBBkboZT21iYP1NLAFNjRs/4kHU6NcJwLtwYSl4fex9jo+BJXdCd7If4WgEo+DRA jYRlL2zWxDKcd5zXCkDJZiVNm1RZyrqYCJCNO/H72ICxxpmTpiF09mP4WgOYyooMoCBkx6SaLRZA /XzNHdAShKk/dcaQ5ABEyNjUmQXgoy8f0ezXCj4PwFRWxI5pCDxOxne61GTvEfu5asYnY7qS8aFn vMYAWgjxnLEr7WMLv4saL63hiwFEfDGYuAqGQfW8b2sAsaRMIRQYnrEgW+niQcjO7UGYDRDHfgxf IwB3wDGAqY5prHxkXcyWAbJJeIEVW5/paZLEuqEphPq9chGWAGwenxfgFDgacMl5ZF6ydoCICktL jaKkG4oNGQ1N4LOuqRdhEcBWy87YWtDbBnh9P7QM0MLIpgasMtHqiFoNGQ0tnM+a42MIPTuvubNf 6/i840APQkRj4UsBrB1fbCzIvrYAWgixZDWmDShIhov9YRg8Dju5ruzX8W2Xod4syLImogpfe7Jf KiPXDNBaC2p1J1NZMrU0zbr8KLXucy8AOz4O0JsFBYpkMP21N+OmANaOL3ZVRAplztI0qyGDWdFa 6TI7wB6+LMiQYcTKzFJcHWA8C3rHgJ4laimA+jnr+Q5wJoBWaZmLLAWw4yvPgrpkzcHHroTHzihr tMSes7JfBzhzV/S237c1fNYql9j3ci7ejV1aZF0ZzwB6s18HOL0UvclUkhn3cP7omNI6pkf+wmwv Ppb9EKAHXwfYo8myNdUNjW3giwAtfPja2QH++O13p57oH4AeSyxbvd1QvX+oByfb/jB2Fcfe4JHo H4Qeiy5FY3vKxHZFY8/rlTmz7QkzAd/qs2H4DyQjTvcQ7vfv4OYByJozMXw6vBcR9ww4DeDpAqID 3CPC2IoZ65icC4dLPoRFWa8igKcLjg6woBmTu+kSYsP5x71tzNtys2Xh8Hrja8JEfgoWe54tcyv5 eSZ9AK0SrQPsANe6ya+GlXp+jp+l6MOXakxUCrCXoI3sK+p9/lYAeuE1UIL2JkyP2cOFr2V4fRqi xz7jf4MwidrFWy5FAAAAAElFTkSuQmCC " height="64" width="224" y="292.64" x="224.09"/>
<g id="tracing-pixelart-f04-fr.svgg8176" transform="translate(224.09 356.64)">
<path id="tracing-pixelart-f04-fr.svgpath8178" d="m0 0h1v1h-1" fill-opacity="0" inkscape:connector-curvature="0"/>
@@ -15084,42 +15084,42 @@
<path id="tracing-pixelart-f04-fr.svgpath36848" d="m223 63h1v1h-1" fill-opacity="0" inkscape:connector-curvature="0"/>
</g>
</g>
- <rect id="d0e110" display="none" height="1e3px" width="288" y="1340" x="10"/>
+ <rect id="d0e110" display="none" height="1e3px" width="288" y="1330" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e110"/>
</flowRegion>
<flowDiv xml:space="preserve">La conversion B-spline standard apporte un résultat plus doux car l&apos;image obtenue précédemment avec Voronoï est convertie en courbes de Bézier quadratiques. La conversion n&apos;est cependant pas en 1:1 car elle nécessite un travail heuristique plus conséquent pour décider des courbes qui seront fusionnées lorsque l&apos;algorithme atteint une jonction en T dans les couleurs visibles. Sachez qu&apos;à cette étape, vous ne pouvez pas adapter l&apos;heuristique.</flowDiv>
</flowRoot>
- <rect id="d0e113" display="none" height="1e3px" width="288" y="1421.9" x="10"/>
+ <rect id="d0e113" display="none" height="1e3px" width="288" y="1411.9" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e113"/>
</flowRegion>
<flowDiv xml:space="preserve">L&apos;étape finale de libdepixelize (actuellement non exportable dans l&apos;interface d&apos;Inkscape du fait de son statut expérimental et incomplet) est l&apos;optimisation des courbes, pour supprimer l&apos;effet d&apos;escalier des courbes B-spline. Cette étape effectue également une détection de bord pour empêcher certaines fonctions d&apos;être lissées ainsi qu&apos;une triangulation pour ajuster la position des nœuds après l&apos;optimisation. Il devrait être possible de désactiver chacune de ces fonctionnalités une fois qu&apos;elles auront quitté leur statut expérimental dans la bibliothèque (bientôt, avec un peu de chance).</flowDiv>
</flowRoot>
- <rect id="d0e116" display="none" height="1e3px" width="288" y="1525" x="10"/>
+ <rect id="d0e116" display="none" height="1e3px" width="288" y="1515" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e116"/>
</flowRegion>
<flowDiv xml:space="preserve">La section Heuristique de l&apos;interface vous permet d&apos;ajuster l&apos;heuristique utilisée par libdepixelize pour décider, lorsqu&apos;elle rencontre un bloc de 2×2 pixels ayant deux diagonales de couleurs similaires, de la connexion à conserver. L&apos;algorithme essaie d&apos;appliquer l&apos;heuristique aux diagonales en conflit puis conserve la connexion du vainqueur. En cas d&apos;égalité, les deux connexions sont supprimées.</flowDiv>
</flowRoot>
- <rect id="d0e119" display="none" height="1e3px" width="288" y="1606.6" x="10"/>
+ <rect id="d0e119" display="none" height="1e3px" width="288" y="1596.6" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e119"/>
</flowRegion>
<flowDiv xml:space="preserve">Si vous souhaitez analyser l&apos;effet de chaque heuristique et jouer avec le paramétrage, le meilleur résultat est obtenu avec un diagramme de Voronoï, qui vous permettra de visualiser facilement le rendu engendré par les valeurs choisies. Une fois satisfait de vos paramètres, vous pouvez modifier le type de résultat à votre convenance.</flowDiv>
</flowRoot>
- <rect id="d0e122" display="none" height="1e3px" width="288" y="1676" x="10"/>
+ <rect id="d0e122" display="none" height="1e3px" width="288" y="1666" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e122"/>
</flowRegion>
<flowDiv xml:space="preserve">L&apos;exemple ci-dessous montre une image et sa sortie B-spline avec seulement une des heuristiques activée à chaque essai. Les différences apportées par chaque heuristique sont mises en valeur par un cercle violet.</flowDiv>
</flowRoot>
- <g id="tracing-pixelart-f05-fr.svglayer1-0" xmlns:cc="http://creativecommons.org/ns#" inkscape:label="Layer 1" transform="translate(-138.35 1449.5)">
+ <g id="tracing-pixelart-f05-fr.svglayer1-0" xmlns:cc="http://creativecommons.org/ns#" inkscape:label="Layer 1" transform="translate(-138.35 1439.5)">
<image id="tracing-pixelart-f05-fr.svgimage37000" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD0AAAA/CAYAAABTqsDiAAAABmJLR0QA/wD/AP+gvaeTAAAACXBI WXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QkZByYUnj6e6QAAABppVFh0Q29tbWVudAAAAAAAYnkg VmluaXBzbWFrZXJWz7u+AAAGeElEQVRo3tWbPUwjRxTH3zrWFS4sOxKFi0hspJOwu+SEROwmGCmF Kd1hkBCmiaDzFTRHkWtxx6XCCAmcjiqyO3xRJNNECZ1dILFIFJaSCFxRnCw2hfXmnmfn885mNyNZ GM+y3t+8j3nvP3eO7/vwHKOScye+qNnzHAhr/Dj3Bfi+P7PXWnbeX8vO+0/3XR/H033XX8vO+7P8 XtVrptAIy7/CBo/9/Pdo5t60XqjAeqHCfvcfLmG9UAnNxR0a0zTupvFAlZzrn3WbDDwyMS1zxWm5 Hr1vmHE84d50AYb9Dgz7nakuarPnOWjls24zkMXDGHFZDDZ7nvO52wz+Pbp4VIbj+z5Ucq5/eFQF AIDd7QabPDyqQipbDCyGbTzTmA41lvlERsFxiBbABFyUwKIAq83e/IPy3oBzohilwFGCFULblpIU 0Enn8Ro46zZhvVBhP6Nm6bgNMFoa4xxBpSuazrNFwQWLVEzbAssg0drNnjdZDzxcRsbltdCiBMcP fiFUHhB2CaqFNgGWLUCUwY1j2rscKOfdfIZVdalskbmzCB5jvZJz/TDA4zorU9jVN++lN2q9XWbw CI5W1SW8yLh3MeP6B7WSFpYfvYs1YayLwMNy87gt8GbKC1x/MnTZ+9zKLww8qhaPqSYp8GbKg82U BxutC9i/uQcAYO9xjoLTzo3ftkSxHRloCoygO68KAADw678j+OG7ZXbNRutCCh61IYTuDDzndb09 4c5e/4qBLyaTMIzF4OWHD7CYTMLp/RO42W+k7q+yduTcm46dVwUoJRLwTzzOgOn7xWQy8DdRtXbM 5mIZML7fv7kPuHkUra2Ebr1dhpOhCxutC2g/Pmpv9jKVgtPVFYj6MLL06eoKlBIJ7XXXwyFstC7M RcmQLK7cp1ffvIfNlAffz8/D/s1fwrgFAJgbjeCPx0f46esvA/v2/9bSX71rwO/Fb2FuNILr4RCu X7yAudEIUk9PzO29/lUAmFZnMiuHUZEZQd/tjDutd392oZRIMNi50Qi8/hXsLS3A6eqKEljUh09b bp5al3UydAFuxy5+t1OFvaUFZtm9pQW426nCb7e3xhamwFRrC73hkNXeurpbBsxbGS2MaqsMnD9m kpWrtgs31S5LZmEKTYFROOQfWnRIgEIj37Rgp2YDr1ROKLgKXuXOKmAnnQ+0l/whAQLzBw+0abFN ilqNjAfnlRIT6YgmLASmD0yPkUQHDiLJij95sXF5bSLrDDynmBm7G4VHRUUGn8oWA7AAADLNzVaP w14d3Z4XKlSSs5XYj/D8AqjgZbBoKbRSbasUuIfMyrJ5XpSUKTNxm6zXGXz8Y7oAAABQD16fSQOY WA8TWg1KxuEjWhAqSjrpvFSAtIKWLYAoB5jEPHVNBr5VYuEzeAgqsXjfwcP4c/57RODWMY0WlUHK huiBJl1+MoOr7sP//rreZuHlXQ6gftyeuObwCCbAeWvHTTN3MeP6JuCY+PiYl51744N9SseFsHT/ /rhvN6T/GMCoOEHpKJM2KwD4eJfFNk08+LDo3jioVeln9J6iUxW8H1/gNHueo2048EsPaiU4PKpq lctKzvXPz6ssw5+fV7XJjD4g76oHtRJbdDro4uDWSL0F3Vq0h8dUbipa5cHDGAzh8T2+bPdaUSZX gdePx1auH7cn4t0G3Cp7l8sNoJmZh9zdbigTmC6Lo5vzD4pWrR+3A+5ag5LwHA1dXQRuLAzyGbNc bkBtqzSx2qItxmbb4k9BzrrNCcvTygthZBZXdWMxXSYWxZNuWzGZ291usAJD9qAULpMWz4vAZW6O CTZmsgV9CjiNQzpHYUXxTx+WHvdSF+WBpq6c8E0HDyXqwPiwwDJVVZbSwz6Vy4vidibQpoMuBP60 SWoU3GagFxzmq0ZSs3EiE7m5bA81CQdZnPMFhahaMxEUeS9YyVVYKW3dZfFurvvMdAujXZPO4jZz ovLW2r1F9bfsMyxl9c0HSPtiKgXRa2itLbMyzlErTz2mdeC0NdQpKTIg2YEBNjEmzctMoYXuXzcX F6g+zjcXMjD6+bDfgXK5EfDEmUPz8pJJfGNM8wnL9JQEPxMBPyu07aBysWpv5xMgwqqEj9hzANDt zqYu54GpVWXbFlpXJXiEYmmTbUxmYQqLXR9KSKaylvNc/+2QV2NUqifCyOYppE6oDB2aSkmymh1h dPO2QmWo0FLdnLOYbv5zRmjQYY7/ALl8JZ2DM2QkAAAAAElFTkSuQmCC " height="63" width="61" y="287.93" x="250.21"/>
<image id="tracing-pixelart-f05-fr.svgimage37003" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD0AAAA/CAYAAABTqsDiAAAABmJLR0QA/wD/AP+gvaeTAAAACXBI WXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QkZByYUnj6e6QAAABppVFh0Q29tbWVudAAAAAAAYnkg VmluaXBzbWFrZXJWz7u+AAAGeElEQVRo3tWbPUwjRxTH3zrWFS4sOxKFi0hspJOwu+SEROwmGCmF Kd1hkBCmiaDzFTRHkWtxx6XCCAmcjiqyO3xRJNNECZ1dILFIFJaSCFxRnCw2hfXmnmfn885mNyNZ GM+y3t+8j3nvP3eO7/vwHKOScye+qNnzHAhr/Dj3Bfi+P7PXWnbeX8vO+0/3XR/H033XX8vO+7P8 XtVrptAIy7/CBo/9/Pdo5t60XqjAeqHCfvcfLmG9UAnNxR0a0zTupvFAlZzrn3WbDDwyMS1zxWm5 Hr1vmHE84d50AYb9Dgz7nakuarPnOWjls24zkMXDGHFZDDZ7nvO52wz+Pbp4VIbj+z5Ucq5/eFQF AIDd7QabPDyqQipbDCyGbTzTmA41lvlERsFxiBbABFyUwKIAq83e/IPy3oBzohilwFGCFULblpIU 0Enn8Ro46zZhvVBhP6Nm6bgNMFoa4xxBpSuazrNFwQWLVEzbAssg0drNnjdZDzxcRsbltdCiBMcP fiFUHhB2CaqFNgGWLUCUwY1j2rscKOfdfIZVdalskbmzCB5jvZJz/TDA4zorU9jVN++lN2q9XWbw CI5W1SW8yLh3MeP6B7WSFpYfvYs1YayLwMNy87gt8GbKC1x/MnTZ+9zKLww8qhaPqSYp8GbKg82U BxutC9i/uQcAYO9xjoLTzo3ftkSxHRloCoygO68KAADw678j+OG7ZXbNRutCCh61IYTuDDzndb09 4c5e/4qBLyaTMIzF4OWHD7CYTMLp/RO42W+k7q+yduTcm46dVwUoJRLwTzzOgOn7xWQy8DdRtXbM 5mIZML7fv7kPuHkUra2Ebr1dhpOhCxutC2g/Pmpv9jKVgtPVFYj6MLL06eoKlBIJ7XXXwyFstC7M RcmQLK7cp1ffvIfNlAffz8/D/s1fwrgFAJgbjeCPx0f46esvA/v2/9bSX71rwO/Fb2FuNILr4RCu X7yAudEIUk9PzO29/lUAmFZnMiuHUZEZQd/tjDutd392oZRIMNi50Qi8/hXsLS3A6eqKEljUh09b bp5al3UydAFuxy5+t1OFvaUFZtm9pQW426nCb7e3xhamwFRrC73hkNXeurpbBsxbGS2MaqsMnD9m kpWrtgs31S5LZmEKTYFROOQfWnRIgEIj37Rgp2YDr1ROKLgKXuXOKmAnnQ+0l/whAQLzBw+0abFN ilqNjAfnlRIT6YgmLASmD0yPkUQHDiLJij95sXF5bSLrDDynmBm7G4VHRUUGn8oWA7AAADLNzVaP w14d3Z4XKlSSs5XYj/D8AqjgZbBoKbRSbasUuIfMyrJ5XpSUKTNxm6zXGXz8Y7oAAABQD16fSQOY WA8TWg1KxuEjWhAqSjrpvFSAtIKWLYAoB5jEPHVNBr5VYuEzeAgqsXjfwcP4c/57RODWMY0WlUHK huiBJl1+MoOr7sP//rreZuHlXQ6gftyeuObwCCbAeWvHTTN3MeP6JuCY+PiYl51744N9SseFsHT/ /rhvN6T/GMCoOEHpKJM2KwD4eJfFNk08+LDo3jioVeln9J6iUxW8H1/gNHueo2048EsPaiU4PKpq lctKzvXPz6ssw5+fV7XJjD4g76oHtRJbdDro4uDWSL0F3Vq0h8dUbipa5cHDGAzh8T2+bPdaUSZX gdePx1auH7cn4t0G3Cp7l8sNoJmZh9zdbigTmC6Lo5vzD4pWrR+3A+5ag5LwHA1dXQRuLAzyGbNc bkBtqzSx2qItxmbb4k9BzrrNCcvTygthZBZXdWMxXSYWxZNuWzGZ291usAJD9qAULpMWz4vAZW6O CTZmsgV9CjiNQzpHYUXxTx+WHvdSF+WBpq6c8E0HDyXqwPiwwDJVVZbSwz6Vy4vidibQpoMuBP60 SWoU3GagFxzmq0ZSs3EiE7m5bA81CQdZnPMFhahaMxEUeS9YyVVYKW3dZfFurvvMdAujXZPO4jZz ovLW2r1F9bfsMyxl9c0HSPtiKgXRa2itLbMyzlErTz2mdeC0NdQpKTIg2YEBNjEmzctMoYXuXzcX F6g+zjcXMjD6+bDfgXK5EfDEmUPz8pJJfGNM8wnL9JQEPxMBPyu07aBysWpv5xMgwqqEj9hzANDt zqYu54GpVWXbFlpXJXiEYmmTbUxmYQqLXR9KSKaylvNc/+2QV2NUqifCyOYppE6oDB2aSkmymh1h dPO2QmWo0FLdnLOYbv5zRmjQYY7/ALl8JZ2DM2QkAAAAAElFTkSuQmCC " height="63" width="61" y="350.93" x="250.21"/>
<image id="tracing-pixelart-f05-fr.svgimage37005" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD0AAAA/CAYAAABTqsDiAAAABmJLR0QA/wD/AP+gvaeTAAAACXBI WXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QkZByYUnj6e6QAAABppVFh0Q29tbWVudAAAAAAAYnkg VmluaXBzbWFrZXJWz7u+AAAGeElEQVRo3tWbPUwjRxTH3zrWFS4sOxKFi0hspJOwu+SEROwmGCmF Kd1hkBCmiaDzFTRHkWtxx6XCCAmcjiqyO3xRJNNECZ1dILFIFJaSCFxRnCw2hfXmnmfn885mNyNZ GM+y3t+8j3nvP3eO7/vwHKOScye+qNnzHAhr/Dj3Bfi+P7PXWnbeX8vO+0/3XR/H033XX8vO+7P8 XtVrptAIy7/CBo/9/Pdo5t60XqjAeqHCfvcfLmG9UAnNxR0a0zTupvFAlZzrn3WbDDwyMS1zxWm5 Hr1vmHE84d50AYb9Dgz7nakuarPnOWjls24zkMXDGHFZDDZ7nvO52wz+Pbp4VIbj+z5Ucq5/eFQF AIDd7QabPDyqQipbDCyGbTzTmA41lvlERsFxiBbABFyUwKIAq83e/IPy3oBzohilwFGCFULblpIU 0Enn8Ro46zZhvVBhP6Nm6bgNMFoa4xxBpSuazrNFwQWLVEzbAssg0drNnjdZDzxcRsbltdCiBMcP fiFUHhB2CaqFNgGWLUCUwY1j2rscKOfdfIZVdalskbmzCB5jvZJz/TDA4zorU9jVN++lN2q9XWbw CI5W1SW8yLh3MeP6B7WSFpYfvYs1YayLwMNy87gt8GbKC1x/MnTZ+9zKLww8qhaPqSYp8GbKg82U BxutC9i/uQcAYO9xjoLTzo3ftkSxHRloCoygO68KAADw678j+OG7ZXbNRutCCh61IYTuDDzndb09 4c5e/4qBLyaTMIzF4OWHD7CYTMLp/RO42W+k7q+yduTcm46dVwUoJRLwTzzOgOn7xWQy8DdRtXbM 5mIZML7fv7kPuHkUra2Ebr1dhpOhCxutC2g/Pmpv9jKVgtPVFYj6MLL06eoKlBIJ7XXXwyFstC7M RcmQLK7cp1ffvIfNlAffz8/D/s1fwrgFAJgbjeCPx0f46esvA/v2/9bSX71rwO/Fb2FuNILr4RCu X7yAudEIUk9PzO29/lUAmFZnMiuHUZEZQd/tjDutd392oZRIMNi50Qi8/hXsLS3A6eqKEljUh09b bp5al3UydAFuxy5+t1OFvaUFZtm9pQW426nCb7e3xhamwFRrC73hkNXeurpbBsxbGS2MaqsMnD9m kpWrtgs31S5LZmEKTYFROOQfWnRIgEIj37Rgp2YDr1ROKLgKXuXOKmAnnQ+0l/whAQLzBw+0abFN ilqNjAfnlRIT6YgmLASmD0yPkUQHDiLJij95sXF5bSLrDDynmBm7G4VHRUUGn8oWA7AAADLNzVaP w14d3Z4XKlSSs5XYj/D8AqjgZbBoKbRSbasUuIfMyrJ5XpSUKTNxm6zXGXz8Y7oAAABQD16fSQOY WA8TWg1KxuEjWhAqSjrpvFSAtIKWLYAoB5jEPHVNBr5VYuEzeAgqsXjfwcP4c/57RODWMY0WlUHK huiBJl1+MoOr7sP//rreZuHlXQ6gftyeuObwCCbAeWvHTTN3MeP6JuCY+PiYl51744N9SseFsHT/ /rhvN6T/GMCoOEHpKJM2KwD4eJfFNk08+LDo3jioVeln9J6iUxW8H1/gNHueo2048EsPaiU4PKpq lctKzvXPz6ssw5+fV7XJjD4g76oHtRJbdDro4uDWSL0F3Vq0h8dUbipa5cHDGAzh8T2+bPdaUSZX gdePx1auH7cn4t0G3Cp7l8sNoJmZh9zdbigTmC6Lo5vzD4pWrR+3A+5ag5LwHA1dXQRuLAzyGbNc bkBtqzSx2qItxmbb4k9BzrrNCcvTygthZBZXdWMxXSYWxZNuWzGZ291usAJD9qAULpMWz4vAZW6O CTZmsgV9CjiNQzpHYUXxTx+WHvdSF+WBpq6c8E0HDyXqwPiwwDJVVZbSwz6Vy4vidibQpoMuBP60 SWoU3GagFxzmq0ZSs3EiE7m5bA81CQdZnPMFhahaMxEUeS9YyVVYKW3dZfFurvvMdAujXZPO4jZz ovLW2r1F9bfsMyxl9c0HSPtiKgXRa2itLbMyzlErTz2mdeC0NdQpKTIg2YEBNjEmzctMoYXuXzcX F6g+zjcXMjD6+bDfgXK5EfDEmUPz8pJJfGNM8wnL9JQEPxMBPyu07aBysWpv5xMgwqqEj9hzANDt zqYu54GpVWXbFlpXJXiEYmmTbUxmYQqLXR9KSKaylvNc/+2QV2NUqifCyOYppE6oDB2aSkmymh1h dPO2QmWo0FLdnLOYbv5zRmjQYY7/ALl8JZ2DM2QkAAAAAElFTkSuQmCC " height="63" width="61" y="413.93" x="250.21"/>
@@ -15500,72 +15500,72 @@
<path id="tracing-pixelart-f05-fr.svgpath38829" sodipodi:rx="3.0947776" sodipodi:ry="3.0947776" sodipodi:type="arc" d="m369.55 329.16c0 1.7092-1.3856 3.0948-3.0948 3.0948s-3.0948-1.3856-3.0948-3.0948 1.3856-3.0948 3.0948-3.0948 3.0948 1.3856 3.0948 3.0948z" stroke="#f0f" sodipodi:cy="329.15826" sodipodi:cx="366.45908" stroke-width="1.1" fill="none"/>
<path id="tracing-pixelart-f05-fr.svgpath38831" sodipodi:rx="2.5145068" sodipodi:ry="2.5145068" sodipodi:type="arc" d="m362.98 341.92c0 1.3887-1.1258 2.5145-2.5145 2.5145s-2.5145-1.1258-2.5145-2.5145 1.1258-2.5145 2.5145-2.5145 2.5145 1.1258 2.5145 2.5145z" stroke="#f0f" sodipodi:cy="341.92422" sodipodi:cx="360.46292" stroke-width="1.1" fill="none"/>
</g>
- <rect id="d0e135" display="none" height="1e3px" width="288" y="1933.1" x="10"/>
+ <rect id="d0e135" display="none" height="1e3px" width="288" y="1923.1" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e135"/>
</flowRegion>
<flowDiv xml:space="preserve">Au premier essai (image du haut), nous avons seulement activé l&apos;heuristique Courbes. Cette heuristique tente de conserver les longues courbes connectées. Notez qu&apos;un résultat identique est obtenu avec la dernière image, qui utilise pour sa part l&apos;heuristique Pixels clairsemés. Une différence vient du fait que sa force est plus modérée et qu&apos;elle ne donne de fortes valeurs à son vote que si la conservation des connexions est vraiment importante. La définition de modéré est ici basée sur l&apos;intuition humaine, vue la base de pixels analysée. Une autre différence est que cette heuristique ne peut pas prendre de décision lorsque les connexions assemblent de grands blocs plutôt que des longues courbes (imaginez un jeu d&apos;échecs).</flowDiv>
</flowRoot>
- <rect id="d0e138" display="none" height="1e3px" width="288" y="2057.7" x="10"/>
+ <rect id="d0e138" display="none" height="1e3px" width="288" y="2047.7" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e138"/>
</flowRegion>
<flowDiv xml:space="preserve">Le deuxième essai (image du milieu) active seulement l&apos;heuristique Îles. Sa seule action consiste à tenter de conserver la connexion entre plusieurs pixels autrement isolés (îles) avec un vote de poids constant. Ce type de situation n&apos;est pas aussi courant que ceux traités par les autres heuristiques, mais cette heuristique amène tout de même une amélioration.</flowDiv>
</flowRoot>
- <rect id="d0e141" display="none" height="1e3px" width="288" y="2127.4" x="10"/>
+ <rect id="d0e141" display="none" height="1e3px" width="288" y="2117.4" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e141"/>
</flowRegion>
<flowDiv xml:space="preserve">Pour le troisième essai (image du bas), nous avons activé l&apos;heuristique Pixels clairsemés. Cette heuristique tente de converser les courbes avec une couleur de premier plan connectées. Pour déterminer cette couleur, l&apos;heuristique analyse une fenêtre contenant les pixels voisins de la courbe conflictuelle. Vous pouvez ainsi non seulement ajuster sa force, mais également la taille de la fenêtre de pixels à analyser. Gardez à l&apos;esprit que l&apos;augmentation de cette fenêtre augmente aussi la force du vote, et qu&apos;il sera peut-être nécessaire de rééquilibrer en modifiant le multiplicateur. L&apos;auteur original de libdepixelize estime cette heuristique trop gourmande et conseille une valeur de 0,25 pour le multiplicateur.</flowDiv>
</flowRoot>
- <rect id="d0e144" display="none" height="1e3px" width="288" y="2251.9" x="10"/>
+ <rect id="d0e144" display="none" height="1e3px" width="288" y="2241.9" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e144"/>
</flowRegion>
<flowDiv xml:space="preserve">Même si les heuristiques Courbes et Pixels clairsemés donnent des résultats similaires, il peut être judicieux de les conserver toutes les deux actives pour s&apos;assurer que des pixels nécessaires aux courbes de contour ne seront pas supprimés. Par ailleurs, l&apos;heuristique Pixels clairsemés est dans certains cas la seule solution possible.</flowDiv>
</flowRoot>
- <rect id="d0e147" display="none" height="1e3px" width="288" y="2312.5" x="10"/>
+ <rect id="d0e147" display="none" height="1e3px" width="288" y="2302.5" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e147"/>
</flowRegion>
<flowDiv xml:space="preserve">Astuce : vous pouvez désactiver l&apos;heuristique en positionnant ses valeurs de multiplicateur et de poids à zéro. Vous pouvez faire en sorte que l&apos;heuristique fonctionne à l&apos;encontre de ses principes en utilisant des valeurs négatives pour ces mêmes paramètres. Mais pourquoi donc dégrader la qualité de l&apos;image avec un tel choix ? Et bien, parce que c&apos;est possible, ou parce que vous pourriez vouloir un résultat « artistique ». Quoi qu&apos;il en soit, vous le pouvez, c&apos;est tout.</flowDiv>
</flowRoot>
- <rect id="d0e150" display="none" height="1e3px" width="288" y="2394.4" x="10"/>
+ <rect id="d0e150" display="none" height="1e3px" width="288" y="2384.4" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e150"/>
</flowRegion>
<flowDiv xml:space="preserve">Et voilà ! Nous avons fait le tour de toutes les options disponibles avec la version initiale de libdepixelize. Mais si les recherches de l&apos;auteur de cette bibliothèque et de son mentor réussissent, vous pourriez bien recevoir dans le futur de nouvelles options pour élargir le champ des images pour lesquelles le résultat est satisfaisant. Souhaitons-leur bonne chance !</flowDiv>
</flowRoot>
- <rect id="d0e153" display="none" height="1e3px" width="288" y="2464.1" x="10"/>
+ <rect id="d0e153" display="none" height="1e3px" width="288" y="2454.1" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e153"/>
</flowRegion>
<flowDiv xml:space="preserve">Les images utilisées dans ce tutoriel sont issues du concours Liberated Pixel Cup (pour éviter tout problème de droit). Les liens sont les suivants :</flowDiv>
</flowRoot>
- <circle cy="0" cx="0" r="2" transform="translate(15 2507.9)"/>
- <rect id="d0e159" display="none" height="1e3px" width="258" y="2501.9" x="20"/>
+ <circle cy="0" cx="0" r="2" transform="translate(15 2497.9)"/>
+ <rect id="d0e159" display="none" height="1e3px" width="258" y="2491.9" x="20"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e159"/>
</flowRegion>
<flowDiv xml:space="preserve">http://opengameart.org/content/memento</flowDiv>
</flowRoot>
- <circle cy="0" cx="0" r="2" transform="translate(15 2525.8)"/>
- <rect id="d0e163" display="none" height="1e3px" width="258" y="2519.8" x="20"/>
+ <circle cy="0" cx="0" r="2" transform="translate(15 2515.8)"/>
+ <rect id="d0e163" display="none" height="1e3px" width="258" y="2509.8" x="20"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e163"/>
</flowRegion>
<flowDiv xml:space="preserve">http://opengameart.org/content/rpg-enemies-bathroom-tiles</flowDiv>
</flowRoot>
- <g transform="translate(0 2537.6)">
+ <g transform="translate(0 2527.6)">
<defs id="defs3" xmlns:cc="http://creativecommons.org/ns#">
<linearGradient id="linearGradient2465" y2="-7528.7" xlink:href="#linearGradient841" gradientUnits="userSpaceOnUse" x2="76.847" gradientTransform="matrix(2.1496 0 0 .46519 -.13015 3495.4)" y1="-7656.4" x1="76.847" inkscape:collect="always"/>
<filter id="filter57" height="1.2" width="1.2" color-interpolation-filters="sRGB" y="-.1" x="-.1" inkscape:label="Drop shadow, custom">
diff --git a/share/tutorials/tutorial-tracing.fr.svg b/share/tutorials/tutorial-tracing.fr.svg
index eb041f7f1..402a2f0b2 100644
--- a/share/tutorials/tutorial-tracing.fr.svg
+++ b/share/tutorials/tutorial-tracing.fr.svg
@@ -40,160 +40,160 @@
<path id="text1896" d="m120.82 12.812 0.1105-0.44803c0.96986-0.03895 1.952-0.10388 2.9465-0.1948-0.0982 0.3896-0.14732 0.5779-0.14731 0.5649l-0.33148 1.2077-0.36831 1.4025-0.90236 3.5647c-0.72436 2.857-1.0865 4.6881-1.0865 5.4932 0 0.38959 0.0921 0.58438 0.27623 0.58438 0.27009 0 0.58929-0.30518 0.95761-0.91554 0.2087-0.35063 0.49721-0.948 0.86553-1.7921l0.38672 0.15584c-0.78573 2.1168-1.6635 3.1752-2.6334 3.1752-0.3192 0-0.57702-0.12337-0.77344-0.37011-0.19644-0.24674-0.29466-0.5649-0.29465-0.95449-0.00001-0.25972 0.0491-0.69477 0.14732-1.3051-0.38059 0.72724-0.69365 1.2532-0.93919 1.5778-0.54019 0.70126-1.1847 1.0519-1.9336 1.0519-0.61386 0-1.1172-0.23375-1.5101-0.70126-0.38058-0.48049-0.57088-1.0973-0.57088-1.8506 0-1.4415 0.51563-2.8375 1.5469-4.1881 1.0435-1.3636 2.1178-2.0453 3.2227-2.0453 0.50336 0.000008 0.92691 0.27921 1.2707 0.83762l0.92077-3.5063c0.12276-0.4675 0.18414-0.75969 0.18415-0.87658-0.00001-0.31166-0.44811-0.4675-1.3443-0.46751m-0.92078 4.4608c-0.78573-0.05194-1.5899 0.81165-2.4124 2.5908-0.76117 1.6363-1.1418 2.9609-1.1418 3.9738 0 0.38959 0.0859 0.70776 0.25781 0.95449 0.18415 0.23376 0.41743 0.35063 0.69979 0.35063 0.71206 0 1.3934-0.62984 2.0441-1.8895 0.87167-1.7012 1.3382-3.2336 1.3996-4.5972 0.0368-0.88306-0.24555-1.3441-0.84711-1.383m9.2438 5.3763 0.36831 0.19479c-0.82256 1.8441-1.7188 2.7661-2.6887 2.7661-0.34375 0-0.62613-0.12986-0.84711-0.38959-0.22099-0.27271-0.33149-0.61685-0.33149-1.0324 0-0.2857 0.0368-0.55192 0.1105-0.79866s0.27623-0.79866 0.60772-1.6558l0.69978-1.7726c0.41742-1.0519 0.62613-1.7596 0.62613-2.1233 0-0.25972-0.10436-0.38958-0.31306-0.38959-0.42971 0.000008-1.019 0.71426-1.7679 2.1427l-0.36831-0.23376c0.87166-1.6882 1.7065-2.5323 2.5045-2.5323 0.33148 0.000008 0.60157 0.12987 0.81029 0.38959 0.2087 0.25973 0.31305 0.59738 0.31306 1.0129-0.00001 0.49349-0.25168 1.409-0.75504 2.7466l-0.77345 2.0453c-0.3192 0.84411-0.4788 1.396-0.4788 1.6558 0 0.23375 0.0982 0.35063 0.29465 0.35063 0.23326 0 0.53405-0.22077 0.90235-0.6623 0.3806-0.45452 0.74276-1.0259 1.0865-1.7142m-0.27623-10.227c0.23325 0.000012 0.42969 0.09092 0.58929 0.27271 0.17188 0.16883 0.25782 0.37662 0.25782 0.62334 0 0.24675-0.0859 0.46103-0.25782 0.64282-0.1596 0.18182-0.35604 0.27272-0.58929 0.27271-0.23326 0.00001-0.43584-0.09089-0.60771-0.27271-0.17188-0.1818-0.25782-0.39607-0.25782-0.64282 0-0.24673 0.0859-0.45451 0.25782-0.62334 0.17187-0.1818 0.37445-0.2727 0.60771-0.27271m8.3563 0.38959 0.1105-0.44803c0.96987-0.03895 1.952-0.10388 2.9465-0.1948-0.0982 0.3896-0.14734 0.5779-0.14733 0.5649l-0.33148 1.2077-0.36831 1.4025-0.90236 3.5647c-0.72435 2.857-1.0865 4.6881-1.0865 5.4932 0 0.38959 0.0921 0.58438 0.27623 0.58438 0.27009 0 0.58928-0.30518 0.9576-0.91554 0.2087-0.35063 0.49722-0.948 0.86554-1.7921l0.38672 0.15584c-0.78573 2.1168-1.6636 3.1752-2.6334 3.1752-0.3192 0-0.57703-0.12337-0.77345-0.37011-0.19644-0.24674-0.29465-0.5649-0.29464-0.95449-0.00001-0.25972 0.0491-0.69477 0.14732-1.3051-0.3806 0.72724-0.69365 1.2532-0.93919 1.5778-0.5402 0.70126-1.1847 1.0519-1.9336 1.0519-0.61386 0-1.1172-0.23375-1.5101-0.70126-0.38058-0.48049-0.57088-1.0973-0.57088-1.8506 0-1.4415 0.51563-2.8375 1.5469-4.1881 1.0435-1.3636 2.1178-2.0453 3.2227-2.0453 0.50335 0.000008 0.92691 0.27921 1.2707 0.83762l0.92078-3.5063c0.12275-0.4675 0.18415-0.75969 0.18416-0.87658-0.00001-0.31166-0.44813-0.4675-1.3443-0.46751m-0.92078 4.4608c-0.78572-0.05194-1.5899 0.81165-2.4124 2.5908-0.76117 1.6363-1.1418 2.9609-1.1418 3.9738 0 0.38959 0.0859 0.70776 0.25783 0.95449 0.18414 0.23376 0.41741 0.35063 0.69978 0.35063 0.71207 0 1.3934-0.62984 2.0441-1.8895 0.87166-1.7012 1.3382-3.2336 1.3996-4.5972 0.0368-0.88306-0.24555-1.3441-0.84712-1.383m11.541-0.19479h1.3075c-0.30692 0.87009-0.72434 2.1427-1.2522 3.818-0.56475 1.8051-0.84712 3.0323-0.84711 3.6816-0.00001 0.27271 0.0982 0.40907 0.29464 0.40907 0.4297 0 1.0313-0.88307 1.8047-2.6492l0.40514 0.17532c-0.51563 1.1818-0.95761 1.9934-1.3259 2.4349-0.36832 0.44153-0.78574 0.6623-1.2522 0.6623-0.76118 0-1.1418-0.36362-1.1418-1.0909 0-0.19479 0.0553-0.59088 0.16574-1.1882-0.87166 1.5324-1.8047 2.2986-2.7992 2.2986-0.62614 0-1.1356-0.22077-1.5285-0.6623-0.39286-0.44153-0.5893-1.0194-0.5893-1.7337 0-1.4804 0.55247-2.9154 1.6574-4.305 1.1049-1.4025 2.2406-2.1038 3.4069-2.1038 0.61385 0.000008 1.0804 0.35713 1.3996 1.0714l0.29465-0.81814m-1.5469 0.23375c-0.36831-0.02596-0.79801 0.2013-1.2891 0.68178-0.4788 0.46752-0.92691 1.0974-1.3443 1.8895-0.83485 1.5713-1.2523 2.8895-1.2523 3.9543 0 0.83112 0.30693 1.2467 0.92077 1.2467 0.99444 0 1.9336-1.0324 2.8176-3.0972 0.60156-1.4025 0.93919-2.5648 1.0128-3.4868 0.0246-0.33764-0.043-0.61684-0.20257-0.83762-0.15961-0.22076-0.38059-0.33764-0.66296-0.35063m9.7893 5.3374 0.36831 0.23375c-0.88395 1.8311-1.9643 2.7466-3.2411 2.7466-0.67524 0-1.2216-0.24025-1.639-0.72074-0.41741-0.48049-0.62613-1.1038-0.62613-1.87 0-0.76619 0.17188-1.5713 0.51564-2.4155 0.35603-0.85709 0.83483-1.6168 1.4364-2.2791 0.90849-1.0129 1.8477-1.5194 2.8176-1.5194 0.4297 0.000008 0.77346 0.11039 1.0313 0.33115 0.27009 0.20779 0.40514 0.4805 0.40515 0.81814-0.00001 0.22078-0.0675 0.40908-0.20258 0.56491-0.13505 0.15584-0.30079 0.23376-0.49721 0.23375-0.17188 0.000007-0.32535-0.06492-0.46039-0.19479-0.12277-0.14284-0.18417-0.30517-0.18416-0.48699-0.00001-0.11687 0.0368-0.23375 0.1105-0.35063 0.0737-0.11687 0.11049-0.19479 0.1105-0.23375-0.00001-0.16882-0.13506-0.25323-0.40515-0.25323-0.54019 0.000008-1.0804 0.43505-1.6206 1.3051-0.42969 0.68828-0.81029 1.5584-1.1418 2.6102-0.33148 1.0389-0.49721 1.896-0.49721 2.5713 0 0.88307 0.36217 1.3246 1.0865 1.3246 0.9576 0 1.8354-0.80515 2.6334-2.4155m5.1362-8.3177h1.2891l-0.79187 2.7466h1.4548l-0.12891 0.44803h-1.4548l-0.34989 1.1298c-0.29465 0.96099-0.60771 2.1233-0.93919 3.4868-0.33147 1.3506-0.49722 2.1362-0.49722 2.357 0 0.29869 0.12891 0.44803 0.38673 0.44803 0.45425 0.000001 1.0006-0.6623 1.639-1.9869 0.0614-0.14285 0.15346-0.31816 0.27623-0.52595l0.36831 0.1948c-0.47881 1.0519-0.83484 1.7272-1.0681 2.0259-0.50336 0.63633-1.0374 0.9545-1.6022 0.9545-0.38058 0-0.68751-0.12337-0.92078-0.37011-0.23325-0.25973-0.34989-0.59088-0.34989-0.99345 0-0.36362 0.0552-0.77268 0.16574-1.2272 0.12278-0.50646 0.51564-1.9609 1.1786-4.3634l0.31306-1.1298h-1.4732l0.14731-0.44803h1.4732l0.88395-2.7466m7.1027 8.3177 0.3683 0.19479c-0.82256 1.8441-1.7188 2.7661-2.6886 2.7661-0.34376 0-0.62614-0.12986-0.84711-0.38959-0.221-0.27271-0.33149-0.61685-0.33149-1.0324 0-0.2857 0.0368-0.55192 0.11049-0.79866 0.0737-0.24674 0.27624-0.79866 0.60771-1.6558l0.69979-1.7726c0.41742-1.0519 0.62613-1.7596 0.62614-2.1233-0.00001-0.25972-0.10436-0.38958-0.31307-0.38959-0.42971 0.000008-1.019 0.71426-1.7679 2.1427l-0.36832-0.23376c0.87167-1.6882 1.7065-2.5323 2.5045-2.5323 0.33148 0.000008 0.60157 0.12987 0.81027 0.38959 0.20872 0.25973 0.31307 0.59738 0.31307 1.0129 0 0.49349-0.25168 1.409-0.75503 2.7466l-0.77345 2.0453c-0.3192 0.84411-0.47881 1.396-0.4788 1.6558-0.00001 0.23375 0.0982 0.35063 0.29463 0.35063 0.23328 0 0.53406-0.22077 0.90237-0.6623 0.38058-0.45452 0.74276-1.0259 1.0865-1.7142m-0.27624-10.227c0.23326 0.000012 0.42969 0.09092 0.58929 0.27271 0.17188 0.16883 0.25782 0.37662 0.25783 0.62334-0.00001 0.24675-0.0859 0.46103-0.25783 0.64282-0.1596 0.18182-0.35603 0.27272-0.58929 0.27271-0.23327 0.00001-0.43583-0.09089-0.60771-0.27271-0.17187-0.1818-0.25783-0.39607-0.25782-0.64282-0.00001-0.24673 0.0859-0.45451 0.25782-0.62334 0.17188-0.1818 0.37444-0.2727 0.60771-0.27271m7.3369 10.227 0.36831 0.23375c-0.88396 1.8311-1.9643 2.7466-3.2411 2.7466-0.67523 0-1.2216-0.24025-1.639-0.72074-0.41741-0.48049-0.62612-1.1038-0.62612-1.87 0-0.76619 0.17188-1.5713 0.51564-2.4155 0.35603-0.85709 0.83482-1.6168 1.4364-2.2791 0.90849-1.0129 1.8477-1.5194 2.8176-1.5194 0.42969 0.000008 0.77345 0.11039 1.0313 0.33115 0.27008 0.20779 0.40514 0.4805 0.40515 0.81814-0.00001 0.22078-0.0675 0.40908-0.20258 0.56491-0.13506 0.15584-0.30079 0.23376-0.49721 0.23375-0.17189 0.000007-0.32536-0.06492-0.46039-0.19479-0.12278-0.14284-0.18417-0.30517-0.18416-0.48699-0.00001-0.11687 0.0368-0.23375 0.11049-0.35063 0.0737-0.11687 0.11049-0.19479 0.1105-0.23375-0.00001-0.16882-0.13505-0.25323-0.40515-0.25323-0.54019 0.000008-1.0804 0.43505-1.6206 1.3051-0.42969 0.68828-0.81028 1.5584-1.1418 2.6102-0.33148 1.0389-0.49722 1.896-0.49722 2.5713 0 0.88307 0.36217 1.3246 1.0865 1.3246 0.95761 0 1.8354-0.80515 2.6334-2.4155m6.3332 0 0.36832 0.19479c-0.82257 1.8441-1.7188 2.7661-2.6887 2.7661-0.34376 0-0.62612-0.12986-0.84711-0.38959-0.22098-0.27271-0.33148-0.61685-0.33148-1.0324 0-0.2857 0.0368-0.55192 0.1105-0.79866 0.0736-0.24674 0.27622-0.79866 0.60771-1.6558l0.69979-1.7726c0.4174-1.0519 0.62612-1.7596 0.62613-2.1233-0.00001-0.25972-0.10436-0.38958-0.31308-0.38959-0.42969 0.000008-1.019 0.71426-1.7679 2.1427l-0.36831-0.23376c0.87167-1.6882 1.7065-2.5323 2.5045-2.5323 0.33147 0.000008 0.60157 0.12987 0.81028 0.38959 0.20871 0.25973 0.31306 0.59738 0.31307 1.0129-0.00001 0.49349-0.25169 1.409-0.75503 2.7466l-0.77346 2.0453c-0.31921 0.84411-0.47881 1.396-0.4788 1.6558-0.00001 0.23375 0.0982 0.35063 0.29465 0.35063 0.23325 0 0.53404-0.22077 0.90236-0.6623 0.38058-0.45452 0.74275-1.0259 1.0865-1.7142m-0.27622-10.227c0.23326 0.000012 0.42969 0.09092 0.5893 0.27271 0.17187 0.16883 0.2578 0.37662 0.25781 0.62334-0.00001 0.24675-0.0859 0.46103-0.25781 0.64282-0.15961 0.18182-0.35604 0.27272-0.5893 0.27271-0.23328 0.00001-0.43585-0.09089-0.60772-0.27271-0.17188-0.1818-0.25781-0.39607-0.25781-0.64282 0-0.24673 0.0859-0.45451 0.25781-0.62334 0.17187-0.1818 0.37444-0.2727 0.60772-0.27271m7.2632 10.383 0.34989 0.25323c-1.0681 1.7012-2.1853 2.5518-3.3516 2.5518-0.62613 0-1.1356-0.20129-1.5285-0.60386-0.39286-0.41556-0.5893-0.95449-0.5893-1.6168 0-1.1558 0.39287-2.409 1.1786-3.7595 1.0927-1.87 2.3326-2.805 3.7199-2.805 0.40513 0.000008 0.73661 0.12987 0.99443 0.38959 0.25781 0.25973 0.38672 0.59088 0.38673 0.99345-0.00001 0.94801-0.62 1.8441-1.86 2.6882-0.40514 0.27272-1.3136 0.71425-2.7255 1.3246-0.20871 0.79217-0.31306 1.4025-0.31306 1.8311 0 0.71425 0.31306 1.0714 0.9392 1.0714 0.45424 0 0.87779-0.16233 1.2707-0.48699 0.40514-0.33764 0.91463-0.948 1.5285-1.8311m-3.278-1.1103c0.23326-0.10389 0.51563-0.24024 0.84711-0.40907 0.71206-0.38959 1.3075-0.90904 1.7863-1.5584 0.49107-0.64931 0.73661-1.2597 0.73662-1.8311-0.00001-0.41555-0.17802-0.62334-0.53405-0.62334-0.50337 0.000008-1.0067 0.3896-1.5101 1.1688-0.49108 0.7662-0.93306 1.8506-1.3259 3.2531m7.1834-8.8826 0.11048-0.44803c0.92078-0.03895 1.9643-0.10388 3.1306-0.1948-0.0982 0.35064-0.17188 0.60388-0.22099 0.7597-0.13505 0.40259-0.32533 1.0129-0.57087 1.8311l-1.4917 5.1426c-0.71206 2.4544-1.0681 3.9608-1.0681 4.5192-0.00001 0.40258 0.11049 0.60386 0.33147 0.60386 0.30693 0 0.68751-0.35063 1.1418-1.0519 0.23327-0.36361 0.49722-0.84411 0.79188-1.4415l0.42355 0.21427c-0.36832 0.71425-0.64455 1.2207-0.8287 1.5194-0.56475 0.89606-1.2093 1.3441-1.9336 1.3441-0.36831 0-0.6691-0.14285-0.90236-0.42855s-0.34989-0.64931-0.34989-1.0908c0-0.54542 0.20871-1.5389 0.62613-2.9804l1.6206-5.5906c0.35603-1.2337 0.53406-1.9285 0.53406-2.0843 0-0.23374-0.0859-0.38958-0.25782-0.46751-0.17188-0.09089-0.53405-0.14284-1.0865-0.15584" sodipodi:nodetypes="cccccccsssccssscsscsssccscccssscscccssssccssccsssccsssccsssssssccccccccsssccssscsscsssccscccssscscccsssccssscssscscccssssssscccsssssssssssssssssssccccccccssscccsssssccccccccssssccssccsssccsssccssssssscccssssssssssssssssssscccssssccssccsssccsssccssssssscccsssssssscsssccccsssccccsccsssccssssccssc" inkscape:connector-curvature="0" fill="#fff"/>
<use id="use1901" opacity=".078652" style="color:black" xlink:href="#text1896" transform="matrix(3.1679 0 0 3.1679 -274.08 -31.04)" height="1052.3622" width="320" y="0" x="0" fill="black"/>
</g>
- <text id="text1920" font-family="sans-serif" font-size="7" transform="scale(1.1307)" y="30" x="35" fill="#ffffff">
- <tspan id="tspan1668" style="letter-spacing:2.1813" fill="#ffffff" dx="0 -0.57057059 0 0 0 0 0">::VECTORISER UNE IMAGE MATRICIELLE</tspan>
+ <text id="text1920" font-family="sans-serif" font-size="7" transform="scale(1.1307)" y="18.25828" x="176.24451" fill="#ffffff">
+ <tspan id="tspan1668" style="letter-spacing:2.1813" fill="#ffffff" dx="0 -0.57057059 0 0 0 0 0">::VECTORISATION</tspan>
</text>
- <rect id="d0e10" display="none" height="1e3px" width="264" y="46" x="35"/>
+ <rect id="d0e10" display="none" height="1e3px" width="264" y="36" x="35"/>
<flowRoot font-family="sans-serif" font-size="7.2" font-style="italic" line-height="150%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e10"/>
</flowRegion>
<flowDiv xml:space="preserve">Inkscape permet de vectoriser des images matricielles, pour en faire un chemin (élément &lt;path&gt;) inséré dans votre dessin SVG. Ce didacticiel devrait vous aider à prendre en main l&apos;outil.</flowDiv>
</flowRoot>
- <rect id="d0e16" display="none" height="1e3px" width="288" y="86.568" x="10"/>
+ <rect id="d0e16" display="none" height="1e3px" width="288" y="76.568" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e16"/>
</flowRegion>
<flowDiv xml:space="preserve">À l&apos;heure actuelle, Inkscape utilise le moteur de vectorisation d&apos;images matricielles Potrace (<flowSpan font-weight="bold" font-family="sans-serif">potrace.sourceforge.net</flowSpan>) créé par Peter Selinger. Dans le futur, nous espérons permettre l&apos;utilisation d&apos;autres programmes/moteurs de vectorisation ; pour le moment, cependant, cet excellent outil est plus que suffisant pour nos besoins.</flowDiv>
</flowRoot>
- <rect id="d0e22" display="none" height="1e3px" width="288" y="148.21" x="10"/>
+ <rect id="d0e22" display="none" height="1e3px" width="288" y="138.21" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e22"/>
</flowRegion>
<flowDiv xml:space="preserve">Gardez à l&apos;esprit que le but de la vectorisation avec cet outil n&apos;est pas de produire une duplication exacte de l&apos;image originale, ni de produire un résultat finalisé. Aucun outil de vectorisation automatique ne peut produire cela. Vous obtiendrez un ensemble de courbes que vous pourrez utiliser comme ressources dans votre dessin.</flowDiv>
</flowRoot>
- <rect id="d0e25" display="none" height="1e3px" width="288" y="208.82" x="10"/>
+ <rect id="d0e25" display="none" height="1e3px" width="288" y="198.82" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e25"/>
</flowRegion>
<flowDiv xml:space="preserve">Potrace interprète une image matricielle en noir et blanc, et produit un ensemble de courbes. Nous avons trois types de filtres d&apos;entrée pour Potrace, afin de convertir les images brutes en quelque chose que Potrace peut exploiter.</flowDiv>
</flowRoot>
- <rect id="d0e28" display="none" height="1e3px" width="288" y="258.8" x="10"/>
+ <rect id="d0e28" display="none" height="1e3px" width="288" y="248.8" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e28"/>
</flowRegion>
<flowDiv xml:space="preserve">En général, plus il y a de pixels sombres dans l&apos;image intermédiaire, plus la vectorisation générée par Potrace sera importante. Plus la vectorisation est importante, et plus le temps du processus sera grand et plus le chemin résultant sera important. Nous vous suggérons d&apos;expérimenter cela avec des images intermédiaires plutôt claires, en les assombrissant autant que nécessaire afin d&apos;obtenir les taille et complexité désirées pour le chemin résultant.</flowDiv>
</flowRoot>
- <rect id="d0e31" display="none" height="1e3px" width="288" y="340.7" x="10"/>
+ <rect id="d0e31" display="none" height="1e3px" width="288" y="330.7" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e31"/>
</flowRegion>
<flowDiv xml:space="preserve">Pour utiliser l&apos;outil de vectorisation, ouvrez ou importez une image, sélectionnez-la, et lancez la commande <flowSpan font-family="sans-serif">Chemin &gt; Vectoriser un objet matriciel</flowSpan> ou appuyez sur <flowSpan font-weight="bold">Maj+Alt+B</flowSpan>.</flowDiv>
</flowRoot>
- <text id="tracing-f01-fr.svgtext7000" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 387.84)" xml:space="preserve" line-height="100.00000%" font-size="5.7038" y="99.753128" x="101.47987" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f01-fr.svgtspan7001" sodipodi:role="line" y="99.753128" x="101.47987">Options principales de vectorisation</tspan></text>
- <image id="tracing-f01-fr.svgimage2577" sodipodi:absref="/potrace-fr.png" xlink:href="potrace-fr.png" transform="translate(10 387.84)" height="91.738" width="189.28" display="block" y="-.000017236" x="65.359"/>
- <rect id="d0e50" display="none" height="1e3px" width="288" y="500.78" x="10"/>
+ <text id="tracing-f01-fr.svgtext7000" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 377.84)" xml:space="preserve" line-height="100.00000%" font-size="5.7038" y="99.753128" x="101.47987" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f01-fr.svgtspan7001" sodipodi:role="line" y="99.753128" x="101.47987">Options principales de vectorisation</tspan></text>
+ <image id="tracing-f01-fr.svgimage2577" sodipodi:absref="/potrace-fr.png" xlink:href="potrace-fr.png" transform="translate(10 377.84)" height="91.738" width="189.28" display="block" y="-.000017236" x="65.359"/>
+ <rect id="d0e50" display="none" height="1e3px" width="288" y="490.78" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e50"/>
</flowRegion>
<flowDiv xml:space="preserve">Vous voyez trois options de filtrage disponibles :</flowDiv>
</flowRoot>
- <circle cy="0" cx="0" r="2" transform="translate(15 524.63)"/>
- <rect id="d0e56" display="none" height="1e3px" width="258" y="518.63" x="20"/>
+ <circle cy="0" cx="0" r="2" transform="translate(15 514.63)"/>
+ <rect id="d0e56" display="none" height="1e3px" width="258" y="508.63" x="20"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e56"/>
</flowRegion>
<flowDiv xml:space="preserve">Seuil de luminosité</flowDiv>
</flowRoot>
- <rect id="d0e60" display="none" height="1e3px" width="288" y="535.14" x="10"/>
+ <rect id="d0e60" display="none" height="1e3px" width="288" y="525.14" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e60"/>
</flowRegion>
<flowDiv xml:space="preserve">Cette option utilise simplement la somme des composantes rouge, bleue et verte (ou la nuance de gris) d&apos;un pixel pour déterminer s&apos;il doit être considéré comme blanc ou noir. Le seuil peut être réglé entre 0,0 (noir) et 1,0 (blanc). Plus ce seuil est grand, moins les pixels considérés comme « blancs » seront nombreux et plus l&apos;image intermédiaire sera sombre.</flowDiv>
</flowRoot>
- <text id="tracing-f02-fr.svgtext1823" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 612.54)" xml:space="preserve" line-height="100.00000%" font-size="6" y="97.154671" x="69.581543" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f02-fr.svgtspan1824" y="97.154671" x="69.581543" sodipodi:role="line">Image originale</tspan></text>
- <text id="tracing-f02-fr.svgtext1826" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 612.54)" xml:space="preserve" line-height="100.00000%" font-size="6" y="97.37867" x="158.69894" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f02-fr.svgtspan1827" y="97.378670" x="158.69894" sodipodi:role="line">Seuil de luminosité</tspan><tspan id="tracing-f02-fr.svgtspan1829" y="103.37867" x="158.69894" sodipodi:role="line">Rempli, sans contour</tspan></text>
- <text id="tracing-f02-fr.svgtext1483" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 612.54)" xml:space="preserve" line-height="100.00000%" font-size="6" y="97.37867" x="244.99974" font-family="sans-serif" fill="#000000"><tspan id="tracing-f02-fr.svgtspan1488" sodipodi:role="line" y="97.378670" x="244.99974">Seuil de luminosité</tspan><tspan id="tracing-f02-fr.svgtspan1490" sodipodi:role="line" y="103.37867" x="244.99974">Contour, non rempli</tspan></text>
- <image id="tracing-f02-fr.svgimage1881" sodipodi:absref="/tux.png" xlink:href="tux.png" transform="translate(10 612.54)" height="91.143" width="76.965" y="-.000030566" x="31.099"/>
- <path id="tracing-f02-fr.svgpath1510" d="m143.52 88.292c-0.98-0.462-5.29-1.79-9.59-2.949-4.69-1.268-8.01-2.426-8.31-2.906-0.35-0.559-0.23-1.667 0.4-3.69 0.63-1.993 0.81-3.616 0.59-5.227-0.23-1.699-0.17-2.185 0.24-1.78 0.58 0.578 0.39 5.786-0.3 8.391-0.33 1.249-0.18 1.469 1.38 2.123 0.96 0.402 2.98 0.878 4.49 1.059 1.51 0.18 5.17 0.9 8.13 1.599 5.16 1.219 5.46 1.236 7.17 0.42 2.23-1.056 3.52-3.54 3.06-5.864-0.18-0.912-1.93-4.183-3.88-7.27-6.12-9.695-7.43-10.949-10.05-9.61-1.3 0.662-1.37 0.63-1.67-0.755-0.44-1.973 0.07-3.816 2.05-7.4 0.91-1.671 2.24-4.797 2.94-6.947 1.58-4.861 1.98-5.607 4.63-8.75 1.18-1.393 2.84-3.637 3.69-4.988l1.55-2.455-0.3-9.799c-0.27-8.636-0.2-10.078 0.6-12.155 2.02-5.2945 5.84-7.6316 11.78-7.2035 5.44 0.3915 9.13 2.6265 11.64 7.0429 1.39 2.4446 1.65 3.8166 2.1 11.044 0.38 5.991 0.44 6.24 2.8 10.903 1.33 2.624 3.54 6.058 4.92 7.63 4.74 5.416 7.27 12.192 7.26 19.475 0 4.73-0.04 4.859-1.95 7.733-2.45 3.696-3.51 4.42-6.43 4.42-3.64 0-3.75-0.301-3.78-10.332-0.03-9.592-0.62-12.245-3.68-16.613-0.84-1.194-1.68-2.968-1.86-3.943-0.36-1.872-4.22-10.158-4.98-10.696-0.24-0.174-0.19-0.473 0.12-0.663 0.7-0.434 0.73-3.155 0.04-3.581-0.32-0.201-0.23-0.717 0.26-1.409 1.04-1.49 0.96-3.563-0.24-5.913-1.16-2.267-2.53-2.888-4.54-2.055-1.82 0.756-2.77 2.56-2.44 4.669 0.28 1.844 0.04 2.939-0.65 2.939-0.25 0-0.31-0.377-0.13-0.838 0.28-0.719 0.03-0.798-1.73-0.562l-2.06 0.276 0.25-1.843c0.18-1.383-0.03-2.192-0.85-3.236-2.21-2.801-4.57-1.026-4.57 3.434 0 2.704 0.95 4.697 1.95 4.079 0.44-0.268 0.39-0.653-0.17-1.456-0.91-1.296-1-3.468-0.18-4.286 0.81-0.816 2.26 0.052 2.64 1.586 0.17 0.678 0.45 1.596 0.62 2.039 0.18 0.457 0.05 0.807-0.29 0.807-0.82 0-1.75 1.003-2.78 3.002-0.83 1.615-0.83 1.727 0.09 2.649 2.15 2.147 7.39 1.506 11.85-1.449 1.09-0.722 2.11-1.193 2.25-1.048 0.26 0.26-1.92 1.798-5.04 3.554-0.9 0.506-2.63 0.886-4.04 0.886-2.14 0.001-2.38 0.103-1.84 0.761 0.84 1.012 2.28 0.957 5.87-0.226 2.94-0.967 2.97-0.968 1.73-0.012-3.9 2.997-6.45 3.044-9.62 0.177-2.06-1.856-2.53-1.631-2.53 1.197 0 0.719-0.67 2.352-1.49 3.63-0.82 1.277-1.77 3.462-2.11 4.854-0.34 1.393-1.73 4.811-3.07 7.596-2.53 5.219-3.72 10.589-2.97 13.412 0.21 0.78 2.23 2.794 5.23 5.213 5.27 4.24 6.21 5.742 4.64 7.472-0.49 0.546-1.2 0.992-1.58 0.992-1.88 0 0.64 3.606 3.23 4.611 2.07 0.809 7.95 0.631 10.84-0.329 2.78-0.922 6.39-3.415 8.92-6.156l1.65-1.782v5.145c0 5.79 0.69 7.842 2.93 8.694 2 0.759 4.39 0.138 9.17-2.376 4.89-2.573 5.77-2.838 2.73-0.821-1.17 0.776-3.11 2.335-4.31 3.464-2.93 2.745-3.94 3.222-6.82 3.22-2.62-0.002-5.73-1.476-5.73-2.717 0-1.108-1.67-1.318-10.58-1.325l-8.3-0.007-2.26 1.852c-2.71 2.221-5.89 2.721-8.73 1.373zm30.67-58.699c-1.25-0.92-1.55-0.614-0.79 0.799 0.45 0.848 0.73 0.97 1.18 0.516 0.44-0.452 0.35-0.769-0.39-1.315zm-6.37-22.281c0-0.1228-0.22-0.2233-0.5-0.2233s-0.51 0.2413-0.51 0.5363c0 0.2949 0.23 0.3954 0.51 0.2232 0.28-0.1721 0.5-0.4134 0.5-0.5362zm-41.47 62.658c-0.06-1.419 0.79-3.132 1.55-3.132 0.37 0 0.36 0.236-0.05 0.727-0.33 0.4-0.8 1.369-1.03 2.152-0.39 1.283-0.44 1.308-0.47 0.253zm4.51-3.491c1.71-0.137 2.58-0.525 3.47-1.557 0.66-0.756 1.02-1.033 0.81-0.615-1.02 2.012-1.92 2.531-4.23 2.443l-2.33-0.089 2.28-0.182zm33.11-43.574c-1.09-0.716-1.32-2.655-0.48-3.942 1.47-2.247 3.83-1.298 3.83 1.544 0 2.322-1.66 3.51-3.35 2.398z" transform="translate(10 612.54)"/>
- <path id="tracing-f02-fr.svgpath1515" d="m229.82 88.292c-0.98-0.463-5.29-1.79-9.59-2.949-4.69-1.268-8.01-2.426-8.31-2.907-0.35-0.558-0.23-1.666 0.4-3.689 0.63-1.993 0.81-3.616 0.59-5.227-0.23-1.699-0.16-2.185 0.24-1.78 0.58 0.578 0.39 5.786-0.3 8.391-0.33 1.249-0.18 1.469 1.38 2.123 0.96 0.402 2.98 0.878 4.49 1.059 1.51 0.18 5.17 0.9 8.13 1.599 5.16 1.219 5.46 1.236 7.18 0.42 2.22-1.056 3.51-3.54 3.05-5.864-0.18-0.912-1.93-4.183-3.88-7.27-6.12-9.695-7.43-10.949-10.05-9.61-1.3 0.662-1.37 0.63-1.67-0.755-0.44-1.973 0.07-3.816 2.05-7.4 0.92-1.671 2.24-4.797 2.94-6.947 1.58-4.861 1.98-5.607 4.63-8.75 1.18-1.393 2.84-3.637 3.69-4.988l1.55-2.455-0.3-9.799c-0.27-8.636-0.19-10.078 0.6-12.155 2.02-5.2945 5.84-7.6316 11.79-7.2035 5.43 0.3914 9.12 2.6265 11.63 7.0429 1.39 2.4446 1.65 3.8166 2.1 11.044 0.38 5.991 0.44 6.24 2.8 10.903 1.33 2.624 3.55 6.058 4.92 7.63 4.74 5.416 7.27 12.192 7.26 19.475 0 4.73-0.03 4.859-1.94 7.733-2.46 3.696-3.52 4.42-6.44 4.42-3.63 0-3.75-0.302-3.78-10.332-0.03-9.592-0.62-12.245-3.68-16.613-0.84-1.194-1.68-2.968-1.86-3.943-0.36-1.872-4.22-10.158-4.98-10.696-0.24-0.174-0.19-0.473 0.12-0.663 0.7-0.434 0.73-3.155 0.04-3.581-0.32-0.201-0.23-0.717 0.26-1.409 1.04-1.49 0.96-3.563-0.24-5.913-1.16-2.267-2.53-2.888-4.54-2.055-1.82 0.756-2.77 2.56-2.44 4.669 0.28 1.844 0.04 2.939-0.65 2.939-0.25 0-0.31-0.377-0.13-0.838 0.28-0.719 0.03-0.798-1.73-0.562l-2.05 0.276 0.24-1.843c0.19-1.383-0.03-2.192-0.85-3.236-2.21-2.801-4.57-1.026-4.57 3.434 0 2.704 0.96 4.697 1.95 4.079 0.44-0.268 0.39-0.653-0.17-1.456-0.91-1.296-1-3.468-0.18-4.286 0.81-0.816 2.26 0.052 2.64 1.586 0.17 0.678 0.45 1.596 0.62 2.039 0.18 0.457 0.05 0.807-0.28 0.807-0.82 0-1.75 1.003-2.79 3.002-0.83 1.615-0.83 1.727 0.09 2.649 2.15 2.147 7.39 1.506 11.85-1.449 1.1-0.722 2.11-1.193 2.25-1.048 0.26 0.259-1.92 1.798-5.04 3.554-0.9 0.506-2.63 0.886-4.04 0.886-2.13 0.001-2.38 0.103-1.84 0.761 0.84 1.012 2.28 0.957 5.88-0.226 2.93-0.967 2.96-0.968 1.72-0.012-3.89 2.997-6.45 3.044-9.62 0.177-2.06-1.856-2.53-1.631-2.53 1.197 0 0.719-0.67 2.352-1.49 3.63-0.82 1.277-1.77 3.462-2.11 4.854-0.34 1.393-1.72 4.811-3.07 7.596-2.53 5.219-3.72 10.589-2.97 13.412 0.21 0.78 2.23 2.794 5.23 5.213 5.27 4.24 6.21 5.742 4.64 7.472-0.49 0.546-1.2 0.992-1.58 0.992-1.88 0 0.64 3.606 3.23 4.611 2.07 0.809 7.95 0.631 10.84-0.329 2.78-0.922 6.39-3.415 8.92-6.156l1.65-1.782v5.145c0 5.79 0.69 7.842 2.93 8.694 2 0.759 4.39 0.138 9.17-2.376 4.89-2.573 5.77-2.838 2.73-0.821-1.17 0.776-3.11 2.335-4.31 3.464-2.93 2.745-3.94 3.222-6.82 3.22-2.62-0.002-5.73-1.476-5.73-2.717 0-1.108-1.67-1.318-10.58-1.325l-8.3-0.007-2.26 1.852c-2.71 2.221-5.89 2.721-8.73 1.373zm30.67-58.699c-1.25-0.92-1.55-0.614-0.79 0.799 0.45 0.848 0.73 0.97 1.18 0.516 0.44-0.452 0.35-0.769-0.39-1.315zm-6.37-22.281c0-0.1228-0.22-0.2233-0.5-0.2233s-0.51 0.2413-0.51 0.5362c0 0.295 0.23 0.3954 0.51 0.2233s0.5-0.4134 0.5-0.5362zm-41.47 62.658c-0.06-1.419 0.79-3.132 1.55-3.132 0.37 0 0.36 0.236-0.05 0.727-0.33 0.4-0.8 1.369-1.03 2.152-0.39 1.283-0.43 1.308-0.47 0.253zm4.51-3.491c1.71-0.137 2.58-0.525 3.47-1.557 0.66-0.756 1.02-1.033 0.81-0.615-1.02 2.012-1.92 2.531-4.23 2.443l-2.33-0.089 2.28-0.182zm33.11-43.574c-1.09-0.716-1.32-2.655-0.48-3.942 1.47-2.247 3.83-1.298 3.83 1.544 0 2.322-1.66 3.51-3.35 2.398z" transform="translate(10 612.54)" stroke="#000" stroke-width=".375" fill="none"/>
- <circle cy="0" cx="0" r="2" transform="translate(15 735.16)"/>
- <rect id="d0e76" display="none" height="1e3px" width="258" y="729.16" x="20"/>
+ <text id="tracing-f02-fr.svgtext1823" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 602.54)" xml:space="preserve" line-height="100.00000%" font-size="6" y="97.154671" x="69.581543" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f02-fr.svgtspan1824" y="97.154671" x="69.581543" sodipodi:role="line">Image originale</tspan></text>
+ <text id="tracing-f02-fr.svgtext1826" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 602.54)" xml:space="preserve" line-height="100.00000%" font-size="6" y="97.37867" x="158.69894" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f02-fr.svgtspan1827" y="97.378670" x="158.69894" sodipodi:role="line">Seuil de luminosité</tspan><tspan id="tracing-f02-fr.svgtspan1829" y="103.37867" x="158.69894" sodipodi:role="line">Rempli, sans contour</tspan></text>
+ <text id="tracing-f02-fr.svgtext1483" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 602.54)" xml:space="preserve" line-height="100.00000%" font-size="6" y="97.37867" x="244.99974" font-family="sans-serif" fill="#000000"><tspan id="tracing-f02-fr.svgtspan1488" sodipodi:role="line" y="97.378670" x="244.99974">Seuil de luminosité</tspan><tspan id="tracing-f02-fr.svgtspan1490" sodipodi:role="line" y="103.37867" x="244.99974">Contour, non rempli</tspan></text>
+ <image id="tracing-f02-fr.svgimage1881" sodipodi:absref="/tux.png" xlink:href="tux.png" transform="translate(10 602.54)" height="91.143" width="76.965" y="-.000030566" x="31.099"/>
+ <path id="tracing-f02-fr.svgpath1510" d="m143.52 88.292c-0.98-0.462-5.29-1.79-9.59-2.949-4.69-1.268-8.01-2.426-8.31-2.906-0.35-0.559-0.23-1.667 0.4-3.69 0.63-1.993 0.81-3.616 0.59-5.227-0.23-1.699-0.17-2.185 0.24-1.78 0.58 0.578 0.39 5.786-0.3 8.391-0.33 1.249-0.18 1.469 1.38 2.123 0.96 0.402 2.98 0.878 4.49 1.059 1.51 0.18 5.17 0.9 8.13 1.599 5.16 1.219 5.46 1.236 7.17 0.42 2.23-1.056 3.52-3.54 3.06-5.864-0.18-0.912-1.93-4.183-3.88-7.27-6.12-9.695-7.43-10.949-10.05-9.61-1.3 0.662-1.37 0.63-1.67-0.755-0.44-1.973 0.07-3.816 2.05-7.4 0.91-1.671 2.24-4.797 2.94-6.947 1.58-4.861 1.98-5.607 4.63-8.75 1.18-1.393 2.84-3.637 3.69-4.988l1.55-2.455-0.3-9.799c-0.27-8.636-0.2-10.078 0.6-12.155 2.02-5.2945 5.84-7.6316 11.78-7.2035 5.44 0.3915 9.13 2.6265 11.64 7.0429 1.39 2.4446 1.65 3.8166 2.1 11.044 0.38 5.991 0.44 6.24 2.8 10.903 1.33 2.624 3.54 6.058 4.92 7.63 4.74 5.416 7.27 12.192 7.26 19.475 0 4.73-0.04 4.859-1.95 7.733-2.45 3.696-3.51 4.42-6.43 4.42-3.64 0-3.75-0.301-3.78-10.332-0.03-9.592-0.62-12.245-3.68-16.613-0.84-1.194-1.68-2.968-1.86-3.943-0.36-1.872-4.22-10.158-4.98-10.696-0.24-0.174-0.19-0.473 0.12-0.663 0.7-0.434 0.73-3.155 0.04-3.581-0.32-0.201-0.23-0.717 0.26-1.409 1.04-1.49 0.96-3.563-0.24-5.913-1.16-2.267-2.53-2.888-4.54-2.055-1.82 0.756-2.77 2.56-2.44 4.669 0.28 1.844 0.04 2.939-0.65 2.939-0.25 0-0.31-0.377-0.13-0.838 0.28-0.719 0.03-0.798-1.73-0.562l-2.06 0.276 0.25-1.843c0.18-1.383-0.03-2.192-0.85-3.236-2.21-2.801-4.57-1.026-4.57 3.434 0 2.704 0.95 4.697 1.95 4.079 0.44-0.268 0.39-0.653-0.17-1.456-0.91-1.296-1-3.468-0.18-4.286 0.81-0.816 2.26 0.052 2.64 1.586 0.17 0.678 0.45 1.596 0.62 2.039 0.18 0.457 0.05 0.807-0.29 0.807-0.82 0-1.75 1.003-2.78 3.002-0.83 1.615-0.83 1.727 0.09 2.649 2.15 2.147 7.39 1.506 11.85-1.449 1.09-0.722 2.11-1.193 2.25-1.048 0.26 0.26-1.92 1.798-5.04 3.554-0.9 0.506-2.63 0.886-4.04 0.886-2.14 0.001-2.38 0.103-1.84 0.761 0.84 1.012 2.28 0.957 5.87-0.226 2.94-0.967 2.97-0.968 1.73-0.012-3.9 2.997-6.45 3.044-9.62 0.177-2.06-1.856-2.53-1.631-2.53 1.197 0 0.719-0.67 2.352-1.49 3.63-0.82 1.277-1.77 3.462-2.11 4.854-0.34 1.393-1.73 4.811-3.07 7.596-2.53 5.219-3.72 10.589-2.97 13.412 0.21 0.78 2.23 2.794 5.23 5.213 5.27 4.24 6.21 5.742 4.64 7.472-0.49 0.546-1.2 0.992-1.58 0.992-1.88 0 0.64 3.606 3.23 4.611 2.07 0.809 7.95 0.631 10.84-0.329 2.78-0.922 6.39-3.415 8.92-6.156l1.65-1.782v5.145c0 5.79 0.69 7.842 2.93 8.694 2 0.759 4.39 0.138 9.17-2.376 4.89-2.573 5.77-2.838 2.73-0.821-1.17 0.776-3.11 2.335-4.31 3.464-2.93 2.745-3.94 3.222-6.82 3.22-2.62-0.002-5.73-1.476-5.73-2.717 0-1.108-1.67-1.318-10.58-1.325l-8.3-0.007-2.26 1.852c-2.71 2.221-5.89 2.721-8.73 1.373zm30.67-58.699c-1.25-0.92-1.55-0.614-0.79 0.799 0.45 0.848 0.73 0.97 1.18 0.516 0.44-0.452 0.35-0.769-0.39-1.315zm-6.37-22.281c0-0.1228-0.22-0.2233-0.5-0.2233s-0.51 0.2413-0.51 0.5363c0 0.2949 0.23 0.3954 0.51 0.2232 0.28-0.1721 0.5-0.4134 0.5-0.5362zm-41.47 62.658c-0.06-1.419 0.79-3.132 1.55-3.132 0.37 0 0.36 0.236-0.05 0.727-0.33 0.4-0.8 1.369-1.03 2.152-0.39 1.283-0.44 1.308-0.47 0.253zm4.51-3.491c1.71-0.137 2.58-0.525 3.47-1.557 0.66-0.756 1.02-1.033 0.81-0.615-1.02 2.012-1.92 2.531-4.23 2.443l-2.33-0.089 2.28-0.182zm33.11-43.574c-1.09-0.716-1.32-2.655-0.48-3.942 1.47-2.247 3.83-1.298 3.83 1.544 0 2.322-1.66 3.51-3.35 2.398z" transform="translate(10 602.54)"/>
+ <path id="tracing-f02-fr.svgpath1515" d="m229.82 88.292c-0.98-0.463-5.29-1.79-9.59-2.949-4.69-1.268-8.01-2.426-8.31-2.907-0.35-0.558-0.23-1.666 0.4-3.689 0.63-1.993 0.81-3.616 0.59-5.227-0.23-1.699-0.16-2.185 0.24-1.78 0.58 0.578 0.39 5.786-0.3 8.391-0.33 1.249-0.18 1.469 1.38 2.123 0.96 0.402 2.98 0.878 4.49 1.059 1.51 0.18 5.17 0.9 8.13 1.599 5.16 1.219 5.46 1.236 7.18 0.42 2.22-1.056 3.51-3.54 3.05-5.864-0.18-0.912-1.93-4.183-3.88-7.27-6.12-9.695-7.43-10.949-10.05-9.61-1.3 0.662-1.37 0.63-1.67-0.755-0.44-1.973 0.07-3.816 2.05-7.4 0.92-1.671 2.24-4.797 2.94-6.947 1.58-4.861 1.98-5.607 4.63-8.75 1.18-1.393 2.84-3.637 3.69-4.988l1.55-2.455-0.3-9.799c-0.27-8.636-0.19-10.078 0.6-12.155 2.02-5.2945 5.84-7.6316 11.79-7.2035 5.43 0.3914 9.12 2.6265 11.63 7.0429 1.39 2.4446 1.65 3.8166 2.1 11.044 0.38 5.991 0.44 6.24 2.8 10.903 1.33 2.624 3.55 6.058 4.92 7.63 4.74 5.416 7.27 12.192 7.26 19.475 0 4.73-0.03 4.859-1.94 7.733-2.46 3.696-3.52 4.42-6.44 4.42-3.63 0-3.75-0.302-3.78-10.332-0.03-9.592-0.62-12.245-3.68-16.613-0.84-1.194-1.68-2.968-1.86-3.943-0.36-1.872-4.22-10.158-4.98-10.696-0.24-0.174-0.19-0.473 0.12-0.663 0.7-0.434 0.73-3.155 0.04-3.581-0.32-0.201-0.23-0.717 0.26-1.409 1.04-1.49 0.96-3.563-0.24-5.913-1.16-2.267-2.53-2.888-4.54-2.055-1.82 0.756-2.77 2.56-2.44 4.669 0.28 1.844 0.04 2.939-0.65 2.939-0.25 0-0.31-0.377-0.13-0.838 0.28-0.719 0.03-0.798-1.73-0.562l-2.05 0.276 0.24-1.843c0.19-1.383-0.03-2.192-0.85-3.236-2.21-2.801-4.57-1.026-4.57 3.434 0 2.704 0.96 4.697 1.95 4.079 0.44-0.268 0.39-0.653-0.17-1.456-0.91-1.296-1-3.468-0.18-4.286 0.81-0.816 2.26 0.052 2.64 1.586 0.17 0.678 0.45 1.596 0.62 2.039 0.18 0.457 0.05 0.807-0.28 0.807-0.82 0-1.75 1.003-2.79 3.002-0.83 1.615-0.83 1.727 0.09 2.649 2.15 2.147 7.39 1.506 11.85-1.449 1.1-0.722 2.11-1.193 2.25-1.048 0.26 0.259-1.92 1.798-5.04 3.554-0.9 0.506-2.63 0.886-4.04 0.886-2.13 0.001-2.38 0.103-1.84 0.761 0.84 1.012 2.28 0.957 5.88-0.226 2.93-0.967 2.96-0.968 1.72-0.012-3.89 2.997-6.45 3.044-9.62 0.177-2.06-1.856-2.53-1.631-2.53 1.197 0 0.719-0.67 2.352-1.49 3.63-0.82 1.277-1.77 3.462-2.11 4.854-0.34 1.393-1.72 4.811-3.07 7.596-2.53 5.219-3.72 10.589-2.97 13.412 0.21 0.78 2.23 2.794 5.23 5.213 5.27 4.24 6.21 5.742 4.64 7.472-0.49 0.546-1.2 0.992-1.58 0.992-1.88 0 0.64 3.606 3.23 4.611 2.07 0.809 7.95 0.631 10.84-0.329 2.78-0.922 6.39-3.415 8.92-6.156l1.65-1.782v5.145c0 5.79 0.69 7.842 2.93 8.694 2 0.759 4.39 0.138 9.17-2.376 4.89-2.573 5.77-2.838 2.73-0.821-1.17 0.776-3.11 2.335-4.31 3.464-2.93 2.745-3.94 3.222-6.82 3.22-2.62-0.002-5.73-1.476-5.73-2.717 0-1.108-1.67-1.318-10.58-1.325l-8.3-0.007-2.26 1.852c-2.71 2.221-5.89 2.721-8.73 1.373zm30.67-58.699c-1.25-0.92-1.55-0.614-0.79 0.799 0.45 0.848 0.73 0.97 1.18 0.516 0.44-0.452 0.35-0.769-0.39-1.315zm-6.37-22.281c0-0.1228-0.22-0.2233-0.5-0.2233s-0.51 0.2413-0.51 0.5362c0 0.295 0.23 0.3954 0.51 0.2233s0.5-0.4134 0.5-0.5362zm-41.47 62.658c-0.06-1.419 0.79-3.132 1.55-3.132 0.37 0 0.36 0.236-0.05 0.727-0.33 0.4-0.8 1.369-1.03 2.152-0.39 1.283-0.43 1.308-0.47 0.253zm4.51-3.491c1.71-0.137 2.58-0.525 3.47-1.557 0.66-0.756 1.02-1.033 0.81-0.615-1.02 2.012-1.92 2.531-4.23 2.443l-2.33-0.089 2.28-0.182zm33.11-43.574c-1.09-0.716-1.32-2.655-0.48-3.942 1.47-2.247 3.83-1.298 3.83 1.544 0 2.322-1.66 3.51-3.35 2.398z" transform="translate(10 602.54)" stroke="#000" stroke-width=".375" fill="none"/>
+ <circle cy="0" cx="0" r="2" transform="translate(15 725.16)"/>
+ <rect id="d0e76" display="none" height="1e3px" width="258" y="719.16" x="20"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e76"/>
</flowRegion>
<flowDiv xml:space="preserve">Détection de contour</flowDiv>
</flowRoot>
- <rect id="d0e80" display="none" height="1e3px" width="288" y="745.67" x="10"/>
+ <rect id="d0e80" display="none" height="1e3px" width="288" y="735.67" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e80"/>
</flowRegion>
<flowDiv xml:space="preserve">Cette option utilise l&apos;algorithme de détection des arêtes énoncé par J. Canny, afin de trouver rapidement des isoclines de contraste similaire. Cela produit une image intermédiaire qui ressemble moins à l&apos;image originale que le résultat d&apos;un seuil de luminosité mais qui contient souvent des courbes qui seraient ignorées autrement. Le seuil à régler ici (de 0,0 à 1,0) ajuste le seuil de luminosité afin de déterminer si un pixel adjacent à une courbe de contraste doit être inclus dans le résultat. Le réglage permet d&apos;ajuster l&apos;obscurité ou l&apos;épaisseur des arêtes du résultat.</flowDiv>
</flowRoot>
- <text id="tracing-f03-fr.svgtext1492" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 855.31)" xml:space="preserve" line-height="100.00000%" font-size="6" y="97.154671" x="69.581543" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f03-fr.svgtspan1493" y="97.154671" x="69.581543" sodipodi:role="line">Image originale</tspan></text>
- <text id="tracing-f03-fr.svgtext1495" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 855.31)" xml:space="preserve" line-height="100.00000%" font-size="6" y="97.37867" x="157.95474" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f03-fr.svgtspan1496" y="97.378670" x="157.95474" sodipodi:role="line">Arêtes détectées</tspan><tspan id="tracing-f03-fr.svgtspan1498" y="103.37867" x="157.95474" sodipodi:role="line">Rempli, sans contour</tspan></text>
- <text id="tracing-f03-fr.svgtext1500" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 855.31)" xml:space="preserve" line-height="100.00000%" font-size="6" y="97.37867" x="244.99974" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f03-fr.svgtspan1501" sodipodi:role="line" y="97.378670" x="244.99974">Arêtes détectées</tspan><tspan id="tracing-f03-fr.svgtspan1503" sodipodi:role="line" y="103.37867" x="244.99974">Contour, non rempli</tspan></text>
- <image id="tracing-f03-fr.svgimage1508" sodipodi:absref="/tux.png" xlink:href="tux.png" transform="translate(10 855.31)" height="91.143" width="76.965" y=".000036133" x="31.099"/>
- <path id="tracing-f03-fr.svgpath4003" d="m139.28 89.101c-1.22-0.554-3.5-1.363-5.06-1.797-9.19-2.553-12.03-3.428-12.59-3.88-0.83-0.662-0.8-3.17 0.08-5.676 0.47-1.351 0.61-3.264 0.43-5.882-0.24-3.484-0.16-3.99 0.81-4.96 0.79-0.784 1.71-1.08 3.37-1.08 3.12 0 4.04-1.136 4.04-4.981 0-2.439 0.35-3.585 2.1-6.945 1.15-2.214 2.43-5.164 2.85-6.556 1.28-4.328 2.29-6.298 4.6-9.018 1.23-1.446 2.92-3.713 3.75-5.039l1.52-2.411-0.27-9.833c-0.25-9.303-0.2-9.982 0.85-12.583 2.03-4.9988 5.81-7.4473 11.48-7.4473 6.48 0 11.64 3.1302 14.06 8.5268 1.11 2.4645 1.4 4.1035 1.75 9.6405 0.42 6.617 0.44 6.711 2.84 11.441 1.33 2.623 3.54 6.054 4.91 7.624 2.84 3.246 3.82 5.006 5.73 10.332 1.53 4.27 2.16 10.332 1.41 13.56-0.38 1.63-0.34 2.348 0.19 3.038 0.37 0.497 0.69 1.538 0.7 2.314 0.02 1.92 1.27 3.673 3.89 5.479 1.73 1.193 2.2 1.822 2.2 2.968 0 2.463-0.48 2.996-4.94 5.47-2.37 1.317-5.37 3.394-6.65 4.614-3.43 3.266-5.03 4.106-7.8 4.109-2.71 0.002-5.83-1.368-6.82-2.995-0.6-1.001-1.06-1.054-9.12-1.054h-8.49l-1.83 1.51c-3.38 2.786-6.23 3.216-9.99 1.511zm8.76-3.212l2.24-1.835 9.54-0.004 9.53-0.005 0.07-4.081 0.07-4.082-1.08 0.985c-3.69 3.353-9.68 5.436-14.47 5.033-1.55-0.13-3.24-0.417-3.76-0.637-0.79-0.332-0.89-0.228-0.62 0.619 0.21 0.663-0.05 1.441-0.73 2.228-0.98 1.129-1.03 1.139-0.76 0.148 0.16-0.585-0.05-1.708-0.46-2.496s-0.62-1.625-0.48-1.861c0.44-0.698-0.91-3.24-1.98-3.739-0.54-0.254-2.23-2.513-3.75-5.02-3.51-5.808-6.01-8.389-7.75-8.022-0.69 0.147-1.72 0.984-2.28 1.861-0.84 1.304-1.47 1.657-3.47 1.944-1.35 0.193-2.77 0.474-3.17 0.625-1.2 0.464-1.66 2.55-1.24 5.669 0.29 2.149 0.19 3.693-0.36 5.654-0.53 1.858-0.61 2.86-0.25 3.221 0.29 0.288 3.59 1.296 7.33 2.239s7.81 2.185 9.05 2.76c3.22 1.5 5.94 1.128 8.78-1.204zm-4.77-0.013c0-0.111 0.8-0.673 1.78-1.248 1.38-0.819 1.77-0.889 1.77-0.321 0 0.398-0.44 0.96-0.98 1.248-0.97 0.517-2.57 0.717-2.57 0.321zm38.26-0.594c1.83-1.552 4.85-3.626 6.71-4.607 3.7-1.945 5.67-3.524 5.67-4.533 0-0.356-0.99-1.329-2.2-2.162-2.48-1.705-3.88-3.555-3.88-5.132 0-0.585-0.25-1.535-0.56-2.111-0.53-1-0.65-0.946-2.47 1.173-1.91 2.211-1.93 2.22-5.31 2.22-2.95 0-3.52-0.155-4.36-1.196-0.53-0.657-0.97-1.94-0.97-2.849 0-3.455-2.73-3.018-3.12 0.5-0.09 0.836-0.4 1.405-0.68 1.266-0.6-0.304-0.35-3.549 0.34-4.4 0.27-0.332 0.98-0.673 1.57-0.76 3.17-0.466 1.93-12.992-1.84-18.601-0.68-0.995-1.5-2.721-1.84-3.835s-1.44-3.621-2.44-5.57c-1.43-2.8-1.85-4.236-1.96-6.836-0.08-1.81-0.18-3.633-0.22-4.05-0.05-0.418 0.08-1.216 0.28-1.773 0.19-0.557 0.01-0.414-0.42 0.317-1.37 2.358-4.02 2.355-4.96-0.006-0.3-0.758-0.63-1.053-0.76-0.69-0.31 0.823-4.02 0.827-4.53 0.005-0.26-0.424-0.48-0.218-0.68 0.633-0.41 1.751-2.65 2-3.75 0.417-0.45-0.635-0.81-0.933-0.8-0.662s0.34 0.915 0.73 1.431c0.52 0.684 0.58 1.285 0.23 2.215-0.5 1.317-0.13 1.853 2.24 3.226 1.29 0.752 0.67 1.177-0.68 0.456-2.02-1.083-1.56-0.169 0.88 1.739 2.87 2.25 4.35 2.216 8.27-0.192 1.38-0.851 2.73-1.547 3.01-1.547 1.11 0 0.34 0.855-2.38 2.659-4.1 2.722-8.04 2.603-10.4-0.313-0.87-1.076-0.88-1.074-0.89 0.548 0 0.896-0.79 3.061-1.75 4.811s-1.83 4.12-1.94 5.266-0.71 2.794-1.33 3.661c-2.49 3.501-4.25 8.305-4.5 12.264l-0.23 3.832 4.62 3.687c2.55 2.028 4.97 4.171 5.38 4.762 1.15 1.648 0.93 3.684-0.56 5.062l-1.31 1.215 1.4 1.095c1.86 1.464 3.13 1.73 7.18 1.496 4.42-0.256 7.58-1.788 11.59-5.612l3.11-2.973 0.36 2.618c0.44 3.173-0.17 11.231-0.81 10.833-1-0.619-0.38 1.415 0.78 2.583 1.02 1.02 1.75 1.243 4.05 1.243 2.66 0 2.96-0.138 6.13-2.823zm-33.7-12.607c0-0.342-1.31-1.753-2.91-3.135-3.42-2.953-4.87-3.876-3.37-2.15 0.58 0.671 1.58 2.132 2.23 3.246 1.87 3.206 2.58 3.885 3.37 3.227 0.37-0.311 0.68-0.846 0.68-1.188zm35.75-6.974c1.8-1.894 2.12-2.584 2.41-5.207 0.19-1.663 0.12-4.163-0.14-5.555-1.04-5.331-4.05-12.32-6.13-14.178-1.89-1.702-5.11-6.786-6.9-10.916-1.37-3.17-1.7-4.584-1.71-7.389-0.01-5.935-0.86-10.132-2.66-13.261-1.38-2.3986-2.12-3.0967-4.57-4.2836-7.06-3.4339-12.97-1.7826-15.86 4.4354-0.83 1.7852-1.18 3.3892-1.14 5.3372 0.03 1.532 0.17 2.329 0.3 1.772 0.42-1.67 1.19-2.278 2.92-2.278 1.82 0 4.26 1.891 4.39 3.394 0.04 0.5 0.1 1.249 0.13 1.663s0.45 0.829 0.93 0.922c0.62 0.119 0.8-0.062 0.59-0.605-0.47-1.232 0.74-4.204 2.08-5.08 1.56-1.022 4.25-1.027 5.7-0.01 2.19 1.532 2.69 3.346 2.51 9.154-0.16 5.245-0.12 5.466 1.52 8.732 0.93 1.842 2.05 4.578 2.49 6.08s1.46 3.779 2.27 5.06c2.62 4.128 3.49 8.167 3.44 15.997-0.03 6.023 0.08 7.073 0.88 7.952 1.45 1.604 4.02 0.922 6.55-1.736zm-0.47-2.238c-0.19-0.186-0.34-0.573-0.34-0.861 0-0.317 0.24-0.288 0.6 0.076 0.33 0.329 0.48 0.717 0.34 0.861-0.15 0.143-0.42 0.109-0.6-0.076zm1.47-1.114c-0.21-0.353-0.26-0.778-0.09-0.945 0.45-0.454 0.95 0.213 0.7 0.947-0.17 0.515-0.29 0.514-0.61-0.002zm-16.27-31.179c-0.96-1.464-0.8-3.56 0.28-3.607 2.28-0.098 4.32 2.26 3.67 4.23-0.38 1.133-3.08 0.707-3.95-0.623zm1.89-1.405c-0.36-0.363-0.6-0.393-0.6-0.076 0 0.676 0.6 1.275 0.94 0.937 0.14-0.144-0.01-0.531-0.34-0.861zm-8.36-19.976c-0.19-0.1857-0.34-1.2111-0.34-2.2786 0-1.8673 0.07-1.941 1.71-1.941 0.94 0 1.94 0.2848 2.22 0.6329 0.7 0.8774 0.45 2.8983-0.42 3.4506-0.85 0.5396-2.69 0.6176-3.17 0.1361zm2.19-2.2241c0-0.262-0.22-0.4765-0.5-0.4765s-0.51 0.3553-0.51 0.7895c0 0.4341 0.23 0.6485 0.51 0.4764s0.5-0.5273 0.5-0.7894zm-25.2 56.037c-1.44-1.649-1.49-1.867-1.25-5.443 0.26-3.833 0.74-5.369 3.87-12.334 0.99-2.228 1.81-4.479 1.82-5.001 0-0.523 0.92-2.602 2.03-4.62 2.49-4.512 2.67-5.564 0.26-1.572-0.97 1.609-2.64 3.988-3.72 5.287-2.39 2.873-2.76 3.559-4.45 8.271-0.73 2.041-2.1 5.243-3.04 7.116-2.11 4.206-2.26 5.927-0.47 5.585 0.95-0.182 1.8 0.297 3.67 2.084 2.89 2.76 3.35 2.985 1.28 0.627zm-3.66-4.95c0-1.843 0.22-1.777 0.7 0.211 0.2 0.827 0.12 1.393-0.18 1.393-0.29 0-0.52-0.722-0.52-1.604zm12.5-30.17c-0.12-0.487-0.23-0.088-0.23 0.886 0 0.975 0.11 1.374 0.23 0.886 0.13-0.487 0.13-1.284 0-1.772zm-0.55-5.053c-0.16-0.168-0.28 0.131-0.26 0.665 0.02 0.59 0.14 0.71 0.3 0.306 0.15-0.366 0.13-0.802-0.04-0.971zm3.3-3.01c-0.44-0.759-0.54-0.781-0.55-0.123-0.01 0.853 0.52 1.621 0.88 1.262 0.12-0.118-0.03-0.631-0.33-1.139zm11.79 0.938c0.14-0.229-0.19-0.796-0.73-1.261-0.93-0.793-0.99-0.788-0.99 0.079 0 1.402 1.11 2.166 1.72 1.182zm-9.52-2.485c-0.16-0.168-0.28 0.131-0.26 0.665 0.02 0.59 0.14 0.71 0.3 0.306 0.15-0.366 0.13-0.803-0.04-0.971zm10.8-1.439c-0.63-0.676-1.61-1.23-2.16-1.23-1.1 0-2.87 1.357-2.87 2.201 0 0.288 0.29 0.168 0.64-0.267 1.42-1.782 4.88-1.084 4.97 1.006 0.03 0.583 0.13 0.644 0.31 0.189 0.15-0.368-0.25-1.223-0.89-1.899zm-12.94-0.217c0.34 0 0.94 0.285 1.33 0.633 0.61 0.538 0.61 0.501 0.04-0.253-0.37-0.488-1.05-0.886-1.52-0.886-0.91 0-2.06 0.928-2.06 1.656 0 0.243 0.36 0.083 0.79-0.354 0.44-0.438 1.08-0.796 1.42-0.796z" transform="translate(10 855.31)"/>
- <path id="tracing-f03-fr.svgpath4004" d="m226.33 89.101c-1.22-0.554-3.5-1.363-5.07-1.797-9.18-2.553-12.02-3.428-12.59-3.88-0.83-0.662-0.79-3.17 0.08-5.676 0.47-1.351 0.61-3.264 0.43-5.882-0.24-3.484-0.15-3.99 0.82-4.96 0.78-0.784 1.71-1.08 3.36-1.08 3.12 0 4.05-1.136 4.05-4.981 0-2.439 0.34-3.585 2.09-6.945 1.16-2.214 2.44-5.164 2.85-6.556 1.29-4.328 2.29-6.298 4.61-9.018 1.22-1.446 2.91-3.713 3.75-5.039l1.52-2.411-0.27-9.833c-0.25-9.303-0.21-9.982 0.85-12.583 2.03-4.9988 5.8-7.4473 11.48-7.4473 6.47 0 11.63 3.1302 14.05 8.5268 1.11 2.4645 1.41 4.1035 1.76 9.6405 0.41 6.617 0.44 6.711 2.83 11.441 1.33 2.623 3.54 6.054 4.92 7.624 2.84 3.246 3.81 5.006 5.72 10.332 1.53 4.27 2.17 10.332 1.41 13.56-0.38 1.63-0.33 2.348 0.19 3.038 0.38 0.497 0.7 1.538 0.7 2.314 0.03 1.92 1.27 3.673 3.9 5.479 1.73 1.193 2.2 1.822 2.2 2.968 0 2.463-0.48 2.996-4.94 5.47-2.38 1.317-5.37 3.394-6.66 4.614-3.43 3.266-5.02 4.106-7.79 4.109-2.72 0.002-5.84-1.368-6.82-2.995-0.61-1.001-1.07-1.054-9.13-1.054h-8.49l-1.83 1.51c-3.38 2.786-6.22 3.216-9.98 1.511zm8.76-3.212l2.24-1.835 9.53-0.004 9.54-0.005 0.07-4.081 0.07-4.082-1.09 0.985c-3.68 3.353-9.67 5.436-14.47 5.033-1.55-0.13-3.24-0.417-3.76-0.637-0.78-0.332-0.89-0.228-0.62 0.619 0.21 0.663-0.04 1.441-0.73 2.228-0.98 1.129-1.03 1.139-0.76 0.148 0.16-0.585-0.04-1.708-0.45-2.496s-0.63-1.625-0.48-1.861c0.43-0.698-0.92-3.24-1.98-3.739-0.55-0.254-2.23-2.513-3.75-5.02-3.52-5.808-6.01-8.389-7.75-8.022-0.7 0.147-1.73 0.984-2.29 1.861-0.83 1.304-1.46 1.657-3.47 1.944-1.34 0.193-2.77 0.474-3.16 0.625-1.21 0.464-1.67 2.55-1.24 5.669 0.29 2.149 0.19 3.693-0.37 5.654-0.53 1.858-0.6 2.86-0.24 3.221 0.29 0.288 3.58 1.296 7.33 2.239 3.74 0.943 7.81 2.185 9.04 2.76 3.22 1.5 5.94 1.128 8.79-1.204zm-4.77-0.013c0-0.111 0.8-0.673 1.77-1.248 1.39-0.819 1.77-0.889 1.77-0.321 0 0.398-0.44 0.96-0.98 1.248-0.96 0.517-2.56 0.717-2.56 0.321zm38.25-0.594c1.83-1.552 4.85-3.626 6.72-4.607 3.69-1.945 5.66-3.524 5.66-4.533 0-0.356-0.99-1.329-2.2-2.162-2.48-1.705-3.87-3.555-3.87-5.132 0-0.585-0.25-1.535-0.56-2.111-0.54-1-0.65-0.946-2.48 1.173-1.9 2.211-1.92 2.22-5.3 2.22-2.96 0-3.52-0.155-4.37-1.196-0.53-0.657-0.96-1.94-0.96-2.849 0-3.455-2.73-3.018-3.13 0.5-0.09 0.836-0.39 1.405-0.67 1.266-0.61-0.304-0.36-3.549 0.34-4.4 0.27-0.332 0.97-0.673 1.56-0.76 3.18-0.466 1.94-12.992-1.84-18.601-0.67-0.995-1.5-2.721-1.84-3.835s-1.43-3.621-2.43-5.57c-1.44-2.8-1.85-4.236-1.97-6.836-0.08-1.81-0.18-3.633-0.22-4.05-0.04-0.418 0.08-1.216 0.28-1.773s0.01-0.414-0.41 0.317c-1.38 2.358-4.02 2.355-4.96-0.006-0.31-0.758-0.63-1.053-0.77-0.69-0.3 0.823-4.02 0.827-4.53 0.005-0.26-0.424-0.48-0.218-0.68 0.633-0.41 1.751-2.64 2-3.75 0.417-0.44-0.635-0.8-0.933-0.79-0.662s0.33 0.915 0.73 1.431c0.51 0.684 0.58 1.285 0.22 2.215-0.5 1.317-0.13 1.853 2.24 3.226 1.3 0.752 0.67 1.177-0.68 0.456-2.02-1.083-1.56-0.169 0.88 1.739 2.88 2.25 4.36 2.216 8.27-0.192 1.38-0.851 2.74-1.547 3.01-1.547 1.11 0 0.35 0.855-2.37 2.659-4.1 2.722-8.05 2.603-10.41-0.313-0.87-1.076-0.87-1.074-0.88 0.548-0.01 0.896-0.8 3.061-1.76 4.811-0.95 1.75-1.83 4.12-1.94 5.266s-0.71 2.794-1.32 3.661c-2.5 3.501-4.26 8.305-4.5 12.264l-0.23 3.832 4.62 3.687c2.54 2.028 4.96 4.171 5.37 4.762 1.16 1.648 0.93 3.684-0.55 5.062l-1.31 1.215 1.39 1.095c1.86 1.464 3.14 1.73 7.18 1.496 4.42-0.256 7.59-1.788 11.59-5.612l3.11-2.973 0.36 2.618c0.44 3.173-0.16 11.231-0.8 10.833-1.01-0.619-0.39 1.415 0.78 2.583 1.02 1.02 1.74 1.243 4.04 1.243 2.67 0 2.97-0.138 6.13-2.823zm-33.69-12.607c0-0.342-1.31-1.753-2.92-3.135-3.41-2.953-4.86-3.876-3.37-2.15 0.58 0.671 1.59 2.132 2.24 3.246 1.86 3.206 2.57 3.885 3.36 3.227 0.38-0.311 0.69-0.846 0.69-1.188zm35.74-6.974c1.8-1.894 2.12-2.584 2.42-5.207 0.19-1.663 0.12-4.163-0.15-5.555-1.03-5.331-4.05-12.32-6.12-14.178-1.9-1.702-5.11-6.786-6.9-10.916-1.38-3.17-1.7-4.584-1.71-7.389-0.02-5.935-0.86-10.132-2.66-13.261-1.38-2.3986-2.13-3.0967-4.57-4.2836-7.07-3.4339-12.97-1.7826-15.87 4.4354-0.83 1.7852-1.17 3.3892-1.13 5.3372 0.03 1.532 0.16 2.329 0.3 1.772 0.41-1.67 1.19-2.278 2.91-2.278 1.82 0 4.27 1.891 4.4 3.394 0.04 0.5 0.1 1.249 0.12 1.663 0.03 0.414 0.45 0.829 0.94 0.922 0.62 0.119 0.79-0.062 0.58-0.605-0.47-1.232 0.75-4.204 2.08-5.08 1.56-1.022 4.26-1.027 5.71-0.01 2.19 1.532 2.68 3.346 2.5 9.154-0.16 5.245-0.12 5.466 1.53 8.732 0.93 1.842 2.05 4.578 2.48 6.08 0.44 1.502 1.47 3.779 2.28 5.06 2.62 4.128 3.49 8.167 3.44 15.997-0.04 6.023 0.08 7.073 0.88 7.952 1.45 1.604 4.02 0.922 6.54-1.736zm-0.47-2.238c-0.18-0.186-0.34-0.573-0.34-0.861 0-0.317 0.24-0.288 0.6 0.076 0.33 0.329 0.48 0.717 0.34 0.861-0.14 0.143-0.41 0.109-0.6-0.076zm1.48-1.114c-0.22-0.353-0.26-0.778-0.09-0.945 0.45-0.454 0.94 0.213 0.7 0.947-0.17 0.515-0.29 0.514-0.61-0.002zm-16.27-31.179c-0.96-1.464-0.8-3.56 0.28-3.607 2.27-0.098 4.32 2.26 3.66 4.23-0.38 1.133-3.07 0.707-3.94-0.623zm1.89-1.405c-0.36-0.363-0.6-0.393-0.6-0.076 0 0.676 0.6 1.275 0.94 0.937 0.14-0.144-0.01-0.531-0.34-0.861zm-8.36-19.976c-0.19-0.1857-0.34-1.2111-0.34-2.2786 0-1.8673 0.06-1.941 1.71-1.941 0.94 0 1.94 0.2848 2.21 0.6329 0.7 0.8774 0.46 2.8983-0.41 3.4506-0.86 0.5396-2.69 0.6176-3.17 0.1361zm2.19-2.2241c0-0.262-0.23-0.4765-0.51-0.4765s-0.5 0.3553-0.5 0.7895c0 0.4341 0.22 0.6485 0.5 0.4764s0.51-0.5273 0.51-0.7894zm-25.2 56.037c-1.45-1.649-1.5-1.867-1.26-5.443 0.27-3.833 0.75-5.369 3.87-12.334 1-2.228 1.82-4.479 1.82-5.001 0.01-0.523 0.92-2.602 2.03-4.62 2.5-4.512 2.67-5.564 0.27-1.572-0.97 1.609-2.65 3.988-3.73 5.287-2.38 2.873-2.75 3.559-4.44 8.271-0.74 2.041-2.11 5.243-3.05 7.116-2.11 4.206-2.25 5.927-0.47 5.585 0.96-0.182 1.8 0.297 3.68 2.084 2.89 2.76 3.35 2.985 1.28 0.627zm-3.66-4.95c0-1.843 0.22-1.777 0.7 0.211 0.19 0.827 0.12 1.393-0.19 1.393-0.28 0-0.51-0.722-0.51-1.604zm12.5-30.17c-0.13-0.487-0.23-0.088-0.23 0.886 0 0.975 0.1 1.374 0.23 0.886 0.13-0.487 0.13-1.284 0-1.772zm-0.55-5.053c-0.17-0.168-0.29 0.131-0.27 0.665 0.03 0.59 0.15 0.71 0.31 0.306 0.15-0.366 0.13-0.802-0.04-0.971zm3.3-3.01c-0.44-0.759-0.54-0.781-0.55-0.123-0.02 0.853 0.51 1.621 0.87 1.262 0.12-0.118-0.02-0.631-0.32-1.139zm11.78 0.938c0.14-0.229-0.19-0.796-0.73-1.261-0.92-0.793-0.99-0.788-0.99 0.079 0 1.402 1.11 2.166 1.72 1.182zm-9.51-2.485c-0.17-0.168-0.29 0.131-0.27 0.665 0.03 0.59 0.15 0.71 0.31 0.306 0.15-0.366 0.13-0.803-0.04-0.971zm10.8-1.439c-0.64-0.676-1.61-1.23-2.17-1.23-1.1 0-2.86 1.357-2.86 2.201 0 0.288 0.28 0.168 0.63-0.267 1.43-1.782 4.88-1.084 4.98 1.006 0.03 0.583 0.12 0.644 0.31 0.189 0.14-0.368-0.26-1.223-0.89-1.899zm-12.94-0.217c0.34 0 0.94 0.285 1.33 0.633 0.6 0.538 0.61 0.501 0.04-0.253-0.37-0.488-1.06-0.886-1.52-0.886-0.91 0-2.07 0.928-2.07 1.656 0 0.243 0.36 0.083 0.8-0.354 0.44-0.438 1.07-0.796 1.42-0.796z" transform="translate(10 855.31)" stroke="#000" stroke-width=".375" fill="none"/>
- <circle cy="0" cx="0" r="2" transform="translate(15 977.93)"/>
- <rect id="d0e96" display="none" height="1e3px" width="258" y="971.93" x="20"/>
+ <text id="tracing-f03-fr.svgtext1492" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 845.31)" xml:space="preserve" line-height="100.00000%" font-size="6" y="97.154671" x="69.581543" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f03-fr.svgtspan1493" y="97.154671" x="69.581543" sodipodi:role="line">Image originale</tspan></text>
+ <text id="tracing-f03-fr.svgtext1495" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 845.31)" xml:space="preserve" line-height="100.00000%" font-size="6" y="97.37867" x="157.95474" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f03-fr.svgtspan1496" y="97.378670" x="157.95474" sodipodi:role="line">Arêtes détectées</tspan><tspan id="tracing-f03-fr.svgtspan1498" y="103.37867" x="157.95474" sodipodi:role="line">Rempli, sans contour</tspan></text>
+ <text id="tracing-f03-fr.svgtext1500" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 845.31)" xml:space="preserve" line-height="100.00000%" font-size="6" y="97.37867" x="244.99974" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f03-fr.svgtspan1501" sodipodi:role="line" y="97.378670" x="244.99974">Arêtes détectées</tspan><tspan id="tracing-f03-fr.svgtspan1503" sodipodi:role="line" y="103.37867" x="244.99974">Contour, non rempli</tspan></text>
+ <image id="tracing-f03-fr.svgimage1508" sodipodi:absref="/tux.png" xlink:href="tux.png" transform="translate(10 845.31)" height="91.143" width="76.965" y=".000036133" x="31.099"/>
+ <path id="tracing-f03-fr.svgpath4003" d="m139.28 89.101c-1.22-0.554-3.5-1.363-5.06-1.797-9.19-2.553-12.03-3.428-12.59-3.88-0.83-0.662-0.8-3.17 0.08-5.676 0.47-1.351 0.61-3.264 0.43-5.882-0.24-3.484-0.16-3.99 0.81-4.96 0.79-0.784 1.71-1.08 3.37-1.08 3.12 0 4.04-1.136 4.04-4.981 0-2.439 0.35-3.585 2.1-6.945 1.15-2.214 2.43-5.164 2.85-6.556 1.28-4.328 2.29-6.298 4.6-9.018 1.23-1.446 2.92-3.713 3.75-5.039l1.52-2.411-0.27-9.833c-0.25-9.303-0.2-9.982 0.85-12.583 2.03-4.9988 5.81-7.4473 11.48-7.4473 6.48 0 11.64 3.1302 14.06 8.5268 1.11 2.4645 1.4 4.1035 1.75 9.6405 0.42 6.617 0.44 6.711 2.84 11.441 1.33 2.623 3.54 6.054 4.91 7.624 2.84 3.246 3.82 5.006 5.73 10.332 1.53 4.27 2.16 10.332 1.41 13.56-0.38 1.63-0.34 2.348 0.19 3.038 0.37 0.497 0.69 1.538 0.7 2.314 0.02 1.92 1.27 3.673 3.89 5.479 1.73 1.193 2.2 1.822 2.2 2.968 0 2.463-0.48 2.996-4.94 5.47-2.37 1.317-5.37 3.394-6.65 4.614-3.43 3.266-5.03 4.106-7.8 4.109-2.71 0.002-5.83-1.368-6.82-2.995-0.6-1.001-1.06-1.054-9.12-1.054h-8.49l-1.83 1.51c-3.38 2.786-6.23 3.216-9.99 1.511zm8.76-3.212l2.24-1.835 9.54-0.004 9.53-0.005 0.07-4.081 0.07-4.082-1.08 0.985c-3.69 3.353-9.68 5.436-14.47 5.033-1.55-0.13-3.24-0.417-3.76-0.637-0.79-0.332-0.89-0.228-0.62 0.619 0.21 0.663-0.05 1.441-0.73 2.228-0.98 1.129-1.03 1.139-0.76 0.148 0.16-0.585-0.05-1.708-0.46-2.496s-0.62-1.625-0.48-1.861c0.44-0.698-0.91-3.24-1.98-3.739-0.54-0.254-2.23-2.513-3.75-5.02-3.51-5.808-6.01-8.389-7.75-8.022-0.69 0.147-1.72 0.984-2.28 1.861-0.84 1.304-1.47 1.657-3.47 1.944-1.35 0.193-2.77 0.474-3.17 0.625-1.2 0.464-1.66 2.55-1.24 5.669 0.29 2.149 0.19 3.693-0.36 5.654-0.53 1.858-0.61 2.86-0.25 3.221 0.29 0.288 3.59 1.296 7.33 2.239s7.81 2.185 9.05 2.76c3.22 1.5 5.94 1.128 8.78-1.204zm-4.77-0.013c0-0.111 0.8-0.673 1.78-1.248 1.38-0.819 1.77-0.889 1.77-0.321 0 0.398-0.44 0.96-0.98 1.248-0.97 0.517-2.57 0.717-2.57 0.321zm38.26-0.594c1.83-1.552 4.85-3.626 6.71-4.607 3.7-1.945 5.67-3.524 5.67-4.533 0-0.356-0.99-1.329-2.2-2.162-2.48-1.705-3.88-3.555-3.88-5.132 0-0.585-0.25-1.535-0.56-2.111-0.53-1-0.65-0.946-2.47 1.173-1.91 2.211-1.93 2.22-5.31 2.22-2.95 0-3.52-0.155-4.36-1.196-0.53-0.657-0.97-1.94-0.97-2.849 0-3.455-2.73-3.018-3.12 0.5-0.09 0.836-0.4 1.405-0.68 1.266-0.6-0.304-0.35-3.549 0.34-4.4 0.27-0.332 0.98-0.673 1.57-0.76 3.17-0.466 1.93-12.992-1.84-18.601-0.68-0.995-1.5-2.721-1.84-3.835s-1.44-3.621-2.44-5.57c-1.43-2.8-1.85-4.236-1.96-6.836-0.08-1.81-0.18-3.633-0.22-4.05-0.05-0.418 0.08-1.216 0.28-1.773 0.19-0.557 0.01-0.414-0.42 0.317-1.37 2.358-4.02 2.355-4.96-0.006-0.3-0.758-0.63-1.053-0.76-0.69-0.31 0.823-4.02 0.827-4.53 0.005-0.26-0.424-0.48-0.218-0.68 0.633-0.41 1.751-2.65 2-3.75 0.417-0.45-0.635-0.81-0.933-0.8-0.662s0.34 0.915 0.73 1.431c0.52 0.684 0.58 1.285 0.23 2.215-0.5 1.317-0.13 1.853 2.24 3.226 1.29 0.752 0.67 1.177-0.68 0.456-2.02-1.083-1.56-0.169 0.88 1.739 2.87 2.25 4.35 2.216 8.27-0.192 1.38-0.851 2.73-1.547 3.01-1.547 1.11 0 0.34 0.855-2.38 2.659-4.1 2.722-8.04 2.603-10.4-0.313-0.87-1.076-0.88-1.074-0.89 0.548 0 0.896-0.79 3.061-1.75 4.811s-1.83 4.12-1.94 5.266-0.71 2.794-1.33 3.661c-2.49 3.501-4.25 8.305-4.5 12.264l-0.23 3.832 4.62 3.687c2.55 2.028 4.97 4.171 5.38 4.762 1.15 1.648 0.93 3.684-0.56 5.062l-1.31 1.215 1.4 1.095c1.86 1.464 3.13 1.73 7.18 1.496 4.42-0.256 7.58-1.788 11.59-5.612l3.11-2.973 0.36 2.618c0.44 3.173-0.17 11.231-0.81 10.833-1-0.619-0.38 1.415 0.78 2.583 1.02 1.02 1.75 1.243 4.05 1.243 2.66 0 2.96-0.138 6.13-2.823zm-33.7-12.607c0-0.342-1.31-1.753-2.91-3.135-3.42-2.953-4.87-3.876-3.37-2.15 0.58 0.671 1.58 2.132 2.23 3.246 1.87 3.206 2.58 3.885 3.37 3.227 0.37-0.311 0.68-0.846 0.68-1.188zm35.75-6.974c1.8-1.894 2.12-2.584 2.41-5.207 0.19-1.663 0.12-4.163-0.14-5.555-1.04-5.331-4.05-12.32-6.13-14.178-1.89-1.702-5.11-6.786-6.9-10.916-1.37-3.17-1.7-4.584-1.71-7.389-0.01-5.935-0.86-10.132-2.66-13.261-1.38-2.3986-2.12-3.0967-4.57-4.2836-7.06-3.4339-12.97-1.7826-15.86 4.4354-0.83 1.7852-1.18 3.3892-1.14 5.3372 0.03 1.532 0.17 2.329 0.3 1.772 0.42-1.67 1.19-2.278 2.92-2.278 1.82 0 4.26 1.891 4.39 3.394 0.04 0.5 0.1 1.249 0.13 1.663s0.45 0.829 0.93 0.922c0.62 0.119 0.8-0.062 0.59-0.605-0.47-1.232 0.74-4.204 2.08-5.08 1.56-1.022 4.25-1.027 5.7-0.01 2.19 1.532 2.69 3.346 2.51 9.154-0.16 5.245-0.12 5.466 1.52 8.732 0.93 1.842 2.05 4.578 2.49 6.08s1.46 3.779 2.27 5.06c2.62 4.128 3.49 8.167 3.44 15.997-0.03 6.023 0.08 7.073 0.88 7.952 1.45 1.604 4.02 0.922 6.55-1.736zm-0.47-2.238c-0.19-0.186-0.34-0.573-0.34-0.861 0-0.317 0.24-0.288 0.6 0.076 0.33 0.329 0.48 0.717 0.34 0.861-0.15 0.143-0.42 0.109-0.6-0.076zm1.47-1.114c-0.21-0.353-0.26-0.778-0.09-0.945 0.45-0.454 0.95 0.213 0.7 0.947-0.17 0.515-0.29 0.514-0.61-0.002zm-16.27-31.179c-0.96-1.464-0.8-3.56 0.28-3.607 2.28-0.098 4.32 2.26 3.67 4.23-0.38 1.133-3.08 0.707-3.95-0.623zm1.89-1.405c-0.36-0.363-0.6-0.393-0.6-0.076 0 0.676 0.6 1.275 0.94 0.937 0.14-0.144-0.01-0.531-0.34-0.861zm-8.36-19.976c-0.19-0.1857-0.34-1.2111-0.34-2.2786 0-1.8673 0.07-1.941 1.71-1.941 0.94 0 1.94 0.2848 2.22 0.6329 0.7 0.8774 0.45 2.8983-0.42 3.4506-0.85 0.5396-2.69 0.6176-3.17 0.1361zm2.19-2.2241c0-0.262-0.22-0.4765-0.5-0.4765s-0.51 0.3553-0.51 0.7895c0 0.4341 0.23 0.6485 0.51 0.4764s0.5-0.5273 0.5-0.7894zm-25.2 56.037c-1.44-1.649-1.49-1.867-1.25-5.443 0.26-3.833 0.74-5.369 3.87-12.334 0.99-2.228 1.81-4.479 1.82-5.001 0-0.523 0.92-2.602 2.03-4.62 2.49-4.512 2.67-5.564 0.26-1.572-0.97 1.609-2.64 3.988-3.72 5.287-2.39 2.873-2.76 3.559-4.45 8.271-0.73 2.041-2.1 5.243-3.04 7.116-2.11 4.206-2.26 5.927-0.47 5.585 0.95-0.182 1.8 0.297 3.67 2.084 2.89 2.76 3.35 2.985 1.28 0.627zm-3.66-4.95c0-1.843 0.22-1.777 0.7 0.211 0.2 0.827 0.12 1.393-0.18 1.393-0.29 0-0.52-0.722-0.52-1.604zm12.5-30.17c-0.12-0.487-0.23-0.088-0.23 0.886 0 0.975 0.11 1.374 0.23 0.886 0.13-0.487 0.13-1.284 0-1.772zm-0.55-5.053c-0.16-0.168-0.28 0.131-0.26 0.665 0.02 0.59 0.14 0.71 0.3 0.306 0.15-0.366 0.13-0.802-0.04-0.971zm3.3-3.01c-0.44-0.759-0.54-0.781-0.55-0.123-0.01 0.853 0.52 1.621 0.88 1.262 0.12-0.118-0.03-0.631-0.33-1.139zm11.79 0.938c0.14-0.229-0.19-0.796-0.73-1.261-0.93-0.793-0.99-0.788-0.99 0.079 0 1.402 1.11 2.166 1.72 1.182zm-9.52-2.485c-0.16-0.168-0.28 0.131-0.26 0.665 0.02 0.59 0.14 0.71 0.3 0.306 0.15-0.366 0.13-0.803-0.04-0.971zm10.8-1.439c-0.63-0.676-1.61-1.23-2.16-1.23-1.1 0-2.87 1.357-2.87 2.201 0 0.288 0.29 0.168 0.64-0.267 1.42-1.782 4.88-1.084 4.97 1.006 0.03 0.583 0.13 0.644 0.31 0.189 0.15-0.368-0.25-1.223-0.89-1.899zm-12.94-0.217c0.34 0 0.94 0.285 1.33 0.633 0.61 0.538 0.61 0.501 0.04-0.253-0.37-0.488-1.05-0.886-1.52-0.886-0.91 0-2.06 0.928-2.06 1.656 0 0.243 0.36 0.083 0.79-0.354 0.44-0.438 1.08-0.796 1.42-0.796z" transform="translate(10 845.31)"/>
+ <path id="tracing-f03-fr.svgpath4004" d="m226.33 89.101c-1.22-0.554-3.5-1.363-5.07-1.797-9.18-2.553-12.02-3.428-12.59-3.88-0.83-0.662-0.79-3.17 0.08-5.676 0.47-1.351 0.61-3.264 0.43-5.882-0.24-3.484-0.15-3.99 0.82-4.96 0.78-0.784 1.71-1.08 3.36-1.08 3.12 0 4.05-1.136 4.05-4.981 0-2.439 0.34-3.585 2.09-6.945 1.16-2.214 2.44-5.164 2.85-6.556 1.29-4.328 2.29-6.298 4.61-9.018 1.22-1.446 2.91-3.713 3.75-5.039l1.52-2.411-0.27-9.833c-0.25-9.303-0.21-9.982 0.85-12.583 2.03-4.9988 5.8-7.4473 11.48-7.4473 6.47 0 11.63 3.1302 14.05 8.5268 1.11 2.4645 1.41 4.1035 1.76 9.6405 0.41 6.617 0.44 6.711 2.83 11.441 1.33 2.623 3.54 6.054 4.92 7.624 2.84 3.246 3.81 5.006 5.72 10.332 1.53 4.27 2.17 10.332 1.41 13.56-0.38 1.63-0.33 2.348 0.19 3.038 0.38 0.497 0.7 1.538 0.7 2.314 0.03 1.92 1.27 3.673 3.9 5.479 1.73 1.193 2.2 1.822 2.2 2.968 0 2.463-0.48 2.996-4.94 5.47-2.38 1.317-5.37 3.394-6.66 4.614-3.43 3.266-5.02 4.106-7.79 4.109-2.72 0.002-5.84-1.368-6.82-2.995-0.61-1.001-1.07-1.054-9.13-1.054h-8.49l-1.83 1.51c-3.38 2.786-6.22 3.216-9.98 1.511zm8.76-3.212l2.24-1.835 9.53-0.004 9.54-0.005 0.07-4.081 0.07-4.082-1.09 0.985c-3.68 3.353-9.67 5.436-14.47 5.033-1.55-0.13-3.24-0.417-3.76-0.637-0.78-0.332-0.89-0.228-0.62 0.619 0.21 0.663-0.04 1.441-0.73 2.228-0.98 1.129-1.03 1.139-0.76 0.148 0.16-0.585-0.04-1.708-0.45-2.496s-0.63-1.625-0.48-1.861c0.43-0.698-0.92-3.24-1.98-3.739-0.55-0.254-2.23-2.513-3.75-5.02-3.52-5.808-6.01-8.389-7.75-8.022-0.7 0.147-1.73 0.984-2.29 1.861-0.83 1.304-1.46 1.657-3.47 1.944-1.34 0.193-2.77 0.474-3.16 0.625-1.21 0.464-1.67 2.55-1.24 5.669 0.29 2.149 0.19 3.693-0.37 5.654-0.53 1.858-0.6 2.86-0.24 3.221 0.29 0.288 3.58 1.296 7.33 2.239 3.74 0.943 7.81 2.185 9.04 2.76 3.22 1.5 5.94 1.128 8.79-1.204zm-4.77-0.013c0-0.111 0.8-0.673 1.77-1.248 1.39-0.819 1.77-0.889 1.77-0.321 0 0.398-0.44 0.96-0.98 1.248-0.96 0.517-2.56 0.717-2.56 0.321zm38.25-0.594c1.83-1.552 4.85-3.626 6.72-4.607 3.69-1.945 5.66-3.524 5.66-4.533 0-0.356-0.99-1.329-2.2-2.162-2.48-1.705-3.87-3.555-3.87-5.132 0-0.585-0.25-1.535-0.56-2.111-0.54-1-0.65-0.946-2.48 1.173-1.9 2.211-1.92 2.22-5.3 2.22-2.96 0-3.52-0.155-4.37-1.196-0.53-0.657-0.96-1.94-0.96-2.849 0-3.455-2.73-3.018-3.13 0.5-0.09 0.836-0.39 1.405-0.67 1.266-0.61-0.304-0.36-3.549 0.34-4.4 0.27-0.332 0.97-0.673 1.56-0.76 3.18-0.466 1.94-12.992-1.84-18.601-0.67-0.995-1.5-2.721-1.84-3.835s-1.43-3.621-2.43-5.57c-1.44-2.8-1.85-4.236-1.97-6.836-0.08-1.81-0.18-3.633-0.22-4.05-0.04-0.418 0.08-1.216 0.28-1.773s0.01-0.414-0.41 0.317c-1.38 2.358-4.02 2.355-4.96-0.006-0.31-0.758-0.63-1.053-0.77-0.69-0.3 0.823-4.02 0.827-4.53 0.005-0.26-0.424-0.48-0.218-0.68 0.633-0.41 1.751-2.64 2-3.75 0.417-0.44-0.635-0.8-0.933-0.79-0.662s0.33 0.915 0.73 1.431c0.51 0.684 0.58 1.285 0.22 2.215-0.5 1.317-0.13 1.853 2.24 3.226 1.3 0.752 0.67 1.177-0.68 0.456-2.02-1.083-1.56-0.169 0.88 1.739 2.88 2.25 4.36 2.216 8.27-0.192 1.38-0.851 2.74-1.547 3.01-1.547 1.11 0 0.35 0.855-2.37 2.659-4.1 2.722-8.05 2.603-10.41-0.313-0.87-1.076-0.87-1.074-0.88 0.548-0.01 0.896-0.8 3.061-1.76 4.811-0.95 1.75-1.83 4.12-1.94 5.266s-0.71 2.794-1.32 3.661c-2.5 3.501-4.26 8.305-4.5 12.264l-0.23 3.832 4.62 3.687c2.54 2.028 4.96 4.171 5.37 4.762 1.16 1.648 0.93 3.684-0.55 5.062l-1.31 1.215 1.39 1.095c1.86 1.464 3.14 1.73 7.18 1.496 4.42-0.256 7.59-1.788 11.59-5.612l3.11-2.973 0.36 2.618c0.44 3.173-0.16 11.231-0.8 10.833-1.01-0.619-0.39 1.415 0.78 2.583 1.02 1.02 1.74 1.243 4.04 1.243 2.67 0 2.97-0.138 6.13-2.823zm-33.69-12.607c0-0.342-1.31-1.753-2.92-3.135-3.41-2.953-4.86-3.876-3.37-2.15 0.58 0.671 1.59 2.132 2.24 3.246 1.86 3.206 2.57 3.885 3.36 3.227 0.38-0.311 0.69-0.846 0.69-1.188zm35.74-6.974c1.8-1.894 2.12-2.584 2.42-5.207 0.19-1.663 0.12-4.163-0.15-5.555-1.03-5.331-4.05-12.32-6.12-14.178-1.9-1.702-5.11-6.786-6.9-10.916-1.38-3.17-1.7-4.584-1.71-7.389-0.02-5.935-0.86-10.132-2.66-13.261-1.38-2.3986-2.13-3.0967-4.57-4.2836-7.07-3.4339-12.97-1.7826-15.87 4.4354-0.83 1.7852-1.17 3.3892-1.13 5.3372 0.03 1.532 0.16 2.329 0.3 1.772 0.41-1.67 1.19-2.278 2.91-2.278 1.82 0 4.27 1.891 4.4 3.394 0.04 0.5 0.1 1.249 0.12 1.663 0.03 0.414 0.45 0.829 0.94 0.922 0.62 0.119 0.79-0.062 0.58-0.605-0.47-1.232 0.75-4.204 2.08-5.08 1.56-1.022 4.26-1.027 5.71-0.01 2.19 1.532 2.68 3.346 2.5 9.154-0.16 5.245-0.12 5.466 1.53 8.732 0.93 1.842 2.05 4.578 2.48 6.08 0.44 1.502 1.47 3.779 2.28 5.06 2.62 4.128 3.49 8.167 3.44 15.997-0.04 6.023 0.08 7.073 0.88 7.952 1.45 1.604 4.02 0.922 6.54-1.736zm-0.47-2.238c-0.18-0.186-0.34-0.573-0.34-0.861 0-0.317 0.24-0.288 0.6 0.076 0.33 0.329 0.48 0.717 0.34 0.861-0.14 0.143-0.41 0.109-0.6-0.076zm1.48-1.114c-0.22-0.353-0.26-0.778-0.09-0.945 0.45-0.454 0.94 0.213 0.7 0.947-0.17 0.515-0.29 0.514-0.61-0.002zm-16.27-31.179c-0.96-1.464-0.8-3.56 0.28-3.607 2.27-0.098 4.32 2.26 3.66 4.23-0.38 1.133-3.07 0.707-3.94-0.623zm1.89-1.405c-0.36-0.363-0.6-0.393-0.6-0.076 0 0.676 0.6 1.275 0.94 0.937 0.14-0.144-0.01-0.531-0.34-0.861zm-8.36-19.976c-0.19-0.1857-0.34-1.2111-0.34-2.2786 0-1.8673 0.06-1.941 1.71-1.941 0.94 0 1.94 0.2848 2.21 0.6329 0.7 0.8774 0.46 2.8983-0.41 3.4506-0.86 0.5396-2.69 0.6176-3.17 0.1361zm2.19-2.2241c0-0.262-0.23-0.4765-0.51-0.4765s-0.5 0.3553-0.5 0.7895c0 0.4341 0.22 0.6485 0.5 0.4764s0.51-0.5273 0.51-0.7894zm-25.2 56.037c-1.45-1.649-1.5-1.867-1.26-5.443 0.27-3.833 0.75-5.369 3.87-12.334 1-2.228 1.82-4.479 1.82-5.001 0.01-0.523 0.92-2.602 2.03-4.62 2.5-4.512 2.67-5.564 0.27-1.572-0.97 1.609-2.65 3.988-3.73 5.287-2.38 2.873-2.75 3.559-4.44 8.271-0.74 2.041-2.11 5.243-3.05 7.116-2.11 4.206-2.25 5.927-0.47 5.585 0.96-0.182 1.8 0.297 3.68 2.084 2.89 2.76 3.35 2.985 1.28 0.627zm-3.66-4.95c0-1.843 0.22-1.777 0.7 0.211 0.19 0.827 0.12 1.393-0.19 1.393-0.28 0-0.51-0.722-0.51-1.604zm12.5-30.17c-0.13-0.487-0.23-0.088-0.23 0.886 0 0.975 0.1 1.374 0.23 0.886 0.13-0.487 0.13-1.284 0-1.772zm-0.55-5.053c-0.17-0.168-0.29 0.131-0.27 0.665 0.03 0.59 0.15 0.71 0.31 0.306 0.15-0.366 0.13-0.802-0.04-0.971zm3.3-3.01c-0.44-0.759-0.54-0.781-0.55-0.123-0.02 0.853 0.51 1.621 0.87 1.262 0.12-0.118-0.02-0.631-0.32-1.139zm11.78 0.938c0.14-0.229-0.19-0.796-0.73-1.261-0.92-0.793-0.99-0.788-0.99 0.079 0 1.402 1.11 2.166 1.72 1.182zm-9.51-2.485c-0.17-0.168-0.29 0.131-0.27 0.665 0.03 0.59 0.15 0.71 0.31 0.306 0.15-0.366 0.13-0.803-0.04-0.971zm10.8-1.439c-0.64-0.676-1.61-1.23-2.17-1.23-1.1 0-2.86 1.357-2.86 2.201 0 0.288 0.28 0.168 0.63-0.267 1.43-1.782 4.88-1.084 4.98 1.006 0.03 0.583 0.12 0.644 0.31 0.189 0.14-0.368-0.26-1.223-0.89-1.899zm-12.94-0.217c0.34 0 0.94 0.285 1.33 0.633 0.6 0.538 0.61 0.501 0.04-0.253-0.37-0.488-1.06-0.886-1.52-0.886-0.91 0-2.07 0.928-2.07 1.656 0 0.243 0.36 0.083 0.8-0.354 0.44-0.438 1.07-0.796 1.42-0.796z" transform="translate(10 845.31)" stroke="#000" stroke-width=".375" fill="none"/>
+ <circle cy="0" cx="0" r="2" transform="translate(15 967.93)"/>
+ <rect id="d0e96" display="none" height="1e3px" width="258" y="961.93" x="20"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e96"/>
</flowRegion>
<flowDiv xml:space="preserve">Quantification des couleurs</flowDiv>
</flowRoot>
- <rect id="d0e100" display="none" height="1e3px" width="288" y="989.29" x="10"/>
+ <rect id="d0e100" display="none" height="1e3px" width="288" y="979.29" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e100"/>
</flowRegion>
<flowDiv xml:space="preserve">Le résultat de ce filtre produira une image intermédiaire très différente de celle produite avec les deux autres, mais pouvant être aussi très utile. Au lieu de chercher les isoclines de contraste ou de luminosité, il cherche les limites des changements de couleur, même à contraste ou luminosité constants. Le réglage ici, nombre de couleurs, permet de déterminer le nombre de couleurs que l&apos;image intermédiaire devrait avoir si elle était en couleurs. Il exécute ensuite la détermination blanc/noir d&apos;après l&apos;indice pair ou impair des couleurs.</flowDiv>
</flowRoot>
- <text id="tracing-f04-fr.svgtext4626" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 1098.9)" xml:space="preserve" line-height="100.00000%" font-size="6" y="97.153664" x="69.581543" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f04-fr.svgtspan4627" y="97.153664" x="69.581543" sodipodi:role="line">Image originale</tspan></text>
- <text id="tracing-f04-fr.svgtext4629" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 1098.9)" xml:space="preserve" line-height="100.00000%" font-size="6" y="97.37867" x="156.37865" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f04-fr.svgtspan5892" sodipodi:role="line" y="97.378670" x="156.37865">Quantification (12 coul.)</tspan><tspan id="tracing-f04-fr.svgtspan5894" sodipodi:role="line" y="103.37867" x="156.37865">Rempli, sans contour</tspan></text>
- <text id="tracing-f04-fr.svgtext4634" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 1098.9)" xml:space="preserve" line-height="100.00000%" font-size="6" y="97.37867" x="245.12865" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f04-fr.svgtspan5896" sodipodi:role="line" y="97.378670" x="245.12865">Quantification (12 coul.)</tspan><tspan id="tracing-f04-fr.svgtspan5898" sodipodi:role="line" y="103.37867" x="245.12865">Contour, non rempli</tspan></text>
- <image id="tracing-f04-fr.svgimage4639" sodipodi:absref="/tux.png" xlink:href="tux.png" transform="translate(10 1098.9)" height="91.143" width="76.965" y="-.000097656" x="31.099"/>
- <path id="tracing-f04-fr.svgpath5261" d="m138.36 88.785c-1.07-0.444-1.75-1.018-1.57-1.318 0.19-0.298 0.09-0.383-0.22-0.193-0.3 0.187-3.07-0.348-6.16-1.187-3.09-0.84-5.78-1.541-5.99-1.559-0.2-0.018 0.13-0.231 0.73-0.474 1.22-0.493 6.35 0.11 10.85 1.278 4.27 1.106 5.77 0.967 7.64-0.707 1.4-1.253 1.64-1.817 1.71-4.064 0.05-1.435-0.11-2.731-0.35-2.88-0.24-0.148-0.44 0.752-0.44 2 0 3.33-1.84 5.385-4.82 5.385-1.21 0-2.83-0.239-3.6-0.532s-4.03-0.982-7.24-1.531c-6.88-1.176-7.55-1.616-6.71-4.429 0.74-2.453 0.78-4.821 0.08-4.389-0.28 0.175-0.4 0.504-0.26 0.731 0.27 0.429-0.44 3.028-1.34 4.894-0.81 1.698-0.3 2.834 1.61 3.57 1.61 0.619 1.63 0.655 0.26 0.384-2.93-0.576-3.39-1.811-2.04-5.533 0.51-1.439 0.64-3.143 0.43-5.883-0.27-3.484-0.2-3.961 0.78-4.937 0.76-0.759 1.72-1.082 3.23-1.087 2.41-0.009 2.87-0.23 4.06-1.97 0.62-0.92 0.7-1.459 0.3-2.205-0.76-1.426-0.09-4.225 1.86-7.717 0.93-1.671 2.26-4.797 2.96-6.946 1.58-4.862 1.98-5.607 4.64-8.751 1.17-1.392 2.83-3.637 3.69-4.987l1.54-2.456-0.3-9.799c-0.34-11.096 0.02-12.896 3.25-16.478 2.41-2.6629 5.35-3.6959 9.64-3.3863 5.48 0.3948 9.5 2.8938 12.15 7.5492 1.39 2.4461 1.65 3.8181 2.1 11.044 0.37 5.991 0.44 6.24 2.8 10.902 1.33 2.625 3.54 6.057 4.91 7.627 2.86 3.269 4.15 5.594 5.85 10.589 1.45 4.266 1.94 9.256 1.25 12.687-0.4 2-0.35 2.768 0.22 3.654 0.4 0.617 0.73 1.707 0.73 2.423 0 1.806 1.28 3.588 3.87 5.369 3.67 2.527 3.07 4.2-2.66 7.392-2.33 1.299-5.27 3.359-6.52 4.579-1.26 1.219-2.5 2.085-2.76 1.924s-0.63-0.026-0.84 0.3c-0.23 0.37-0.14 0.457 0.22 0.232 0.32-0.199 0.59-0.24 0.59-0.092 0 0.624-3.12 1.816-4.76 1.816-2.14 0-4.52-0.842-4.14-1.461 0.15-0.248-0.12-0.419-0.6-0.381-0.52 0.04-0.89-0.286-0.89-0.781 0-0.468-0.21-1.037-0.46-1.266-0.26-0.241-0.29-0.128-0.06 0.268 0.32 0.549 0.19 0.574-0.65 0.127-0.63-0.341-4.31-0.557-9.48-0.557h-8.44l-1.9 1.504c-3.36 2.662-5.46 3.072-8.75 1.708zm4.05-0.017c-0.49-0.127-1.29-0.127-1.77 0-0.49 0.128-0.09 0.232 0.88 0.232 0.98 0 1.38-0.104 0.89-0.232zm32.15-0.008c-0.62-0.121-1.65-0.121-2.28 0-0.62 0.12-0.11 0.219 1.14 0.219 1.26 0 1.77-0.099 1.14-0.219zm-26.77-2.829c0.16 0.161 0.44-0.081 0.61-0.539 0.28-0.728 1.42-0.832 9.13-0.832 4.84 0 8.8 0.204 8.8 0.453s0.52 0.42 1.14 0.38c1.11-0.071 1.14-0.249 1.2-5.517 0.03-2.994-0.11-5.443-0.32-5.443-0.2 0-0.65 0.339-1 0.754-0.34 0.415-0.8 0.645-1.02 0.511-0.21-0.134-0.77 0.331-1.23 1.034s-1.05 1.143-1.32 0.979c-0.27-0.165-0.48-0.045-0.48 0.267 0 0.311-0.21 0.44-0.46 0.285-0.25-0.154-0.59 0.075-0.75 0.509-0.17 0.434-0.54 0.647-0.82 0.474-0.28-0.174-0.51-0.05-0.51 0.275s-0.34 0.459-0.76 0.299c-0.41-0.16-0.76-0.056-0.76 0.233 0 0.294-0.44 0.383-1.01 0.203-0.55-0.177-1.01-0.135-1.01 0.092 0 0.228-1.82 0.414-4.05 0.414s-4.05-0.163-4.05-0.364c0-0.2-0.38-0.218-0.84-0.04-0.61 0.232-0.73 0.138-0.44-0.335 0.27-0.442 0.18-0.58-0.3-0.419-0.4 0.137-0.71 0.966-0.73 1.964-0.06 2.93-0.18 3.32-1.51 4.646-0.91 0.907-1.09 1.362-0.63 1.541 0.36 0.14 1.14-0.279 1.74-0.932 0.6-0.652 1.22-1.054 1.38-0.892zm-2.22 0.908c0.35-0.418 0.75-0.76 0.89-0.76s-0.03 0.342-0.38 0.76c-0.35 0.417-0.74 0.759-0.88 0.759s0.03-0.342 0.37-0.759zm32.33-1.276c1.22-0.549 2.38-0.894 2.59-0.766 0.2 0.128 1.02-0.442 1.81-1.268 1.8-1.881 1.46-1.879-2.29 0.018-3.42 1.722-6.55 1.994-7.86 0.681-1.4-1.399-1.77-3.065-1.77-8.026 0-2.641-0.22-4.887-0.51-5.062-0.76-0.472-1.21 1.173-0.54 1.98 0.36 0.435 0.55 2.432 0.48 5.273-0.08 3.597 0.09 4.856 0.77 5.903 1.58 2.406 3.92 2.812 7.32 1.267zm-18.94-6.314c1.09-0.391 2.21-0.573 2.48-0.406s0.34 0.057 0.15-0.245c-0.34-0.554 1.52-1.45 2.47-1.185 0.27 0.078 0.33-0.027 0.13-0.234-0.33-0.322 1.41-1.937 2.14-2.001 0.62-0.053 2.54-1.54 2.54-1.968 0-0.26-0.62 0.08-1.38 0.755s-1.05 0.805-0.66 0.289c0.4-0.516 0.9-2.112 1.12-3.545 1.01-6.849 1.12-7.11 3.19-7.494 1.13-0.21 1.62-1.824 1.72-5.648 0.03-1.481 0.25-2.313 0.56-2.122 0.63 0.386 0.68 4.81 0.06 4.81-0.25 0-0.34 1.538-0.21 3.418 0.21 2.857 0.46 3.613 1.55 4.608 1.1 0.998 1.64 1.137 3.37 0.86 1.2-0.191 2.65-0.891 3.46-1.665 0.77-0.734 1.39-1.103 1.39-0.821 0 0.775-2.09 2.578-3.7 3.187-3.24 1.227-5.69 0.075-6.41-3.016l-0.42-1.76-0.05 1.932c-0.07 2.597 0.61 3.697 2.72 4.393 2.04 0.673 3.45 0.355 5.58-1.262 1.46-1.096 4.07-4.841 2.86-4.096-0.73 0.45-0.73 0.167 0-1.434 0.32-0.701 0.78-1.156 1.01-1.011 0.23 0.144 0.28-0.433 0.11-1.282-0.17-0.85-0.1-1.544 0.14-1.544s0.44-1.254 0.44-2.785c0-1.532-0.2-2.785-0.44-2.785s-0.31-0.684-0.14-1.519c0.19-0.939 0.09-1.519-0.24-1.519-0.31 0-0.42-0.342-0.26-0.76s0.05-0.759-0.25-0.759-0.42-0.342-0.26-0.76 0.05-0.759-0.25-0.759-0.41-0.342-0.25-0.76 0.04-0.76-0.26-0.76-0.41-0.341-0.25-0.759 0.06-0.76-0.23-0.76c-0.28 0-0.38-0.227-0.21-0.506 0.18-0.278 0.06-0.506-0.25-0.506s-0.42-0.228-0.25-0.507c0.17-0.278 0.06-0.506-0.26-0.506-0.31 0-0.42-0.228-0.25-0.506 0.17-0.279 0.06-0.507-0.25-0.507s-0.43-0.229-0.25-0.51c0.17-0.28-0.04-0.646-0.48-0.812-0.43-0.167-0.67-0.484-0.54-0.705 0.14-0.221-0.6-1.154-1.65-2.073-1.04-0.919-1.83-1.859-1.76-2.09s-0.21-0.552-0.63-0.713c-0.42-0.16-0.64-0.496-0.48-0.745 0.15-0.249 0.02-0.453-0.29-0.453s-0.42-0.23-0.25-0.51c0.17-0.281-0.04-0.646-0.47-0.813-0.44-0.166-0.67-0.507-0.51-0.756 0.15-0.249 0.02-0.453-0.29-0.453s-0.42-0.228-0.25-0.506c0.17-0.279 0.06-0.507-0.25-0.507s-0.43-0.228-0.26-0.506c0.18-0.279 0.06-0.507-0.25-0.507s-0.43-0.227-0.25-0.506c0.17-0.278 0.06-0.506-0.26-0.506-0.31 0-0.42-0.228-0.25-0.506 0.17-0.279 0.05-0.507-0.28-0.507-0.32 0-0.46-0.342-0.3-0.759 0.16-0.418 0.05-0.76-0.25-0.76s-0.41-0.342-0.25-0.759c0.16-0.418 0.05-0.76-0.25-0.76-0.36 0-0.48-1.47-0.37-4.304 0.1-2.367-0.02-4.304-0.26-4.304-0.25 0-0.33-0.911-0.18-2.025 0.16-1.161 0.06-2.026-0.22-2.026-0.27 0-0.35-0.457-0.17-1.015 0.21-0.674 0.06-1.117-0.47-1.319-0.44-0.167-0.67-0.5076-0.51-0.7569 0.15-0.2493 0.02-0.4533-0.29-0.4533s-0.42-0.2278-0.25-0.5063 0.06-0.5064-0.25-0.5064-0.45-0.193-0.3-0.4289c0.34-0.557-2.45-3.2379-2.9-2.7851-0.19 0.1896-0.35 0.0654-0.35-0.2759 0-0.3414-0.23-0.4798-0.5-0.3077-0.28 0.1721-0.51 0.0582-0.51-0.2532s-0.23-0.4253-0.51-0.2532-0.5 0.0582-0.5-0.2531c0-0.3114-0.23-0.4253-0.51-0.2532s-0.51 0.0563-0.51-0.2574c0-0.34-0.41-0.4405-1.01-0.249-0.56 0.1768-1.01 0.1352-1.01-0.0924 0-0.2277-1.48-0.4139-3.29-0.4139s-3.29 0.1952-3.29 0.4339-0.35 0.3028-0.76 0.1425c-0.42-0.1603-0.76-0.0573-0.76 0.2289s-0.23 0.3795-0.51 0.2074-0.51-0.0582-0.51 0.2532c0 0.3113-0.19 0.4468-0.42 0.301-0.56-0.3443-3.24 2.4459-2.79 2.8988 0.19 0.1895 0.07 0.3446-0.28 0.3446-0.34 0-0.48 0.2279-0.3 0.5064 0.17 0.2785 0.05 0.5063-0.26 0.5063s-0.42 0.2279-0.25 0.5064 0.08 0.5063-0.21 0.5063c-0.28 0-0.39 0.3418-0.23 0.7595s0.1 0.7597-0.14 0.7597-0.43 3.418-0.43 7.595c0 4.178 0.13 7.595 0.3 7.595s0.34 1.254 0.39 2.785c0.06 1.72-0.12 2.785-0.46 2.785-0.3 0-0.4 0.228-0.23 0.507 0.17 0.278 0.06 0.506-0.26 0.506-0.31 0-0.44 0.204-0.28 0.453 0.15 0.249-0.08 0.59-0.51 0.756-0.43 0.167-0.66 0.508-0.51 0.76 0.16 0.251-0.07 0.593-0.5 0.759-0.44 0.167-0.67 0.507-0.51 0.757 0.15 0.25-0.29 0.832-1 1.292-0.7 0.461-1.16 1.019-1.03 1.241 0.14 0.222-0.43 0.907-1.26 1.522-0.83 0.616-1.38 1.335-1.22 1.6 0.17 0.264 0.05 0.481-0.26 0.481-0.32 0-0.43 0.227-0.26 0.506 0.17 0.278 0.06 0.506-0.25 0.506s-0.43 0.228-0.25 0.507c0.17 0.278 0.07 0.506-0.21 0.506-0.29 0-0.39 0.342-0.23 0.76 0.16 0.417 0.02 0.759-0.3 0.759-0.37 0-0.47 0.393-0.28 1.013 0.18 0.568 0.09 1.012-0.2 1.012s-0.39 0.342-0.23 0.76 0.02 0.76-0.3 0.76c-0.33 0-0.45 0.227-0.28 0.506 0.17 0.278 0.08 0.506-0.21 0.506-0.28 0-0.39 0.342-0.23 0.76s0.03 0.759-0.29 0.759c-0.33 0-0.45 0.228-0.28 0.507 0.17 0.278 0.06 0.506-0.26 0.506-0.31 0-0.42 0.228-0.25 0.506 0.17 0.279 0.06 0.507-0.25 0.507s-0.44 0.204-0.29 0.453c0.16 0.249-0.07 0.589-0.51 0.756-0.43 0.166-0.64 0.532-0.47 0.812 0.17 0.281 0.06 0.51-0.25 0.51s-0.43 0.228-0.25 0.507c0.17 0.278 0.05 0.506-0.26 0.506-0.34 0-0.44 0.409-0.25 1.013 0.18 0.557 0.09 1.012-0.19 1.012-0.64 0-0.54 2.161 0.12 2.614 0.27 0.184 1.21 0.216 2.1 0.073 1.3-0.212 1.97 0.05 3.46 1.363 1.02 0.894 1.85 1.876 1.85 2.182s-0.87-0.29-1.93-1.326c-1.6-1.562-2.23-1.859-3.74-1.748-1.01 0.074-1.72 0.297-1.6 0.497s0.91 0.225 1.76 0.057c1.28-0.258 1.83-0.016 3.39 1.514 1.03 1.002 2.1 1.831 2.38 1.843 0.27 0.011 0.59 0.28 0.69 0.597 0.12 0.356-0.05 0.423-0.45 0.175-0.43-0.265-0.53-0.201-0.29 0.191 0.2 0.326 0.56 0.475 0.79 0.331 0.23-0.143 1.02 0.748 1.74 1.981 1.46 2.499 1.61 3.054 0.68 2.517-0.37-0.211-0.46-0.171-0.21 0.097 0.23 0.253 0.67 0.461 0.97 0.461s0.65 0.316 0.78 0.703c0.16 0.469 0.02 0.57-0.41 0.302-0.44-0.272-0.53-0.201-0.27 0.216 0.21 0.34 0.51 0.487 0.67 0.327s0.86 0.223 1.55 0.852 1.08 0.83 0.86 0.446c-0.28-0.47-0.19-0.626 0.26-0.475 0.37 0.123 1.09-0.189 1.59-0.694 1.01-1.006 1.23-2.437 0.38-2.437-0.29 0-0.41-0.197-0.26-0.438 0.32-0.527-1.43-2.225-1.86-1.797-0.16 0.164-0.68-0.29-1.15-1.008s-1.05-1.186-1.29-1.04c-0.23 0.146-0.8-0.31-1.26-1.013s-1.01-1.174-1.21-1.047c-0.21 0.127-1-0.414-1.75-1.202-1.2-1.253-1.39-1.888-1.49-5.081-0.06-2.007 0.08-3.77 0.32-3.917 0.24-0.148 0.31-0.588 0.16-0.977-0.15-0.39-0.03-0.708 0.27-0.708s0.42-0.342 0.26-0.76c-0.17-0.418-0.08-0.759 0.18-0.759s0.34-0.342 0.18-0.76-0.02-0.759 0.3-0.759c0.33 0 0.45-0.228 0.28-0.507-0.17-0.278-0.06-0.506 0.25-0.506s0.43-0.228 0.25-0.506c-0.17-0.279-0.05-0.507 0.26-0.507s0.42-0.228 0.25-0.506c-0.17-0.279-0.06-0.507 0.25-0.507 0.32 0 0.43-0.227 0.26-0.506-0.18-0.278-0.06-0.506 0.25-0.506s0.42-0.23 0.25-0.51c-0.17-0.281 0.04-0.646 0.47-0.813 0.44-0.166 0.67-0.506 0.51-0.756-0.15-0.249-0.06-0.453 0.21-0.453s0.38-0.513 0.24-1.139c-0.21-0.947-0.15-1.011 0.34-0.38 0.48 0.605 0.54 0.375 0.33-1.139-0.15-1.1-0.05-1.899 0.24-1.899 0.28 0 0.37-0.228 0.19-0.507-0.17-0.278-0.05-0.506 0.26-0.506s0.42-0.228 0.25-0.506c-0.17-0.279-0.06-0.507 0.25-0.507 0.32 0 0.43-0.227 0.26-0.506-0.17-0.278-0.06-0.506 0.25-0.506s0.43-0.23 0.25-0.51c-0.17-0.281 0.04-0.646 0.48-0.813 0.43-0.166 0.66-0.506 0.5-0.756-0.15-0.249-0.02-0.453 0.29-0.453s0.43-0.228 0.25-0.506c-0.17-0.279-0.07-0.507 0.23-0.507 0.59 0 0.45-3.696-0.2-5.184-0.21-0.483-0.14-1.566 0.15-2.405 0.3-0.875 0.33-1.525 0.07-1.525s-0.32-0.379-0.15-0.843c0.2-0.503 0.12-0.715-0.18-0.527-0.7 0.432-0.51-5.463 0.21-6.322 1.08-1.307 5.74-0.198 4.9 1.167-0.15 0.247-0.02 0.449 0.29 0.449s0.53 0.398 0.48 0.886c-0.18 1.802 0.06 2.152 1.49 2.152 1.59 0 2.17-0.823 1.73-2.483-0.16-0.633-0.03-1.062 0.32-1.062 0.33 0 0.46-0.224 0.29-0.498-0.4-0.639 2.71-2.551 4.04-2.487 0.85 0.04 0.81 0.119-0.25 0.48-1.22 0.416-1.21 0.428 0.25 0.348 1.73-0.095 2.95 0.478 2.51 1.18-0.16 0.259-0.03 0.471 0.28 0.471s0.42 0.228 0.25 0.506c-0.17 0.279-0.08 0.507 0.21 0.507s0.39 0.342 0.23 0.759c-0.16 0.418-0.04 0.76 0.27 0.76s0.56 0.569 0.56 1.266c0 0.696-0.25 1.266-0.56 1.266s-0.43 0.341-0.27 0.759 0.06 0.76-0.22 0.76c-0.33 0-0.32 0.351 0.03 1.003 0.3 0.552 0.53 1.862 0.52 2.912-0.04 2.879 0.16 4.186 0.64 4.186 0.23 0 0.28 0.228 0.11 0.507-0.17 0.278-0.06 0.506 0.25 0.506 0.32 0 0.43 0.228 0.26 0.506-0.17 0.279-0.06 0.507 0.25 0.507s0.44 0.204 0.29 0.453c-0.16 0.249 0.08 0.593 0.53 0.764 0.46 0.177 0.68 0.635 0.52 1.066-0.16 0.415-0.06 0.755 0.23 0.755 0.28 0 0.38 0.228 0.2 0.506-0.17 0.279-0.05 0.506 0.26 0.506 0.34 0 0.44 0.41 0.25 1.013-0.2 0.624-0.09 1.013 0.28 1.013 0.35 0 0.49 0.421 0.33 1.013-0.14 0.556-0.02 1.012 0.28 1.012s0.39 0.151 0.21 0.335c-0.18 0.183 0.12 0.655 0.68 1.047s0.89 0.925 0.73 1.185c-0.16 0.259-0.04 0.471 0.27 0.471 0.32 0 0.43 0.228 0.26 0.507-0.17 0.278-0.06 0.506 0.25 0.506s0.43 0.228 0.25 0.506c-0.17 0.279-0.05 0.507 0.26 0.507s0.42 0.228 0.25 0.506c-0.17 0.279-0.08 0.506 0.21 0.506 0.28 0 0.37 0.38 0.19 0.843-0.23 0.61-0.13 0.729 0.35 0.431 0.51-0.316 0.59-0.109 0.34 0.888-0.19 0.765-0.1 1.374 0.22 1.482 0.37 0.125 0.4 0.745 0.09 1.941l-0.46 1.757-0.33-2.73c-0.32-2.716-2.19-6.982-3.89-8.916-0.49-0.556-1.04-1.998-1.22-3.203-0.39-2.533-2.78-7.52-4.24-8.843-0.97-0.876-1.06-0.866-2.46 0.286-2.49 2.042-6.25 4.394-7.53 4.715-1.23 0.31-3.35-1.229-3.88-2.822-0.44-1.315-1.86-0.077-3.72 3.248-1.48 2.654-1.79 3.633-1.51 4.884 0.26 1.175 0.1 1.839-0.64 2.663-3.09 3.464-5.7 10.213-5.7 14.751v3.25l3.15 2.688c8.04 6.866 8.68 7.985 5.95 10.475l-1.53 1.399 1.04 0.94c0.8 0.726 0.89 1.042 0.39 1.39-0.43 0.304-0.31 0.361 0.37 0.175 0.56-0.151 1.35-0.056 1.77 0.212 1.14 0.729 8.07 0.56 10.35-0.251zm-22.93-18.487c0-0.697 0.12-0.982 0.26-0.633 0.14 0.348 0.14 0.917 0 1.265-0.14 0.349-0.26 0.064-0.26-0.632zm31.33-30.348c-0.72-1.358-0.66-1.552 0.48-1.552 1.01 0 2.26 1.634 1.68 2.212-0.62 0.62-1.64 0.308-2.16-0.66zm1.51-0.004c0-0.262-0.23-0.617-0.51-0.789s-0.51 0.042-0.51 0.477c0 0.434 0.23 0.789 0.51 0.789s0.51-0.215 0.51-0.477zm-8.11-22.562c0-0.9044 0.28-1.2658 0.96-1.2658 1.35 0 1.75 1.3911 0.58 2.0176-1.38 0.7375-1.54 0.6613-1.54-0.7518zm-16.2 68.942c0-0.096-0.51-0.609-1.14-1.139l-1.14-0.965 0.97 1.14c0.9 1.07 1.31 1.369 1.31 0.964zm-22.18-8.925c-0.33-0.501-1.1 1.312-1.1 2.602-0.02 2.91 0.75 3.231 1 0.422 0.14-1.532 0.19-2.893 0.1-3.024zm17.12 1.505c-0.3-0.558-0.66-1.013-0.8-1.013s-0.01 0.455 0.29 1.013c0.3 0.556 0.66 1.012 0.8 1.012s0.01-0.456-0.29-1.012zm-12.41-2.026c0.17-0.278 0.09-0.506-0.19-0.506s-0.65 0.228-0.82 0.506c-0.17 0.279-0.09 0.506 0.19 0.506s0.65-0.227 0.82-0.506zm35.71-39.859c0.41-1.193 0.41-1.872 0-2.532-0.5-0.79-0.53-0.761-0.25 0.237 0.21 0.79 0.09 1.14-0.41 1.14-0.39 0-2.14 0.714-3.89 1.588-4.41 2.207-7 2.438-8.9 0.797l-1.48-1.27 0.87-1.827c0.48-1.005 1.61-2.28 2.52-2.834s1.35-1.008 0.98-1.01c-0.38-0.001-1.26 0.454-1.97 1.011s-1.6 1.013-1.98 1.013-0.69 0.285-0.7 0.633c0 0.348-0.14 1.132-0.3 1.741-0.23 0.858 0.23 1.626 2.05 3.392 2.09 2.035 2.64 2.301 4.99 2.436 3.46 0.2 7.62-2.015 8.47-4.515zm-1.83-4.518c0.24-0.622 0.16-0.703-0.32-0.321-0.36 0.28-0.99 0.636-1.41 0.791-0.51 0.192-0.41 0.294 0.33 0.321 0.6 0.022 1.23-0.334 1.4-0.791zm-10.84-1.449c0-0.463 0.32-0.623 0.89-0.441 0.72 0.232 0.75 0.189 0.15-0.236-0.41-0.286-0.87-0.437-1.04-0.334s-0.61-0.311-0.99-0.919c-0.65-1.049-0.64-1.067 0.28-0.347 0.88 0.693 0.91 0.686 0.31-0.079-1.06-1.355-2.4-0.828-2.27 0.888 0.1 1.25 0.05 1.318-0.34 0.457-0.32-0.711-0.47-0.782-0.5-0.24-0.02 0.426 0.32 1.281 0.76 1.901 0.63 0.91 0.97 1.026 1.77 0.601 0.54-0.289 0.98-0.852 0.98-1.251zm7.6 1.014c-0.75-0.894 0.03-1.033 0.9-0.162 0.95 0.95 2.94-0.356 2.87-1.886-0.03-0.68-0.24-1.408-0.48-1.619-0.23-0.211-0.22-0.042 0.01 0.376 0.37 0.653 0.32 0.663-0.42 0.069-0.46-0.38-0.72-0.892-0.57-1.139s0.02-0.449-0.29-0.449c-0.78 0-2.05 1.319-1.66 1.712 0.17 0.172 0.05 0.313-0.28 0.313-0.32 0-0.59 0.456-0.59 1.013 0 0.828-0.34 1.013-1.86 1.013-1.02 0-1.7 0.148-1.52 0.33s1.01 0.311 1.84 0.287c0.84-0.023 1.65 0.17 1.81 0.429 0.16 0.26 0.42 0.473 0.58 0.473s0-0.342-0.34-0.76zm5.37-2.721c-0.34-2.201-1.64-3.608-3.31-3.608-1.81 0-3.59 1.338-3.56 2.687 0.01 1.062 0.06 1.05 1.15-0.282 2.29-2.789 5.26-1.053 4.75 2.773-0.26 2.009-0.23 2.092 0.48 1.151 0.49-0.651 0.66-1.623 0.49-2.721zm-12.2-2.097c-0.04-0.562-0.38-1.302-0.75-1.646-0.54-0.5-0.6-0.488-0.28 0.062 0.29 0.517 0.13 0.606-0.65 0.36-0.56-0.181-1.18-0.091-1.36 0.198-0.17 0.29 0.01 0.527 0.41 0.527s1.01 0.342 1.35 0.76c0.88 1.05 1.37 0.949 1.28-0.261z" transform="translate(10 1098.9)"/>
- <path id="tracing-f04-fr.svgpath5262" d="m227.11 88.785c-1.07-0.443-1.75-1.018-1.57-1.318 0.19-0.298 0.09-0.382-0.22-0.192-0.3 0.186-3.07-0.348-6.16-1.188s-5.78-1.541-5.99-1.559c-0.2-0.017 0.13-0.231 0.73-0.474 1.22-0.493 6.35 0.111 10.85 1.278 4.27 1.106 5.77 0.968 7.64-0.707 1.4-1.252 1.64-1.817 1.71-4.064 0.05-1.435-0.11-2.731-0.35-2.879-0.24-0.149-0.44 0.751-0.44 1.999 0 3.33-1.84 5.386-4.82 5.386-1.21 0-2.83-0.24-3.6-0.532-0.77-0.293-4.03-0.982-7.24-1.531-6.88-1.176-7.55-1.617-6.71-4.43 0.74-2.453 0.78-4.82 0.08-4.389-0.28 0.175-0.4 0.504-0.26 0.732 0.27 0.428-0.44 3.028-1.34 4.893-0.81 1.698-0.3 2.834 1.61 3.571 1.61 0.618 1.63 0.654 0.26 0.384-2.93-0.577-3.39-1.811-2.04-5.534 0.51-1.439 0.64-3.142 0.43-5.882-0.27-3.484-0.2-3.962 0.78-4.937 0.76-0.76 1.72-1.082 3.23-1.088 2.41-0.009 2.87-0.229 4.06-1.969 0.62-0.92 0.7-1.459 0.3-2.206-0.76-1.426-0.09-4.224 1.86-7.716 0.93-1.671 2.26-4.797 2.96-6.947 1.58-4.862 1.98-5.607 4.64-8.75 1.17-1.393 2.83-3.637 3.69-4.988l1.54-2.455-0.3-9.799c-0.34-11.096 0.02-12.897 3.25-16.479 2.41-2.6625 5.35-3.6955 9.64-3.3859 5.48 0.3948 9.5 2.8938 12.15 7.5492 1.39 2.4457 1.65 3.8187 2.1 11.044 0.37 5.991 0.44 6.24 2.8 10.903 1.33 2.624 3.54 6.056 4.91 7.626 2.86 3.269 4.15 5.595 5.85 10.589 1.45 4.266 1.94 9.256 1.25 12.688-0.4 1.999-0.35 2.768 0.22 3.653 0.4 0.617 0.73 1.707 0.73 2.423 0 1.806 1.28 3.589 3.87 5.37 3.67 2.526 3.07 4.2-2.66 7.391-2.33 1.299-5.27 3.359-6.52 4.579-1.26 1.22-2.5 2.086-2.76 1.924-0.26-0.161-0.63-0.026-0.84 0.3-0.23 0.371-0.14 0.458 0.22 0.232 0.32-0.199 0.59-0.24 0.59-0.091 0 0.623-3.12 1.815-4.76 1.815-2.14 0-4.52-0.842-4.14-1.461 0.15-0.248-0.12-0.419-0.6-0.381-0.52 0.041-0.89-0.286-0.89-0.781 0-0.467-0.21-1.037-0.46-1.265-0.26-0.241-0.29-0.128-0.06 0.267 0.32 0.549 0.19 0.574-0.65 0.127-0.63-0.341-4.31-0.557-9.48-0.557h-8.44l-1.9 1.504c-3.36 2.662-5.46 3.073-8.75 1.708zm4.05-0.016c-0.49-0.128-1.29-0.128-1.77 0-0.49 0.127-0.09 0.231 0.88 0.231 0.98 0 1.38-0.104 0.89-0.231zm32.15-0.009c-0.62-0.12-1.65-0.12-2.28 0-0.62 0.121-0.11 0.22 1.14 0.22 1.26 0 1.77-0.099 1.14-0.22zm-26.77-2.829c0.16 0.161 0.44-0.081 0.61-0.539 0.28-0.727 1.42-0.832 9.13-0.832 4.84 0 8.8 0.204 8.8 0.453s0.52 0.42 1.14 0.38c1.11-0.071 1.14-0.249 1.2-5.516 0.03-2.994-0.11-5.444-0.32-5.444-0.2 0-0.65 0.34-1 0.754-0.34 0.415-0.8 0.645-1.02 0.511-0.21-0.134-0.77 0.332-1.23 1.034-0.46 0.703-1.05 1.144-1.32 0.979s-0.48-0.045-0.48 0.267c0 0.311-0.21 0.44-0.46 0.286s-0.59 0.075-0.75 0.508c-0.17 0.434-0.54 0.647-0.82 0.474s-0.51-0.05-0.51 0.275-0.34 0.459-0.76 0.299c-0.41-0.16-0.76-0.055-0.76 0.233 0 0.295-0.44 0.384-1.01 0.203-0.55-0.176-1.01-0.135-1.01 0.093s-1.82 0.414-4.05 0.414-4.05-0.164-4.05-0.364-0.38-0.218-0.84-0.041c-0.61 0.233-0.73 0.138-0.44-0.334 0.27-0.443 0.18-0.58-0.3-0.42-0.4 0.138-0.71 0.967-0.73 1.964-0.06 2.931-0.18 3.321-1.51 4.647-0.91 0.906-1.09 1.361-0.63 1.54 0.36 0.14 1.14-0.279 1.74-0.931s1.22-1.054 1.38-0.893zm-2.22 0.908c0.35-0.418 0.75-0.759 0.89-0.759s-0.03 0.341-0.38 0.759-0.74 0.759-0.88 0.759 0.03-0.341 0.37-0.759zm32.33-1.275c1.22-0.55 2.38-0.895 2.59-0.767 0.2 0.129 1.02-0.442 1.81-1.267 1.8-1.882 1.46-1.879-2.29 0.018-3.42 1.722-6.55 1.993-7.86 0.681-1.4-1.4-1.77-3.066-1.77-8.026 0-2.641-0.22-4.888-0.51-5.063-0.76-0.471-1.21 1.173-0.54 1.981 0.36 0.435 0.55 2.432 0.48 5.272-0.08 3.597 0.09 4.857 0.77 5.904 1.58 2.406 3.92 2.811 7.32 1.267zm-18.94-6.315c1.09-0.39 2.21-0.573 2.48-0.406s0.34 0.057 0.15-0.244c-0.34-0.554 1.52-1.451 2.47-1.186 0.27 0.079 0.33-0.027 0.13-0.234-0.33-0.322 1.41-1.937 2.14-2 0.62-0.054 2.54-1.541 2.54-1.968 0-0.26-0.62 0.079-1.38 0.754-0.76 0.676-1.05 0.805-0.66 0.289 0.4-0.516 0.9-2.111 1.12-3.544 1.01-6.85 1.12-7.111 3.19-7.495 1.13-0.21 1.62-1.824 1.72-5.648 0.03-1.481 0.25-2.312 0.56-2.122 0.63 0.387 0.68 4.811 0.06 4.811-0.25 0-0.34 1.538-0.21 3.418 0.21 2.857 0.46 3.612 1.55 4.607 1.1 0.999 1.64 1.137 3.37 0.86 1.2-0.191 2.65-0.89 3.46-1.664 0.77-0.734 1.39-1.104 1.39-0.822 0 0.775-2.09 2.578-3.7 3.187-3.24 1.227-5.69 0.076-6.41-3.016l-0.42-1.76-0.05 1.932c-0.07 2.598 0.61 3.697 2.72 4.393 2.04 0.673 3.45 0.355 5.58-1.261 1.46-1.097 4.07-4.841 2.86-4.096-0.73 0.45-0.73 0.166 0-1.435 0.32-0.7 0.78-1.155 1.01-1.011s0.28-0.432 0.11-1.282c-0.17-0.849-0.1-1.544 0.14-1.544s0.44-1.253 0.44-2.785-0.2-2.785-0.44-2.785-0.31-0.684-0.14-1.519c0.19-0.939 0.09-1.519-0.24-1.519-0.31 0-0.42-0.342-0.26-0.76 0.16-0.417 0.05-0.759-0.25-0.759s-0.42-0.342-0.26-0.76c0.16-0.417 0.05-0.759-0.25-0.759s-0.41-0.342-0.25-0.76c0.16-0.417 0.04-0.759-0.26-0.759s-0.41-0.342-0.25-0.76c0.16-0.417 0.06-0.759-0.23-0.759-0.28 0-0.38-0.228-0.21-0.507 0.18-0.278 0.06-0.506-0.25-0.506s-0.42-0.228-0.25-0.506c0.17-0.279 0.06-0.507-0.26-0.507-0.31 0-0.42-0.228-0.25-0.506s0.06-0.506-0.25-0.506-0.43-0.23-0.25-0.51c0.17-0.281-0.04-0.646-0.48-0.813-0.43-0.166-0.67-0.483-0.54-0.705 0.14-0.221-0.6-1.154-1.65-2.072-1.04-0.919-1.83-1.86-1.76-2.091s-0.21-0.551-0.63-0.712-0.64-0.496-0.48-0.746c0.15-0.249 0.02-0.453-0.29-0.453s-0.42-0.229-0.25-0.51c0.17-0.28-0.04-0.646-0.47-0.812-0.44-0.167-0.67-0.507-0.51-0.756 0.15-0.25 0.02-0.454-0.29-0.454s-0.42-0.228-0.25-0.506 0.06-0.506-0.25-0.506-0.43-0.228-0.26-0.507c0.18-0.278 0.06-0.506-0.25-0.506s-0.43-0.228-0.25-0.506c0.17-0.279 0.06-0.507-0.26-0.507-0.31 0-0.42-0.228-0.25-0.506 0.17-0.279 0.05-0.506-0.28-0.506-0.32 0-0.46-0.342-0.3-0.76s0.05-0.76-0.25-0.76-0.41-0.341-0.25-0.759 0.05-0.76-0.25-0.76c-0.36 0-0.48-1.47-0.37-4.304 0.1-2.367-0.02-4.304-0.26-4.304-0.25 0-0.33-0.911-0.18-2.025 0.16-1.16 0.06-2.025-0.22-2.025-0.27 0-0.35-0.457-0.17-1.015 0.21-0.674 0.06-1.118-0.47-1.32-0.44-0.166-0.67-0.5072-0.51-0.7565 0.15-0.2493 0.02-0.4533-0.29-0.4533s-0.42-0.2278-0.25-0.5063 0.06-0.5064-0.25-0.5064-0.45-0.193-0.3-0.4289c0.34-0.557-2.45-3.2379-2.9-2.7851-0.19 0.1896-0.35 0.0654-0.35-0.2759 0-0.3414-0.23-0.4798-0.5-0.3077-0.28 0.1721-0.51 0.0582-0.51-0.2532s-0.23-0.4253-0.51-0.2532-0.5 0.0582-0.5-0.2531c0-0.3114-0.23-0.4253-0.51-0.2532s-0.51 0.0563-0.51-0.2574c0-0.34-0.41-0.4405-1.01-0.249-0.56 0.1768-1.01 0.1352-1.01-0.0924 0-0.2277-1.48-0.4139-3.29-0.4139s-3.29 0.1952-3.29 0.4339-0.35 0.3028-0.76 0.1425c-0.42-0.1603-0.76-0.0573-0.76 0.2289s-0.23 0.3795-0.51 0.2074-0.51-0.0582-0.51 0.2532c0 0.3113-0.19 0.4468-0.42 0.301-0.56-0.3443-3.24 2.4459-2.79 2.8988 0.19 0.1895 0.07 0.3446-0.28 0.3446-0.34 0-0.48 0.2279-0.3 0.5064 0.17 0.2785 0.05 0.5063-0.26 0.5063s-0.42 0.2279-0.25 0.5064 0.08 0.5063-0.21 0.5063c-0.28 0-0.39 0.3418-0.23 0.7595 0.16 0.4183 0.1 0.7593-0.14 0.7593s-0.43 3.418-0.43 7.595c0 4.178 0.13 7.596 0.3 7.596s0.34 1.253 0.39 2.785c0.06 1.719-0.12 2.785-0.46 2.785-0.3 0-0.4 0.228-0.23 0.506s0.06 0.506-0.26 0.506c-0.31 0-0.44 0.204-0.28 0.454 0.15 0.249-0.08 0.589-0.51 0.756-0.43 0.166-0.66 0.508-0.51 0.759 0.16 0.251-0.07 0.593-0.5 0.76-0.44 0.166-0.67 0.507-0.51 0.757 0.15 0.25-0.29 0.831-1 1.292-0.7 0.46-1.16 1.018-1.03 1.24 0.14 0.222-0.43 0.907-1.26 1.523-0.83 0.615-1.38 1.335-1.22 1.599 0.17 0.265 0.05 0.481-0.26 0.481-0.32 0-0.43 0.228-0.26 0.506 0.17 0.279 0.06 0.507-0.25 0.507s-0.43 0.228-0.25 0.506c0.17 0.278 0.07 0.506-0.21 0.506-0.29 0-0.39 0.342-0.23 0.76s0.02 0.759-0.3 0.759c-0.37 0-0.47 0.393-0.28 1.013 0.18 0.568 0.09 1.013-0.2 1.013s-0.39 0.342-0.23 0.759c0.16 0.418 0.02 0.76-0.3 0.76-0.33 0-0.45 0.228-0.28 0.506 0.17 0.279 0.08 0.507-0.21 0.507-0.28 0-0.39 0.341-0.23 0.759s0.03 0.76-0.29 0.76c-0.33 0-0.45 0.228-0.28 0.506s0.06 0.506-0.26 0.506c-0.31 0-0.42 0.228-0.25 0.507 0.17 0.278 0.06 0.506-0.25 0.506s-0.44 0.204-0.29 0.453c0.16 0.25-0.07 0.59-0.51 0.756-0.43 0.167-0.64 0.532-0.47 0.813 0.17 0.28 0.06 0.51-0.25 0.51s-0.43 0.228-0.25 0.506c0.17 0.279 0.05 0.507-0.26 0.507-0.34 0-0.44 0.409-0.25 1.012 0.18 0.557 0.09 1.013-0.19 1.013-0.64 0-0.54 2.161 0.12 2.613 0.27 0.184 1.21 0.217 2.1 0.073 1.3-0.211 1.97 0.051 3.46 1.364 1.02 0.893 1.85 1.875 1.85 2.181s-0.87-0.29-1.93-1.325c-1.6-1.562-2.23-1.86-3.74-1.749-1.01 0.074-1.72 0.298-1.6 0.497 0.12 0.2 0.91 0.226 1.76 0.057 1.28-0.258 1.83-0.016 3.39 1.515 1.03 1.001 2.1 1.831 2.38 1.842 0.27 0.011 0.59 0.28 0.69 0.598 0.12 0.355-0.05 0.422-0.45 0.175-0.43-0.266-0.53-0.201-0.29 0.19 0.2 0.327 0.56 0.476 0.79 0.332s1.02 0.747 1.74 1.981c1.46 2.498 1.61 3.054 0.68 2.517-0.37-0.212-0.46-0.172-0.21 0.096 0.23 0.254 0.67 0.461 0.97 0.461s0.65 0.317 0.78 0.704c0.16 0.469 0.02 0.569-0.41 0.301-0.44-0.271-0.53-0.201-0.27 0.216 0.21 0.341 0.51 0.488 0.67 0.327 0.16-0.16 0.86 0.224 1.55 0.853s1.08 0.829 0.86 0.445c-0.28-0.47-0.19-0.625 0.26-0.475 0.37 0.124 1.09-0.189 1.59-0.694 1.01-1.006 1.23-2.436 0.38-2.436-0.29 0-0.41-0.198-0.26-0.439 0.32-0.526-1.43-2.224-1.86-1.797-0.16 0.164-0.68-0.289-1.15-1.007s-1.05-1.187-1.29-1.041c-0.23 0.146-0.8-0.31-1.26-1.012-0.46-0.703-1.01-1.174-1.21-1.047-0.21 0.127-1-0.414-1.75-1.202-1.2-1.254-1.39-1.889-1.49-5.082-0.06-2.007 0.08-3.769 0.32-3.917s0.31-0.587 0.16-0.977c-0.15-0.389-0.03-0.708 0.27-0.708s0.42-0.342 0.26-0.759c-0.17-0.418-0.08-0.76 0.18-0.76s0.34-0.342 0.18-0.76c-0.16-0.417-0.02-0.759 0.3-0.759 0.33 0 0.45-0.228 0.28-0.506-0.17-0.279-0.06-0.507 0.25-0.507s0.43-0.228 0.25-0.506c-0.17-0.279-0.05-0.506 0.26-0.506s0.42-0.228 0.25-0.507c-0.17-0.278-0.06-0.506 0.25-0.506 0.32 0 0.43-0.228 0.26-0.507-0.18-0.278-0.06-0.506 0.25-0.506s0.42-0.229 0.25-0.51c-0.17-0.28 0.04-0.646 0.47-0.812 0.44-0.167 0.67-0.507 0.51-0.756-0.15-0.25-0.06-0.454 0.21-0.454s0.38-0.512 0.24-1.139c-0.21-0.946-0.15-1.011 0.34-0.38 0.48 0.606 0.54 0.375 0.33-1.139-0.15-1.1-0.05-1.899 0.24-1.899 0.28 0 0.37-0.228 0.19-0.506-0.17-0.279-0.05-0.507 0.26-0.507s0.42-0.227 0.25-0.506c-0.17-0.278-0.06-0.506 0.25-0.506 0.32 0 0.43-0.228 0.26-0.506-0.17-0.279-0.06-0.507 0.25-0.507s0.43-0.229 0.25-0.51c-0.17-0.28 0.04-0.646 0.48-0.812 0.43-0.167 0.66-0.507 0.5-0.756-0.15-0.25-0.02-0.454 0.29-0.454s0.43-0.227 0.25-0.506c-0.17-0.279-0.07-0.506 0.23-0.506 0.59 0 0.45-3.696-0.2-5.184-0.21-0.484-0.14-1.566 0.15-2.405 0.3-0.875 0.33-1.526 0.07-1.526s-0.32-0.379-0.15-0.842c0.2-0.504 0.12-0.716-0.18-0.528-0.7 0.432-0.51-5.462 0.21-6.322 1.08-1.307 5.74-0.198 4.9 1.167-0.15 0.247-0.02 0.449 0.29 0.449s0.53 0.399 0.48 0.886c-0.18 1.802 0.06 2.152 1.49 2.152 1.59 0 2.17-0.822 1.73-2.483-0.16-0.633-0.03-1.061 0.32-1.061 0.33 0 0.46-0.224 0.29-0.499-0.4-0.639 2.71-2.551 4.04-2.487 0.85 0.041 0.81 0.119-0.25 0.48-1.22 0.416-1.21 0.428 0.25 0.348 1.73-0.095 2.95 0.479 2.51 1.18-0.16 0.259-0.03 0.472 0.28 0.472s0.42 0.227 0.25 0.506c-0.17 0.278-0.08 0.506 0.21 0.506s0.39 0.342 0.23 0.76c-0.16 0.417-0.04 0.759 0.27 0.759s0.56 0.57 0.56 1.266-0.25 1.266-0.56 1.266-0.43 0.342-0.27 0.759c0.16 0.418 0.06 0.76-0.22 0.76-0.33 0-0.32 0.351 0.03 1.004 0.3 0.552 0.53 1.862 0.52 2.911-0.04 2.879 0.16 4.187 0.64 4.187 0.23 0 0.28 0.228 0.11 0.506s-0.06 0.506 0.25 0.506c0.32 0 0.43 0.228 0.26 0.507-0.17 0.278-0.06 0.506 0.25 0.506s0.44 0.204 0.29 0.453c-0.16 0.25 0.08 0.593 0.53 0.764 0.46 0.177 0.68 0.635 0.52 1.066-0.16 0.415-0.06 0.755 0.23 0.755 0.28 0 0.38 0.228 0.2 0.507-0.17 0.278-0.05 0.506 0.26 0.506 0.34 0 0.44 0.409 0.25 1.012-0.2 0.624-0.09 1.013 0.28 1.013 0.35 0 0.49 0.421 0.33 1.013-0.14 0.557-0.02 1.013 0.28 1.013s0.39 0.15 0.21 0.334 0.12 0.655 0.68 1.047 0.89 0.926 0.73 1.185-0.04 0.472 0.27 0.472c0.32 0 0.43 0.228 0.26 0.506-0.17 0.279-0.06 0.506 0.25 0.506s0.43 0.228 0.25 0.507c-0.17 0.278-0.05 0.506 0.26 0.506s0.42 0.228 0.25 0.506c-0.17 0.279-0.08 0.507 0.21 0.507 0.28 0 0.37 0.379 0.19 0.842-0.23 0.61-0.13 0.729 0.35 0.431 0.51-0.315 0.59-0.108 0.34 0.888-0.19 0.765-0.1 1.375 0.22 1.482 0.37 0.125 0.4 0.746 0.09 1.941l-0.46 1.758-0.33-2.731c-0.32-2.715-2.19-6.981-3.89-8.915-0.49-0.557-1.04-1.999-1.22-3.203-0.39-2.533-2.78-7.521-4.24-8.844-0.97-0.875-1.06-0.865-2.46 0.286-2.49 2.042-6.25 4.394-7.53 4.715-1.23 0.311-3.35-1.228-3.88-2.821-0.44-1.316-1.86-0.078-3.72 3.248-1.48 2.654-1.79 3.633-1.51 4.884 0.26 1.174 0.1 1.838-0.64 2.662-3.09 3.465-5.7 10.213-5.7 14.751v3.25l3.15 2.689c8.04 6.866 8.68 7.984 5.95 10.474l-1.53 1.4 1.04 0.939c0.8 0.726 0.89 1.042 0.39 1.39-0.43 0.304-0.31 0.361 0.37 0.175 0.56-0.151 1.35-0.055 1.77 0.213 1.14 0.728 8.07 0.56 10.35-0.252zm-22.93-18.487c0-0.696 0.12-0.981 0.26-0.633s0.14 0.918 0 1.266-0.26 0.063-0.26-0.633zm31.33-30.348c-0.72-1.358-0.66-1.552 0.48-1.552 1.01 0 2.26 1.635 1.68 2.212-0.62 0.62-1.64 0.308-2.16-0.66zm1.51-0.003c0-0.262-0.23-0.617-0.51-0.79-0.28-0.172-0.51 0.043-0.51 0.477s0.23 0.789 0.51 0.789 0.51-0.214 0.51-0.476zm-8.11-22.563c0-0.9044 0.28-1.2658 0.96-1.2658 1.35 0 1.75 1.3911 0.58 2.0176-1.38 0.7375-1.54 0.6613-1.54-0.7518zm-16.2 68.942c0-0.096-0.51-0.608-1.14-1.139l-1.14-0.964 0.97 1.139c0.9 1.07 1.31 1.37 1.31 0.964zm-22.18-8.924c-0.33-0.501-1.1 1.311-1.1 2.602-0.02 2.91 0.75 3.23 1 0.421 0.14-1.532 0.19-2.892 0.1-3.023zm17.12 1.504c-0.3-0.557-0.66-1.013-0.8-1.013s-0.01 0.456 0.29 1.013 0.66 1.013 0.8 1.013 0.01-0.456-0.29-1.013zm-12.41-2.026c0.17-0.278 0.09-0.506-0.19-0.506s-0.65 0.228-0.82 0.506c-0.17 0.279-0.09 0.507 0.19 0.507s0.65-0.228 0.82-0.507zm35.71-39.859c0.41-1.193 0.41-1.871 0-2.531-0.5-0.791-0.53-0.762-0.25 0.237 0.21 0.789 0.09 1.139-0.41 1.139-0.39 0-2.14 0.715-3.89 1.588-4.41 2.208-7 2.439-8.9 0.797l-1.48-1.27 0.87-1.827c0.48-1.004 1.61-2.28 2.52-2.834s1.35-1.008 0.98-1.009c-0.38-0.001-1.26 0.454-1.97 1.011s-1.6 1.012-1.98 1.012-0.69 0.285-0.7 0.633c0 0.348-0.14 1.132-0.3 1.742-0.23 0.857 0.23 1.625 2.05 3.392 2.09 2.035 2.64 2.3 4.99 2.436 3.46 0.2 7.62-2.015 8.47-4.516zm-1.83-4.518c0.24-0.621 0.16-0.702-0.32-0.321-0.36 0.281-0.99 0.637-1.41 0.791-0.51 0.192-0.41 0.294 0.33 0.321 0.6 0.022 1.23-0.334 1.4-0.791zm-10.84-1.449c0-0.462 0.32-0.622 0.89-0.441 0.72 0.233 0.75 0.189 0.15-0.236-0.41-0.286-0.87-0.436-1.04-0.333s-0.61-0.311-0.99-0.92c-0.65-1.048-0.64-1.066 0.28-0.347 0.88 0.693 0.91 0.686 0.31-0.078-1.06-1.356-2.4-0.829-2.27 0.888 0.1 1.249 0.05 1.317-0.34 0.456-0.32-0.71-0.47-0.781-0.5-0.239-0.02 0.425 0.32 1.28 0.76 1.9 0.63 0.91 0.97 1.026 1.77 0.602 0.54-0.29 0.98-0.853 0.98-1.252zm7.6 1.014c-0.75-0.894 0.03-1.033 0.9-0.162 0.95 0.951 2.94-0.355 2.87-1.885-0.03-0.68-0.24-1.409-0.48-1.62-0.23-0.211-0.22-0.041 0.01 0.376 0.37 0.653 0.32 0.663-0.42 0.069-0.46-0.379-0.72-0.892-0.57-1.139s0.02-0.449-0.29-0.449c-0.78 0-2.05 1.32-1.66 1.712 0.17 0.172 0.05 0.314-0.28 0.314-0.32 0-0.59 0.455-0.59 1.012 0 0.829-0.34 1.013-1.86 1.013-1.02 0-1.7 0.149-1.52 0.33 0.18 0.182 1.01 0.311 1.84 0.288 0.84-0.024 1.65 0.169 1.81 0.429s0.42 0.472 0.58 0.472 0-0.342-0.34-0.76zm5.37-2.721c-0.34-2.2-1.64-3.608-3.31-3.608-1.81 0-3.59 1.339-3.56 2.687 0.01 1.063 0.06 1.051 1.15-0.282 2.29-2.788 5.26-1.052 4.75 2.774-0.26 2.009-0.23 2.091 0.48 1.15 0.49-0.65 0.66-1.623 0.49-2.721zm-12.2-2.097c-0.04-0.561-0.38-1.302-0.75-1.645-0.54-0.501-0.6-0.489-0.28 0.062 0.29 0.517 0.13 0.606-0.65 0.359-0.56-0.18-1.18-0.091-1.36 0.199-0.17 0.29 0.01 0.527 0.41 0.527s1.01 0.342 1.35 0.759c0.88 1.051 1.37 0.95 1.28-0.261z" transform="translate(10 1098.9)" stroke="#000" stroke-width=".375" fill="none"/>
- <rect id="d0e113" display="none" height="1e3px" width="288" y="1215.6" x="10"/>
+ <text id="tracing-f04-fr.svgtext4626" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 1088.9)" xml:space="preserve" line-height="100.00000%" font-size="6" y="97.153664" x="69.581543" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f04-fr.svgtspan4627" y="97.153664" x="69.581543" sodipodi:role="line">Image originale</tspan></text>
+ <text id="tracing-f04-fr.svgtext4629" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 1088.9)" xml:space="preserve" line-height="100.00000%" font-size="6" y="97.37867" x="156.37865" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f04-fr.svgtspan5892" sodipodi:role="line" y="97.378670" x="156.37865">Quantification (12 coul.)</tspan><tspan id="tracing-f04-fr.svgtspan5894" sodipodi:role="line" y="103.37867" x="156.37865">Rempli, sans contour</tspan></text>
+ <text id="tracing-f04-fr.svgtext4634" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 1088.9)" xml:space="preserve" line-height="100.00000%" font-size="6" y="97.37867" x="245.12865" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f04-fr.svgtspan5896" sodipodi:role="line" y="97.378670" x="245.12865">Quantification (12 coul.)</tspan><tspan id="tracing-f04-fr.svgtspan5898" sodipodi:role="line" y="103.37867" x="245.12865">Contour, non rempli</tspan></text>
+ <image id="tracing-f04-fr.svgimage4639" sodipodi:absref="/tux.png" xlink:href="tux.png" transform="translate(10 1088.9)" height="91.143" width="76.965" y="-.000097656" x="31.099"/>
+ <path id="tracing-f04-fr.svgpath5261" d="m138.36 88.785c-1.07-0.444-1.75-1.018-1.57-1.318 0.19-0.298 0.09-0.383-0.22-0.193-0.3 0.187-3.07-0.348-6.16-1.187-3.09-0.84-5.78-1.541-5.99-1.559-0.2-0.018 0.13-0.231 0.73-0.474 1.22-0.493 6.35 0.11 10.85 1.278 4.27 1.106 5.77 0.967 7.64-0.707 1.4-1.253 1.64-1.817 1.71-4.064 0.05-1.435-0.11-2.731-0.35-2.88-0.24-0.148-0.44 0.752-0.44 2 0 3.33-1.84 5.385-4.82 5.385-1.21 0-2.83-0.239-3.6-0.532s-4.03-0.982-7.24-1.531c-6.88-1.176-7.55-1.616-6.71-4.429 0.74-2.453 0.78-4.821 0.08-4.389-0.28 0.175-0.4 0.504-0.26 0.731 0.27 0.429-0.44 3.028-1.34 4.894-0.81 1.698-0.3 2.834 1.61 3.57 1.61 0.619 1.63 0.655 0.26 0.384-2.93-0.576-3.39-1.811-2.04-5.533 0.51-1.439 0.64-3.143 0.43-5.883-0.27-3.484-0.2-3.961 0.78-4.937 0.76-0.759 1.72-1.082 3.23-1.087 2.41-0.009 2.87-0.23 4.06-1.97 0.62-0.92 0.7-1.459 0.3-2.205-0.76-1.426-0.09-4.225 1.86-7.717 0.93-1.671 2.26-4.797 2.96-6.946 1.58-4.862 1.98-5.607 4.64-8.751 1.17-1.392 2.83-3.637 3.69-4.987l1.54-2.456-0.3-9.799c-0.34-11.096 0.02-12.896 3.25-16.478 2.41-2.6629 5.35-3.6959 9.64-3.3863 5.48 0.3948 9.5 2.8938 12.15 7.5492 1.39 2.4461 1.65 3.8181 2.1 11.044 0.37 5.991 0.44 6.24 2.8 10.902 1.33 2.625 3.54 6.057 4.91 7.627 2.86 3.269 4.15 5.594 5.85 10.589 1.45 4.266 1.94 9.256 1.25 12.687-0.4 2-0.35 2.768 0.22 3.654 0.4 0.617 0.73 1.707 0.73 2.423 0 1.806 1.28 3.588 3.87 5.369 3.67 2.527 3.07 4.2-2.66 7.392-2.33 1.299-5.27 3.359-6.52 4.579-1.26 1.219-2.5 2.085-2.76 1.924s-0.63-0.026-0.84 0.3c-0.23 0.37-0.14 0.457 0.22 0.232 0.32-0.199 0.59-0.24 0.59-0.092 0 0.624-3.12 1.816-4.76 1.816-2.14 0-4.52-0.842-4.14-1.461 0.15-0.248-0.12-0.419-0.6-0.381-0.52 0.04-0.89-0.286-0.89-0.781 0-0.468-0.21-1.037-0.46-1.266-0.26-0.241-0.29-0.128-0.06 0.268 0.32 0.549 0.19 0.574-0.65 0.127-0.63-0.341-4.31-0.557-9.48-0.557h-8.44l-1.9 1.504c-3.36 2.662-5.46 3.072-8.75 1.708zm4.05-0.017c-0.49-0.127-1.29-0.127-1.77 0-0.49 0.128-0.09 0.232 0.88 0.232 0.98 0 1.38-0.104 0.89-0.232zm32.15-0.008c-0.62-0.121-1.65-0.121-2.28 0-0.62 0.12-0.11 0.219 1.14 0.219 1.26 0 1.77-0.099 1.14-0.219zm-26.77-2.829c0.16 0.161 0.44-0.081 0.61-0.539 0.28-0.728 1.42-0.832 9.13-0.832 4.84 0 8.8 0.204 8.8 0.453s0.52 0.42 1.14 0.38c1.11-0.071 1.14-0.249 1.2-5.517 0.03-2.994-0.11-5.443-0.32-5.443-0.2 0-0.65 0.339-1 0.754-0.34 0.415-0.8 0.645-1.02 0.511-0.21-0.134-0.77 0.331-1.23 1.034s-1.05 1.143-1.32 0.979c-0.27-0.165-0.48-0.045-0.48 0.267 0 0.311-0.21 0.44-0.46 0.285-0.25-0.154-0.59 0.075-0.75 0.509-0.17 0.434-0.54 0.647-0.82 0.474-0.28-0.174-0.51-0.05-0.51 0.275s-0.34 0.459-0.76 0.299c-0.41-0.16-0.76-0.056-0.76 0.233 0 0.294-0.44 0.383-1.01 0.203-0.55-0.177-1.01-0.135-1.01 0.092 0 0.228-1.82 0.414-4.05 0.414s-4.05-0.163-4.05-0.364c0-0.2-0.38-0.218-0.84-0.04-0.61 0.232-0.73 0.138-0.44-0.335 0.27-0.442 0.18-0.58-0.3-0.419-0.4 0.137-0.71 0.966-0.73 1.964-0.06 2.93-0.18 3.32-1.51 4.646-0.91 0.907-1.09 1.362-0.63 1.541 0.36 0.14 1.14-0.279 1.74-0.932 0.6-0.652 1.22-1.054 1.38-0.892zm-2.22 0.908c0.35-0.418 0.75-0.76 0.89-0.76s-0.03 0.342-0.38 0.76c-0.35 0.417-0.74 0.759-0.88 0.759s0.03-0.342 0.37-0.759zm32.33-1.276c1.22-0.549 2.38-0.894 2.59-0.766 0.2 0.128 1.02-0.442 1.81-1.268 1.8-1.881 1.46-1.879-2.29 0.018-3.42 1.722-6.55 1.994-7.86 0.681-1.4-1.399-1.77-3.065-1.77-8.026 0-2.641-0.22-4.887-0.51-5.062-0.76-0.472-1.21 1.173-0.54 1.98 0.36 0.435 0.55 2.432 0.48 5.273-0.08 3.597 0.09 4.856 0.77 5.903 1.58 2.406 3.92 2.812 7.32 1.267zm-18.94-6.314c1.09-0.391 2.21-0.573 2.48-0.406s0.34 0.057 0.15-0.245c-0.34-0.554 1.52-1.45 2.47-1.185 0.27 0.078 0.33-0.027 0.13-0.234-0.33-0.322 1.41-1.937 2.14-2.001 0.62-0.053 2.54-1.54 2.54-1.968 0-0.26-0.62 0.08-1.38 0.755s-1.05 0.805-0.66 0.289c0.4-0.516 0.9-2.112 1.12-3.545 1.01-6.849 1.12-7.11 3.19-7.494 1.13-0.21 1.62-1.824 1.72-5.648 0.03-1.481 0.25-2.313 0.56-2.122 0.63 0.386 0.68 4.81 0.06 4.81-0.25 0-0.34 1.538-0.21 3.418 0.21 2.857 0.46 3.613 1.55 4.608 1.1 0.998 1.64 1.137 3.37 0.86 1.2-0.191 2.65-0.891 3.46-1.665 0.77-0.734 1.39-1.103 1.39-0.821 0 0.775-2.09 2.578-3.7 3.187-3.24 1.227-5.69 0.075-6.41-3.016l-0.42-1.76-0.05 1.932c-0.07 2.597 0.61 3.697 2.72 4.393 2.04 0.673 3.45 0.355 5.58-1.262 1.46-1.096 4.07-4.841 2.86-4.096-0.73 0.45-0.73 0.167 0-1.434 0.32-0.701 0.78-1.156 1.01-1.011 0.23 0.144 0.28-0.433 0.11-1.282-0.17-0.85-0.1-1.544 0.14-1.544s0.44-1.254 0.44-2.785c0-1.532-0.2-2.785-0.44-2.785s-0.31-0.684-0.14-1.519c0.19-0.939 0.09-1.519-0.24-1.519-0.31 0-0.42-0.342-0.26-0.76s0.05-0.759-0.25-0.759-0.42-0.342-0.26-0.76 0.05-0.759-0.25-0.759-0.41-0.342-0.25-0.76 0.04-0.76-0.26-0.76-0.41-0.341-0.25-0.759 0.06-0.76-0.23-0.76c-0.28 0-0.38-0.227-0.21-0.506 0.18-0.278 0.06-0.506-0.25-0.506s-0.42-0.228-0.25-0.507c0.17-0.278 0.06-0.506-0.26-0.506-0.31 0-0.42-0.228-0.25-0.506 0.17-0.279 0.06-0.507-0.25-0.507s-0.43-0.229-0.25-0.51c0.17-0.28-0.04-0.646-0.48-0.812-0.43-0.167-0.67-0.484-0.54-0.705 0.14-0.221-0.6-1.154-1.65-2.073-1.04-0.919-1.83-1.859-1.76-2.09s-0.21-0.552-0.63-0.713c-0.42-0.16-0.64-0.496-0.48-0.745 0.15-0.249 0.02-0.453-0.29-0.453s-0.42-0.23-0.25-0.51c0.17-0.281-0.04-0.646-0.47-0.813-0.44-0.166-0.67-0.507-0.51-0.756 0.15-0.249 0.02-0.453-0.29-0.453s-0.42-0.228-0.25-0.506c0.17-0.279 0.06-0.507-0.25-0.507s-0.43-0.228-0.26-0.506c0.18-0.279 0.06-0.507-0.25-0.507s-0.43-0.227-0.25-0.506c0.17-0.278 0.06-0.506-0.26-0.506-0.31 0-0.42-0.228-0.25-0.506 0.17-0.279 0.05-0.507-0.28-0.507-0.32 0-0.46-0.342-0.3-0.759 0.16-0.418 0.05-0.76-0.25-0.76s-0.41-0.342-0.25-0.759c0.16-0.418 0.05-0.76-0.25-0.76-0.36 0-0.48-1.47-0.37-4.304 0.1-2.367-0.02-4.304-0.26-4.304-0.25 0-0.33-0.911-0.18-2.025 0.16-1.161 0.06-2.026-0.22-2.026-0.27 0-0.35-0.457-0.17-1.015 0.21-0.674 0.06-1.117-0.47-1.319-0.44-0.167-0.67-0.5076-0.51-0.7569 0.15-0.2493 0.02-0.4533-0.29-0.4533s-0.42-0.2278-0.25-0.5063 0.06-0.5064-0.25-0.5064-0.45-0.193-0.3-0.4289c0.34-0.557-2.45-3.2379-2.9-2.7851-0.19 0.1896-0.35 0.0654-0.35-0.2759 0-0.3414-0.23-0.4798-0.5-0.3077-0.28 0.1721-0.51 0.0582-0.51-0.2532s-0.23-0.4253-0.51-0.2532-0.5 0.0582-0.5-0.2531c0-0.3114-0.23-0.4253-0.51-0.2532s-0.51 0.0563-0.51-0.2574c0-0.34-0.41-0.4405-1.01-0.249-0.56 0.1768-1.01 0.1352-1.01-0.0924 0-0.2277-1.48-0.4139-3.29-0.4139s-3.29 0.1952-3.29 0.4339-0.35 0.3028-0.76 0.1425c-0.42-0.1603-0.76-0.0573-0.76 0.2289s-0.23 0.3795-0.51 0.2074-0.51-0.0582-0.51 0.2532c0 0.3113-0.19 0.4468-0.42 0.301-0.56-0.3443-3.24 2.4459-2.79 2.8988 0.19 0.1895 0.07 0.3446-0.28 0.3446-0.34 0-0.48 0.2279-0.3 0.5064 0.17 0.2785 0.05 0.5063-0.26 0.5063s-0.42 0.2279-0.25 0.5064 0.08 0.5063-0.21 0.5063c-0.28 0-0.39 0.3418-0.23 0.7595s0.1 0.7597-0.14 0.7597-0.43 3.418-0.43 7.595c0 4.178 0.13 7.595 0.3 7.595s0.34 1.254 0.39 2.785c0.06 1.72-0.12 2.785-0.46 2.785-0.3 0-0.4 0.228-0.23 0.507 0.17 0.278 0.06 0.506-0.26 0.506-0.31 0-0.44 0.204-0.28 0.453 0.15 0.249-0.08 0.59-0.51 0.756-0.43 0.167-0.66 0.508-0.51 0.76 0.16 0.251-0.07 0.593-0.5 0.759-0.44 0.167-0.67 0.507-0.51 0.757 0.15 0.25-0.29 0.832-1 1.292-0.7 0.461-1.16 1.019-1.03 1.241 0.14 0.222-0.43 0.907-1.26 1.522-0.83 0.616-1.38 1.335-1.22 1.6 0.17 0.264 0.05 0.481-0.26 0.481-0.32 0-0.43 0.227-0.26 0.506 0.17 0.278 0.06 0.506-0.25 0.506s-0.43 0.228-0.25 0.507c0.17 0.278 0.07 0.506-0.21 0.506-0.29 0-0.39 0.342-0.23 0.76 0.16 0.417 0.02 0.759-0.3 0.759-0.37 0-0.47 0.393-0.28 1.013 0.18 0.568 0.09 1.012-0.2 1.012s-0.39 0.342-0.23 0.76 0.02 0.76-0.3 0.76c-0.33 0-0.45 0.227-0.28 0.506 0.17 0.278 0.08 0.506-0.21 0.506-0.28 0-0.39 0.342-0.23 0.76s0.03 0.759-0.29 0.759c-0.33 0-0.45 0.228-0.28 0.507 0.17 0.278 0.06 0.506-0.26 0.506-0.31 0-0.42 0.228-0.25 0.506 0.17 0.279 0.06 0.507-0.25 0.507s-0.44 0.204-0.29 0.453c0.16 0.249-0.07 0.589-0.51 0.756-0.43 0.166-0.64 0.532-0.47 0.812 0.17 0.281 0.06 0.51-0.25 0.51s-0.43 0.228-0.25 0.507c0.17 0.278 0.05 0.506-0.26 0.506-0.34 0-0.44 0.409-0.25 1.013 0.18 0.557 0.09 1.012-0.19 1.012-0.64 0-0.54 2.161 0.12 2.614 0.27 0.184 1.21 0.216 2.1 0.073 1.3-0.212 1.97 0.05 3.46 1.363 1.02 0.894 1.85 1.876 1.85 2.182s-0.87-0.29-1.93-1.326c-1.6-1.562-2.23-1.859-3.74-1.748-1.01 0.074-1.72 0.297-1.6 0.497s0.91 0.225 1.76 0.057c1.28-0.258 1.83-0.016 3.39 1.514 1.03 1.002 2.1 1.831 2.38 1.843 0.27 0.011 0.59 0.28 0.69 0.597 0.12 0.356-0.05 0.423-0.45 0.175-0.43-0.265-0.53-0.201-0.29 0.191 0.2 0.326 0.56 0.475 0.79 0.331 0.23-0.143 1.02 0.748 1.74 1.981 1.46 2.499 1.61 3.054 0.68 2.517-0.37-0.211-0.46-0.171-0.21 0.097 0.23 0.253 0.67 0.461 0.97 0.461s0.65 0.316 0.78 0.703c0.16 0.469 0.02 0.57-0.41 0.302-0.44-0.272-0.53-0.201-0.27 0.216 0.21 0.34 0.51 0.487 0.67 0.327s0.86 0.223 1.55 0.852 1.08 0.83 0.86 0.446c-0.28-0.47-0.19-0.626 0.26-0.475 0.37 0.123 1.09-0.189 1.59-0.694 1.01-1.006 1.23-2.437 0.38-2.437-0.29 0-0.41-0.197-0.26-0.438 0.32-0.527-1.43-2.225-1.86-1.797-0.16 0.164-0.68-0.29-1.15-1.008s-1.05-1.186-1.29-1.04c-0.23 0.146-0.8-0.31-1.26-1.013s-1.01-1.174-1.21-1.047c-0.21 0.127-1-0.414-1.75-1.202-1.2-1.253-1.39-1.888-1.49-5.081-0.06-2.007 0.08-3.77 0.32-3.917 0.24-0.148 0.31-0.588 0.16-0.977-0.15-0.39-0.03-0.708 0.27-0.708s0.42-0.342 0.26-0.76c-0.17-0.418-0.08-0.759 0.18-0.759s0.34-0.342 0.18-0.76-0.02-0.759 0.3-0.759c0.33 0 0.45-0.228 0.28-0.507-0.17-0.278-0.06-0.506 0.25-0.506s0.43-0.228 0.25-0.506c-0.17-0.279-0.05-0.507 0.26-0.507s0.42-0.228 0.25-0.506c-0.17-0.279-0.06-0.507 0.25-0.507 0.32 0 0.43-0.227 0.26-0.506-0.18-0.278-0.06-0.506 0.25-0.506s0.42-0.23 0.25-0.51c-0.17-0.281 0.04-0.646 0.47-0.813 0.44-0.166 0.67-0.506 0.51-0.756-0.15-0.249-0.06-0.453 0.21-0.453s0.38-0.513 0.24-1.139c-0.21-0.947-0.15-1.011 0.34-0.38 0.48 0.605 0.54 0.375 0.33-1.139-0.15-1.1-0.05-1.899 0.24-1.899 0.28 0 0.37-0.228 0.19-0.507-0.17-0.278-0.05-0.506 0.26-0.506s0.42-0.228 0.25-0.506c-0.17-0.279-0.06-0.507 0.25-0.507 0.32 0 0.43-0.227 0.26-0.506-0.17-0.278-0.06-0.506 0.25-0.506s0.43-0.23 0.25-0.51c-0.17-0.281 0.04-0.646 0.48-0.813 0.43-0.166 0.66-0.506 0.5-0.756-0.15-0.249-0.02-0.453 0.29-0.453s0.43-0.228 0.25-0.506c-0.17-0.279-0.07-0.507 0.23-0.507 0.59 0 0.45-3.696-0.2-5.184-0.21-0.483-0.14-1.566 0.15-2.405 0.3-0.875 0.33-1.525 0.07-1.525s-0.32-0.379-0.15-0.843c0.2-0.503 0.12-0.715-0.18-0.527-0.7 0.432-0.51-5.463 0.21-6.322 1.08-1.307 5.74-0.198 4.9 1.167-0.15 0.247-0.02 0.449 0.29 0.449s0.53 0.398 0.48 0.886c-0.18 1.802 0.06 2.152 1.49 2.152 1.59 0 2.17-0.823 1.73-2.483-0.16-0.633-0.03-1.062 0.32-1.062 0.33 0 0.46-0.224 0.29-0.498-0.4-0.639 2.71-2.551 4.04-2.487 0.85 0.04 0.81 0.119-0.25 0.48-1.22 0.416-1.21 0.428 0.25 0.348 1.73-0.095 2.95 0.478 2.51 1.18-0.16 0.259-0.03 0.471 0.28 0.471s0.42 0.228 0.25 0.506c-0.17 0.279-0.08 0.507 0.21 0.507s0.39 0.342 0.23 0.759c-0.16 0.418-0.04 0.76 0.27 0.76s0.56 0.569 0.56 1.266c0 0.696-0.25 1.266-0.56 1.266s-0.43 0.341-0.27 0.759 0.06 0.76-0.22 0.76c-0.33 0-0.32 0.351 0.03 1.003 0.3 0.552 0.53 1.862 0.52 2.912-0.04 2.879 0.16 4.186 0.64 4.186 0.23 0 0.28 0.228 0.11 0.507-0.17 0.278-0.06 0.506 0.25 0.506 0.32 0 0.43 0.228 0.26 0.506-0.17 0.279-0.06 0.507 0.25 0.507s0.44 0.204 0.29 0.453c-0.16 0.249 0.08 0.593 0.53 0.764 0.46 0.177 0.68 0.635 0.52 1.066-0.16 0.415-0.06 0.755 0.23 0.755 0.28 0 0.38 0.228 0.2 0.506-0.17 0.279-0.05 0.506 0.26 0.506 0.34 0 0.44 0.41 0.25 1.013-0.2 0.624-0.09 1.013 0.28 1.013 0.35 0 0.49 0.421 0.33 1.013-0.14 0.556-0.02 1.012 0.28 1.012s0.39 0.151 0.21 0.335c-0.18 0.183 0.12 0.655 0.68 1.047s0.89 0.925 0.73 1.185c-0.16 0.259-0.04 0.471 0.27 0.471 0.32 0 0.43 0.228 0.26 0.507-0.17 0.278-0.06 0.506 0.25 0.506s0.43 0.228 0.25 0.506c-0.17 0.279-0.05 0.507 0.26 0.507s0.42 0.228 0.25 0.506c-0.17 0.279-0.08 0.506 0.21 0.506 0.28 0 0.37 0.38 0.19 0.843-0.23 0.61-0.13 0.729 0.35 0.431 0.51-0.316 0.59-0.109 0.34 0.888-0.19 0.765-0.1 1.374 0.22 1.482 0.37 0.125 0.4 0.745 0.09 1.941l-0.46 1.757-0.33-2.73c-0.32-2.716-2.19-6.982-3.89-8.916-0.49-0.556-1.04-1.998-1.22-3.203-0.39-2.533-2.78-7.52-4.24-8.843-0.97-0.876-1.06-0.866-2.46 0.286-2.49 2.042-6.25 4.394-7.53 4.715-1.23 0.31-3.35-1.229-3.88-2.822-0.44-1.315-1.86-0.077-3.72 3.248-1.48 2.654-1.79 3.633-1.51 4.884 0.26 1.175 0.1 1.839-0.64 2.663-3.09 3.464-5.7 10.213-5.7 14.751v3.25l3.15 2.688c8.04 6.866 8.68 7.985 5.95 10.475l-1.53 1.399 1.04 0.94c0.8 0.726 0.89 1.042 0.39 1.39-0.43 0.304-0.31 0.361 0.37 0.175 0.56-0.151 1.35-0.056 1.77 0.212 1.14 0.729 8.07 0.56 10.35-0.251zm-22.93-18.487c0-0.697 0.12-0.982 0.26-0.633 0.14 0.348 0.14 0.917 0 1.265-0.14 0.349-0.26 0.064-0.26-0.632zm31.33-30.348c-0.72-1.358-0.66-1.552 0.48-1.552 1.01 0 2.26 1.634 1.68 2.212-0.62 0.62-1.64 0.308-2.16-0.66zm1.51-0.004c0-0.262-0.23-0.617-0.51-0.789s-0.51 0.042-0.51 0.477c0 0.434 0.23 0.789 0.51 0.789s0.51-0.215 0.51-0.477zm-8.11-22.562c0-0.9044 0.28-1.2658 0.96-1.2658 1.35 0 1.75 1.3911 0.58 2.0176-1.38 0.7375-1.54 0.6613-1.54-0.7518zm-16.2 68.942c0-0.096-0.51-0.609-1.14-1.139l-1.14-0.965 0.97 1.14c0.9 1.07 1.31 1.369 1.31 0.964zm-22.18-8.925c-0.33-0.501-1.1 1.312-1.1 2.602-0.02 2.91 0.75 3.231 1 0.422 0.14-1.532 0.19-2.893 0.1-3.024zm17.12 1.505c-0.3-0.558-0.66-1.013-0.8-1.013s-0.01 0.455 0.29 1.013c0.3 0.556 0.66 1.012 0.8 1.012s0.01-0.456-0.29-1.012zm-12.41-2.026c0.17-0.278 0.09-0.506-0.19-0.506s-0.65 0.228-0.82 0.506c-0.17 0.279-0.09 0.506 0.19 0.506s0.65-0.227 0.82-0.506zm35.71-39.859c0.41-1.193 0.41-1.872 0-2.532-0.5-0.79-0.53-0.761-0.25 0.237 0.21 0.79 0.09 1.14-0.41 1.14-0.39 0-2.14 0.714-3.89 1.588-4.41 2.207-7 2.438-8.9 0.797l-1.48-1.27 0.87-1.827c0.48-1.005 1.61-2.28 2.52-2.834s1.35-1.008 0.98-1.01c-0.38-0.001-1.26 0.454-1.97 1.011s-1.6 1.013-1.98 1.013-0.69 0.285-0.7 0.633c0 0.348-0.14 1.132-0.3 1.741-0.23 0.858 0.23 1.626 2.05 3.392 2.09 2.035 2.64 2.301 4.99 2.436 3.46 0.2 7.62-2.015 8.47-4.515zm-1.83-4.518c0.24-0.622 0.16-0.703-0.32-0.321-0.36 0.28-0.99 0.636-1.41 0.791-0.51 0.192-0.41 0.294 0.33 0.321 0.6 0.022 1.23-0.334 1.4-0.791zm-10.84-1.449c0-0.463 0.32-0.623 0.89-0.441 0.72 0.232 0.75 0.189 0.15-0.236-0.41-0.286-0.87-0.437-1.04-0.334s-0.61-0.311-0.99-0.919c-0.65-1.049-0.64-1.067 0.28-0.347 0.88 0.693 0.91 0.686 0.31-0.079-1.06-1.355-2.4-0.828-2.27 0.888 0.1 1.25 0.05 1.318-0.34 0.457-0.32-0.711-0.47-0.782-0.5-0.24-0.02 0.426 0.32 1.281 0.76 1.901 0.63 0.91 0.97 1.026 1.77 0.601 0.54-0.289 0.98-0.852 0.98-1.251zm7.6 1.014c-0.75-0.894 0.03-1.033 0.9-0.162 0.95 0.95 2.94-0.356 2.87-1.886-0.03-0.68-0.24-1.408-0.48-1.619-0.23-0.211-0.22-0.042 0.01 0.376 0.37 0.653 0.32 0.663-0.42 0.069-0.46-0.38-0.72-0.892-0.57-1.139s0.02-0.449-0.29-0.449c-0.78 0-2.05 1.319-1.66 1.712 0.17 0.172 0.05 0.313-0.28 0.313-0.32 0-0.59 0.456-0.59 1.013 0 0.828-0.34 1.013-1.86 1.013-1.02 0-1.7 0.148-1.52 0.33s1.01 0.311 1.84 0.287c0.84-0.023 1.65 0.17 1.81 0.429 0.16 0.26 0.42 0.473 0.58 0.473s0-0.342-0.34-0.76zm5.37-2.721c-0.34-2.201-1.64-3.608-3.31-3.608-1.81 0-3.59 1.338-3.56 2.687 0.01 1.062 0.06 1.05 1.15-0.282 2.29-2.789 5.26-1.053 4.75 2.773-0.26 2.009-0.23 2.092 0.48 1.151 0.49-0.651 0.66-1.623 0.49-2.721zm-12.2-2.097c-0.04-0.562-0.38-1.302-0.75-1.646-0.54-0.5-0.6-0.488-0.28 0.062 0.29 0.517 0.13 0.606-0.65 0.36-0.56-0.181-1.18-0.091-1.36 0.198-0.17 0.29 0.01 0.527 0.41 0.527s1.01 0.342 1.35 0.76c0.88 1.05 1.37 0.949 1.28-0.261z" transform="translate(10 1088.9)"/>
+ <path id="tracing-f04-fr.svgpath5262" d="m227.11 88.785c-1.07-0.443-1.75-1.018-1.57-1.318 0.19-0.298 0.09-0.382-0.22-0.192-0.3 0.186-3.07-0.348-6.16-1.188s-5.78-1.541-5.99-1.559c-0.2-0.017 0.13-0.231 0.73-0.474 1.22-0.493 6.35 0.111 10.85 1.278 4.27 1.106 5.77 0.968 7.64-0.707 1.4-1.252 1.64-1.817 1.71-4.064 0.05-1.435-0.11-2.731-0.35-2.879-0.24-0.149-0.44 0.751-0.44 1.999 0 3.33-1.84 5.386-4.82 5.386-1.21 0-2.83-0.24-3.6-0.532-0.77-0.293-4.03-0.982-7.24-1.531-6.88-1.176-7.55-1.617-6.71-4.43 0.74-2.453 0.78-4.82 0.08-4.389-0.28 0.175-0.4 0.504-0.26 0.732 0.27 0.428-0.44 3.028-1.34 4.893-0.81 1.698-0.3 2.834 1.61 3.571 1.61 0.618 1.63 0.654 0.26 0.384-2.93-0.577-3.39-1.811-2.04-5.534 0.51-1.439 0.64-3.142 0.43-5.882-0.27-3.484-0.2-3.962 0.78-4.937 0.76-0.76 1.72-1.082 3.23-1.088 2.41-0.009 2.87-0.229 4.06-1.969 0.62-0.92 0.7-1.459 0.3-2.206-0.76-1.426-0.09-4.224 1.86-7.716 0.93-1.671 2.26-4.797 2.96-6.947 1.58-4.862 1.98-5.607 4.64-8.75 1.17-1.393 2.83-3.637 3.69-4.988l1.54-2.455-0.3-9.799c-0.34-11.096 0.02-12.897 3.25-16.479 2.41-2.6625 5.35-3.6955 9.64-3.3859 5.48 0.3948 9.5 2.8938 12.15 7.5492 1.39 2.4457 1.65 3.8187 2.1 11.044 0.37 5.991 0.44 6.24 2.8 10.903 1.33 2.624 3.54 6.056 4.91 7.626 2.86 3.269 4.15 5.595 5.85 10.589 1.45 4.266 1.94 9.256 1.25 12.688-0.4 1.999-0.35 2.768 0.22 3.653 0.4 0.617 0.73 1.707 0.73 2.423 0 1.806 1.28 3.589 3.87 5.37 3.67 2.526 3.07 4.2-2.66 7.391-2.33 1.299-5.27 3.359-6.52 4.579-1.26 1.22-2.5 2.086-2.76 1.924-0.26-0.161-0.63-0.026-0.84 0.3-0.23 0.371-0.14 0.458 0.22 0.232 0.32-0.199 0.59-0.24 0.59-0.091 0 0.623-3.12 1.815-4.76 1.815-2.14 0-4.52-0.842-4.14-1.461 0.15-0.248-0.12-0.419-0.6-0.381-0.52 0.041-0.89-0.286-0.89-0.781 0-0.467-0.21-1.037-0.46-1.265-0.26-0.241-0.29-0.128-0.06 0.267 0.32 0.549 0.19 0.574-0.65 0.127-0.63-0.341-4.31-0.557-9.48-0.557h-8.44l-1.9 1.504c-3.36 2.662-5.46 3.073-8.75 1.708zm4.05-0.016c-0.49-0.128-1.29-0.128-1.77 0-0.49 0.127-0.09 0.231 0.88 0.231 0.98 0 1.38-0.104 0.89-0.231zm32.15-0.009c-0.62-0.12-1.65-0.12-2.28 0-0.62 0.121-0.11 0.22 1.14 0.22 1.26 0 1.77-0.099 1.14-0.22zm-26.77-2.829c0.16 0.161 0.44-0.081 0.61-0.539 0.28-0.727 1.42-0.832 9.13-0.832 4.84 0 8.8 0.204 8.8 0.453s0.52 0.42 1.14 0.38c1.11-0.071 1.14-0.249 1.2-5.516 0.03-2.994-0.11-5.444-0.32-5.444-0.2 0-0.65 0.34-1 0.754-0.34 0.415-0.8 0.645-1.02 0.511-0.21-0.134-0.77 0.332-1.23 1.034-0.46 0.703-1.05 1.144-1.32 0.979s-0.48-0.045-0.48 0.267c0 0.311-0.21 0.44-0.46 0.286s-0.59 0.075-0.75 0.508c-0.17 0.434-0.54 0.647-0.82 0.474s-0.51-0.05-0.51 0.275-0.34 0.459-0.76 0.299c-0.41-0.16-0.76-0.055-0.76 0.233 0 0.295-0.44 0.384-1.01 0.203-0.55-0.176-1.01-0.135-1.01 0.093s-1.82 0.414-4.05 0.414-4.05-0.164-4.05-0.364-0.38-0.218-0.84-0.041c-0.61 0.233-0.73 0.138-0.44-0.334 0.27-0.443 0.18-0.58-0.3-0.42-0.4 0.138-0.71 0.967-0.73 1.964-0.06 2.931-0.18 3.321-1.51 4.647-0.91 0.906-1.09 1.361-0.63 1.54 0.36 0.14 1.14-0.279 1.74-0.931s1.22-1.054 1.38-0.893zm-2.22 0.908c0.35-0.418 0.75-0.759 0.89-0.759s-0.03 0.341-0.38 0.759-0.74 0.759-0.88 0.759 0.03-0.341 0.37-0.759zm32.33-1.275c1.22-0.55 2.38-0.895 2.59-0.767 0.2 0.129 1.02-0.442 1.81-1.267 1.8-1.882 1.46-1.879-2.29 0.018-3.42 1.722-6.55 1.993-7.86 0.681-1.4-1.4-1.77-3.066-1.77-8.026 0-2.641-0.22-4.888-0.51-5.063-0.76-0.471-1.21 1.173-0.54 1.981 0.36 0.435 0.55 2.432 0.48 5.272-0.08 3.597 0.09 4.857 0.77 5.904 1.58 2.406 3.92 2.811 7.32 1.267zm-18.94-6.315c1.09-0.39 2.21-0.573 2.48-0.406s0.34 0.057 0.15-0.244c-0.34-0.554 1.52-1.451 2.47-1.186 0.27 0.079 0.33-0.027 0.13-0.234-0.33-0.322 1.41-1.937 2.14-2 0.62-0.054 2.54-1.541 2.54-1.968 0-0.26-0.62 0.079-1.38 0.754-0.76 0.676-1.05 0.805-0.66 0.289 0.4-0.516 0.9-2.111 1.12-3.544 1.01-6.85 1.12-7.111 3.19-7.495 1.13-0.21 1.62-1.824 1.72-5.648 0.03-1.481 0.25-2.312 0.56-2.122 0.63 0.387 0.68 4.811 0.06 4.811-0.25 0-0.34 1.538-0.21 3.418 0.21 2.857 0.46 3.612 1.55 4.607 1.1 0.999 1.64 1.137 3.37 0.86 1.2-0.191 2.65-0.89 3.46-1.664 0.77-0.734 1.39-1.104 1.39-0.822 0 0.775-2.09 2.578-3.7 3.187-3.24 1.227-5.69 0.076-6.41-3.016l-0.42-1.76-0.05 1.932c-0.07 2.598 0.61 3.697 2.72 4.393 2.04 0.673 3.45 0.355 5.58-1.261 1.46-1.097 4.07-4.841 2.86-4.096-0.73 0.45-0.73 0.166 0-1.435 0.32-0.7 0.78-1.155 1.01-1.011s0.28-0.432 0.11-1.282c-0.17-0.849-0.1-1.544 0.14-1.544s0.44-1.253 0.44-2.785-0.2-2.785-0.44-2.785-0.31-0.684-0.14-1.519c0.19-0.939 0.09-1.519-0.24-1.519-0.31 0-0.42-0.342-0.26-0.76 0.16-0.417 0.05-0.759-0.25-0.759s-0.42-0.342-0.26-0.76c0.16-0.417 0.05-0.759-0.25-0.759s-0.41-0.342-0.25-0.76c0.16-0.417 0.04-0.759-0.26-0.759s-0.41-0.342-0.25-0.76c0.16-0.417 0.06-0.759-0.23-0.759-0.28 0-0.38-0.228-0.21-0.507 0.18-0.278 0.06-0.506-0.25-0.506s-0.42-0.228-0.25-0.506c0.17-0.279 0.06-0.507-0.26-0.507-0.31 0-0.42-0.228-0.25-0.506s0.06-0.506-0.25-0.506-0.43-0.23-0.25-0.51c0.17-0.281-0.04-0.646-0.48-0.813-0.43-0.166-0.67-0.483-0.54-0.705 0.14-0.221-0.6-1.154-1.65-2.072-1.04-0.919-1.83-1.86-1.76-2.091s-0.21-0.551-0.63-0.712-0.64-0.496-0.48-0.746c0.15-0.249 0.02-0.453-0.29-0.453s-0.42-0.229-0.25-0.51c0.17-0.28-0.04-0.646-0.47-0.812-0.44-0.167-0.67-0.507-0.51-0.756 0.15-0.25 0.02-0.454-0.29-0.454s-0.42-0.228-0.25-0.506 0.06-0.506-0.25-0.506-0.43-0.228-0.26-0.507c0.18-0.278 0.06-0.506-0.25-0.506s-0.43-0.228-0.25-0.506c0.17-0.279 0.06-0.507-0.26-0.507-0.31 0-0.42-0.228-0.25-0.506 0.17-0.279 0.05-0.506-0.28-0.506-0.32 0-0.46-0.342-0.3-0.76s0.05-0.76-0.25-0.76-0.41-0.341-0.25-0.759 0.05-0.76-0.25-0.76c-0.36 0-0.48-1.47-0.37-4.304 0.1-2.367-0.02-4.304-0.26-4.304-0.25 0-0.33-0.911-0.18-2.025 0.16-1.16 0.06-2.025-0.22-2.025-0.27 0-0.35-0.457-0.17-1.015 0.21-0.674 0.06-1.118-0.47-1.32-0.44-0.166-0.67-0.5072-0.51-0.7565 0.15-0.2493 0.02-0.4533-0.29-0.4533s-0.42-0.2278-0.25-0.5063 0.06-0.5064-0.25-0.5064-0.45-0.193-0.3-0.4289c0.34-0.557-2.45-3.2379-2.9-2.7851-0.19 0.1896-0.35 0.0654-0.35-0.2759 0-0.3414-0.23-0.4798-0.5-0.3077-0.28 0.1721-0.51 0.0582-0.51-0.2532s-0.23-0.4253-0.51-0.2532-0.5 0.0582-0.5-0.2531c0-0.3114-0.23-0.4253-0.51-0.2532s-0.51 0.0563-0.51-0.2574c0-0.34-0.41-0.4405-1.01-0.249-0.56 0.1768-1.01 0.1352-1.01-0.0924 0-0.2277-1.48-0.4139-3.29-0.4139s-3.29 0.1952-3.29 0.4339-0.35 0.3028-0.76 0.1425c-0.42-0.1603-0.76-0.0573-0.76 0.2289s-0.23 0.3795-0.51 0.2074-0.51-0.0582-0.51 0.2532c0 0.3113-0.19 0.4468-0.42 0.301-0.56-0.3443-3.24 2.4459-2.79 2.8988 0.19 0.1895 0.07 0.3446-0.28 0.3446-0.34 0-0.48 0.2279-0.3 0.5064 0.17 0.2785 0.05 0.5063-0.26 0.5063s-0.42 0.2279-0.25 0.5064 0.08 0.5063-0.21 0.5063c-0.28 0-0.39 0.3418-0.23 0.7595 0.16 0.4183 0.1 0.7593-0.14 0.7593s-0.43 3.418-0.43 7.595c0 4.178 0.13 7.596 0.3 7.596s0.34 1.253 0.39 2.785c0.06 1.719-0.12 2.785-0.46 2.785-0.3 0-0.4 0.228-0.23 0.506s0.06 0.506-0.26 0.506c-0.31 0-0.44 0.204-0.28 0.454 0.15 0.249-0.08 0.589-0.51 0.756-0.43 0.166-0.66 0.508-0.51 0.759 0.16 0.251-0.07 0.593-0.5 0.76-0.44 0.166-0.67 0.507-0.51 0.757 0.15 0.25-0.29 0.831-1 1.292-0.7 0.46-1.16 1.018-1.03 1.24 0.14 0.222-0.43 0.907-1.26 1.523-0.83 0.615-1.38 1.335-1.22 1.599 0.17 0.265 0.05 0.481-0.26 0.481-0.32 0-0.43 0.228-0.26 0.506 0.17 0.279 0.06 0.507-0.25 0.507s-0.43 0.228-0.25 0.506c0.17 0.278 0.07 0.506-0.21 0.506-0.29 0-0.39 0.342-0.23 0.76s0.02 0.759-0.3 0.759c-0.37 0-0.47 0.393-0.28 1.013 0.18 0.568 0.09 1.013-0.2 1.013s-0.39 0.342-0.23 0.759c0.16 0.418 0.02 0.76-0.3 0.76-0.33 0-0.45 0.228-0.28 0.506 0.17 0.279 0.08 0.507-0.21 0.507-0.28 0-0.39 0.341-0.23 0.759s0.03 0.76-0.29 0.76c-0.33 0-0.45 0.228-0.28 0.506s0.06 0.506-0.26 0.506c-0.31 0-0.42 0.228-0.25 0.507 0.17 0.278 0.06 0.506-0.25 0.506s-0.44 0.204-0.29 0.453c0.16 0.25-0.07 0.59-0.51 0.756-0.43 0.167-0.64 0.532-0.47 0.813 0.17 0.28 0.06 0.51-0.25 0.51s-0.43 0.228-0.25 0.506c0.17 0.279 0.05 0.507-0.26 0.507-0.34 0-0.44 0.409-0.25 1.012 0.18 0.557 0.09 1.013-0.19 1.013-0.64 0-0.54 2.161 0.12 2.613 0.27 0.184 1.21 0.217 2.1 0.073 1.3-0.211 1.97 0.051 3.46 1.364 1.02 0.893 1.85 1.875 1.85 2.181s-0.87-0.29-1.93-1.325c-1.6-1.562-2.23-1.86-3.74-1.749-1.01 0.074-1.72 0.298-1.6 0.497 0.12 0.2 0.91 0.226 1.76 0.057 1.28-0.258 1.83-0.016 3.39 1.515 1.03 1.001 2.1 1.831 2.38 1.842 0.27 0.011 0.59 0.28 0.69 0.598 0.12 0.355-0.05 0.422-0.45 0.175-0.43-0.266-0.53-0.201-0.29 0.19 0.2 0.327 0.56 0.476 0.79 0.332s1.02 0.747 1.74 1.981c1.46 2.498 1.61 3.054 0.68 2.517-0.37-0.212-0.46-0.172-0.21 0.096 0.23 0.254 0.67 0.461 0.97 0.461s0.65 0.317 0.78 0.704c0.16 0.469 0.02 0.569-0.41 0.301-0.44-0.271-0.53-0.201-0.27 0.216 0.21 0.341 0.51 0.488 0.67 0.327 0.16-0.16 0.86 0.224 1.55 0.853s1.08 0.829 0.86 0.445c-0.28-0.47-0.19-0.625 0.26-0.475 0.37 0.124 1.09-0.189 1.59-0.694 1.01-1.006 1.23-2.436 0.38-2.436-0.29 0-0.41-0.198-0.26-0.439 0.32-0.526-1.43-2.224-1.86-1.797-0.16 0.164-0.68-0.289-1.15-1.007s-1.05-1.187-1.29-1.041c-0.23 0.146-0.8-0.31-1.26-1.012-0.46-0.703-1.01-1.174-1.21-1.047-0.21 0.127-1-0.414-1.75-1.202-1.2-1.254-1.39-1.889-1.49-5.082-0.06-2.007 0.08-3.769 0.32-3.917s0.31-0.587 0.16-0.977c-0.15-0.389-0.03-0.708 0.27-0.708s0.42-0.342 0.26-0.759c-0.17-0.418-0.08-0.76 0.18-0.76s0.34-0.342 0.18-0.76c-0.16-0.417-0.02-0.759 0.3-0.759 0.33 0 0.45-0.228 0.28-0.506-0.17-0.279-0.06-0.507 0.25-0.507s0.43-0.228 0.25-0.506c-0.17-0.279-0.05-0.506 0.26-0.506s0.42-0.228 0.25-0.507c-0.17-0.278-0.06-0.506 0.25-0.506 0.32 0 0.43-0.228 0.26-0.507-0.18-0.278-0.06-0.506 0.25-0.506s0.42-0.229 0.25-0.51c-0.17-0.28 0.04-0.646 0.47-0.812 0.44-0.167 0.67-0.507 0.51-0.756-0.15-0.25-0.06-0.454 0.21-0.454s0.38-0.512 0.24-1.139c-0.21-0.946-0.15-1.011 0.34-0.38 0.48 0.606 0.54 0.375 0.33-1.139-0.15-1.1-0.05-1.899 0.24-1.899 0.28 0 0.37-0.228 0.19-0.506-0.17-0.279-0.05-0.507 0.26-0.507s0.42-0.227 0.25-0.506c-0.17-0.278-0.06-0.506 0.25-0.506 0.32 0 0.43-0.228 0.26-0.506-0.17-0.279-0.06-0.507 0.25-0.507s0.43-0.229 0.25-0.51c-0.17-0.28 0.04-0.646 0.48-0.812 0.43-0.167 0.66-0.507 0.5-0.756-0.15-0.25-0.02-0.454 0.29-0.454s0.43-0.227 0.25-0.506c-0.17-0.279-0.07-0.506 0.23-0.506 0.59 0 0.45-3.696-0.2-5.184-0.21-0.484-0.14-1.566 0.15-2.405 0.3-0.875 0.33-1.526 0.07-1.526s-0.32-0.379-0.15-0.842c0.2-0.504 0.12-0.716-0.18-0.528-0.7 0.432-0.51-5.462 0.21-6.322 1.08-1.307 5.74-0.198 4.9 1.167-0.15 0.247-0.02 0.449 0.29 0.449s0.53 0.399 0.48 0.886c-0.18 1.802 0.06 2.152 1.49 2.152 1.59 0 2.17-0.822 1.73-2.483-0.16-0.633-0.03-1.061 0.32-1.061 0.33 0 0.46-0.224 0.29-0.499-0.4-0.639 2.71-2.551 4.04-2.487 0.85 0.041 0.81 0.119-0.25 0.48-1.22 0.416-1.21 0.428 0.25 0.348 1.73-0.095 2.95 0.479 2.51 1.18-0.16 0.259-0.03 0.472 0.28 0.472s0.42 0.227 0.25 0.506c-0.17 0.278-0.08 0.506 0.21 0.506s0.39 0.342 0.23 0.76c-0.16 0.417-0.04 0.759 0.27 0.759s0.56 0.57 0.56 1.266-0.25 1.266-0.56 1.266-0.43 0.342-0.27 0.759c0.16 0.418 0.06 0.76-0.22 0.76-0.33 0-0.32 0.351 0.03 1.004 0.3 0.552 0.53 1.862 0.52 2.911-0.04 2.879 0.16 4.187 0.64 4.187 0.23 0 0.28 0.228 0.11 0.506s-0.06 0.506 0.25 0.506c0.32 0 0.43 0.228 0.26 0.507-0.17 0.278-0.06 0.506 0.25 0.506s0.44 0.204 0.29 0.453c-0.16 0.25 0.08 0.593 0.53 0.764 0.46 0.177 0.68 0.635 0.52 1.066-0.16 0.415-0.06 0.755 0.23 0.755 0.28 0 0.38 0.228 0.2 0.507-0.17 0.278-0.05 0.506 0.26 0.506 0.34 0 0.44 0.409 0.25 1.012-0.2 0.624-0.09 1.013 0.28 1.013 0.35 0 0.49 0.421 0.33 1.013-0.14 0.557-0.02 1.013 0.28 1.013s0.39 0.15 0.21 0.334 0.12 0.655 0.68 1.047 0.89 0.926 0.73 1.185-0.04 0.472 0.27 0.472c0.32 0 0.43 0.228 0.26 0.506-0.17 0.279-0.06 0.506 0.25 0.506s0.43 0.228 0.25 0.507c-0.17 0.278-0.05 0.506 0.26 0.506s0.42 0.228 0.25 0.506c-0.17 0.279-0.08 0.507 0.21 0.507 0.28 0 0.37 0.379 0.19 0.842-0.23 0.61-0.13 0.729 0.35 0.431 0.51-0.315 0.59-0.108 0.34 0.888-0.19 0.765-0.1 1.375 0.22 1.482 0.37 0.125 0.4 0.746 0.09 1.941l-0.46 1.758-0.33-2.731c-0.32-2.715-2.19-6.981-3.89-8.915-0.49-0.557-1.04-1.999-1.22-3.203-0.39-2.533-2.78-7.521-4.24-8.844-0.97-0.875-1.06-0.865-2.46 0.286-2.49 2.042-6.25 4.394-7.53 4.715-1.23 0.311-3.35-1.228-3.88-2.821-0.44-1.316-1.86-0.078-3.72 3.248-1.48 2.654-1.79 3.633-1.51 4.884 0.26 1.174 0.1 1.838-0.64 2.662-3.09 3.465-5.7 10.213-5.7 14.751v3.25l3.15 2.689c8.04 6.866 8.68 7.984 5.95 10.474l-1.53 1.4 1.04 0.939c0.8 0.726 0.89 1.042 0.39 1.39-0.43 0.304-0.31 0.361 0.37 0.175 0.56-0.151 1.35-0.055 1.77 0.213 1.14 0.728 8.07 0.56 10.35-0.252zm-22.93-18.487c0-0.696 0.12-0.981 0.26-0.633s0.14 0.918 0 1.266-0.26 0.063-0.26-0.633zm31.33-30.348c-0.72-1.358-0.66-1.552 0.48-1.552 1.01 0 2.26 1.635 1.68 2.212-0.62 0.62-1.64 0.308-2.16-0.66zm1.51-0.003c0-0.262-0.23-0.617-0.51-0.79-0.28-0.172-0.51 0.043-0.51 0.477s0.23 0.789 0.51 0.789 0.51-0.214 0.51-0.476zm-8.11-22.563c0-0.9044 0.28-1.2658 0.96-1.2658 1.35 0 1.75 1.3911 0.58 2.0176-1.38 0.7375-1.54 0.6613-1.54-0.7518zm-16.2 68.942c0-0.096-0.51-0.608-1.14-1.139l-1.14-0.964 0.97 1.139c0.9 1.07 1.31 1.37 1.31 0.964zm-22.18-8.924c-0.33-0.501-1.1 1.311-1.1 2.602-0.02 2.91 0.75 3.23 1 0.421 0.14-1.532 0.19-2.892 0.1-3.023zm17.12 1.504c-0.3-0.557-0.66-1.013-0.8-1.013s-0.01 0.456 0.29 1.013 0.66 1.013 0.8 1.013 0.01-0.456-0.29-1.013zm-12.41-2.026c0.17-0.278 0.09-0.506-0.19-0.506s-0.65 0.228-0.82 0.506c-0.17 0.279-0.09 0.507 0.19 0.507s0.65-0.228 0.82-0.507zm35.71-39.859c0.41-1.193 0.41-1.871 0-2.531-0.5-0.791-0.53-0.762-0.25 0.237 0.21 0.789 0.09 1.139-0.41 1.139-0.39 0-2.14 0.715-3.89 1.588-4.41 2.208-7 2.439-8.9 0.797l-1.48-1.27 0.87-1.827c0.48-1.004 1.61-2.28 2.52-2.834s1.35-1.008 0.98-1.009c-0.38-0.001-1.26 0.454-1.97 1.011s-1.6 1.012-1.98 1.012-0.69 0.285-0.7 0.633c0 0.348-0.14 1.132-0.3 1.742-0.23 0.857 0.23 1.625 2.05 3.392 2.09 2.035 2.64 2.3 4.99 2.436 3.46 0.2 7.62-2.015 8.47-4.516zm-1.83-4.518c0.24-0.621 0.16-0.702-0.32-0.321-0.36 0.281-0.99 0.637-1.41 0.791-0.51 0.192-0.41 0.294 0.33 0.321 0.6 0.022 1.23-0.334 1.4-0.791zm-10.84-1.449c0-0.462 0.32-0.622 0.89-0.441 0.72 0.233 0.75 0.189 0.15-0.236-0.41-0.286-0.87-0.436-1.04-0.333s-0.61-0.311-0.99-0.92c-0.65-1.048-0.64-1.066 0.28-0.347 0.88 0.693 0.91 0.686 0.31-0.078-1.06-1.356-2.4-0.829-2.27 0.888 0.1 1.249 0.05 1.317-0.34 0.456-0.32-0.71-0.47-0.781-0.5-0.239-0.02 0.425 0.32 1.28 0.76 1.9 0.63 0.91 0.97 1.026 1.77 0.602 0.54-0.29 0.98-0.853 0.98-1.252zm7.6 1.014c-0.75-0.894 0.03-1.033 0.9-0.162 0.95 0.951 2.94-0.355 2.87-1.885-0.03-0.68-0.24-1.409-0.48-1.62-0.23-0.211-0.22-0.041 0.01 0.376 0.37 0.653 0.32 0.663-0.42 0.069-0.46-0.379-0.72-0.892-0.57-1.139s0.02-0.449-0.29-0.449c-0.78 0-2.05 1.32-1.66 1.712 0.17 0.172 0.05 0.314-0.28 0.314-0.32 0-0.59 0.455-0.59 1.012 0 0.829-0.34 1.013-1.86 1.013-1.02 0-1.7 0.149-1.52 0.33 0.18 0.182 1.01 0.311 1.84 0.288 0.84-0.024 1.65 0.169 1.81 0.429s0.42 0.472 0.58 0.472 0-0.342-0.34-0.76zm5.37-2.721c-0.34-2.2-1.64-3.608-3.31-3.608-1.81 0-3.59 1.339-3.56 2.687 0.01 1.063 0.06 1.051 1.15-0.282 2.29-2.788 5.26-1.052 4.75 2.774-0.26 2.009-0.23 2.091 0.48 1.15 0.49-0.65 0.66-1.623 0.49-2.721zm-12.2-2.097c-0.04-0.561-0.38-1.302-0.75-1.645-0.54-0.501-0.6-0.489-0.28 0.062 0.29 0.517 0.13 0.606-0.65 0.359-0.56-0.18-1.18-0.091-1.36 0.199-0.17 0.29 0.01 0.527 0.41 0.527s1.01 0.342 1.35 0.759c0.88 1.051 1.37 0.95 1.28-0.261z" transform="translate(10 1088.9)" stroke="#000" stroke-width=".375" fill="none"/>
+ <rect id="d0e113" display="none" height="1e3px" width="288" y="1205.6" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e113"/>
</flowRegion>
<flowDiv xml:space="preserve">Vous devriez essayer ces trois filtres et observer les résultats différents qu&apos;ils produisent pour différents types d&apos;images. Pour une image donnée, il y en aura un qui donnera de meilleurs résultats que les autres.</flowDiv>
</flowRoot>
- <rect id="d0e116" display="none" height="1e3px" width="288" y="1264" x="10"/>
+ <rect id="d0e116" display="none" height="1e3px" width="288" y="1254" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e116"/>
</flowRegion>
<flowDiv xml:space="preserve">Après la vectorisation, vous devriez essayer d&apos;appliquer la commande <flowSpan font-family="sans-serif">Chemin &gt; Simplifier</flowSpan> (<flowSpan font-weight="bold">Ctrl+L</flowSpan>) au chemin résultant, afin de diminuer le nombre de nœuds. Cela peut rendre l&apos;édition du résultat de Potrace bien plus facile. Par exemple, voici un exemple typique de vectorisation du « Vieil homme jouant de la guitare » :</flowDiv>
</flowRoot>
- <text id="tracing-f05-fr.svgtext2879" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 1332.7)" xml:space="preserve" line-height="100.00000%" font-size="6" y="128.14566" x="81.327339" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f05-fr.svgtspan2880" y="128.14566" x="81.327339" sodipodi:role="line">Image originale</tspan></text>
- <text id="tracing-f05-fr.svgtext2882" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 1332.7)" xml:space="preserve" line-height="100.00000%" font-size="6" y="124.44067" x="227.33034" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f05-fr.svgtspan2883" y="124.44067" x="227.33034" sodipodi:role="line">Image vectorisée / Chemin résultant</tspan><tspan id="tracing-f05-fr.svgtspan2893" y="130.44067" x="227.33034" sodipodi:role="line">(1 551 nœuds)</tspan></text>
- <image id="tracing-f05-fr.svgimage1651" sodipodi:absref="/oldguitar.jpg" xlink:href="oldguitar.jpg" transform="translate(10 1332.7)" height="115.89" width="83.347" y=".000066406" x="39.654"/>
- <path id="tracing-f05-fr.svgpath1653" d="m185.42 89.583v-26.312l0.69-0.042 0.68-0.041-0.69-0.133-0.69-0.133 0.02-14.959 0.03-14.959 0.95-0.068c0.52-0.037 1.06-0.242 1.19-0.456 0.18-0.284 0.25-0.245 0.25 0.144 0.01 0.921 1.05 0.497 1.31-0.532 0.11-0.467 0.16-0.413 0.18 0.228 0.03 0.702 0.17 0.836 0.88 0.832 0.63-0.004 0.72-0.073 0.38-0.288-0.24-0.156-0.36-0.366-0.26-0.466 0.1-0.101 0.38 0.011 0.62 0.249 0.45 0.456 4.62 0.633 4.34 0.185-0.08-0.128 0.03-0.311 0.24-0.407 0.21-0.097 0.07-0.099-0.31-0.006-0.37 0.093-0.68 0.047-0.68-0.104 0-0.514 0.31-0.583 1.69-0.373 0.75 0.114 1.45 0.093 1.53-0.049 0.22-0.357 0.73-0.324 0.73 0.047 0 0.167-0.2 0.304-0.45 0.304s-0.46 0.127-0.46 0.283c0 0.155-0.31 0.341-0.68 0.411-0.38 0.071-0.17 0.127 0.47 0.124 0.63-0.003 1.22-0.12 1.31-0.26 0.08-0.14 0.43-0.254 0.76-0.254 0.34 0 0.53-0.129 0.43-0.286-0.09-0.157 0.07-0.294 0.37-0.304 1.91-0.063 3.68-0.251 4.34-0.46 0.42-0.133 0.66-0.135 0.53-0.004-0.12 0.131 0.07 0.446 0.44 0.7 0.77 0.54 6.33 0.862 6.33 0.368 0-0.165-0.21-0.22-0.46-0.124s-0.45 0.046-0.45-0.111-0.21-0.286-0.46-0.286-0.46 0.091-0.46 0.203c0 0.111-0.21 0.202-0.47 0.202s-0.42-0.206-0.36-0.481c0.06-0.31 0.37-0.454 0.85-0.405 0.58 0.06 0.64 0.012 0.29-0.223-0.67-0.438-1.26-0.377-1.66 0.171-0.27 0.374-0.62 0.432-1.55 0.258-1.15-0.217-1.17-0.238-0.46-0.552 0.55-0.246 0.76-0.234 0.86 0.047 0.17 0.509 0.68 0.475 0.68-0.044 0-0.863 1.73-0.81 4.02 0.122 1.22 0.497 2.3 0.903 2.4 0.904 0.36 0.002 0.51-3.488 0.16-3.709-0.18-0.116-0.23-0.307-0.12-0.424 0.43-0.428 1.2 0.59 1.04 1.379-0.14 0.706 0.36 1.842 0.81 1.842 0.1 0 0.34-0.513 0.52-1.141 0.53-1.745 1.51-2.804 2.32-2.495 0.53 0.2 0.64 0.438 0.53 1.138-0.2 1.236 0.5 1.702 2.63 1.757l1.78 0.045-0.17-0.945c-0.1-0.519-0.57-1.45-1.05-2.067-0.48-0.618-0.88-1.388-0.88-1.712 0-0.842-0.62-1.243-2.25-1.468-0.9-0.123-1.77-0.489-2.33-0.98-1.23-1.081-1.12-1.38 0.24-0.65 1.28 0.686 2.82 0.809 2.82 0.226 0-0.211-0.31-0.731-0.68-1.156-0.9-1.012-1.45-1.989-1.45-2.575 0-0.506 0.39-0.288 1.43 0.807 0.26 0.272 0.69 0.436 0.96 0.365 0.31-0.079 0.62 0.141 0.8 0.57 0.31 0.694 3.24 2.095 4.56 2.181 0.34 0.021 0.92 0.347 1.29 0.724l0.67 0.684h-0.69c-0.37 0-0.81 0.114-0.97 0.253s-0.9 0.425-1.64 0.636c-1.57 0.448-1.17 0.985 0.54 0.709 0.9-0.147 1.03-0.097 0.87 0.331-0.14 0.354-0.03 0.504 0.35 0.504 0.56 0 1.86 1.176 1.88 1.693 0 0.157 0.34 0.524 0.74 0.817l0.73 0.533 0.22-1.422c0.23-1.58-0.03-6.439-0.43-7.856l-0.26-0.913-0.21 1.141c-0.12 0.627-0.35 1.141-0.5 1.141-0.16 0-1.08-0.42-2.04-0.932-1.75-0.928-3.12-2.223-3.13-2.947 0-0.556-0.93-0.464-1.37 0.135-0.35 0.476-0.42 0.478-0.87 0.02-0.36-0.357-0.4-0.558-0.15-0.714 0.25-0.152 0.18-0.348-0.22-0.645-0.54-0.397-0.52-0.416 0.27-0.276 0.74 0.133 0.87 0.041 1.02-0.743 0.24-1.181 0.57-1.143 0.56 0.065 0 0.549 0.18 1.021 0.42 1.104 0.24 0.079 0.35 0.013 0.25-0.148-0.1-0.162 0.01-0.293 0.26-0.293 0.24 0 0.44 0.114 0.44 0.253s0.32 0.254 0.7 0.254 0.85 0.153 1.04 0.342c0.41 0.411 3.13 0.08 3.13-0.381 0-0.694-0.64-1.452-1.08-1.282-0.26 0.098-0.76-0.078-1.11-0.392-0.55-0.48-0.62-0.49-0.47-0.068 0.14 0.381-0.04 0.534-0.74 0.636-1.58 0.233-2.38-0.058-2.38-0.868 0-0.425 0.19-0.741 0.45-0.763 0.59-0.049 0.75-0.095 1.75-0.511 0.46-0.191 1.08-0.26 1.37-0.154 0.4 0.145 0.35-0.007-0.21-0.626-0.41-0.45-0.93-0.75-1.14-0.667-0.22 0.083-0.4-0.049-0.4-0.295 0-0.771-0.5-0.601-1.91 0.642-0.21 0.181-0.54 0.275-0.73 0.21-0.2-0.066-0.66 0.175-1.02 0.536-0.39 0.392-0.89 0.594-1.23 0.503-0.32-0.083-0.58-0.062-0.58 0.048s-0.58 0.2-1.3 0.2c-0.71 0-1.36 0.081-1.44 0.18s-0.63 0.271-1.22 0.383l-1.06 0.202 0.91-0.609c0.5-0.335 0.74-0.609 0.52-0.611-0.32-0.001-0.32-0.082 0-0.439 0.34-0.381 0.44-0.377 0.75 0.03 0.73 0.946 4.33-0.287 6.35-2.173 0.5-0.46 1.99-1.36 3.33-2.0001 1.34-0.6404 3.53-1.7571 4.87-2.4814 2.63-1.4232 2.78-1.4433 7.36-1.0003 2.46 0.2383 2.49 0.2327 2.67-0.4871 0.1-0.4005 0.14-1.7548 0.1-3.0096l-0.09-2.2814 8.67-0.0812c7.53-0.0706 8.71-0.0196 9.01 0.3891 0.3 0.4121 0.37 0.4143 0.52 0.0178 0.14-0.3777 0.87-0.4354 4.37-0.3481 2.31 0.0575 4.3 0.1203 4.43 0.1395 0.17 0.0259 0.12 95.017-0.06 113.12l-0.02 2.5h-41.52-41.53v-26.307zm6.99 25.117c0.42-0.78 0.4-0.93-0.11-0.93-0.4 0-0.79 0.61-0.79 1.24 0 0.49 0.58 0.29 0.9-0.31zm2.36-1.64c0.14-1.09-0.08-1.03-0.49 0.12-0.24 0.69-0.23 0.9 0.03 0.82 0.19-0.07 0.4-0.49 0.46-0.94zm1.18-0.12c-0.1-0.11-0.17 0.07-0.16 0.39 0.02 0.36 0.09 0.43 0.18 0.19 0.09-0.22 0.08-0.48-0.02-0.58zm-2.31-0.52c0-0.4 0.08-0.98 0.18-1.29 0.13-0.4 0-0.34-0.45 0.2-0.74 0.9-0.84 1.83-0.19 1.83 0.28 0 0.46-0.29 0.46-0.74zm-1.8 0.2c0.11-1.07 1.02-3.42 1.34-3.43 0.17 0 0.56-0.55 0.86-1.21 0.31-0.67 0.7-1.21 0.88-1.21 0.17 0 0.78-0.41 1.35-0.91 0.57-0.51 0.94-0.92 0.82-0.92s0.24-0.34 0.8-0.76c0.57-0.41 1.14-0.92 1.27-1.13 0.17-0.28 0.32-0.29 0.57-0.05 0.55 0.56 2.21 0.04 2.71-0.86 0.47-0.82 0.47-0.78-0.59-3.028-0.39-0.83-0.21-2.381 0.28-2.381 0.55 0-0.87-2.327-1.62-2.672-0.69-0.314-0.84-0.271-1.26 0.37-0.26 0.399-0.86 2.141-1.33 3.871-0.87 3.19-1.69 5.25-2.38 5.98-0.21 0.22-0.38 0.56-0.38 0.75 0 0.42-1.76 1.98-2.51 2.22-0.63 0.2-1.28 1.36-1.59 2.83-0.17 0.79-0.14 0.97 0.16 0.79 0.39-0.25 0.34 0.23-0.17 1.45-0.15 0.38-0.07 0.53 0.27 0.53 0.27 0 0.5-0.1 0.52-0.23zm55.06-3.05c-0.18-0.06-0.33-0.44-0.33-0.85 0-0.45-0.18-0.73-0.46-0.73-0.25 0-0.46 0.2-0.46 0.45s0.14 0.46 0.31 0.46c0.16 0 0.3 0.13 0.3 0.28 0 0.16 0.16 0.67 0.36 1.14l0.36 0.86 0.13-0.75c0.07-0.41-0.03-0.8-0.21-0.86zm-1.73-0.17c-0.1-0.27-0.31-0.42-0.46-0.33s-0.1 0.35 0.11 0.57c0.47 0.51 0.6 0.42 0.35-0.24zm-1.33-1.99c-0.2-0.38-0.51-0.55-0.79-0.44-0.4 0.15-0.36 0.3 0.22 0.92 0.76 0.8 1.1 0.51 0.57-0.48zm2.28-1.54c-0.07-0.87-0.77-1.24-0.77-0.41 0 0.31-0.21 0.87-0.47 1.24-0.7 0.99-0.23 1.46 0.61 0.62 0.39-0.41 0.66-1.02 0.63-1.45zm-2.6-1.19c0-0.15-0.2-0.44-0.45-0.65-0.5-0.41-0.56-0.31-0.27 0.43 0.19 0.51 0.72 0.67 0.72 0.22zm2.44-0.36c0-0.18-0.14-0.24-0.31-0.14-0.16 0.11-0.3 0.25-0.3 0.33 0 0.07 0.14 0.13 0.3 0.13 0.17 0 0.31-0.15 0.31-0.32zm-7.49-2.42c-0.17-0.17-0.76-0.44-1.32-0.6-0.98-0.28-0.99-0.28-0.46 0.31 0.3 0.33 0.89 0.6 1.31 0.6 0.53 0 0.68-0.1 0.47-0.31zm6.02-0.21c-0.22-0.08-0.48-0.07-0.58 0.03s0.08 0.17 0.4 0.16c0.35-0.02 0.43-0.09 0.18-0.19zm-8.57-0.59c0-0.35-1.05-1-1.62-1.01-0.3-0.01-0.47-0.136-0.38-0.285 0.1-0.15-0.03-0.351-0.28-0.447-0.61-0.231-0.59-0.802 0.02-0.802 0.79 0 0.3-0.752-0.56-0.854-0.43-0.052-0.97-0.314-1.19-0.583-0.36-0.435-0.33-0.449 0.26-0.134 0.37 0.195 1.03 0.354 1.48 0.354 0.71 0 0.8 0.102 0.67 0.768-0.17 0.883 0.22 1.288 0.6 0.618 0.27-0.485 1.61-0.328 1.61 0.189 0 0.157 0.13 0.202 0.3 0.098 0.17-0.103 0.31-0.043 0.31 0.134 0 0.178 0.4 0.323 0.88 0.323 0.49 0 0.94 0.129 0.99 0.287 0.06 0.157 0.79 0.464 1.62 0.674 0.84 0.22 1.6 0.5 1.69 0.63 0.27 0.37 1.83-0.48 1.67-0.91-0.11-0.287 0.17-0.333 1.14-0.186 0.71 0.106 1.45 0.336 1.66 0.496 0.28 0.21 0.38 0.16 0.38-0.2 0-0.953-2.33-1.287-3.49-0.503-0.38 0.253-1.8 0.209-3.2-0.108-2.36-0.535-8.33-4.086-15.66-9.314-3.19-2.274-5.35-3.293-8.78-4.134-1.7-0.417-3.5-0.913-4-1.101-1.7-0.638-5.11-2.815-5.25-3.35-0.09-0.344-0.79-0.722-1.98-1.072-1.61-0.474-1.78-0.596-1.4-0.989 0.48-0.485 1.79-2.549 1.79-2.81 0-0.315-2.62 0.421-4.18 1.176-0.88 0.423-1.73 0.683-1.91 0.578-1.02-0.631-2.66 1.757-3.38 4.912-0.32 1.391-0.29 1.68 0.22 2.563 0.58 0.984 2.19 2.146 2.63 1.895 0.13-0.071 0.23 0.063 0.23 0.298 0 0.236 0.26 0.729 0.58 1.098l0.58 0.67 0.2-0.924c0.26-1.151 0.64-1.407 1.23-0.82 0.49 0.491 0.59 0.823 0.22 0.765-0.73-0.116-1.29 0.096-1.29 0.493 0 0.251 0.14 0.456 0.3 0.456 0.17 0 0.31-0.137 0.31-0.304 0-0.168 0.14-0.304 0.3-0.304 0.17 0 0.31 0.202 0.31 0.45 0 0.519 1.4 0.926 2.73 0.793 0.41-0.041 0.41-0.088 0-0.424-0.25-0.207-0.6-0.648-0.78-0.978-0.19-0.331-0.7-0.78-1.15-0.999-0.44-0.218-0.8-0.537-0.8-0.708 0-0.191-0.37-0.231-0.95-0.103-0.66 0.145-0.89 0.106-0.75-0.128 0.12-0.185 0.44-0.341 0.73-0.347 0.46-0.008 0.45-0.053-0.05-0.436-0.69-0.519-0.39-1.195 0.35-0.813 0.28 0.146 0.69 0.203 0.89 0.128 0.21-0.075 0.38 0.08 0.38 0.345s0.25 0.482 0.55 0.482c1.01 0 1.85 0.869 1.95 2.034 0.05 0.612 0.26 1.169 0.47 1.239 0.3 0.097 0.31-0.066 0.07-0.714-0.25-0.647-0.22-0.938 0.11-1.267 0.36-0.368 0.51-0.312 1.07 0.398 0.36 0.454 0.65 1.021 0.65 1.26s0.24 0.41 0.53 0.38c0.97-0.098 1.22 0.01 1.38 0.589 0.11 0.434 0.34 0.536 0.94 0.421 0.88-0.167 0.97-0.421 0.48-1.325-0.39-0.727-0.13-1.227 0.51-0.982 0.35 0.133 0.37 0.241 0.1 0.409-0.2 0.126-0.26 0.396-0.13 0.607 0.17 0.277 0.38 0.183 0.79-0.346 0.31-0.399 0.56-0.573 0.57-0.387 0.02 1.031 4.72 4.386 5.49 3.914 0.16-0.102 0.53 0.045 0.81 0.325 0.48 0.478 0.52 0.469 0.75-0.137l0.24-0.648 0.77 0.668c0.42 0.367 0.76 0.834 0.76 1.037 0 0.51-0.94 0.826-1.32 0.444-0.52-0.518-0.85-0.357-0.75 0.362 0.08 0.528 0.31 0.687 1.09 0.725 0.54 0.027 1.16 0.185 1.37 0.353 0.2 0.168 0.85 0.401 1.44 0.518 0.59 0.118 1.82 0.465 2.74 0.772s2.35 0.766 3.19 1.02c0.84 0.255 2.34 0.837 3.35 1.295 1 0.453 1.91 0.813 2.02 0.783 0.11-0.02 0.37 0.16 0.57 0.41 0.37 0.44 1.21 0.62 1.21 0.25zm-5.78-3.456c0-0.168 0.14-0.305 0.3-0.305 0.17 0 0.31 0.137 0.31 0.305 0 0.167-0.14 0.304-0.31 0.304-0.16 0-0.3-0.137-0.3-0.304zm-1.22-0.609c0-0.167-0.38-0.304-0.86-0.304-0.47 0-0.96-0.103-1.09-0.228-0.23-0.228-0.38-0.271-1.24-0.342-0.54-0.045-0.65-1.863-0.12-1.863 0.21 0 0.26 0.289 0.15 0.741-0.17 0.686-0.08 0.757 1.2 0.949 1.26 0.189 3.23 1.318 2.34 1.341-0.21 0.006-0.38-0.127-0.38-0.294zm-4.94-1.242c-0.3-0.171-0.67-0.227-0.84-0.124-0.41 0.254-0.72-0.634-0.45-1.295 0.19-0.473 0.24-0.456 0.47 0.152 0.15 0.376 0.46 0.684 0.7 0.684s0.51 0.205 0.61 0.456c0.2 0.533 0.2 0.533-0.49 0.127zm-2.36-1.325c0-0.535 0.19-0.613 0.45-0.192 0.09 0.156 0.03 0.37-0.14 0.475s-0.31-0.023-0.31-0.283zm2.36-0.068c0.21-0.084 0.55-0.084 0.76 0 0.21 0.085 0.04 0.154-0.38 0.154s-0.59-0.069-0.38-0.154zm-21.83-4.495c0-0.074 0.14-0.219 0.31-0.322 0.17-0.104 0.3-0.043 0.3 0.134s-0.13 0.322-0.3 0.322-0.31-0.06-0.31-0.134zm2.54-3.073c-0.27-0.701-0.02-0.739 0.64-0.1 0.52 0.511 0.53 0.569 0.06 0.569-0.28 0-0.6-0.211-0.7-0.469zm1.47 11.779c0.73-0.304 2.12-0.727 3.09-0.939 0.98-0.213 1.7-0.459 1.61-0.547-0.09-0.089-1.53-0.339-3.2-0.557-1.67-0.217-3.36-0.492-3.74-0.61-0.39-0.118-0.6-0.107-0.47 0.026 0.12 0.133 0 0.495-0.28 0.806-0.39 0.432-0.43 0.647-0.16 0.922 0.2 0.196 0.36 0.604 0.36 0.905 0 0.72 1.07 0.718 2.79-0.006zm12.42-3.575c0-0.372-0.88-1.022-1.64-1.213-1.1-0.277-0.98 0.217 0.2 0.833 1.06 0.553 1.44 0.652 1.44 0.38zm-4.26-1.043c0-0.167-0.13-0.304-0.3-0.304s-0.31 0.137-0.31 0.304c0 0.168 0.14 0.305 0.31 0.305s0.3-0.137 0.3-0.305zm1.45-0.38c-0.15-0.431-0.64-0.383-0.79 0.076-0.05 0.167 0.13 0.304 0.41 0.304s0.45-0.171 0.38-0.38zm-7.53-2.966c0-0.167-0.21-0.304-0.46-0.304s-0.45 0.137-0.45 0.304c0 0.168 0.2 0.305 0.45 0.305s0.46-0.137 0.46-0.305zm23.57-8.213c-0.1-0.167-0.25-0.304-0.32-0.304s-0.13 0.137-0.13 0.304c0 0.168 0.14 0.304 0.32 0.304s0.24-0.136 0.13-0.304zm-3.34-0.608c-0.11-0.167-0.33-0.304-0.5-0.304-0.16 0-0.21 0.137-0.11 0.304s0.32 0.304 0.49 0.304 0.22-0.137 0.12-0.304zm13.27-0.814c-0.36-0.616-0.45-0.419-0.16 0.346 0.11 0.272 0.26 0.43 0.34 0.352 0.07-0.079-0.01-0.392-0.18-0.698zm-14.5 0.24c-0.16-0.149-0.64-0.36-1.05-0.469l-0.76-0.199 0.76 0.458c0.84 0.511 1.51 0.644 1.05 0.21zm3.51-0.661c0-0.157-0.14-0.286-0.31-0.286-0.16 0-0.3 0.213-0.3 0.474s0.14 0.39 0.3 0.287c0.17-0.104 0.31-0.317 0.31-0.475zm-5.63-0.286c-0.1-0.167-0.35-0.302-0.55-0.299-0.22 0.002-0.18 0.122 0.09 0.299 0.59 0.378 0.69 0.378 0.46 0zm17.49-0.735c0-0.237 0.17-0.511 0.38-0.608 0.3-0.142 0.31-0.214 0-0.355-0.26-0.121-0.09-0.464 0.54-1.088 0.5-0.501 0.9-1.072 0.9-1.268 0-0.264-0.06-0.266-0.23-0.01-0.16 0.246-0.35 0.208-0.67-0.134-0.39-0.426-0.38-0.458 0.08-0.28 0.32 0.121 0.52 0.055 0.53-0.17 0-0.234 0.11-0.202 0.29 0.085 0.24 0.378 0.4 0.39 0.91 0.074 0.5-0.308 0.62-0.308 0.61 0-0.02 0.587-0.78 1.466-1.06 1.214-0.14-0.123-0.17 0.003-0.07 0.279 0.12 0.329-0.01 0.553-0.37 0.648-0.38 0.098-0.55 0.401-0.52 0.914 0.06 0.939 0.32 0.801 1.23-0.645 1.4-2.226 2.58-7.879 1.75-8.392-0.24-0.149-0.34 0.437-0.34 1.986 0 1.209-0.11 2.096-0.23 1.97-0.24-0.241-0.28-0.406-0.34-1.412-0.03-0.344-0.16-0.554-0.3-0.465-0.15 0.089-0.24-0.48-0.2-1.264 0.03-0.784-0.13-2.037-0.35-2.786-0.23-0.748-0.34-1.608-0.24-1.911 0.11-0.344 0.02-0.55-0.22-0.547-0.54 0.006-1.45 0.592-0.94 0.599 0.21 0.002 0.38 0.133 0.38 0.289 0 0.157-0.56 0.278-1.25 0.268-0.69-0.009-1.34 0.123-1.44 0.293-0.26 0.407-0.95 0.49-1.79 0.216-0.81-0.26-0.92-1.053-0.16-1.081 0.41-0.015 0.38-0.084-0.15-0.294-0.37-0.152-0.68-0.425-0.68-0.607 0-0.183 0.13-0.248 0.3-0.144 0.45 0.277 0.37-0.623-0.17-1.911-0.26-0.622-0.43-1.157-0.38-1.189 0.25-0.157-2.46-3.324-3.88-4.539-1.1-0.939-1.56-1.53-1.43-1.855 0.13-0.355 0.91 0.291 3.01 2.51 2.37 2.506 2.94 3.304 3.51 4.946 0.39 1.076 0.87 2.024 1.08 2.106 0.21 0.081 0.31 0.27 0.22 0.42s-0.02 0.272 0.15 0.272c0.48 0 0.39-0.648-0.24-1.683-0.31-0.508-0.66-1.545-0.77-2.305-0.17-1.162-0.51-1.691-2.13-3.335-1.06-1.075-2.39-2.327-2.96-2.782-0.56-0.455-0.87-0.831-0.67-0.836s0.55 0.178 0.78 0.407c0.23 0.23 0.86 0.649 1.41 0.932 0.55 0.284 1.66 1.224 2.47 2.089 0.82 0.865 1.57 1.481 1.69 1.368 0.23-0.232-1.65-2.981-2.04-2.981-0.14 0-0.26-0.197-0.26-0.438s-0.82-0.877-1.83-1.414c-1-0.537-1.78-1.023-1.72-1.082 0.06-0.058 0.74 0.112 1.53 0.379 1.48 0.504 2.06 1.028 4.14 3.696 0.68 0.879 1.38 1.597 1.54 1.597 0.59 0 0.28-0.816-0.64-1.692-0.52-0.491-1.28-1.467-1.69-2.167-0.65-1.1-1.02-1.363-2.7-1.921-2.94-0.978-4.42-2.433-2.49-2.433 0.75 0 1.06-0.565 2.38-4.359 0.45-1.309 0.9-2.462 1-2.56s0.18-0.35 0.18-0.559 0.3-1.042 0.66-1.85c0.67-1.504 1.46-3.494 1.46-3.733 0.01-0.074-0.27 0.166-0.61 0.532-0.83 0.887-1.34 0.852-0.75-0.052 0.26-0.394 0.38-0.942 0.28-1.216-0.15-0.398 0.01-0.507 0.83-0.538 0.93-0.034 0.89-0.06-0.35-0.281-1.94-0.346-3.91-0.35-3.37-0.007 0.23 0.15 0.87 0.201 1.4 0.114 0.86-0.14 0.99-0.066 1.13 0.636 0.1 0.541 0.02 0.793-0.27 0.793-0.22 0-0.41 0.258-0.41 0.573 0 0.464-0.19 0.555-0.99 0.476-0.54-0.054-1.09-0.106-1.22-0.117-0.12-0.011-0.2-0.122-0.16-0.247 0.03-0.126-0.03-0.686-0.15-1.244-0.21-1.005-0.23-1.014-1.51-0.801-1.76 0.293-2.79 0.866-3.77 2.099-1.6 2.007-1.9 3.263-1.92 8.159-0.01 3.167-0.12 4.486-0.36 4.486-0.2 0-1.82 0.671-3.6 1.49-3.37 1.546-5.41 2.183-8.92 2.79-1.83 0.317-2.12 0.459-2.54 1.289-0.59 1.123-0.44 4.113 0.28 5.71 0.26 0.572 0.65 1.657 0.88 2.41 0.34 1.167 0.53 1.383 1.29 1.469 0.52 0.061 1.2-0.136 1.68-0.492 0.44-0.326 1.39-0.895 2.12-1.265 0.72-0.37 1.92-1.29 2.65-2.045s1.33-1.193 1.33-0.974c0 0.253 0.24 0.162 0.65-0.246 0.36-0.356 0.65-1.002 0.65-1.437 0-0.493 0.16-0.79 0.45-0.79 0.24 0 1.07-0.616 1.83-1.369 0.92-0.904 1.66-1.37 2.18-1.373 0.62-0.004 0.69-0.067 0.33-0.304-0.32-0.211-0.14-0.242 0.61-0.107 0.58 0.105 1.2 0.331 1.36 0.501 0.21 0.207 0.13 0.247-0.22 0.121-0.81-0.284-0.65 0.023 0.6 1.176 0.63 0.577 1.42 1.054 1.75 1.062 0.8 0.018 3.86 2.394 4.32 3.35 0.19 0.41 0.45 1.156 0.57 1.658l0.22 0.913-0.65-0.582c-0.36-0.319-0.74-0.496-0.85-0.392-0.36 0.366-0.18 1.762 0.31 2.3 0.27 0.301 0.49 0.686 0.49 0.856 0 0.481 1.09 1.344 1.37 1.088 0.14-0.126 0.15-0.051 0.03 0.165-0.13 0.217-0.08 0.573 0.1 0.793 0.31 0.375 0.69 2.798 0.69 4.395 0 0.521 0.1 0.624 0.34 0.381 0.5-0.504 0.82-0.405 0.82 0.255 0 0.325 0.14 0.675 0.3 0.779 0.4 0.245 0.4 1.278 0 1.526-0.17 0.106-0.46-0.228-0.64-0.743-0.18-0.514-0.46-0.935-0.62-0.935-0.4 0-0.01 1.226 0.61 1.928 0.27 0.308 0.5 0.719 0.5 0.913 0 0.541 0.88 2.33 1.14 2.33 0.13 0 0.23-0.194 0.23-0.431zm-0.4-2.199c-0.39-0.397-0.2-0.716 0.43-0.716 0.35 0 0.58 0.159 0.51 0.361-0.15 0.444-0.66 0.637-0.94 0.355zm0.1-2.407c0-0.261 0.13-0.39 0.3-0.286 0.17 0.103 0.31 0.316 0.31 0.474 0 0.157-0.14 0.286-0.31 0.286s-0.3-0.213-0.3-0.474zm3.52 0.211c-0.13-0.212-0.16-0.468-0.05-0.568 0.27-0.273 0.56 0.128 0.42 0.569-0.11 0.309-0.18 0.309-0.37-0.001zm-4.74-6.134c0-0.163 0.21-0.295 0.46-0.295s0.45 0.054 0.45 0.12c0 0.065-0.2 0.198-0.45 0.294s-0.46 0.043-0.46-0.119zm3.07-1.639c-0.02-0.32 0.06-0.5 0.16-0.399s0.11 0.364 0.02 0.583c-0.1 0.243-0.17 0.171-0.18-0.184zm-11.43-8.998c-0.11-0.168-0.05-0.305 0.13-0.305s0.32 0.137 0.32 0.305c0 0.167-0.06 0.304-0.13 0.304-0.08 0-0.22-0.137-0.32-0.304zm-1.24-3.489c-0.32-0.245-0.44-0.451-0.25-0.456s0.52 0.195 0.73 0.447c0.48 0.579 0.28 0.583-0.48 0.009zm3.52-6.397c0-0.251 0.11-0.457 0.25-0.457s0.25 0.206 0.25 0.457-0.11 0.456-0.25 0.456-0.25-0.205-0.25-0.456zm-1.31-0.043c-0.11-0.107-0.12-0.314-0.03-0.461 0.19-0.315 0.73-0.043 0.73 0.37 0 0.326-0.41 0.38-0.7 0.091zm3.13-4.502c0-0.074 0.14-0.219 0.31-0.322 0.16-0.104 0.3-0.043 0.3 0.134s-0.14 0.322-0.3 0.322c-0.17 0-0.31-0.061-0.31-0.134zm0-2.129c0-0.261 0.14-0.475 0.31-0.475 0.16 0 0.3 0.129 0.3 0.287 0 0.157-0.14 0.37-0.3 0.474-0.17 0.103-0.31-0.026-0.31-0.286zm0.61-0.779c0-0.167 0.14-0.304 0.3-0.304 0.17 0 0.31 0.137 0.31 0.304s-0.14 0.304-0.31 0.304c-0.16 0-0.3-0.137-0.3-0.304zm-0.56-0.608c0-0.419 0.07-0.59 0.15-0.381 0.09 0.21 0.09 0.552 0 0.761-0.08 0.209-0.15 0.038-0.15-0.38zm-4.81-2.244c-0.27-0.311-0.12-0.478 0.71-0.777 0.58-0.21 1.13-0.304 1.23-0.21 0.09 0.095-0.2 0.312-0.65 0.484s-0.74 0.449-0.63 0.617c0.27 0.442-0.25 0.352-0.66-0.114zm2.33-0.722c0-0.377 0.14-0.685 0.3-0.685 0.38 0 0.38 0.323 0 0.913-0.24 0.369-0.29 0.325-0.3-0.228zm-10.54 41.427c-0.13-0.314 0.02-0.53 0.44-0.638 0.82-0.215 0.96-0.692 0.47-1.625l-0.4-0.761-0.05 0.913c-0.04 0.686-0.1 0.573-0.24-0.456-0.11-0.753-0.07-1.544 0.09-1.757 0.15-0.213 0.19-0.478 0.08-0.588-0.44-0.432-0.86 0.534-1.02 2.309-0.09 1.024-0.26 1.861-0.37 1.861-0.4 0-1.29-1.302-1-1.484 0.41-0.265 0.64-2.484 0.33-3.307-0.33-0.917-0.87-0.871-0.87 0.076 0 0.583-0.16 0.763-0.69 0.77-0.64 0.009-0.65 0.034-0.13 0.427 0.64 0.483 0.19 0.942-0.64 0.654-0.47-0.163-0.47-0.142 0.01 0.235 0.3 0.228 0.54 0.508 0.54 0.622 0 0.266 0.51 0.906 1.75 2.194 1.04 1.076 2.02 1.397 1.7 0.555zm-0.34-2.263c0-0.586 0.06-0.825 0.14-0.533 0.07 0.293 0.07 0.772 0 1.065-0.08 0.293-0.14 0.053-0.14-0.532zm-2.3-0.507c-0.11-0.112-0.21-0.344-0.21-0.517 0-0.191 0.15-0.173 0.36 0.045 0.2 0.198 0.29 0.431 0.21 0.517-0.09 0.087-0.25 0.066-0.36-0.045zm14.09 0.507c0-0.167-0.14-0.304-0.3-0.304-0.17 0-0.31 0.137-0.31 0.304s0.14 0.304 0.31 0.304c0.16 0 0.3-0.137 0.3-0.304zm-16.12-2.7c0-0.146-0.2-0.83-0.44-1.521-0.25-0.69-0.33-1.255-0.18-1.255s0.4 0.377 0.56 0.837c0.27 0.773 0.31 0.79 0.53 0.228 0.12-0.334 0.45-0.871 0.72-1.193 0.39-0.478 0.4-0.535 0.03-0.313-0.99 0.589-1.3 0.436-1.1-0.547 0.24-1.204 0.31-1.258 1.05-0.861 0.34 0.18 0.9 0.328 1.24 0.328 0.53 0 0.64 0.201 0.67 1.293l0.03 1.293 0.28-1.521c0.15-0.836 0.29-1.929 0.31-2.427 0.03-0.499 0.24-1.098 0.47-1.332 0.24-0.234 0.35-0.637 0.25-0.895-0.1-0.257-0.03-0.562 0.15-0.677 0.24-0.144 0.2-0.348-0.12-0.667-0.34-0.343-0.37-0.547-0.11-0.805s0.22-0.345-0.15-0.345c-0.27 0-0.54 0.105-0.59 0.233-0.06 0.129-1.06 0.735-2.23 1.348-1.28 0.669-2.17 1.334-2.22 1.667-0.05 0.305-0.24 0.854-0.42 1.22-0.52 1.031 0.3 6.178 0.98 6.178 0.16 0 0.29-0.119 0.29-0.266zm-0.86-4.525c0.04-0.292-0.02-0.702-0.15-0.909-0.16-0.258-0.09-0.319 0.23-0.195 0.53 0.202 0.66 1.637 0.15 1.637-0.18 0-0.28-0.24-0.23-0.533zm17.1 4.042c0.27-0.413 0.49-1.207 0.49-1.765s0.16-1.176 0.36-1.374 0.28-0.437 0.19-0.532c-0.1-0.094-0.4 0.057-0.68 0.336-0.47 0.465-0.54 0.467-0.87 0.021-0.27-0.349-0.5-0.403-0.83-0.19-0.4 0.266-0.4 0.332 0 0.598 0.28 0.181 0.32 0.302 0.1 0.305-0.57 0.007-0.76-0.536-0.42-1.179 0.21-0.397 0.52-0.534 0.95-0.422 0.46 0.121 0.67-0.006 0.8-0.484 0.11-0.427 0.41-0.648 0.87-0.648 1.67 0 1.01-1.022-0.85-1.307-0.93-0.144-1.22-0.059-1.59 0.475-0.35 0.507-0.37 0.708-0.08 0.916 0.3 0.211 0.3 0.298 0 0.42-0.21 0.085-0.38 0.417-0.38 0.738 0 0.32-0.14 0.583-0.31 0.583-0.6 0-0.29 0.583 0.58 1.097s1.45 2.088 0.89 2.432c-0.14 0.086-0.25 0.286-0.25 0.443 0 0.532 0.53 0.291 1.03-0.463zm-1.13-5.233c-0.31-0.309-0.24-0.71 0.12-0.71 0.17 0 0.24 0.125 0.15 0.278-0.1 0.153 0 0.348 0.21 0.433s0.23 0.164 0.05 0.178c-0.18 0.013-0.42-0.068-0.53-0.179zm-3.98 4.848c-0.1-0.101-0.17 0.079-0.16 0.399 0.02 0.354 0.09 0.427 0.19 0.184 0.09-0.22 0.07-0.482-0.03-0.583zm8.03 0.526c0-0.167-0.13-0.304-0.3-0.304s-0.31 0.137-0.31 0.304 0.14 0.304 0.31 0.304 0.3-0.137 0.3-0.304zm-13.99-0.989c-0.01-0.534-0.07-0.587-0.29-0.242-0.15 0.243-0.21 0.551-0.13 0.684 0.27 0.427 0.42 0.262 0.42-0.442zm12.64-0.148c0.27-0.375 0.3-0.694 0.08-1.103-0.19-0.358-0.2-0.647-0.02-0.765 0.41-0.268 0.72-2.109 0.39-2.312-0.15-0.092-0.36-0.027-0.47 0.146-0.1 0.172-0.32 0.235-0.47 0.139-0.16-0.096-0.29-0.03-0.29 0.147s0.14 0.322 0.31 0.322 0.3 0.342 0.3 0.761c0 0.418-0.13 0.76-0.3 0.76s-0.31 0.548-0.31 1.217c0 1.331 0.19 1.495 0.78 0.688zm1.66-0.725c0-0.795-0.5-0.717-0.72 0.113-0.29 1.065-0.23 1.246 0.26 0.836 0.25-0.208 0.46-0.635 0.46-0.949zm-5.32-3.935c0.13-0.621 0.1-0.903-0.09-0.783-0.46 0.284-0.74-1.253-0.36-1.97 0.19-0.345 0.26-0.71 0.16-0.81s-0.35 0.254-0.55 0.787c-0.38 1-0.95 1.382-0.65 0.436 0.09-0.308-0.17-0.147-0.63 0.38l-0.79 0.913 0.17-1.673c0.35-3.286 0.37-3.174-0.46-3.184-0.58-0.008-0.77-0.178-0.8-0.715-0.04-0.855-0.72-1.68-0.72-0.877 0 0.284 0.1 0.518 0.23 0.519 0.12 0 0.26 0.646 0.31 1.433 0.04 0.788 0.3 1.759 0.56 2.157 0.27 0.422 0.4 1.022 0.29 1.437-0.1 0.392-0.03 0.806 0.16 0.919 0.19 0.122 0.26 0.653 0.15 1.311-0.15 0.96-0.13 1.007 0.14 0.357 0.44-1.034 0.5-1.063 1.06-0.504 0.27 0.271 0.35 0.493 0.17 0.493-0.17 0-0.23 0.228-0.12 0.506 0.13 0.34 0.08 0.434-0.16 0.286-0.2-0.121-0.36-0.075-0.36 0.102 0 0.574 0.53 0.342 1.06-0.464 0.28-0.433 0.59-0.711 0.68-0.618s-0.05 0.5-0.31 0.904c-0.27 0.404-0.4 0.817-0.3 0.917 0.24 0.239 0.89-1.029 1.16-2.259zm-7.89 1.202c-0.8-0.631-1.39-0.747-1.39-0.272 0 0.167 0.21 0.304 0.46 0.304 0.26 0 0.54 0.197 0.64 0.437 0.09 0.241 0.36 0.363 0.59 0.272 0.33-0.126 0.26-0.303-0.3-0.741zm2.71-0.272c-0.1-0.167-0.35-0.302-0.55-0.3-0.22 0.003-0.18 0.123 0.1 0.3 0.58 0.378 0.69 0.378 0.45 0zm18.23-1.574c-0.28-0.869-0.41-2.125-0.41-3.825 0-0.711-0.14-1.293-0.31-1.293-0.18 0-0.32-0.206-0.32-0.456 0-0.251 0.14-0.457 0.32-0.457s0.23-0.158 0.11-0.351c-0.14-0.218-0.09-0.268 0.13-0.134 0.19 0.119 0.35 0.059 0.35-0.134 0-0.192-0.26-0.417-0.57-0.5-0.31-0.082-0.74-0.512-0.94-0.957-0.33-0.735-0.4-0.761-0.75-0.289-0.25 0.353-0.47 0.42-0.69 0.209-0.21-0.211-0.36 0.255-0.49 1.454-0.1 0.971-0.06 1.888 0.09 2.039 0.15 0.15 0.2 0.664 0.1 1.141-0.11 0.567-0.04 0.868 0.19 0.868s0.29-0.232 0.17-0.606c-0.15-0.49-0.09-0.567 0.35-0.399 0.43 0.165 0.4 0.054-0.15-0.534-0.52-0.552-0.65-0.966-0.52-1.617 0.09-0.481 0.18-1.097 0.19-1.368 0.02-0.381 0.08-0.354 0.29 0.114 0.26 0.591 0.27 0.589 0.47-0.076 0.11-0.377 0.33-0.685 0.49-0.685s0.2 0.146 0.09 0.325c-0.11 0.178 0.05 0.518 0.36 0.754 0.49 0.374 0.5 0.47 0.11 0.733-0.34 0.22-0.49 0.176-0.56-0.164-0.06-0.255-0.26-0.408-0.46-0.338-0.41 0.147-0.33 1.426 0.13 1.878 0.21 0.212 0.24 0.13 0.09-0.264-0.15-0.413-0.1-0.534 0.21-0.433 0.65 0.217 0.85 1.555 0.3 1.971-0.42 0.316-0.4 0.439 0.22 1.094 0.4 0.431 0.61 0.936 0.51 1.216-0.1 0.264 0.05 0.837 0.33 1.274 0.61 0.925 0.9 0.828 0.57-0.19zm-21.59 0.389c0.09-0.15-0.04-0.351-0.29-0.447-0.28-0.106-0.45 0.001-0.45 0.273 0 0.492 0.47 0.604 0.74 0.174zm2.3-0.673c0-0.185-0.21-0.258-0.46-0.161-0.25 0.096-0.45 0.042-0.45-0.12s0.2-0.295 0.45-0.295 0.46-0.151 0.46-0.336c0-0.186-0.22-0.254-0.48-0.152-0.27 0.101-0.61 0.184-0.76 0.184-0.16 0-0.28 0.274-0.28 0.609 0 0.446 0.2 0.608 0.76 0.608 0.42 0 0.76-0.151 0.76-0.337zm1.99 0.054c-0.1-0.156-0.05-0.359 0.09-0.451 0.15-0.092 0.28-0.495 0.28-0.895 0-0.675-0.04-0.692-0.51-0.234-0.52 0.504-0.5 1.863 0.03 1.863 0.15 0 0.2-0.127 0.11-0.283zm-25.3-1.694c-0.19-0.497-0.72-0.628-0.72-0.178 0 0.231 0.21 0.388 0.82 0.61 0.04 0.013-0.01-0.181-0.1-0.432zm3.67 0.118c-0.09-0.149 0.11-0.27 0.46-0.27 0.84 0 0.8-0.533-0.06-0.698l-0.69-0.132 0.69-0.041c0.41-0.025 0.68-0.239 0.68-0.535 0-0.384-0.09-0.417-0.41-0.147-0.23 0.191-0.63 0.266-0.89 0.168-0.25-0.098-0.56-0.025-0.67 0.162-0.15 0.248-0.33 0.244-0.64-0.017-0.35-0.291-0.43-0.21-0.43 0.442 0 0.439-0.14 0.798-0.3 0.798-0.17 0-0.31 0.104-0.31 0.232s0.62 0.25 1.37 0.27c0.75 0.021 1.29-0.084 1.2-0.232zm4.29-0.69c0.29-1.139 0.04-2.482-0.43-2.382-0.27 0.057-0.35-0.082-0.24-0.38 0.12-0.297 0.01-0.468-0.29-0.468-0.31 0-0.43 0.229-0.37 0.684 0.06 0.376 0.27 0.684 0.48 0.684s0.35 0.137 0.3 0.304c-0.04 0.168-0.17 0.27-0.3 0.229-0.27-0.092-0.3 0.899-0.04 1.572 0.27 0.702 0.69 0.588 0.89-0.243zm13.83 0.42c-0.6-0.385-1.22-0.385-1.22 0 0 0.167 0.38 0.302 0.84 0.299 0.65-0.003 0.73-0.069 0.38-0.299zm1.66-0.283c0.09-0.156 0.05-0.361-0.11-0.455-0.15-0.094-0.35 0.033-0.45 0.283-0.19 0.493 0.27 0.634 0.56 0.172zm-16.87-0.941c0-0.736-1.08-0.455-1.13 0.296-0.03 0.407 0.11 0.514 0.54 0.402 0.32-0.084 0.59-0.399 0.59-0.698zm-9.76-0.677c0.01-0.126-0.11-0.229-0.28-0.229s-0.29 0.377-0.28 0.837c0.02 0.741 0.05 0.767 0.28 0.228 0.14-0.335 0.27-0.711 0.28-0.836zm25.44 0.152c-0.03-0.779-0.18-1.141-0.49-1.141-0.29 0-0.41 0.26-0.36 0.76 0.19 1.826 0.91 2.148 0.85 0.381zm6.52 0.058c0-0.261-0.13-0.39-0.3-0.287-0.17 0.104-0.3 0.317-0.3 0.475 0 0.157 0.13 0.286 0.3 0.286s0.3-0.213 0.3-0.474zm-5.02-0.134c-0.1-0.168 0.03-0.305 0.29-0.305s0.47-0.226 0.47-0.503c0-0.455-0.05-0.451-0.6 0.041-0.52 0.471-0.59 1.071-0.12 1.071 0.08 0 0.07-0.137-0.04-0.304zm9.39-0.143c0.25-0.663-0.28-0.841-0.76-0.252-0.28 0.352-0.29 0.44-0.03 0.283 0.21-0.126 0.38-0.083 0.38 0.094 0 0.461 0.21 0.397 0.41-0.125zm-30.99-0.846c0.03-0.417 0.38-0.844 0.89-1.092 0.46-0.225 0.77-0.471 0.7-0.548-0.29-0.282-3.26-0.362-3.26-0.088 0 0.156 0.23 0.283 0.5 0.283 0.39 0 0.42 0.091 0.14 0.427-0.27 0.327-0.27 0.469 0.04 0.608 0.32 0.148 0.32 0.216-0.01 0.365-0.3 0.138-0.26 0.28 0.15 0.583 0.65 0.472 0.79 0.383 0.85-0.538zm-13.53 0.313c0-0.15 0.12-0.197 0.27-0.105 0.15 0.093 0.35-0.036 0.45-0.286s0.44-0.454 0.76-0.454 0.67-0.214 0.77-0.476c0.1-0.261 0.31-0.396 0.47-0.299 0.15 0.097 0.37 0.029 0.48-0.151 0.25-0.394-3.34-0.07-4.21 0.381-0.31 0.158-0.75 0.213-0.99 0.123-0.61-0.236-1.18 0.921-0.61 1.242 0.61 0.339 2.61 0.359 2.61 0.025zm0.02-0.972c-0.01-0.321 0.06-0.5 0.16-0.399 0.11 0.101 0.12 0.363 0.03 0.583-0.1 0.242-0.17 0.17-0.19-0.184zm10.56 0.431c-0.45-0.719-0.57-0.636-0.34 0.238 0.09 0.367 0.29 0.594 0.44 0.505 0.14-0.09 0.1-0.424-0.1-0.743zm-6.32 0.304c0-0.167-0.15-0.304-0.32-0.304-0.18 0-0.24 0.137-0.14 0.304 0.11 0.167 0.25 0.304 0.33 0.304 0.07 0 0.13-0.137 0.13-0.304zm3.64-0.598c-0.01-0.676-0.05-0.705-0.32-0.232-0.17 0.296-0.44 0.459-0.6 0.362s-0.29 0.008-0.29 0.233 0.28 0.409 0.61 0.409c0.45 0 0.61-0.2 0.6-0.772zm9.74 0.453c0-0.198-0.47-0.282-1.21-0.211-0.67 0.063-1.16 0.211-1.09 0.327 0.22 0.345 2.3 0.24 2.3-0.116zm22.36-0.159c0.22 0 0.46 0.102 0.53 0.228s0.11 0.103 0.09-0.05-0.33-0.466-0.67-0.696c-0.59-0.39-0.63-0.36-0.63 0.43 0.01 0.467 0.07 0.677 0.14 0.468 0.08-0.209 0.32-0.38 0.54-0.38zm2.51 0.397c-0.3-0.077-0.71-0.072-0.92 0.012-0.2 0.083 0.04 0.146 0.54 0.14s0.67-0.074 0.38-0.152zm12.45-2.298c0.52-1.046 1.67-2.86 2.56-4.031 1.41-1.855 1.62-2.312 1.63-3.549 0.01-0.78 0.12-1.529 0.26-1.663 0.13-0.135 0.15-0.009 0.04 0.278-0.11 0.301-0.05 0.524 0.14 0.524 0.18 0 0.34-0.377 0.35-0.837s0.09-1.562 0.18-2.449c0.21-2.069-0.3-4.16-1.43-5.861-0.49-0.741-0.89-1.227-0.89-1.079s-0.29-0.096-0.64-0.542c-0.69-0.872-3.43-2.408-3.74-2.096-0.37 0.37-0.18 0.758 0.29 0.58 0.27-0.104 0.39-0.053 0.28 0.12-0.1 0.165 0.09 0.3 0.42 0.3 0.93 0 1.56 0.327 1.56 0.811 0 0.265 0.15 0.356 0.38 0.227 0.31-0.171 0.31-0.132 0 0.195-0.58 0.631-0.46 1.181 0.24 1.046 0.44-0.084 0.79 0.149 1.17 0.777 0.3 0.493 0.66 0.794 0.81 0.67 0.14-0.125 0.01 0.166-0.29 0.647-0.44 0.702-0.48 1.019-0.21 1.611 0.46 1.005 0.42 1.159-0.16 0.679-0.42-0.354-0.47-0.329-0.37 0.191 0.08 0.42 0.32 0.57 0.8 0.504 0.37-0.053 0.67 0.05 0.67 0.228s-0.13 0.323-0.3 0.323c-0.39 0-0.39 0.625 0 1.217 0.27 0.406 0.34 0.406 0.6 0 0.26-0.394 0.3-0.386 0.31 0.058 0 0.725-0.47 0.93-0.91 0.395-0.53-0.631-0.84-0.566-1.1 0.231l-0.23 0.685-0.17-0.703c-0.19-0.774-0.78-0.798-0.78-0.031 0 0.547-0.7 1.494-1.1 1.494-0.15 0-0.27-0.205-0.27-0.456 0-0.55-0.36-0.588-0.85-0.091-0.26 0.259-0.37 0.265-0.37 0.02 0-0.189 0.31-0.442 0.69-0.56 1.17-0.37 2.04-1.402 1.71-2.022-0.19-0.357-0.18-0.541 0.02-0.541 0.18 0 0.32 0.189 0.32 0.421 0 0.231 0.27 0.492 0.61 0.58 0.71 0.187 0.81-0.331 0.14-0.816-0.51-0.378-0.78-1.48-0.85-3.556-0.04-1.012-0.18-1.396-0.51-1.399-0.25-0.003-0.54 0.126-0.65 0.286-0.11 0.177-0.27 0.159-0.39-0.046-0.12-0.185-0.07-0.337 0.11-0.337s0.32-0.205 0.32-0.456c0-0.551-0.5-0.609-0.68-0.079-0.09 0.279-0.25 0.252-0.61-0.103-0.3-0.302-0.38-0.634-0.22-0.895 0.14-0.228 0.18-0.538 0.09-0.689-0.1-0.151-0.42 0.253-0.72 0.898-0.58 1.24-0.8 0.994-0.3-0.329 0.16-0.429 0.19-0.781 0.06-0.781-0.14 0-0.7 1.13-1.25 2.51s-1.27 3.106-1.59 3.836c-0.33 0.729-0.5 1.414-0.38 1.521s0.27 0.023 0.35-0.188c0.07-0.21 0.26-0.305 0.41-0.21s0.28 0 0.28-0.211c0-0.298 0.08-0.302 0.36-0.018 0.57 0.567 0.86 0.435 0.86-0.395 0-0.419 0.12-0.761 0.26-0.761 0.15 0 0.35-0.41 0.45-0.912 0.19-0.933 1.11-1.313 1.11-0.457 0 0.251-0.19 0.457-0.42 0.457-0.49 0-0.78 0.92-0.79 2.491 0 1.094-0.61 1.941-0.85 1.2-0.1-0.287-0.23-0.283-0.6 0.02-0.41 0.34-0.44 0.293-0.24-0.368l0.22-0.758-0.52 0.716c-0.4 0.548-0.58 0.621-0.78 0.313-0.31-0.504-0.29-0.532-1.28 1.943-1 2.516-1.01 2.763-0.05 1.591l0.75-0.912v0.988c0 0.544 0.14 0.989 0.3 0.989 0.17 0 0.31-0.206 0.31-0.457 0-0.713 0.55-0.534 0.7 0.228l0.13 0.685 0.24-0.71c0.17-0.547 0.29-0.617 0.51-0.304 0.2 0.281 0.23 0.203 0.1-0.253-0.24-0.865 0.34-1.202 1.02-0.588 0.3 0.267 0.7 0.486 0.9 0.486 0.19 0 0.35 0.137 0.35 0.304 0 0.168-0.12 0.304-0.26 0.304s-0.19 0.377-0.1 0.837c0.13 0.688 0.08 0.777-0.27 0.5-0.74-0.576-1.8-0.72-1.8-0.243 0 0.235 0.17 0.393 0.38 0.351 0.21-0.041 0.38 0.198 0.38 0.533 0 0.334-0.17 0.574-0.38 0.532s-0.4 0.232-0.42 0.608c-0.02 0.542-0.06 0.57-0.17 0.135-0.08-0.302-0.48-0.674-0.88-0.827-0.48-0.184-0.66-0.435-0.55-0.746 0.14-0.339 0.05-0.417-0.31-0.282-0.58 0.226-0.61 0.483-0.11 0.988 0.3 0.301 0.29 0.441-0.07 0.689-0.36 0.246-0.32 0.274 0.18 0.135 0.41-0.114 0.82 0.032 1.17 0.416 0.29 0.326 0.73 0.514 0.98 0.419 0.32-0.12 0.42-0.003 0.35 0.389-0.07 0.42 0.1 0.564 0.67 0.573 0.61 0.01 0.74 0.151 0.68 0.715-0.04 0.386 0.03 0.64 0.15 0.564 0.13-0.076 0.39 0.038 0.59 0.254 0.28 0.303 0.27 0.518-0.07 0.956-0.47 0.623-0.58 1.326-0.2 1.326 0.13 0 0.66-0.856 1.18-1.901zm-1.81-3.27c-0.11-0.396-0.01-0.609 0.26-0.609 0.24 0 0.43 0.274 0.43 0.609 0 0.334-0.12 0.608-0.27 0.608-0.14 0-0.34-0.274-0.42-0.608zm-1.44-0.305c0-0.167 0.14-0.304 0.31-0.304 0.16 0 0.3 0.137 0.3 0.304 0 0.168-0.14 0.305-0.3 0.305-0.17 0-0.31-0.137-0.31-0.305zm2.49-1.096c0.12-0.658 1.07-0.938 1.56-0.458 0.4 0.41 0.28 0.537-0.81 0.81-0.74 0.186-0.85 0.134-0.75-0.352zm2.68-0.576c0-0.252 0.24-0.461 0.54-0.466 0.48-0.009 0.48-0.049-0.05-0.449-0.51-0.388-0.63-0.378-1.01 0.085-0.38 0.473-0.39 0.459-0.1-0.139 0.4-0.839 0.41-1.406 0.02-1.161-0.17 0.104-0.31-0.017-0.31-0.268s0.15-0.547 0.33-0.657c0.17-0.111 0.26-0.365 0.18-0.564-0.08-0.207 0.14-0.377 0.51-0.395 0.36-0.017 0.48 0.035 0.27 0.115-0.23 0.089-0.36 0.646-0.33 1.414l0.04 1.268 0.21-1.217c0.2-1.177 0.21-1.192 0.52-0.456 0.18 0.418 0.44 0.692 0.59 0.608s0.28 0.181 0.3 0.589c0.04 0.71 0.02 0.716-0.39 0.156-0.4-0.547-0.42-0.526-0.35 0.332 0.07 0.975-0.21 1.661-0.68 1.661-0.16 0-0.29-0.206-0.29-0.456zm-2.13-1.369c0-0.356 0.21-0.609 0.49-0.609 0.32 0 0.43 0.166 0.31 0.482-0.1 0.264-0.19 0.538-0.19 0.608s-0.13 0.127-0.3 0.127-0.31-0.274-0.31-0.608zm-0.3-1.199c0-0.177 0.14-0.322 0.3-0.322 0.17 0 0.31 0.06 0.31 0.134s-0.14 0.219-0.31 0.322c-0.16 0.103-0.3 0.043-0.3-0.134zm-5.17-1.977c0-0.074 0.14-0.219 0.3-0.323 0.17-0.103 0.31-0.042 0.31 0.135s-0.14 0.322-0.31 0.322c-0.16 0-0.3-0.061-0.3-0.134zm5.06-1.843c-0.1-0.251-0.04-0.457 0.12-0.457s0.29 0.206 0.29 0.457-0.05 0.456-0.12 0.456c-0.06 0-0.19-0.205-0.29-0.456zm4.99-1.799c-0.24-0.6-0.61-1.091-0.83-1.091-0.53 0-0.5-0.243 0.07-0.819 0.56-0.556 0.53-0.586 1.03 1.012 0.51 1.613 0.29 2.335-0.27 0.898zm-5.03 0.43c-0.11-0.167 0.02-0.304 0.28-0.304 0.27 0 0.48 0.137 0.48 0.304s-0.13 0.304-0.29 0.304-0.37-0.137-0.47-0.304zm-2.59-2.89c0.21-0.251 0.43-0.456 0.5-0.456 0.06 0 0.11 0.205 0.11 0.456s-0.22 0.456-0.49 0.456c-0.41 0-0.43-0.082-0.12-0.456zm2.44 0.152c0-0.167 0.21-0.304 0.47-0.304s0.39 0.137 0.29 0.304c-0.11 0.167-0.32 0.304-0.48 0.304s-0.28-0.137-0.28-0.304zm-58.96 17.131c-0.22-0.088-0.48-0.077-0.58 0.024s0.08 0.173 0.4 0.16c0.35-0.015 0.42-0.087 0.18-0.184zm15.96-1.215c-0.08-0.085-0.47-0.053-0.85 0.069l-0.71 0.223 0.68 0.251c0.38 0.139 0.7 0.427 0.72 0.642 0.03 0.214 0.11 0.07 0.18-0.321s0.07-0.779-0.02-0.864zm-17.08 0.814c-0.1-0.167-0.32-0.304-0.47-0.304-0.16 0-0.29 0.137-0.29 0.304 0 0.168 0.21 0.305 0.47 0.305s0.39-0.137 0.29-0.305zm13.07-0.859c-0.13-0.113-0.28-0.049-0.35 0.143-0.07 0.191-0.43 0.282-0.8 0.203-0.6-0.131-0.59-0.104 0.09 0.279 0.65 0.363 0.8 0.363 1.02 0.003 0.14-0.233 0.16-0.515 0.04-0.628zm1.68 0.555c0-0.167-0.24-0.302-0.53-0.299-0.45 0.004-0.47 0.047-0.08 0.299 0.58 0.371 0.61 0.371 0.61 0zm-4.03-0.211c-0.3-0.077-0.71-0.072-0.92 0.012-0.2 0.083 0.04 0.146 0.54 0.14s0.67-0.075 0.38-0.152zm11.39 0.003c-0.22-0.087-0.48-0.077-0.58 0.024s0.08 0.173 0.4 0.16c0.35-0.015 0.42-0.087 0.18-0.184zm22.07-0.882c-0.29-0.29-0.87 0.18-0.65 0.529 0.13 0.208 0.3 0.203 0.51-0.016 0.18-0.179 0.25-0.41 0.14-0.513zm-22.55-0.957c-0.1-0.101-0.17 0.079-0.16 0.399 0.01 0.355 0.09 0.427 0.18 0.184 0.09-0.219 0.08-0.482-0.02-0.583zm-0.49-0.082c0-0.168-0.13-0.304-0.29-0.304-0.15 0-0.37 0.136-0.47 0.304-0.1 0.167 0.03 0.304 0.29 0.304s0.47-0.137 0.47-0.304zm22.81-0.295c0-0.162-0.2-0.216-0.45-0.119-0.25 0.096-0.46 0.228-0.46 0.294s0.21 0.12 0.46 0.12 0.45-0.133 0.45-0.295zm13.27-0.535c-0.1-0.101-0.18 0.078-0.16 0.399 0.01 0.354 0.08 0.426 0.18 0.184 0.09-0.22 0.08-0.482-0.02-0.583zm-0.87-0.597c-0.29-0.283-0.62-0.412-0.74-0.288-0.13 0.125-0.03 0.354 0.22 0.51 0.74 0.468 1.07 0.328 0.52-0.222zm-2.16-2.358c-0.44-0.412-0.81-0.6-0.81-0.419 0 0.402 1.26 1.53 1.47 1.319 0.08-0.083-0.21-0.488-0.66-0.9zm-26.21-0.474c0.11-0.167-0.02-0.304-0.28-0.304s-0.48 0.137-0.48 0.304 0.13 0.304 0.29 0.304 0.37-0.137 0.47-0.304zm26.78-0.631c0.11-0.347 0.12-0.712 0.02-0.811s-0.18 0.048-0.18 0.327-0.14 0.507-0.3 0.507c-0.17 0-0.31 0.137-0.31 0.304 0 0.555 0.57 0.315 0.77-0.327zm-25.72-0.27c0.75-0.475 0.22-0.589-0.75-0.16-0.71 0.312-0.78 0.408-0.31 0.424 0.34 0.01 0.81-0.108 1.06-0.264zm2.78-1.625c-0.25-0.241-0.34-0.162-0.34 0.285 0 0.805 0.43 1.231 0.56 0.563 0.06-0.284-0.04-0.665-0.22-0.848zm-2.47-1.834c0-0.631-0.36-0.839-0.81-0.467-0.58 0.49-0.5 0.873 0.2 0.873 0.34 0 0.61-0.183 0.61-0.406zm2.2-1.475c-0.19-0.19-0.23 0.01-0.12 0.565 0.13 0.637 0.21 0.713 0.29 0.295 0.07-0.311-0.01-0.698-0.17-0.86zm-0.68 0.664c0-0.167-0.14-0.304-0.32-0.304s-0.24 0.137-0.13 0.304c0.1 0.167 0.25 0.304 0.32 0.304s0.13-0.137 0.13-0.304zm-2.31-0.741c-0.09-0.241-0.36-0.363-0.6-0.273-0.51 0.198-0.27 0.71 0.34 0.71 0.24 0 0.35-0.185 0.26-0.437zm2.92-2.32c0-0.818-0.09-0.893-1.06-0.893-0.59 0-1.07 0.136-1.07 0.304 0 0.167 0.21 0.304 0.46 0.304s0.46 0.245 0.46 0.544c0 0.325 0.24 0.562 0.6 0.589 0.48 0.036 0.61-0.142 0.61-0.848zm-17.64-0.893c0-0.168-0.15-0.304-0.32-0.304-0.18 0-0.24 0.136-0.14 0.304 0.11 0.167 0.25 0.304 0.33 0.304 0.07 0 0.13-0.137 0.13-0.304zm16.57-1.416c-0.84-0.614-1.23-0.493-0.61 0.192 0.3 0.33 0.69 0.515 0.86 0.41 0.18-0.114 0.08-0.358-0.25-0.602zm10.4-1.094c-0.08-0.209-0.15-0.038-0.15 0.38 0 0.419 0.07 0.59 0.15 0.381s0.08-0.552 0-0.761zm-11.46-0.246c0-0.157-0.13-0.286-0.3-0.286s-0.31 0.213-0.31 0.474 0.14 0.39 0.31 0.286c0.17-0.103 0.3-0.316 0.3-0.474zm1.16-0.347c0.2-0.201 0.36-0.564 0.36-0.808 0-0.351-0.12-0.329-0.6 0.108-0.63 0.566-0.8 1.065-0.37 1.065 0.13 0 0.41-0.164 0.61-0.365zm-24.58-0.395c0-0.251-0.13-0.457-0.29-0.457-0.17 0-0.22 0.206-0.12 0.457 0.09 0.25 0.23 0.456 0.29 0.456 0.07 0 0.12-0.206 0.12-0.456zm34.57-1.451c-0.08-0.206-0.14 0.036-0.14 0.538 0.01 0.502 0.08 0.67 0.15 0.374 0.08-0.296 0.08-0.706-0.01-0.912zm20.87 0.792c-0.21-0.085-0.31-0.279-0.21-0.432 0.09-0.153 0.03-0.278-0.14-0.278-0.16 0-0.38 0.125-0.47 0.278-0.17 0.275 0.3 0.586 0.89 0.586 0.17 0 0.14-0.069-0.07-0.154zm-31.25-0.715c0.1-0.17 0.32-0.231 0.47-0.134 0.34 0.21 0.33-0.103-0.02-0.926-0.23-0.532-0.26-0.541-0.28-0.066-0.01 0.298-0.23 0.62-0.48 0.716-0.5 0.193-0.63 0.719-0.17 0.719 0.16 0 0.37-0.139 0.48-0.309zm-30.07-4.336c-0.09-0.206-0.15 0.036-0.14 0.538 0 0.502 0.07 0.671 0.15 0.375s0.07-0.707-0.01-0.913zm18.35-0.258c0-0.167-0.13-0.22-0.3-0.116-0.17 0.103-0.31 0.325-0.31 0.492s0.14 0.22 0.31 0.116c0.17-0.103 0.3-0.325 0.3-0.492zm53.05-5.988c0.11-0.181 0.27-1.741 0.35-3.465s0.36-3.778 0.62-4.564c0.35-1.059 0.39-1.585 0.15-2.033-0.18-0.332-0.33-0.818-0.33-1.078s-0.46-1.084-1.03-1.83-1.13-1.91-1.25-2.587c-0.24-1.454-0.76-1.942-0.76-0.719 0 0.47 0.41 1.723 0.91 2.783 0.56 1.164 0.92 2.422 0.92 3.173 0 1.187-1.87 8.286-2.49 9.442-0.47 0.877 0 2.182 1.21 3.397l1.12 1.126 0.19-1.657c0.1-0.911 0.27-1.806 0.39-1.988zm-53.05 2.678c0-0.167-0.51-0.291-1.14-0.274-1.02 0.027-1.06 0.056-0.38 0.274 1.09 0.348 1.52 0.348 1.52 0zm22.51-1.369c0-0.251-0.05-0.456-0.12-0.456-0.06 0-0.2 0.205-0.29 0.456-0.1 0.251-0.04 0.456 0.12 0.456s0.29-0.205 0.29-0.456zm-8.22-1.463c0-0.366-0.13-0.872-0.29-1.123-0.22-0.333-0.3-0.103-0.3 0.855-0.01 0.797 0.11 1.237 0.3 1.123 0.16-0.104 0.3-0.488 0.29-0.855zm9.13-8.879c-0.2-0.251-0.51-0.457-0.68-0.457s-0.13 0.202 0.08 0.457c0.2 0.251 0.51 0.456 0.68 0.456s0.14-0.202-0.08-0.456zm0.77-0.761c-0.11-0.167-0.25-0.304-0.33-0.304-0.07 0-0.13 0.137-0.13 0.304 0 0.168 0.14 0.304 0.32 0.304s0.24-0.136 0.14-0.304zm-0.92-1.216c-0.1-0.168-0.25-0.305-0.32-0.305s-0.13 0.137-0.13 0.305c0 0.167 0.14 0.304 0.32 0.304s0.24-0.137 0.13-0.304zm15.67-3.346c0-0.335-0.14-0.609-0.31-0.609-0.16 0-0.3-0.151-0.3-0.336s-0.35-0.615-0.79-0.954c-0.49-0.387-0.73-0.823-0.64-1.165 0.08-0.301-0.02-0.612-0.23-0.692-0.27-0.102-0.34-0.754-0.25-2.2333l0.13-2.0891-1.11-0.5312c-1.47-0.6998-4.41-1.0035-5.27-0.5438-0.86 0.4582-0.84 0.6119 0.24 1.7966 0.72 0.7821 0.82 1.0288 0.46 1.1649-0.25 0.095-0.45 0.295-0.45 0.4444 0 0.3975 1.04 0.3315 1.46-0.0934 0.29-0.2839 0.37-0.267 0.37 0.076 0 0.5319 0.88 1.5969 3.57 4.3199 2.05 2.084 3.12 2.577 3.12 1.445zm12.4-5.34c-0.07-0.071-0.56-0.2165-1.09-0.3228-1.3-0.2603-1.28 0.3898 0.02 0.7358 0.86 0.228 1.48-0.008 1.07-0.413zm-3.77-0.146c0.15-0.1379-0.54-0.2501-1.52-0.2495-1.64 0.001-1.74 0.0383-1.19 0.4435 0.61 0.443 2.15 0.333 2.71-0.194zm1.82-1.6493c1.15 0.0572 2.16 0.1802 2.26 0.2734 0.32 0.3199 0.67 0.1687 0.67-0.287 0-0.3336-0.35-0.457-1.29-0.4589-0.71-0.0015-2.01-0.089-2.89-0.1945-1.51-0.1816-1.6-0.1553-1.6 0.4962 0 0.5132 0.1 0.6091 0.38 0.3774 0.21-0.1709 1.32-0.2638 2.47-0.2066zm4.04-1.5214c-0.09-0.2582-0.41-0.4694-0.7-0.4694s-0.8-0.2529-1.15-0.5621c-0.75-0.6739-3.07-1.611-3.33-1.3482-0.38 0.3803-0.18 1.0608 0.26 0.8912 0.45-0.1708 2.23 0.549 3.96 1.6008 1.02 0.6127 1.23 0.5873 0.96-0.1123zm-5.98-0.9078c-0.01-0.1771-0.21-0.0564-0.46 0.2684s-0.44 0.7354-0.44 0.9126c0.01 0.1771 0.21 0.0563 0.46-0.2684 0.24-0.3248 0.44-0.7354 0.44-0.9126zm6.7-0.9038c0-0.6384-0.33-0.8573-2.49-1.683-1.93-0.7387-2.54-0.8626-2.73-0.5589-0.15 0.2486-0.05 0.463 0.28 0.5909 0.29 0.1104 1.31 0.5005 2.26 0.867 0.96 0.3664 1.9 0.8578 2.09 1.092 0.49 0.5886 0.59 0.5386 0.59-0.308zm-67.31 27.014c-0.12-0.122-0.22-0.432-0.22-0.688 0-0.343 0.09-0.377 0.34-0.128 0.18 0.186 0.28 0.496 0.22 0.688-0.07 0.192-0.22 0.25-0.34 0.128zm1.2-0.019c-0.37-0.372-0.21-0.71 0.33-0.686 0.32 0.015 0.38 0.085 0.15 0.178-0.21 0.085-0.31 0.279-0.21 0.433 0.2 0.323 0.02 0.371-0.27 0.075zm6.96-0.642c-0.06-0.057-0.03-0.364 0.05-0.682 0.13-0.489 0.37-0.559 1.56-0.453 0.78 0.069 1.66 0.132 1.97 0.14s0.46 0.155 0.34 0.345c-0.11 0.182-0.46 0.263-0.78 0.181-0.31-0.083-0.57-0.041-0.57 0.094 0 0.236-2.36 0.582-2.57 0.375zm1.41-0.58c-0.22-0.088-0.48-0.077-0.58 0.024s0.07 0.173 0.4 0.16c0.35-0.015 0.42-0.087 0.18-0.184zm-7.36 0.208c0-0.167 0.14-0.304 0.31-0.304 0.16 0 0.3 0.137 0.3 0.304s-0.14 0.304-0.3 0.304c-0.17 0-0.31-0.137-0.31-0.304zm-2.13-0.566c0-0.144 0.34-0.197 0.76-0.117s0.76 0.198 0.76 0.262-0.34 0.117-0.76 0.117-0.76-0.118-0.76-0.262zm4.42-0.034c-0.09-0.143-0.74-0.348-1.45-0.455-2.16-0.328-2.62-0.676-2.37-1.798 0.12-0.532 0.18-1.265 0.12-1.628s0.04-0.744 0.2-0.848c0.46-0.279 0.05-0.756-0.47-0.557-0.25 0.094-0.45 0.004-0.45-0.201 0-0.219 0.25-0.308 0.6-0.217 0.79 0.207 0.85-0.09 0.51-2.554-0.23-1.746-0.34-2.009-0.65-1.59-0.2 0.277-0.52 0.405-0.72 0.286-0.43-0.266-0.46-1.093-0.04-1.093 0.17 0 0.3-0.146 0.3-0.325 0-0.193-0.26-0.241-0.65-0.117-0.52 0.166-0.62 0.107-0.47-0.283 0.11-0.271 0.07-0.492-0.07-0.492-0.15 0-0.34 0.206-0.44 0.457-0.28 0.723-1.19 0.58-0.95-0.15 0.1-0.333 0.08-0.778-0.05-0.988-0.16-0.257-0.31-0.082-0.44 0.529-0.19 0.877-0.2 0.868-0.24-0.248-0.03-1.063-0.09-1.142-0.72-0.936-1.56 0.515-1.88 0.351-2.1-1.097-0.27-1.78-0.31-5.285-0.06-5.932 0.15-0.4046 0.25-0.425 0.45-0.101 0.19 0.303 0.26 0.31 0.26 0.025 0.01-0.209 0.15-0.3801 0.33-0.3801 0.19 0 0.24 0.2594 0.13 0.6081-0.11 0.349-0.05 0.609 0.14 0.609 0.17 0 0.32-0.214 0.32-0.475 0-0.26 0.14-0.389 0.3-0.286 0.17 0.104 0.31-0.084 0.31-0.4158 0-0.7029 0.71-0.9316 1.91-0.6104 0.5 0.1358 0.77 0.1126 0.66-0.0578-0.1-0.1656 0.65-0.2846 1.8-0.2846 1.09 0 2.07 0.1462 2.18 0.3249s0.38 0.2579 0.59 0.1759 0.53-0.0047 0.71 0.1717c0.18 0.1774 0.57 0.2184 0.87 0.0917 0.31-0.1261 1.24-0.2906 2.07-0.3656s1.67-0.2626 1.85-0.417c0.19-0.1543 0.43-0.1916 0.54-0.083 0.32 0.319-0.42 1.0109-1.13 1.0492-0.52 0.0284-0.54 0.0629-0.11 0.1751 0.3 0.0767 0.46 0.2667 0.36 0.4207-0.28 0.465 0.39 0.317 0.91-0.197 0.53-0.5279 2.64-0.7554 3.82-0.4115 0.54 0.1565 0.23 0.2302-1.06 0.2525-1.45 0.025-2.09 0.204-3.08 0.867-1.03 0.683-1.19 0.904-0.86 1.212 0.23 0.207 0.62 0.295 0.88 0.196 0.26-0.1 0.47-0.03 0.47 0.155s-0.23 0.337-0.51 0.337-0.73 0.208-1.02 0.463c-0.63 0.572-1.51 0.282-1.51-0.496 0-0.317-0.2-0.576-0.43-0.576-0.61 0-1.52 0.954-1.14 1.189 0.18 0.108-0.07 0.69-0.58 1.378-0.49 0.656-0.9 0.996-0.91 0.758-0.02-0.262-0.13-0.192-0.29 0.174-0.36 0.837-0.36 1.134 0 0.912 0.26-0.158 0.5 1.756 0.34 2.684-0.03 0.138 0.08 0.174 0.23 0.08 0.33-0.205 0.65 0.742 0.82 2.407 0.09 0.899 0.04 1.058-0.16 0.609-0.15-0.335-0.28-0.917-0.29-1.293-0.03-0.822-0.63-0.931-0.63-0.114 0 0.313 0.22 1.169 0.49 1.901s0.48 1.646 0.46 2.032c-0.02 0.456 0.09 0.626 0.31 0.485 0.22-0.131 0.27-0.081 0.14 0.127-0.29 0.476 0.48 1.835 1.76 3.097 1.11 1.097 1.38 1.802 0.72 1.856-0.21 0.017-0.89 0.078-1.52 0.135-0.62 0.057-1.2-0.014-1.29-0.157zm-2.29-2.442c0-0.167-0.21-0.304-0.47-0.304s-0.39 0.137-0.29 0.304 0.32 0.304 0.48 0.304c0.15 0 0.28-0.137 0.28-0.304zm-2.66-15.818c0.31 0 0.48-0.137 0.38-0.304-0.26-0.426 0.26-0.38 0.7 0.061 0.28 0.284 0.37 0.212 0.37-0.323 0-0.539-0.15-0.668-0.69-0.593-0.51 0.071-0.71-0.075-0.78-0.59-0.13-0.9382-0.67-0.8692-0.59 0.076 0.03 0.419 0.17 0.761 0.3 0.761 0.5 0 0.21 0.545-0.37 0.696-0.34 0.088-0.61 0.337-0.61 0.553 0 0.306 0.08 0.312 0.36 0.028 0.2-0.2 0.62-0.365 0.93-0.365zm2.3-0.988c-0.47-1.3823-0.55-1.4011-0.55-0.127 0 0.771 0.14 1.115 0.44 1.115 0.36 0 0.38-0.174 0.11-0.988zm4.94-0.176c-0.85-0.128-1.63 0.164-1.4 0.527 0.1 0.165 0.56 0.134 1.12-0.074 0.84-0.312 0.87-0.365 0.28-0.453zm-8.53-0.339c0-0.41-0.56-0.6951-0.92-0.471-0.17 0.105-0.23 0.319-0.13 0.475 0.22 0.369 1.05 0.367 1.05-0.004zm3.4-1.442c-0.22-0.0879-0.48-0.0771-0.58 0.024s0.08 0.1729 0.4 0.1597c0.35-0.0146 0.42-0.0866 0.18-0.1837zm11.43 21.286c0.37-0.072 0.99-0.072 1.37 0 0.37 0.073 0.06 0.132-0.69 0.132s-1.06-0.059-0.68-0.132zm-16.84-1.875c0.02-0.412 0.22-0.812 0.44-0.887 0.3-0.099 0.36 0.041 0.21 0.507-0.12 0.382-0.07 0.645 0.12 0.645 0.18 0 0.32 0.128 0.32 0.285s-0.25 0.266-0.56 0.243c-0.39-0.03-0.55-0.269-0.53-0.793zm33.72 0.459c-0.85-0.42-0.89-0.808-0.08-0.65 0.8 0.152 1.22 0.422 1.22 0.778 0 0.345-0.24 0.318-1.14-0.128zm-13.25-0.118c-0.36-0.636-0.5-1.902-0.21-1.902 0.17 0 0.45-0.344 0.61-0.765 0.26-0.675 1.34-1.364 2.14-1.364 0.15 0 0.5 0.336 0.77 0.747 0.56 0.86 0.32 1.619-0.34 1.071-0.33-0.273-0.45-0.123-0.61 0.749-0.29 1.545-0.89 1.816-0.66 0.294 0.17-1.08 0.15-1.135-0.25-0.606-0.25 0.333-0.36 0.884-0.25 1.292 0.14 0.573 0.05 0.712-0.45 0.712-0.34 0-0.68-0.103-0.75-0.228zm4.86-0.888c-0.33-0.332-0.23-1.014 0.15-1.014 0.2 0 0.27 0.091 0.16 0.201s-0.05 0.383 0.13 0.608c0.34 0.408-0.06 0.591-0.44 0.205zm-16.01-1.447c-0.46-1.189-0.37-1.376 0.18-0.376 0.25 0.475 0.39 0.939 0.3 1.031-0.1 0.092-0.31-0.203-0.48-0.655zm19.62 0.448c-0.25-0.405 1-1.511 1.72-1.525 0.8-0.016 2.07 0.65 2.07 1.085 0 0.305-0.18 0.295-0.84-0.047-1.09-0.573-1.28-0.556-2.07 0.191-0.45 0.42-0.75 0.519-0.88 0.296zm-2.4-0.894c0.26-1.077 0.38-1.25 0.86-1.25 0.46 0 0.91 1.047 0.64 1.482-0.09 0.149-0.51 0.336-0.93 0.416-0.68 0.131-0.74 0.069-0.57-0.648zm-23.85-0.083c-0.21-0.206-0.38-0.583-0.38-0.836 0-0.399 0.07-0.395 0.49 0.03 0.27 0.271 0.44 0.648 0.38 0.838-0.08 0.249-0.22 0.24-0.49-0.032zm37.26-0.454c0.2-0.083 0.62-0.088 0.91-0.011 0.3 0.077 0.13 0.145-0.37 0.151-0.5 0.007-0.75-0.056-0.54-0.14zm-42.3-1.524c-0.31-0.303-0.25-1.38 0.06-1.189 0.35 0.216 0.66 1.392 0.37 1.392-0.13 0-0.32-0.091-0.43-0.203zm28.01-1.391c-0.77-0.877-1.36-1.641-1.3-1.698 0.26-0.263 1.38 0.65 1.98 1.615 0.48 0.774 0.88 1.074 1.47 1.09 0.73 0.019 0.75 0.048 0.21 0.283-0.34 0.143-0.69 0.271-0.78 0.283-0.1 0.011-0.81-0.696-1.58-1.573zm-23.76-0.079c0.11-0.289-0.01-0.456-0.32-0.456-0.27 0-0.49-0.103-0.49-0.229s0.72-0.247 1.6-0.269 1.43 0.024 1.22 0.102-0.38 0.321-0.38 0.54c0 0.411-0.65 0.768-1.39 0.768-0.25 0-0.35-0.186-0.24-0.456zm-3.64-0.659c-0.12-0.112-0.2-0.557-0.18-0.989 0.02-0.771 0.03-0.769 0.29 0.112 0.28 0.925 0.24 1.23-0.11 0.877zm35.84-1.014c-0.1-0.167-0.04-0.304 0.13-0.304 0.18 0 0.33 0.137 0.33 0.304s-0.07 0.304-0.14 0.304-0.22-0.137-0.32-0.304zm-33.01-0.743c0-0.534 0.19-0.613 0.45-0.191 0.09 0.156 0.03 0.369-0.14 0.475-0.17 0.104-0.31-0.023-0.31-0.284zm18.81-2.331c-0.48-0.536-0.75-1.115-0.64-1.387 0.35-0.926 1.52-1.825 2.24-1.716 0.9 0.138 1.16 0.397 0.4 0.397-1.03 0-1.99 0.89-1.89 1.755 0.05 0.431 0.25 0.834 0.44 0.896 0.22 0.071 0.28-0.183 0.18-0.709-0.31-1.637 2.11-2.245 3.66-0.917 0.46 0.395 0.84 0.818 0.84 0.939s-0.43-0.135-0.94-0.568c-0.52-0.433-1.14-0.787-1.39-0.787-0.73 0-1.63 0.593-1.63 1.075 0 0.582 0.49 0.575 0.72-0.011 0.26-0.682 1.61-0.555 2.14 0.202 0.56 0.802 0.38 1.167-0.58 1.167-0.4 0-0.79 0.107-0.87 0.238s-0.53 0.262-1.01 0.291c-0.61 0.039-1.09-0.208-1.67-0.865zm4.79 0.669c-0.1-0.152 0.1-0.204 0.44-0.117 0.71 0.186 0.8 0.393 0.17 0.393-0.25 0-0.52-0.125-0.61-0.276zm-17.06-0.333c-0.1-0.167-0.04-0.304 0.14-0.304s0.32 0.137 0.32 0.304-0.06 0.304-0.13 0.304c-0.08 0-0.22-0.137-0.33-0.304zm18.41-0.621c0-0.175-0.34-0.682-0.75-1.127-0.41-0.444-0.68-0.878-0.6-0.964 0.21-0.202 1.96 1.668 1.96 2.087 0 0.177-0.14 0.321-0.31 0.321-0.16 0-0.3-0.143-0.3-0.317zm1.6-1.101c-0.21-0.085-0.39-0.294-0.39-0.465 0-0.18 0.23-0.216 0.54-0.086 0.29 0.124 1.01 0.329 1.59 0.454l1.07 0.228-1.22 0.011c-0.67 0.006-1.39-0.058-1.59-0.142zm-1.22-3.651c-0.21-0.084-0.38-0.295-0.38-0.469 0-0.207 0.14-0.199 0.41 0.023 0.22 0.186 0.49 0.248 0.6 0.138s0.2-0.04 0.2 0.155c0 0.372-0.2 0.409-0.83 0.153zm-3.27-0.851c-2.09-0.332-3.98-1.046-2.83-1.067 0.28-0.005 0.58 0.108 0.67 0.253 0.09 0.144 1.07 0.334 2.17 0.422 1.81 0.146 2.59 0.363 2.24 0.632-0.07 0.055-1.08-0.053-2.25-0.24zm-5.02-1.667c0-0.177 0.14-0.322 0.3-0.322 0.17 0 0.31 0.06 0.31 0.134s-0.14 0.219-0.31 0.322c-0.16 0.104-0.3 0.043-0.3-0.134zm1.91 0.103c0.1-0.101 0.36-0.112 0.58-0.024 0.24 0.097 0.17 0.169-0.18 0.183-0.32 0.014-0.5-0.058-0.4-0.159zm-21.38-1.3374c0.59-0.3812 0.91-0.3812 0.91 0 0 0.1673-0.3 0.3021-0.68 0.2995-0.55-0.0038-0.6-0.0611-0.23-0.2995zm18.17 0.1187c-0.1-0.1028-0.57-0.2236-1.04-0.2686-1.13-0.108-1.92-0.4509-1.92-0.8325 0-0.1699 0.22-0.1262 0.49 0.0971 0.42 0.3451 0.55 0.3184 0.92-0.1776 0.41-0.5705 0.43-0.5685 0.89 0.0875 0.52 0.7388 1.12 0.9151 0.87 0.2537-0.12-0.3084 0.04-0.378 0.63-0.2663 0.43 0.0832 0.75 0.1698 0.7 0.1926s-0.37 0.2798-0.72 0.5711c-0.35 0.2914-0.72 0.4457-0.82 0.343zm-11.09-0.9109c0.1-0.1011 0.36-0.1119 0.58-0.024 0.25 0.0971 0.17 0.1692-0.18 0.1838-0.32 0.0132-0.5-0.0587-0.4-0.1598zm4.95-0.5006c0.29-0.9301 0.39-1.0064 0.81-0.5881 0.28 0.272 0.28 0.3599 0.01 0.3599-0.2 0-0.28 0.2054-0.18 0.4563 0.11 0.2936-0.01 0.4563-0.34 0.4563-0.38 0-0.46-0.1634-0.3-0.6844zm-6.78 0.1964c0.11-0.101 0.37-0.1119 0.59-0.024 0.24 0.0971 0.17 0.1692-0.19 0.1838-0.32 0.0132-0.5-0.0587-0.4-0.1598zm3.96-1.0254c-0.05-0.7347 0.11-0.771 0.72-0.1596 0.25 0.2509 0.39 0.4563 0.31 0.4563s-0.34 0.0718-0.57 0.1595c-0.26 0.1-0.43-0.0704-0.46-0.4562zm-9.59-1.2487c0.1-0.4113 0.24-0.5492 0.32-0.3213 0.07 0.2194-0.01 0.5436-0.19 0.7203-0.23 0.2258-0.27 0.107-0.13-0.399zm1.98-0.2695c-0.29-0.4548-0.71-0.6186-1.6-0.6186-1.19 0-1.22-0.0203-1.22-1.0972 0-0.8755 0.1-1.0599 0.49-0.9126 0.26 0.1016 0.64 0.189 0.83 0.1943 0.2 0.0054 0.12 0.1898-0.17 0.4099-0.49 0.3701-0.47 0.4264 0.24 0.7489 0.62 0.2841 0.8 0.2645 0.94-0.1056 0.18-0.4727 0.93-0.5875 1.76-0.2698 0.86 0.33 0.52 0.8127-0.44 0.6214-0.85-0.17-1.32 0.2222-0.57 0.4729 0.19 0.0622 0.29 0.352 0.23 0.644-0.1 0.4777-0.15 0.4689-0.49-0.0876zm2.13-1.1066c0.11-0.1011 0.37-0.1119 0.59-0.024 0.24 0.0971 0.17 0.1692-0.19 0.1838-0.32 0.0132-0.5-0.0587-0.4-0.1598zm3.01-1.033c0-0.4182 0.07-0.5893 0.15-0.3802 0.09 0.2091 0.09 0.5513 0 0.7605-0.08 0.2091-0.15 0.038-0.15-0.3803z" transform="translate(10 1332.7)"/>
- <rect id="d0e135" display="none" height="1e3px" width="288" y="1475.9" x="10"/>
+ <text id="tracing-f05-fr.svgtext2879" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 1322.7)" xml:space="preserve" line-height="100.00000%" font-size="6" y="128.14566" x="81.327339" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f05-fr.svgtspan2880" y="128.14566" x="81.327339" sodipodi:role="line">Image originale</tspan></text>
+ <text id="tracing-f05-fr.svgtext2882" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 1322.7)" xml:space="preserve" line-height="100.00000%" font-size="6" y="124.44067" x="227.33034" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f05-fr.svgtspan2883" y="124.44067" x="227.33034" sodipodi:role="line">Image vectorisée / Chemin résultant</tspan><tspan id="tracing-f05-fr.svgtspan2893" y="130.44067" x="227.33034" sodipodi:role="line">(1 551 nœuds)</tspan></text>
+ <image id="tracing-f05-fr.svgimage1651" sodipodi:absref="/oldguitar.jpg" xlink:href="oldguitar.jpg" transform="translate(10 1322.7)" height="115.89" width="83.347" y=".000066406" x="39.654"/>
+ <path id="tracing-f05-fr.svgpath1653" d="m185.42 89.583v-26.312l0.69-0.042 0.68-0.041-0.69-0.133-0.69-0.133 0.02-14.959 0.03-14.959 0.95-0.068c0.52-0.037 1.06-0.242 1.19-0.456 0.18-0.284 0.25-0.245 0.25 0.144 0.01 0.921 1.05 0.497 1.31-0.532 0.11-0.467 0.16-0.413 0.18 0.228 0.03 0.702 0.17 0.836 0.88 0.832 0.63-0.004 0.72-0.073 0.38-0.288-0.24-0.156-0.36-0.366-0.26-0.466 0.1-0.101 0.38 0.011 0.62 0.249 0.45 0.456 4.62 0.633 4.34 0.185-0.08-0.128 0.03-0.311 0.24-0.407 0.21-0.097 0.07-0.099-0.31-0.006-0.37 0.093-0.68 0.047-0.68-0.104 0-0.514 0.31-0.583 1.69-0.373 0.75 0.114 1.45 0.093 1.53-0.049 0.22-0.357 0.73-0.324 0.73 0.047 0 0.167-0.2 0.304-0.45 0.304s-0.46 0.127-0.46 0.283c0 0.155-0.31 0.341-0.68 0.411-0.38 0.071-0.17 0.127 0.47 0.124 0.63-0.003 1.22-0.12 1.31-0.26 0.08-0.14 0.43-0.254 0.76-0.254 0.34 0 0.53-0.129 0.43-0.286-0.09-0.157 0.07-0.294 0.37-0.304 1.91-0.063 3.68-0.251 4.34-0.46 0.42-0.133 0.66-0.135 0.53-0.004-0.12 0.131 0.07 0.446 0.44 0.7 0.77 0.54 6.33 0.862 6.33 0.368 0-0.165-0.21-0.22-0.46-0.124s-0.45 0.046-0.45-0.111-0.21-0.286-0.46-0.286-0.46 0.091-0.46 0.203c0 0.111-0.21 0.202-0.47 0.202s-0.42-0.206-0.36-0.481c0.06-0.31 0.37-0.454 0.85-0.405 0.58 0.06 0.64 0.012 0.29-0.223-0.67-0.438-1.26-0.377-1.66 0.171-0.27 0.374-0.62 0.432-1.55 0.258-1.15-0.217-1.17-0.238-0.46-0.552 0.55-0.246 0.76-0.234 0.86 0.047 0.17 0.509 0.68 0.475 0.68-0.044 0-0.863 1.73-0.81 4.02 0.122 1.22 0.497 2.3 0.903 2.4 0.904 0.36 0.002 0.51-3.488 0.16-3.709-0.18-0.116-0.23-0.307-0.12-0.424 0.43-0.428 1.2 0.59 1.04 1.379-0.14 0.706 0.36 1.842 0.81 1.842 0.1 0 0.34-0.513 0.52-1.141 0.53-1.745 1.51-2.804 2.32-2.495 0.53 0.2 0.64 0.438 0.53 1.138-0.2 1.236 0.5 1.702 2.63 1.757l1.78 0.045-0.17-0.945c-0.1-0.519-0.57-1.45-1.05-2.067-0.48-0.618-0.88-1.388-0.88-1.712 0-0.842-0.62-1.243-2.25-1.468-0.9-0.123-1.77-0.489-2.33-0.98-1.23-1.081-1.12-1.38 0.24-0.65 1.28 0.686 2.82 0.809 2.82 0.226 0-0.211-0.31-0.731-0.68-1.156-0.9-1.012-1.45-1.989-1.45-2.575 0-0.506 0.39-0.288 1.43 0.807 0.26 0.272 0.69 0.436 0.96 0.365 0.31-0.079 0.62 0.141 0.8 0.57 0.31 0.694 3.24 2.095 4.56 2.181 0.34 0.021 0.92 0.347 1.29 0.724l0.67 0.684h-0.69c-0.37 0-0.81 0.114-0.97 0.253s-0.9 0.425-1.64 0.636c-1.57 0.448-1.17 0.985 0.54 0.709 0.9-0.147 1.03-0.097 0.87 0.331-0.14 0.354-0.03 0.504 0.35 0.504 0.56 0 1.86 1.176 1.88 1.693 0 0.157 0.34 0.524 0.74 0.817l0.73 0.533 0.22-1.422c0.23-1.58-0.03-6.439-0.43-7.856l-0.26-0.913-0.21 1.141c-0.12 0.627-0.35 1.141-0.5 1.141-0.16 0-1.08-0.42-2.04-0.932-1.75-0.928-3.12-2.223-3.13-2.947 0-0.556-0.93-0.464-1.37 0.135-0.35 0.476-0.42 0.478-0.87 0.02-0.36-0.357-0.4-0.558-0.15-0.714 0.25-0.152 0.18-0.348-0.22-0.645-0.54-0.397-0.52-0.416 0.27-0.276 0.74 0.133 0.87 0.041 1.02-0.743 0.24-1.181 0.57-1.143 0.56 0.065 0 0.549 0.18 1.021 0.42 1.104 0.24 0.079 0.35 0.013 0.25-0.148-0.1-0.162 0.01-0.293 0.26-0.293 0.24 0 0.44 0.114 0.44 0.253s0.32 0.254 0.7 0.254 0.85 0.153 1.04 0.342c0.41 0.411 3.13 0.08 3.13-0.381 0-0.694-0.64-1.452-1.08-1.282-0.26 0.098-0.76-0.078-1.11-0.392-0.55-0.48-0.62-0.49-0.47-0.068 0.14 0.381-0.04 0.534-0.74 0.636-1.58 0.233-2.38-0.058-2.38-0.868 0-0.425 0.19-0.741 0.45-0.763 0.59-0.049 0.75-0.095 1.75-0.511 0.46-0.191 1.08-0.26 1.37-0.154 0.4 0.145 0.35-0.007-0.21-0.626-0.41-0.45-0.93-0.75-1.14-0.667-0.22 0.083-0.4-0.049-0.4-0.295 0-0.771-0.5-0.601-1.91 0.642-0.21 0.181-0.54 0.275-0.73 0.21-0.2-0.066-0.66 0.175-1.02 0.536-0.39 0.392-0.89 0.594-1.23 0.503-0.32-0.083-0.58-0.062-0.58 0.048s-0.58 0.2-1.3 0.2c-0.71 0-1.36 0.081-1.44 0.18s-0.63 0.271-1.22 0.383l-1.06 0.202 0.91-0.609c0.5-0.335 0.74-0.609 0.52-0.611-0.32-0.001-0.32-0.082 0-0.439 0.34-0.381 0.44-0.377 0.75 0.03 0.73 0.946 4.33-0.287 6.35-2.173 0.5-0.46 1.99-1.36 3.33-2.0001 1.34-0.6404 3.53-1.7571 4.87-2.4814 2.63-1.4232 2.78-1.4433 7.36-1.0003 2.46 0.2383 2.49 0.2327 2.67-0.4871 0.1-0.4005 0.14-1.7548 0.1-3.0096l-0.09-2.2814 8.67-0.0812c7.53-0.0706 8.71-0.0196 9.01 0.3891 0.3 0.4121 0.37 0.4143 0.52 0.0178 0.14-0.3777 0.87-0.4354 4.37-0.3481 2.31 0.0575 4.3 0.1203 4.43 0.1395 0.17 0.0259 0.12 95.017-0.06 113.12l-0.02 2.5h-41.52-41.53v-26.307zm6.99 25.117c0.42-0.78 0.4-0.93-0.11-0.93-0.4 0-0.79 0.61-0.79 1.24 0 0.49 0.58 0.29 0.9-0.31zm2.36-1.64c0.14-1.09-0.08-1.03-0.49 0.12-0.24 0.69-0.23 0.9 0.03 0.82 0.19-0.07 0.4-0.49 0.46-0.94zm1.18-0.12c-0.1-0.11-0.17 0.07-0.16 0.39 0.02 0.36 0.09 0.43 0.18 0.19 0.09-0.22 0.08-0.48-0.02-0.58zm-2.31-0.52c0-0.4 0.08-0.98 0.18-1.29 0.13-0.4 0-0.34-0.45 0.2-0.74 0.9-0.84 1.83-0.19 1.83 0.28 0 0.46-0.29 0.46-0.74zm-1.8 0.2c0.11-1.07 1.02-3.42 1.34-3.43 0.17 0 0.56-0.55 0.86-1.21 0.31-0.67 0.7-1.21 0.88-1.21 0.17 0 0.78-0.41 1.35-0.91 0.57-0.51 0.94-0.92 0.82-0.92s0.24-0.34 0.8-0.76c0.57-0.41 1.14-0.92 1.27-1.13 0.17-0.28 0.32-0.29 0.57-0.05 0.55 0.56 2.21 0.04 2.71-0.86 0.47-0.82 0.47-0.78-0.59-3.028-0.39-0.83-0.21-2.381 0.28-2.381 0.55 0-0.87-2.327-1.62-2.672-0.69-0.314-0.84-0.271-1.26 0.37-0.26 0.399-0.86 2.141-1.33 3.871-0.87 3.19-1.69 5.25-2.38 5.98-0.21 0.22-0.38 0.56-0.38 0.75 0 0.42-1.76 1.98-2.51 2.22-0.63 0.2-1.28 1.36-1.59 2.83-0.17 0.79-0.14 0.97 0.16 0.79 0.39-0.25 0.34 0.23-0.17 1.45-0.15 0.38-0.07 0.53 0.27 0.53 0.27 0 0.5-0.1 0.52-0.23zm55.06-3.05c-0.18-0.06-0.33-0.44-0.33-0.85 0-0.45-0.18-0.73-0.46-0.73-0.25 0-0.46 0.2-0.46 0.45s0.14 0.46 0.31 0.46c0.16 0 0.3 0.13 0.3 0.28 0 0.16 0.16 0.67 0.36 1.14l0.36 0.86 0.13-0.75c0.07-0.41-0.03-0.8-0.21-0.86zm-1.73-0.17c-0.1-0.27-0.31-0.42-0.46-0.33s-0.1 0.35 0.11 0.57c0.47 0.51 0.6 0.42 0.35-0.24zm-1.33-1.99c-0.2-0.38-0.51-0.55-0.79-0.44-0.4 0.15-0.36 0.3 0.22 0.92 0.76 0.8 1.1 0.51 0.57-0.48zm2.28-1.54c-0.07-0.87-0.77-1.24-0.77-0.41 0 0.31-0.21 0.87-0.47 1.24-0.7 0.99-0.23 1.46 0.61 0.62 0.39-0.41 0.66-1.02 0.63-1.45zm-2.6-1.19c0-0.15-0.2-0.44-0.45-0.65-0.5-0.41-0.56-0.31-0.27 0.43 0.19 0.51 0.72 0.67 0.72 0.22zm2.44-0.36c0-0.18-0.14-0.24-0.31-0.14-0.16 0.11-0.3 0.25-0.3 0.33 0 0.07 0.14 0.13 0.3 0.13 0.17 0 0.31-0.15 0.31-0.32zm-7.49-2.42c-0.17-0.17-0.76-0.44-1.32-0.6-0.98-0.28-0.99-0.28-0.46 0.31 0.3 0.33 0.89 0.6 1.31 0.6 0.53 0 0.68-0.1 0.47-0.31zm6.02-0.21c-0.22-0.08-0.48-0.07-0.58 0.03s0.08 0.17 0.4 0.16c0.35-0.02 0.43-0.09 0.18-0.19zm-8.57-0.59c0-0.35-1.05-1-1.62-1.01-0.3-0.01-0.47-0.136-0.38-0.285 0.1-0.15-0.03-0.351-0.28-0.447-0.61-0.231-0.59-0.802 0.02-0.802 0.79 0 0.3-0.752-0.56-0.854-0.43-0.052-0.97-0.314-1.19-0.583-0.36-0.435-0.33-0.449 0.26-0.134 0.37 0.195 1.03 0.354 1.48 0.354 0.71 0 0.8 0.102 0.67 0.768-0.17 0.883 0.22 1.288 0.6 0.618 0.27-0.485 1.61-0.328 1.61 0.189 0 0.157 0.13 0.202 0.3 0.098 0.17-0.103 0.31-0.043 0.31 0.134 0 0.178 0.4 0.323 0.88 0.323 0.49 0 0.94 0.129 0.99 0.287 0.06 0.157 0.79 0.464 1.62 0.674 0.84 0.22 1.6 0.5 1.69 0.63 0.27 0.37 1.83-0.48 1.67-0.91-0.11-0.287 0.17-0.333 1.14-0.186 0.71 0.106 1.45 0.336 1.66 0.496 0.28 0.21 0.38 0.16 0.38-0.2 0-0.953-2.33-1.287-3.49-0.503-0.38 0.253-1.8 0.209-3.2-0.108-2.36-0.535-8.33-4.086-15.66-9.314-3.19-2.274-5.35-3.293-8.78-4.134-1.7-0.417-3.5-0.913-4-1.101-1.7-0.638-5.11-2.815-5.25-3.35-0.09-0.344-0.79-0.722-1.98-1.072-1.61-0.474-1.78-0.596-1.4-0.989 0.48-0.485 1.79-2.549 1.79-2.81 0-0.315-2.62 0.421-4.18 1.176-0.88 0.423-1.73 0.683-1.91 0.578-1.02-0.631-2.66 1.757-3.38 4.912-0.32 1.391-0.29 1.68 0.22 2.563 0.58 0.984 2.19 2.146 2.63 1.895 0.13-0.071 0.23 0.063 0.23 0.298 0 0.236 0.26 0.729 0.58 1.098l0.58 0.67 0.2-0.924c0.26-1.151 0.64-1.407 1.23-0.82 0.49 0.491 0.59 0.823 0.22 0.765-0.73-0.116-1.29 0.096-1.29 0.493 0 0.251 0.14 0.456 0.3 0.456 0.17 0 0.31-0.137 0.31-0.304 0-0.168 0.14-0.304 0.3-0.304 0.17 0 0.31 0.202 0.31 0.45 0 0.519 1.4 0.926 2.73 0.793 0.41-0.041 0.41-0.088 0-0.424-0.25-0.207-0.6-0.648-0.78-0.978-0.19-0.331-0.7-0.78-1.15-0.999-0.44-0.218-0.8-0.537-0.8-0.708 0-0.191-0.37-0.231-0.95-0.103-0.66 0.145-0.89 0.106-0.75-0.128 0.12-0.185 0.44-0.341 0.73-0.347 0.46-0.008 0.45-0.053-0.05-0.436-0.69-0.519-0.39-1.195 0.35-0.813 0.28 0.146 0.69 0.203 0.89 0.128 0.21-0.075 0.38 0.08 0.38 0.345s0.25 0.482 0.55 0.482c1.01 0 1.85 0.869 1.95 2.034 0.05 0.612 0.26 1.169 0.47 1.239 0.3 0.097 0.31-0.066 0.07-0.714-0.25-0.647-0.22-0.938 0.11-1.267 0.36-0.368 0.51-0.312 1.07 0.398 0.36 0.454 0.65 1.021 0.65 1.26s0.24 0.41 0.53 0.38c0.97-0.098 1.22 0.01 1.38 0.589 0.11 0.434 0.34 0.536 0.94 0.421 0.88-0.167 0.97-0.421 0.48-1.325-0.39-0.727-0.13-1.227 0.51-0.982 0.35 0.133 0.37 0.241 0.1 0.409-0.2 0.126-0.26 0.396-0.13 0.607 0.17 0.277 0.38 0.183 0.79-0.346 0.31-0.399 0.56-0.573 0.57-0.387 0.02 1.031 4.72 4.386 5.49 3.914 0.16-0.102 0.53 0.045 0.81 0.325 0.48 0.478 0.52 0.469 0.75-0.137l0.24-0.648 0.77 0.668c0.42 0.367 0.76 0.834 0.76 1.037 0 0.51-0.94 0.826-1.32 0.444-0.52-0.518-0.85-0.357-0.75 0.362 0.08 0.528 0.31 0.687 1.09 0.725 0.54 0.027 1.16 0.185 1.37 0.353 0.2 0.168 0.85 0.401 1.44 0.518 0.59 0.118 1.82 0.465 2.74 0.772s2.35 0.766 3.19 1.02c0.84 0.255 2.34 0.837 3.35 1.295 1 0.453 1.91 0.813 2.02 0.783 0.11-0.02 0.37 0.16 0.57 0.41 0.37 0.44 1.21 0.62 1.21 0.25zm-5.78-3.456c0-0.168 0.14-0.305 0.3-0.305 0.17 0 0.31 0.137 0.31 0.305 0 0.167-0.14 0.304-0.31 0.304-0.16 0-0.3-0.137-0.3-0.304zm-1.22-0.609c0-0.167-0.38-0.304-0.86-0.304-0.47 0-0.96-0.103-1.09-0.228-0.23-0.228-0.38-0.271-1.24-0.342-0.54-0.045-0.65-1.863-0.12-1.863 0.21 0 0.26 0.289 0.15 0.741-0.17 0.686-0.08 0.757 1.2 0.949 1.26 0.189 3.23 1.318 2.34 1.341-0.21 0.006-0.38-0.127-0.38-0.294zm-4.94-1.242c-0.3-0.171-0.67-0.227-0.84-0.124-0.41 0.254-0.72-0.634-0.45-1.295 0.19-0.473 0.24-0.456 0.47 0.152 0.15 0.376 0.46 0.684 0.7 0.684s0.51 0.205 0.61 0.456c0.2 0.533 0.2 0.533-0.49 0.127zm-2.36-1.325c0-0.535 0.19-0.613 0.45-0.192 0.09 0.156 0.03 0.37-0.14 0.475s-0.31-0.023-0.31-0.283zm2.36-0.068c0.21-0.084 0.55-0.084 0.76 0 0.21 0.085 0.04 0.154-0.38 0.154s-0.59-0.069-0.38-0.154zm-21.83-4.495c0-0.074 0.14-0.219 0.31-0.322 0.17-0.104 0.3-0.043 0.3 0.134s-0.13 0.322-0.3 0.322-0.31-0.06-0.31-0.134zm2.54-3.073c-0.27-0.701-0.02-0.739 0.64-0.1 0.52 0.511 0.53 0.569 0.06 0.569-0.28 0-0.6-0.211-0.7-0.469zm1.47 11.779c0.73-0.304 2.12-0.727 3.09-0.939 0.98-0.213 1.7-0.459 1.61-0.547-0.09-0.089-1.53-0.339-3.2-0.557-1.67-0.217-3.36-0.492-3.74-0.61-0.39-0.118-0.6-0.107-0.47 0.026 0.12 0.133 0 0.495-0.28 0.806-0.39 0.432-0.43 0.647-0.16 0.922 0.2 0.196 0.36 0.604 0.36 0.905 0 0.72 1.07 0.718 2.79-0.006zm12.42-3.575c0-0.372-0.88-1.022-1.64-1.213-1.1-0.277-0.98 0.217 0.2 0.833 1.06 0.553 1.44 0.652 1.44 0.38zm-4.26-1.043c0-0.167-0.13-0.304-0.3-0.304s-0.31 0.137-0.31 0.304c0 0.168 0.14 0.305 0.31 0.305s0.3-0.137 0.3-0.305zm1.45-0.38c-0.15-0.431-0.64-0.383-0.79 0.076-0.05 0.167 0.13 0.304 0.41 0.304s0.45-0.171 0.38-0.38zm-7.53-2.966c0-0.167-0.21-0.304-0.46-0.304s-0.45 0.137-0.45 0.304c0 0.168 0.2 0.305 0.45 0.305s0.46-0.137 0.46-0.305zm23.57-8.213c-0.1-0.167-0.25-0.304-0.32-0.304s-0.13 0.137-0.13 0.304c0 0.168 0.14 0.304 0.32 0.304s0.24-0.136 0.13-0.304zm-3.34-0.608c-0.11-0.167-0.33-0.304-0.5-0.304-0.16 0-0.21 0.137-0.11 0.304s0.32 0.304 0.49 0.304 0.22-0.137 0.12-0.304zm13.27-0.814c-0.36-0.616-0.45-0.419-0.16 0.346 0.11 0.272 0.26 0.43 0.34 0.352 0.07-0.079-0.01-0.392-0.18-0.698zm-14.5 0.24c-0.16-0.149-0.64-0.36-1.05-0.469l-0.76-0.199 0.76 0.458c0.84 0.511 1.51 0.644 1.05 0.21zm3.51-0.661c0-0.157-0.14-0.286-0.31-0.286-0.16 0-0.3 0.213-0.3 0.474s0.14 0.39 0.3 0.287c0.17-0.104 0.31-0.317 0.31-0.475zm-5.63-0.286c-0.1-0.167-0.35-0.302-0.55-0.299-0.22 0.002-0.18 0.122 0.09 0.299 0.59 0.378 0.69 0.378 0.46 0zm17.49-0.735c0-0.237 0.17-0.511 0.38-0.608 0.3-0.142 0.31-0.214 0-0.355-0.26-0.121-0.09-0.464 0.54-1.088 0.5-0.501 0.9-1.072 0.9-1.268 0-0.264-0.06-0.266-0.23-0.01-0.16 0.246-0.35 0.208-0.67-0.134-0.39-0.426-0.38-0.458 0.08-0.28 0.32 0.121 0.52 0.055 0.53-0.17 0-0.234 0.11-0.202 0.29 0.085 0.24 0.378 0.4 0.39 0.91 0.074 0.5-0.308 0.62-0.308 0.61 0-0.02 0.587-0.78 1.466-1.06 1.214-0.14-0.123-0.17 0.003-0.07 0.279 0.12 0.329-0.01 0.553-0.37 0.648-0.38 0.098-0.55 0.401-0.52 0.914 0.06 0.939 0.32 0.801 1.23-0.645 1.4-2.226 2.58-7.879 1.75-8.392-0.24-0.149-0.34 0.437-0.34 1.986 0 1.209-0.11 2.096-0.23 1.97-0.24-0.241-0.28-0.406-0.34-1.412-0.03-0.344-0.16-0.554-0.3-0.465-0.15 0.089-0.24-0.48-0.2-1.264 0.03-0.784-0.13-2.037-0.35-2.786-0.23-0.748-0.34-1.608-0.24-1.911 0.11-0.344 0.02-0.55-0.22-0.547-0.54 0.006-1.45 0.592-0.94 0.599 0.21 0.002 0.38 0.133 0.38 0.289 0 0.157-0.56 0.278-1.25 0.268-0.69-0.009-1.34 0.123-1.44 0.293-0.26 0.407-0.95 0.49-1.79 0.216-0.81-0.26-0.92-1.053-0.16-1.081 0.41-0.015 0.38-0.084-0.15-0.294-0.37-0.152-0.68-0.425-0.68-0.607 0-0.183 0.13-0.248 0.3-0.144 0.45 0.277 0.37-0.623-0.17-1.911-0.26-0.622-0.43-1.157-0.38-1.189 0.25-0.157-2.46-3.324-3.88-4.539-1.1-0.939-1.56-1.53-1.43-1.855 0.13-0.355 0.91 0.291 3.01 2.51 2.37 2.506 2.94 3.304 3.51 4.946 0.39 1.076 0.87 2.024 1.08 2.106 0.21 0.081 0.31 0.27 0.22 0.42s-0.02 0.272 0.15 0.272c0.48 0 0.39-0.648-0.24-1.683-0.31-0.508-0.66-1.545-0.77-2.305-0.17-1.162-0.51-1.691-2.13-3.335-1.06-1.075-2.39-2.327-2.96-2.782-0.56-0.455-0.87-0.831-0.67-0.836s0.55 0.178 0.78 0.407c0.23 0.23 0.86 0.649 1.41 0.932 0.55 0.284 1.66 1.224 2.47 2.089 0.82 0.865 1.57 1.481 1.69 1.368 0.23-0.232-1.65-2.981-2.04-2.981-0.14 0-0.26-0.197-0.26-0.438s-0.82-0.877-1.83-1.414c-1-0.537-1.78-1.023-1.72-1.082 0.06-0.058 0.74 0.112 1.53 0.379 1.48 0.504 2.06 1.028 4.14 3.696 0.68 0.879 1.38 1.597 1.54 1.597 0.59 0 0.28-0.816-0.64-1.692-0.52-0.491-1.28-1.467-1.69-2.167-0.65-1.1-1.02-1.363-2.7-1.921-2.94-0.978-4.42-2.433-2.49-2.433 0.75 0 1.06-0.565 2.38-4.359 0.45-1.309 0.9-2.462 1-2.56s0.18-0.35 0.18-0.559 0.3-1.042 0.66-1.85c0.67-1.504 1.46-3.494 1.46-3.733 0.01-0.074-0.27 0.166-0.61 0.532-0.83 0.887-1.34 0.852-0.75-0.052 0.26-0.394 0.38-0.942 0.28-1.216-0.15-0.398 0.01-0.507 0.83-0.538 0.93-0.034 0.89-0.06-0.35-0.281-1.94-0.346-3.91-0.35-3.37-0.007 0.23 0.15 0.87 0.201 1.4 0.114 0.86-0.14 0.99-0.066 1.13 0.636 0.1 0.541 0.02 0.793-0.27 0.793-0.22 0-0.41 0.258-0.41 0.573 0 0.464-0.19 0.555-0.99 0.476-0.54-0.054-1.09-0.106-1.22-0.117-0.12-0.011-0.2-0.122-0.16-0.247 0.03-0.126-0.03-0.686-0.15-1.244-0.21-1.005-0.23-1.014-1.51-0.801-1.76 0.293-2.79 0.866-3.77 2.099-1.6 2.007-1.9 3.263-1.92 8.159-0.01 3.167-0.12 4.486-0.36 4.486-0.2 0-1.82 0.671-3.6 1.49-3.37 1.546-5.41 2.183-8.92 2.79-1.83 0.317-2.12 0.459-2.54 1.289-0.59 1.123-0.44 4.113 0.28 5.71 0.26 0.572 0.65 1.657 0.88 2.41 0.34 1.167 0.53 1.383 1.29 1.469 0.52 0.061 1.2-0.136 1.68-0.492 0.44-0.326 1.39-0.895 2.12-1.265 0.72-0.37 1.92-1.29 2.65-2.045s1.33-1.193 1.33-0.974c0 0.253 0.24 0.162 0.65-0.246 0.36-0.356 0.65-1.002 0.65-1.437 0-0.493 0.16-0.79 0.45-0.79 0.24 0 1.07-0.616 1.83-1.369 0.92-0.904 1.66-1.37 2.18-1.373 0.62-0.004 0.69-0.067 0.33-0.304-0.32-0.211-0.14-0.242 0.61-0.107 0.58 0.105 1.2 0.331 1.36 0.501 0.21 0.207 0.13 0.247-0.22 0.121-0.81-0.284-0.65 0.023 0.6 1.176 0.63 0.577 1.42 1.054 1.75 1.062 0.8 0.018 3.86 2.394 4.32 3.35 0.19 0.41 0.45 1.156 0.57 1.658l0.22 0.913-0.65-0.582c-0.36-0.319-0.74-0.496-0.85-0.392-0.36 0.366-0.18 1.762 0.31 2.3 0.27 0.301 0.49 0.686 0.49 0.856 0 0.481 1.09 1.344 1.37 1.088 0.14-0.126 0.15-0.051 0.03 0.165-0.13 0.217-0.08 0.573 0.1 0.793 0.31 0.375 0.69 2.798 0.69 4.395 0 0.521 0.1 0.624 0.34 0.381 0.5-0.504 0.82-0.405 0.82 0.255 0 0.325 0.14 0.675 0.3 0.779 0.4 0.245 0.4 1.278 0 1.526-0.17 0.106-0.46-0.228-0.64-0.743-0.18-0.514-0.46-0.935-0.62-0.935-0.4 0-0.01 1.226 0.61 1.928 0.27 0.308 0.5 0.719 0.5 0.913 0 0.541 0.88 2.33 1.14 2.33 0.13 0 0.23-0.194 0.23-0.431zm-0.4-2.199c-0.39-0.397-0.2-0.716 0.43-0.716 0.35 0 0.58 0.159 0.51 0.361-0.15 0.444-0.66 0.637-0.94 0.355zm0.1-2.407c0-0.261 0.13-0.39 0.3-0.286 0.17 0.103 0.31 0.316 0.31 0.474 0 0.157-0.14 0.286-0.31 0.286s-0.3-0.213-0.3-0.474zm3.52 0.211c-0.13-0.212-0.16-0.468-0.05-0.568 0.27-0.273 0.56 0.128 0.42 0.569-0.11 0.309-0.18 0.309-0.37-0.001zm-4.74-6.134c0-0.163 0.21-0.295 0.46-0.295s0.45 0.054 0.45 0.12c0 0.065-0.2 0.198-0.45 0.294s-0.46 0.043-0.46-0.119zm3.07-1.639c-0.02-0.32 0.06-0.5 0.16-0.399s0.11 0.364 0.02 0.583c-0.1 0.243-0.17 0.171-0.18-0.184zm-11.43-8.998c-0.11-0.168-0.05-0.305 0.13-0.305s0.32 0.137 0.32 0.305c0 0.167-0.06 0.304-0.13 0.304-0.08 0-0.22-0.137-0.32-0.304zm-1.24-3.489c-0.32-0.245-0.44-0.451-0.25-0.456s0.52 0.195 0.73 0.447c0.48 0.579 0.28 0.583-0.48 0.009zm3.52-6.397c0-0.251 0.11-0.457 0.25-0.457s0.25 0.206 0.25 0.457-0.11 0.456-0.25 0.456-0.25-0.205-0.25-0.456zm-1.31-0.043c-0.11-0.107-0.12-0.314-0.03-0.461 0.19-0.315 0.73-0.043 0.73 0.37 0 0.326-0.41 0.38-0.7 0.091zm3.13-4.502c0-0.074 0.14-0.219 0.31-0.322 0.16-0.104 0.3-0.043 0.3 0.134s-0.14 0.322-0.3 0.322c-0.17 0-0.31-0.061-0.31-0.134zm0-2.129c0-0.261 0.14-0.475 0.31-0.475 0.16 0 0.3 0.129 0.3 0.287 0 0.157-0.14 0.37-0.3 0.474-0.17 0.103-0.31-0.026-0.31-0.286zm0.61-0.779c0-0.167 0.14-0.304 0.3-0.304 0.17 0 0.31 0.137 0.31 0.304s-0.14 0.304-0.31 0.304c-0.16 0-0.3-0.137-0.3-0.304zm-0.56-0.608c0-0.419 0.07-0.59 0.15-0.381 0.09 0.21 0.09 0.552 0 0.761-0.08 0.209-0.15 0.038-0.15-0.38zm-4.81-2.244c-0.27-0.311-0.12-0.478 0.71-0.777 0.58-0.21 1.13-0.304 1.23-0.21 0.09 0.095-0.2 0.312-0.65 0.484s-0.74 0.449-0.63 0.617c0.27 0.442-0.25 0.352-0.66-0.114zm2.33-0.722c0-0.377 0.14-0.685 0.3-0.685 0.38 0 0.38 0.323 0 0.913-0.24 0.369-0.29 0.325-0.3-0.228zm-10.54 41.427c-0.13-0.314 0.02-0.53 0.44-0.638 0.82-0.215 0.96-0.692 0.47-1.625l-0.4-0.761-0.05 0.913c-0.04 0.686-0.1 0.573-0.24-0.456-0.11-0.753-0.07-1.544 0.09-1.757 0.15-0.213 0.19-0.478 0.08-0.588-0.44-0.432-0.86 0.534-1.02 2.309-0.09 1.024-0.26 1.861-0.37 1.861-0.4 0-1.29-1.302-1-1.484 0.41-0.265 0.64-2.484 0.33-3.307-0.33-0.917-0.87-0.871-0.87 0.076 0 0.583-0.16 0.763-0.69 0.77-0.64 0.009-0.65 0.034-0.13 0.427 0.64 0.483 0.19 0.942-0.64 0.654-0.47-0.163-0.47-0.142 0.01 0.235 0.3 0.228 0.54 0.508 0.54 0.622 0 0.266 0.51 0.906 1.75 2.194 1.04 1.076 2.02 1.397 1.7 0.555zm-0.34-2.263c0-0.586 0.06-0.825 0.14-0.533 0.07 0.293 0.07 0.772 0 1.065-0.08 0.293-0.14 0.053-0.14-0.532zm-2.3-0.507c-0.11-0.112-0.21-0.344-0.21-0.517 0-0.191 0.15-0.173 0.36 0.045 0.2 0.198 0.29 0.431 0.21 0.517-0.09 0.087-0.25 0.066-0.36-0.045zm14.09 0.507c0-0.167-0.14-0.304-0.3-0.304-0.17 0-0.31 0.137-0.31 0.304s0.14 0.304 0.31 0.304c0.16 0 0.3-0.137 0.3-0.304zm-16.12-2.7c0-0.146-0.2-0.83-0.44-1.521-0.25-0.69-0.33-1.255-0.18-1.255s0.4 0.377 0.56 0.837c0.27 0.773 0.31 0.79 0.53 0.228 0.12-0.334 0.45-0.871 0.72-1.193 0.39-0.478 0.4-0.535 0.03-0.313-0.99 0.589-1.3 0.436-1.1-0.547 0.24-1.204 0.31-1.258 1.05-0.861 0.34 0.18 0.9 0.328 1.24 0.328 0.53 0 0.64 0.201 0.67 1.293l0.03 1.293 0.28-1.521c0.15-0.836 0.29-1.929 0.31-2.427 0.03-0.499 0.24-1.098 0.47-1.332 0.24-0.234 0.35-0.637 0.25-0.895-0.1-0.257-0.03-0.562 0.15-0.677 0.24-0.144 0.2-0.348-0.12-0.667-0.34-0.343-0.37-0.547-0.11-0.805s0.22-0.345-0.15-0.345c-0.27 0-0.54 0.105-0.59 0.233-0.06 0.129-1.06 0.735-2.23 1.348-1.28 0.669-2.17 1.334-2.22 1.667-0.05 0.305-0.24 0.854-0.42 1.22-0.52 1.031 0.3 6.178 0.98 6.178 0.16 0 0.29-0.119 0.29-0.266zm-0.86-4.525c0.04-0.292-0.02-0.702-0.15-0.909-0.16-0.258-0.09-0.319 0.23-0.195 0.53 0.202 0.66 1.637 0.15 1.637-0.18 0-0.28-0.24-0.23-0.533zm17.1 4.042c0.27-0.413 0.49-1.207 0.49-1.765s0.16-1.176 0.36-1.374 0.28-0.437 0.19-0.532c-0.1-0.094-0.4 0.057-0.68 0.336-0.47 0.465-0.54 0.467-0.87 0.021-0.27-0.349-0.5-0.403-0.83-0.19-0.4 0.266-0.4 0.332 0 0.598 0.28 0.181 0.32 0.302 0.1 0.305-0.57 0.007-0.76-0.536-0.42-1.179 0.21-0.397 0.52-0.534 0.95-0.422 0.46 0.121 0.67-0.006 0.8-0.484 0.11-0.427 0.41-0.648 0.87-0.648 1.67 0 1.01-1.022-0.85-1.307-0.93-0.144-1.22-0.059-1.59 0.475-0.35 0.507-0.37 0.708-0.08 0.916 0.3 0.211 0.3 0.298 0 0.42-0.21 0.085-0.38 0.417-0.38 0.738 0 0.32-0.14 0.583-0.31 0.583-0.6 0-0.29 0.583 0.58 1.097s1.45 2.088 0.89 2.432c-0.14 0.086-0.25 0.286-0.25 0.443 0 0.532 0.53 0.291 1.03-0.463zm-1.13-5.233c-0.31-0.309-0.24-0.71 0.12-0.71 0.17 0 0.24 0.125 0.15 0.278-0.1 0.153 0 0.348 0.21 0.433s0.23 0.164 0.05 0.178c-0.18 0.013-0.42-0.068-0.53-0.179zm-3.98 4.848c-0.1-0.101-0.17 0.079-0.16 0.399 0.02 0.354 0.09 0.427 0.19 0.184 0.09-0.22 0.07-0.482-0.03-0.583zm8.03 0.526c0-0.167-0.13-0.304-0.3-0.304s-0.31 0.137-0.31 0.304 0.14 0.304 0.31 0.304 0.3-0.137 0.3-0.304zm-13.99-0.989c-0.01-0.534-0.07-0.587-0.29-0.242-0.15 0.243-0.21 0.551-0.13 0.684 0.27 0.427 0.42 0.262 0.42-0.442zm12.64-0.148c0.27-0.375 0.3-0.694 0.08-1.103-0.19-0.358-0.2-0.647-0.02-0.765 0.41-0.268 0.72-2.109 0.39-2.312-0.15-0.092-0.36-0.027-0.47 0.146-0.1 0.172-0.32 0.235-0.47 0.139-0.16-0.096-0.29-0.03-0.29 0.147s0.14 0.322 0.31 0.322 0.3 0.342 0.3 0.761c0 0.418-0.13 0.76-0.3 0.76s-0.31 0.548-0.31 1.217c0 1.331 0.19 1.495 0.78 0.688zm1.66-0.725c0-0.795-0.5-0.717-0.72 0.113-0.29 1.065-0.23 1.246 0.26 0.836 0.25-0.208 0.46-0.635 0.46-0.949zm-5.32-3.935c0.13-0.621 0.1-0.903-0.09-0.783-0.46 0.284-0.74-1.253-0.36-1.97 0.19-0.345 0.26-0.71 0.16-0.81s-0.35 0.254-0.55 0.787c-0.38 1-0.95 1.382-0.65 0.436 0.09-0.308-0.17-0.147-0.63 0.38l-0.79 0.913 0.17-1.673c0.35-3.286 0.37-3.174-0.46-3.184-0.58-0.008-0.77-0.178-0.8-0.715-0.04-0.855-0.72-1.68-0.72-0.877 0 0.284 0.1 0.518 0.23 0.519 0.12 0 0.26 0.646 0.31 1.433 0.04 0.788 0.3 1.759 0.56 2.157 0.27 0.422 0.4 1.022 0.29 1.437-0.1 0.392-0.03 0.806 0.16 0.919 0.19 0.122 0.26 0.653 0.15 1.311-0.15 0.96-0.13 1.007 0.14 0.357 0.44-1.034 0.5-1.063 1.06-0.504 0.27 0.271 0.35 0.493 0.17 0.493-0.17 0-0.23 0.228-0.12 0.506 0.13 0.34 0.08 0.434-0.16 0.286-0.2-0.121-0.36-0.075-0.36 0.102 0 0.574 0.53 0.342 1.06-0.464 0.28-0.433 0.59-0.711 0.68-0.618s-0.05 0.5-0.31 0.904c-0.27 0.404-0.4 0.817-0.3 0.917 0.24 0.239 0.89-1.029 1.16-2.259zm-7.89 1.202c-0.8-0.631-1.39-0.747-1.39-0.272 0 0.167 0.21 0.304 0.46 0.304 0.26 0 0.54 0.197 0.64 0.437 0.09 0.241 0.36 0.363 0.59 0.272 0.33-0.126 0.26-0.303-0.3-0.741zm2.71-0.272c-0.1-0.167-0.35-0.302-0.55-0.3-0.22 0.003-0.18 0.123 0.1 0.3 0.58 0.378 0.69 0.378 0.45 0zm18.23-1.574c-0.28-0.869-0.41-2.125-0.41-3.825 0-0.711-0.14-1.293-0.31-1.293-0.18 0-0.32-0.206-0.32-0.456 0-0.251 0.14-0.457 0.32-0.457s0.23-0.158 0.11-0.351c-0.14-0.218-0.09-0.268 0.13-0.134 0.19 0.119 0.35 0.059 0.35-0.134 0-0.192-0.26-0.417-0.57-0.5-0.31-0.082-0.74-0.512-0.94-0.957-0.33-0.735-0.4-0.761-0.75-0.289-0.25 0.353-0.47 0.42-0.69 0.209-0.21-0.211-0.36 0.255-0.49 1.454-0.1 0.971-0.06 1.888 0.09 2.039 0.15 0.15 0.2 0.664 0.1 1.141-0.11 0.567-0.04 0.868 0.19 0.868s0.29-0.232 0.17-0.606c-0.15-0.49-0.09-0.567 0.35-0.399 0.43 0.165 0.4 0.054-0.15-0.534-0.52-0.552-0.65-0.966-0.52-1.617 0.09-0.481 0.18-1.097 0.19-1.368 0.02-0.381 0.08-0.354 0.29 0.114 0.26 0.591 0.27 0.589 0.47-0.076 0.11-0.377 0.33-0.685 0.49-0.685s0.2 0.146 0.09 0.325c-0.11 0.178 0.05 0.518 0.36 0.754 0.49 0.374 0.5 0.47 0.11 0.733-0.34 0.22-0.49 0.176-0.56-0.164-0.06-0.255-0.26-0.408-0.46-0.338-0.41 0.147-0.33 1.426 0.13 1.878 0.21 0.212 0.24 0.13 0.09-0.264-0.15-0.413-0.1-0.534 0.21-0.433 0.65 0.217 0.85 1.555 0.3 1.971-0.42 0.316-0.4 0.439 0.22 1.094 0.4 0.431 0.61 0.936 0.51 1.216-0.1 0.264 0.05 0.837 0.33 1.274 0.61 0.925 0.9 0.828 0.57-0.19zm-21.59 0.389c0.09-0.15-0.04-0.351-0.29-0.447-0.28-0.106-0.45 0.001-0.45 0.273 0 0.492 0.47 0.604 0.74 0.174zm2.3-0.673c0-0.185-0.21-0.258-0.46-0.161-0.25 0.096-0.45 0.042-0.45-0.12s0.2-0.295 0.45-0.295 0.46-0.151 0.46-0.336c0-0.186-0.22-0.254-0.48-0.152-0.27 0.101-0.61 0.184-0.76 0.184-0.16 0-0.28 0.274-0.28 0.609 0 0.446 0.2 0.608 0.76 0.608 0.42 0 0.76-0.151 0.76-0.337zm1.99 0.054c-0.1-0.156-0.05-0.359 0.09-0.451 0.15-0.092 0.28-0.495 0.28-0.895 0-0.675-0.04-0.692-0.51-0.234-0.52 0.504-0.5 1.863 0.03 1.863 0.15 0 0.2-0.127 0.11-0.283zm-25.3-1.694c-0.19-0.497-0.72-0.628-0.72-0.178 0 0.231 0.21 0.388 0.82 0.61 0.04 0.013-0.01-0.181-0.1-0.432zm3.67 0.118c-0.09-0.149 0.11-0.27 0.46-0.27 0.84 0 0.8-0.533-0.06-0.698l-0.69-0.132 0.69-0.041c0.41-0.025 0.68-0.239 0.68-0.535 0-0.384-0.09-0.417-0.41-0.147-0.23 0.191-0.63 0.266-0.89 0.168-0.25-0.098-0.56-0.025-0.67 0.162-0.15 0.248-0.33 0.244-0.64-0.017-0.35-0.291-0.43-0.21-0.43 0.442 0 0.439-0.14 0.798-0.3 0.798-0.17 0-0.31 0.104-0.31 0.232s0.62 0.25 1.37 0.27c0.75 0.021 1.29-0.084 1.2-0.232zm4.29-0.69c0.29-1.139 0.04-2.482-0.43-2.382-0.27 0.057-0.35-0.082-0.24-0.38 0.12-0.297 0.01-0.468-0.29-0.468-0.31 0-0.43 0.229-0.37 0.684 0.06 0.376 0.27 0.684 0.48 0.684s0.35 0.137 0.3 0.304c-0.04 0.168-0.17 0.27-0.3 0.229-0.27-0.092-0.3 0.899-0.04 1.572 0.27 0.702 0.69 0.588 0.89-0.243zm13.83 0.42c-0.6-0.385-1.22-0.385-1.22 0 0 0.167 0.38 0.302 0.84 0.299 0.65-0.003 0.73-0.069 0.38-0.299zm1.66-0.283c0.09-0.156 0.05-0.361-0.11-0.455-0.15-0.094-0.35 0.033-0.45 0.283-0.19 0.493 0.27 0.634 0.56 0.172zm-16.87-0.941c0-0.736-1.08-0.455-1.13 0.296-0.03 0.407 0.11 0.514 0.54 0.402 0.32-0.084 0.59-0.399 0.59-0.698zm-9.76-0.677c0.01-0.126-0.11-0.229-0.28-0.229s-0.29 0.377-0.28 0.837c0.02 0.741 0.05 0.767 0.28 0.228 0.14-0.335 0.27-0.711 0.28-0.836zm25.44 0.152c-0.03-0.779-0.18-1.141-0.49-1.141-0.29 0-0.41 0.26-0.36 0.76 0.19 1.826 0.91 2.148 0.85 0.381zm6.52 0.058c0-0.261-0.13-0.39-0.3-0.287-0.17 0.104-0.3 0.317-0.3 0.475 0 0.157 0.13 0.286 0.3 0.286s0.3-0.213 0.3-0.474zm-5.02-0.134c-0.1-0.168 0.03-0.305 0.29-0.305s0.47-0.226 0.47-0.503c0-0.455-0.05-0.451-0.6 0.041-0.52 0.471-0.59 1.071-0.12 1.071 0.08 0 0.07-0.137-0.04-0.304zm9.39-0.143c0.25-0.663-0.28-0.841-0.76-0.252-0.28 0.352-0.29 0.44-0.03 0.283 0.21-0.126 0.38-0.083 0.38 0.094 0 0.461 0.21 0.397 0.41-0.125zm-30.99-0.846c0.03-0.417 0.38-0.844 0.89-1.092 0.46-0.225 0.77-0.471 0.7-0.548-0.29-0.282-3.26-0.362-3.26-0.088 0 0.156 0.23 0.283 0.5 0.283 0.39 0 0.42 0.091 0.14 0.427-0.27 0.327-0.27 0.469 0.04 0.608 0.32 0.148 0.32 0.216-0.01 0.365-0.3 0.138-0.26 0.28 0.15 0.583 0.65 0.472 0.79 0.383 0.85-0.538zm-13.53 0.313c0-0.15 0.12-0.197 0.27-0.105 0.15 0.093 0.35-0.036 0.45-0.286s0.44-0.454 0.76-0.454 0.67-0.214 0.77-0.476c0.1-0.261 0.31-0.396 0.47-0.299 0.15 0.097 0.37 0.029 0.48-0.151 0.25-0.394-3.34-0.07-4.21 0.381-0.31 0.158-0.75 0.213-0.99 0.123-0.61-0.236-1.18 0.921-0.61 1.242 0.61 0.339 2.61 0.359 2.61 0.025zm0.02-0.972c-0.01-0.321 0.06-0.5 0.16-0.399 0.11 0.101 0.12 0.363 0.03 0.583-0.1 0.242-0.17 0.17-0.19-0.184zm10.56 0.431c-0.45-0.719-0.57-0.636-0.34 0.238 0.09 0.367 0.29 0.594 0.44 0.505 0.14-0.09 0.1-0.424-0.1-0.743zm-6.32 0.304c0-0.167-0.15-0.304-0.32-0.304-0.18 0-0.24 0.137-0.14 0.304 0.11 0.167 0.25 0.304 0.33 0.304 0.07 0 0.13-0.137 0.13-0.304zm3.64-0.598c-0.01-0.676-0.05-0.705-0.32-0.232-0.17 0.296-0.44 0.459-0.6 0.362s-0.29 0.008-0.29 0.233 0.28 0.409 0.61 0.409c0.45 0 0.61-0.2 0.6-0.772zm9.74 0.453c0-0.198-0.47-0.282-1.21-0.211-0.67 0.063-1.16 0.211-1.09 0.327 0.22 0.345 2.3 0.24 2.3-0.116zm22.36-0.159c0.22 0 0.46 0.102 0.53 0.228s0.11 0.103 0.09-0.05-0.33-0.466-0.67-0.696c-0.59-0.39-0.63-0.36-0.63 0.43 0.01 0.467 0.07 0.677 0.14 0.468 0.08-0.209 0.32-0.38 0.54-0.38zm2.51 0.397c-0.3-0.077-0.71-0.072-0.92 0.012-0.2 0.083 0.04 0.146 0.54 0.14s0.67-0.074 0.38-0.152zm12.45-2.298c0.52-1.046 1.67-2.86 2.56-4.031 1.41-1.855 1.62-2.312 1.63-3.549 0.01-0.78 0.12-1.529 0.26-1.663 0.13-0.135 0.15-0.009 0.04 0.278-0.11 0.301-0.05 0.524 0.14 0.524 0.18 0 0.34-0.377 0.35-0.837s0.09-1.562 0.18-2.449c0.21-2.069-0.3-4.16-1.43-5.861-0.49-0.741-0.89-1.227-0.89-1.079s-0.29-0.096-0.64-0.542c-0.69-0.872-3.43-2.408-3.74-2.096-0.37 0.37-0.18 0.758 0.29 0.58 0.27-0.104 0.39-0.053 0.28 0.12-0.1 0.165 0.09 0.3 0.42 0.3 0.93 0 1.56 0.327 1.56 0.811 0 0.265 0.15 0.356 0.38 0.227 0.31-0.171 0.31-0.132 0 0.195-0.58 0.631-0.46 1.181 0.24 1.046 0.44-0.084 0.79 0.149 1.17 0.777 0.3 0.493 0.66 0.794 0.81 0.67 0.14-0.125 0.01 0.166-0.29 0.647-0.44 0.702-0.48 1.019-0.21 1.611 0.46 1.005 0.42 1.159-0.16 0.679-0.42-0.354-0.47-0.329-0.37 0.191 0.08 0.42 0.32 0.57 0.8 0.504 0.37-0.053 0.67 0.05 0.67 0.228s-0.13 0.323-0.3 0.323c-0.39 0-0.39 0.625 0 1.217 0.27 0.406 0.34 0.406 0.6 0 0.26-0.394 0.3-0.386 0.31 0.058 0 0.725-0.47 0.93-0.91 0.395-0.53-0.631-0.84-0.566-1.1 0.231l-0.23 0.685-0.17-0.703c-0.19-0.774-0.78-0.798-0.78-0.031 0 0.547-0.7 1.494-1.1 1.494-0.15 0-0.27-0.205-0.27-0.456 0-0.55-0.36-0.588-0.85-0.091-0.26 0.259-0.37 0.265-0.37 0.02 0-0.189 0.31-0.442 0.69-0.56 1.17-0.37 2.04-1.402 1.71-2.022-0.19-0.357-0.18-0.541 0.02-0.541 0.18 0 0.32 0.189 0.32 0.421 0 0.231 0.27 0.492 0.61 0.58 0.71 0.187 0.81-0.331 0.14-0.816-0.51-0.378-0.78-1.48-0.85-3.556-0.04-1.012-0.18-1.396-0.51-1.399-0.25-0.003-0.54 0.126-0.65 0.286-0.11 0.177-0.27 0.159-0.39-0.046-0.12-0.185-0.07-0.337 0.11-0.337s0.32-0.205 0.32-0.456c0-0.551-0.5-0.609-0.68-0.079-0.09 0.279-0.25 0.252-0.61-0.103-0.3-0.302-0.38-0.634-0.22-0.895 0.14-0.228 0.18-0.538 0.09-0.689-0.1-0.151-0.42 0.253-0.72 0.898-0.58 1.24-0.8 0.994-0.3-0.329 0.16-0.429 0.19-0.781 0.06-0.781-0.14 0-0.7 1.13-1.25 2.51s-1.27 3.106-1.59 3.836c-0.33 0.729-0.5 1.414-0.38 1.521s0.27 0.023 0.35-0.188c0.07-0.21 0.26-0.305 0.41-0.21s0.28 0 0.28-0.211c0-0.298 0.08-0.302 0.36-0.018 0.57 0.567 0.86 0.435 0.86-0.395 0-0.419 0.12-0.761 0.26-0.761 0.15 0 0.35-0.41 0.45-0.912 0.19-0.933 1.11-1.313 1.11-0.457 0 0.251-0.19 0.457-0.42 0.457-0.49 0-0.78 0.92-0.79 2.491 0 1.094-0.61 1.941-0.85 1.2-0.1-0.287-0.23-0.283-0.6 0.02-0.41 0.34-0.44 0.293-0.24-0.368l0.22-0.758-0.52 0.716c-0.4 0.548-0.58 0.621-0.78 0.313-0.31-0.504-0.29-0.532-1.28 1.943-1 2.516-1.01 2.763-0.05 1.591l0.75-0.912v0.988c0 0.544 0.14 0.989 0.3 0.989 0.17 0 0.31-0.206 0.31-0.457 0-0.713 0.55-0.534 0.7 0.228l0.13 0.685 0.24-0.71c0.17-0.547 0.29-0.617 0.51-0.304 0.2 0.281 0.23 0.203 0.1-0.253-0.24-0.865 0.34-1.202 1.02-0.588 0.3 0.267 0.7 0.486 0.9 0.486 0.19 0 0.35 0.137 0.35 0.304 0 0.168-0.12 0.304-0.26 0.304s-0.19 0.377-0.1 0.837c0.13 0.688 0.08 0.777-0.27 0.5-0.74-0.576-1.8-0.72-1.8-0.243 0 0.235 0.17 0.393 0.38 0.351 0.21-0.041 0.38 0.198 0.38 0.533 0 0.334-0.17 0.574-0.38 0.532s-0.4 0.232-0.42 0.608c-0.02 0.542-0.06 0.57-0.17 0.135-0.08-0.302-0.48-0.674-0.88-0.827-0.48-0.184-0.66-0.435-0.55-0.746 0.14-0.339 0.05-0.417-0.31-0.282-0.58 0.226-0.61 0.483-0.11 0.988 0.3 0.301 0.29 0.441-0.07 0.689-0.36 0.246-0.32 0.274 0.18 0.135 0.41-0.114 0.82 0.032 1.17 0.416 0.29 0.326 0.73 0.514 0.98 0.419 0.32-0.12 0.42-0.003 0.35 0.389-0.07 0.42 0.1 0.564 0.67 0.573 0.61 0.01 0.74 0.151 0.68 0.715-0.04 0.386 0.03 0.64 0.15 0.564 0.13-0.076 0.39 0.038 0.59 0.254 0.28 0.303 0.27 0.518-0.07 0.956-0.47 0.623-0.58 1.326-0.2 1.326 0.13 0 0.66-0.856 1.18-1.901zm-1.81-3.27c-0.11-0.396-0.01-0.609 0.26-0.609 0.24 0 0.43 0.274 0.43 0.609 0 0.334-0.12 0.608-0.27 0.608-0.14 0-0.34-0.274-0.42-0.608zm-1.44-0.305c0-0.167 0.14-0.304 0.31-0.304 0.16 0 0.3 0.137 0.3 0.304 0 0.168-0.14 0.305-0.3 0.305-0.17 0-0.31-0.137-0.31-0.305zm2.49-1.096c0.12-0.658 1.07-0.938 1.56-0.458 0.4 0.41 0.28 0.537-0.81 0.81-0.74 0.186-0.85 0.134-0.75-0.352zm2.68-0.576c0-0.252 0.24-0.461 0.54-0.466 0.48-0.009 0.48-0.049-0.05-0.449-0.51-0.388-0.63-0.378-1.01 0.085-0.38 0.473-0.39 0.459-0.1-0.139 0.4-0.839 0.41-1.406 0.02-1.161-0.17 0.104-0.31-0.017-0.31-0.268s0.15-0.547 0.33-0.657c0.17-0.111 0.26-0.365 0.18-0.564-0.08-0.207 0.14-0.377 0.51-0.395 0.36-0.017 0.48 0.035 0.27 0.115-0.23 0.089-0.36 0.646-0.33 1.414l0.04 1.268 0.21-1.217c0.2-1.177 0.21-1.192 0.52-0.456 0.18 0.418 0.44 0.692 0.59 0.608s0.28 0.181 0.3 0.589c0.04 0.71 0.02 0.716-0.39 0.156-0.4-0.547-0.42-0.526-0.35 0.332 0.07 0.975-0.21 1.661-0.68 1.661-0.16 0-0.29-0.206-0.29-0.456zm-2.13-1.369c0-0.356 0.21-0.609 0.49-0.609 0.32 0 0.43 0.166 0.31 0.482-0.1 0.264-0.19 0.538-0.19 0.608s-0.13 0.127-0.3 0.127-0.31-0.274-0.31-0.608zm-0.3-1.199c0-0.177 0.14-0.322 0.3-0.322 0.17 0 0.31 0.06 0.31 0.134s-0.14 0.219-0.31 0.322c-0.16 0.103-0.3 0.043-0.3-0.134zm-5.17-1.977c0-0.074 0.14-0.219 0.3-0.323 0.17-0.103 0.31-0.042 0.31 0.135s-0.14 0.322-0.31 0.322c-0.16 0-0.3-0.061-0.3-0.134zm5.06-1.843c-0.1-0.251-0.04-0.457 0.12-0.457s0.29 0.206 0.29 0.457-0.05 0.456-0.12 0.456c-0.06 0-0.19-0.205-0.29-0.456zm4.99-1.799c-0.24-0.6-0.61-1.091-0.83-1.091-0.53 0-0.5-0.243 0.07-0.819 0.56-0.556 0.53-0.586 1.03 1.012 0.51 1.613 0.29 2.335-0.27 0.898zm-5.03 0.43c-0.11-0.167 0.02-0.304 0.28-0.304 0.27 0 0.48 0.137 0.48 0.304s-0.13 0.304-0.29 0.304-0.37-0.137-0.47-0.304zm-2.59-2.89c0.21-0.251 0.43-0.456 0.5-0.456 0.06 0 0.11 0.205 0.11 0.456s-0.22 0.456-0.49 0.456c-0.41 0-0.43-0.082-0.12-0.456zm2.44 0.152c0-0.167 0.21-0.304 0.47-0.304s0.39 0.137 0.29 0.304c-0.11 0.167-0.32 0.304-0.48 0.304s-0.28-0.137-0.28-0.304zm-58.96 17.131c-0.22-0.088-0.48-0.077-0.58 0.024s0.08 0.173 0.4 0.16c0.35-0.015 0.42-0.087 0.18-0.184zm15.96-1.215c-0.08-0.085-0.47-0.053-0.85 0.069l-0.71 0.223 0.68 0.251c0.38 0.139 0.7 0.427 0.72 0.642 0.03 0.214 0.11 0.07 0.18-0.321s0.07-0.779-0.02-0.864zm-17.08 0.814c-0.1-0.167-0.32-0.304-0.47-0.304-0.16 0-0.29 0.137-0.29 0.304 0 0.168 0.21 0.305 0.47 0.305s0.39-0.137 0.29-0.305zm13.07-0.859c-0.13-0.113-0.28-0.049-0.35 0.143-0.07 0.191-0.43 0.282-0.8 0.203-0.6-0.131-0.59-0.104 0.09 0.279 0.65 0.363 0.8 0.363 1.02 0.003 0.14-0.233 0.16-0.515 0.04-0.628zm1.68 0.555c0-0.167-0.24-0.302-0.53-0.299-0.45 0.004-0.47 0.047-0.08 0.299 0.58 0.371 0.61 0.371 0.61 0zm-4.03-0.211c-0.3-0.077-0.71-0.072-0.92 0.012-0.2 0.083 0.04 0.146 0.54 0.14s0.67-0.075 0.38-0.152zm11.39 0.003c-0.22-0.087-0.48-0.077-0.58 0.024s0.08 0.173 0.4 0.16c0.35-0.015 0.42-0.087 0.18-0.184zm22.07-0.882c-0.29-0.29-0.87 0.18-0.65 0.529 0.13 0.208 0.3 0.203 0.51-0.016 0.18-0.179 0.25-0.41 0.14-0.513zm-22.55-0.957c-0.1-0.101-0.17 0.079-0.16 0.399 0.01 0.355 0.09 0.427 0.18 0.184 0.09-0.219 0.08-0.482-0.02-0.583zm-0.49-0.082c0-0.168-0.13-0.304-0.29-0.304-0.15 0-0.37 0.136-0.47 0.304-0.1 0.167 0.03 0.304 0.29 0.304s0.47-0.137 0.47-0.304zm22.81-0.295c0-0.162-0.2-0.216-0.45-0.119-0.25 0.096-0.46 0.228-0.46 0.294s0.21 0.12 0.46 0.12 0.45-0.133 0.45-0.295zm13.27-0.535c-0.1-0.101-0.18 0.078-0.16 0.399 0.01 0.354 0.08 0.426 0.18 0.184 0.09-0.22 0.08-0.482-0.02-0.583zm-0.87-0.597c-0.29-0.283-0.62-0.412-0.74-0.288-0.13 0.125-0.03 0.354 0.22 0.51 0.74 0.468 1.07 0.328 0.52-0.222zm-2.16-2.358c-0.44-0.412-0.81-0.6-0.81-0.419 0 0.402 1.26 1.53 1.47 1.319 0.08-0.083-0.21-0.488-0.66-0.9zm-26.21-0.474c0.11-0.167-0.02-0.304-0.28-0.304s-0.48 0.137-0.48 0.304 0.13 0.304 0.29 0.304 0.37-0.137 0.47-0.304zm26.78-0.631c0.11-0.347 0.12-0.712 0.02-0.811s-0.18 0.048-0.18 0.327-0.14 0.507-0.3 0.507c-0.17 0-0.31 0.137-0.31 0.304 0 0.555 0.57 0.315 0.77-0.327zm-25.72-0.27c0.75-0.475 0.22-0.589-0.75-0.16-0.71 0.312-0.78 0.408-0.31 0.424 0.34 0.01 0.81-0.108 1.06-0.264zm2.78-1.625c-0.25-0.241-0.34-0.162-0.34 0.285 0 0.805 0.43 1.231 0.56 0.563 0.06-0.284-0.04-0.665-0.22-0.848zm-2.47-1.834c0-0.631-0.36-0.839-0.81-0.467-0.58 0.49-0.5 0.873 0.2 0.873 0.34 0 0.61-0.183 0.61-0.406zm2.2-1.475c-0.19-0.19-0.23 0.01-0.12 0.565 0.13 0.637 0.21 0.713 0.29 0.295 0.07-0.311-0.01-0.698-0.17-0.86zm-0.68 0.664c0-0.167-0.14-0.304-0.32-0.304s-0.24 0.137-0.13 0.304c0.1 0.167 0.25 0.304 0.32 0.304s0.13-0.137 0.13-0.304zm-2.31-0.741c-0.09-0.241-0.36-0.363-0.6-0.273-0.51 0.198-0.27 0.71 0.34 0.71 0.24 0 0.35-0.185 0.26-0.437zm2.92-2.32c0-0.818-0.09-0.893-1.06-0.893-0.59 0-1.07 0.136-1.07 0.304 0 0.167 0.21 0.304 0.46 0.304s0.46 0.245 0.46 0.544c0 0.325 0.24 0.562 0.6 0.589 0.48 0.036 0.61-0.142 0.61-0.848zm-17.64-0.893c0-0.168-0.15-0.304-0.32-0.304-0.18 0-0.24 0.136-0.14 0.304 0.11 0.167 0.25 0.304 0.33 0.304 0.07 0 0.13-0.137 0.13-0.304zm16.57-1.416c-0.84-0.614-1.23-0.493-0.61 0.192 0.3 0.33 0.69 0.515 0.86 0.41 0.18-0.114 0.08-0.358-0.25-0.602zm10.4-1.094c-0.08-0.209-0.15-0.038-0.15 0.38 0 0.419 0.07 0.59 0.15 0.381s0.08-0.552 0-0.761zm-11.46-0.246c0-0.157-0.13-0.286-0.3-0.286s-0.31 0.213-0.31 0.474 0.14 0.39 0.31 0.286c0.17-0.103 0.3-0.316 0.3-0.474zm1.16-0.347c0.2-0.201 0.36-0.564 0.36-0.808 0-0.351-0.12-0.329-0.6 0.108-0.63 0.566-0.8 1.065-0.37 1.065 0.13 0 0.41-0.164 0.61-0.365zm-24.58-0.395c0-0.251-0.13-0.457-0.29-0.457-0.17 0-0.22 0.206-0.12 0.457 0.09 0.25 0.23 0.456 0.29 0.456 0.07 0 0.12-0.206 0.12-0.456zm34.57-1.451c-0.08-0.206-0.14 0.036-0.14 0.538 0.01 0.502 0.08 0.67 0.15 0.374 0.08-0.296 0.08-0.706-0.01-0.912zm20.87 0.792c-0.21-0.085-0.31-0.279-0.21-0.432 0.09-0.153 0.03-0.278-0.14-0.278-0.16 0-0.38 0.125-0.47 0.278-0.17 0.275 0.3 0.586 0.89 0.586 0.17 0 0.14-0.069-0.07-0.154zm-31.25-0.715c0.1-0.17 0.32-0.231 0.47-0.134 0.34 0.21 0.33-0.103-0.02-0.926-0.23-0.532-0.26-0.541-0.28-0.066-0.01 0.298-0.23 0.62-0.48 0.716-0.5 0.193-0.63 0.719-0.17 0.719 0.16 0 0.37-0.139 0.48-0.309zm-30.07-4.336c-0.09-0.206-0.15 0.036-0.14 0.538 0 0.502 0.07 0.671 0.15 0.375s0.07-0.707-0.01-0.913zm18.35-0.258c0-0.167-0.13-0.22-0.3-0.116-0.17 0.103-0.31 0.325-0.31 0.492s0.14 0.22 0.31 0.116c0.17-0.103 0.3-0.325 0.3-0.492zm53.05-5.988c0.11-0.181 0.27-1.741 0.35-3.465s0.36-3.778 0.62-4.564c0.35-1.059 0.39-1.585 0.15-2.033-0.18-0.332-0.33-0.818-0.33-1.078s-0.46-1.084-1.03-1.83-1.13-1.91-1.25-2.587c-0.24-1.454-0.76-1.942-0.76-0.719 0 0.47 0.41 1.723 0.91 2.783 0.56 1.164 0.92 2.422 0.92 3.173 0 1.187-1.87 8.286-2.49 9.442-0.47 0.877 0 2.182 1.21 3.397l1.12 1.126 0.19-1.657c0.1-0.911 0.27-1.806 0.39-1.988zm-53.05 2.678c0-0.167-0.51-0.291-1.14-0.274-1.02 0.027-1.06 0.056-0.38 0.274 1.09 0.348 1.52 0.348 1.52 0zm22.51-1.369c0-0.251-0.05-0.456-0.12-0.456-0.06 0-0.2 0.205-0.29 0.456-0.1 0.251-0.04 0.456 0.12 0.456s0.29-0.205 0.29-0.456zm-8.22-1.463c0-0.366-0.13-0.872-0.29-1.123-0.22-0.333-0.3-0.103-0.3 0.855-0.01 0.797 0.11 1.237 0.3 1.123 0.16-0.104 0.3-0.488 0.29-0.855zm9.13-8.879c-0.2-0.251-0.51-0.457-0.68-0.457s-0.13 0.202 0.08 0.457c0.2 0.251 0.51 0.456 0.68 0.456s0.14-0.202-0.08-0.456zm0.77-0.761c-0.11-0.167-0.25-0.304-0.33-0.304-0.07 0-0.13 0.137-0.13 0.304 0 0.168 0.14 0.304 0.32 0.304s0.24-0.136 0.14-0.304zm-0.92-1.216c-0.1-0.168-0.25-0.305-0.32-0.305s-0.13 0.137-0.13 0.305c0 0.167 0.14 0.304 0.32 0.304s0.24-0.137 0.13-0.304zm15.67-3.346c0-0.335-0.14-0.609-0.31-0.609-0.16 0-0.3-0.151-0.3-0.336s-0.35-0.615-0.79-0.954c-0.49-0.387-0.73-0.823-0.64-1.165 0.08-0.301-0.02-0.612-0.23-0.692-0.27-0.102-0.34-0.754-0.25-2.2333l0.13-2.0891-1.11-0.5312c-1.47-0.6998-4.41-1.0035-5.27-0.5438-0.86 0.4582-0.84 0.6119 0.24 1.7966 0.72 0.7821 0.82 1.0288 0.46 1.1649-0.25 0.095-0.45 0.295-0.45 0.4444 0 0.3975 1.04 0.3315 1.46-0.0934 0.29-0.2839 0.37-0.267 0.37 0.076 0 0.5319 0.88 1.5969 3.57 4.3199 2.05 2.084 3.12 2.577 3.12 1.445zm12.4-5.34c-0.07-0.071-0.56-0.2165-1.09-0.3228-1.3-0.2603-1.28 0.3898 0.02 0.7358 0.86 0.228 1.48-0.008 1.07-0.413zm-3.77-0.146c0.15-0.1379-0.54-0.2501-1.52-0.2495-1.64 0.001-1.74 0.0383-1.19 0.4435 0.61 0.443 2.15 0.333 2.71-0.194zm1.82-1.6493c1.15 0.0572 2.16 0.1802 2.26 0.2734 0.32 0.3199 0.67 0.1687 0.67-0.287 0-0.3336-0.35-0.457-1.29-0.4589-0.71-0.0015-2.01-0.089-2.89-0.1945-1.51-0.1816-1.6-0.1553-1.6 0.4962 0 0.5132 0.1 0.6091 0.38 0.3774 0.21-0.1709 1.32-0.2638 2.47-0.2066zm4.04-1.5214c-0.09-0.2582-0.41-0.4694-0.7-0.4694s-0.8-0.2529-1.15-0.5621c-0.75-0.6739-3.07-1.611-3.33-1.3482-0.38 0.3803-0.18 1.0608 0.26 0.8912 0.45-0.1708 2.23 0.549 3.96 1.6008 1.02 0.6127 1.23 0.5873 0.96-0.1123zm-5.98-0.9078c-0.01-0.1771-0.21-0.0564-0.46 0.2684s-0.44 0.7354-0.44 0.9126c0.01 0.1771 0.21 0.0563 0.46-0.2684 0.24-0.3248 0.44-0.7354 0.44-0.9126zm6.7-0.9038c0-0.6384-0.33-0.8573-2.49-1.683-1.93-0.7387-2.54-0.8626-2.73-0.5589-0.15 0.2486-0.05 0.463 0.28 0.5909 0.29 0.1104 1.31 0.5005 2.26 0.867 0.96 0.3664 1.9 0.8578 2.09 1.092 0.49 0.5886 0.59 0.5386 0.59-0.308zm-67.31 27.014c-0.12-0.122-0.22-0.432-0.22-0.688 0-0.343 0.09-0.377 0.34-0.128 0.18 0.186 0.28 0.496 0.22 0.688-0.07 0.192-0.22 0.25-0.34 0.128zm1.2-0.019c-0.37-0.372-0.21-0.71 0.33-0.686 0.32 0.015 0.38 0.085 0.15 0.178-0.21 0.085-0.31 0.279-0.21 0.433 0.2 0.323 0.02 0.371-0.27 0.075zm6.96-0.642c-0.06-0.057-0.03-0.364 0.05-0.682 0.13-0.489 0.37-0.559 1.56-0.453 0.78 0.069 1.66 0.132 1.97 0.14s0.46 0.155 0.34 0.345c-0.11 0.182-0.46 0.263-0.78 0.181-0.31-0.083-0.57-0.041-0.57 0.094 0 0.236-2.36 0.582-2.57 0.375zm1.41-0.58c-0.22-0.088-0.48-0.077-0.58 0.024s0.07 0.173 0.4 0.16c0.35-0.015 0.42-0.087 0.18-0.184zm-7.36 0.208c0-0.167 0.14-0.304 0.31-0.304 0.16 0 0.3 0.137 0.3 0.304s-0.14 0.304-0.3 0.304c-0.17 0-0.31-0.137-0.31-0.304zm-2.13-0.566c0-0.144 0.34-0.197 0.76-0.117s0.76 0.198 0.76 0.262-0.34 0.117-0.76 0.117-0.76-0.118-0.76-0.262zm4.42-0.034c-0.09-0.143-0.74-0.348-1.45-0.455-2.16-0.328-2.62-0.676-2.37-1.798 0.12-0.532 0.18-1.265 0.12-1.628s0.04-0.744 0.2-0.848c0.46-0.279 0.05-0.756-0.47-0.557-0.25 0.094-0.45 0.004-0.45-0.201 0-0.219 0.25-0.308 0.6-0.217 0.79 0.207 0.85-0.09 0.51-2.554-0.23-1.746-0.34-2.009-0.65-1.59-0.2 0.277-0.52 0.405-0.72 0.286-0.43-0.266-0.46-1.093-0.04-1.093 0.17 0 0.3-0.146 0.3-0.325 0-0.193-0.26-0.241-0.65-0.117-0.52 0.166-0.62 0.107-0.47-0.283 0.11-0.271 0.07-0.492-0.07-0.492-0.15 0-0.34 0.206-0.44 0.457-0.28 0.723-1.19 0.58-0.95-0.15 0.1-0.333 0.08-0.778-0.05-0.988-0.16-0.257-0.31-0.082-0.44 0.529-0.19 0.877-0.2 0.868-0.24-0.248-0.03-1.063-0.09-1.142-0.72-0.936-1.56 0.515-1.88 0.351-2.1-1.097-0.27-1.78-0.31-5.285-0.06-5.932 0.15-0.4046 0.25-0.425 0.45-0.101 0.19 0.303 0.26 0.31 0.26 0.025 0.01-0.209 0.15-0.3801 0.33-0.3801 0.19 0 0.24 0.2594 0.13 0.6081-0.11 0.349-0.05 0.609 0.14 0.609 0.17 0 0.32-0.214 0.32-0.475 0-0.26 0.14-0.389 0.3-0.286 0.17 0.104 0.31-0.084 0.31-0.4158 0-0.7029 0.71-0.9316 1.91-0.6104 0.5 0.1358 0.77 0.1126 0.66-0.0578-0.1-0.1656 0.65-0.2846 1.8-0.2846 1.09 0 2.07 0.1462 2.18 0.3249s0.38 0.2579 0.59 0.1759 0.53-0.0047 0.71 0.1717c0.18 0.1774 0.57 0.2184 0.87 0.0917 0.31-0.1261 1.24-0.2906 2.07-0.3656s1.67-0.2626 1.85-0.417c0.19-0.1543 0.43-0.1916 0.54-0.083 0.32 0.319-0.42 1.0109-1.13 1.0492-0.52 0.0284-0.54 0.0629-0.11 0.1751 0.3 0.0767 0.46 0.2667 0.36 0.4207-0.28 0.465 0.39 0.317 0.91-0.197 0.53-0.5279 2.64-0.7554 3.82-0.4115 0.54 0.1565 0.23 0.2302-1.06 0.2525-1.45 0.025-2.09 0.204-3.08 0.867-1.03 0.683-1.19 0.904-0.86 1.212 0.23 0.207 0.62 0.295 0.88 0.196 0.26-0.1 0.47-0.03 0.47 0.155s-0.23 0.337-0.51 0.337-0.73 0.208-1.02 0.463c-0.63 0.572-1.51 0.282-1.51-0.496 0-0.317-0.2-0.576-0.43-0.576-0.61 0-1.52 0.954-1.14 1.189 0.18 0.108-0.07 0.69-0.58 1.378-0.49 0.656-0.9 0.996-0.91 0.758-0.02-0.262-0.13-0.192-0.29 0.174-0.36 0.837-0.36 1.134 0 0.912 0.26-0.158 0.5 1.756 0.34 2.684-0.03 0.138 0.08 0.174 0.23 0.08 0.33-0.205 0.65 0.742 0.82 2.407 0.09 0.899 0.04 1.058-0.16 0.609-0.15-0.335-0.28-0.917-0.29-1.293-0.03-0.822-0.63-0.931-0.63-0.114 0 0.313 0.22 1.169 0.49 1.901s0.48 1.646 0.46 2.032c-0.02 0.456 0.09 0.626 0.31 0.485 0.22-0.131 0.27-0.081 0.14 0.127-0.29 0.476 0.48 1.835 1.76 3.097 1.11 1.097 1.38 1.802 0.72 1.856-0.21 0.017-0.89 0.078-1.52 0.135-0.62 0.057-1.2-0.014-1.29-0.157zm-2.29-2.442c0-0.167-0.21-0.304-0.47-0.304s-0.39 0.137-0.29 0.304 0.32 0.304 0.48 0.304c0.15 0 0.28-0.137 0.28-0.304zm-2.66-15.818c0.31 0 0.48-0.137 0.38-0.304-0.26-0.426 0.26-0.38 0.7 0.061 0.28 0.284 0.37 0.212 0.37-0.323 0-0.539-0.15-0.668-0.69-0.593-0.51 0.071-0.71-0.075-0.78-0.59-0.13-0.9382-0.67-0.8692-0.59 0.076 0.03 0.419 0.17 0.761 0.3 0.761 0.5 0 0.21 0.545-0.37 0.696-0.34 0.088-0.61 0.337-0.61 0.553 0 0.306 0.08 0.312 0.36 0.028 0.2-0.2 0.62-0.365 0.93-0.365zm2.3-0.988c-0.47-1.3823-0.55-1.4011-0.55-0.127 0 0.771 0.14 1.115 0.44 1.115 0.36 0 0.38-0.174 0.11-0.988zm4.94-0.176c-0.85-0.128-1.63 0.164-1.4 0.527 0.1 0.165 0.56 0.134 1.12-0.074 0.84-0.312 0.87-0.365 0.28-0.453zm-8.53-0.339c0-0.41-0.56-0.6951-0.92-0.471-0.17 0.105-0.23 0.319-0.13 0.475 0.22 0.369 1.05 0.367 1.05-0.004zm3.4-1.442c-0.22-0.0879-0.48-0.0771-0.58 0.024s0.08 0.1729 0.4 0.1597c0.35-0.0146 0.42-0.0866 0.18-0.1837zm11.43 21.286c0.37-0.072 0.99-0.072 1.37 0 0.37 0.073 0.06 0.132-0.69 0.132s-1.06-0.059-0.68-0.132zm-16.84-1.875c0.02-0.412 0.22-0.812 0.44-0.887 0.3-0.099 0.36 0.041 0.21 0.507-0.12 0.382-0.07 0.645 0.12 0.645 0.18 0 0.32 0.128 0.32 0.285s-0.25 0.266-0.56 0.243c-0.39-0.03-0.55-0.269-0.53-0.793zm33.72 0.459c-0.85-0.42-0.89-0.808-0.08-0.65 0.8 0.152 1.22 0.422 1.22 0.778 0 0.345-0.24 0.318-1.14-0.128zm-13.25-0.118c-0.36-0.636-0.5-1.902-0.21-1.902 0.17 0 0.45-0.344 0.61-0.765 0.26-0.675 1.34-1.364 2.14-1.364 0.15 0 0.5 0.336 0.77 0.747 0.56 0.86 0.32 1.619-0.34 1.071-0.33-0.273-0.45-0.123-0.61 0.749-0.29 1.545-0.89 1.816-0.66 0.294 0.17-1.08 0.15-1.135-0.25-0.606-0.25 0.333-0.36 0.884-0.25 1.292 0.14 0.573 0.05 0.712-0.45 0.712-0.34 0-0.68-0.103-0.75-0.228zm4.86-0.888c-0.33-0.332-0.23-1.014 0.15-1.014 0.2 0 0.27 0.091 0.16 0.201s-0.05 0.383 0.13 0.608c0.34 0.408-0.06 0.591-0.44 0.205zm-16.01-1.447c-0.46-1.189-0.37-1.376 0.18-0.376 0.25 0.475 0.39 0.939 0.3 1.031-0.1 0.092-0.31-0.203-0.48-0.655zm19.62 0.448c-0.25-0.405 1-1.511 1.72-1.525 0.8-0.016 2.07 0.65 2.07 1.085 0 0.305-0.18 0.295-0.84-0.047-1.09-0.573-1.28-0.556-2.07 0.191-0.45 0.42-0.75 0.519-0.88 0.296zm-2.4-0.894c0.26-1.077 0.38-1.25 0.86-1.25 0.46 0 0.91 1.047 0.64 1.482-0.09 0.149-0.51 0.336-0.93 0.416-0.68 0.131-0.74 0.069-0.57-0.648zm-23.85-0.083c-0.21-0.206-0.38-0.583-0.38-0.836 0-0.399 0.07-0.395 0.49 0.03 0.27 0.271 0.44 0.648 0.38 0.838-0.08 0.249-0.22 0.24-0.49-0.032zm37.26-0.454c0.2-0.083 0.62-0.088 0.91-0.011 0.3 0.077 0.13 0.145-0.37 0.151-0.5 0.007-0.75-0.056-0.54-0.14zm-42.3-1.524c-0.31-0.303-0.25-1.38 0.06-1.189 0.35 0.216 0.66 1.392 0.37 1.392-0.13 0-0.32-0.091-0.43-0.203zm28.01-1.391c-0.77-0.877-1.36-1.641-1.3-1.698 0.26-0.263 1.38 0.65 1.98 1.615 0.48 0.774 0.88 1.074 1.47 1.09 0.73 0.019 0.75 0.048 0.21 0.283-0.34 0.143-0.69 0.271-0.78 0.283-0.1 0.011-0.81-0.696-1.58-1.573zm-23.76-0.079c0.11-0.289-0.01-0.456-0.32-0.456-0.27 0-0.49-0.103-0.49-0.229s0.72-0.247 1.6-0.269 1.43 0.024 1.22 0.102-0.38 0.321-0.38 0.54c0 0.411-0.65 0.768-1.39 0.768-0.25 0-0.35-0.186-0.24-0.456zm-3.64-0.659c-0.12-0.112-0.2-0.557-0.18-0.989 0.02-0.771 0.03-0.769 0.29 0.112 0.28 0.925 0.24 1.23-0.11 0.877zm35.84-1.014c-0.1-0.167-0.04-0.304 0.13-0.304 0.18 0 0.33 0.137 0.33 0.304s-0.07 0.304-0.14 0.304-0.22-0.137-0.32-0.304zm-33.01-0.743c0-0.534 0.19-0.613 0.45-0.191 0.09 0.156 0.03 0.369-0.14 0.475-0.17 0.104-0.31-0.023-0.31-0.284zm18.81-2.331c-0.48-0.536-0.75-1.115-0.64-1.387 0.35-0.926 1.52-1.825 2.24-1.716 0.9 0.138 1.16 0.397 0.4 0.397-1.03 0-1.99 0.89-1.89 1.755 0.05 0.431 0.25 0.834 0.44 0.896 0.22 0.071 0.28-0.183 0.18-0.709-0.31-1.637 2.11-2.245 3.66-0.917 0.46 0.395 0.84 0.818 0.84 0.939s-0.43-0.135-0.94-0.568c-0.52-0.433-1.14-0.787-1.39-0.787-0.73 0-1.63 0.593-1.63 1.075 0 0.582 0.49 0.575 0.72-0.011 0.26-0.682 1.61-0.555 2.14 0.202 0.56 0.802 0.38 1.167-0.58 1.167-0.4 0-0.79 0.107-0.87 0.238s-0.53 0.262-1.01 0.291c-0.61 0.039-1.09-0.208-1.67-0.865zm4.79 0.669c-0.1-0.152 0.1-0.204 0.44-0.117 0.71 0.186 0.8 0.393 0.17 0.393-0.25 0-0.52-0.125-0.61-0.276zm-17.06-0.333c-0.1-0.167-0.04-0.304 0.14-0.304s0.32 0.137 0.32 0.304-0.06 0.304-0.13 0.304c-0.08 0-0.22-0.137-0.33-0.304zm18.41-0.621c0-0.175-0.34-0.682-0.75-1.127-0.41-0.444-0.68-0.878-0.6-0.964 0.21-0.202 1.96 1.668 1.96 2.087 0 0.177-0.14 0.321-0.31 0.321-0.16 0-0.3-0.143-0.3-0.317zm1.6-1.101c-0.21-0.085-0.39-0.294-0.39-0.465 0-0.18 0.23-0.216 0.54-0.086 0.29 0.124 1.01 0.329 1.59 0.454l1.07 0.228-1.22 0.011c-0.67 0.006-1.39-0.058-1.59-0.142zm-1.22-3.651c-0.21-0.084-0.38-0.295-0.38-0.469 0-0.207 0.14-0.199 0.41 0.023 0.22 0.186 0.49 0.248 0.6 0.138s0.2-0.04 0.2 0.155c0 0.372-0.2 0.409-0.83 0.153zm-3.27-0.851c-2.09-0.332-3.98-1.046-2.83-1.067 0.28-0.005 0.58 0.108 0.67 0.253 0.09 0.144 1.07 0.334 2.17 0.422 1.81 0.146 2.59 0.363 2.24 0.632-0.07 0.055-1.08-0.053-2.25-0.24zm-5.02-1.667c0-0.177 0.14-0.322 0.3-0.322 0.17 0 0.31 0.06 0.31 0.134s-0.14 0.219-0.31 0.322c-0.16 0.104-0.3 0.043-0.3-0.134zm1.91 0.103c0.1-0.101 0.36-0.112 0.58-0.024 0.24 0.097 0.17 0.169-0.18 0.183-0.32 0.014-0.5-0.058-0.4-0.159zm-21.38-1.3374c0.59-0.3812 0.91-0.3812 0.91 0 0 0.1673-0.3 0.3021-0.68 0.2995-0.55-0.0038-0.6-0.0611-0.23-0.2995zm18.17 0.1187c-0.1-0.1028-0.57-0.2236-1.04-0.2686-1.13-0.108-1.92-0.4509-1.92-0.8325 0-0.1699 0.22-0.1262 0.49 0.0971 0.42 0.3451 0.55 0.3184 0.92-0.1776 0.41-0.5705 0.43-0.5685 0.89 0.0875 0.52 0.7388 1.12 0.9151 0.87 0.2537-0.12-0.3084 0.04-0.378 0.63-0.2663 0.43 0.0832 0.75 0.1698 0.7 0.1926s-0.37 0.2798-0.72 0.5711c-0.35 0.2914-0.72 0.4457-0.82 0.343zm-11.09-0.9109c0.1-0.1011 0.36-0.1119 0.58-0.024 0.25 0.0971 0.17 0.1692-0.18 0.1838-0.32 0.0132-0.5-0.0587-0.4-0.1598zm4.95-0.5006c0.29-0.9301 0.39-1.0064 0.81-0.5881 0.28 0.272 0.28 0.3599 0.01 0.3599-0.2 0-0.28 0.2054-0.18 0.4563 0.11 0.2936-0.01 0.4563-0.34 0.4563-0.38 0-0.46-0.1634-0.3-0.6844zm-6.78 0.1964c0.11-0.101 0.37-0.1119 0.59-0.024 0.24 0.0971 0.17 0.1692-0.19 0.1838-0.32 0.0132-0.5-0.0587-0.4-0.1598zm3.96-1.0254c-0.05-0.7347 0.11-0.771 0.72-0.1596 0.25 0.2509 0.39 0.4563 0.31 0.4563s-0.34 0.0718-0.57 0.1595c-0.26 0.1-0.43-0.0704-0.46-0.4562zm-9.59-1.2487c0.1-0.4113 0.24-0.5492 0.32-0.3213 0.07 0.2194-0.01 0.5436-0.19 0.7203-0.23 0.2258-0.27 0.107-0.13-0.399zm1.98-0.2695c-0.29-0.4548-0.71-0.6186-1.6-0.6186-1.19 0-1.22-0.0203-1.22-1.0972 0-0.8755 0.1-1.0599 0.49-0.9126 0.26 0.1016 0.64 0.189 0.83 0.1943 0.2 0.0054 0.12 0.1898-0.17 0.4099-0.49 0.3701-0.47 0.4264 0.24 0.7489 0.62 0.2841 0.8 0.2645 0.94-0.1056 0.18-0.4727 0.93-0.5875 1.76-0.2698 0.86 0.33 0.52 0.8127-0.44 0.6214-0.85-0.17-1.32 0.2222-0.57 0.4729 0.19 0.0622 0.29 0.352 0.23 0.644-0.1 0.4777-0.15 0.4689-0.49-0.0876zm2.13-1.1066c0.11-0.1011 0.37-0.1119 0.59-0.024 0.24 0.0971 0.17 0.1692-0.19 0.1838-0.32 0.0132-0.5-0.0587-0.4-0.1598zm3.01-1.033c0-0.4182 0.07-0.5893 0.15-0.3802 0.09 0.2091 0.09 0.5513 0 0.7605-0.08 0.2091-0.15 0.038-0.15-0.3803z" transform="translate(10 1322.7)"/>
+ <rect id="d0e135" display="none" height="1e3px" width="288" y="1465.9" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e135"/>
</flowRegion>
<flowDiv xml:space="preserve">Notez le très grand nombre de nœuds du chemin. Après avoir appuyé sur <flowSpan font-weight="bold">Ctrl+L</flowSpan>, voici un résultat typique :</flowDiv>
</flowRoot>
- <text id="tracing-f06-fr.svgtext2885" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 1512.8)" xml:space="preserve" line-height="100.00000%" font-size="6" y="128.33766" x="81.327339" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f06-fr.svgtspan2886" y="128.33766" x="81.327339" sodipodi:role="line">Image originale</tspan></text>
- <text id="tracing-f06-fr.svgtext2888" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 1512.8)" xml:space="preserve" line-height="100.00000%" font-size="6" y="124.67367" x="227.35374" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f06-fr.svgtspan2889" y="124.67367" x="227.35374" sodipodi:role="line">Image vectorisée / Chemin résultant — Simplifié</tspan><tspan id="tracing-f06-fr.svgtspan2891" y="130.67367" x="227.35374" sodipodi:role="line">(384 nœuds)</tspan></text>
- <image id="tracing-f06-fr.svgimage1855" sodipodi:absref="/oldguitar.jpg" xlink:href="oldguitar.jpg" transform="translate(10 1512.8)" height="115.89" width="83.347" y=".058779" x="39.654"/>
- <path id="tracing-f06-fr.svgpath1856" d="m185.36 89.642v-26.312c2.75 0.214-1.46-0.484-0.01-2.745 0.01-9.174 0.03-18.348 0.04-27.522 3.14-0.382 3.52-0.813 5.15-0.14-0.1-0.543 6.61 1.062 4.27-1.007 2.32 0.05 5.04-0.393 1.89 1.17 3.75-0.672 7.61-2.582 11.13-0.349 5.33 0.097 3.03 0.037 1.6-1.05 3.17-0.429-6.19-0.139-1.76-0.086 2.08-2.801 9.63 3.884 6.92-3.22 1.56-0.493 1.39 6.127 2.89 0.699 2.56-3.733 2.4 3.493 6.37 1.604 1.07-3.701-4.17-6.684-7.12-8.166 2.81 1.684 5.26 0.793 2.17-2.023-0.34-3.194 5.23 3.836 8 3.024 4.33 1.742-7.33 2.644-0.51 2.855 1.09 1.705 4.84 6.01 3.95 0.683-0.04-1.819-0.23-10.127-1.49-4.793-3.46-0.879-5.06-4.836-7.71-4.155-0.62-1.477 1.16-1.504 1.74-2.567-0.82 2.324 6.49 3.348 5.91 0.852-1.43-2.129-5.79 1.75-4.95-1.772 4.54 0.377 2.67-2.664 0.35-2.344-1.5 1.835-9.89 3.443-8.62 2.425 1.63-1.707 7.28-1.237 9.99-4.7142 4.79-2.7554 9.75-5.3947 15.44-3.8839 1.82-1.8037-1.44-7.1732 2.88-5.9164 5.09 0.1172 10.31-0.5425 15.28 0.3304 3.71-0.4323 11.96-2.1157 9.38 4.9761 0.07 36.819 0.1 73.64-0.14 110.46-27.68-0.01-55.36-0.01-83.04-0.01v-26.308zm6.98 25.118c0.82-2.96-2.27 2.08 0 0zm2.36-1.64c-0.1-2.46-1.09 2.95 0 0zm1.18-0.13c-0.59 0.22 0.42 1.43 0 0zm-2.31-0.51c1.58-4.77-2.71 2.96 0 0zm-1.8 0.2c1.25-4.6 5.42-9.67 10.05-9.89 1.46-2.07-0.48-5.022-0.08-7.207-4.92-4.349-3.53 8.547-7.62 10.687-2.95 0.78-3.96 5.99-2.35 6.41zm55.06-3.05c-2.48-4.85 0.76 4.44 0 0zm-1.72-0.17c-1.39-1.41 0.42 1.88 0 0zm-1.33-2c-2.35-1.71 0.91 2.63 0 0zm2.27-1.53c-1.46-2.69-1.86 5.24 0 0zm-2.59-1.19c-1.89-3.23-0.52 1.45 0 0zm2.43-0.36c-0.62-0.67-0.69 1.01 0 0zm-7.49-2.42c-2.83-2.008-1.69 0.97 0 0zm6.03-0.21c-1.76-0.19 0.57 0.54 0 0zm-8.58-0.59c-3.11-1.194-2.11-3.874-3.74-4.116 2.63 0.914 2.1 2.124 4.87 1.989 3.48 2.777 6.6 0.793 10.04 1.597-2.31-2.311-8.5 0.46-11.59-3.244-7.35-3.872-13.34-10.542-21.9-11.762-3.12-1.3-9.61-4.182-9.7-6.483 3.78-4.319-6.22-0.693-7.05 1.356-4.07 3.426 2.15 9.561 3.33 8.707 1.3-2.198 1.89 0.297 0.24 0.76 0.88-0.786 6.31 2.681 2.61-1.175-2.48-1.531-3.67-1.488-2.15-2.992 2.87-0.736 4.68 6.909 4.42 2.247 1.83 1.796 5.58 4.532 5.56 0.741 0.52 0.625 4.94 3.58 8.1 4.86 1.02-2.932 3.16 2.699-0.02 0.955 3.2 2.982 9.7 2.899 13.91 5.44 1.06-0.077 2.23 1.74 3.07 1.12zm-5.78-3.458c0.76-1.184 0.76 1.185 0 0zm-1.21-0.608c-2.07 0.726-4.67-3.14-3.17-1.996-1.02 0.642 5.87 2.494 3.17 1.996zm-4.95-1.242c-2.89-0.68-0.27-2.401 0.59 0.288l-0.59-0.288zm-2.35-1.326c0.39-1.445 0.64 1.131 0 0zm2.35-0.067c2.17-0.346-0.21 0.54 0 0zm-21.82-4.495c0.77-1.191 0.84 0.639 0 0zm2.54-3.073c-0.18-1.645 1.9 1.716 0 0zm1.46 11.779c2.71-0.829 6.9-1.752 1.5-2.043-2.64-1.777-6.75 0.069-3.54 2.587l0.88-0.136 1.16-0.408zm12.42-3.575c-1.67-2.741-4.27-0.34 0 0zm-4.25-1.043c-0.76-1.184-0.76 1.184 0 0zm1.44-0.38c-1.08-1.196-0.86 1.472 0 0zm-7.53-2.966c-1.14-1.246-1.14 1.247 0 0zm23.58-8.213c-0.94-0.978-0.1 1.048 0 0zm-3.35-0.608c-1.4-1.082-0.02 1.039 0 0zm13.27-0.814c-1.11-1.392 0.83 2.245 0 0zm-14.5 0.24c-2.97-1.669-0.75 0.574 0 0zm3.51-0.661c-1.2 0.175-0.19-0.133 0 0zm-5.63-0.286c-1.61-1.111 0.35 1.048 0 0zm17.5-0.735c0.47-1.524 2.41-3.786 0.99-3.743 3.69-0.781 0.85 1.257 0.42 3.543 2.48-0.456 3.82-10.563 2.56-8.535-0.93 7.587-0.43-5.934-2.76-5.131 0.73 1.541-6.22 1.882-4.48-0.009-0.1-2.711-2.98-7.476-6.23-9.95 3.28 0.879 6.37 6.586 7.96 9.959 1.43-3.843-6.33-9.943-6-10.534 2.4 1.448 8.09 7.021 3.53 1.408-0.99-1.744-6.27-3.938-1.3-2.14 1.78 1.666 7.31 7.629 3.18 2.181-0.76-3.718-10.23-3.685-4.75-6.829 0.79-3.15 4.5-10.265 3.82-11.216-3.19 1.477 3.02-3.677-0.71-2.201-2.69-0.577-3.57 0.48-0.41 0.223 1.29 2.785-3.91 3.588-3.26 0.011-7.35-0.081-7.05 8.541-6.94 13.745-3.06 5.006-12.88 2.877-15.63 7.765-0.74 5.201 2.88 11.909 7.87 5.813 3.28-2.178 5.77-6.327 8.65-7.843 2.82 0.052 1.67 2.693 5.8 3.752 2.35 1.154 5.09 6.088 1.84 4.569 1.25 3.463 3.76 5.648 3.5 9.54 1.92-0.653 1.44 4.986-0.14 0.882-0.15 0.962 1.93 5.404 2.49 4.74zm-0.4-2.199c-0.66-1.585 2.33 0.146 0 0zm0.09-2.407c1.14 0.349 0.28-0.003 0 0zm3.52 0.211c-0.2-1.884 0.92 0.724 0 0zm-4.74-6.134c0.9-1.017 1.41 0.578 0 0zm3.07-1.638c0.13-1.322 0.28 1.138 0 0zm-11.43-8.999c-0.06-1.227 1.25 1.145 0 0zm-1.24-3.489c-1.24-1.454 2.22 1.459 0 0zm3.52-6.398c0.54-1.458 0.54 1.459 0 0zm-1.31-0.042c-0.2-1.668 1.51 0.757 0 0zm3.14-4.502c0.76-1.192 0.83 0.639 0 0zm0-2.13c0.9-1.838 0.61 1.385 0 0zm0.6-0.778c0.76-1.184 0.76 1.184 0 0zm-0.56-0.608c0.21-1.771 0.21 1.771 0 0zm-4.8-2.244c1.85-2.685 1.9 0.799 0 0zm2.33-0.722c1.26-2.756 0.04 2.034 0 0zm-10.55 41.427c2.09-1.901 0.15-2.928 0.22-2.567 0.64-6.943-1.89 5.81-1.95-0.172 1.21-4.798-2.06-2.684-1.73-0.78-2.96-2.157 3.58 5.713 3.46 3.519zm-0.34-2.263c0.17-2.077 0.17 2.076 0 0zm-2.3-0.507c-1.38-1.545 1.59 0.267 0 0zm14.09 0.507c-0.75-1.184-0.75 1.184 0 0zm-16.12-2.7c-0.85-2.691-0.73-2.76 0.47-1.711 2.69-2.567-2.17-0.216 0.26-3.117 3.54-0.062 1.92 5.57 2.86 0.256 0.92-2.793 2.11-8.138-2.22-4.227-3.65 0.708-3.43 7.869-1.37 8.799zm-0.86-4.525c-0.74-3.312 1.57 1.878 0 0zm17.1 4.041c2.74-4.011-1.05-4.045-1.59-2.691-0.67-2.235 7.12-3.356 0.7-3.966-2.01 2.365-0.83 4.029 0.12 6.678-0.92 0.797 0.76 1.116 0.77-0.021zm-1.13-5.232c-0.63-2.287 1.51 1.233 0 0zm-3.97 4.848c-0.59 0.219 0.42 1.426 0 0zm8.03 0.526c-0.76-1.184-0.76 1.184 0 0zm-14-0.989c-0.45-1.954-0.29 2.679 0 0zm12.64-0.148c1.19-2.489-0.87-6.203-0.25-2.128-0.76 0.289-0.82 3.848 0.25 2.128zm1.66-0.725c-0.86-1.772-1.06 3.159 0 0zm-5.32-3.935c-0.96-1.302 0.43-5.475-1.57-1.869-0.52-0.44-2.06 1.709-1.05-1.931 0.69-1.855-3.43-5.943-1.56-1.744 1.45 2.221 0.13 7.732 2.36 5.677-1.19 3.591 2.13-1.639 0.66 2.126 0.81-0.296 0.87-1.579 1.16-2.259zm-7.88 1.202c-3.64-1.948 1.48 2.216 0 0zm2.71-0.272c-1.61-1.111 0.34 1.048 0 0zm18.23-1.574c-1.48-3.111 0.31-6.392-1.22-7.493-2.92-4.395-3.05 7.292-1.16 3.818-3.38-3.834 2.33-4.719 0.47-2.533-1.29-0.263-0.38 2.221 0.37 1.184-0.56 1.063 1.2 7.036 1.54 5.024zm-21.6 0.389c-0.64-1.695-1.23 1.137 0 0zm2.3-0.673c-1.49-0.005 0.77-2.184-1.52-0.271-0.09 0.798 1.25 0.778 1.52 0.271zm1.99 0.054c1.72-3.875-1.75-0.072 0 0zm-25.3-1.694c-1.6-1.594 0.2 1.558 0 0zm3.67 0.118c1.97-1.146-1.26-0.601 1-1.995-2.4-0.193-5.7 2.944-1 1.995zm4.3-0.69c-0.36-4.705-1.62-2.487-0.67 0.618 0.37 0.338 0.64-0.415 0.67-0.618zm13.82 0.42c-2.59-1.399 0.01 1.384 0 0zm1.66-0.283c-0.07-1.416-1.13 1.018 0 0zm-16.87-0.941c-1.32-1.524-1.18 2.256 0 0zm-9.75-0.678c-1.11-0.592-0.31 2.733 0 0zm25.43 0.153c-1.17-3.726-0.54 3.648 0 0zm6.53 0.058c-1.14 0.349-0.28-0.003 0 0zm-5.02-0.134c1.98-2.281-0.92 0.136 0 0zm9.38-0.143c-0.28-1.809-1.41 1.127 0 0zm-30.98-0.846c3.73-2.006-1.83-2.412-1.18-1.445 0.23-0.087 0.05 4.156 1.18 1.445zm-13.54 0.313c2.25-1.034 4.71-2.709 0.05-1.695-3.06 0.012-4.51 2.543-0.05 1.695zm0.03-0.972c0.13-1.322 0.28 1.138 0 0zm10.55 0.43c-1.35-1.53 0.64 2.202 0 0zm-6.32 0.305c-0.73-1.215-0.48 1.131 0 0zm3.64-0.598c-0.66-1.516-1.81 2.374 0 0zm9.75 0.453c-3.25-1.087-2.48 1.328 0 0zm22.36-0.159c1.92 0.16-2.12-0.711-0.33 0.111l0.33-0.111zm2.5 0.397c-2.6-0.262 0.43 0.499 0 0zm12.45-2.298c3.09-4.364 4.75-7.99 5.1-11.035 1.17-4.263-2.99-10.455-6.81-9.774 3.3 0.379 2.31 2.315 4.51 3.56 1.02 2.691-0.36 3.899 0.74 4.96 1.38 2.316 1.07 0.837-0.89 1.794-0.29 1.194-1.26-2.244-1.94 1.289-3.41-0.177 0.5-1.44 0.82-3.37 2.04 3.276 0.09-6.077-1.56-4.654 1.22-1.671-1.84-0.558-1.27-2.408-1.78 4.003 0.22-2.847-1.52 1.172-1.75 3.046-3.33 8.045-0.12 5.31 2.17-4.923 1.31-0.357 0 2.297-1.37-1.04-0.95-1.401-2.86 0.168-0.89 1.737-2.11 5.343 0.12 2.097-0.31 2.071 1.47 1.882 1.68 1.724 0.19-2.098 4.08-0.797 2.25 1.286-2.97-2.22-0.05 4.435-3.38 0.764-1.59-1.025 0.06 2.243 2.14 2.332 3.26-0.032 0.46 7.457 2.99 2.488zm-1.81-3.27c0.43-2.005 1.03 1.923 0 0zm-1.43-0.305c0.75-1.184 0.75 1.185 0 0zm2.48-1.096c1.88-2.568 2.71 2.19 0 0zm2.69-0.577c1.8-1.717-1.96 0.146-0.61-2.129 0.45-4.219 0.95 0.951 0.81 0.238 0.3-2.891 2.38 1.392 0.76 0.687 0.65 0.297-0.75 2.651-0.96 1.204zm-2.13-1.368c1.09-2.079 0.68 1.965 0 0zm-0.31-1.199c0.66-1.103 0.85 0.673 0 0zm-5.17-1.977c0.77-1.192 0.84 0.639 0 0zm5.06-1.844c0.11-1.67 0.91 1.577 0 0zm4.99-1.798c-3.22-3.183 1.97-2.412 0 0zm-5.03 0.43c1.4-0.162 0.24-0.149 0 0zm-2.58-2.89c1.64-1.393-0.4 1.613 0 0zm2.43 0.152c1.41-1.305 0.59 1.212 0 0zm-58.96 17.131c-1.75-0.192 0.58 0.536 0 0zm15.96-1.215c-3.42-0.764 0.99 2.656 0 0zm-17.08 0.814c-1.58-1.173-0.34 1.261 0 0zm13.07-0.859c-2.95-0.04 0.01 1.891 0 0zm1.69 0.555c-1.13-1.06-0.82 0.618 0 0zm-4.04-0.211c-2.6-0.262 0.43 0.499 0 0zm11.39 0.003c-1.75-0.192 0.58 0.536 0 0zm22.08-0.882c-1.52-0.382-0.12 1.791 0 0zm-22.56-0.957c-0.59 0.219 0.42 1.427 0 0zm-0.49-0.082c-0.68-1.248-1.31 1.267 0 0zm22.82-0.295c-0.93-0.673-1.38 1.063 0 0zm13.26-0.535c-0.59 0.219 0.42 1.426 0 0zm-0.87-0.597c-2.32-1.309 1.05 1.821 0 0zm-2.15-2.358c-2.43-1.51 2.14 2.531 0 0zm-26.21-0.474c-1.4-0.162-0.24-0.148 0 0zm26.77-0.631c0.54-2.564-1.74 2.37 0 0zm-25.72-0.269c1.37-1.396-3.43 1.117 0 0zm2.78-1.626c-1.14 0.308 0.93 2.053 0 0zm-2.46-1.834c-0.75-2.027-1.79 1.707 0 0zm2.19-1.475c-0.69 0.626 0.81 1.923 0 0zm-0.67 0.664c-0.73-1.215-0.49 1.131 0 0zm-2.32-0.741c-1.4-1.1-0.43 1.429 0 0zm2.93-2.32c-2.71-4.102-2.27 2.386 0 0zm-17.65-0.893c-0.72-1.216-0.48 1.131 0 0zm16.57-1.416c-2.59-1.418 1.22 1.839 0 0zm10.4-1.094c-0.53-0.197 0.34 2.131 0 0zm-11.45-0.246c-1.21 0.175-0.2-0.133 0 0zm1.15-0.347c1.5-2.786-2.37 1.445 0 0zm-24.58-0.396c-0.73-1.696-0.33 1.612 0 0zm34.58-1.45c-0.39-0.762 0.17 4.267 0 0zm20.86 0.792c-0.69-1.79-1.04 0.708 0 0zm-31.25-0.715c3.49-3.39-3.25 1.01 0 0zm-30.07-4.336c-0.39-0.745 0.18 4.244 0 0zm18.36-0.258c-0.69-0.67-0.66 1.573 0 0zm53.04-5.988c1.5-5.207 1.19-14.231-2.24-16.276 2.87 4.949 1.25 10.413-0.66 15.397 0.23 3.498 3.01 6.894 2.9 0.879zm-53.04 2.678c-3.12-1.197-1.75 0.887 0 0zm22.51-1.369c-0.37-1.443-0.61 1.513 0 0zm-8.22-1.463c-0.71-3.95-0.73 2.913 0 0zm9.13-8.879c-2.08-1.599 0.69 1.522 0 0zm0.76-0.761c-0.93-0.977-0.1 1.048 0 0zm-0.91-1.217c-0.94-0.978-0.1 1.049 0 0zm15.66-3.346c-1.89-2.162-3.08-4.936-2.39-8.0387-2.37-1.9045-9.4-2.0434-5.68 1.8477 1.33-0.6548 5.12 7.193 8.07 6.191zm12.41-5.339c-3.6-1.6279-0.81 1.688 0 0zm-3.78-0.146c-4.12-1.3219-3.64 1.43 0 0zm1.82-1.6493c7.47 1.0245-3.66-2.2752-2.46 0.2065 0.79-0.2777 1.64-0.224 2.46-0.2065zm4.05-1.5215c-2.38-2.4059-8.62-2.5656-2.25-0.6056 0.39-0.0295 2.86 2.1469 2.25 0.6056zm-5.99-0.9077c-1.29 0.4219-0.73 2.3512 0 0zm6.7-0.9039c-1.05-2.6216-8.7-2.745-2.67-0.784 0.73-0.2943 3.07 2.6033 2.67 0.784zm-67.31 27.014c-1.1-2.571 1.29 0.232 0 0zm1.2-0.019c-0.02-1.746 0.98 0.286 0 0zm6.96-0.642c0.52-2.798 6.75-0.164 1.37-0.022l-1.37 0.022zm1.41-0.58c-1.75-0.192 0.58 0.536 0 0zm-7.35 0.208c0.75-1.184 0.75 1.184 0 0zm-2.13-0.566c1.63-0.646 2.28 0.982 0 0zm4.41-0.034c-4.06 0.368-3.98-2.948-3.61-5.322-0.85 0.793 2.04-5.422-1.31-4.523 1.11-3.037-2.37 0.117-2.36-2.769-0.59 2.782-0.07-2.511-2.72-0.406-1.67-1.905-0.59-10.205 0.7-6.456 1.16-2.5712 5.04-2.3132 7.74-1.6191 2.21 0.7971 8.55-1.6254 5.13 0.6121 0.22 0.938 8.73-1.0241 3.08 0.118-2.39 0.173-3.86 2.191-1.78 2.615-2.54 1.935-4.26-2.363-5.05 2.057-3.02 1.626 0.38 4.854 0.22 7.825-2-5.451-0.16 3.9 1.2 5.085 2.83 2.483 2.28 3.402-1.24 2.783zm-2.28-2.442c-1.41-1.305-0.6 1.212 0 0zm-2.66-15.818c2.58 0.263 0.01-2.7269-0.62-1.673 1.62 1.225-2.51 2.832 0.62 1.673zm2.29-0.988c-1.42-3.4483 0.22 3.434 0 0zm4.94-0.176c-3.49 0.067 0.9 1.216 0 0zm-8.53-0.339c-1.22-2.1177-1.52 1.434 0 0zm3.4-1.4421c-1.75-0.1917 0.58 0.5357 0 0zm11.43 21.286c3.41-0.153-0.16 0.432 0 0zm-16.84-1.875c0.89-2.904 1.32 2.978 0 0zm33.72 0.459c-2.24-2.221 3.4 1.277 0 0zm-13.25-0.118c-2.46-4.069 6-4.041 2.61-2.268-0.86 4.798-1.15-2.368-1.39 2.355l-0.46 0.141-0.76-0.228zm4.86-0.888c-0.77-2.831 1.56 0.877 0 0zm-16.01-1.447c-1.04-3.251 1.44 2.399 0 0zm19.62 0.448c0.96-3.378 6.35 0.725 1.39-0.722-0.45 0.148-0.81 1.123-1.39 0.722zm-2.39-0.894c1.56-3.98 1.93 2.882 0 0zm-23.86-0.083c-2.03-3.741 1.86 1.13 0 0zm37.26-0.454c4.28-0.174-0.77 0.387 0 0zm-42.3-1.524c-1.06-3.201 1.7 0.927 0 0zm28.01-1.391c-4.11-4.092 4.65 1.826 1.58 1.572-0.6-0.441-1.07-1.029-1.58-1.572zm-23.76-0.079c-2.02-2.201 4.74-0.051-0.01 0.329l0.01-0.329zm-3.64-0.659c-0.96-3.087 1.16 0.37 0 0zm35.84-1.014c-0.06-1.227 1.25 1.145 0 0zm-33-0.743c0.39-1.445 0.64 1.131 0 0zm18.8-2.331c-2.55-3.038 5.47-3.996 0.22-1.59-0.1 3.906 1.42-3.759 4.17-0.092 2.93 0.373-5.29-0.049-2.4 0.649 5.71-1.122 0.15 4.002-1.99 1.033zm4.79 0.669c0.31-0.744 2.48 1.139 0 0zm-17.05-0.333c-0.07-1.226 1.25 1.146 0 0zm18.4-0.622c-3.22-3.203 0.91-1.51 0.31 0.318l-0.22-0.093-0.09-0.225zm1.6-1.1c-0.61-1.418 5.35 0.922 0.62 0.105l-0.62-0.105zm-1.22-3.651c-1.5-1.579 2.55 0.626 0 0zm-3.27-0.851c-6.2-1.265 0.19-0.852 2.26 0.24-0.76 0.014-1.51-0.137-2.26-0.24zm-5.02-1.667c0.66-1.1024 0.85 0.673 0 0zm1.91 0.103c1.5-0.52 0.22 0.626 0 0zm-21.37-1.3375c2.2-1.1364-0.51 1.3665 0 0zm18.16 0.1188c-4.61-0.2578-1.89-2.3707 0.26-0.4972-0.29-1.5971 3.16-0.1293-0.26 0.4972zm-11.09-0.9111c1.51-0.5199 0.22 0.6263 0 0zm4.96-0.5004c1.4-2.6223 0.52 2.3152 0-0.0001v0.0001zm-6.78 0.1962c1.5-0.5198 0.22 0.6263 0 0zm3.95-1.0253c0.58-1.8572 1.45 1.8571 0 0zm-9.59-1.2487c0.89-1.6927-0.18 1.9301 0 0zm1.98-0.2695c-2.04 0.7421-4.42-3.3555-1.4-2.3097-1.65 1.8686 6.08 0.1224 1.32 1.5497 0.79-0.0983 0.72 2.0665 0.08 0.76zm2.14-1.1066c1.5-0.5198 0.21 0.6261 0 0zm3.01-1.033c0.21-1.7729 0.21 1.7727 0 0z" transform="translate(10 1512.8)"/>
- <rect id="d0e151" display="none" height="1e3px" width="288" y="1656.2" x="10"/>
+ <text id="tracing-f06-fr.svgtext2885" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 1502.8)" xml:space="preserve" line-height="100.00000%" font-size="6" y="128.33766" x="81.327339" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f06-fr.svgtspan2886" y="128.33766" x="81.327339" sodipodi:role="line">Image originale</tspan></text>
+ <text id="tracing-f06-fr.svgtext2888" style="text-anchor:middle" font-weight="bold" sodipodi:linespacing="100.00000%" display="block" transform="translate(10 1502.8)" xml:space="preserve" line-height="100.00000%" font-size="6" y="124.67367" x="227.35374" font-family="sans-serif" sodipodi:insensitive="true" fill="#000000"><tspan id="tracing-f06-fr.svgtspan2889" y="124.67367" x="227.35374" sodipodi:role="line">Image vectorisée / Chemin résultant — Simplifié</tspan><tspan id="tracing-f06-fr.svgtspan2891" y="130.67367" x="227.35374" sodipodi:role="line">(384 nœuds)</tspan></text>
+ <image id="tracing-f06-fr.svgimage1855" sodipodi:absref="/oldguitar.jpg" xlink:href="oldguitar.jpg" transform="translate(10 1502.8)" height="115.89" width="83.347" y=".058779" x="39.654"/>
+ <path id="tracing-f06-fr.svgpath1856" d="m185.36 89.642v-26.312c2.75 0.214-1.46-0.484-0.01-2.745 0.01-9.174 0.03-18.348 0.04-27.522 3.14-0.382 3.52-0.813 5.15-0.14-0.1-0.543 6.61 1.062 4.27-1.007 2.32 0.05 5.04-0.393 1.89 1.17 3.75-0.672 7.61-2.582 11.13-0.349 5.33 0.097 3.03 0.037 1.6-1.05 3.17-0.429-6.19-0.139-1.76-0.086 2.08-2.801 9.63 3.884 6.92-3.22 1.56-0.493 1.39 6.127 2.89 0.699 2.56-3.733 2.4 3.493 6.37 1.604 1.07-3.701-4.17-6.684-7.12-8.166 2.81 1.684 5.26 0.793 2.17-2.023-0.34-3.194 5.23 3.836 8 3.024 4.33 1.742-7.33 2.644-0.51 2.855 1.09 1.705 4.84 6.01 3.95 0.683-0.04-1.819-0.23-10.127-1.49-4.793-3.46-0.879-5.06-4.836-7.71-4.155-0.62-1.477 1.16-1.504 1.74-2.567-0.82 2.324 6.49 3.348 5.91 0.852-1.43-2.129-5.79 1.75-4.95-1.772 4.54 0.377 2.67-2.664 0.35-2.344-1.5 1.835-9.89 3.443-8.62 2.425 1.63-1.707 7.28-1.237 9.99-4.7142 4.79-2.7554 9.75-5.3947 15.44-3.8839 1.82-1.8037-1.44-7.1732 2.88-5.9164 5.09 0.1172 10.31-0.5425 15.28 0.3304 3.71-0.4323 11.96-2.1157 9.38 4.9761 0.07 36.819 0.1 73.64-0.14 110.46-27.68-0.01-55.36-0.01-83.04-0.01v-26.308zm6.98 25.118c0.82-2.96-2.27 2.08 0 0zm2.36-1.64c-0.1-2.46-1.09 2.95 0 0zm1.18-0.13c-0.59 0.22 0.42 1.43 0 0zm-2.31-0.51c1.58-4.77-2.71 2.96 0 0zm-1.8 0.2c1.25-4.6 5.42-9.67 10.05-9.89 1.46-2.07-0.48-5.022-0.08-7.207-4.92-4.349-3.53 8.547-7.62 10.687-2.95 0.78-3.96 5.99-2.35 6.41zm55.06-3.05c-2.48-4.85 0.76 4.44 0 0zm-1.72-0.17c-1.39-1.41 0.42 1.88 0 0zm-1.33-2c-2.35-1.71 0.91 2.63 0 0zm2.27-1.53c-1.46-2.69-1.86 5.24 0 0zm-2.59-1.19c-1.89-3.23-0.52 1.45 0 0zm2.43-0.36c-0.62-0.67-0.69 1.01 0 0zm-7.49-2.42c-2.83-2.008-1.69 0.97 0 0zm6.03-0.21c-1.76-0.19 0.57 0.54 0 0zm-8.58-0.59c-3.11-1.194-2.11-3.874-3.74-4.116 2.63 0.914 2.1 2.124 4.87 1.989 3.48 2.777 6.6 0.793 10.04 1.597-2.31-2.311-8.5 0.46-11.59-3.244-7.35-3.872-13.34-10.542-21.9-11.762-3.12-1.3-9.61-4.182-9.7-6.483 3.78-4.319-6.22-0.693-7.05 1.356-4.07 3.426 2.15 9.561 3.33 8.707 1.3-2.198 1.89 0.297 0.24 0.76 0.88-0.786 6.31 2.681 2.61-1.175-2.48-1.531-3.67-1.488-2.15-2.992 2.87-0.736 4.68 6.909 4.42 2.247 1.83 1.796 5.58 4.532 5.56 0.741 0.52 0.625 4.94 3.58 8.1 4.86 1.02-2.932 3.16 2.699-0.02 0.955 3.2 2.982 9.7 2.899 13.91 5.44 1.06-0.077 2.23 1.74 3.07 1.12zm-5.78-3.458c0.76-1.184 0.76 1.185 0 0zm-1.21-0.608c-2.07 0.726-4.67-3.14-3.17-1.996-1.02 0.642 5.87 2.494 3.17 1.996zm-4.95-1.242c-2.89-0.68-0.27-2.401 0.59 0.288l-0.59-0.288zm-2.35-1.326c0.39-1.445 0.64 1.131 0 0zm2.35-0.067c2.17-0.346-0.21 0.54 0 0zm-21.82-4.495c0.77-1.191 0.84 0.639 0 0zm2.54-3.073c-0.18-1.645 1.9 1.716 0 0zm1.46 11.779c2.71-0.829 6.9-1.752 1.5-2.043-2.64-1.777-6.75 0.069-3.54 2.587l0.88-0.136 1.16-0.408zm12.42-3.575c-1.67-2.741-4.27-0.34 0 0zm-4.25-1.043c-0.76-1.184-0.76 1.184 0 0zm1.44-0.38c-1.08-1.196-0.86 1.472 0 0zm-7.53-2.966c-1.14-1.246-1.14 1.247 0 0zm23.58-8.213c-0.94-0.978-0.1 1.048 0 0zm-3.35-0.608c-1.4-1.082-0.02 1.039 0 0zm13.27-0.814c-1.11-1.392 0.83 2.245 0 0zm-14.5 0.24c-2.97-1.669-0.75 0.574 0 0zm3.51-0.661c-1.2 0.175-0.19-0.133 0 0zm-5.63-0.286c-1.61-1.111 0.35 1.048 0 0zm17.5-0.735c0.47-1.524 2.41-3.786 0.99-3.743 3.69-0.781 0.85 1.257 0.42 3.543 2.48-0.456 3.82-10.563 2.56-8.535-0.93 7.587-0.43-5.934-2.76-5.131 0.73 1.541-6.22 1.882-4.48-0.009-0.1-2.711-2.98-7.476-6.23-9.95 3.28 0.879 6.37 6.586 7.96 9.959 1.43-3.843-6.33-9.943-6-10.534 2.4 1.448 8.09 7.021 3.53 1.408-0.99-1.744-6.27-3.938-1.3-2.14 1.78 1.666 7.31 7.629 3.18 2.181-0.76-3.718-10.23-3.685-4.75-6.829 0.79-3.15 4.5-10.265 3.82-11.216-3.19 1.477 3.02-3.677-0.71-2.201-2.69-0.577-3.57 0.48-0.41 0.223 1.29 2.785-3.91 3.588-3.26 0.011-7.35-0.081-7.05 8.541-6.94 13.745-3.06 5.006-12.88 2.877-15.63 7.765-0.74 5.201 2.88 11.909 7.87 5.813 3.28-2.178 5.77-6.327 8.65-7.843 2.82 0.052 1.67 2.693 5.8 3.752 2.35 1.154 5.09 6.088 1.84 4.569 1.25 3.463 3.76 5.648 3.5 9.54 1.92-0.653 1.44 4.986-0.14 0.882-0.15 0.962 1.93 5.404 2.49 4.74zm-0.4-2.199c-0.66-1.585 2.33 0.146 0 0zm0.09-2.407c1.14 0.349 0.28-0.003 0 0zm3.52 0.211c-0.2-1.884 0.92 0.724 0 0zm-4.74-6.134c0.9-1.017 1.41 0.578 0 0zm3.07-1.638c0.13-1.322 0.28 1.138 0 0zm-11.43-8.999c-0.06-1.227 1.25 1.145 0 0zm-1.24-3.489c-1.24-1.454 2.22 1.459 0 0zm3.52-6.398c0.54-1.458 0.54 1.459 0 0zm-1.31-0.042c-0.2-1.668 1.51 0.757 0 0zm3.14-4.502c0.76-1.192 0.83 0.639 0 0zm0-2.13c0.9-1.838 0.61 1.385 0 0zm0.6-0.778c0.76-1.184 0.76 1.184 0 0zm-0.56-0.608c0.21-1.771 0.21 1.771 0 0zm-4.8-2.244c1.85-2.685 1.9 0.799 0 0zm2.33-0.722c1.26-2.756 0.04 2.034 0 0zm-10.55 41.427c2.09-1.901 0.15-2.928 0.22-2.567 0.64-6.943-1.89 5.81-1.95-0.172 1.21-4.798-2.06-2.684-1.73-0.78-2.96-2.157 3.58 5.713 3.46 3.519zm-0.34-2.263c0.17-2.077 0.17 2.076 0 0zm-2.3-0.507c-1.38-1.545 1.59 0.267 0 0zm14.09 0.507c-0.75-1.184-0.75 1.184 0 0zm-16.12-2.7c-0.85-2.691-0.73-2.76 0.47-1.711 2.69-2.567-2.17-0.216 0.26-3.117 3.54-0.062 1.92 5.57 2.86 0.256 0.92-2.793 2.11-8.138-2.22-4.227-3.65 0.708-3.43 7.869-1.37 8.799zm-0.86-4.525c-0.74-3.312 1.57 1.878 0 0zm17.1 4.041c2.74-4.011-1.05-4.045-1.59-2.691-0.67-2.235 7.12-3.356 0.7-3.966-2.01 2.365-0.83 4.029 0.12 6.678-0.92 0.797 0.76 1.116 0.77-0.021zm-1.13-5.232c-0.63-2.287 1.51 1.233 0 0zm-3.97 4.848c-0.59 0.219 0.42 1.426 0 0zm8.03 0.526c-0.76-1.184-0.76 1.184 0 0zm-14-0.989c-0.45-1.954-0.29 2.679 0 0zm12.64-0.148c1.19-2.489-0.87-6.203-0.25-2.128-0.76 0.289-0.82 3.848 0.25 2.128zm1.66-0.725c-0.86-1.772-1.06 3.159 0 0zm-5.32-3.935c-0.96-1.302 0.43-5.475-1.57-1.869-0.52-0.44-2.06 1.709-1.05-1.931 0.69-1.855-3.43-5.943-1.56-1.744 1.45 2.221 0.13 7.732 2.36 5.677-1.19 3.591 2.13-1.639 0.66 2.126 0.81-0.296 0.87-1.579 1.16-2.259zm-7.88 1.202c-3.64-1.948 1.48 2.216 0 0zm2.71-0.272c-1.61-1.111 0.34 1.048 0 0zm18.23-1.574c-1.48-3.111 0.31-6.392-1.22-7.493-2.92-4.395-3.05 7.292-1.16 3.818-3.38-3.834 2.33-4.719 0.47-2.533-1.29-0.263-0.38 2.221 0.37 1.184-0.56 1.063 1.2 7.036 1.54 5.024zm-21.6 0.389c-0.64-1.695-1.23 1.137 0 0zm2.3-0.673c-1.49-0.005 0.77-2.184-1.52-0.271-0.09 0.798 1.25 0.778 1.52 0.271zm1.99 0.054c1.72-3.875-1.75-0.072 0 0zm-25.3-1.694c-1.6-1.594 0.2 1.558 0 0zm3.67 0.118c1.97-1.146-1.26-0.601 1-1.995-2.4-0.193-5.7 2.944-1 1.995zm4.3-0.69c-0.36-4.705-1.62-2.487-0.67 0.618 0.37 0.338 0.64-0.415 0.67-0.618zm13.82 0.42c-2.59-1.399 0.01 1.384 0 0zm1.66-0.283c-0.07-1.416-1.13 1.018 0 0zm-16.87-0.941c-1.32-1.524-1.18 2.256 0 0zm-9.75-0.678c-1.11-0.592-0.31 2.733 0 0zm25.43 0.153c-1.17-3.726-0.54 3.648 0 0zm6.53 0.058c-1.14 0.349-0.28-0.003 0 0zm-5.02-0.134c1.98-2.281-0.92 0.136 0 0zm9.38-0.143c-0.28-1.809-1.41 1.127 0 0zm-30.98-0.846c3.73-2.006-1.83-2.412-1.18-1.445 0.23-0.087 0.05 4.156 1.18 1.445zm-13.54 0.313c2.25-1.034 4.71-2.709 0.05-1.695-3.06 0.012-4.51 2.543-0.05 1.695zm0.03-0.972c0.13-1.322 0.28 1.138 0 0zm10.55 0.43c-1.35-1.53 0.64 2.202 0 0zm-6.32 0.305c-0.73-1.215-0.48 1.131 0 0zm3.64-0.598c-0.66-1.516-1.81 2.374 0 0zm9.75 0.453c-3.25-1.087-2.48 1.328 0 0zm22.36-0.159c1.92 0.16-2.12-0.711-0.33 0.111l0.33-0.111zm2.5 0.397c-2.6-0.262 0.43 0.499 0 0zm12.45-2.298c3.09-4.364 4.75-7.99 5.1-11.035 1.17-4.263-2.99-10.455-6.81-9.774 3.3 0.379 2.31 2.315 4.51 3.56 1.02 2.691-0.36 3.899 0.74 4.96 1.38 2.316 1.07 0.837-0.89 1.794-0.29 1.194-1.26-2.244-1.94 1.289-3.41-0.177 0.5-1.44 0.82-3.37 2.04 3.276 0.09-6.077-1.56-4.654 1.22-1.671-1.84-0.558-1.27-2.408-1.78 4.003 0.22-2.847-1.52 1.172-1.75 3.046-3.33 8.045-0.12 5.31 2.17-4.923 1.31-0.357 0 2.297-1.37-1.04-0.95-1.401-2.86 0.168-0.89 1.737-2.11 5.343 0.12 2.097-0.31 2.071 1.47 1.882 1.68 1.724 0.19-2.098 4.08-0.797 2.25 1.286-2.97-2.22-0.05 4.435-3.38 0.764-1.59-1.025 0.06 2.243 2.14 2.332 3.26-0.032 0.46 7.457 2.99 2.488zm-1.81-3.27c0.43-2.005 1.03 1.923 0 0zm-1.43-0.305c0.75-1.184 0.75 1.185 0 0zm2.48-1.096c1.88-2.568 2.71 2.19 0 0zm2.69-0.577c1.8-1.717-1.96 0.146-0.61-2.129 0.45-4.219 0.95 0.951 0.81 0.238 0.3-2.891 2.38 1.392 0.76 0.687 0.65 0.297-0.75 2.651-0.96 1.204zm-2.13-1.368c1.09-2.079 0.68 1.965 0 0zm-0.31-1.199c0.66-1.103 0.85 0.673 0 0zm-5.17-1.977c0.77-1.192 0.84 0.639 0 0zm5.06-1.844c0.11-1.67 0.91 1.577 0 0zm4.99-1.798c-3.22-3.183 1.97-2.412 0 0zm-5.03 0.43c1.4-0.162 0.24-0.149 0 0zm-2.58-2.89c1.64-1.393-0.4 1.613 0 0zm2.43 0.152c1.41-1.305 0.59 1.212 0 0zm-58.96 17.131c-1.75-0.192 0.58 0.536 0 0zm15.96-1.215c-3.42-0.764 0.99 2.656 0 0zm-17.08 0.814c-1.58-1.173-0.34 1.261 0 0zm13.07-0.859c-2.95-0.04 0.01 1.891 0 0zm1.69 0.555c-1.13-1.06-0.82 0.618 0 0zm-4.04-0.211c-2.6-0.262 0.43 0.499 0 0zm11.39 0.003c-1.75-0.192 0.58 0.536 0 0zm22.08-0.882c-1.52-0.382-0.12 1.791 0 0zm-22.56-0.957c-0.59 0.219 0.42 1.427 0 0zm-0.49-0.082c-0.68-1.248-1.31 1.267 0 0zm22.82-0.295c-0.93-0.673-1.38 1.063 0 0zm13.26-0.535c-0.59 0.219 0.42 1.426 0 0zm-0.87-0.597c-2.32-1.309 1.05 1.821 0 0zm-2.15-2.358c-2.43-1.51 2.14 2.531 0 0zm-26.21-0.474c-1.4-0.162-0.24-0.148 0 0zm26.77-0.631c0.54-2.564-1.74 2.37 0 0zm-25.72-0.269c1.37-1.396-3.43 1.117 0 0zm2.78-1.626c-1.14 0.308 0.93 2.053 0 0zm-2.46-1.834c-0.75-2.027-1.79 1.707 0 0zm2.19-1.475c-0.69 0.626 0.81 1.923 0 0zm-0.67 0.664c-0.73-1.215-0.49 1.131 0 0zm-2.32-0.741c-1.4-1.1-0.43 1.429 0 0zm2.93-2.32c-2.71-4.102-2.27 2.386 0 0zm-17.65-0.893c-0.72-1.216-0.48 1.131 0 0zm16.57-1.416c-2.59-1.418 1.22 1.839 0 0zm10.4-1.094c-0.53-0.197 0.34 2.131 0 0zm-11.45-0.246c-1.21 0.175-0.2-0.133 0 0zm1.15-0.347c1.5-2.786-2.37 1.445 0 0zm-24.58-0.396c-0.73-1.696-0.33 1.612 0 0zm34.58-1.45c-0.39-0.762 0.17 4.267 0 0zm20.86 0.792c-0.69-1.79-1.04 0.708 0 0zm-31.25-0.715c3.49-3.39-3.25 1.01 0 0zm-30.07-4.336c-0.39-0.745 0.18 4.244 0 0zm18.36-0.258c-0.69-0.67-0.66 1.573 0 0zm53.04-5.988c1.5-5.207 1.19-14.231-2.24-16.276 2.87 4.949 1.25 10.413-0.66 15.397 0.23 3.498 3.01 6.894 2.9 0.879zm-53.04 2.678c-3.12-1.197-1.75 0.887 0 0zm22.51-1.369c-0.37-1.443-0.61 1.513 0 0zm-8.22-1.463c-0.71-3.95-0.73 2.913 0 0zm9.13-8.879c-2.08-1.599 0.69 1.522 0 0zm0.76-0.761c-0.93-0.977-0.1 1.048 0 0zm-0.91-1.217c-0.94-0.978-0.1 1.049 0 0zm15.66-3.346c-1.89-2.162-3.08-4.936-2.39-8.0387-2.37-1.9045-9.4-2.0434-5.68 1.8477 1.33-0.6548 5.12 7.193 8.07 6.191zm12.41-5.339c-3.6-1.6279-0.81 1.688 0 0zm-3.78-0.146c-4.12-1.3219-3.64 1.43 0 0zm1.82-1.6493c7.47 1.0245-3.66-2.2752-2.46 0.2065 0.79-0.2777 1.64-0.224 2.46-0.2065zm4.05-1.5215c-2.38-2.4059-8.62-2.5656-2.25-0.6056 0.39-0.0295 2.86 2.1469 2.25 0.6056zm-5.99-0.9077c-1.29 0.4219-0.73 2.3512 0 0zm6.7-0.9039c-1.05-2.6216-8.7-2.745-2.67-0.784 0.73-0.2943 3.07 2.6033 2.67 0.784zm-67.31 27.014c-1.1-2.571 1.29 0.232 0 0zm1.2-0.019c-0.02-1.746 0.98 0.286 0 0zm6.96-0.642c0.52-2.798 6.75-0.164 1.37-0.022l-1.37 0.022zm1.41-0.58c-1.75-0.192 0.58 0.536 0 0zm-7.35 0.208c0.75-1.184 0.75 1.184 0 0zm-2.13-0.566c1.63-0.646 2.28 0.982 0 0zm4.41-0.034c-4.06 0.368-3.98-2.948-3.61-5.322-0.85 0.793 2.04-5.422-1.31-4.523 1.11-3.037-2.37 0.117-2.36-2.769-0.59 2.782-0.07-2.511-2.72-0.406-1.67-1.905-0.59-10.205 0.7-6.456 1.16-2.5712 5.04-2.3132 7.74-1.6191 2.21 0.7971 8.55-1.6254 5.13 0.6121 0.22 0.938 8.73-1.0241 3.08 0.118-2.39 0.173-3.86 2.191-1.78 2.615-2.54 1.935-4.26-2.363-5.05 2.057-3.02 1.626 0.38 4.854 0.22 7.825-2-5.451-0.16 3.9 1.2 5.085 2.83 2.483 2.28 3.402-1.24 2.783zm-2.28-2.442c-1.41-1.305-0.6 1.212 0 0zm-2.66-15.818c2.58 0.263 0.01-2.7269-0.62-1.673 1.62 1.225-2.51 2.832 0.62 1.673zm2.29-0.988c-1.42-3.4483 0.22 3.434 0 0zm4.94-0.176c-3.49 0.067 0.9 1.216 0 0zm-8.53-0.339c-1.22-2.1177-1.52 1.434 0 0zm3.4-1.4421c-1.75-0.1917 0.58 0.5357 0 0zm11.43 21.286c3.41-0.153-0.16 0.432 0 0zm-16.84-1.875c0.89-2.904 1.32 2.978 0 0zm33.72 0.459c-2.24-2.221 3.4 1.277 0 0zm-13.25-0.118c-2.46-4.069 6-4.041 2.61-2.268-0.86 4.798-1.15-2.368-1.39 2.355l-0.46 0.141-0.76-0.228zm4.86-0.888c-0.77-2.831 1.56 0.877 0 0zm-16.01-1.447c-1.04-3.251 1.44 2.399 0 0zm19.62 0.448c0.96-3.378 6.35 0.725 1.39-0.722-0.45 0.148-0.81 1.123-1.39 0.722zm-2.39-0.894c1.56-3.98 1.93 2.882 0 0zm-23.86-0.083c-2.03-3.741 1.86 1.13 0 0zm37.26-0.454c4.28-0.174-0.77 0.387 0 0zm-42.3-1.524c-1.06-3.201 1.7 0.927 0 0zm28.01-1.391c-4.11-4.092 4.65 1.826 1.58 1.572-0.6-0.441-1.07-1.029-1.58-1.572zm-23.76-0.079c-2.02-2.201 4.74-0.051-0.01 0.329l0.01-0.329zm-3.64-0.659c-0.96-3.087 1.16 0.37 0 0zm35.84-1.014c-0.06-1.227 1.25 1.145 0 0zm-33-0.743c0.39-1.445 0.64 1.131 0 0zm18.8-2.331c-2.55-3.038 5.47-3.996 0.22-1.59-0.1 3.906 1.42-3.759 4.17-0.092 2.93 0.373-5.29-0.049-2.4 0.649 5.71-1.122 0.15 4.002-1.99 1.033zm4.79 0.669c0.31-0.744 2.48 1.139 0 0zm-17.05-0.333c-0.07-1.226 1.25 1.146 0 0zm18.4-0.622c-3.22-3.203 0.91-1.51 0.31 0.318l-0.22-0.093-0.09-0.225zm1.6-1.1c-0.61-1.418 5.35 0.922 0.62 0.105l-0.62-0.105zm-1.22-3.651c-1.5-1.579 2.55 0.626 0 0zm-3.27-0.851c-6.2-1.265 0.19-0.852 2.26 0.24-0.76 0.014-1.51-0.137-2.26-0.24zm-5.02-1.667c0.66-1.1024 0.85 0.673 0 0zm1.91 0.103c1.5-0.52 0.22 0.626 0 0zm-21.37-1.3375c2.2-1.1364-0.51 1.3665 0 0zm18.16 0.1188c-4.61-0.2578-1.89-2.3707 0.26-0.4972-0.29-1.5971 3.16-0.1293-0.26 0.4972zm-11.09-0.9111c1.51-0.5199 0.22 0.6263 0 0zm4.96-0.5004c1.4-2.6223 0.52 2.3152 0-0.0001v0.0001zm-6.78 0.1962c1.5-0.5198 0.22 0.6263 0 0zm3.95-1.0253c0.58-1.8572 1.45 1.8571 0 0zm-9.59-1.2487c0.89-1.6927-0.18 1.9301 0 0zm1.98-0.2695c-2.04 0.7421-4.42-3.3555-1.4-2.3097-1.65 1.8686 6.08 0.1224 1.32 1.5497 0.79-0.0983 0.72 2.0665 0.08 0.76zm2.14-1.1066c1.5-0.5198 0.21 0.6261 0 0zm3.01-1.033c0.21-1.7729 0.21 1.7727 0 0z" transform="translate(10 1502.8)"/>
+ <rect id="d0e151" display="none" height="1e3px" width="288" y="1646.2" x="10"/>
<flowRoot font-size="8" font-family="serif" line-height="133.00000%" fill="#000000">
<flowRegion>
<use y="0" x="0" xlink:href="#d0e151"/>
</flowRegion>
<flowDiv xml:space="preserve">La représentation est un peu plus approximative et grossière, mais le dessin est plus simple et plus facile à éditer. Gardez à l&apos;esprit que ce que vous devez obtenir n&apos;est pas un rendu exact de l&apos;image mais un ensemble de courbes que vous pourrez utiliser dans votre dessin.</flowDiv>
</flowRoot>
- <g transform="translate(0 1706.2)">
+ <g transform="translate(0 1696.2)">
<defs id="defs3" xmlns:cc="http://creativecommons.org/ns#">
<linearGradient id="linearGradient2465" y2="-7528.7" xlink:href="#linearGradient841" gradientUnits="userSpaceOnUse" x2="76.847" gradientTransform="matrix(2.1496 0 0 .46519 -.13015 3495.4)" y1="-7656.4" x1="76.847" inkscape:collect="always"/>
<filter id="filter57" height="1.2" width="1.2" color-interpolation-filters="sRGB" y="-.1" x="-.1" inkscape:label="Drop shadow, custom">
diff --git a/share/ui/Makefile.am b/share/ui/Makefile.am
deleted file mode 100644
index 1e55ea58f..000000000
--- a/share/ui/Makefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
-
-uidir = $(datadir)/inkscape/ui
-
-ui_DATA = \
- keybindings.rc \
- menus-bars.xml \
- style.css \
- toolbox.xml \
- units.xml
-
-EXTRA_DIST = $(ui_DATA)
diff --git a/src/2geom/Makefile_insert b/src/2geom/Makefile_insert
deleted file mode 100644
index 4d41de297..000000000
--- a/src/2geom/Makefile_insert
+++ /dev/null
@@ -1,131 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-2geom/all: 2geom/lib2geom.a
-
-2geom/clean:
- rm -f 2geom/lib2geom.a $(2geom_lib2geom_a_OBJECTS)
-
-2geom_lib2geom_a_SOURCES = \
- 2geom/2geom.h \
- 2geom/affine.cpp \
- 2geom/affine.h \
- 2geom/angle.h \
- 2geom/basic-intersection.cpp \
- 2geom/basic-intersection.h \
- 2geom/bezier-clipping.cpp \
- 2geom/bezier-curve.cpp \
- 2geom/bezier-curve.h \
- 2geom/bezier.cpp \
- 2geom/bezier.h \
- 2geom/bezier-to-sbasis.h \
- 2geom/bezier-utils.cpp \
- 2geom/bezier-utils.h \
- 2geom/cairo-path-sink.cpp \
- 2geom/cairo-path-sink.h \
- 2geom/choose.h \
- 2geom/circle.cpp \
- 2geom/circle.h \
- 2geom/circulator.h \
- 2geom/CMakeLists.txt \
- 2geom/concepts.h \
- 2geom/conicsec.cpp \
- 2geom/conicsec.h \
- 2geom/conic_section_clipper_cr.h \
- 2geom/conic_section_clipper.h \
- 2geom/conic_section_clipper_impl.cpp \
- 2geom/conic_section_clipper_impl.h \
- 2geom/convex-hull.cpp \
- 2geom/convex-hull.h \
- 2geom/coord.cpp \
- 2geom/coord.h \
- 2geom/crossing.cpp \
- 2geom/crossing.h \
- 2geom/curve.cpp \
- 2geom/curve.h \
- 2geom/curves.h \
- 2geom/d2.h \
- 2geom/d2-sbasis.cpp \
- 2geom/ellipse.cpp \
- 2geom/ellipse.h \
- 2geom/elliptical-arc.cpp \
- 2geom/elliptical-arc.h \
- 2geom/elliptical-arc-from-sbasis.cpp \
- 2geom/exception.h \
- 2geom/forward.h \
- 2geom/generic-interval.h \
- 2geom/generic-rect.h \
- 2geom/geom.cpp \
- 2geom/geom.h \
- 2geom/intersection.h \
- 2geom/intersection-graph.cpp \
- 2geom/intersection-graph.h \
- 2geom/interval.h \
- 2geom/int-interval.h \
- 2geom/int-point.h \
- 2geom/int-rect.h \
- 2geom/linear.h \
- 2geom/line.cpp \
- 2geom/line.h \
- 2geom/math-utils.h \
- 2geom/nearest-time.cpp \
- 2geom/nearest-time.h \
- 2geom/ord.h \
- 2geom/path.cpp \
- 2geom/path.h \
- 2geom/path-intersection.cpp \
- 2geom/path-intersection.h \
- 2geom/path-sink.cpp \
- 2geom/path-sink.h \
- 2geom/pathvector.cpp \
- 2geom/pathvector.h \
- 2geom/piecewise.cpp \
- 2geom/piecewise.h \
- 2geom/point.cpp \
- 2geom/point.h \
- 2geom/polynomial.cpp \
- 2geom/polynomial.h \
- 2geom/ray.h \
- 2geom/rect.cpp \
- 2geom/rect.h \
- 2geom/recursive-bezier-intersection.cpp \
- 2geom/sbasis-2d.cpp \
- 2geom/sbasis-2d.h \
- 2geom/sbasis.cpp \
- 2geom/sbasis-curve.h \
- 2geom/sbasis-geometric.cpp \
- 2geom/sbasis-geometric.h \
- 2geom/sbasis.h \
- 2geom/sbasis-math.cpp \
- 2geom/sbasis-math.h \
- 2geom/sbasis-poly.cpp \
- 2geom/sbasis-poly.h \
- 2geom/sbasis-roots.cpp \
- 2geom/sbasis-to-bezier.cpp \
- 2geom/sbasis-to-bezier.h \
- 2geom/solve-bezier.cpp \
- 2geom/solve-bezier-one-d.cpp \
- 2geom/solve-bezier-parametric.cpp \
- 2geom/solver.h \
- 2geom/svg-path-parser.cpp \
- 2geom/svg-path-parser.h \
- 2geom/svg-path-writer.cpp \
- 2geom/svg-path-writer.h \
- 2geom/sweep-bounds.cpp \
- 2geom/sweep-bounds.h \
- 2geom/sweeper.h \
- 2geom/toposweep.cpp \
- 2geom/toposweep.h \
- 2geom/transforms.cpp \
- 2geom/transforms.h \
- 2geom/utils.cpp \
- 2geom/utils.h \
- 2geom/numeric/fitting-model.h \
- 2geom/numeric/fitting-tool.h \
- 2geom/numeric/linear_system.h \
- 2geom/numeric/matrix.cpp \
- 2geom/numeric/matrix.h \
- 2geom/numeric/symmetric-matrix-fs.h \
- 2geom/numeric/symmetric-matrix-fs-operation.h \
- 2geom/numeric/symmetric-matrix-fs-trace.h \
- 2geom/numeric/vector.h
-
diff --git a/src/2geom/sbasis-geometric.cpp b/src/2geom/sbasis-geometric.cpp
index 3fe27748e..19eccc451 100644
--- a/src/2geom/sbasis-geometric.cpp
+++ b/src/2geom/sbasis-geometric.cpp
@@ -227,7 +227,7 @@ Geom::unitVector(D2<SBasis> const &V_in, double tol, unsigned order){
// -This approach is numerically bad. Find a stable way to rescale V_in to have non vanishing ends.
// -This done, unitVector will have jumps at zeros: fill the gaps with arcs of circles.
D2<SBasis> V = RescaleForNonVanishingEnds(V_in);
- if (V[0].isZero(tol) && V[1].isZero(tol))
+ if (V[0].isZero(0) && V[1].isZero(0))
return Piecewise<D2<SBasis> >(D2<SBasis>(Linear(1),SBasis()));
SBasis x = V[0], y = V[1];
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ef855d950..4ba738635 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -228,6 +228,7 @@ set(inkscape_SRC
message-stack.cpp
mod360.cpp
object-hierarchy.cpp
+ object-set.cpp
object-snapper.cpp
path-chemistry.cpp
persp3d-reference.cpp
@@ -352,6 +353,7 @@ set(inkscape_SRC
mod360.h
number-opt-number.h
object-hierarchy.h
+ object-set.h
object-snapper.h
object-test.h
path-chemistry.h
@@ -467,7 +469,6 @@ add_subdirectory(libavoid)
add_subdirectory(libcola)
add_subdirectory(libcroco)
add_subdirectory(inkgc)
-add_subdirectory(libgdl)
add_subdirectory(libuemf)
add_subdirectory(libvpsc)
add_subdirectory(livarot)
@@ -538,11 +539,6 @@ set(INKSCAPE_TARGET_LIBS
${INKSCAPE_LIBS}
)
-if (NOT "${WITH_EXT_GDL}")
- # Insert it at the beginning of the list as the windows build fails otherwise
- list (INSERT INKSCAPE_TARGET_LIBS 0 "gdl_LIB")
-endif()
-
# Build everything except main and inkview.c in a shared library.
add_library(inkscape_base SHARED ${inkscape_SRC} ${sp_SRC})
diff --git a/src/Makefile.am b/src/Makefile.am
deleted file mode 100644
index 087a727de..000000000
--- a/src/Makefile.am
+++ /dev/null
@@ -1,289 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-# ################################################
-# G L O B A L
-# ################################################
-
-# Should work in either automake1.7 or 1.8, but 1.6 doesn't
-# handle foo/libfoo_a_CPPFLAGS properly (if at all).
-# Update: We now avoid setting foo/libfoo_a_CPPFLAGS,
-# so perhaps 1.6 will work.
-AUTOMAKE_OPTIONS = 1.7 subdir-objects
-
-# Executables compiled by "make" and installed by "make install"
-bin_PROGRAMS = inkscape inkview
-
-# Libraries which should be compiled by "make" but not installed.
-# Use this only for libraries that are really standalone, rather than for
-# source tree subdirectories.
-
-if !WITH_EXT_GDL
-internal_GDL = libgdl/libgdl.a
-endif
-
-
-noinst_LIBRARIES = \
- libcroco/libcroco.a \
- libavoid/libavoid.a \
- $(internal_GDL) \
- libuemf/libuemf.a \
- libcola/libcola.a \
- inkgc/libinkgc.a \
- libvpsc/libvpsc.a \
- livarot/libvarot.a \
- 2geom/lib2geom.a \
- libdepixelize/libdepixelize.a \
- util/libutil.a \
- libinkversion.a
-# libinkscape.a
-
-all_libs = \
- $(noinst_LIBRARIES) \
- $(INKSCAPE_LIBS) \
- $(INKSCAPE_CXX_DEPS_LIBS) \
- $(EXIF_LIBS) \
- $(GNOME_VFS_LIBS) \
- $(XFT_LIBS) \
- $(FREETYPE_LIBS) \
- $(kdeldadd) \
- $(win32ldflags) \
- $(LIBWPG_LIBS) \
- $(LIBVISIO_LIBS) \
- $(LIBCDR_LIBS) \
- $(DBUS_LIBS) \
- $(GDL_LIBS) \
- $(IMAGEMAGICK_LIBS) \
- $(X11_LIBS)
-
-# Add sources common for Inkscape and Inkview to this variable.
-ink_common_sources =
-# Add Inkscape-only sources here.
-inkscape_SOURCES =
-# Add Inkview-only sources here.
-inkview_SOURCES =
-# Add sources that are built from meta files
-BUILT_SOURCES =
-# Extra files to distribute
-EXTRA_DIST =
-
-# C++-specific flags defined here
-AM_CXXFLAGS = \
- $(INKSCAPE_CXX_DEPS_CFLAGS)
-
-AM_CPPFLAGS = \
- -I$(top_srcdir)/cxxtest \
- -I$(builddir)/extension/dbus \
- $(EXIF_CFLAGS) \
- $(FREETYPE_CFLAGS) \
- $(GNOME_PRINT_CFLAGS) \
- $(GNOME_VFS_CFLAGS) \
- $(IMAGEMAGICK_CFLAGS) \
- $(LIBWPG_CFLAGS) \
- $(LIBVISIO_CFLAGS) \
- $(LIBCDR_CFLAGS) \
- $(DBUS_CFLAGS) \
- $(GDL_CFLAGS) \
- $(XFT_CFLAGS) \
- $(LCMS_CFLAGS) \
- $(POPPLER_CFLAGS) \
- $(POPPLER_GLIB_CFLAGS) \
- -DPOTRACE=\"potrace\" \
- $(INKSCAPE_CFLAGS) \
- $(WIN32_CFLAGS) \
- $(X11_CFLAGS)
-
-CXXTEST_TEMPLATE = $(srcdir)/cxxtest-template.tpl
-CXXTESTGENFLAGS = --root --have-eh --template=$(CXXTEST_TEMPLATE)
-CXXTESTGEN = $(top_srcdir)/cxxtest/cxxtestgen.pl $(CXXTESTGENFLAGS)
-# Add test cases to this variable
-CXXTEST_TESTSUITES =
-
-# ################################################
-#
-# E X T R A
-#
-# ################################################
-
-if PLATFORM_WIN32
-win32_sources = winmain.cpp registrytool.cpp registrytool.h
-win32ldflags = -lcomdlg32 -lmscms
-mwindows = -mwindows
-endif
-
-# Include all partial makefiles from subdirectories
-include Makefile_insert
-include display/Makefile_insert
-include extension/Makefile_insert
-include extension/dbus/Makefile_insert
-include extension/implementation/Makefile_insert
-include extension/internal/Makefile_insert
-include filters/Makefile_insert
-include helper/Makefile_insert
-include io/Makefile_insert
-include libcroco/Makefile_insert
-include inkgc/Makefile_insert
-include libgdl/Makefile_insert
-include libnrtype/Makefile_insert
-include libavoid/Makefile_insert
-include livarot/Makefile_insert
-include live_effects/Makefile_insert
-include live_effects/parameter/Makefile_insert
-include libvpsc/Makefile_insert
-include libcola/Makefile_insert
-include libuemf/Makefile_insert
-include svg/Makefile_insert
-include widgets/Makefile_insert
-include debug/Makefile_insert
-include xml/Makefile_insert
-include ui/Makefile_insert
-include ui/cache/Makefile_insert
-include ui/dialog/Makefile_insert
-include ui/tool/Makefile_insert
-include ui/tools/Makefile_insert
-include ui/view/Makefile_insert
-include ui/widget/Makefile_insert
-include util/Makefile_insert
-include trace/Makefile_insert
-include 2geom/Makefile_insert
-include libdepixelize/Makefile_insert
-
-# Extra files not mentioned as sources to include in the source tarball
-EXTRA_DIST += \
- 2geom/makefile.in \
- debug/makefile.in \
- display/makefile.in \
- extension/implementation/makefile.in \
- extension/internal/makefile.in \
- extension/makefile.in \
- filters/makefile.in \
- helper/makefile.in \
- io/makefile.in \
- libavoid/makefile.in \
- libcroco/makefile.in \
- libgdl/makefile.in \
- libnrtype/makefile.in \
- libuemf/makefile.in \
- livarot/makefile.in \
- live_effects/makefile.in \
- live_effects/parameter/makefile.in \
- svg/makefile.in \
- trace/makefile.in \
- ui/cache/makefile.in \
- ui/dialog/makefile.in \
- ui/makefile.in \
- ui/view/makefile.in \
- ui/widget/makefile.in \
- util/makefile.in \
- util/makefile.in \
- widgets/makefile.in \
- xml/makefile.in \
- \
- $(top_srcdir)/Doxyfile \
- extension/internal/emf-inout.cpp \
- extension/internal/emf-inout.h \
- extension/internal/emf-print.cpp \
- extension/internal/emf-print.h \
- helper/sp-marshal.list \
- io/crystalegg.xml \
- io/doc2html.xsl \
- show-preview.bmp \
- winconsole.cpp \
- libdepixelize/makefile.in \
- $(CXXTEST_TEMPLATE)
-
-# Extra files to remove when doing "make distclean"
-DISTCLEANFILES = \
- helper/sp-marshal.cpp \
- helper/sp-marshal.h \
- inkscape-version.cpp
-
-# ################################################
-# B I N A R I E S
-# ################################################
-
-# this should speed up the build
-#libinkscape_a_SOURCES = $(ink_common_sources)
-
-inkscape_SOURCES += main.cpp $(ink_common_sources) $(win32_sources)
-inkscape_LDADD = $(all_libs)
-inkscape_LDFLAGS = $(kdeldflags) $(mwindows)
-
-inkview_SOURCES += inkview.cpp $(ink_common_sources) $(win32_sources)
-inkview_LDADD = $(all_libs)
-inkview_LDFLAGS = $(mwindows)
-
-# ################################################
-# VERSION REPORTING
-# ################################################
-
-libinkversion_a_SOURCES = inkscape-version.cpp inkscape-version.h
-
-if USE_BZR_VERSION
-inkscape_version_deps = $(top_srcdir)/.bzr/branch/last-revision
-endif
-
-# If this is an BZR snapshot build, regenerate this file every time
-# someone updates the BZR working directory.
-inkscape-version.cpp: $(inkscape_version_deps)
- VER_PREFIX="$(VERSION)";\
- VER_BZRREV=" r`bzr revno --tree $(top_srcdir)`"; \
- if test ! -z "`bzr status -S -V $(srcdir)`"; then \
- VER_CUSTOM=" custom"; \
- fi; \
- VERSION="$$VER_PREFIX$$VER_BZRREV$$VER_CUSTOM"; \
- echo "namespace Inkscape { " \
- "char const *version_string = \"$$VERSION\"; " \
- "}" > inkscape-version.new.cpp; \
- if cmp -s inkscape-version.new.cpp inkscape-version.cpp; then \
- rm inkscape-version.new.cpp; \
- else \
- mv inkscape-version.new.cpp inkscape-version.cpp; \
- fi; \
- echo $$VERSION
-
-# #################################
-# ## TESTING STUFF (make check) ###
-# #################################
-
-# List of all programs that should be built before testing. Note that this is
-# different from TESTS, because some tests can be scripts that don't
-# need to be built. There should be one test program per directory.
-# automake adds $(EXEEXT) to check_PROGRAMS items but not to TESTS items:
-# TESTS items can be scripts etc.
-check_PROGRAMS = cxxtests
-
-# streamtest is unfinished and can't handle the relocations done during
-# "make distcheck".
-
-# List of all tests to be run.
-TESTS = $(check_PROGRAMS)
-check-local:
- $(top_srcdir)/share/extensions/test/run-all-extension-tests
-
-# FIXME: Currently, a number of cxxtest tests fail. These should be fixed and
-# the XFAIL_TESTS build target should be removed.
-# See the following Launchpad bugs:
-#
-# LP #1208013 <cxxtest: curve-test.h fails>
-# LP #1208005 <cxxtest: svg-path-geom-test.h fails>
-# LP #1207502 <cxxtest: svg-affine-test.h fails>
-
-XFAIL_TESTS = $(check_PROGRAMS)
-
-# including the testsuites here ensures that they get distributed
-cxxtests_SOURCES = cxxtests.cpp $(CXXTEST_TESTSUITES) $(ink_common_sources) $(win32_sources)
-cxxtests_LDADD = $(all_libs)
-
-cxxtests.cpp: $(CXXTEST_TESTSUITES) $(CXXTEST_TEMPLATE)
- $(CXXTESTGEN) -o cxxtests.cpp $(CXXTEST_TESTSUITES)
-
-# ################################################
-# D I S T
-# ################################################
-
-dist-hook:
- mkdir $(distdir)/pixmaps
- cp $(srcdir)/pixmaps/*xpm $(distdir)/pixmaps
-
-distclean-local:
- rm -f cxxtests.xml cxxtests.log
diff --git a/src/Makefile_insert b/src/Makefile_insert
deleted file mode 100644
index 55fde4dd2..000000000
--- a/src/Makefile_insert
+++ /dev/null
@@ -1,251 +0,0 @@
-## Makefile.am fragment, included by src/Makefile.am.
-
-ink_common_sources += \
- util/find-last-if.h \
- util/longest-common-suffix.h \
- remove-last.h \
- attributes.cpp attributes.h \
- attribute-rel-svg.cpp attribute-rel-svg.h \
- attribute-rel-css.cpp attribute-rel-css.h \
- attribute-rel-util.cpp attribute-rel-util.h \
- attribute-sort-util.cpp attribute-sort-util.h \
- axis-manip.cpp axis-manip.h \
- bad-uri-exception.h \
- box3d.cpp box3d.h \
- box3d-side.cpp box3d-side.h \
- brokenimage.xpm \
- cms-color-types.h \
- cms-system.h \
- color.cpp color.h \
- color-profile.cpp color-profile.h \
- color-profile-cms-fns.h \
- color-rgba.h \
- colorspace.h \
- composite-undo-stack-observer.cpp \
- composite-undo-stack-observer.h \
- conditions.cpp conditions.h \
- conn-avoid-ref.cpp conn-avoid-ref.h \
- console-output-undo-observer.h console-output-undo-observer.cpp \
- context-fns.cpp context-fns.h \
- decimal-round.h \
- desktop.cpp desktop.h \
- desktop-events.cpp desktop-events.h \
- desktop-style.cpp desktop-style.h \
- device-manager.cpp device-manager.h \
- dir-util.cpp dir-util.h \
- document.cpp document.h document-private.h \
- document-subset.cpp document-subset.h \
- document-undo.cpp document-undo.h \
- ege-color-prof-tracker.cpp ege-color-prof-tracker.h \
- enums.h \
- event-log.cpp event-log.h event.h \
- extract-uri.cpp extract-uri.h \
- file.cpp file.h \
- fill-or-stroke.h \
- filter-chemistry.cpp filter-chemistry.h \
- filter-enums.cpp filter-enums.h \
- gc-anchored.cpp gc-anchored.h \
- gc-finalized.cpp gc-finalized.h \
- gradient-chemistry.cpp gradient-chemistry.h \
- gradient-drag.cpp gradient-drag.h \
- graphlayout.cpp graphlayout.h \
- guide-snapper.cpp guide-snapper.h \
- help.cpp help.h \
- helper-fns.h \
- helper/pixbuf-ops.cpp \
- helper/pixbuf-ops.h \
- icon-size.h \
- id-clash.cpp id-clash.h \
- inkscape.cpp inkscape.h \
- isinf.h \
- knot.cpp knot.h \
- knot-enums.h \
- knotholder.cpp knotholder.h \
- knot-holder-entity.h knot-holder-entity.cpp \
- knot-ptr.h knot-ptr.cpp \
- layer-fns.cpp layer-fns.h \
- layer-manager.cpp layer-manager.h \
- layer-model.cpp layer-model.h \
- line-geometry.cpp line-geometry.h \
- line-snapper.cpp line-snapper.h \
- macros.h \
- main-cmdlineact.cpp main-cmdlineact.h \
- media.cpp media.h \
- menus-skeleton.h \
- message-context.cpp message-context.h \
- message.h \
- message-stack.cpp message-stack.h \
- mod360.cpp mod360.h \
- object-hierarchy.cpp object-hierarchy.h \
- object-snapper.cpp object-snapper.h \
- path-chemistry.cpp path-chemistry.h \
- path-prefix.h \
- persp3d.cpp persp3d.h \
- persp3d-reference.cpp persp3d-reference.h \
- perspective-line.cpp perspective-line.h \
- preferences.cpp preferences.h \
- preferences-skeleton.h \
- prefix.cpp prefix.h \
- print.cpp print.h \
- profile-manager.cpp profile-manager.h \
- proj_pt.cpp proj_pt.h \
- pure-transform.cpp pure-transform.h \
- removeoverlap.cpp removeoverlap.h \
- rdf.cpp rdf.h \
- resource-manager.cpp resource-manager.h \
- require-config.h \
- round.h \
- rubberband.cpp rubberband.h \
- satisfied-guide-cns.cpp satisfied-guide-cns.h \
- selcue.cpp selcue.h \
- selection-chemistry.cpp selection-chemistry.h \
- selection.cpp selection.h \
- selection-describer.cpp selection-describer.h \
- seltrans.cpp seltrans.h \
- seltrans-handles.cpp seltrans-handles.h \
- shortcuts.cpp shortcuts.h \
- snap.cpp snap.h \
- snap-enums.h snap-candidate.h \
- snapped-curve.cpp snapped-curve.h \
- snapped-line.cpp snapped-line.h \
- snapped-point.cpp snapped-point.h \
- snapper.cpp snapper.h \
- snap-preferences.cpp snap-preferences.h \
- sp-anchor.cpp sp-anchor.h \
- sp-clippath.cpp sp-clippath.h \
- sp-conn-end.cpp sp-conn-end.h \
- sp-conn-end-pair.cpp sp-conn-end-pair.h \
- sp-cursor.cpp sp-cursor.h \
- sp-defs.cpp sp-defs.h \
- sp-desc.cpp sp-desc.h \
- sp-ellipse.cpp sp-ellipse.h \
- sp-factory.h sp-factory.cpp \
- sp-filter.cpp sp-filter.h number-opt-number.h \
- sp-filter-primitive.cpp sp-filter-primitive.h \
- sp-filter-reference.cpp sp-filter-reference.h \
- sp-filter-units.h \
- sp-flowdiv.h sp-flowdiv.cpp \
- sp-flowregion.h sp-flowregion.cpp \
- sp-flowtext.h sp-flowtext.cpp \
- sp-font.cpp sp-font.h \
- sp-font-face.cpp sp-font-face.h \
- sp-glyph.cpp sp-glyph.h \
- sp-glyph-kerning.cpp sp-glyph-kerning.h \
- sp-gradient.cpp sp-gradient.h \
- sp-gradient-reference.cpp sp-gradient-reference.h \
- sp-gradient-spread.h \
- sp-gradient-units.h \
- sp-gradient-vector.h \
- sp-guide-attachment.h \
- sp-guide-constraint.h \
- sp-guide.cpp sp-guide.h \
- sp-hatch.cpp sp-hatch.h \
- sp-hatch-path.cpp sp-hatch-path.h \
- sp-image.cpp sp-image.h \
- sp-item.cpp sp-item.h \
- sp-item-group.cpp sp-item-group.h \
- sp-item-notify-moveto.cpp sp-item-notify-moveto.h \
- sp-item-rm-unsatisfied-cns.cpp sp-item-rm-unsatisfied-cns.h \
- sp-item-transform.cpp sp-item-transform.h \
- sp-item-update-cns.cpp sp-item-update-cns.h \
- sp-linear-gradient.cpp sp-linear-gradient.h \
- sp-line.cpp sp-line.h \
- splivarot.cpp splivarot.h \
- sp-lpe-item.cpp sp-lpe-item.h \
- sp-marker.cpp sp-marker.h \
- sp-marker-loc.h \
- sp-mask.cpp sp-mask.h \
- sp-metadata.cpp sp-metadata.h \
- sp-mesh.cpp sp-mesh.h \
- sp-mesh-array.cpp sp-mesh-array.h \
- sp-mesh-patch.cpp sp-mesh-patch.h \
- sp-mesh-row.cpp sp-mesh-row.h \
- sp-missing-glyph.cpp sp-missing-glyph.h \
- sp-namedview.cpp sp-namedview.h \
- sp-object.cpp sp-object.h \
- sp-object-group.cpp sp-object-group.h \
- sp-offset.cpp sp-offset.h \
- sp-paint-server.cpp sp-paint-server.h \
- sp-paint-server-reference.h \
- sp-path.cpp sp-path.h \
- sp-pattern.cpp sp-pattern.h \
- sp-polygon.cpp sp-polygon.h \
- sp-polyline.cpp sp-polyline.h \
- sp-radial-gradient.cpp sp-radial-gradient.h \
- sp-rect.cpp sp-rect.h \
- sp-root.cpp sp-root.h \
- sp-script.cpp sp-script.h \
- sp-shape.cpp sp-shape.h \
- sp-solid-color.cpp sp-solid-color.h \
- sp-spiral.cpp sp-spiral.h \
- sp-star.cpp sp-star.h \
- sp-stop.cpp sp-stop.h \
- sp-string.cpp sp-string.h \
- sp-style-elem.cpp sp-style-elem.h \
- sp-switch.cpp sp-switch.h \
- sp-symbol.cpp sp-symbol.h \
- sp-tag.cpp sp-tag.h \
- sp-tag-use.cpp sp-tag-use.h \
- sp-tag-use-reference.cpp sp-tag-use-reference.h \
- sp-text.cpp sp-text.h \
- sp-textpath.h \
- sp-title.cpp sp-title.h \
- sp-tref.cpp sp-tref.h \
- sp-tref-reference.cpp sp-tref-reference.h \
- sp-tspan.cpp sp-tspan.h \
- sp-use.cpp sp-use.h \
- sp-use-reference.cpp sp-use-reference.h \
- streq.h \
- strneq.h \
- style.cpp style.h \
- style-enums.h \
- style-internal.cpp style-internal.h \
- svg-profile.h \
- svg-view.cpp svg-view.h \
- svg-view-widget.cpp svg-view-widget.h \
- syseq.h \
- text-chemistry.cpp text-chemistry.h \
- text-editing.cpp text-editing.h \
- text-tag-attributes.h \
- transf_mat_3x4.cpp transf_mat_3x4.h \
- unclump.cpp unclump.h \
- undo-stack-observer.h \
- unicoderange.cpp unicoderange.h \
- uri.cpp uri.h \
- uri-references.cpp uri-references.h \
- vanishing-point.cpp vanishing-point.h \
- verbs.cpp verbs.h \
- version.cpp version.h \
- viewbox.cpp viewbox.h
-
-# Additional dependencies
-
-desktop.$(OBJEXT): helper/sp-marshal.h
-document.$(OBJEXT): helper/sp-marshal.h
-inkscape.$(OBJEXT): helper/sp-marshal.h
-knot.$(OBJEXT): helper/sp-marshal.h
-selection.$(OBJEXT): helper/sp-marshal.h
-sp-object.$(OBJEXT): helper/sp-marshal.h
-view.$(OBJEXT): helper/sp-marshal.h
-
-# ######################
-# ### CxxTest stuff ####
-# ######################
-CXXTEST_TESTSUITES += \
- $(srcdir)/MultiPrinter.h \
- $(srcdir)/TRPIFormatter.h \
- $(srcdir)/PylogFormatter.h \
- $(srcdir)/attributes-test.h \
- $(srcdir)/color-profile-test.h \
- $(srcdir)/dir-util-test.h \
- $(srcdir)/extract-uri-test.h \
- $(srcdir)/marker-test.h \
- $(srcdir)/mod360-test.h \
- $(srcdir)/object-test.h \
- $(srcdir)/preferences-test.h \
- $(srcdir)/round-test.h \
- $(srcdir)/sp-gradient-test.h \
- $(srcdir)/sp-style-elem-test.h \
- $(srcdir)/style-test.h \
- $(srcdir)/test-helpers.h \
- $(srcdir)/verbs-test.h
diff --git a/src/box3d.cpp b/src/box3d.cpp
index e50cc4afb..dfc4d06e7 100644
--- a/src/box3d.cpp
+++ b/src/box3d.cpp
@@ -253,8 +253,8 @@ void box3d_position_set(SPBox3D *box)
{
/* This draws the curve and calls requestDisplayUpdate() for each side (the latter is done in
box3d_side_position_set() to avoid update conflicts with the parent box) */
- for ( SPObject *obj = box->firstChild(); obj; obj = obj->getNext() ) {
- Box3DSide *side = dynamic_cast<Box3DSide *>(obj);
+ for (auto& obj: box->children) {
+ Box3DSide *side = dynamic_cast<Box3DSide *>(&obj);
if (side) {
box3d_side_position_set(side);
}
@@ -269,8 +269,8 @@ Geom::Affine SPBox3D::set_transform(Geom::Affine const &xform) {
gdouble const sw = hypot(ret[0], ret[1]);
gdouble const sh = hypot(ret[2], ret[3]);
- for ( SPObject *child = firstChild(); child; child = child->getNext() ) {
- SPItem *childitem = dynamic_cast<SPItem *>(child);
+ for (auto& child: children) {
+ SPItem *childitem = dynamic_cast<SPItem *>(&child);
if (childitem) {
// Adjust stroke width
childitem->adjust_stroke(sqrt(fabs(sw * sh)));
@@ -1068,8 +1068,8 @@ box3d_recompute_z_orders (SPBox3D *box) {
static std::map<int, Box3DSide *> box3d_get_sides(SPBox3D *box)
{
std::map<int, Box3DSide *> sides;
- for ( SPObject *obj = box->firstChild(); obj; obj = obj->getNext() ) {
- Box3DSide *side = dynamic_cast<Box3DSide *>(obj);
+ for (auto& obj: box->children) {
+ Box3DSide *side = dynamic_cast<Box3DSide *>(&obj);
if (side) {
sides[Box3D::face_to_int(side->getFaceId())] = side;
}
@@ -1211,8 +1211,8 @@ static void box3d_extract_boxes_rec(SPObject *obj, std::list<SPBox3D *> &boxes)
if (box) {
boxes.push_back(box);
} else if (dynamic_cast<SPGroup *>(obj)) {
- for ( SPObject *child = obj->firstChild(); child; child = child->getNext() ) {
- box3d_extract_boxes_rec(child, boxes);
+ for (auto& child: obj->children) {
+ box3d_extract_boxes_rec(&child, boxes);
}
}
}
@@ -1270,8 +1270,8 @@ SPGroup *box3d_convert_to_group(SPBox3D *box)
// create a new group and add the sides (converted to ordinary paths) as its children
Inkscape::XML::Node *grepr = xml_doc->createElement("svg:g");
- for ( SPObject *obj = box->firstChild(); obj; obj = obj->getNext() ) {
- Box3DSide *side = dynamic_cast<Box3DSide *>(obj);
+ for (auto& obj: box->children) {
+ Box3DSide *side = dynamic_cast<Box3DSide *>(&obj);
if (side) {
Inkscape::XML::Node *repr = box3d_side_convert_to_path(side);
grepr->appendChild(repr);
diff --git a/src/color-profile.cpp b/src/color-profile.cpp
index e60fa8440..51b1505c5 100644
--- a/src/color-profile.cpp
+++ b/src/color-profile.cpp
@@ -4,11 +4,7 @@
#define noDEBUG_LCMS
-#if WITH_GTKMM_3_0
-# include <gdkmm/rgba.h>
-#else
-# include <gdkmm/color.h>
-#endif
+#include <gdkmm/rgba.h>
#include <glib/gstdio.h>
#include <fcntl.h>
@@ -997,11 +993,7 @@ void loadProfiles()
static bool gamutWarn = false;
-#if WITH_GTKMM_3_0
static Gdk::RGBA lastGamutColor("#808080");
-#else
-static Gdk::Color lastGamutColor("#808080");
-#endif
static bool lastBPC = false;
#if defined(cmsFLAGS_PRESERVEBLACK)
@@ -1147,12 +1139,7 @@ cmsHTRANSFORM Inkscape::CMSSystem::getDisplayTransform()
bool preserveBlack = prefs->getBool( "/options/softproof/preserveblack");
#endif //defined(cmsFLAGS_PRESERVEBLACK)
Glib::ustring colorStr = prefs->getString("/options/softproof/gamutcolor");
-
-#if WITH_GTKMM_3_0
Gdk::RGBA gamutColor( colorStr.empty() ? "#808080" : colorStr );
-#else
- Gdk::Color gamutColor( colorStr.empty() ? "#808080" : colorStr );
-#endif
if ( (warn != gamutWarn)
|| (lastIntent != intent)
@@ -1184,15 +1171,9 @@ cmsHTRANSFORM Inkscape::CMSSystem::getDisplayTransform()
if ( gamutWarn ) {
dwFlags |= cmsFLAGS_GAMUTCHECK;
-#if WITH_GTKMM_3_0
- gushort gamutColor_r = gamutColor.get_red_u();
- gushort gamutColor_g = gamutColor.get_green_u();
- gushort gamutColor_b = gamutColor.get_blue_u();
-#else
- gushort gamutColor_r = gamutColor.get_red();
- gushort gamutColor_g = gamutColor.get_green();
- gushort gamutColor_b = gamutColor.get_blue();
-#endif
+ auto gamutColor_r = gamutColor.get_red_u();
+ auto gamutColor_g = gamutColor.get_green_u();
+ auto gamutColor_b = gamutColor.get_blue_u();
#if HAVE_LIBLCMS1
cmsSetAlarmCodes(gamutColor_r >> 8, gamutColor_g >> 8, gamutColor_b >> 8);
@@ -1333,12 +1314,7 @@ cmsHTRANSFORM Inkscape::CMSSystem::getDisplayPer( Glib::ustring const& id )
bool preserveBlack = prefs->getBool( "/options/softproof/preserveblack");
#endif //defined(cmsFLAGS_PRESERVEBLACK)
Glib::ustring colorStr = prefs->getString("/options/softproof/gamutcolor");
-
-#if WITH_GTKMM_3_0
Gdk::RGBA gamutColor( colorStr.empty() ? "#808080" : colorStr );
-#else
- Gdk::Color gamutColor( colorStr.empty() ? "#808080" : colorStr );
-#endif
if ( (warn != gamutWarn)
|| (lastIntent != intent)
@@ -1368,16 +1344,9 @@ cmsHTRANSFORM Inkscape::CMSSystem::getDisplayPer( Glib::ustring const& id )
cmsUInt32Number dwFlags = cmsFLAGS_SOFTPROOFING;
if ( gamutWarn ) {
dwFlags |= cmsFLAGS_GAMUTCHECK;
-
-#if WITH_GTKMM_3_0
- gushort gamutColor_r = gamutColor.get_red_u();
- gushort gamutColor_g = gamutColor.get_green_u();
- gushort gamutColor_b = gamutColor.get_blue_u();
-#else
- gushort gamutColor_r = gamutColor.get_red();
- gushort gamutColor_g = gamutColor.get_green();
- gushort gamutColor_b = gamutColor.get_blue();
-#endif
+ auto gamutColor_r = gamutColor.get_red_u();
+ auto gamutColor_g = gamutColor.get_green_u();
+ auto gamutColor_b = gamutColor.get_blue_u();
#if HAVE_LIBLCMS1
cmsSetAlarmCodes(gamutColor_r >> 8, gamutColor_g >> 8, gamutColor_b >> 8);
diff --git a/src/conn-avoid-ref.cpp b/src/conn-avoid-ref.cpp
index e4c8ce7b5..71743fda5 100644
--- a/src/conn-avoid-ref.cpp
+++ b/src/conn-avoid-ref.cpp
@@ -328,19 +328,19 @@ static Avoid::Polygon avoid_item_poly(SPItem const *item)
std::vector<SPItem *> get_avoided_items(std::vector<SPItem *> &list, SPObject *from, SPDesktop *desktop,
bool initialised)
{
- for (SPObject *child = from->firstChild() ; child != NULL; child = child->next ) {
- if (SP_IS_ITEM(child) &&
- !desktop->isLayer(SP_ITEM(child)) &&
- !SP_ITEM(child)->isLocked() &&
- !desktop->itemIsHidden(SP_ITEM(child)) &&
- (!initialised || SP_ITEM(child)->avoidRef->shapeRef)
+ for (auto& child: from->children) {
+ if (SP_IS_ITEM(&child) &&
+ !desktop->isLayer(SP_ITEM(&child)) &&
+ !SP_ITEM(&child)->isLocked() &&
+ !desktop->itemIsHidden(SP_ITEM(&child)) &&
+ (!initialised || SP_ITEM(&child)->avoidRef->shapeRef)
)
{
- list.push_back(SP_ITEM(child));
+ list.push_back(SP_ITEM(&child));
}
- if (SP_IS_ITEM(child) && desktop->isLayer(SP_ITEM(child))) {
- list = get_avoided_items(list, child, desktop, initialised);
+ if (SP_IS_ITEM(&child) && desktop->isLayer(SP_ITEM(&child))) {
+ list = get_avoided_items(list, &child, desktop, initialised);
}
}
diff --git a/src/debug/Makefile_insert b/src/debug/Makefile_insert
deleted file mode 100644
index 47cc2b704..000000000
--- a/src/debug/Makefile_insert
+++ /dev/null
@@ -1,15 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-ink_common_sources += \
- debug/demangle.cpp debug/demangle.h \
- debug/event.h \
- debug/event-tracker.h \
- debug/heap.cpp debug/heap.h \
- debug/gc-heap.h \
- debug/logger.cpp debug/logger.h \
- debug/log-display-config.cpp debug/log-display-config.h \
- debug/simple-event.h \
- debug/sysv-heap.cpp debug/sysv-heap.h \
- debug/gdk-event-latency-tracker.cpp debug/gdk-event-latency-tracker.h \
- debug/timestamp.cpp debug/timestamp.h
-
diff --git a/src/desktop-events.cpp b/src/desktop-events.cpp
index b9bd949ff..5fef8cbfc 100644
--- a/src/desktop-events.cpp
+++ b/src/desktop-events.cpp
@@ -21,7 +21,10 @@
#include "ui/dialog/guides.h"
#include "desktop-events.h"
-#if WITH_GTKMM_3_0
+#include <gdkmm/display.h>
+#if GTK_CHECK_VERSION(3, 20, 0)
+# include <gdkmm/seat.h>
+#else
# include <gdkmm/devicemanager.h>
#endif
@@ -97,14 +100,9 @@ static gint sp_dt_ruler_event(GtkWidget *widget, GdkEvent *event, SPDesktopWidge
gint width, height;
-#if GTK_CHECK_VERSION(3,0,0)
- GdkDevice *device = gdk_event_get_device(event);
+ auto device = gdk_event_get_device(event);
gdk_window_get_device_position(window, device, &wx, &wy, NULL);
gdk_window_get_geometry(window, NULL /*x*/, NULL /*y*/, &width, &height);
-#else
- gdk_window_get_pointer(window, &wx, &wy, NULL);
- gdk_window_get_geometry(window, NULL /*x*/, NULL /*y*/, &width, &height, NULL/*depth*/);
-#endif
Geom::Point const event_win(wx, wy);
@@ -160,7 +158,6 @@ static gint sp_dt_ruler_event(GtkWidget *widget, GdkEvent *event, SPDesktopWidge
guide = sp_guideline_new(desktop->guides, NULL, event_dt, normal);
sp_guideline_set_color(SP_GUIDELINE(guide), desktop->namedview->guidehicolor);
-#if GTK_CHECK_VERSION(3,0,0)
gdk_device_grab(device,
gtk_widget_get_window(widget),
GDK_OWNERSHIP_NONE,
@@ -168,12 +165,6 @@ static gint sp_dt_ruler_event(GtkWidget *widget, GdkEvent *event, SPDesktopWidge
(GdkEventMask)(GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK ),
NULL,
event->button.time);
-#else
- gdk_pointer_grab(gtk_widget_get_window (widget), FALSE,
- (GdkEventMask)(GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK ),
- NULL, NULL,
- event->button.time);
-#endif
}
break;
case GDK_MOTION_NOTIFY:
@@ -208,11 +199,7 @@ static gint sp_dt_ruler_event(GtkWidget *widget, GdkEvent *event, SPDesktopWidge
if (clicked && event->button.button == 1) {
sp_event_context_discard_delayed_snap_event(desktop->event_context);
-#if GTK_CHECK_VERSION(3,0,0)
gdk_device_ungrab(device, event->button.time);
-#else
- gdk_pointer_ungrab(event->button.time);
-#endif
Geom::Point const event_w(sp_canvas_window_to_world(dtw->canvas, event_win));
Geom::Point event_dt(desktop->w2d(event_w));
@@ -537,11 +524,7 @@ gint sp_dt_guide_event(SPCanvasItem *item, GdkEvent *event, gpointer data)
guide_cursor = sp_cursor_new_from_xpm(cursor_select_xpm , 1, 1);
}
gdk_window_set_cursor(gtk_widget_get_window (GTK_WIDGET(desktop->getCanvas())), guide_cursor);
-#if GTK_CHECK_VERSION(3,0,0)
g_object_unref(guide_cursor);
-#else
- gdk_cursor_unref(guide_cursor);
-#endif
char *guide_description = guide->description();
desktop->guidesMessageContext()->setF(Inkscape::NORMAL_MESSAGE, _("<b>Guideline</b>: %s"), guide_description);
@@ -575,11 +558,7 @@ gint sp_dt_guide_event(SPCanvasItem *item, GdkEvent *event, gpointer data)
GdkDisplay *display = gdk_display_get_default();
GdkCursor *guide_cursor = gdk_cursor_new_for_display(display, GDK_EXCHANGE);
gdk_window_set_cursor(gtk_widget_get_window (GTK_WIDGET(desktop->getCanvas())), guide_cursor);
-#if GTK_CHECK_VERSION(3,0,0)
g_object_unref(guide_cursor);
-#else
- gdk_cursor_unref(guide_cursor);
-#endif
ret = TRUE;
break;
}
@@ -597,11 +576,7 @@ gint sp_dt_guide_event(SPCanvasItem *item, GdkEvent *event, gpointer data)
GdkDisplay *display = gdk_display_get_default();
GdkCursor *guide_cursor = gdk_cursor_new_for_display(display, GDK_EXCHANGE);
gdk_window_set_cursor(gtk_widget_get_window (GTK_WIDGET(desktop->getCanvas())), guide_cursor);
-#if GTK_CHECK_VERSION(3,0,0)
g_object_unref(guide_cursor);
-#else
- gdk_cursor_unref(guide_cursor);
-#endif
break;
}
default:
@@ -624,19 +599,20 @@ static GdkInputSource lastType = GDK_SOURCE_MOUSE;
static void init_extended()
{
Glib::ustring avoidName("pad");
- Glib::RefPtr<Gdk::Display> display = Gdk::Display::get_default();
+ auto display = Gdk::Display::get_default();
-#if GTK_CHECK_VERSION(3,0,0)
- Glib::RefPtr<const Gdk::DeviceManager> dm = display->get_device_manager();
- std::vector< Glib::RefPtr<const Gdk::Device> > devices = dm->list_devices(Gdk::DEVICE_TYPE_SLAVE);
+#if GTK_CHECK_VERSION(3, 20, 0)
+ auto seat = display->get_default_seat();
+ auto const devices = seat->get_slaves(Gdk::SEAT_CAPABILITY_ALL);
#else
- std::vector< Glib::RefPtr<const Gdk::Device> > devices = display->list_devices();
+ auto dm = display->get_device_manager();
+ auto const devices = dm->list_devices(Gdk::DEVICE_TYPE_SLAVE);
#endif
if ( !devices.empty() ) {
- for ( std::vector< Glib::RefPtr<const Gdk::Device> >::const_iterator dev = devices.begin(); dev != devices.end(); ++dev ) {
- Glib::ustring const devName = (*dev)->get_name();
- Gdk::InputSource devSrc = (*dev)->get_source();
+ for (auto const dev : devices) {
+ auto const devName = dev->get_name();
+ auto devSrc = dev->get_source();
if ( !devName.empty()
&& (avoidName != devName)
diff --git a/src/desktop-style.cpp b/src/desktop-style.cpp
index 393e0caa7..81aa95b48 100644
--- a/src/desktop-style.cpp
+++ b/src/desktop-style.cpp
@@ -156,17 +156,17 @@ sp_desktop_apply_css_recursive(SPObject *o, SPCSSAttr *css, bool skip_lines)
return;
}
- for ( SPObject *child = o->firstChild() ; child ; child = child->getNext() ) {
+ for (auto& child: o->children) {
if (sp_repr_css_property(css, "opacity", NULL) != NULL) {
// Unset properties which are accumulating and thus should not be set recursively.
// For example, setting opacity 0.5 on a group recursively would result in the visible opacity of 0.25 for an item in the group.
SPCSSAttr *css_recurse = sp_repr_css_attr_new();
sp_repr_css_merge(css_recurse, css);
sp_repr_css_set_property(css_recurse, "opacity", NULL);
- sp_desktop_apply_css_recursive(child, css_recurse, skip_lines);
+ sp_desktop_apply_css_recursive(&child, css_recurse, skip_lines);
sp_repr_css_attr_unref(css_recurse);
} else {
- sp_desktop_apply_css_recursive(child, css, skip_lines);
+ sp_desktop_apply_css_recursive(&child, css, skip_lines);
}
}
}
@@ -187,8 +187,8 @@ sp_desktop_set_style(SPDesktop *desktop, SPCSSAttr *css, bool change, bool write
sp_repr_css_merge(css_write, css);
sp_css_attr_unset_uris(css_write);
prefs->mergeStyle("/desktop/style", css_write);
- std::vector<SPItem*> const itemlist = desktop->selection->itemList();
- for (std::vector<SPItem*>::const_iterator i = itemlist.begin(); i!= itemlist.end(); ++i) {
+ auto itemlist = desktop->selection->items();
+ for (auto i = itemlist.begin(); i!= itemlist.end(); ++i) {
/* last used styles for 3D box faces are stored separately */
SPObject *obj = *i;
Box3DSide *side = dynamic_cast<Box3DSide *>(obj);
@@ -227,8 +227,8 @@ sp_desktop_set_style(SPDesktop *desktop, SPCSSAttr *css, bool change, bool write
sp_repr_css_merge(css_no_text, css);
css_no_text = sp_css_attr_unset_text(css_no_text);
- std::vector<SPItem*> const itemlist = desktop->selection->itemList();
- for (std::vector<SPItem*>::const_iterator i = itemlist.begin(); i!= itemlist.end(); ++i) {
+ auto itemlist = desktop->selection->items();
+ for (auto i = itemlist.begin(); i!= itemlist.end(); ++i) {
SPItem *item = *i;
// If not text, don't apply text attributes (can a group have text attributes? Yes! FIXME)
@@ -1707,10 +1707,11 @@ objects_query_blend (const std::vector<SPItem*> &objects, SPStyle *style_res)
int blendcount = 0;
// determine whether filter is simple (blend and/or blur) or complex
- for(SPObject *primitive_obj = style->getFilter()->children;
- primitive_obj && dynamic_cast<SPFilterPrimitive *>(primitive_obj);
- primitive_obj = primitive_obj->next) {
- SPFilterPrimitive *primitive = dynamic_cast<SPFilterPrimitive *>(primitive_obj);
+ for(auto& primitive_obj: style->getFilter()->children) {
+ SPFilterPrimitive *primitive = dynamic_cast<SPFilterPrimitive *>(&primitive_obj);
+ if (!primitive) {
+ break;
+ }
if (dynamic_cast<SPFeBlend *>(primitive)) {
++blendcount;
} else if (dynamic_cast<SPGaussianBlur *>(primitive)) {
@@ -1723,10 +1724,12 @@ objects_query_blend (const std::vector<SPItem*> &objects, SPStyle *style_res)
// simple filter
if(blurcount == 1 || blendcount == 1) {
- for(SPObject *primitive_obj = style->getFilter()->children;
- primitive_obj && dynamic_cast<SPFilterPrimitive *>(primitive_obj);
- primitive_obj = primitive_obj->next) {
- SPFeBlend *spblend = dynamic_cast<SPFeBlend *>(primitive_obj);
+ for(auto& primitive_obj: style->getFilter()->children) {
+ SPFilterPrimitive *primitive = dynamic_cast<SPFilterPrimitive *>(&primitive_obj);
+ if (!primitive) {
+ break;
+ }
+ SPFeBlend *spblend = dynamic_cast<SPFeBlend *>(&primitive_obj);
if (spblend) {
blend = spblend->blend_mode;
}
@@ -1800,9 +1803,8 @@ objects_query_blur (const std::vector<SPItem*> &objects, SPStyle *style_res)
//if object has a filter
if (style->filter.set && style->getFilter()) {
//cycle through filter primitives
- SPObject *primitive_obj = style->getFilter()->children;
- while (primitive_obj) {
- SPFilterPrimitive *primitive = dynamic_cast<SPFilterPrimitive *>(primitive_obj);
+ for(auto& primitive_obj: style->getFilter()->children) {
+ SPFilterPrimitive *primitive = dynamic_cast<SPFilterPrimitive *>(&primitive_obj);
if (primitive) {
//if primitive is gaussianblur
@@ -1820,7 +1822,6 @@ objects_query_blur (const std::vector<SPItem*> &objects, SPStyle *style_res)
}
}
}
- primitive_obj = primitive_obj->next;
}
}
}
@@ -1910,7 +1911,8 @@ sp_desktop_query_style(SPDesktop *desktop, SPStyle *style, int property)
// otherwise, do querying and averaging over selection
if (desktop->selection != NULL) {
- return sp_desktop_query_style_from_list (desktop->selection->itemList(), style, property);
+ std::vector<SPItem *> vec(desktop->selection->items().begin(), desktop->selection->items().end());
+ return sp_desktop_query_style_from_list (vec, style, property);
}
return QUERY_STYLE_NOTHING;
diff --git a/src/desktop.cpp b/src/desktop.cpp
index 7e0953d4d..7efa3e438 100644
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
@@ -1432,11 +1432,7 @@ void SPDesktop::setWaitingCursor()
GdkDisplay *display = gdk_display_get_default();
GdkCursor *waiting = gdk_cursor_new_for_display(display, GDK_WATCH);
gdk_window_set_cursor(gtk_widget_get_window(GTK_WIDGET(getCanvas())), waiting);
-#if GTK_CHECK_VERSION(3,0,0)
g_object_unref(waiting);
-#else
- gdk_cursor_unref(waiting);
-#endif
// GDK needs the flush for the cursor change to take effect
gdk_flush();
waiting_cursor = true;
diff --git a/src/device-manager.cpp b/src/device-manager.cpp
index cfb8291a0..6c8d4514c 100644
--- a/src/device-manager.cpp
+++ b/src/device-manager.cpp
@@ -8,18 +8,23 @@
*/
#include "device-manager.h"
+
#include <set>
#include "preferences.h"
-#include <gdkmm/display.h>
-#include <gtkmm/accelkey.h>
+
#include <glibmm/regex.h>
-#if WITH_GTKMM_3_0
+#include <gtk/gtk.h>
+
+#include <gdkmm/display.h>
+#if GTK_CHECK_VERSION(3, 20, 0)
+# include <gdkmm/seat.h>
+#else
# include <gdkmm/devicemanager.h>
#endif
-#include <gtk/gtk.h>
+#include <gtkmm/accelkey.h>
#define noDEBUG_VERBOSE 1
@@ -47,11 +52,7 @@ static bool isValidDevice(Glib::RefPtr<Gdk::Device> device)
const bool source_matches = (device->get_source() == (*it).source);
const bool mode_matches = (device->get_mode() == (*it).mode);
const bool num_axes_matches = (device->get_n_axes() == (*it).num_axes);
-#if WITH_GTKMM_3_0
const bool num_keys_matches = (device->get_n_keys() == (*it).num_keys);
-#else
- const bool num_keys_matches = (gdk_device_get_n_keys(device->gobj()) == (*it).num_keys);
-#endif
if (name_matches && source_matches && mode_matches
&& num_axes_matches && num_keys_matches)
@@ -175,13 +176,7 @@ public:
virtual Gdk::InputMode getMode() const {return (device->get_mode());}
virtual gint getNumAxes() const {return device->get_n_axes();}
virtual bool hasCursor() const {return device->get_has_cursor();}
-
-#if WITH_GTKMM_3_0
virtual int getNumKeys() const {return device->get_n_keys();}
-#else
- virtual int getNumKeys() const {return gdk_device_get_n_keys(device->gobj());}
-#endif
-
virtual Glib::ustring getLink() const {return link;}
virtual void setLink( Glib::ustring const& link ) {this->link = link;}
virtual gint getLiveAxes() const {return liveAxes;}
@@ -326,11 +321,12 @@ DeviceManagerImpl::DeviceManagerImpl() :
{
Glib::RefPtr<Gdk::Display> display = Gdk::Display::get_default();
-#if WITH_GTKMM_3_0
- Glib::RefPtr<Gdk::DeviceManager> dm = display->get_device_manager();
- std::vector< Glib::RefPtr<Gdk::Device> > devList = dm->list_devices(Gdk::DEVICE_TYPE_SLAVE);
+#if GTK_CHECK_VERSION(3, 20, 0)
+ auto seat = display->get_default_seat();
+ auto devList = seat->get_slaves(Gdk::SEAT_CAPABILITY_ALL);
#else
- std::vector< Glib::RefPtr<Gdk::Device> > devList = display->list_devices();
+ auto dm = display->get_device_manager();
+ auto devList = dm->list_devices(Gdk::DEVICE_TYPE_SLAVE);
#endif
if (fakeList.empty()) {
@@ -340,24 +336,19 @@ DeviceManagerImpl::DeviceManagerImpl() :
std::set<Glib::ustring> knownIDs;
- for ( std::vector< Glib::RefPtr<Gdk::Device> >::iterator dev = devList.begin(); dev != devList.end(); ++dev ) {
-#if WITH_GTKMM_3_0
+ for (auto dev : devList) {
// GTK+ 3 has added keyboards to the list of supported devices.
- if((*dev)->get_source() != Gdk::SOURCE_KEYBOARD) {
-#endif
+ if(dev->get_source() != Gdk::SOURCE_KEYBOARD) {
#if DEBUG_VERBOSE
g_message("device: name[%s] source[0x%x] mode[0x%x] cursor[%s] axis count[%d] key count[%d]", dev->name, dev->source, dev->mode,
dev->has_cursor?"Yes":"no", dev->num_axes, dev->num_keys);
#endif
- InputDeviceImpl* device = new InputDeviceImpl(*dev, knownIDs);
+ InputDeviceImpl* device = new InputDeviceImpl(dev, knownIDs);
device->reference();
devices.push_back(Glib::RefPtr<InputDeviceImpl>(device));
-
-#if WITH_GTKMM_3_0
}
-#endif
}
}
@@ -667,11 +658,12 @@ static void createFakeList() {
// try to find the first *real* core pointer
Glib::RefPtr<Gdk::Display> display = Gdk::Display::get_default();
-#if WITH_GTKMM_3_0
- Glib::RefPtr<Gdk::DeviceManager> dm = display->get_device_manager();
- std::vector< Glib::RefPtr<Gdk::Device> > devList = dm->list_devices(Gdk::DEVICE_TYPE_SLAVE);
+#if GTK_CHECK_VERSION(3, 20, 0)
+ auto seat = display->get_default_seat();
+ auto devList = seat->get_slaves(Gdk::SEAT_CAPABILITY_ALL);
#else
- std::vector< Glib::RefPtr<Gdk::Device> > devList = display->list_devices();
+ auto dm = display->get_device_manager();
+ auto devList = dm->list_devices(Gdk::DEVICE_TYPE_SLAVE);
#endif
// Set iterator to point at beginning of device list
@@ -689,11 +681,7 @@ static void createFakeList() {
fakeList[4].mode = device->get_mode();
fakeList[4].has_cursor = device->get_has_cursor();
fakeList[4].num_axes = device->get_n_axes();
-#if WITH_GTKMM_3_0
fakeList[4].num_keys = device->get_n_keys();
-#else
- fakeList[4].num_keys = gdk_device_get_n_keys(device->gobj());
-#endif
} else {
fakeList[4].name = "Core Pointer";
fakeList[4].source = Gdk::SOURCE_MOUSE;
diff --git a/src/display/Makefile_insert b/src/display/Makefile_insert
deleted file mode 100644
index 419852f7d..000000000
--- a/src/display/Makefile_insert
+++ /dev/null
@@ -1,125 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-display/canvas-arena.$(OBJEXT): helper/sp-marshal.h
-display/sp-canvas.$(OBJEXT): helper/sp-marshal.h
-
-ink_common_sources += \
- display/cairo-templates.h \
- display/cairo-utils.cpp \
- display/cairo-utils.h \
- display/canvas-arena.cpp \
- display/canvas-arena.h \
- display/canvas-axonomgrid.cpp \
- display/canvas-axonomgrid.h \
- display/canvas-bpath.cpp \
- display/canvas-bpath.h \
- display/canvas-grid.cpp \
- display/canvas-grid.h \
- display/canvas-temporary-item.cpp \
- display/canvas-temporary-item.h \
- display/canvas-temporary-item-list.cpp \
- display/canvas-temporary-item-list.h \
- display/canvas-text.cpp \
- display/canvas-text.h \
- display/curve.cpp \
- display/curve.h \
- display/drawing.cpp \
- display/drawing.h \
- display/drawing-context.cpp \
- display/drawing-context.h \
- display/drawing-group.cpp \
- display/drawing-group.h \
- display/drawing-image.cpp \
- display/drawing-image.h \
- display/drawing-item.cpp \
- display/drawing-item.h \
- display/drawing-pattern.cpp \
- display/drawing-pattern.h \
- display/drawing-shape.cpp \
- display/drawing-shape.h \
- display/drawing-surface.cpp \
- display/drawing-surface.h \
- display/drawing-text.cpp \
- display/drawing-text.h \
- display/gnome-canvas-acetate.cpp \
- display/gnome-canvas-acetate.h \
- display/grayscale.cpp \
- display/grayscale.h \
- display/guideline.cpp \
- display/guideline.h \
- display/nr-3dutils.cpp \
- display/nr-3dutils.h \
- display/nr-filter-blend.cpp \
- display/nr-filter-blend.h \
- display/nr-filter-colormatrix.cpp \
- display/nr-filter-colormatrix.h \
- display/nr-filter-component-transfer.cpp \
- display/nr-filter-component-transfer.h \
- display/nr-filter-composite.cpp \
- display/nr-filter-composite.h \
- display/nr-filter-convolve-matrix.cpp \
- display/nr-filter-convolve-matrix.h \
- display/nr-filter.cpp \
- display/nr-filter-diffuselighting.cpp \
- display/nr-filter-diffuselighting.h \
- display/nr-filter-displacement-map.cpp \
- display/nr-filter-displacement-map.h \
- display/nr-filter-flood.cpp \
- display/nr-filter-flood.h \
- display/nr-filter-gaussian.cpp \
- display/nr-filter-gaussian.h \
- display/nr-filter.h \
- display/nr-filter-image.cpp \
- display/nr-filter-image.h \
- display/nr-filter-merge.cpp \
- display/nr-filter-merge.h \
- display/nr-filter-morphology.cpp \
- display/nr-filter-morphology.h \
- display/nr-filter-offset.cpp \
- display/nr-filter-offset.h \
- display/nr-filter-primitive.cpp \
- display/nr-filter-primitive.h \
- display/nr-filter-slot.cpp \
- display/nr-filter-slot.h \
- display/nr-filter-specularlighting.cpp \
- display/nr-filter-specularlighting.h \
- display/nr-filter-tile.cpp \
- display/nr-filter-tile.h \
- display/nr-filter-turbulence.cpp \
- display/nr-filter-turbulence.h \
- display/nr-filter-types.h \
- display/nr-filter-units.cpp \
- display/nr-filter-units.h \
- display/nr-filter-utils.h \
- display/nr-light.cpp \
- display/nr-light.h \
- display/nr-light-types.h \
- display/nr-style.cpp \
- display/nr-style.h \
- display/nr-svgfonts.cpp \
- display/nr-svgfonts.h \
- display/rendermode.h \
- display/snap-indicator.cpp \
- display/snap-indicator.h \
- display/sodipodi-ctrl.cpp \
- display/sodipodi-ctrl.h \
- display/sodipodi-ctrlrect.cpp \
- display/sodipodi-ctrlrect.h \
- display/sp-canvas.cpp \
- display/sp-canvas.h \
- display/sp-canvas-item.h \
- display/sp-canvas-group.h \
- display/sp-canvas-util.cpp \
- display/sp-canvas-util.h \
- display/sp-ctrlcurve.cpp \
- display/sp-ctrlcurve.h \
- display/sp-ctrlline.cpp \
- display/sp-ctrlline.h \
- display/sp-ctrlquadr.cpp \
- display/sp-ctrlquadr.h
-
-# ######################
-# ### CxxTest stuff ####
-# ######################
-CXXTEST_TESTSUITES += \
- $(srcdir)/display/curve-test.h
diff --git a/src/display/canvas-axonomgrid.cpp b/src/display/canvas-axonomgrid.cpp
index 14f36376f..421a39fbd 100644
--- a/src/display/canvas-axonomgrid.cpp
+++ b/src/display/canvas-axonomgrid.cpp
@@ -19,12 +19,7 @@
#include <gtkmm/box.h>
#include <gtkmm/label.h>
-
-#if WITH_GTKMM_3_0
-# include <gtkmm/grid.h>
-#else
-# include <gtkmm/table.h>
-#endif
+#include <gtkmm/grid.h>
#include <glibmm/i18n.h>
@@ -94,15 +89,10 @@ namespace Inkscape {
#define SPACE_SIZE_X 15
#define SPACE_SIZE_Y 10
static inline void
-#if WITH_GTKMM_3_0
attach_all(Gtk::Grid &table, Gtk::Widget const *const arr[], unsigned size, int start = 0)
-#else
-attach_all(Gtk::Table &table, Gtk::Widget const *const arr[], unsigned size, int start = 0)
-#endif
{
for (unsigned i=0, r=start; i<size/sizeof(Gtk::Widget*); i+=2) {
if (arr[i] && arr[i+1]) {
-#if WITH_GTKMM_3_0
(const_cast<Gtk::Widget&>(*arr[i])).set_hexpand();
(const_cast<Gtk::Widget&>(*arr[i])).set_valign(Gtk::ALIGN_CENTER);
table.attach(const_cast<Gtk::Widget&>(*arr[i]), 1, r, 1, 1);
@@ -110,44 +100,23 @@ attach_all(Gtk::Table &table, Gtk::Widget const *const arr[], unsigned size, int
(const_cast<Gtk::Widget&>(*arr[i+1])).set_hexpand();
(const_cast<Gtk::Widget&>(*arr[i+1])).set_valign(Gtk::ALIGN_CENTER);
table.attach(const_cast<Gtk::Widget&>(*arr[i+1]), 2, r, 1, 1);
-#else
- table.attach (const_cast<Gtk::Widget&>(*arr[i]), 1, 2, r, r+1,
- Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
- table.attach (const_cast<Gtk::Widget&>(*arr[i+1]), 2, 3, r, r+1,
- Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
-#endif
} else {
if (arr[i+1]) {
-#if WITH_GTKMM_3_0
(const_cast<Gtk::Widget&>(*arr[i+1])).set_hexpand();
(const_cast<Gtk::Widget&>(*arr[i+1])).set_valign(Gtk::ALIGN_CENTER);
table.attach(const_cast<Gtk::Widget&>(*arr[i+1]), 1, r, 2, 1);
-#else
- table.attach (const_cast<Gtk::Widget&>(*arr[i+1]), 1, 3, r, r+1,
- Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
-#endif
} else if (arr[i]) {
Gtk::Label& label = reinterpret_cast<Gtk::Label&> (const_cast<Gtk::Widget&>(*arr[i]));
label.set_alignment (0.0);
-#if WITH_GTKMM_3_0
label.set_hexpand();
label.set_valign(Gtk::ALIGN_CENTER);
table.attach(label, 0, r, 3, 1);
-#else
- table.attach (label, 0, 3, r, r+1,
- Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
-#endif
} else {
Gtk::HBox *space = Gtk::manage (new Gtk::HBox);
space->set_size_request (SPACE_SIZE_X, SPACE_SIZE_Y);
-#if WITH_GTKMM_3_0
space->set_halign(Gtk::ALIGN_CENTER);
space->set_valign(Gtk::ALIGN_CENTER);
table.attach(*space, 0, r, 1, 1);
-#else
- table.attach (*space, 0, 1, r, r+1,
- (Gtk::AttachOptions)0, (Gtk::AttachOptions)0,0,0);
-#endif
}
}
++r;
@@ -342,14 +311,9 @@ CanvasAxonomGrid::onReprAttrChanged(Inkscape::XML::Node */*repr*/, gchar const *
Gtk::Widget *
CanvasAxonomGrid::newSpecificWidget()
{
-#if WITH_GTKMM_3_0
- Gtk::Grid *table = Gtk::manage(new Gtk::Grid());
+ auto table = Gtk::manage(new Gtk::Grid());
table->set_row_spacing(2);
table->set_column_spacing(2);
-#else
- Gtk::Table * table = Gtk::manage( new Gtk::Table(1,1) );
- table->set_spacings(2);
-#endif
_wr.setUpdating (true);
diff --git a/src/display/canvas-grid.cpp b/src/display/canvas-grid.cpp
index decf93626..fa45fe02c 100644
--- a/src/display/canvas-grid.cpp
+++ b/src/display/canvas-grid.cpp
@@ -19,12 +19,7 @@
#include <gtkmm/box.h>
#include <gtkmm/label.h>
-
-#if WITH_GTKMM_3_0
-# include <gtkmm/grid.h>
-#else
-# include <gtkmm/table.h>
-#endif
+#include <gtkmm/grid.h>
#include <glibmm/i18n.h>
@@ -400,15 +395,10 @@ void CanvasGrid::setOrigin(Geom::Point const &origin_px)
**/
#define SPACE_SIZE_X 15
#define SPACE_SIZE_Y 10
-#if WITH_GTKMM_3_0
static inline void attach_all(Gtk::Grid &table, Gtk::Widget const *const arr[], unsigned size, int start = 0)
-#else
-static inline void attach_all(Gtk::Table &table, Gtk::Widget const *const arr[], unsigned size, int start = 0)
-#endif
{
for (unsigned i=0, r=start; i<size/sizeof(Gtk::Widget*); i+=2) {
if (arr[i] && arr[i+1]) {
-#if WITH_GTKMM_3_0
(const_cast<Gtk::Widget&>(*arr[i])).set_hexpand();
(const_cast<Gtk::Widget&>(*arr[i])).set_valign(Gtk::ALIGN_CENTER);
table.attach(const_cast<Gtk::Widget&>(*arr[i]), 1, r, 1, 1);
@@ -416,44 +406,23 @@ static inline void attach_all(Gtk::Table &table, Gtk::Widget const *const arr[],
(const_cast<Gtk::Widget&>(*arr[i+1])).set_hexpand();
(const_cast<Gtk::Widget&>(*arr[i+1])).set_valign(Gtk::ALIGN_CENTER);
table.attach(const_cast<Gtk::Widget&>(*arr[i+1]), 2, r, 1, 1);
-#else
- table.attach (const_cast<Gtk::Widget&>(*arr[i]), 1, 2, r, r+1,
- Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
- table.attach (const_cast<Gtk::Widget&>(*arr[i+1]), 2, 3, r, r+1,
- Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
-#endif
} else {
if (arr[i+1]) {
-#if WITH_GTKMM_3_0
(const_cast<Gtk::Widget&>(*arr[i+1])).set_hexpand();
(const_cast<Gtk::Widget&>(*arr[i+1])).set_valign(Gtk::ALIGN_CENTER);
table.attach(const_cast<Gtk::Widget&>(*arr[i+1]), 1, r, 2, 1);
-#else
- table.attach (const_cast<Gtk::Widget&>(*arr[i+1]), 1, 3, r, r+1,
- Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
-#endif
} else if (arr[i]) {
Gtk::Label& label = reinterpret_cast<Gtk::Label&> (const_cast<Gtk::Widget&>(*arr[i]));
label.set_alignment (0.0);
-#if WITH_GTKMM_3_0
label.set_hexpand();
label.set_valign(Gtk::ALIGN_CENTER);
table.attach(label, 0, r, 3, 1);
-#else
- table.attach (label, 0, 3, r, r+1,
- Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
-#endif
} else {
Gtk::HBox *space = Gtk::manage (new Gtk::HBox);
space->set_size_request (SPACE_SIZE_X, SPACE_SIZE_Y);
-#if WITH_GTKMM_3_0
space->set_halign(Gtk::ALIGN_CENTER);
space->set_valign(Gtk::ALIGN_CENTER);
table.attach(*space, 0, r, 1, 1);
-#else
- table.attach (*space, 0, 1, r, r+1,
- (Gtk::AttachOptions)0, (Gtk::AttachOptions)0,0,0);
-#endif
}
}
++r;
@@ -684,14 +653,9 @@ CanvasXYGrid::onReprAttrChanged(Inkscape::XML::Node */*repr*/, gchar const */*ke
Gtk::Widget *
CanvasXYGrid::newSpecificWidget()
{
-#if WITH_GTKMM_3_0
- Gtk::Grid * table = Gtk::manage( new Gtk::Grid() );
+ auto table = Gtk::manage( new Gtk::Grid() );
table->set_row_spacing(2);
table->set_column_spacing(2);
-#else
- Gtk::Table * table = Gtk::manage( new Gtk::Table(1,1) );
- table->set_spacings(2);
-#endif
Inkscape::UI::Widget::RegisteredUnitMenu *_rumg = Gtk::manage( new Inkscape::UI::Widget::RegisteredUnitMenu(
_("Grid _units:"), "units", _wr, repr, doc) );
diff --git a/src/display/nr-svgfonts.cpp b/src/display/nr-svgfonts.cpp
index 011f51977..53a5cba49 100644
--- a/src/display/nr-svgfonts.cpp
+++ b/src/display/nr-svgfonts.cpp
@@ -203,14 +203,19 @@ SvgFont::scaled_font_text_to_glyphs (cairo_scaled_font_t */*scaled_font*/,
//check whether is there a glyph declared on the SVG document
// that matches with the text string in its current position
if ( (len = size_of_substring(this->glyphs[i]->unicode.c_str(), _utf8)) ){
- for(SPObject* node = this->font->children;previous_unicode && node;node=node->next){
+ for(auto& node: font->children) {
+ if (!previous_unicode) {
+ break;
+ }
//apply glyph kerning if appropriate
- SPHkern *hkern = dynamic_cast<SPHkern *>(node);
- if (hkern && is_horizontal_text && MatchHKerningRule(hkern, this->glyphs[i], previous_unicode, previous_glyph_name) ){
+ SPHkern *hkern = dynamic_cast<SPHkern *>(&node);
+ if (hkern && is_horizontal_text &&
+ MatchHKerningRule(hkern, this->glyphs[i], previous_unicode, previous_glyph_name)) {
x -= (hkern->k / 1000.0);//TODO: use here the height of the font
}
- SPVkern *vkern = dynamic_cast<SPVkern *>(node);
- if (vkern && !is_horizontal_text && MatchVKerningRule(vkern, this->glyphs[i], previous_unicode, previous_glyph_name) ){
+ SPVkern *vkern = dynamic_cast<SPVkern *>(&node);
+ if (vkern && !is_horizontal_text &&
+ MatchVKerningRule(vkern, this->glyphs[i], previous_unicode, previous_glyph_name)) {
y -= (vkern->k / 1000.0);//TODO: use here the "height" of the font
}
}
@@ -271,10 +276,10 @@ SvgFont::glyph_modified(SPObject* /* blah */, unsigned int /* bleh */){
Geom::PathVector
SvgFont::flip_coordinate_system(SPFont* spfont, Geom::PathVector pathv){
double units_per_em = 1000;
- for (SPObject *obj = spfont->children; obj; obj = obj->next){
- if (dynamic_cast<SPFontFace *>(obj)) {
+ for(auto& obj: spfont->children) {
+ if (dynamic_cast<SPFontFace *>(&obj)) {
//XML Tree being directly used here while it shouldn't be.
- sp_repr_get_double(obj->getRepr(), "units_per_em", &units_per_em);
+ sp_repr_get_double(obj.getRepr(), "units_per_em", &units_per_em);
}
}
@@ -339,19 +344,19 @@ SvgFont::scaled_font_render_glyph (cairo_scaled_font_t */*scaled_font*/,
if (node->hasChildren()){
//render the SVG described on this glyph's child nodes.
- for(node = node->children; node; node=node->next){
+ for(auto& child: node->children) {
{
- SPPath *path = dynamic_cast<SPPath *>(node);
+ SPPath *path = dynamic_cast<SPPath *>(&child);
if (path) {
pathv = path->_curve->get_pathvector();
pathv = flip_coordinate_system(spfont, pathv);
render_glyph_path(cr, &pathv);
}
}
- if (dynamic_cast<SPObjectGroup *>(node)) {
+ if (dynamic_cast<SPObjectGroup *>(&child)) {
g_warning("TODO: svgfonts: render OBJECTGROUP");
}
- SPUse *use = dynamic_cast<SPUse *>(node);
+ SPUse *use = dynamic_cast<SPUse *>(&child);
if (use) {
SPItem* item = use->ref->getObject();
SPPath *path = dynamic_cast<SPPath *>(item);
@@ -374,12 +379,12 @@ SvgFont::scaled_font_render_glyph (cairo_scaled_font_t */*scaled_font*/,
cairo_font_face_t*
SvgFont::get_font_face(){
if (!this->userfont) {
- for(SPObject* node = this->font->children;node;node=node->next){
- SPGlyph *glyph = dynamic_cast<SPGlyph *>(node);
+ for(auto& node: font->children) {
+ SPGlyph *glyph = dynamic_cast<SPGlyph *>(&node);
if (glyph) {
glyphs.push_back(glyph);
}
- SPMissingGlyph *missing = dynamic_cast<SPMissingGlyph *>(node);
+ SPMissingGlyph *missing = dynamic_cast<SPMissingGlyph *>(&node);
if (missing) {
missingglyph = missing;
}
diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp
index 7d76fa043..9201168ef 100644
--- a/src/display/sp-canvas.cpp
+++ b/src/display/sp-canvas.cpp
@@ -322,13 +322,9 @@ void sp_canvas_item_dispose(GObject *object)
if (item == item->canvas->_grabbed_item) {
item->canvas->_grabbed_item = NULL;
-#if GTK_CHECK_VERSION(3,0,0)
- GdkDeviceManager *dm = gdk_display_get_device_manager(gdk_display_get_default());
- GdkDevice *device = gdk_device_manager_get_client_pointer(dm);
+ auto dm = gdk_display_get_device_manager(gdk_display_get_default());
+ auto device = gdk_device_manager_get_client_pointer(dm);
gdk_device_ungrab(device, GDK_CURRENT_TIME);
-#else
- gdk_pointer_ungrab (GDK_CURRENT_TIME);
-#endif
}
if (item == item->canvas->_focused_item) {
@@ -617,9 +613,8 @@ int sp_canvas_item_grab(SPCanvasItem *item, guint event_mask, GdkCursor *cursor,
// fixme: Top hack (Lauris)
// fixme: If we add key masks to event mask, Gdk will abort (Lauris)
// fixme: But Canvas actualle does get key events, so all we need is routing these here
-#if GTK_CHECK_VERSION(3,0,0)
- GdkDeviceManager *dm = gdk_display_get_device_manager(gdk_display_get_default());
- GdkDevice *device = gdk_device_manager_get_client_pointer(dm);
+ auto dm = gdk_display_get_device_manager(gdk_display_get_default());
+ auto device = gdk_device_manager_get_client_pointer(dm);
gdk_device_grab(device,
getWindow(item->canvas),
GDK_OWNERSHIP_NONE,
@@ -627,11 +622,6 @@ int sp_canvas_item_grab(SPCanvasItem *item, guint event_mask, GdkCursor *cursor,
(GdkEventMask)(event_mask & (~(GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK))),
cursor,
etime);
-#else
- gdk_pointer_grab( getWindow(item->canvas), FALSE,
- (GdkEventMask)(event_mask & (~(GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK))),
- NULL, cursor, etime);
-#endif
item->canvas->_grabbed_item = item;
item->canvas->_grabbed_event_mask = event_mask;
@@ -658,13 +648,9 @@ void sp_canvas_item_ungrab(SPCanvasItem *item, guint32 etime)
item->canvas->_grabbed_item = NULL;
-#if GTK_CHECK_VERSION(3,0,0)
- GdkDeviceManager *dm = gdk_display_get_device_manager(gdk_display_get_default());
- GdkDevice *device = gdk_device_manager_get_client_pointer(dm);
+ auto dm = gdk_display_get_device_manager(gdk_display_get_default());
+ auto device = gdk_device_manager_get_client_pointer(dm);
gdk_device_ungrab(device, etime);
-#else
- gdk_pointer_ungrab (etime);
-#endif
}
/**
@@ -913,16 +899,9 @@ void sp_canvas_class_init(SPCanvasClass *klass)
widget_class->realize = SPCanvas::handle_realize;
widget_class->unrealize = SPCanvas::handle_unrealize;
-
-#if GTK_CHECK_VERSION(3,0,0)
widget_class->get_preferred_width = SPCanvas::handle_get_preferred_width;
widget_class->get_preferred_height = SPCanvas::handle_get_preferred_height;
widget_class->draw = SPCanvas::handle_draw;
-#else
- widget_class->size_request = SPCanvas::handle_size_request;
- widget_class->expose_event = SPCanvas::handle_expose;
-#endif
-
widget_class->size_allocate = SPCanvas::handle_size_allocate;
widget_class->button_press_event = SPCanvas::handle_button;
widget_class->button_release_event = SPCanvas::handle_button;
@@ -980,13 +959,9 @@ void SPCanvas::shutdownTransients()
if (_grabbed_item) {
_grabbed_item = NULL;
-#if GTK_CHECK_VERSION(3,0,0)
- GdkDeviceManager *dm = gdk_display_get_device_manager(gdk_display_get_default());
- GdkDevice *device = gdk_device_manager_get_client_pointer(dm);
+ auto dm = gdk_display_get_device_manager(gdk_display_get_default());
+ auto device = gdk_device_manager_get_client_pointer(dm);
gdk_device_ungrab(device, GDK_CURRENT_TIME);
-#else
- gdk_pointer_ungrab(GDK_CURRENT_TIME);
-#endif
}
removeIdle();
}
@@ -1053,10 +1028,6 @@ void SPCanvas::handle_realize(GtkWidget *widget)
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gdk_visual_get_system();
-#if !GTK_CHECK_VERSION(3,0,0)
- attributes.colormap = gdk_colormap_get_system();
-#endif
-
attributes.event_mask = (gtk_widget_get_events (widget) |
GDK_EXPOSURE_MASK |
GDK_BUTTON_PRESS_MASK |
@@ -1073,11 +1044,7 @@ void SPCanvas::handle_realize(GtkWidget *widget)
GDK_SCROLL_MASK |
GDK_FOCUS_CHANGE_MASK);
-#if GTK_CHECK_VERSION(3,0,0)
gint attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
-#else
- gint attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
-#endif
GdkWindow *window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes, attributes_mask);
gtk_widget_set_window (widget, window);
@@ -1086,18 +1053,8 @@ void SPCanvas::handle_realize(GtkWidget *widget)
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
if (prefs->getBool("/options/useextinput/value", true)) {
gtk_widget_set_events(widget, attributes.event_mask);
-#if !GTK_CHECK_VERSION(3,0,0)
- gtk_widget_set_extension_events(widget, GDK_EXTENSION_EVENTS_ALL);
- // TODO: Extension event stuff has been deprecated in GTK+ 3
-#endif
}
-#if !GTK_CHECK_VERSION(3,0,0)
- // This does nothing in GTK+ 3
- GtkStyle *style = gtk_widget_get_style (widget);
- gtk_widget_set_style (widget, gtk_style_attach (style, window));
-#endif
-
gtk_widget_set_realized (widget, TRUE);
}
@@ -1115,8 +1072,6 @@ void SPCanvas::handle_unrealize(GtkWidget *widget)
(* GTK_WIDGET_CLASS(sp_canvas_parent_class)->unrealize)(widget);
}
-
-#if GTK_CHECK_VERSION(3,0,0)
void SPCanvas::handle_get_preferred_width(GtkWidget *widget, gint *minimum_width, gint *natural_width)
{
static_cast<void>(SP_CANVAS (widget));
@@ -1130,16 +1085,6 @@ void SPCanvas::handle_get_preferred_height(GtkWidget *widget, gint *minimum_heig
*minimum_height = 256;
*natural_height = 256;
}
-#else
-void SPCanvas::handle_size_request(GtkWidget *widget, GtkRequisition *req)
-{
- static_cast<void>(SP_CANVAS (widget));
-
- req->width = 256;
- req->height = 256;
-}
-#endif
-
void SPCanvas::handle_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
{
@@ -1219,9 +1164,7 @@ int SPCanvas::emitEvent(GdkEvent *event)
break;
case GDK_SCROLL:
mask = GDK_SCROLL_MASK;
-#if GTK_CHECK_VERSION(3,0,0)
mask |= GDK_SMOOTH_SCROLL_MASK;
-#endif
break;
default:
mask = 0;
@@ -1503,13 +1446,9 @@ gint SPCanvas::handle_scroll(GtkWidget *widget, GdkEventScroll *event)
}
static inline void request_motions(GdkWindow *w, GdkEventMotion *event) {
-#if GTK_CHECK_VERSION(3,0,0)
gdk_window_get_device_position(w,
gdk_event_get_device((GdkEvent *)(event)),
NULL, NULL, NULL);
-#else
- gdk_window_get_pointer(w, NULL, NULL, NULL);
-#endif
gdk_event_request_motions(event);
}
@@ -1746,16 +1685,12 @@ bool SPCanvas::paintRect(int xx0, int yy0, int xx1, int yy1)
// Save the mouse location
gint x, y;
-#if GTK_CHECK_VERSION(3,0,0)
- GdkDeviceManager *dm = gdk_display_get_device_manager(gdk_display_get_default());
- GdkDevice *device = gdk_device_manager_get_client_pointer(dm);
+ auto dm = gdk_display_get_device_manager(gdk_display_get_default());
+ auto device = gdk_device_manager_get_client_pointer(dm);
gdk_window_get_device_position(gtk_widget_get_window(GTK_WIDGET(this)),
device,
&x, &y, NULL);
-#else
- gdk_window_get_pointer(gtk_widget_get_window(GTK_WIDGET(this)), &x, &y, NULL);
-#endif
setup.mouse_loc = sp_canvas_window_to_world(this, Geom::Point(x,y));
@@ -1818,21 +1753,6 @@ gboolean SPCanvas::handle_draw(GtkWidget *widget, cairo_t *cr) {
return TRUE;
}
-#if !GTK_CHECK_VERSION(3,0,0)
-gboolean SPCanvas::handle_expose(GtkWidget *widget, GdkEventExpose *event)
-{
- cairo_t *cr = gdk_cairo_create(gtk_widget_get_window(widget));
-
- gdk_cairo_region (cr, event->region);
- cairo_clip (cr);
- gboolean result = SPCanvas::handle_draw(widget, cr);
-
- cairo_destroy (cr);
-
- return result;
-}
-#endif
-
gint SPCanvas::handle_key_event(GtkWidget *widget, GdkEventKey *event)
{
diff --git a/src/display/sp-canvas.h b/src/display/sp-canvas.h
index 171fdaf67..78d96d728 100644
--- a/src/display/sp-canvas.h
+++ b/src/display/sp-canvas.h
@@ -145,12 +145,8 @@ public:
static void dispose(GObject *object);
static void handle_realize(GtkWidget *widget);
static void handle_unrealize(GtkWidget *widget);
-#if GTK_CHECK_VERSION(3,0,0)
static void handle_get_preferred_width(GtkWidget *widget, gint *min_w, gint *nat_w);
static void handle_get_preferred_height(GtkWidget *widget, gint *min_h, gint *nat_h);
-#else
- static void handle_size_request(GtkWidget *widget, GtkRequisition *req);
-#endif
static void handle_size_allocate(GtkWidget *widget, GtkAllocation *allocation);
static gint handle_button(GtkWidget *widget, GdkEventButton *event);
@@ -162,9 +158,6 @@ public:
static gint handle_scroll(GtkWidget *widget, GdkEventScroll *event);
static gint handle_motion(GtkWidget *widget, GdkEventMotion *event);
static gboolean handle_draw(GtkWidget *widget, cairo_t *cr);
-#if !GTK_CHECK_VERSION(3,0,0)
- static gboolean handle_expose(GtkWidget *widget, GdkEventExpose *event);
-#endif
static gint handle_key_event(GtkWidget *widget, GdkEventKey *event);
static gint handle_crossing(GtkWidget *widget, GdkEventCrossing *event);
static gint handle_focus_in(GtkWidget *widget, GdkEventFocus *event);
diff --git a/src/document.cpp b/src/document.cpp
index fd9b39ce4..27fbaf8d8 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -250,9 +250,9 @@ void SPDocument::setCurrentPersp3D(Persp3D * const persp) {
void SPDocument::getPerspectivesInDefs(std::vector<Persp3D*> &list) const
{
- for (SPObject *i = root->defs->firstChild(); i; i = i->getNext() ) {
- if (SP_IS_PERSP3D(i)) {
- list.push_back(SP_PERSP3D(i));
+ for (auto& i: root->defs->children) {
+ if (SP_IS_PERSP3D(&i)) {
+ list.push_back(SP_PERSP3D(&i));
}
}
}
@@ -1306,12 +1306,12 @@ static std::vector<SPItem*> &find_items_in_area(std::vector<SPItem*> &s, SPGroup
{
g_return_val_if_fail(SP_IS_GROUP(group), s);
- for ( SPObject *o = group->firstChild() ; o ; o = o->getNext() ) {
- if ( SP_IS_ITEM(o) ) {
- if (SP_IS_GROUP(o) && (SP_GROUP(o)->effectiveLayerMode(dkey) == SPGroup::LAYER || into_groups)) {
- s = find_items_in_area(s, SP_GROUP(o), dkey, area, test, take_insensitive, into_groups);
+ for (auto& o: group->children) {
+ if ( SP_IS_ITEM(&o) ) {
+ if (SP_IS_GROUP(&o) && (SP_GROUP(&o)->effectiveLayerMode(dkey) == SPGroup::LAYER || into_groups)) {
+ s = find_items_in_area(s, SP_GROUP(&o), dkey, area, test, take_insensitive, into_groups);
} else {
- SPItem *child = SP_ITEM(o);
+ SPItem *child = SP_ITEM(&o);
Geom::OptRect box = child->desktopVisualBounds();
if ( box && test(area, *box) && (take_insensitive || child->isVisibleAndUnlocked(dkey))) {
s.push_back(child);
@@ -1328,17 +1328,16 @@ Returns true if an item is among the descendants of group (recursively).
*/
static bool item_is_in_group(SPItem *item, SPGroup *group)
{
- bool inGroup = false;
- for ( SPObject *o = group->firstChild() ; o && !inGroup; o = o->getNext() ) {
- if ( SP_IS_ITEM(o) ) {
- if (SP_ITEM(o) == item) {
- inGroup = true;
- } else if ( SP_IS_GROUP(o) ) {
- inGroup = item_is_in_group(item, SP_GROUP(o));
+ for (auto& o: group->children) {
+ if ( SP_IS_ITEM(&o) ) {
+ if (SP_ITEM(&o) == item) {
+ return true;
+ } else if (SP_IS_GROUP(&o) && item_is_in_group(item, SP_GROUP(&o))) {
+ return true;
}
}
}
- return inGroup;
+ return false;
}
SPItem *SPDocument::getItemFromListAtPointBottom(unsigned int dkey, SPGroup *group, std::vector<SPItem*> const &list,Geom::Point const &p, bool take_insensitive)
@@ -1349,21 +1348,24 @@ SPItem *SPDocument::getItemFromListAtPointBottom(unsigned int dkey, SPGroup *gro
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
gdouble delta = prefs->getDouble("/options/cursortolerance/value", 1.0);
- for ( SPObject *o = group->firstChild() ; o && !bottomMost; o = o->getNext() ) {
- if ( SP_IS_ITEM(o) ) {
- SPItem *item = SP_ITEM(o);
+ for (auto& o: group->children) {
+ if (bottomMost) {
+ break;
+ }
+ if (SP_IS_ITEM(&o)) {
+ SPItem *item = SP_ITEM(&o);
Inkscape::DrawingItem *arenaitem = item->get_arenaitem(dkey);
arenaitem->drawing().update();
if (arenaitem && arenaitem->pick(p, delta, 1) != NULL
&& (take_insensitive || item->isVisibleAndUnlocked(dkey))) {
- if (find(list.begin(),list.end(),item)!=list.end() ) {
+ if (find(list.begin(), list.end(), item) != list.end()) {
bottomMost = item;
}
}
- if ( !bottomMost && SP_IS_GROUP(o) ) {
+ if (!bottomMost && SP_IS_GROUP(&o)) {
// return null if not found:
- bottomMost = getItemFromListAtPointBottom(dkey, SP_GROUP(o), list, p, take_insensitive);
+ bottomMost = getItemFromListAtPointBottom(dkey, SP_GROUP(&o), list, p, take_insensitive);
}
}
}
@@ -1376,15 +1378,15 @@ The list can be persisted, which improves "find at multiple points" speed.
*/
void SPDocument::build_flat_item_list(unsigned int dkey, SPGroup *group, gboolean into_groups) const
{
- for ( SPObject *o = group->firstChild() ; o ; o = o->getNext() ) {
- if (!SP_IS_ITEM(o)) {
+ for (auto& o: group->children) {
+ if (!SP_IS_ITEM(&o)) {
continue;
}
- if (SP_IS_GROUP(o) && (SP_GROUP(o)->effectiveLayerMode(dkey) == SPGroup::LAYER || into_groups)) {
- build_flat_item_list(dkey, SP_GROUP(o), into_groups);
+ if (SP_IS_GROUP(&o) && (SP_GROUP(&o)->effectiveLayerMode(dkey) == SPGroup::LAYER || into_groups)) {
+ build_flat_item_list(dkey, SP_GROUP(&o), into_groups);
} else {
- SPItem *child = SP_ITEM(o);
+ SPItem *child = SP_ITEM(&o);
if (child->isVisibleAndUnlocked(dkey)) {
_node_cache.push_front(child);
@@ -1440,18 +1442,18 @@ static SPItem *find_group_at_point(unsigned int dkey, SPGroup *group, Geom::Poin
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
gdouble delta = prefs->getDouble("/options/cursortolerance/value", 1.0);
- for ( SPObject *o = group->firstChild() ; o ; o = o->getNext() ) {
- if (!SP_IS_ITEM(o)) {
+ for (auto& o: group->children) {
+ if (!SP_IS_ITEM(&o)) {
continue;
}
- if (SP_IS_GROUP(o) && SP_GROUP(o)->effectiveLayerMode(dkey) == SPGroup::LAYER) {
- SPItem *newseen = find_group_at_point(dkey, SP_GROUP(o), p);
+ if (SP_IS_GROUP(&o) && SP_GROUP(&o)->effectiveLayerMode(dkey) == SPGroup::LAYER) {
+ SPItem *newseen = find_group_at_point(dkey, SP_GROUP(&o), p);
if (newseen) {
seen = newseen;
}
}
- if (SP_IS_GROUP(o) && SP_GROUP(o)->effectiveLayerMode(dkey) != SPGroup::LAYER ) {
- SPItem *child = SP_ITEM(o);
+ if (SP_IS_GROUP(&o) && SP_GROUP(&o)->effectiveLayerMode(dkey) != SPGroup::LAYER ) {
+ SPItem *child = SP_ITEM(&o);
Inkscape::DrawingItem *arenaitem = child->get_arenaitem(dkey);
arenaitem->drawing().update();
@@ -1645,8 +1647,8 @@ static unsigned int count_objects_recursive(SPObject *obj, unsigned int count)
{
count++; // obj itself
- for ( SPObject *i = obj->firstChild(); i; i = i->getNext() ) {
- count = count_objects_recursive(i, count);
+ for (auto& i: obj->children) {
+ count = count_objects_recursive(&i, count);
}
return count;
@@ -1671,13 +1673,13 @@ static unsigned int objects_in_document(SPDocument *document)
static void vacuum_document_recursive(SPObject *obj)
{
if (SP_IS_DEFS(obj)) {
- for ( SPObject *def = obj->firstChild(); def; def = def->getNext()) {
+ for (auto& def: obj->children) {
// fixme: some inkscape-internal nodes in the future might not be collectable
- def->requestOrphanCollection();
+ def.requestOrphanCollection();
}
} else {
- for ( SPObject *i = obj->firstChild(); i; i = i->getNext() ) {
- vacuum_document_recursive(i);
+ for (auto& i: obj->children) {
+ vacuum_document_recursive(&i);
}
}
}
@@ -1805,14 +1807,14 @@ void SPDocument::importDefsNode(SPDocument *source, Inkscape::XML::Node *defs, I
// Prevent duplicates of solid swatches by checking if equivalent swatch already exists
if (src && SP_IS_GRADIENT(src)) {
SPGradient *s_gr = SP_GRADIENT(src);
- for (SPObject *trg = this->getDefs()->firstChild() ; trg ; trg = trg->getNext()) {
- if (trg && (src != trg) && SP_IS_GRADIENT(trg)) {
- SPGradient *t_gr = SP_GRADIENT(trg);
+ for (auto& trg: getDefs()->children) {
+ if (&trg && (src != &trg) && SP_IS_GRADIENT(&trg)) {
+ SPGradient *t_gr = SP_GRADIENT(&trg);
if (t_gr && s_gr->isEquivalent(t_gr)) {
// Change object references to the existing equivalent gradient
- Glib::ustring newid = trg->getId();
+ Glib::ustring newid = trg.getId();
if(newid != defid){ // id could be the same if it is a second paste into the same document
- change_def_references(src, trg);
+ change_def_references(src, &trg);
}
gchar *longid = g_strdup_printf("%s_%9.9d", DuplicateDefString.c_str(), stagger++);
def->setAttribute("id", longid );
@@ -1876,9 +1878,9 @@ void SPDocument::importDefsNode(SPDocument *source, Inkscape::XML::Node *defs, I
id.erase( pos );
// Check that it really is a duplicate
- for (SPObject *trg = this->getDefs()->firstChild() ; trg ; trg = trg->getNext()) {
- if( trg && SP_IS_SYMBOL(trg) && src != trg ) {
- std::string id2 = trg->getRepr()->attribute("id");
+ for (auto& trg: getDefs()->children) {
+ if(&trg && SP_IS_SYMBOL(&trg) && src != &trg ) {
+ std::string id2 = trg.getRepr()->attribute("id");
if( !id.compare( id2 ) ) {
duplicate = true;
diff --git a/src/extension/Makefile_insert b/src/extension/Makefile_insert
deleted file mode 100644
index fb9713904..000000000
--- a/src/extension/Makefile_insert
+++ /dev/null
@@ -1,54 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-ink_common_sources += \
- extension/extension.cpp \
- extension/extension.h \
- extension/db.cpp \
- extension/db.h \
- extension/dependency.cpp \
- extension/dependency.h \
- extension/error-file.cpp \
- extension/error-file.h \
- extension/execution-env.cpp \
- extension/execution-env.h \
- extension/init.cpp \
- extension/init.h \
- extension/loader.h \
- extension/loader.cpp \
- extension/param/parameter.h \
- extension/param/parameter.cpp \
- extension/param/notebook.h \
- extension/param/notebook.cpp \
- extension/param/bool.h \
- extension/param/bool.cpp \
- extension/param/color.h \
- extension/param/color.cpp \
- extension/param/description.h \
- extension/param/description.cpp \
- extension/param/enum.h \
- extension/param/enum.cpp \
- extension/param/float.h \
- extension/param/float.cpp \
- extension/param/int.h \
- extension/param/int.cpp \
- extension/param/radiobutton.h \
- extension/param/radiobutton.cpp \
- extension/param/string.h \
- extension/param/string.cpp \
- extension/prefdialog.cpp \
- extension/prefdialog.h \
- extension/system.cpp \
- extension/system.h \
- extension/timer.cpp \
- extension/timer.h \
- extension/input.h \
- extension/input.cpp \
- extension/output.h \
- extension/output.cpp \
- extension/effect.h \
- extension/effect.cpp \
- extension/patheffect.h \
- extension/patheffect.cpp \
- extension/print.h \
- extension/print.cpp
-
diff --git a/src/extension/dbus/Makefile_insert b/src/extension/dbus/Makefile_insert
deleted file mode 100644
index 192651d87..000000000
--- a/src/extension/dbus/Makefile_insert
+++ /dev/null
@@ -1,111 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-if WITH_DBUS
-
-#############################
-# Sources for DBus interface
-#############################
-
-ink_common_sources += \
- extension/dbus/dbus-init.cpp \
- extension/dbus/dbus-init.h \
- extension/dbus/application-interface.cpp \
- extension/dbus/application-interface.h \
- extension/dbus/document-interface.cpp \
- extension/dbus/document-interface.h \
- extension/dbus/org.inkscape.service.in
-
-###########################
-# Build DBus wrapper files
-###########################
-
-extension/dbus/application-server-glue.h: extension/dbus/application-interface.xml
- dbus-binding-tool --mode=glib-server --output=$@ --prefix=application_interface $^
-
-extension/dbus/document-server-glue.h: extension/dbus/document-interface.xml
- dbus-binding-tool --mode=glib-server --output=$@ --prefix=document_interface $^
-
-extension/dbus/document-client-glue.h: extension/dbus/document-interface.xml
- dbus-binding-tool --mode=glib-client --output=$@ --prefix=document_interface $^
-
-BUILT_SOURCES += \
- extension/dbus/application-server-glue.h \
- extension/dbus/document-server-glue.h \
- extension/dbus/document-client-glue.h
-
-###########################
-# Distribut DBus interface
-###########################
-
-EXTRA_DIST += \
- extension/dbus/application-interface.xml \
- extension/dbus/document-interface.xml
-
-###########################
-# DBus Activation Service
-###########################
-
-# Dbus service file
-servicedir = $(DBUSSERVICEDIR)
-service_in_files = extension/dbus/org.inkscape.service.in
-service_DATA = $(service_in_files:.service.in=.service)
-
-# Rule to make the service file with bindir expanded
-$(service_DATA): $(service_in_files) Makefile
- @sed -e "s|bindir|$(prefix)|" $<> $@
-
-############################
-# DBus Interface Helper Lib
-############################
-
-lib_LTLIBRARIES = \
- libinkdbus.la
-
-libinkdbusincludedir = $(includedir)/libinkdbus-0.48/libinkdbus
-libinkdbusinclude_HEADERS = \
- extension/dbus/wrapper/inkscape-dbus-wrapper.h
-
-libinkdbus_la_SOURCES = \
- extension/dbus/wrapper/inkscape-dbus-wrapper.h \
- extension/dbus/wrapper/inkscape-dbus-wrapper.c
-
-libinkdbus_la_LDFLAGS = \
- -version-info 0:0:0 \
- -no-undefined \
- -export-symbols-regex "^[^_d].*"
-
-libinkdbus_la_CFLAGS = \
- $(DBUS_CFLAGS) \
- $(INKSCAPE_CFLAGS) \
- -I$(builddir)/extension/dbus \
- -Wall
-
-libinkdbus_la_LIBADD = \
- $(DBUS_LIBS) \
- $(INKSCAPE_LIBS)
-
-############################
-# DBus Pkgconfig file
-############################
-
-pkgconfig_DATA = extension/dbus/wrapper/inkdbus.pc
-pkgconfigdir = $(libdir)/pkgconfig
-
-else # WITH_DBUS
-
-EXTRA_DIST += \
- extension/dbus/dbus-init.cpp \
- extension/dbus/dbus-init.h \
- extension/dbus/application-interface.cpp \
- extension/dbus/application-interface.h \
- extension/dbus/document-interface.cpp \
- extension/dbus/document-interface.h \
- extension/dbus/wrapper/inkscape-dbus-wrapper.h \
- extension/dbus/wrapper/inkscape-dbus-wrapper.c \
- extension/dbus/wrapper/inkdbus.pc \
- extension/dbus/org.inkscape.service.in \
- extension/dbus/application-interface.xml \
- extension/dbus/document-interface.xml
-
-endif
-
diff --git a/src/extension/dbus/document-interface.cpp b/src/extension/dbus/document-interface.cpp
index d0a2e81aa..5a8fb0918 100644
--- a/src/extension/dbus/document-interface.cpp
+++ b/src/extension/dbus/document-interface.cpp
@@ -189,7 +189,7 @@ selection_get_center_y (Inkscape::Selection *sel){
std::vector<SPObject*>
selection_swap(Inkscape::Selection *sel, gchar *name, GError **error)
{
- std::vector<SPObject*> oldsel = sel->list();
+ std::vector<SPObject*> oldsel = std::vector<SPObject*>(sel->objects().begin(), sel->objects().end());
sel->set(get_object_by_name(sel->layers()->getDocument(), name, error));
return oldsel;
@@ -1087,14 +1087,14 @@ void document_interface_update(DocumentInterface *doc_interface, GError ** error
gboolean document_interface_selection_get(DocumentInterface *doc_interface, char ***out, GError ** /*error*/)
{
Inkscape::Selection * sel = doc_interface->target.getSelection();
- std::vector<SPObject*> oldsel = sel->list();
+ auto oldsel = sel->objects();
int size = oldsel.size();
*out = g_new0 (char *, size + 1);
int i = 0;
- for (std::vector<SPObject*>::iterator iter = oldsel.begin(), e = oldsel.end(); iter != e; ++iter) {
+ for (auto iter = oldsel.begin(); iter != oldsel.end(); ++iter) {
(*out)[i] = g_strdup((*iter)->getId());
i++;
}
@@ -1252,7 +1252,7 @@ gboolean document_interface_selection_move_to(DocumentInterface *doc_interface,
Geom::OptRect sel_bbox = sel->visualBounds();
if (sel_bbox) {
Geom::Point m( x - selection_get_center_x(sel) , 0 - (y - selection_get_center_y(sel)) );
- sp_selection_move_relative(sel, m, true);
+ sp_object_set_move_relative(sel, m, true);
}
return TRUE;
}
diff --git a/src/extension/error-file.cpp b/src/extension/error-file.cpp
index 9ec643759..342511ec9 100644
--- a/src/extension/error-file.cpp
+++ b/src/extension/error-file.cpp
@@ -56,11 +56,7 @@ ErrorFileNotice::ErrorFileNotice (void) :
g_free(ext_error_file);
set_message(dialog_text, true);
-#if WITH_GTKMM_3_0
- Gtk::Box * vbox = get_content_area();
-#else
- Gtk::Box * vbox = get_vbox();
-#endif
+ auto vbox = get_content_area();
/* This is some filler text, needs to change before relase */
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
diff --git a/src/extension/execution-env.cpp b/src/extension/execution-env.cpp
index 569e2c762..624813863 100644
--- a/src/extension/execution-env.cpp
+++ b/src/extension/execution-env.cpp
@@ -55,8 +55,8 @@ ExecutionEnv::ExecutionEnv (Effect * effect, Inkscape::UI::View::View * doc, Imp
sp_namedview_document_from_window(desktop);
if (desktop != NULL) {
- std::vector<SPItem*> selected = desktop->getSelection()->itemList();
- for(std::vector<SPItem*>::const_iterator x = selected.begin(); x != selected.end(); ++x){
+ auto selected = desktop->getSelection()->items();
+ for(auto x = selected.begin(); x != selected.end(); ++x){
Glib::ustring selected_id;
selected_id = (*x)->getId();
_selected.insert(_selected.end(), selected_id);
diff --git a/src/extension/extension.cpp b/src/extension/extension.cpp
index 56ff0a5f4..c6dee1b70 100644
--- a/src/extension/extension.cpp
+++ b/src/extension/extension.cpp
@@ -22,12 +22,7 @@
#include <gtkmm/box.h>
#include <gtkmm/label.h>
#include <gtkmm/frame.h>
-
-#if WITH_GTKMM_3_0
-# include <gtkmm/grid.h>
-#else
-# include <gtkmm/table.h>
-#endif
+#include <gtkmm/grid.h>
#include <glibmm/i18n.h>
#include "inkscape.h"
@@ -766,11 +761,7 @@ Extension::get_info_widget(void)
Gtk::Frame * info = Gtk::manage(new Gtk::Frame("General Extension Information"));
retval->pack_start(*info, true, true, 5);
-#if WITH_GTKMM_3_0
- Gtk::Grid * table = Gtk::manage(new Gtk::Grid());
-#else
- Gtk::Table * table = Gtk::manage(new Gtk::Table());
-#endif
+ auto table = Gtk::manage(new Gtk::Grid());
info->add(*table);
@@ -784,11 +775,7 @@ Extension::get_info_widget(void)
return retval;
}
-#if WITH_GTKMM_3_0
void Extension::add_val(Glib::ustring labelstr, Glib::ustring valuestr, Gtk::Grid * table, int * row)
-#else
-void Extension::add_val(Glib::ustring labelstr, Glib::ustring valuestr, Gtk::Table * table, int * row)
-#endif
{
Gtk::Label * label;
Gtk::Label * value;
@@ -797,13 +784,8 @@ void Extension::add_val(Glib::ustring labelstr, Glib::ustring valuestr, Gtk::Tab
label = Gtk::manage(new Gtk::Label(labelstr));
value = Gtk::manage(new Gtk::Label(valuestr));
-#if WITH_GTKMM_3_0
table->attach(*label, 0, (*row) - 1, 1, 1);
table->attach(*value, 1, (*row) - 1, 1, 1);
-#else
- table->attach(*label, 0, 1, (*row) - 1, *row);
- table->attach(*value, 1, 2, (*row) - 1, *row);
-#endif
label->show();
value->show();
diff --git a/src/extension/extension.h b/src/extension/extension.h
index 1fb8bdfec..cd29e1636 100644
--- a/src/extension/extension.h
+++ b/src/extension/extension.h
@@ -22,12 +22,7 @@
#include <sigc++/signal.h>
namespace Gtk {
-#if WITH_GTKMM_3_0
class Grid;
-#else
- class Table;
-#endif
-
class VBox;
class Widget;
}
@@ -300,11 +295,7 @@ public:
Gtk::VBox * get_help_widget(void);
Gtk::VBox * get_params_widget(void);
protected:
-#if WITH_GTKMM_3_0
inline static void add_val(Glib::ustring labelstr, Glib::ustring valuestr, Gtk::Grid * table, int * row);
-#else
- inline static void add_val(Glib::ustring labelstr, Glib::ustring valuestr, Gtk::Table * table, int * row);
-#endif
};
diff --git a/src/extension/implementation/Makefile_insert b/src/extension/implementation/Makefile_insert
deleted file mode 100644
index 1b9080f1a..000000000
--- a/src/extension/implementation/Makefile_insert
+++ /dev/null
@@ -1,9 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-ink_common_sources += \
- extension/implementation/implementation.cpp \
- extension/implementation/implementation.h \
- extension/implementation/script.cpp \
- extension/implementation/script.h \
- extension/implementation/xslt.cpp \
- extension/implementation/xslt.h
diff --git a/src/extension/implementation/implementation.cpp b/src/extension/implementation/implementation.cpp
index 995d3d9ad..6e6100d2b 100644
--- a/src/extension/implementation/implementation.cpp
+++ b/src/extension/implementation/implementation.cpp
@@ -45,10 +45,10 @@ Gtk::Widget *Implementation::prefs_effect(Inkscape::Extension::Effect *module, I
SPDocument * current_document = view->doc();
- std::vector<SPItem*> selected = ((SPDesktop *)view)->getSelection()->itemList();
+ auto selected = ((SPDesktop *) view)->getSelection()->items();
Inkscape::XML::Node const* first_select = NULL;
if (!selected.empty()) {
- const SPItem * item = selected[0];
+ const SPItem * item = selected.front();
first_select = item->getRepr();
}
diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp
index 01323bee2..d2319c2e0 100644
--- a/src/extension/implementation/script.cpp
+++ b/src/extension/implementation/script.cpp
@@ -689,9 +689,9 @@ void Script::effect(Inkscape::Extension::Effect *module,
return;
}
- std::vector<SPItem*> selected =
- desktop->getSelection()->itemList(); //desktop should not be NULL since doc was checked and desktop is a casted pointer
- for(std::vector<SPItem*>::const_iterator x = selected.begin(); x != selected.end(); ++x){
+ auto selected =
+ desktop->getSelection()->items(); //desktop should not be NULL since doc was checked and desktop is a casted pointer
+ for(auto x = selected.begin(); x != selected.end(); ++x){
Glib::ustring selected_id;
selected_id += "--id=";
selected_id += (*x)->getId();
@@ -942,11 +942,7 @@ void Script::checkStderr (const Glib::ustring &data,
GtkWidget *dlg = GTK_WIDGET(warning.gobj());
sp_transientize(dlg);
-#if WITH_GTKMM_3_0
- Gtk::Box * vbox = warning.get_content_area();
-#else
- Gtk::Box * vbox = warning.get_vbox();
-#endif
+ auto vbox = warning.get_content_area();
/* Gtk::TextView * textview = new Gtk::TextView(Gtk::TextBuffer::create()); */
Gtk::TextView * textview = new Gtk::TextView();
diff --git a/src/extension/internal/Makefile_insert b/src/extension/internal/Makefile_insert
deleted file mode 100644
index 125776d41..000000000
--- a/src/extension/internal/Makefile_insert
+++ /dev/null
@@ -1,173 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-if WITH_LIBWPG
-ink_common_sources += \
- extension/internal/wpg-input.cpp \
- extension/internal/wpg-input.h
-endif
-
-if WITH_LIBVISIO
-ink_common_sources += \
- extension/internal/vsd-input.cpp \
- extension/internal/vsd-input.h
-endif
-
-if WITH_LIBCDR
-ink_common_sources += \
- extension/internal/cdr-input.cpp \
- extension/internal/cdr-input.h
-endif
-
-if USE_IMAGE_MAGICK
-ink_common_sources += \
- extension/internal/bitmap/imagemagick.cpp \
- extension/internal/bitmap/imagemagick.h \
- extension/internal/bitmap/adaptiveThreshold.cpp \
- extension/internal/bitmap/adaptiveThreshold.h \
- extension/internal/bitmap/addNoise.cpp \
- extension/internal/bitmap/addNoise.h \
- extension/internal/bitmap/blur.cpp \
- extension/internal/bitmap/blur.h \
- extension/internal/bitmap/channel.cpp \
- extension/internal/bitmap/channel.h \
- extension/internal/bitmap/charcoal.cpp \
- extension/internal/bitmap/charcoal.h \
- extension/internal/bitmap/colorize.cpp \
- extension/internal/bitmap/colorize.h \
- extension/internal/bitmap/contrast.cpp \
- extension/internal/bitmap/contrast.h \
- extension/internal/bitmap/crop.cpp \
- extension/internal/bitmap/crop.h \
- extension/internal/bitmap/cycleColormap.cpp \
- extension/internal/bitmap/cycleColormap.h \
- extension/internal/bitmap/despeckle.cpp \
- extension/internal/bitmap/despeckle.h \
- extension/internal/bitmap/edge.cpp \
- extension/internal/bitmap/edge.h \
- extension/internal/bitmap/emboss.cpp \
- extension/internal/bitmap/emboss.h \
- extension/internal/bitmap/enhance.cpp \
- extension/internal/bitmap/enhance.h \
- extension/internal/bitmap/equalize.cpp \
- extension/internal/bitmap/equalize.h \
- extension/internal/bitmap/gaussianBlur.cpp \
- extension/internal/bitmap/gaussianBlur.h \
- extension/internal/bitmap/implode.cpp \
- extension/internal/bitmap/implode.h \
- extension/internal/bitmap/level.cpp \
- extension/internal/bitmap/level.h \
- extension/internal/bitmap/levelChannel.cpp \
- extension/internal/bitmap/levelChannel.h \
- extension/internal/bitmap/medianFilter.cpp \
- extension/internal/bitmap/medianFilter.h \
- extension/internal/bitmap/modulate.cpp \
- extension/internal/bitmap/modulate.h \
- extension/internal/bitmap/negate.cpp \
- extension/internal/bitmap/negate.h \
- extension/internal/bitmap/normalize.cpp \
- extension/internal/bitmap/normalize.h \
- extension/internal/bitmap/oilPaint.cpp \
- extension/internal/bitmap/oilPaint.h \
- extension/internal/bitmap/opacity.cpp \
- extension/internal/bitmap/opacity.h \
- extension/internal/bitmap/raise.cpp \
- extension/internal/bitmap/raise.h \
- extension/internal/bitmap/reduceNoise.cpp \
- extension/internal/bitmap/reduceNoise.h \
- extension/internal/bitmap/sample.cpp \
- extension/internal/bitmap/sample.h \
- extension/internal/bitmap/shade.cpp \
- extension/internal/bitmap/shade.h \
- extension/internal/bitmap/sharpen.cpp \
- extension/internal/bitmap/sharpen.h \
- extension/internal/bitmap/solarize.cpp \
- extension/internal/bitmap/solarize.h \
- extension/internal/bitmap/spread.cpp \
- extension/internal/bitmap/spread.h \
- extension/internal/bitmap/swirl.cpp \
- extension/internal/bitmap/swirl.h \
- extension/internal/bitmap/threshold.cpp \
- extension/internal/bitmap/threshold.h \
- extension/internal/bitmap/unsharpmask.cpp \
- extension/internal/bitmap/unsharpmask.h \
- extension/internal/bitmap/wave.cpp \
- extension/internal/bitmap/wave.h
-endif
-
-ink_common_sources += \
- extension/internal/bluredge.h \
- extension/internal/bluredge.cpp \
- extension/internal/clear-n_.h \
- extension/internal/grid.h \
- extension/internal/grid.cpp \
- extension/internal/gimpgrad.h \
- extension/internal/gimpgrad.cpp \
- extension/internal/svg.h \
- extension/internal/svg.cpp \
- extension/internal/svgz.h \
- extension/internal/svgz.cpp \
- extension/internal/cairo-ps-out.h \
- extension/internal/cairo-ps-out.cpp \
- extension/internal/cairo-render-context.h \
- extension/internal/cairo-render-context.cpp \
- extension/internal/cairo-renderer.h \
- extension/internal/cairo-renderer.cpp \
- extension/internal/cairo-renderer-pdf-out.h \
- extension/internal/cairo-renderer-pdf-out.cpp \
- extension/internal/cairo-png-out.h \
- extension/internal/cairo-png-out.cpp \
- extension/internal/javafx-out.cpp \
- extension/internal/javafx-out.h \
- extension/internal/gdkpixbuf-input.h \
- extension/internal/gdkpixbuf-input.cpp \
- extension/internal/latex-text-renderer.h \
- extension/internal/latex-text-renderer.cpp \
- extension/internal/pdfinput/svg-builder.h \
- extension/internal/pdfinput/svg-builder.cpp \
- extension/internal/pdfinput/pdf-parser.h \
- extension/internal/pdfinput/pdf-parser.cpp \
- extension/internal/pdfinput/pdf-input.h \
- extension/internal/pdfinput/pdf-input.cpp \
- extension/internal/pov-out.cpp \
- extension/internal/pov-out.h \
- extension/internal/odf.cpp \
- extension/internal/odf.h \
- extension/internal/latex-pstricks.cpp \
- extension/internal/latex-pstricks.h \
- extension/internal/latex-pstricks-out.cpp \
- extension/internal/latex-pstricks-out.h \
- extension/internal/filter/bevels.h \
- extension/internal/filter/blurs.h \
- extension/internal/filter/bumps.h \
- extension/internal/filter/color.h \
- extension/internal/filter/distort.h \
- extension/internal/filter/filter.h \
- extension/internal/filter/image.h \
- extension/internal/filter/morphology.h \
- extension/internal/filter/overlays.h \
- extension/internal/filter/paint.h \
- extension/internal/filter/protrusions.h \
- extension/internal/filter/shadows.h \
- extension/internal/filter/textures.h \
- extension/internal/filter/transparency.h \
- extension/internal/filter/filter-all.cpp \
- extension/internal/filter/filter-file.cpp \
- extension/internal/filter/filter.cpp \
- extension/internal/filter/filter.h \
- extension/internal/text_reassemble.c \
- extension/internal/text_reassemble.h \
- extension/internal/emf-print.h \
- extension/internal/emf-print.cpp \
- extension/internal/emf-inout.h \
- extension/internal/emf-inout.cpp \
- extension/internal/metafile-inout.h \
- extension/internal/metafile-inout.cpp \
- extension/internal/metafile-print.h \
- extension/internal/metafile-print.cpp \
- extension/internal/wmf-print.h \
- extension/internal/wmf-print.cpp \
- extension/internal/wmf-inout.h \
- extension/internal/wmf-inout.cpp \
- extension/internal/image-resolution.h \
- extension/internal/image-resolution.cpp
-
diff --git a/src/extension/internal/bitmap/imagemagick.cpp b/src/extension/internal/bitmap/imagemagick.cpp
index a235dcb0f..472c2db91 100644
--- a/src/extension/internal/bitmap/imagemagick.cpp
+++ b/src/extension/internal/bitmap/imagemagick.cpp
@@ -65,8 +65,8 @@ ImageMagickDocCache::ImageMagickDocCache(Inkscape::UI::View::View * view) :
_imageItems(NULL)
{
SPDesktop *desktop = (SPDesktop*)view;
- const std::vector<SPItem*> selectedItemList = desktop->selection->itemList();
- int selectCount = selectedItemList.size();
+ auto selectedItemList = desktop->selection->items();
+ int selectCount = (int) boost::distance(selectedItemList);
// Init the data-holders
_nodes = new Inkscape::XML::Node*[selectCount];
@@ -78,7 +78,7 @@ ImageMagickDocCache::ImageMagickDocCache(Inkscape::UI::View::View * view) :
_imageItems = new SPItem*[selectCount];
// Loop through selected items
- for (std::vector<SPItem*>::const_iterator i = selectedItemList.begin(); i != selectedItemList.end(); ++i) {
+ for (auto i = selectedItemList.begin(); i != selectedItemList.end(); ++i) {
SPItem *item = *i;
Inkscape::XML::Node *node = reinterpret_cast<Inkscape::XML::Node *>(item->getRepr());
if (!strcmp(node->name(), "image") || !strcmp(node->name(), "svg:image"))
@@ -235,7 +235,7 @@ ImageMagick::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::Vie
{
SPDocument * current_document = view->doc();
- std::vector<SPItem*> selected = ((SPDesktop *)view)->getSelection()->itemList();
+ auto selected = ((SPDesktop *) view)->getSelection()->items();
Inkscape::XML::Node * first_select = NULL;
if (!selected.empty()) {
first_select = (selected.front())->getRepr();
diff --git a/src/extension/internal/bluredge.cpp b/src/extension/internal/bluredge.cpp
index 4a04e3c33..4f66b39fc 100644
--- a/src/extension/internal/bluredge.cpp
+++ b/src/extension/internal/bluredge.cpp
@@ -62,7 +62,7 @@ BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View
double old_offset = prefs->getDouble("/options/defaultoffsetwidth/value", 1.0, "px");
// TODO need to properly refcount the items, at least
- std::vector<SPItem*> items(selection->itemList());
+ std::vector<SPItem*> items(selection->items().begin(), selection->items().end());
selection->clear();
for(std::vector<SPItem*>::iterator item = items.begin();
diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp
index 5d8b0e076..1310bb343 100644
--- a/src/extension/internal/cairo-render-context.cpp
+++ b/src/extension/internal/cairo-render-context.cpp
@@ -986,13 +986,12 @@ void CairoRenderContext::popState(void)
static bool pattern_hasItemChildren(SPPattern *pat)
{
- bool hasItems = false;
- for ( SPObject *child = pat->firstChild() ; child && !hasItems; child = child->getNext() ) {
- if (SP_IS_ITEM (child)) {
- hasItems = true;
+ for (auto& child: pat->children) {
+ if (SP_IS_ITEM (&child)) {
+ return true;
}
}
- return hasItems;
+ return false;
}
cairo_pattern_t*
@@ -1087,10 +1086,10 @@ CairoRenderContext::_createPatternPainter(SPPaintServer const *const paintserver
// show items and render them
for (SPPattern *pat_i = pat; pat_i != NULL; pat_i = pat_i->ref ? pat_i->ref->getObject() : NULL) {
if (pat_i && SP_IS_OBJECT(pat_i) && pattern_hasItemChildren(pat_i)) { // find the first one with item children
- for ( SPObject *child = pat_i->firstChild() ; child; child = child->getNext() ) {
- if (SP_IS_ITEM(child)) {
- SP_ITEM(child)->invoke_show(drawing, dkey, SP_ITEM_REFERENCE_FLAGS);
- _renderer->renderItem(pattern_ctx, SP_ITEM(child));
+ for (auto& child: pat_i->children) {
+ if (SP_IS_ITEM(&child)) {
+ SP_ITEM(&child)->invoke_show(drawing, dkey, SP_ITEM_REFERENCE_FLAGS);
+ _renderer->renderItem(pattern_ctx, SP_ITEM(&child));
}
}
break; // do not go further up the chain if children are found
@@ -1116,9 +1115,9 @@ CairoRenderContext::_createPatternPainter(SPPaintServer const *const paintserver
// hide all items
for (SPPattern *pat_i = pat; pat_i != NULL; pat_i = pat_i->ref ? pat_i->ref->getObject() : NULL) {
if (pat_i && SP_IS_OBJECT(pat_i) && pattern_hasItemChildren(pat_i)) { // find the first one with item children
- for ( SPObject *child = pat_i->firstChild() ; child; child = child->getNext() ) {
- if (SP_IS_ITEM(child)) {
- SP_ITEM(child)->invoke_hide(dkey);
+ for (auto& child: pat_i->children) {
+ if (SP_IS_ITEM(&child)) {
+ SP_ITEM(&child)->invoke_hide(dkey);
}
}
break; // do not go further up the chain if children are found
diff --git a/src/extension/internal/cairo-renderer.cpp b/src/extension/internal/cairo-renderer.cpp
index 5dc20ab06..cd96a7f58 100644
--- a/src/extension/internal/cairo-renderer.cpp
+++ b/src/extension/internal/cairo-renderer.cpp
@@ -741,8 +741,8 @@ CairoRenderer::applyClipPath(CairoRenderContext *ctx, SPClipPath const *cp)
TRACE(("BEGIN clip\n"));
SPObject const *co = cp;
- for ( SPObject const *child = co->firstChild() ; child; child = child->getNext() ) {
- SPItem const *item = dynamic_cast<SPItem const *>(child);
+ for (auto& child: co->children) {
+ SPItem const *item = dynamic_cast<SPItem const *>(&child);
if (item) {
// combine transform of the item in clippath and the item using clippath:
@@ -800,8 +800,8 @@ CairoRenderer::applyMask(CairoRenderContext *ctx, SPMask const *mask)
TRACE(("BEGIN mask\n"));
SPObject const *co = mask;
- for ( SPObject const *child = co->firstChild() ; child; child = child->getNext() ) {
- SPItem const *item = dynamic_cast<SPItem const *>(child);
+ for (auto& child: co->children) {
+ SPItem const *item = dynamic_cast<SPItem const *>(&child);
if (item) {
// TODO fix const correctness:
renderItem(ctx, const_cast<SPItem*>(item));
diff --git a/src/extension/internal/cdr-input.cpp b/src/extension/internal/cdr-input.cpp
index a26af2078..b94b6d019 100644
--- a/src/extension/internal/cdr-input.cpp
+++ b/src/extension/internal/cdr-input.cpp
@@ -111,11 +111,7 @@ CdrImportDialog::CdrImportDialog(const std::vector<RVNGString> &vec)
_previewArea = Gtk::manage(new class Gtk::VBox());
vbox1 = Gtk::manage(new class Gtk::VBox());
vbox1->pack_start(*_previewArea, Gtk::PACK_EXPAND_WIDGET, 0);
-#if WITH_GTKMM_3_0
this->get_content_area()->pack_start(*vbox1);
-#else
- this->get_vbox()->pack_start(*vbox1);
-#endif
// CONTROLS
@@ -137,13 +133,8 @@ CdrImportDialog::CdrImportDialog(const std::vector<RVNGString> &vec)
g_free(label_text);
// Adjustment + spinner
-#if WITH_GTKMM_3_0
- Glib::RefPtr<Gtk::Adjustment> _pageNumberSpin_adj = Gtk::Adjustment::create(1, 1, _vec.size(), 1, 10, 0);
+ auto _pageNumberSpin_adj = Gtk::Adjustment::create(1, 1, _vec.size(), 1, 10, 0);
_pageNumberSpin = Gtk::manage(new Gtk::SpinButton(_pageNumberSpin_adj, 1, 0));
-#else
- Gtk::Adjustment *_pageNumberSpin_adj = Gtk::manage(new class Gtk::Adjustment(1, 1, _vec.size(), 1, 10, 0));
- _pageNumberSpin = Gtk::manage(new Gtk::SpinButton(*_pageNumberSpin_adj, 1, 0));
-#endif
_pageNumberSpin->set_can_focus();
_pageNumberSpin->set_update_policy(Gtk::UPDATE_ALWAYS);
_pageNumberSpin->set_numeric(true);
diff --git a/src/extension/internal/emf-print.cpp b/src/extension/internal/emf-print.cpp
index 9f3b5475f..d4c5d95a3 100644
--- a/src/extension/internal/emf-print.cpp
+++ b/src/extension/internal/emf-print.cpp
@@ -1042,8 +1042,12 @@ void PrintEmf::do_clip_if_present(SPStyle const *style){
/* find the clipping path */
Geom::PathVector combined_pathvector;
Geom::Affine tfc; // clipping transform, generally not the same as item transform
- for(item = SP_ITEM(scp->firstChild()); item; item=SP_ITEM(item->getNext())){
- if (SP_IS_GROUP(item)) { // not implemented
+ for (auto& child: scp->children) {
+ item = SP_ITEM(&child);
+ if (!item) {
+ break;
+ }
+ if (SP_IS_GROUP(item)) { // not implemented
// return sp_group_render(item);
combined_pathvector = merge_PathVector_with_group(combined_pathvector, item, tfc);
} else if (SP_IS_SHAPE(item)) {
@@ -1081,7 +1085,11 @@ Geom::PathVector PrintEmf::merge_PathVector_with_group(Geom::PathVector const &c
new_combined_pathvector = combined_pathvector;
SPGroup *group = SP_GROUP(item);
Geom::Affine tfc = item->transform * transform;
- for(SPItem *item = SP_ITEM(group->firstChild()); item; item=SP_ITEM(item->getNext())){
+ for (auto& child: group->children) {
+ item = SP_ITEM(&child);
+ if (!item) {
+ break;
+ }
if (SP_IS_GROUP(item)) {
new_combined_pathvector = merge_PathVector_with_group(new_combined_pathvector, item, tfc); // could be endlessly recursive on a badly formed SVG
} else if (SP_IS_SHAPE(item)) {
diff --git a/src/extension/internal/filter/filter.cpp b/src/extension/internal/filter/filter.cpp
index 25e89bbf3..0907845f8 100644
--- a/src/extension/internal/filter/filter.cpp
+++ b/src/extension/internal/filter/filter.cpp
@@ -125,7 +125,7 @@ void Filter::effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::Vie
Inkscape::Selection * selection = ((SPDesktop *)document)->selection;
// TODO need to properly refcount the items, at least
- std::vector<SPItem*> items(selection->itemList());
+ std::vector<SPItem*> items(selection->items().begin(), selection->items().end());
Inkscape::XML::Document * xmldoc = document->doc()->getReprDoc();
Inkscape::XML::Node * defsrepr = document->doc()->getDefs()->getRepr();
diff --git a/src/extension/internal/grid.cpp b/src/extension/internal/grid.cpp
index c766bd828..9e730f5e5 100644
--- a/src/extension/internal/grid.cpp
+++ b/src/extension/internal/grid.cpp
@@ -180,10 +180,10 @@ Grid::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View
{
SPDocument * current_document = view->doc();
- std::vector<SPItem*> selected = ((SPDesktop *)view)->getSelection()->itemList();
+ auto selected = ((SPDesktop *) view)->getSelection()->items();
Inkscape::XML::Node * first_select = NULL;
if (!selected.empty()) {
- first_select = selected[0]->getRepr();
+ first_select = selected.front()->getRepr();
}
return module->autogui(current_document, first_select, changeSignal);
diff --git a/src/extension/internal/javafx-out.cpp b/src/extension/internal/javafx-out.cpp
index 386bde1d6..d7ad7e6f7 100644
--- a/src/extension/internal/javafx-out.cpp
+++ b/src/extension/internal/javafx-out.cpp
@@ -732,9 +732,9 @@ bool JavaFXOutput::doTreeRecursive(SPDocument *doc, SPObject *obj)
/**
* Descend into children
*/
- for (SPObject *child = obj->firstChild() ; child ; child = child->next)
+ for (auto &child: obj->children)
{
- if (!doTreeRecursive(doc, child)) {
+ if (!doTreeRecursive(doc, &child)) {
return false;
}
}
@@ -804,9 +804,9 @@ bool JavaFXOutput::doBody(SPDocument *doc, SPObject *obj)
/**
* Descend into children
*/
- for (SPObject *child = obj->firstChild() ; child ; child = child->next)
+ for (auto &child: obj->children)
{
- if (!doBody(doc, child)) {
+ if (!doBody(doc, &child)) {
return false;
}
}
diff --git a/src/extension/internal/metafile-print.cpp b/src/extension/internal/metafile-print.cpp
index 47ba5971c..061eb634d 100644
--- a/src/extension/internal/metafile-print.cpp
+++ b/src/extension/internal/metafile-print.cpp
@@ -293,20 +293,22 @@ void PrintMetafile::brush_classify(SPObject *parent, int depth, Inkscape::Pixbuf
}
// still looking? Look at this pattern's children, if there are any
- SPObject *child = pat_i->firstChild();
- while (child && !(*epixbuf) && (*hatchType == -1)) {
- brush_classify(child, depth, epixbuf, hatchType, hatchColor, bkColor);
- child = child->getNext();
+ for (auto& child: pat_i->children) {
+ if (*epixbuf || *hatchType != -1) {
+ break;
+ }
+ brush_classify(&child, depth, epixbuf, hatchType, hatchColor, bkColor);
}
}
} else if (SP_IS_IMAGE(parent)) {
*epixbuf = ((SPImage *)parent)->pixbuf;
return;
} else { // some inkscape rearrangements pass through nodes between pattern and image which are not classified as either.
- SPObject *child = parent->firstChild();
- while (child && !(*epixbuf) && (*hatchType == -1)) {
- brush_classify(child, depth, epixbuf, hatchType, hatchColor, bkColor);
- child = child->getNext();
+ for (auto& child: parent->children) {
+ if (*epixbuf || *hatchType != -1) {
+ break;
+ }
+ brush_classify(&child, depth, epixbuf, hatchType, hatchColor, bkColor);
}
}
}
diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp
index c1940b16a..0c22fa399 100644
--- a/src/extension/internal/pdfinput/pdf-input.cpp
+++ b/src/extension/internal/pdfinput/pdf-input.cpp
@@ -39,10 +39,8 @@
#include <gtkmm/radiobutton.h>
#include <gtkmm/scale.h>
-#if WITH_GTKMM_3_0
#include <glibmm/convert.h>
#include <glibmm/miscutils.h>
-#endif
#include "extension/system.h"
#include "extension/input.h"
@@ -92,14 +90,8 @@ PdfImportDialog::PdfImportDialog(PDFDoc *doc, const gchar */*uri*/)
_labelSelect = Gtk::manage(new class Gtk::Label(_("Select page:")));
// Page number
-#if WITH_GTKMM_3_0
- Glib::RefPtr<Gtk::Adjustment> _pageNumberSpin_adj = Gtk::Adjustment::create(1, 1, _pdf_doc->getNumPages(), 1, 10, 0);
+ auto _pageNumberSpin_adj = Gtk::Adjustment::create(1, 1, _pdf_doc->getNumPages(), 1, 10, 0);
_pageNumberSpin = Gtk::manage(new Inkscape::UI::Widget::SpinButton(_pageNumberSpin_adj, 1, 1));
-#else
- Gtk::Adjustment *_pageNumberSpin_adj = Gtk::manage(
- new class Gtk::Adjustment(1, 1, _pdf_doc->getNumPages(), 1, 10, 0));
- _pageNumberSpin = Gtk::manage(new class Inkscape::UI::Widget::SpinButton(*_pageNumberSpin_adj, 1, 1));
-#endif
_labelTotalPages = Gtk::manage(new class Gtk::Label());
hbox2 = Gtk::manage(new class Gtk::HBox(false, 0));
// Disable the page selector when there's only one page
@@ -137,13 +129,8 @@ PdfImportDialog::PdfImportDialog(PDFDoc *doc, const gchar */*uri*/)
_labelViaInternal = Gtk::manage(new class Gtk::Label(_("Import via internal (Poppler derived) library. Text is stored as text but white space is missing. Meshes are converted to tiles, the number depends on the precision set below.")));
#endif
-#if WITH_GTKMM_3_0
_fallbackPrecisionSlider_adj = Gtk::Adjustment::create(2, 1, 256, 1, 10, 10);
_fallbackPrecisionSlider = Gtk::manage(new class Gtk::Scale(_fallbackPrecisionSlider_adj));
-#else
- _fallbackPrecisionSlider_adj = Gtk::manage(new class Gtk::Adjustment(2, 1, 256, 1, 10, 10));
- _fallbackPrecisionSlider = Gtk::manage(new class Gtk::HScale(*_fallbackPrecisionSlider_adj));
-#endif
_fallbackPrecisionSlider->set_value(2.0);
_labelPrecisionComment = Gtk::manage(new class Gtk::Label(_("rough")));
hbox6 = Gtk::manage(new class Gtk::HBox(false, 4));
@@ -278,15 +265,9 @@ PdfImportDialog::PdfImportDialog(PDFDoc *doc, const gchar */*uri*/)
hbox1->pack_start(*vbox1);
hbox1->pack_start(*_previewArea, Gtk::PACK_EXPAND_WIDGET, 4);
-#if WITH_GTKMM_3_0
get_content_area()->set_homogeneous(false);
get_content_area()->set_spacing(0);
get_content_area()->pack_start(*hbox1);
-#else
- this->get_vbox()->set_homogeneous(false);
- this->get_vbox()->set_spacing(0);
- this->get_vbox()->pack_start(*hbox1);
-#endif
this->set_title(_("PDF Import Settings"));
this->set_modal(true);
@@ -300,12 +281,7 @@ PdfImportDialog::PdfImportDialog(PDFDoc *doc, const gchar */*uri*/)
this->show_all();
// Connect signals
-#if WITH_GTKMM_3_0
_previewArea->signal_draw().connect(sigc::mem_fun(*this, &PdfImportDialog::_onDraw));
-#else
- _previewArea->signal_expose_event().connect(sigc::mem_fun(*this, &PdfImportDialog::_onExposePreview));
-#endif
-
_pageNumberSpin_adj->signal_value_changed().connect(sigc::mem_fun(*this, &PdfImportDialog::_onPageNumberChanged));
_cropCheck->signal_toggled().connect(sigc::mem_fun(*this, &PdfImportDialog::_onToggleCropping));
_fallbackPrecisionSlider_adj->signal_value_changed().connect(sigc::mem_fun(*this, &PdfImportDialog::_onPrecisionChanged));
@@ -527,16 +503,6 @@ static void copy_cairo_surface_to_pixbuf (cairo_surface_t *surface,
#endif
-/**
- * \brief Updates the preview area with the previously rendered thumbnail
- */
-#if !WITH_GTKMM_3_0
-bool PdfImportDialog::_onExposePreview(GdkEventExpose * /*event*/) {
- Cairo::RefPtr<Cairo::Context> cr = _previewArea->get_window()->create_cairo_context();
- return _onDraw(cr);
-}
-#endif
-
bool PdfImportDialog::_onDraw(const Cairo::RefPtr<Cairo::Context>& cr) {
// Check if we have a thumbnail at all
if (!_thumb_data) {
diff --git a/src/extension/internal/pdfinput/pdf-input.h b/src/extension/internal/pdfinput/pdf-input.h
index 6e36603c3..c338207c1 100644
--- a/src/extension/internal/pdfinput/pdf-input.h
+++ b/src/extension/internal/pdfinput/pdf-input.h
@@ -39,11 +39,7 @@ namespace Gtk {
class DrawingArea;
class Frame;
class HBox;
-#if WITH_GTKMM_3_0
class Scale;
-#else
- class HScale;
-#endif
class RadioButton;
class VBox;
class Label;
@@ -79,10 +75,6 @@ private:
void _setPreviewPage(int page);
// Signal handlers
-#if !WITH_GTKMM_3_0
- bool _onExposePreview(GdkEventExpose *event);
-#endif
-
bool _onDraw(const Cairo::RefPtr<Cairo::Context>& cr);
void _onPageNumberChanged();
void _onToggleCropping();
@@ -110,13 +102,8 @@ private:
class Gtk::RadioButton * _importViaInternal; // Use native (poppler based) importing
class Gtk::Label * _labelViaInternal;
#endif
-#if WITH_GTKMM_3_0
- class Gtk::Scale * _fallbackPrecisionSlider;
+ Gtk::Scale * _fallbackPrecisionSlider;
Glib::RefPtr<Gtk::Adjustment> _fallbackPrecisionSlider_adj;
-#else
- class Gtk::HScale * _fallbackPrecisionSlider;
- class Gtk::Adjustment *_fallbackPrecisionSlider_adj;
-#endif
class Gtk::Label * _labelPrecisionComment;
class Gtk::HBox * hbox6;
class Gtk::Label * _labelText;
diff --git a/src/extension/internal/pov-out.cpp b/src/extension/internal/pov-out.cpp
index bd2168b68..8df883069 100644
--- a/src/extension/internal/pov-out.cpp
+++ b/src/extension/internal/pov-out.cpp
@@ -479,9 +479,9 @@ bool PovOutput::doTreeRecursive(SPDocument *doc, SPObject *obj)
/**
* Descend into children
*/
- for (SPObject *child = obj->firstChild() ; child ; child = child->next)
+ for (auto &child: obj->children)
{
- if (!doTreeRecursive(doc, child))
+ if (!doTreeRecursive(doc, &child))
return false;
}
diff --git a/src/extension/internal/vsd-input.cpp b/src/extension/internal/vsd-input.cpp
index a3d4aad37..2de2d0ec6 100644
--- a/src/extension/internal/vsd-input.cpp
+++ b/src/extension/internal/vsd-input.cpp
@@ -113,12 +113,7 @@ VsdImportDialog::VsdImportDialog(const std::vector<RVNGString> &vec)
_previewArea = Gtk::manage(new class Gtk::VBox());
vbox1 = Gtk::manage(new class Gtk::VBox());
vbox1->pack_start(*_previewArea, Gtk::PACK_EXPAND_WIDGET, 0);
-#if WITH_GTKMM_3_0
this->get_content_area()->pack_start(*vbox1);
-#else
- this->get_vbox()->pack_start(*vbox1);
-#endif
-
// CONTROLS
@@ -140,13 +135,8 @@ VsdImportDialog::VsdImportDialog(const std::vector<RVNGString> &vec)
g_free(label_text);
// Adjustment + spinner
-#if WITH_GTKMM_3_0
- Glib::RefPtr<Gtk::Adjustment> _pageNumberSpin_adj = Gtk::Adjustment::create(1, 1, _vec.size(), 1, 10, 0);
+ auto _pageNumberSpin_adj = Gtk::Adjustment::create(1, 1, _vec.size(), 1, 10, 0);
_pageNumberSpin = Gtk::manage(new Gtk::SpinButton(_pageNumberSpin_adj, 1, 0));
-#else
- Gtk::Adjustment *_pageNumberSpin_adj = Gtk::manage(new class Gtk::Adjustment(1, 1, _vec.size(), 1, 10, 0));
- _pageNumberSpin = Gtk::manage(new Gtk::SpinButton(*_pageNumberSpin_adj, 1, 0));
-#endif
_pageNumberSpin->set_can_focus();
_pageNumberSpin->set_update_policy(Gtk::UPDATE_ALWAYS);
_pageNumberSpin->set_numeric(true);
diff --git a/src/extension/param/bool.cpp b/src/extension/param/bool.cpp
index d64f798ba..ca61d8c51 100644
--- a/src/extension/param/bool.cpp
+++ b/src/extension/param/bool.cpp
@@ -14,6 +14,7 @@
#include <gtkmm/box.h>
#include <gtkmm/spinbutton.h>
#include <gtkmm/checkbutton.h>
+#include <glib/gi18n.h>
#include "xml/node.h"
#include "../extension.h"
@@ -129,14 +130,10 @@ Gtk::Widget *ParamBool::get_widget(SPDocument * doc, Inkscape::XML::Node * node,
return NULL;
}
-#if WITH_GTKMM_3_0
- Gtk::Box * hbox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL, 4));
+ auto hbox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL, 4));
hbox->set_homogeneous(false);
-#else
- Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
-#endif
- Gtk::Label * label = Gtk::manage(new Gtk::Label(_text, Gtk::ALIGN_START));
+ Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_START));
label->show();
hbox->pack_end(*label, true, true);
diff --git a/src/extension/param/enum.cpp b/src/extension/param/enum.cpp
index 4e7420807..8bc0fbda7 100644
--- a/src/extension/param/enum.cpp
+++ b/src/extension/param/enum.cpp
@@ -251,7 +251,7 @@ Gtk::Widget *ParamComboBox::get_widget(SPDocument * doc, Inkscape::XML::Node * n
}
Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
- Gtk::Label * label = Gtk::manage(new Gtk::Label(_text, Gtk::ALIGN_START));
+ Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_START));
label->show();
hbox->pack_start(*label, false, false, _indent);
diff --git a/src/extension/param/float.cpp b/src/extension/param/float.cpp
index dff7cbf46..23a03ea8f 100644
--- a/src/extension/param/float.cpp
+++ b/src/extension/param/float.cpp
@@ -15,6 +15,7 @@
#include <gtkmm/scale.h>
#include "ui/widget/spinbutton.h"
#include "ui/widget/spin-scale.h"
+#include <glib/gi18n.h>
#include "xml/node.h"
#include "extension/extension.h"
@@ -176,16 +177,12 @@ Gtk::Widget * ParamFloat::get_widget(SPDocument * doc, Inkscape::XML::Node * nod
Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
-#if WITH_GTKMM_3_0
- ParamFloatAdjustment * pfa = new ParamFloatAdjustment(this, doc, node, changeSignal);
+ auto pfa = new ParamFloatAdjustment(this, doc, node, changeSignal);
Glib::RefPtr<Gtk::Adjustment> fadjust(pfa);
-#else
- ParamFloatAdjustment * fadjust = Gtk::manage(new ParamFloatAdjustment(this, doc, node, changeSignal));
-#endif
if (_mode == FULL) {
- UI::Widget::SpinScale *scale = new UI::Widget::SpinScale(_text, fadjust, _precision);
+ UI::Widget::SpinScale *scale = new UI::Widget::SpinScale(_(_text), fadjust, _precision);
scale->set_size_request(400, -1);
scale->show();
hbox->pack_start(*scale, false, false);
@@ -193,15 +190,11 @@ Gtk::Widget * ParamFloat::get_widget(SPDocument * doc, Inkscape::XML::Node * nod
}
else if (_mode == MINIMAL) {
- Gtk::Label * label = Gtk::manage(new Gtk::Label(_text, Gtk::ALIGN_START));
+ Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_START));
label->show();
hbox->pack_start(*label, true, true, _indent);
-#if WITH_GTKMM_3_0
- Inkscape::UI::Widget::SpinButton * spin = Gtk::manage(new Inkscape::UI::Widget::SpinButton(fadjust, 0.1, _precision));
-#else
- Inkscape::UI::Widget::SpinButton * spin = Gtk::manage(new Inkscape::UI::Widget::SpinButton(*fadjust, 0.1, _precision));
-#endif
+ auto spin = Gtk::manage(new Inkscape::UI::Widget::SpinButton(fadjust, 0.1, _precision));
spin->show();
hbox->pack_start(*spin, false, false);
}
diff --git a/src/extension/param/int.cpp b/src/extension/param/int.cpp
index dda801282..222d4f243 100644
--- a/src/extension/param/int.cpp
+++ b/src/extension/param/int.cpp
@@ -15,6 +15,7 @@
#include <gtkmm/scale.h>
#include "ui/widget/spinbutton.h"
#include "ui/widget/spin-scale.h"
+#include <glib/gi18n.h>
#include "xml/node.h"
#include "extension/extension.h"
@@ -157,32 +158,23 @@ ParamInt::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal
Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
-
-#if WITH_GTKMM_3_0
- ParamIntAdjustment * pia = new ParamIntAdjustment(this, doc, node, changeSignal);
+ auto pia = new ParamIntAdjustment(this, doc, node, changeSignal);
Glib::RefPtr<Gtk::Adjustment> fadjust(pia);
-#else
- ParamIntAdjustment * fadjust = Gtk::manage(new ParamIntAdjustment(this, doc, node, changeSignal));
-#endif
if (_mode == FULL) {
- UI::Widget::SpinScale *scale = new UI::Widget::SpinScale(_text, fadjust, 0);
+ UI::Widget::SpinScale *scale = new UI::Widget::SpinScale(_(_text), fadjust, 0);
scale->set_size_request(400, -1);
scale->show();
hbox->pack_start(*scale, false, false);
}
else if (_mode == MINIMAL) {
- Gtk::Label * label = Gtk::manage(new Gtk::Label(_text, Gtk::ALIGN_START));
+ Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_START));
label->show();
hbox->pack_start(*label, true, true, _indent);
-#if WITH_GTKMM_3_0
- Inkscape::UI::Widget::SpinButton * spin = Gtk::manage(new Inkscape::UI::Widget::SpinButton(fadjust, 1.0, 0));
-#else
- Inkscape::UI::Widget::SpinButton * spin = Gtk::manage(new Inkscape::UI::Widget::SpinButton(*fadjust, 1.0, 0));
-#endif
+ auto spin = Gtk::manage(new Inkscape::UI::Widget::SpinButton(fadjust, 1.0, 0));
spin->show();
hbox->pack_start(*spin, false, false);
}
diff --git a/src/extension/param/notebook.cpp b/src/extension/param/notebook.cpp
index 20c8e8481..957d12d06 100644
--- a/src/extension/param/notebook.cpp
+++ b/src/extension/param/notebook.cpp
@@ -353,11 +353,7 @@ public:
// hook function
this->signal_switch_page().connect(sigc::mem_fun(this, &ParamNotebookWdg::changed_page));
};
-#if WITH_GTKMM_3_0
void changed_page(Gtk::Widget *page, guint pagenum);
-#else
- void changed_page(GtkNotebookPage *page, guint pagenum);
-#endif
bool activated;
};
@@ -368,11 +364,7 @@ public:
* is actually visible. This to exclude 'fake' changes when the
* notebookpages are added or removed.
*/
-#if WITH_GTKMM_3_0
void ParamNotebookWdg::changed_page(Gtk::Widget * /*page*/, guint pagenum)
-#else
-void ParamNotebookWdg::changed_page(GtkNotebookPage * /*page*/, guint pagenum)
-#endif
{
if (get_visible()) {
_pref->set((int)pagenum, _doc, _node);
diff --git a/src/extension/param/parameter.cpp b/src/extension/param/parameter.cpp
index e4a614667..a5632a39a 100644
--- a/src/extension/param/parameter.cpp
+++ b/src/extension/param/parameter.cpp
@@ -58,16 +58,6 @@ Parameter *Parameter::make(Inkscape::XML::Node *in_repr, Inkscape::Extension::Ex
const char *guitext = in_repr->attribute("gui-text");
if (guitext == NULL) {
guitext = in_repr->attribute("_gui-text");
- if (guitext == NULL) {
- // guitext = ""; // propably better to require devs to explicitly set an empty gui-text if this is what they want
- } else {
- const char *context = in_repr->attribute("msgctxt");
- if (context != NULL) {
- guitext = g_dpgettext2(NULL, context, guitext);
- } else {
- guitext = _(guitext);
- }
- }
}
const char *gui_tip = in_repr->attribute("gui-tip");
if (gui_tip == NULL) {
diff --git a/src/extension/param/radiobutton.cpp b/src/extension/param/radiobutton.cpp
index 1d1b860c6..c54cc0ec3 100644
--- a/src/extension/param/radiobutton.cpp
+++ b/src/extension/param/radiobutton.cpp
@@ -303,17 +303,12 @@ Gtk::Widget * ParamRadioButton::get_widget(SPDocument * doc, Inkscape::XML::Node
return NULL;
}
-#if WITH_GTKMM_3_0
- Gtk::Box * hbox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL, 4));
+ auto hbox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL, 4));
hbox->set_homogeneous(false);
- Gtk::Box * vbox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL, 0));
+ auto vbox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL, 0));
vbox->set_homogeneous(false);
-#else
- Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
- Gtk::VBox * vbox = Gtk::manage(new Gtk::VBox(false, 0));
-#endif
- Gtk::Label * label = Gtk::manage(new Gtk::Label(_text, Gtk::ALIGN_START, Gtk::ALIGN_START));
+ Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_START, Gtk::ALIGN_START));
label->show();
hbox->pack_start(*label, false, false, _indent);
diff --git a/src/extension/param/string.cpp b/src/extension/param/string.cpp
index 6b082b133..1d9205502 100644
--- a/src/extension/param/string.cpp
+++ b/src/extension/param/string.cpp
@@ -166,7 +166,7 @@ Gtk::Widget * ParamString::get_widget(SPDocument * doc, Inkscape::XML::Node * no
}
Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
- Gtk::Label * label = Gtk::manage(new Gtk::Label(_text, Gtk::ALIGN_START));
+ Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_START));
label->show();
hbox->pack_start(*label, false, false, _indent);
diff --git a/src/extension/plugins/grid2/grid.cpp b/src/extension/plugins/grid2/grid.cpp
index 6880c574d..233d4e522 100644
--- a/src/extension/plugins/grid2/grid.cpp
+++ b/src/extension/plugins/grid2/grid.cpp
@@ -186,10 +186,10 @@ Grid::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View
{
SPDocument * current_document = view->doc();
- std::vector<SPItem*> selected = ((SPDesktop *)view)->getSelection()->itemList();
+ auto selected = ((SPDesktop *) view)->getSelection()->items();
Inkscape::XML::Node * first_select = NULL;
if (!selected.empty()) {
- first_select = selected[0]->getRepr();
+ first_select = selected.front()->getRepr();
}
return module->autogui(current_document, first_select, changeSignal);
diff --git a/src/extension/prefdialog.cpp b/src/extension/prefdialog.cpp
index 2521dc1de..1ca590e85 100644
--- a/src/extension/prefdialog.cpp
+++ b/src/extension/prefdialog.cpp
@@ -41,11 +41,7 @@ namespace Extension {
them. It also places the passed-in widgets into the dialog.
*/
PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * controls, Effect * effect) :
-#if WITH_GTKMM_3_0
Gtk::Dialog(_(name.c_str()), true),
-#else
- Gtk::Dialog(_(name.c_str()), true, true),
-#endif
_help(help),
_name(name),
_button_ok(NULL),
@@ -68,11 +64,7 @@ PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * co
hbox->pack_start(*controls, true, true, 6);
hbox->show();
-#if WITH_GTKMM_3_0
this->get_content_area()->pack_start(*hbox, true, true, 6);
-#else
- this->get_vbox()->pack_start(*hbox, true, true, 6);
-#endif
/*
Gtk::Button * help_button = add_button(Gtk::Stock::HELP, Gtk::RESPONSE_HELP);
@@ -97,19 +89,10 @@ PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * co
_param_preview = Parameter::make(doc->root(), _effect);
}
-#if WITH_GTKMM_3_0
- Gtk::Separator * sep = Gtk::manage(new Gtk::Separator());
-#else
- Gtk::HSeparator * sep = Gtk::manage(new Gtk::HSeparator());
-#endif
-
+ auto sep = Gtk::manage(new Gtk::Separator());
sep->show();
-#if WITH_GTKMM_3_0
this->get_content_area()->pack_start(*sep, true, true, 4);
-#else
- this->get_vbox()->pack_start(*sep, true, true, 4);
-#endif
hbox = Gtk::manage(new Gtk::HBox());
_button_preview = _param_preview->get_widget(NULL, NULL, &_signal_preview);
@@ -117,19 +100,11 @@ PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * co
hbox->pack_start(*_button_preview, true, true,6);
hbox->show();
-#if WITH_GTKMM_3_0
this->get_content_area()->pack_start(*hbox, true, true, 6);
-#else
- this->get_vbox()->pack_start(*hbox, true, true, 6);
-#endif
Gtk::Box * hbox = dynamic_cast<Gtk::Box *>(_button_preview);
if (hbox != NULL) {
-#if WITH_GTKMM_3_0
_checkbox_preview = dynamic_cast<Gtk::CheckButton *>(hbox->get_children().front());
-#else
- _checkbox_preview = dynamic_cast<Gtk::CheckButton *>(hbox->children().back().get_widget());
-#endif
}
preview_toggle();
diff --git a/src/file.cpp b/src/file.cpp
index 56fdffb3c..7c17a6158 100644
--- a/src/file.cpp
+++ b/src/file.cpp
@@ -1118,14 +1118,14 @@ void sp_import_document(SPDesktop *desktop, SPDocument *clipdoc, bool in_place)
Inkscape::Selection *selection = desktop->getSelection();
selection->setReprList(pasted_objects_not);
Geom::Affine doc2parent = SP_ITEM(desktop->currentLayer())->i2doc_affine().inverse();
- sp_selection_apply_affine(selection, desktop->dt2doc() * doc2parent * desktop->doc2dt(), true, false, false);
+ sp_object_set_apply_affine(selection, desktop->dt2doc() * doc2parent * desktop->doc2dt(), true, false, false);
sp_selection_delete(desktop);
// Change the selection to the freshly pasted objects
selection->setReprList(pasted_objects);
// Apply inverse of parent transform
- sp_selection_apply_affine(selection, desktop->dt2doc() * doc2parent * desktop->doc2dt(), true, false, false);
+ sp_object_set_apply_affine(selection, desktop->dt2doc() * doc2parent * desktop->doc2dt(), true, false, false);
// Update (among other things) all curves in paths, for bounds() to work
target_document->ensureUpToDate();
@@ -1155,7 +1155,7 @@ void sp_import_document(SPDesktop *desktop, SPDocument *clipdoc, bool in_place)
m.unSetup();
}
- sp_selection_move_relative(selection, offset);
+ sp_object_set_move_relative(selection, offset);
}
}
@@ -1193,8 +1193,8 @@ file_import(SPDocument *in_doc, const Glib::ustring &uri,
// Count the number of top-level items in the imported document.
guint items_count = 0;
- for ( SPObject *child = doc->getRoot()->firstChild(); child; child = child->getNext()) {
- if (SP_IS_ITEM(child)) {
+ for (auto& child: doc->getRoot()->children) {
+ if (SP_IS_ITEM(&child)) {
items_count++;
}
}
@@ -1223,9 +1223,9 @@ file_import(SPDocument *in_doc, const Glib::ustring &uri,
// Construct a new object representing the imported image,
// and insert it into the current document.
SPObject *new_obj = NULL;
- for ( SPObject *child = doc->getRoot()->firstChild(); child; child = child->getNext() ) {
- if (SP_IS_ITEM(child)) {
- Inkscape::XML::Node *newitem = child->getRepr()->duplicate(xml_in_doc);
+ for (auto& child: doc->getRoot()->children) {
+ if (SP_IS_ITEM(&child)) {
+ Inkscape::XML::Node *newitem = child.getRepr()->duplicate(xml_in_doc);
// convert layers to groups, and make sure they are unlocked
// FIXME: add "preserve layers" mode where each layer from
@@ -1238,10 +1238,10 @@ file_import(SPDocument *in_doc, const Glib::ustring &uri,
}
// don't lose top-level defs or style elements
- else if (child->getRepr()->type() == Inkscape::XML::ELEMENT_NODE) {
- const gchar *tag = child->getRepr()->name();
+ else if (child.getRepr()->type() == Inkscape::XML::ELEMENT_NODE) {
+ const gchar *tag = child.getRepr()->name();
if (!strcmp(tag, "svg:style")) {
- in_doc->getRoot()->appendChildRepr(child->getRepr()->duplicate(xml_in_doc));
+ in_doc->getRoot()->appendChildRepr(child.getRepr()->duplicate(xml_in_doc));
}
}
}
@@ -1260,7 +1260,7 @@ file_import(SPDocument *in_doc, const Glib::ustring &uri,
// c2p is identity matrix at this point unless ensureUpToDate is called
doc->ensureUpToDate();
Geom::Affine affine = doc->getRoot()->c2p * SP_ITEM(place_to_insert)->i2doc_affine().inverse();
- sp_selection_apply_affine(selection, desktop->dt2doc() * affine * desktop->doc2dt(), true, false, false);
+ sp_object_set_apply_affine(selection, desktop->dt2doc() * affine * desktop->doc2dt(), true, false, false);
// move to mouse pointer
{
@@ -1268,7 +1268,7 @@ file_import(SPDocument *in_doc, const Glib::ustring &uri,
Geom::OptRect sel_bbox = selection->visualBounds();
if (sel_bbox) {
Geom::Point m( desktop->point() - sel_bbox->midpoint() );
- sp_selection_move_relative(selection, m, false);
+ sp_object_set_move_relative(selection, m, false);
}
}
}
diff --git a/src/filter-chemistry.cpp b/src/filter-chemistry.cpp
index 3618b2642..560e73322 100644
--- a/src/filter-chemistry.cpp
+++ b/src/filter-chemistry.cpp
@@ -46,8 +46,8 @@ static guint count_filter_hrefs(SPObject *o, SPFilter *filter)
i ++;
}
- for ( SPObject *child = o->firstChild(); child; child = child->getNext() ) {
- i += count_filter_hrefs(child, filter);
+ for (auto& child: o->children) {
+ i += count_filter_hrefs(&child, filter);
}
return i;
@@ -486,16 +486,14 @@ void remove_filter_gaussian_blur (SPObject *item)
bool filter_is_single_gaussian_blur(SPFilter *filter)
{
- return (filter->firstChild() &&
- (filter->firstChild() == filter->lastChild()) &&
- SP_IS_GAUSSIANBLUR(filter->firstChild()));
+ return (filter->children.size() == 1 &&
+ SP_IS_GAUSSIANBLUR(&filter->children.front()));
}
double get_single_gaussian_blur_radius(SPFilter *filter)
{
- if (filter->firstChild() &&
- (filter->firstChild() == filter->lastChild()) &&
- SP_IS_GAUSSIANBLUR(filter->firstChild())) {
+ if (filter->children.size() == 1 &&
+ SP_IS_GAUSSIANBLUR(&filter->children.front())) {
SPGaussianBlur *gb = SP_GAUSSIANBLUR(filter->firstChild());
double x = gb->stdDeviation.getNumber();
diff --git a/src/filters/Makefile_insert b/src/filters/Makefile_insert
deleted file mode 100644
index ea9ff4b56..000000000
--- a/src/filters/Makefile_insert
+++ /dev/null
@@ -1,46 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-ink_common_sources += \
- filters/blend.cpp \
- filters/blend.h \
- filters/colormatrix.cpp \
- filters/colormatrix.h \
- filters/componenttransfer.cpp \
- filters/componenttransfer-funcnode.cpp \
- filters/componenttransfer-funcnode.h \
- filters/componenttransfer.h \
- filters/composite.cpp \
- filters/composite.h \
- filters/convolvematrix.cpp \
- filters/convolvematrix.h \
- filters/diffuselighting.cpp \
- filters/diffuselighting.h \
- filters/displacementmap.cpp \
- filters/displacementmap.h \
- filters/distantlight.cpp \
- filters/distantlight.h \
- filters/flood.cpp \
- filters/flood.h \
- filters/gaussian-blur.cpp \
- filters/gaussian-blur.h \
- filters/image.cpp \
- filters/image.h \
- filters/merge.cpp \
- filters/merge.h \
- filters/mergenode.cpp \
- filters/mergenode.h \
- filters/morphology.cpp \
- filters/morphology.h \
- filters/offset.cpp \
- filters/offset.h \
- filters/pointlight.cpp \
- filters/pointlight.h \
- filters/specularlighting.cpp \
- filters/specularlighting.h \
- filters/spotlight.cpp \
- filters/spotlight.h \
- filters/tile.cpp \
- filters/tile.h \
- filters/turbulence.cpp \
- filters/turbulence.h
-
diff --git a/src/filters/blend.cpp b/src/filters/blend.cpp
index b3767632f..0c7f87542 100644
--- a/src/filters/blend.cpp
+++ b/src/filters/blend.cpp
@@ -195,11 +195,11 @@ Inkscape::XML::Node* SPFeBlend::write(Inkscape::XML::Document *doc, Inkscape::XM
if( !in2_name ) {
// This code is very similar to sp_filter_primtive_name_previous_out()
- SPObject *i = parent->children;
+ SPObject *i = parent->firstChild();
// Find previous filter primitive
- while (i && i->next != this) {
- i = i->next;
+ while (i && i->getNext() != this) {
+ i = i->getNext();
}
if( i ) {
diff --git a/src/filters/componenttransfer.cpp b/src/filters/componenttransfer.cpp
index 47e570fa4..19843eebd 100644
--- a/src/filters/componenttransfer.cpp
+++ b/src/filters/componenttransfer.cpp
@@ -45,11 +45,10 @@ static void sp_feComponentTransfer_children_modified(SPFeComponentTransfer *sp_c
{
if (sp_componenttransfer->renderer) {
bool set[4] = {false, false, false, false};
- SPObject* node = sp_componenttransfer->children;
- for(;node;node=node->next){
+ for(auto& node: sp_componenttransfer->children) {
int i = 4;
- SPFeFuncNode *funcNode = SP_FEFUNCNODE(node);
+ SPFeFuncNode *funcNode = SP_FEFUNCNODE(&node);
switch (funcNode->channel) {
case SPFeFuncNode::R:
@@ -70,13 +69,13 @@ static void sp_feComponentTransfer_children_modified(SPFeComponentTransfer *sp_c
g_warning("Unrecognized channel for component transfer.");
break;
}
- sp_componenttransfer->renderer->type[i] = ((SPFeFuncNode *) node)->type;
- sp_componenttransfer->renderer->tableValues[i] = ((SPFeFuncNode *) node)->tableValues;
- sp_componenttransfer->renderer->slope[i] = ((SPFeFuncNode *) node)->slope;
- sp_componenttransfer->renderer->intercept[i] = ((SPFeFuncNode *) node)->intercept;
- sp_componenttransfer->renderer->amplitude[i] = ((SPFeFuncNode *) node)->amplitude;
- sp_componenttransfer->renderer->exponent[i] = ((SPFeFuncNode *) node)->exponent;
- sp_componenttransfer->renderer->offset[i] = ((SPFeFuncNode *) node)->offset;
+ sp_componenttransfer->renderer->type[i] = ((SPFeFuncNode *) &node)->type;
+ sp_componenttransfer->renderer->tableValues[i] = ((SPFeFuncNode *) &node)->tableValues;
+ sp_componenttransfer->renderer->slope[i] = ((SPFeFuncNode *) &node)->slope;
+ sp_componenttransfer->renderer->intercept[i] = ((SPFeFuncNode *) &node)->intercept;
+ sp_componenttransfer->renderer->amplitude[i] = ((SPFeFuncNode *) &node)->amplitude;
+ sp_componenttransfer->renderer->exponent[i] = ((SPFeFuncNode *) &node)->exponent;
+ sp_componenttransfer->renderer->offset[i] = ((SPFeFuncNode *) &node)->offset;
set[i] = true;
}
// Set any types not explicitly set to the identity transform
diff --git a/src/filters/composite.cpp b/src/filters/composite.cpp
index 3e651a778..42f06915f 100644
--- a/src/filters/composite.cpp
+++ b/src/filters/composite.cpp
@@ -221,11 +221,11 @@ Inkscape::XML::Node* SPFeComposite::write(Inkscape::XML::Document *doc, Inkscape
if( !in2_name ) {
// This code is very similar to sp_filter_primitive_name_previous_out()
- SPObject *i = parent->children;
+ SPObject *i = parent->firstChild();
// Find previous filter primitive
- while (i && i->next != this) {
- i = i->next;
+ while (i && i->getNext() != this) {
+ i = i->getNext();
}
if( i ) {
diff --git a/src/filters/diffuselighting.cpp b/src/filters/diffuselighting.cpp
index 120c058d2..a46b367ec 100644
--- a/src/filters/diffuselighting.cpp
+++ b/src/filters/diffuselighting.cpp
@@ -258,17 +258,17 @@ static void sp_feDiffuseLighting_children_modified(SPFeDiffuseLighting *sp_diffu
{
if (sp_diffuselighting->renderer) {
sp_diffuselighting->renderer->light_type = Inkscape::Filters::NO_LIGHT;
- if (SP_IS_FEDISTANTLIGHT(sp_diffuselighting->children)) {
+ if (SP_IS_FEDISTANTLIGHT(sp_diffuselighting->firstChild())) {
sp_diffuselighting->renderer->light_type = Inkscape::Filters::DISTANT_LIGHT;
- sp_diffuselighting->renderer->light.distant = SP_FEDISTANTLIGHT(sp_diffuselighting->children);
+ sp_diffuselighting->renderer->light.distant = SP_FEDISTANTLIGHT(sp_diffuselighting->firstChild());
}
- if (SP_IS_FEPOINTLIGHT(sp_diffuselighting->children)) {
+ if (SP_IS_FEPOINTLIGHT(sp_diffuselighting->firstChild())) {
sp_diffuselighting->renderer->light_type = Inkscape::Filters::POINT_LIGHT;
- sp_diffuselighting->renderer->light.point = SP_FEPOINTLIGHT(sp_diffuselighting->children);
+ sp_diffuselighting->renderer->light.point = SP_FEPOINTLIGHT(sp_diffuselighting->firstChild());
}
- if (SP_IS_FESPOTLIGHT(sp_diffuselighting->children)) {
+ if (SP_IS_FESPOTLIGHT(sp_diffuselighting->firstChild())) {
sp_diffuselighting->renderer->light_type = Inkscape::Filters::SPOT_LIGHT;
- sp_diffuselighting->renderer->light.spot = SP_FESPOTLIGHT(sp_diffuselighting->children);
+ sp_diffuselighting->renderer->light.spot = SP_FESPOTLIGHT(sp_diffuselighting->firstChild());
}
}
}
@@ -293,19 +293,19 @@ void SPFeDiffuseLighting::build_renderer(Inkscape::Filters::Filter* filter) {
//We assume there is at most one child
nr_diffuselighting->light_type = Inkscape::Filters::NO_LIGHT;
- if (SP_IS_FEDISTANTLIGHT(this->children)) {
+ if (SP_IS_FEDISTANTLIGHT(this->firstChild())) {
nr_diffuselighting->light_type = Inkscape::Filters::DISTANT_LIGHT;
- nr_diffuselighting->light.distant = SP_FEDISTANTLIGHT(this->children);
+ nr_diffuselighting->light.distant = SP_FEDISTANTLIGHT(this->firstChild());
}
- if (SP_IS_FEPOINTLIGHT(this->children)) {
+ if (SP_IS_FEPOINTLIGHT(this->firstChild())) {
nr_diffuselighting->light_type = Inkscape::Filters::POINT_LIGHT;
- nr_diffuselighting->light.point = SP_FEPOINTLIGHT(this->children);
+ nr_diffuselighting->light.point = SP_FEPOINTLIGHT(this->firstChild());
}
- if (SP_IS_FESPOTLIGHT(this->children)) {
+ if (SP_IS_FESPOTLIGHT(this->firstChild())) {
nr_diffuselighting->light_type = Inkscape::Filters::SPOT_LIGHT;
- nr_diffuselighting->light.spot = SP_FESPOTLIGHT(this->children);
+ nr_diffuselighting->light.spot = SP_FESPOTLIGHT(this->firstChild());
}
//nr_offset->set_dx(sp_offset->dx);
diff --git a/src/filters/displacementmap.cpp b/src/filters/displacementmap.cpp
index 1dbea67ff..f0ca36079 100644
--- a/src/filters/displacementmap.cpp
+++ b/src/filters/displacementmap.cpp
@@ -193,11 +193,11 @@ Inkscape::XML::Node* SPFeDisplacementMap::write(Inkscape::XML::Document *doc, In
if( !in2_name ) {
// This code is very similar to sp_filter_primtive_name_previous_out()
- SPObject *i = parent->children;
+ SPObject *i = parent->firstChild();
// Find previous filter primitive
- while (i && i->next != this) {
- i = i->next;
+ while (i && i->getNext() != this) {
+ i = i->getNext();
}
if( i ) {
diff --git a/src/filters/merge.cpp b/src/filters/merge.cpp
index 68f671b11..8ec40cb46 100644
--- a/src/filters/merge.cpp
+++ b/src/filters/merge.cpp
@@ -92,17 +92,14 @@ void SPFeMerge::build_renderer(Inkscape::Filters::Filter* filter) {
sp_filter_primitive_renderer_common(this, nr_primitive);
- SPObject *input = this->children;
int in_nr = 0;
- while (input) {
- if (SP_IS_FEMERGENODE(input)) {
- SPFeMergeNode *node = SP_FEMERGENODE(input);
+ for(auto& input: children) {
+ if (SP_IS_FEMERGENODE(&input)) {
+ SPFeMergeNode *node = SP_FEMERGENODE(&input);
nr_merge->set_input(in_nr, node->input);
in_nr++;
}
-
- input = input->next;
}
}
diff --git a/src/filters/specularlighting.cpp b/src/filters/specularlighting.cpp
index bda1a0f30..ac7253ad9 100644
--- a/src/filters/specularlighting.cpp
+++ b/src/filters/specularlighting.cpp
@@ -266,19 +266,19 @@ static void sp_feSpecularLighting_children_modified(SPFeSpecularLighting *sp_spe
if (sp_specularlighting->renderer) {
sp_specularlighting->renderer->light_type = Inkscape::Filters::NO_LIGHT;
- if (SP_IS_FEDISTANTLIGHT(sp_specularlighting->children)) {
+ if (SP_IS_FEDISTANTLIGHT(sp_specularlighting->firstChild())) {
sp_specularlighting->renderer->light_type = Inkscape::Filters::DISTANT_LIGHT;
- sp_specularlighting->renderer->light.distant = SP_FEDISTANTLIGHT(sp_specularlighting->children);
+ sp_specularlighting->renderer->light.distant = SP_FEDISTANTLIGHT(sp_specularlighting->firstChild());
}
- if (SP_IS_FEPOINTLIGHT(sp_specularlighting->children)) {
+ if (SP_IS_FEPOINTLIGHT(sp_specularlighting->firstChild())) {
sp_specularlighting->renderer->light_type = Inkscape::Filters::POINT_LIGHT;
- sp_specularlighting->renderer->light.point = SP_FEPOINTLIGHT(sp_specularlighting->children);
+ sp_specularlighting->renderer->light.point = SP_FEPOINTLIGHT(sp_specularlighting->firstChild());
}
- if (SP_IS_FESPOTLIGHT(sp_specularlighting->children)) {
+ if (SP_IS_FESPOTLIGHT(sp_specularlighting->firstChild())) {
sp_specularlighting->renderer->light_type = Inkscape::Filters::SPOT_LIGHT;
- sp_specularlighting->renderer->light.spot = SP_FESPOTLIGHT(sp_specularlighting->children);
+ sp_specularlighting->renderer->light.spot = SP_FESPOTLIGHT(sp_specularlighting->firstChild());
}
}
}
@@ -304,19 +304,19 @@ void SPFeSpecularLighting::build_renderer(Inkscape::Filters::Filter* filter) {
//We assume there is at most one child
nr_specularlighting->light_type = Inkscape::Filters::NO_LIGHT;
- if (SP_IS_FEDISTANTLIGHT(this->children)) {
+ if (SP_IS_FEDISTANTLIGHT(this->firstChild())) {
nr_specularlighting->light_type = Inkscape::Filters::DISTANT_LIGHT;
- nr_specularlighting->light.distant = SP_FEDISTANTLIGHT(this->children);
+ nr_specularlighting->light.distant = SP_FEDISTANTLIGHT(this->firstChild());
}
- if (SP_IS_FEPOINTLIGHT(this->children)) {
+ if (SP_IS_FEPOINTLIGHT(this->firstChild())) {
nr_specularlighting->light_type = Inkscape::Filters::POINT_LIGHT;
- nr_specularlighting->light.point = SP_FEPOINTLIGHT(this->children);
+ nr_specularlighting->light.point = SP_FEPOINTLIGHT(this->firstChild());
}
- if (SP_IS_FESPOTLIGHT(this->children)) {
+ if (SP_IS_FESPOTLIGHT(this->firstChild())) {
nr_specularlighting->light_type = Inkscape::Filters::SPOT_LIGHT;
- nr_specularlighting->light.spot = SP_FESPOTLIGHT(this->children);
+ nr_specularlighting->light.spot = SP_FESPOTLIGHT(this->firstChild());
}
//nr_offset->set_dx(sp_offset->dx);
diff --git a/src/gradient-chemistry.cpp b/src/gradient-chemistry.cpp
index ae82499de..4521d72fd 100644
--- a/src/gradient-chemistry.cpp
+++ b/src/gradient-chemistry.cpp
@@ -195,8 +195,8 @@ static guint count_gradient_hrefs(SPObject *o, SPGradient *gr)
i ++;
}
- for ( SPObject *child = o->firstChild(); child; child = child->getNext() ) {
- i += count_gradient_hrefs(child, gr);
+ for (auto& child: o->children) {
+ i += count_gradient_hrefs(&child, gr);
}
return i;
@@ -922,11 +922,11 @@ void sp_item_gradient_reverse_vector(SPItem *item, Inkscape::PaintTarget fill_or
GSList *child_objects = NULL;
std::vector<double> offsets;
double offset;
- for ( SPObject *child = vector->firstChild(); child; child = child->getNext()) {
- child_reprs = g_slist_prepend (child_reprs, child->getRepr());
- child_objects = g_slist_prepend (child_objects, child);
+ for (auto& child: vector->children) {
+ child_reprs = g_slist_prepend (child_reprs, child.getRepr());
+ child_objects = g_slist_prepend (child_objects, &child);
offset=0;
- sp_repr_get_double(child->getRepr(), "offset", &offset);
+ sp_repr_get_double(child.getRepr(), "offset", &offset);
offsets.push_back(offset);
}
@@ -975,9 +975,9 @@ void sp_item_gradient_invert_vector_color(SPItem *item, Inkscape::PaintTarget fi
sp_gradient_repr_set_link(gradient->getRepr(), vector);
}
- for ( SPObject *child = vector->firstChild(); child; child = child->getNext()) {
- if (SP_IS_STOP(child)) {
- guint32 color = SP_STOP(child)->get_rgba32();
+ for (auto& child: vector->children) {
+ if (SP_IS_STOP(&child)) {
+ guint32 color = SP_STOP(&child)->get_rgba32();
//g_message("Stop color %d", color);
gchar c[64];
sp_svg_write_color (c, sizeof(c),
@@ -990,7 +990,7 @@ void sp_item_gradient_invert_vector_color(SPItem *item, Inkscape::PaintTarget fi
);
SPCSSAttr *css = sp_repr_css_attr_new ();
sp_repr_css_set_property (css, "stop-color", c);
- sp_repr_css_change(child->getRepr(), css, "style");
+ sp_repr_css_change(child.getRepr(), css, "style");
sp_repr_css_attr_unref (css);
}
}
@@ -1566,8 +1566,8 @@ void sp_gradient_invert_selected_gradients(SPDesktop *desktop, Inkscape::PaintTa
{
Inkscape::Selection *selection = desktop->getSelection();
- const std::vector<SPItem*> list=selection->itemList();
- for (std::vector<SPItem*>::const_iterator i = list.begin(); i != list.end(); ++i) {
+ auto list= selection->items();
+ for (auto i = list.begin(); i != list.end(); ++i) {
sp_item_gradient_invert_vector_color(*i, fill_or_stroke);
}
@@ -1591,8 +1591,8 @@ void sp_gradient_reverse_selected_gradients(SPDesktop *desktop)
if (drag && !drag->selected.empty()) {
drag->selected_reverse_vector();
} else { // If no drag or no dragger selected, act on selection (both fill and stroke gradients)
- const std::vector<SPItem*> list=selection->itemList();
- for (std::vector<SPItem*>::const_iterator i = list.begin(); i != list.end(); ++i) {
+ auto list= selection->items();
+ for (auto i = list.begin(); i != list.end(); ++i) {
sp_item_gradient_reverse_vector(*i, Inkscape::FOR_FILL);
sp_item_gradient_reverse_vector(*i, Inkscape::FOR_STROKE);
}
diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp
index aa4da7fcc..5b91bdc9f 100644
--- a/src/gradient-drag.cpp
+++ b/src/gradient-drag.cpp
@@ -2065,8 +2065,8 @@ void GrDrag::updateDraggers()
this->draggers.clear();
g_return_if_fail(this->selection != NULL);
- std::vector<SPItem*> list = this->selection->itemList();
- for (std::vector<SPItem*>::const_iterator i = list.begin(); i != list.end(); ++i) {
+ auto list = this->selection->items();
+ for (auto i = list.begin(); i != list.end(); ++i) {
SPItem *item = *i;
SPStyle *style = item->style;
@@ -2133,8 +2133,8 @@ void GrDrag::updateLines()
g_return_if_fail(this->selection != NULL);
- std::vector<SPItem*> list = this->selection->itemList();
- for (std::vector<SPItem*>::const_iterator i = list.begin(); i != list.end(); ++i) {
+ auto list = this->selection->items();
+ for (auto i = list.begin(); i != list.end(); ++i) {
SPItem *item = *i;
SPStyle *style = item->style;
@@ -2277,8 +2277,8 @@ void GrDrag::updateLevels()
g_return_if_fail (this->selection != NULL);
- std::vector<SPItem*> list = this->selection->itemList();
- for (std::vector<SPItem*>::const_iterator i = list.begin(); i != list.end(); ++i) {
+ auto list = this->selection->items();
+ for (auto i = list.begin(); i != list.end(); ++i) {
SPItem *item = *i;
Geom::OptRect rect = item->desktopVisualBounds();
if (rect) {
@@ -2534,9 +2534,9 @@ void GrDrag::deleteSelected(bool just_one)
// cannot use vector->vector.stops.size() because the vector might be invalidated by deletion of a midstop
// manually count the children, don't know if there already exists a function for this...
int len = 0;
- for ( SPObject *child = (stopinfo->vector)->firstChild() ; child ; child = child->getNext() )
+ for (auto& child: stopinfo->vector->children)
{
- if ( SP_IS_STOP(child) ) {
+ if ( SP_IS_STOP(&child) ) {
len ++;
}
}
diff --git a/src/helper/Makefile_insert b/src/helper/Makefile_insert
deleted file mode 100644
index e59fcfb70..000000000
--- a/src/helper/Makefile_insert
+++ /dev/null
@@ -1,45 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-helper/unit-menu.$(OBJEXT): helper/sp-marshal.h
-
-ink_common_sources += \
- helper/action.cpp \
- helper/action.h \
- helper/action-context.cpp \
- helper/action-context.h \
- helper/geom.cpp \
- helper/geom.h \
- helper/geom-curves.h \
- helper/geom-nodetype.cpp \
- helper/geom-nodetype.h \
- helper/geom-pathstroke.cpp \
- helper/geom-pathstroke.h \
- helper/gnome-utils.cpp \
- helper/gnome-utils.h \
- helper/mathfns.h \
- helper/png-write.cpp \
- helper/png-write.h \
- helper/sp-marshal.cpp \
- helper/sp-marshal.h \
- helper/window.cpp \
- helper/window.h \
- helper/stock-items.cpp \
- helper/stock-items.h
-
-# cmp exits with status 0 when there are no differences. "if" executes the commands
-# after "then" when the exit status of the if command is 0 (this is crazy).
-helper/sp-marshal.h: helper/sp-marshal.list
- glib-genmarshal --prefix=sp_marshal --header $(srcdir)/helper/sp-marshal.list > helper/tmp.sp-marshal.h
- if cmp -s helper/sp-marshal.h helper/tmp.sp-marshal.h; \
- then rm helper/tmp.sp-marshal.h; \
- else mv helper/tmp.sp-marshal.h helper/sp-marshal.h; fi
-
-helper/sp-marshal.cpp: helper/sp-marshal.list helper/sp-marshal.h
- ( echo '#include "helper/sp-marshal.h"' && \
- glib-genmarshal --prefix=sp_marshal --body $(srcdir)/helper/sp-marshal.list ) \
- > helper/tmp.sp-marshal.cpp; \
- if cmp -s helper/sp-marshal.cpp helper/tmp.sp-marshal.cpp; \
- then rm helper/tmp.sp-marshal.cpp; \
- else mv helper/tmp.sp-marshal.cpp helper/sp-marshal.cpp; fi
-
-helper/sp-marshal.cpp helper/sp-marshal.h: helper/sp-marshal.list
diff --git a/src/helper/pixbuf-ops.cpp b/src/helper/pixbuf-ops.cpp
index 8a363d736..bab998fdb 100644
--- a/src/helper/pixbuf-ops.cpp
+++ b/src/helper/pixbuf-ops.cpp
@@ -49,8 +49,8 @@ static void hide_other_items_recursively(SPObject *o, GSList *list, unsigned dke
// recurse
if (!g_slist_find(list, o)) {
- for ( SPObject *child = o->firstChild() ; child; child = child->getNext() ) {
- hide_other_items_recursively(child, list, dkey);
+ for (auto& child: o->children) {
+ hide_other_items_recursively(&child, list, dkey);
}
}
}
diff --git a/src/helper/png-write.cpp b/src/helper/png-write.cpp
index e2b7e5b8c..682aee9b2 100644
--- a/src/helper/png-write.cpp
+++ b/src/helper/png-write.cpp
@@ -372,8 +372,8 @@ static void hide_other_items_recursively(SPObject *o, const std::vector<SPItem*>
// recurse
if (list.end()==find(list.begin(),list.end(),o)) {
- for ( SPObject *child = o->firstChild() ; child; child = child->getNext() ) {
- hide_other_items_recursively(child, list, dkey);
+ for (auto& child: o->children) {
+ hide_other_items_recursively(&child, list, dkey);
}
}
}
diff --git a/src/helper/stock-items.cpp b/src/helper/stock-items.cpp
index 5a56b89ff..647e42916 100644
--- a/src/helper/stock-items.cpp
+++ b/src/helper/stock-items.cpp
@@ -204,37 +204,37 @@ SPObject *get_stock_item(gchar const *urn, gboolean stock)
}
SPObject *object = NULL;
if (!strcmp(base, "marker") && !stock) {
- for ( SPObject *child = defs->firstChild(); child; child = child->getNext() )
+ for (auto& child: defs->children)
{
- if (child->getRepr()->attribute("inkscape:stockid") &&
- !strcmp(name_p, child->getRepr()->attribute("inkscape:stockid")) &&
- SP_IS_MARKER(child))
+ if (child.getRepr()->attribute("inkscape:stockid") &&
+ !strcmp(name_p, child.getRepr()->attribute("inkscape:stockid")) &&
+ SP_IS_MARKER(&child))
{
- object = child;
+ object = &child;
}
}
}
else if (!strcmp(base,"pattern") && !stock) {
- for ( SPObject *child = defs->firstChild() ; child; child = child->getNext() )
+ for (auto& child: defs->children)
{
- if (child->getRepr()->attribute("inkscape:stockid") &&
- !strcmp(name_p, child->getRepr()->attribute("inkscape:stockid")) &&
- SP_IS_PATTERN(child))
+ if (child.getRepr()->attribute("inkscape:stockid") &&
+ !strcmp(name_p, child.getRepr()->attribute("inkscape:stockid")) &&
+ SP_IS_PATTERN(&child))
{
- object = child;
+ object = &child;
}
}
}
else if (!strcmp(base,"gradient") && !stock) {
- for ( SPObject *child = defs->firstChild(); child; child = child->getNext() )
+ for (auto& child: defs->children)
{
- if (child->getRepr()->attribute("inkscape:stockid") &&
- !strcmp(name_p, child->getRepr()->attribute("inkscape:stockid")) &&
- SP_IS_GRADIENT(child))
+ if (child.getRepr()->attribute("inkscape:stockid") &&
+ !strcmp(name_p, child.getRepr()->attribute("inkscape:stockid")) &&
+ SP_IS_GRADIENT(&child))
{
- object = child;
+ object = &child;
}
}
diff --git a/src/id-clash.cpp b/src/id-clash.cpp
index b14526e79..c284843b8 100644
--- a/src/id-clash.cpp
+++ b/src/id-clash.cpp
@@ -185,9 +185,9 @@ find_references(SPObject *elem, refmap_type &refmap)
}
// recurse
- for (SPObject *child = elem->firstChild(); child; child = child->getNext() )
+ for (auto& child: elem->children)
{
- find_references(child, refmap);
+ find_references(&child, refmap);
}
}
@@ -240,9 +240,9 @@ change_clashing_ids(SPDocument *imported_doc, SPDocument *current_doc,
// recurse
- for (SPObject *child = elem->firstChild(); child; child = child->getNext() )
+ for (auto& child: elem->children)
{
- change_clashing_ids(imported_doc, current_doc, child, refmap, id_changes);
+ change_clashing_ids(imported_doc, current_doc, &child, refmap, id_changes);
}
}
diff --git a/src/inkgc/Makefile_insert b/src/inkgc/Makefile_insert
deleted file mode 100644
index 58aa39bb9..000000000
--- a/src/inkgc/Makefile_insert
+++ /dev/null
@@ -1,13 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-inkgc/all: inkgc/libinkgc.a
-
-inkgc/clean:
- rm -f inkgc/libinkgc.a $(inkgc_libinkgc_a_OBJECTS)
-
-inkgc_libinkgc_a_SOURCES = \
- inkgc/gc.cpp \
- inkgc/gc-alloc.h \
- inkgc/gc-core.h \
- inkgc/gc-managed.h \
- inkgc/gc-soft-ptr.h
diff --git a/src/inkscape.cpp b/src/inkscape.cpp
index a88ef5947..48b921752 100644
--- a/src/inkscape.cpp
+++ b/src/inkscape.cpp
@@ -22,6 +22,10 @@
#include <map>
+#include <glibmm/fileutils.h>
+
+#include <gtkmm/cssprovider.h>
+#include <gtkmm/icontheme.h>
#include <gtkmm/messagedialog.h>
#include "debug/simple-event.h"
#include "debug/event-tracker.h"
@@ -57,6 +61,7 @@
#include "inkscape.h"
#include "io/sys.h"
#include "message-stack.h"
+#include "path-prefix.h"
#include "resource-manager.h"
#include "ui/tools/tool-base.h"
#include "ui/dialog/debug.h"
@@ -379,6 +384,103 @@ void Application::argv0(char const* argv)
_argv0 = g_strdup(argv);
}
+/**
+ * \brief Add our icon theme to the search path
+ */
+void
+Application::add_icon_theme()
+{
+ // Get list of the possible folders containing the theme
+ auto dataDirs = Glib::get_system_data_dirs();
+ dataDirs.insert(dataDirs.begin(), Glib::get_user_data_dir());
+
+ auto icon_theme = Gtk::IconTheme::get_default();
+
+ for (auto it : dataDirs)
+ {
+ std::vector<Glib::ustring> listing;
+ listing.push_back(it);
+ listing.push_back("inkscape");
+ listing.push_back("icons");
+ auto dir = Glib::build_filename(listing);
+ icon_theme->append_search_path(dir);
+ }
+
+ // Add our icon directory to the search path for icon theme lookups.
+ auto const usericondir = Inkscape::Application::profile_path("icons");
+ icon_theme->append_search_path(usericondir);
+ icon_theme->append_search_path(INKSCAPE_PIXMAPDIR);
+#ifdef INKSCAPE_THEMEDIR
+ icon_theme->append_search_path(INKSCAPE_THEMEDIR);
+ icon_theme->rescan_if_needed();
+#endif
+ g_free(usericondir);
+}
+
+/**
+ * \brief Add our CSS style sheets
+ */
+void
+Application::add_style_sheet()
+{
+ // Add style sheet (GTK3)
+ auto const screen = Gdk::Screen::get_default();
+
+ Glib::ustring inkscape_style = INKSCAPE_UIDIR;
+ inkscape_style += "/style.css";
+ // std::cout << "CSS Stylesheet Inkscape: " << inkscape_style << std::endl;
+
+ if (Glib::file_test(inkscape_style, Glib::FILE_TEST_EXISTS)) {
+ auto provider = Gtk::CssProvider::create();
+
+ // From 3.16, throws an error which we must catch.
+ try {
+ provider->load_from_path (inkscape_style);
+ }
+#if GTK_CHECK_VERSION(3,16,0)
+ // Gtk::CssProviderError not defined until 3.16.
+ catch (const Gtk::CssProviderError& ex)
+ {
+ std::cerr << "CSSProviderError::load_from_path(): failed to load: " << inkscape_style
+ << "\n (" << ex.what() << ")" << std::endl;
+ }
+#else
+ catch (...)
+ {}
+#endif
+
+ Gtk::StyleContext::add_provider_for_screen (screen, provider, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ } else {
+ std::cerr << "sp_main_gui: Cannot find default style file:\n (" << inkscape_style
+ << ")" << std::endl;
+ }
+
+ Glib::ustring user_style = Inkscape::Application::profile_path("ui/style.css");
+ // std::cout << "CSS Stylesheet User: " << user_style << std::endl;
+
+ if (Glib::file_test(user_style, Glib::FILE_TEST_EXISTS)) {
+ auto provider2 = Gtk::CssProvider::create();
+
+ // From 3.16, throws an error which we must catch.
+ try {
+ provider2->load_from_path (user_style);
+ }
+#if GTK_CHECK_VERSION(3,16,0)
+ // Gtk::CssProviderError not defined until 3.16.
+ catch (const Gtk::CssProviderError& ex)
+ {
+ std::cerr << "CSSProviderError::load_from_path(): failed to load: " << user_style
+ << "\n (" << ex.what() << ")" << std::endl;
+ }
+#else
+ catch (...)
+ {}
+#endif
+
+ Gtk::StyleContext::add_provider_for_screen (screen, provider2, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ }
+
+}
/* \brief Constructor for the application.
* Creates a new Inkscape::Application.
*
@@ -423,9 +525,12 @@ Application::Application(const char* argv, bool use_gui) :
}
if (use_gui) {
+ add_icon_theme();
+ add_style_sheet();
load_menus();
Inkscape::DeviceManager::getManager().loadConfig();
}
+
Inkscape::ResourceManager::getManager();
/* set language for user interface according setting in preferences */
diff --git a/src/inkscape.h b/src/inkscape.h
index fe424377c..3f4416f2f 100644
--- a/src/inkscape.h
+++ b/src/inkscape.h
@@ -205,6 +205,9 @@ private:
Application& operator=(Application const&); // no assign
Application* operator&() const; // no pointer access
+ void add_icon_theme();
+ void add_style_sheet();
+
Inkscape::XML::Document * _menus;
std::map<SPDocument *, int> _document_set;
std::map<SPDocument *, AppSelectionModel *> _selection_models;
diff --git a/src/inkview.cpp b/src/inkview.cpp
index b377a3bd0..b9447a94f 100644
--- a/src/inkview.cpp
+++ b/src/inkview.cpp
@@ -34,6 +34,9 @@
#include <sys/stat.h>
#include <locale.h>
+#include <gtkmm/applicationwindow.h>
+#include <gtkmm/button.h>
+#include <gtkmm/image.h>
#include <gtkmm/main.h>
// #include <stropts.h>
@@ -66,28 +69,42 @@
extern char *optarg;
extern int optind, opterr;
-struct SPSlideShow {
- char **slides;
- int size;
- int length;
- int current;
- SPDocument *doc;
- GtkWidget *view;
- GtkWidget *window;
- bool fullscreen;
- int timer;
+/**
+ * The main application window for the slideshow
+ */
+class SPSlideShow : public Gtk::ApplicationWindow {
+public:
+ std::vector<std::string> slides; ///< List of filenames for each slide
+ int current; ///< Index of the currently displayed slide
+ SPDocument *doc; ///< The currently displayed slide
+ GtkWidget *view;
+ int timer;
+
+ /// Current state of application (full-screen or windowed)
+ bool is_fullscreen;
+
+ SPSlideShow()
+ :
+ slides(),
+ current(0),
+ doc(NULL),
+ view(NULL),
+ is_fullscreen(false)
+ {}
+
+ void control_show();
+ void show_next();
+ void show_prev();
+ void goto_first();
+ void goto_last();
+
+protected:
+ void waiting_cursor();
+ void normal_cursor();
+ void set_document(SPDocument *doc,
+ int current);
};
-static GtkWidget *sp_svgview_control_show (struct SPSlideShow *ss);
-static void sp_svgview_show_next (struct SPSlideShow *ss);
-static void sp_svgview_show_prev (struct SPSlideShow *ss);
-static void sp_svgview_goto_first (struct SPSlideShow *ss);
-static void sp_svgview_goto_last (struct SPSlideShow *ss);
-
-static int sp_svgview_show_next_cb (GtkWidget *widget, void *data);
-static int sp_svgview_show_prev_cb (GtkWidget *widget, void *data);
-static int sp_svgview_goto_first_cb (GtkWidget *widget, void *data);
-static int sp_svgview_goto_last_cb (GtkWidget *widget, void *data);
#ifdef WITH_INKJAR
static bool is_jar(char const *filename);
#endif
@@ -114,35 +131,35 @@ static int sp_svgview_main_key_press (GtkWidget */*widget*/,
switch (event->keyval) {
case GDK_KEY_Up:
case GDK_KEY_Home:
- sp_svgview_goto_first(ss);
+ ss->goto_first();
break;
case GDK_KEY_Down:
case GDK_KEY_End:
- sp_svgview_goto_last(ss);
+ ss->goto_last();
break;
case GDK_KEY_F11:
- if (ss->fullscreen) {
- gtk_window_unfullscreen (GTK_WINDOW(ss->window));
- ss->fullscreen = false;
+ if (ss->is_fullscreen) {
+ ss->unfullscreen();
+ ss->is_fullscreen = false;
} else {
- gtk_window_fullscreen (GTK_WINDOW(ss->window));
- ss->fullscreen = true;
+ ss->fullscreen();
+ ss->is_fullscreen = true;
}
break;
case GDK_KEY_Return:
- sp_svgview_control_show (ss);
+ ss->control_show();
break;
case GDK_KEY_KP_Page_Down:
case GDK_KEY_Page_Down:
case GDK_KEY_Right:
case GDK_KEY_space:
- sp_svgview_show_next (ss);
+ ss->show_next();
break;
case GDK_KEY_KP_Page_Up:
case GDK_KEY_Page_Up:
case GDK_KEY_Left:
case GDK_KEY_BackSpace:
- sp_svgview_show_prev (ss);
+ ss->show_prev();
break;
case GDK_KEY_Escape:
case GDK_KEY_q:
@@ -152,7 +169,8 @@ static int sp_svgview_main_key_press (GtkWidget */*widget*/,
default:
break;
}
- gtk_window_set_title(GTK_WINDOW(ss->window), ss->doc->getName());
+
+ ss->set_title(ss->doc->getName());
return TRUE;
}
@@ -167,9 +185,8 @@ int main (int argc, const char **argv)
Gtk::Main main_instance (&argc, const_cast<char ***>(&argv));
- struct SPSlideShow ss;
-
int num_parsed_options = 0;
+ SPSlideShow ss;
// the list of arguments is in the net line
for (int i = 1; i < argc; i++) {
@@ -191,7 +208,6 @@ int main (int argc, const char **argv)
}
}
- GtkWidget *w;
int i;
bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
@@ -203,8 +219,6 @@ int main (int argc, const char **argv)
Inkscape::GC::init();
Inkscape::Preferences::get(); // ensure preferences are initialized
- gtk_init (&argc, (char ***) &argv);
-
#ifdef lalaWITH_MODULES
g_warning ("Have to autoinit modules (lauris)");
sp_modulesys_init();
@@ -215,15 +229,6 @@ int main (int argc, const char **argv)
setlocale (LC_NUMERIC, "C");
- ss.size = 32;
- ss.length = 0;
- ss.current = 0;
- ss.slides = g_new (char *, ss.size);
- ss.current = 0;
- ss.doc = NULL;
- ss.view = NULL;
- ss.fullscreen = false;
-
Inkscape::Application::create(argv[0], true);
//Inkscape::Application &inkscape = Inkscape::Application::instance();
@@ -254,21 +259,13 @@ int main (int argc, const char **argv)
}
}
} else if (gba->len > 0) {
- //::write(1, gba->data, gba->len);
- /* Append to list */
- if (ss.length >= ss.size) {
- /* Expand */
- ss.size <<= 1;
- ss.slides = g_renew (char *, ss.slides, ss.size);
- }
-
ss.doc = SPDocument::createNewDocFromMem ((const gchar *)gba->data,
gba->len,
TRUE);
gchar *last_filename = jar_file_reader.get_last_filename();
if (ss.doc) {
- ss.slides[ss.length++] = strdup (last_filename);
- (ss.doc)->setUri (last_filename);
+ ss.slides.push_back(strdup(last_filename));
+ (ss.doc)->setUri(last_filename);
}
g_byte_array_free(gba, TRUE);
g_free(last_filename);
@@ -279,16 +276,10 @@ int main (int argc, const char **argv)
} else {
#endif /* WITH_INKJAR */
/* Append to list */
- if (ss.length >= ss.size) {
- /* Expand */
- ss.size <<= 1;
- ss.slides = g_renew (char *, ss.slides, ss.size);
- }
-
- ss.slides[ss.length++] = strdup (argv[i]);
+ ss.slides.push_back(strdup (argv[i]));
if (!ss.doc) {
- ss.doc = SPDocument::createNewDoc (ss.slides[ss.current], TRUE, false);
+ ss.doc = SPDocument::createNewDoc((ss.slides[ss.current]).c_str(), TRUE, false);
if (!ss.doc) {
++ss.current;
}
@@ -303,24 +294,21 @@ int main (int argc, const char **argv)
return 1; /* none of the slides loadable */
}
- w = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- gtk_window_set_title( GTK_WINDOW(w), ss.doc->getName() );
- gtk_window_set_default_size (GTK_WINDOW (w),
- MIN ((int)(ss.doc)->getWidth().value("px"), (int)gdk_screen_width() - 64),
- MIN ((int)(ss.doc)->getHeight().value("px"), (int)gdk_screen_height() - 64));
- ss.window = w;
+ ss.set_title(ss.doc->getName() );
+ ss.set_default_size(MIN ((int)(ss.doc)->getWidth().value("px"), (int)gdk_screen_width() - 64),
+ MIN ((int)(ss.doc)->getHeight().value("px"), (int)gdk_screen_height() - 64));
- g_signal_connect (G_OBJECT (w), "delete_event", (GCallback) sp_svgview_main_delete, &ss);
- g_signal_connect (G_OBJECT (w), "key_press_event", (GCallback) sp_svgview_main_key_press, &ss);
+ g_signal_connect (G_OBJECT (ss.gobj()), "delete_event", (GCallback) sp_svgview_main_delete, &ss);
+ g_signal_connect (G_OBJECT (ss.gobj()), "key_press_event", (GCallback) sp_svgview_main_key_press, &ss);
(ss.doc)->ensureUpToDate();
ss.view = sp_svg_view_widget_new (ss.doc);
(ss.doc)->doUnref ();
SP_SVG_VIEW_WIDGET(ss.view)->setResize( false, ss.doc->getWidth().value("px"), ss.doc->getHeight().value("px") );
gtk_widget_show (ss.view);
- gtk_container_add (GTK_CONTAINER (w), ss.view);
+ ss.add(*Glib::wrap(ss.view));
- gtk_widget_show (w);
+ ss.show();
gtk_main ();
@@ -335,202 +323,153 @@ static int sp_svgview_ctrlwin_delete (GtkWidget */*widget*/,
return FALSE;
}
-static GtkWidget* sp_svgview_control_show(struct SPSlideShow *ss)
+/**
+ * @brief Show the control buttons (next, previous etc) for the application
+ */
+void SPSlideShow::control_show()
{
if (!ctrlwin) {
ctrlwin = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_resizable(GTK_WINDOW(ctrlwin), FALSE);
- gtk_window_set_transient_for(GTK_WINDOW(ctrlwin), GTK_WINDOW(ss->window));
- g_signal_connect(G_OBJECT (ctrlwin), "key_press_event", (GCallback) sp_svgview_main_key_press, ss);
+ gtk_window_set_transient_for(GTK_WINDOW(ctrlwin), GTK_WINDOW(this->gobj()));
+ g_signal_connect(G_OBJECT (ctrlwin), "key_press_event", (GCallback) sp_svgview_main_key_press, this);
g_signal_connect(G_OBJECT (ctrlwin), "delete_event", (GCallback) sp_svgview_ctrlwin_delete, NULL);
-
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *t = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
-#else
- GtkWidget *t = gtk_hbutton_box_new();
-#endif
-
+ auto t = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
gtk_container_add(GTK_CONTAINER(ctrlwin), t);
-#if GTK_CHECK_VERSION(3,10,0)
- GtkWidget *b = gtk_button_new_from_icon_name(INKSCAPE_ICON("go-first"), GTK_ICON_SIZE_BUTTON);
-#else
- GtkWidget *b = gtk_button_new();
- GtkWidget *img = gtk_image_new_from_icon_name(INKSCAPE_ICON("go-first"), GTK_ICON_SIZE_BUTTON);
- gtk_button_set_image(GTK_BUTTON(b), img);
-#endif
- gtk_container_add(GTK_CONTAINER(t), b);
-
- g_signal_connect(G_OBJECT(b), "clicked", (GCallback) sp_svgview_goto_first_cb, ss);
-#if GTK_CHECK_VERSION(3,10,0)
- b = gtk_button_new_from_icon_name(INKSCAPE_ICON("go-previous"), GTK_ICON_SIZE_BUTTON);
-#else
- b = gtk_button_new();
- img = gtk_image_new_from_icon_name(INKSCAPE_ICON("go-previous"), GTK_ICON_SIZE_BUTTON);
- gtk_button_set_image(GTK_BUTTON(b), img);
-#endif
- gtk_container_add(GTK_CONTAINER(t), b);
-
- g_signal_connect(G_OBJECT(b), "clicked", (GCallback) sp_svgview_show_prev_cb, ss);
-#if GTK_CHECK_VERSION(3,10,0)
- b = gtk_button_new_from_icon_name(INKSCAPE_ICON("go-next"), GTK_ICON_SIZE_BUTTON);
-#else
- b = gtk_button_new();
- img = gtk_image_new_from_icon_name(INKSCAPE_ICON("go-next"), GTK_ICON_SIZE_BUTTON);
- gtk_button_set_image(GTK_BUTTON(b), img);
-#endif
- gtk_container_add(GTK_CONTAINER(t), b);
-
- g_signal_connect(G_OBJECT(b), "clicked", (GCallback) sp_svgview_show_next_cb, ss);
-#if GTK_CHECK_VERSION(3,10,0)
- b = gtk_button_new_from_icon_name(INKSCAPE_ICON("go-last"), GTK_ICON_SIZE_BUTTON);
-#else
- b = gtk_button_new();
- img = gtk_image_new_from_icon_name(INKSCAPE_ICON("go-last"), GTK_ICON_SIZE_BUTTON);
- gtk_button_set_image(GTK_BUTTON(b), img);
-#endif
- gtk_container_add(GTK_CONTAINER(t), b);
- g_signal_connect(G_OBJECT(b), "clicked", (GCallback) sp_svgview_goto_last_cb, ss);
+ auto btn_go_first = Gtk::manage(new Gtk::Button());
+ auto img_go_first = Gtk::manage(new Gtk::Image());
+ img_go_first->set_from_icon_name(INKSCAPE_ICON("go-first"), Gtk::ICON_SIZE_BUTTON);
+ btn_go_first->set_image(*img_go_first);
+ gtk_container_add(GTK_CONTAINER(t), GTK_WIDGET(btn_go_first->gobj()));
+ btn_go_first->signal_clicked().connect(sigc::mem_fun(*this, &SPSlideShow::goto_first));
+
+ auto btn_go_prev = Gtk::manage(new Gtk::Button());
+ auto img_go_prev = Gtk::manage(new Gtk::Image());
+ img_go_prev->set_from_icon_name(INKSCAPE_ICON("go-previous"), Gtk::ICON_SIZE_BUTTON);
+ btn_go_prev->set_image(*img_go_prev);
+ gtk_container_add(GTK_CONTAINER(t), GTK_WIDGET(btn_go_prev->gobj()));
+ btn_go_prev->signal_clicked().connect(sigc::mem_fun(*this, &SPSlideShow::show_prev));
+
+ auto btn_go_next = Gtk::manage(new Gtk::Button());
+ auto img_go_next = Gtk::manage(new Gtk::Image());
+ img_go_next->set_from_icon_name(INKSCAPE_ICON("go-next"), Gtk::ICON_SIZE_BUTTON);
+ btn_go_next->set_image(*img_go_next);
+ gtk_container_add(GTK_CONTAINER(t), GTK_WIDGET(btn_go_next->gobj()));
+ btn_go_next->signal_clicked().connect(sigc::mem_fun(*this, &SPSlideShow::show_next));
+
+ auto btn_go_last = Gtk::manage(new Gtk::Button());
+ auto img_go_last = Gtk::manage(new Gtk::Image());
+ img_go_last->set_from_icon_name(INKSCAPE_ICON("go-last"), Gtk::ICON_SIZE_BUTTON);
+ btn_go_last->set_image(*img_go_last);
+ gtk_container_add(GTK_CONTAINER(t), GTK_WIDGET(btn_go_last->gobj()));
+ btn_go_last->signal_clicked().connect(sigc::mem_fun(*this, &SPSlideShow::goto_last));
+
gtk_widget_show_all(ctrlwin);
} else {
gtk_window_present(GTK_WINDOW(ctrlwin));
}
-
- return NULL;
-}
-
-static int sp_svgview_show_next_cb (GtkWidget */*widget*/, void *data)
-{
- sp_svgview_show_next(static_cast<struct SPSlideShow *>(data));
- return FALSE;
}
-static int sp_svgview_show_prev_cb (GtkWidget */*widget*/, void *data)
+void SPSlideShow::waiting_cursor()
{
- sp_svgview_show_prev(static_cast<struct SPSlideShow *>(data));
- return FALSE;
-}
-
-static int sp_svgview_goto_first_cb (GtkWidget */*widget*/, void *data)
-{
- sp_svgview_goto_first(static_cast<struct SPSlideShow *>(data));
- return FALSE;
-}
-
-static int sp_svgview_goto_last_cb (GtkWidget */*widget*/, void *data)
-{
- sp_svgview_goto_last(static_cast<struct SPSlideShow *>(data));
- return FALSE;
-}
-
-static void sp_svgview_waiting_cursor(struct SPSlideShow *ss)
-{
- GdkDisplay *display = gdk_display_get_default();
- GdkCursor *waiting = gdk_cursor_new_for_display(display, GDK_WATCH);
- gdk_window_set_cursor(gtk_widget_get_window(GTK_WIDGET(ss->window)), waiting);
-#if GTK_CHECK_VERSION(3,0,0)
- g_object_unref(waiting);
-#else
- gdk_cursor_unref(waiting);
-#endif
+ auto display = Gdk::Display::get_default();
+ auto waiting = Gdk::Cursor::create(display, Gdk::WATCH);
+ get_window()->set_cursor(waiting);
+
if (ctrlwin) {
- GdkCursor *waiting = gdk_cursor_new_for_display(display, GDK_WATCH);
- gdk_window_set_cursor(gtk_widget_get_window(GTK_WIDGET(ctrlwin)), waiting);
-#if GTK_CHECK_VERSION(3,0,0)
- g_object_unref(waiting);
-#else
- gdk_cursor_unref(waiting);
-#endif
+ gdk_window_set_cursor(gtk_widget_get_window(GTK_WIDGET(ctrlwin)), waiting->gobj());
}
while(gtk_events_pending()) {
gtk_main_iteration();
}
}
-static void sp_svgview_normal_cursor(struct SPSlideShow *ss)
+void SPSlideShow::normal_cursor()
{
- gdk_window_set_cursor(gtk_widget_get_window(GTK_WIDGET(ss->window)), NULL);
+ get_window()->set_cursor();
if (ctrlwin) {
gdk_window_set_cursor(gtk_widget_get_window(GTK_WIDGET(ctrlwin)), NULL);
}
}
-static void sp_svgview_set_document(struct SPSlideShow *ss,
- SPDocument *doc,
- int current)
+void SPSlideShow::set_document(SPDocument *doc,
+ int current)
{
- if (doc && doc != ss->doc) {
+ if (doc && doc != this->doc) {
doc->ensureUpToDate();
- reinterpret_cast<SPSVGView*>(SP_VIEW_WIDGET_VIEW (ss->view))->setDocument (doc);
- ss->doc = doc;
- ss->current = current;
+ reinterpret_cast<SPSVGView*>(SP_VIEW_WIDGET_VIEW (view))->setDocument (doc);
+ this->doc = doc;
+ this->current = current;
}
}
-static void sp_svgview_show_next (struct SPSlideShow *ss)
+/**
+ * @brief Show the next file in the slideshow
+ */
+void SPSlideShow::show_next()
{
- sp_svgview_waiting_cursor(ss);
+ waiting_cursor();
SPDocument *doc = NULL;
- int current = ss->current;
- while (!doc && (current < ss->length - 1)) {
- doc = SPDocument::createNewDoc (ss->slides[++current], TRUE, false);
+ while (!doc && (current < slides.size() - 1)) {
+ doc = SPDocument::createNewDoc ((slides[++current]).c_str(), TRUE, false);
}
- sp_svgview_set_document(ss, doc, current);
-
- sp_svgview_normal_cursor(ss);
+ set_document(doc, current);
+ normal_cursor();
}
-static void sp_svgview_show_prev (struct SPSlideShow *ss)
+/**
+ * @brief Show the previous file in the slideshow
+ */
+void SPSlideShow::show_prev()
{
- sp_svgview_waiting_cursor(ss);
+ waiting_cursor();
SPDocument *doc = NULL;
- int current = ss->current;
while (!doc && (current > 0)) {
- doc = SPDocument::createNewDoc (ss->slides[--current], TRUE, false);
+ doc = SPDocument::createNewDoc ((slides[--current]).c_str(), TRUE, false);
}
- sp_svgview_set_document(ss, doc, current);
-
- sp_svgview_normal_cursor(ss);
+ set_document(doc, current);
+ normal_cursor();
}
-static void sp_svgview_goto_first (struct SPSlideShow *ss)
+/**
+ * @brief Switch to first slide in slideshow
+ */
+void SPSlideShow::goto_first()
{
- sp_svgview_waiting_cursor(ss);
+ waiting_cursor();
SPDocument *doc = NULL;
int current = 0;
- while ( !doc && (current < ss->length - 1)) {
- if (current == ss->current) {
- break;
- }
- doc = SPDocument::createNewDoc (ss->slides[current++], TRUE, false);
+ while ( !doc && (current < slides.size() - 1)) {
+ doc = SPDocument::createNewDoc((slides[current++]).c_str(), TRUE, false);
}
- sp_svgview_set_document(ss, doc, current - 1);
+ set_document(doc, current - 1);
- sp_svgview_normal_cursor(ss);
+ normal_cursor();
}
-static void sp_svgview_goto_last (struct SPSlideShow *ss)
+/**
+ * @brief Switch to last slide in slideshow
+ */
+void SPSlideShow::goto_last()
{
- sp_svgview_waiting_cursor(ss);
+ waiting_cursor();
SPDocument *doc = NULL;
- int current = ss->length - 1;
+ int current = slides.size() - 1;
while (!doc && (current >= 0)) {
- if (current == ss->current) {
- break;
- }
- doc = SPDocument::createNewDoc (ss->slides[current--], TRUE, false);
+ doc = SPDocument::createNewDoc((slides[current--]).c_str(), TRUE, false);
}
- sp_svgview_set_document(ss, doc, current + 1);
+ set_document(doc, current + 1);
- sp_svgview_normal_cursor(ss);
+ normal_cursor();
}
#ifdef WITH_INKJAR
diff --git a/src/io/Makefile_insert b/src/io/Makefile_insert
deleted file mode 100644
index 35119ec7b..000000000
--- a/src/io/Makefile_insert
+++ /dev/null
@@ -1,26 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-ink_common_sources += \
- io/base64stream.h \
- io/base64stream.cpp \
- io/bufferstream.cpp \
- io/bufferstream.h \
- io/gzipstream.cpp \
- io/gzipstream.h \
- io/inkjar.cpp \
- io/inkjar.h \
- io/inkscapestream.cpp \
- io/inkscapestream.h \
- io/resource.cpp \
- io/resource.h \
- io/stringstream.cpp \
- io/stringstream.h \
- io/sys.h \
- io/sys.cpp \
- io/uristream.cpp \
- io/uristream.h \
- io/xsltstream.cpp \
- io/xsltstream.h
-
-#io_streamtest_SOURCES = io/streamtest.cpp
-#io_streamtest_LDADD = $(all_libs)
diff --git a/src/knot.cpp b/src/knot.cpp
index c914315ec..b57c938c3 100644
--- a/src/knot.cpp
+++ b/src/knot.cpp
@@ -124,21 +124,14 @@ SPKnot::SPKnot(SPDesktop *desktop, gchar const *tip)
}
SPKnot::~SPKnot() {
-#if GTK_CHECK_VERSION(3,0,0)
- GdkDisplay *display = gdk_display_get_default();
- GdkDeviceManager *dm = gdk_display_get_device_manager(display);
- GdkDevice *device = gdk_device_manager_get_client_pointer(dm);
+ auto display = gdk_display_get_default();
+ auto dm = gdk_display_get_device_manager(display);
+ auto device = gdk_device_manager_get_client_pointer(dm);
if ((this->flags & SP_KNOT_GRABBED) && gdk_display_device_is_grabbed(display, device)) {
// This happens e.g. when deleting a node in node tool while dragging it
gdk_device_ungrab(device, GDK_CURRENT_TIME);
}
-#else
- if ((this->flags & SP_KNOT_GRABBED) && gdk_pointer_is_grabbed ()) {
- // This happens e.g. when deleting a node in node tool while dragging it
- gdk_pointer_ungrab (GDK_CURRENT_TIME);
- }
-#endif
if (this->_event_handler_id > 0) {
g_signal_handler_disconnect(G_OBJECT (this->item), this->_event_handler_id);
@@ -152,11 +145,7 @@ SPKnot::~SPKnot() {
for (gint i = 0; i < SP_KNOT_VISIBLE_STATES; i++) {
if (this->cursor[i]) {
-#if GTK_CHECK_VERSION(3,0,0)
g_object_unref(this->cursor[i]);
-#else
- gdk_cursor_unref(this->cursor[i]);
-#endif
this->cursor[i] = NULL;
}
}
@@ -523,57 +512,33 @@ void SPKnot::setImage(guchar* normal, guchar* mouseover, guchar* dragging) {
void SPKnot::setCursor(GdkCursor* normal, GdkCursor* mouseover, GdkCursor* dragging) {
if (cursor[SP_KNOT_STATE_NORMAL]) {
-#if GTK_CHECK_VERSION(3,0,0)
g_object_unref(cursor[SP_KNOT_STATE_NORMAL]);
-#else
- gdk_cursor_unref(cursor[SP_KNOT_STATE_NORMAL]);
-#endif
}
cursor[SP_KNOT_STATE_NORMAL] = normal;
if (normal) {
-#if GTK_CHECK_VERSION(3,0,0)
g_object_ref(normal);
-#else
- gdk_cursor_ref(normal);
-#endif
}
if (cursor[SP_KNOT_STATE_MOUSEOVER]) {
-#if GTK_CHECK_VERSION(3,0,0)
g_object_unref(cursor[SP_KNOT_STATE_MOUSEOVER]);
-#else
- gdk_cursor_unref(cursor[SP_KNOT_STATE_MOUSEOVER]);
-#endif
}
cursor[SP_KNOT_STATE_MOUSEOVER] = mouseover;
if (mouseover) {
-#if GTK_CHECK_VERSION(3,0,0)
g_object_ref(mouseover);
-#else
- gdk_cursor_ref(mouseover);
-#endif
}
if (cursor[SP_KNOT_STATE_DRAGGING]) {
-#if GTK_CHECK_VERSION(3,0,0)
g_object_unref(cursor[SP_KNOT_STATE_DRAGGING]);
-#else
- gdk_cursor_unref(cursor[SP_KNOT_STATE_DRAGGING]);
-#endif
}
cursor[SP_KNOT_STATE_DRAGGING] = dragging;
if (dragging) {
-#if GTK_CHECK_VERSION(3,0,0)
g_object_ref(dragging);
-#else
- gdk_cursor_ref(dragging);
-#endif
}
}
diff --git a/src/layer-fns.cpp b/src/layer-fns.cpp
index 3e794a0a4..030ebc07e 100644
--- a/src/layer-fns.cpp
+++ b/src/layer-fns.cpp
@@ -36,11 +36,9 @@ bool is_layer(SPObject &object) {
* @returns NULL if there are no further layers under a parent
*/
SPObject *next_sibling_layer(SPObject *layer) {
- using std::find_if;
-
- return find_if<SPObject::SiblingIterator>(
- layer->getNext(), NULL, &is_layer
- );
+ SPObject::ChildrenList &list = layer->parent->children;
+ auto l = std::find_if(++list.iterator_to(*layer), list.end(), &is_layer);
+ return l != list.end() ? &*l : nullptr;
}
/** Finds the previous sibling layer for a \a layer
@@ -50,11 +48,9 @@ SPObject *next_sibling_layer(SPObject *layer) {
SPObject *previous_sibling_layer(SPObject *layer) {
using Inkscape::Algorithms::find_last_if;
- SPObject *sibling(find_last_if<SPObject::SiblingIterator>(
- layer->parent->firstChild(), layer, &is_layer
- ));
-
- return ( sibling != layer ) ? sibling : NULL;
+ SPObject::ChildrenList &list = layer->parent->children;
+ auto l = find_last_if(list.begin(), list.iterator_to(*layer), &is_layer);
+ return l != list.iterator_to(*layer) ? &*(l) : nullptr;
}
/** Finds the first child of a \a layer
@@ -62,16 +58,15 @@ SPObject *previous_sibling_layer(SPObject *layer) {
* @returns NULL if layer has no sublayers
*/
SPObject *first_descendant_layer(SPObject *layer) {
- using std::find_if;
-
- SPObject *first_descendant=NULL;
- while (layer) {
- layer = find_if<SPObject::SiblingIterator>(
- layer->firstChild(), NULL, &is_layer
- );
- if (layer) {
+ SPObject *first_descendant = nullptr;
+ while (true) {
+ auto tmp = std::find_if(layer->children.begin(), layer->children.end(), &is_layer);
+ if (tmp != layer->children.end()) {
first_descendant = layer;
+ } else {
+ break;
}
+ layer = &*tmp;
}
return first_descendant;
@@ -84,9 +79,8 @@ SPObject *first_descendant_layer(SPObject *layer) {
SPObject *last_child_layer(SPObject *layer) {
using Inkscape::Algorithms::find_last_if;
- return find_last_if<SPObject::SiblingIterator>(
- layer->firstChild(), NULL, &is_layer
- );
+ auto l = find_last_if(layer->children.begin(), layer->children.end(), &is_layer);
+ return l != layer->children.end() ? &*l : nullptr;
}
SPObject *last_elder_layer(SPObject *root, SPObject *layer) {
diff --git a/src/libavoid/Makefile_insert b/src/libavoid/Makefile_insert
deleted file mode 100644
index 3a9b97cef..000000000
--- a/src/libavoid/Makefile_insert
+++ /dev/null
@@ -1,37 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-libavoid/all: libavoid/libavoid.a
-
-libavoid/clean:
- rm -f libavoid/libavoid.a $(libavoid_libavoid_a_OBJECTS)
-
-libavoid_libavoid_a_SOURCES = \
- libavoid/assertions.h \
- libavoid/connector.cpp \
- libavoid/connector.h \
- libavoid/debug.h \
- libavoid/geometry.cpp \
- libavoid/geometry.h \
- libavoid/geomtypes.cpp \
- libavoid/geomtypes.h \
- libavoid/graph.cpp \
- libavoid/graph.h \
- libavoid/makepath.cpp \
- libavoid/makepath.h \
- libavoid/orthogonal.cpp \
- libavoid/orthogonal.h \
- libavoid/vpsc.cpp \
- libavoid/vpsc.h \
- libavoid/router.cpp \
- libavoid/router.h \
- libavoid/shape.cpp \
- libavoid/shape.h \
- libavoid/timer.cpp \
- libavoid/timer.h \
- libavoid/vertices.cpp \
- libavoid/vertices.h \
- libavoid/visibility.cpp \
- libavoid/visibility.h \
- libavoid/viscluster.cpp \
- libavoid/viscluster.h \
- libavoid/libavoid.h
diff --git a/src/libcola/Makefile_insert b/src/libcola/Makefile_insert
deleted file mode 100644
index dc032a289..000000000
--- a/src/libcola/Makefile_insert
+++ /dev/null
@@ -1,18 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-libcola/all: libcola.a
-
-libcola/clean:
- rm -f libcola/libcola.a $(libcola_libcola_a_OBJECTS)
-
-libcola_libcola_a_SOURCES = libcola/cola.h\
- libcola/cola.cpp\
- libcola/conjugate_gradient.cpp\
- libcola/conjugate_gradient.h\
- libcola/gradient_projection.cpp\
- libcola/gradient_projection.h\
- libcola/shortest_paths.cpp\
- libcola/shortest_paths.h\
- libcola/straightener.h\
- libcola/straightener.cpp\
- libcola/connected_components.cpp
diff --git a/src/libcroco/Makefile_insert b/src/libcroco/Makefile_insert
deleted file mode 100644
index 97ed49ee8..000000000
--- a/src/libcroco/Makefile_insert
+++ /dev/null
@@ -1,64 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-libcroco/all: libcroco/libcroco.a
-
-libcroco/clean:
- rm -f libcroco/libcroco.a $(libcroco_libcroco_a_OBJECTS)
-
-libcroco_libcroco_a_SOURCES = \
- libcroco/cr-utils.c \
- libcroco/cr-utils.h \
- libcroco/cr-input.c \
- libcroco/cr-input.h \
- libcroco/cr-enc-handler.c \
- libcroco/cr-enc-handler.h \
- libcroco/cr-num.c \
- libcroco/cr-num.h \
- libcroco/cr-rgb.c \
- libcroco/cr-rgb.h \
- libcroco/cr-token.c \
- libcroco/cr-token.h \
- libcroco/cr-tknzr.c \
- libcroco/cr-tknzr.h \
- libcroco/cr-term.c \
- libcroco/cr-term.h \
- libcroco/cr-attr-sel.c \
- libcroco/cr-attr-sel.h \
- libcroco/cr-pseudo.c \
- libcroco/cr-pseudo.h \
- libcroco/cr-additional-sel.c \
- libcroco/cr-additional-sel.h \
- libcroco/cr-simple-sel.c \
- libcroco/cr-simple-sel.h \
- libcroco/cr-selector.c \
- libcroco/cr-selector.h \
- libcroco/cr-doc-handler.c \
- libcroco/cr-doc-handler.h \
- libcroco/cr-parser.c \
- libcroco/cr-parser.h \
- libcroco/cr-declaration.c \
- libcroco/cr-declaration.h \
- libcroco/cr-statement.c \
- libcroco/cr-statement.h \
- libcroco/cr-stylesheet.c \
- libcroco/cr-stylesheet.h \
- libcroco/cr-cascade.c \
- libcroco/cr-cascade.h \
- libcroco/cr-om-parser.c \
- libcroco/cr-om-parser.h \
- libcroco/cr-style.c \
- libcroco/cr-style.h \
- libcroco/cr-libxml-node-iface.c \
- libcroco/cr-libxml-node-iface.h \
- libcroco/cr-node-iface.h \
- libcroco/cr-sel-eng.c \
- libcroco/cr-sel-eng.h \
- libcroco/cr-fonts.c \
- libcroco/cr-fonts.h \
- libcroco/cr-prop-list.c \
- libcroco/cr-prop-list.h \
- libcroco/cr-parsing-location.c \
- libcroco/cr-parsing-location.h \
- libcroco/cr-string.c \
- libcroco/cr-string.h \
- libcroco/libcroco.h
diff --git a/src/libdepixelize/Makefile_insert b/src/libdepixelize/Makefile_insert
deleted file mode 100644
index 8aed7244f..000000000
--- a/src/libdepixelize/Makefile_insert
+++ /dev/null
@@ -1,22 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-libdepixelize/all: libdepixelize/libdepixelize.a
-
-libdepixelize/clean:
- rm -f libdepixelize/libdepixelize.a $(libdepixelize_libdepixelize_a_OBJECTS)
-
-libdepixelize_libdepixelize_a_SOURCES = \
- libdepixelize/kopftracer2011.cpp \
- libdepixelize/kopftracer2011.h \
- libdepixelize/splines.h \
- libdepixelize/priv/branchless.h \
- libdepixelize/priv/colorspace.h \
- libdepixelize/priv/curvature.h \
- libdepixelize/priv/homogeneoussplines.h \
- libdepixelize/priv/integral.h \
- libdepixelize/priv/iterator.h \
- libdepixelize/priv/optimization-kopf2011.h \
- libdepixelize/priv/pixelgraph.h \
- libdepixelize/priv/point.h \
- libdepixelize/priv/simplifiedvoronoi.h \
- libdepixelize/priv/splines-kopf2011.h
diff --git a/src/libgdl/CMakeLists.txt b/src/libgdl/CMakeLists.txt
deleted file mode 100644
index a452320f7..000000000
--- a/src/libgdl/CMakeLists.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-if (NOT "${WITH_EXT_GDL}")
-
- set(libgdl_SRC
- gdl-dock-bar.c
- gdl-dock-item-button-image.c
- gdl-dock-item-grip.c
- gdl-dock-item.c
- gdl-dock-master.c
- gdl-dock-notebook.c
- gdl-dock-object.c
- gdl-dock-paned.c
- gdl-dock-placeholder.c
- gdl-dock-tablabel.c
- gdl-dock.c
- gdl-i18n.c
- gdl-switcher.c
- libgdlmarshal.c
- libgdltypebuiltins.c
-
-
- # -------
- # Headers
- gdl-dock-bar.h
- gdl-dock-item-button-image.h
- gdl-dock-item-grip.h
- gdl-dock-item.h
- gdl-dock-master.h
- gdl-dock-notebook.h
- gdl-dock-object.h
- gdl-dock-paned.h
- gdl-dock-placeholder.h
- gdl-dock-tablabel.h
- gdl-dock.h
- gdl-i18n.h
- gdl-switcher.h
- gdl.h
- libgdlmarshal.h
- libgdltypebuiltins.h
- )
-
- if(WIN32)
- list(APPEND libgdl_SRC
- gdl-win32.c
- gdl-win32.h
- )
- endif()
-
- add_inkscape_lib(gdl_LIB "${libgdl_SRC}")
-
-endif()
diff --git a/src/libgdl/Makefile_insert b/src/libgdl/Makefile_insert
deleted file mode 100644
index e4cab95fc..000000000
--- a/src/libgdl/Makefile_insert
+++ /dev/null
@@ -1,92 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-if WITH_EXT_GDL
-
-EXTRA_DIST += \
- libgdl/gdl-dock-object.h \
- libgdl/gdl-dock-master.h \
- libgdl/gdl-dock.h \
- libgdl/gdl-dock-item.h \
- libgdl/gdl-dock-notebook.h \
- libgdl/gdl-dock-paned.h \
- libgdl/gdl-dock-tablabel.h \
- libgdl/gdl-dock-placeholder.h \
- libgdl/gdl-dock-bar.h \
- libgdl/gdl-i18n.h \
- libgdl/gdl-i18n.c \
- libgdl/gdl-dock-object.c \
- libgdl/gdl-dock-master.c \
- libgdl/gdl-dock.c \
- libgdl/gdl-dock-item.c \
- libgdl/gdl-dock-item-button-image.c \
- libgdl/gdl-dock-item-button-image.h \
- libgdl/gdl-dock-item-grip.h \
- libgdl/gdl-dock-item-grip.c \
- libgdl/gdl-dock-notebook.c \
- libgdl/gdl-dock-paned.c \
- libgdl/gdl-dock-tablabel.c \
- libgdl/gdl-dock-placeholder.c \
- libgdl/gdl-dock-bar.c \
- libgdl/gdl-switcher.h \
- libgdl/gdl-switcher.c \
- libgdl/gdl-win32.h \
- libgdl/gdl-win32.c \
- libgdl/libgdltypebuiltins.h \
- libgdl/libgdltypebuiltins.c \
- libgdl/libgdlmarshal.h \
- libgdl/libgdlmarshal.c \
- libgdl/gdl.h
-
-else # WITH_EXT_GDL
-
-libgdl/all: libgdl/libgdl.a
-
-libgdl/clean:
- rm -f libgdl/libgdl.a $(libgdl_gdl_a_OBJECTS)
-
-# Suppress some non-critical warnings for libgdl. We will drop our forked copy
-# of GDL once we upgrade to Gtk+ 3 so it's more important to minimise the number
-# of changes we make to GDL than to fix these minor issues in trunk.
-
-if CC_WNO_UNUSED_BUT_SET_VARIABLE_SUPPORTED
-libgdl_libgdl_a_CFLAGS = -Wno-unused-parameter -Wno-sign-compare -Wno-unused-variable -Wno-unused-but-set-variable -Wno-missing-field-initializers $(AM_CFLAGS)
-else
-libgdl_libgdl_a_CFLAGS = -Wno-unused-parameter -Wno-sign-compare -Wno-unused-variable -Wno-missing-field-initializers $(AM_CFLAGS)
-endif
-
-libgdl_libgdl_a_SOURCES = \
- libgdl/gdl-dock-object.h \
- libgdl/gdl-dock-master.h \
- libgdl/gdl-dock.h \
- libgdl/gdl-dock-item.h \
- libgdl/gdl-dock-notebook.h \
- libgdl/gdl-dock-paned.h \
- libgdl/gdl-dock-tablabel.h \
- libgdl/gdl-dock-placeholder.h \
- libgdl/gdl-dock-bar.h \
- libgdl/gdl-i18n.h \
- libgdl/gdl-i18n.c \
- libgdl/gdl-dock-object.c \
- libgdl/gdl-dock-master.c \
- libgdl/gdl-dock.c \
- libgdl/gdl-dock-item.c \
- libgdl/gdl-dock-item-button-image.c \
- libgdl/gdl-dock-item-button-image.h \
- libgdl/gdl-dock-item-grip.h \
- libgdl/gdl-dock-item-grip.c \
- libgdl/gdl-dock-notebook.c \
- libgdl/gdl-dock-paned.c \
- libgdl/gdl-dock-tablabel.c \
- libgdl/gdl-dock-placeholder.c \
- libgdl/gdl-dock-bar.c \
- libgdl/gdl-switcher.h \
- libgdl/gdl-switcher.c \
- libgdl/gdl-win32.h \
- libgdl/gdl-win32.c \
- libgdl/libgdltypebuiltins.h \
- libgdl/libgdltypebuiltins.c \
- libgdl/libgdlmarshal.h \
- libgdl/libgdlmarshal.c \
- libgdl/gdl.h
-
-endif
diff --git a/src/libgdl/README.gdl-dock b/src/libgdl/README.gdl-dock
deleted file mode 100644
index 113926dbe..000000000
--- a/src/libgdl/README.gdl-dock
+++ /dev/null
@@ -1,184 +0,0 @@
-This file is meant to contain a little documentation about the GdlDock
-and related widgets. It's incomplete and probably a bit out of date.
-And it probably belongs to a doc/ subdirectory.
-
-Please send comments to the devtools list (gnome-devtools@gnome.org)
-and report bugs to bugzilla (bugzilla.gnome.org). Also check the todo
-list at the end of this document.
-
-Have fun,
-Gustavo
-
-
-Overview
---------
-
-The GdlDock is a hierarchical based docking widget. It is composed of
-widgets derived from the abstract class GdlDockObject which defines
-the basic interface for docking widgets on top of others.
-
-The toplevel entries for docks are GdlDock widgets, which in turn hold
-a tree of GdlDockItem widgets. For the toplevel docks to be able to
-interact with each other (when the user drags items from one place to
-another) they're all kept in a user-invisible and automatic object
-called the master. To participate in docking operations every
-GdlDockObject must have the same master (the binding to the master is
-done automatically). The master also keeps track of the manual items
-(mostly those created with gdl_dock_*_new functions) which are in the
-dock.
-
-Layout loading/saving service is provided by a separate object called
-GdlDockLayout. Currently it stores information in XML format, but
-another backend could be easily written. To keep the external XML
-file in sync with the dock, monitor the "dirty" property of the layout
-object and call gdl_dock_layout_save_to_file when this changes to
-TRUE. No other action is required (the layout_changed is monitored by
-the layout object for you now).
-
-
-GdlDockObject
-=============
-
-A DockObject has:
-
-- a master, which manages all the objects in a dock ring ("master"
- property, construct only).
-
-- a name. If the object is manual the name can be used to recall the
- object from any other object in the ring ("name" property).
-
-- a long, descriptive name ("long-name" property).
-
-A DockObject can be:
-
-- automatic or manual. If it's automatic it means the lifecycle of
- the object is entirely managed by the dock master. If it's manual
- in general means the user specified such object, and so it's not to
- be destroyed automatically at any time.
-
-- frozen. In this case any call to reduce on the object has no
- immediate effect. When the object is later thawn, any pending
- reduce calls are made (maybe leading to the destruction of the
- object).
-
-- attached or detached. In general for dock items, being attached
- will mean the item has its widget->parent set. For docks it will
- mean they belong to some dock master's ring. In general, automatic
- objects which are detached will be destroyed (unless frozen).
-
-- bound to a master or free. In order to participate in dock
- operations, each dock object must be bound to a dock master (which
- is a separate, non-gui object). In general, bindings are treated
- automatically by the object, and this is entirely true for automatic
- objects. For manual objects, the master holds an additional
- reference and has structures to store and recall them by nick names.
- Normally, a manual object will only be destroyed when it's unbound
- from the master.
-
-- simple or compound. This actually depends on the subclass of the
- dock object. The difference is made so we can put restrictions in
- how the objects are docked on top of another (e.g. you can't dock a
- compound object inside a notebook). If you look at the whole
- docking layout as a tree, simple objects are the leaves, while all
- the interior nodes are compound.
-
-- reduced. This is only meaningful for compound objects. If the
- number of contained items has decreased to one the compound type
- object is no longer necessary to hold the child. In this case the
- child is reattached to the object's parent. If the number of
- contained items has reached zero, the object is detached and reduce
- is called on its parent. For toplevel docks, the object is only
- detached if it's automatic. In any case, the future of the object
- itself depends on whether it's automatic or manual.
-
-- requested to possibly dock another object. Depending on the
- type's behavior, the object can accept or reject this request. If
- it accepts it, it should fill in some additional information
- regarding how it will host the peer object.
-
-- asked to dock another object. Depending on the object's internal
- structure and behavior two options can be taken: to dock the object
- directly (e.g. a notebook docking another object); or to create an
- automatic compound object which will be attached in place of the
- actual object, and will host both the original object and the
- requestor (e.g. a simple item docking another simple item, which
- should create a paned/notebook). The type of the new object will be
- decided by the original objet based on the docking position.
-
-
-DETACHING: the action by which an object is unparented. The object is
-then ready to be docked in some other place. Newly created objects
-are always detached, except for toplevels (which are created attached
-by default). An automatic object which is detached gets destroyed
-afterwards, since its ref count drops to zero. Floating automatic
-toplevels never reach a zero ref count when detached, since the
-GtkWindow always keeps a reference to it (and the GtkWindow has a user
-reference). That's why floating automatic toplevels are destroyed
-when reduced.
-
-REDUCING: for compound objects, when the number of contained children
-drops to one or zero, the container is no longer necessary. In this
-case, the object is detached, and any remaining child is reattached to
-the object's former parent. The limit for toplevels is one for
-automatic objects and zero for manual (i.e. they can even be empty).
-For simple (not compound) objects reducing doesn't make sense.
-
-UNBINDING: to participate in a dock ring, every object must be bound
-to a master. The master connects to dock item signals and keeps a
-list of bound toplevels. Additionally, a reference is kept for manual
-objects (this is so the user doesn't need to keep track of them, but
-can perform operations like hiding and such).
-
-
-
-GdlDock
-=======
-
-- Properties:
-
- "floating" (gboolean, construct-only): whether the dock is floating in
- its own window or not.
-
- "default-title" (gchar, read-write): title for new floating docks.
- This property is proxied to the master, which truly holds it.
-
-The title for the floating docks is: the user supplied title
-(GdlDockObject's long_name property) if it's set, the default title
-(from the master) or an automatically generated title.
-
-
-- Signals:
-
- "layout-changed": emitted when the user changed the layout of the
- dock somehow.
-
-
-TODO LIST
-=========
-
-- Functionality for the item grip: provide a11y
-
-- Implement notebook tab reordering
-
-- Implement dock bands for toolbars and menus.
-
-- A dock-related thing is to build resizable toolbars (something like
- the ones Windows have, where the buttons are reflowed according to
- the space available).
-
-- Redesign paneds so they can hold more than two items and resize all
- of them at once by using the handle (see if gimpdock does that).
-
-- Find a way to allow the merging of menu items to the item's popup
- menu. Also, there should be a way for the master to insert some
- menu items.
-
-- Bonobo UI synchronizer.
-
-- Item behavoirs: implement the ones missing and maybe think more of
- them (e.g. positions where it's possible to dock the item, etc.)
-
-- Make a nicer dragbar for the items, with buttons for undocking,
- closing, hidding, etc. (See sodipodi, kdevelop)
-
-
diff --git a/src/libgdl/gdl-dock-bar.c b/src/libgdl/gdl-dock-bar.c
deleted file mode 100644
index c1fe21872..000000000
--- a/src/libgdl/gdl-dock-bar.c
+++ /dev/null
@@ -1,1049 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * This file is part of the GNOME Devtools Libraries.
- *
- * Copyright (C) 2003 Jeroen Zwartepoorte <jeroen@xs4all.nl>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "gdl-i18n.h"
-#include <stdlib.h>
-#include <string.h>
-
-#include "gdl-dock.h"
-#include "gdl-dock-master.h"
-#include "gdl-dock-bar.h"
-#include "libgdltypebuiltins.h"
-
-enum {
- PROP_0,
- PROP_MASTER,
- PROP_DOCKBAR_STYLE
-};
-
-/* ----- Private prototypes ----- */
-
-static void gdl_dock_bar_class_init (GdlDockBarClass *klass);
-
-static void gdl_dock_bar_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
-static void gdl_dock_bar_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-
-static void gdl_dock_bar_destroy (GtkObject *object);
-
-static void gdl_dock_bar_attach (GdlDockBar *dockbar,
- GdlDockMaster *master);
-static void gdl_dock_bar_remove_item (GdlDockBar *dockbar,
- GdlDockItem *item);
-
-/* ----- Class variables and definitions ----- */
-
-struct _GdlDockBarPrivate {
- GdlDockMaster *master;
- GSList *items;
- GtkOrientation orientation;
- GdlDockBarStyle dockbar_style;
-};
-
-/* ----- Private functions ----- */
-
-G_DEFINE_TYPE (GdlDockBar, gdl_dock_bar, GTK_TYPE_BOX)
-
-static void gdl_dock_bar_size_request (GtkWidget *widget,
- GtkRequisition *requisition );
-static void gdl_dock_bar_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation );
-static void gdl_dock_bar_size_vrequest (GtkWidget *widget,
- GtkRequisition *requisition );
-static void gdl_dock_bar_size_vallocate (GtkWidget *widget,
- GtkAllocation *allocation );
-static void gdl_dock_bar_size_hrequest (GtkWidget *widget,
- GtkRequisition *requisition );
-static void gdl_dock_bar_size_hallocate (GtkWidget *widget,
- GtkAllocation *allocation );
-static void update_dock_items (GdlDockBar *dockbar, gboolean full_update);
-
-void
-gdl_dock_bar_class_init (GdlDockBarClass *klass)
-{
- GObjectClass *g_object_class;
- GtkObjectClass *gtk_object_class;
- GtkWidgetClass *widget_class;
-
- g_object_class = G_OBJECT_CLASS (klass);
- gtk_object_class = GTK_OBJECT_CLASS (klass);
-
- g_object_class->get_property = gdl_dock_bar_get_property;
- g_object_class->set_property = gdl_dock_bar_set_property;
-
- gtk_object_class->destroy = gdl_dock_bar_destroy;
-
- g_object_class_install_property (
- g_object_class, PROP_MASTER,
- g_param_spec_object ("master", _("Master"),
- _("GdlDockMaster object which the dockbar widget "
- "is attached to"),
- GDL_TYPE_DOCK_MASTER,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (
- g_object_class, PROP_DOCKBAR_STYLE,
- g_param_spec_enum ("dockbar-style", _("Dockbar style"),
- _("Dockbar style to show items on it"),
- GDL_TYPE_DOCK_BAR_STYLE,
- GDL_DOCK_BAR_BOTH,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
-
- widget_class = GTK_WIDGET_CLASS (klass);
- widget_class->size_request = gdl_dock_bar_size_request;
- widget_class->size_allocate = gdl_dock_bar_size_allocate;
-}
-
-static void
-gdl_dock_bar_init (GdlDockBar *dockbar)
-{
- dockbar->_priv = g_new0 (GdlDockBarPrivate, 1);
- dockbar->_priv->master = NULL;
- dockbar->_priv->items = NULL;
- dockbar->_priv->orientation = GTK_ORIENTATION_VERTICAL;
- dockbar->_priv->dockbar_style = GDL_DOCK_BAR_BOTH;
-}
-
-static void
-gdl_dock_bar_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- GdlDockBar *dockbar = GDL_DOCK_BAR (object);
-
- switch (prop_id) {
- case PROP_MASTER:
- g_value_set_object (value, dockbar->_priv->master);
- break;
- case PROP_DOCKBAR_STYLE:
- g_value_set_enum (value, dockbar->_priv->dockbar_style);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- };
-}
-
-static void
-gdl_dock_bar_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- GdlDockBar *dockbar = GDL_DOCK_BAR (object);
-
- switch (prop_id) {
- case PROP_MASTER:
- gdl_dock_bar_attach (dockbar, g_value_get_object (value));
- break;
- case PROP_DOCKBAR_STYLE:
- dockbar->_priv->dockbar_style = g_value_get_enum (value);
- update_dock_items (dockbar, TRUE);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- };
-}
-
-static void
-on_dock_item_foreach_disconnect (GdlDockItem *item, GdlDockBar *dock_bar)
-{
- g_signal_handlers_disconnect_by_func (item, gdl_dock_bar_remove_item,
- dock_bar);
-}
-
-static void
-gdl_dock_bar_destroy (GtkObject *object)
-{
- GdlDockBar *dockbar = GDL_DOCK_BAR (object);
-
- if (dockbar->_priv) {
- GdlDockBarPrivate *priv = dockbar->_priv;
-
- if (priv->items) {
- g_slist_foreach (priv->items,
- (GFunc) on_dock_item_foreach_disconnect,
- object);
- g_slist_free (priv->items);
- }
-
- if (priv->master) {
- g_signal_handlers_disconnect_matched (priv->master,
- G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, dockbar);
- g_object_unref (priv->master);
- priv->master = NULL;
- }
-
- dockbar->_priv = NULL;
-
- g_free (priv);
- }
-
- GTK_OBJECT_CLASS (gdl_dock_bar_parent_class)->destroy (object);
-}
-
-static void
-gdl_dock_bar_remove_item (GdlDockBar *dockbar,
- GdlDockItem *item)
-{
- GdlDockBarPrivate *priv;
- GtkWidget *button;
-
- g_return_if_fail (GDL_IS_DOCK_BAR (dockbar));
- g_return_if_fail (GDL_IS_DOCK_ITEM (item));
-
- priv = dockbar->_priv;
-
- if (g_slist_index (priv->items, item) == -1) {
- g_warning ("Item has not been added to the dockbar");
- return;
- }
-
- priv->items = g_slist_remove (priv->items, item);
-
- button = g_object_get_data (G_OBJECT (item), "GdlDockBarButton");
- g_assert (button != NULL);
- gtk_container_remove (GTK_CONTAINER (dockbar), button);
- g_object_set_data (G_OBJECT (item), "GdlDockBarButton", NULL);
- g_signal_handlers_disconnect_by_func (item,
- G_CALLBACK (gdl_dock_bar_remove_item),
- dockbar);
-}
-
-static void
-gdl_dock_bar_item_clicked (GtkWidget *button,
- GdlDockItem *item)
-{
- GdlDockBar *dockbar;
- GdlDockObject *controller;
-
- g_return_if_fail (item != NULL);
-
- dockbar = g_object_get_data (G_OBJECT (item), "GdlDockBar");
- g_assert (dockbar != NULL);
- g_object_set_data (G_OBJECT (item), "GdlDockBar", NULL);
-
- controller = gdl_dock_master_get_controller (GDL_DOCK_OBJECT_GET_MASTER (item));
-
- GDL_DOCK_OBJECT_UNSET_FLAGS (item, GDL_DOCK_ICONIFIED);
- gdl_dock_item_show_item (item);
- gdl_dock_bar_remove_item (dockbar, item);
- gtk_widget_queue_resize (GTK_WIDGET (controller));
-}
-
-static void
-gdl_dock_bar_add_item (GdlDockBar *dockbar,
- GdlDockItem *item)
-{
- GdlDockBarPrivate *priv;
- GtkWidget *button;
- gchar *stock_id;
- gchar *name;
- GdkPixbuf *pixbuf_icon;
- GtkWidget *image, *box, *label;
-
- g_return_if_fail (GDL_IS_DOCK_BAR (dockbar));
- g_return_if_fail (GDL_IS_DOCK_ITEM (item));
-
- priv = dockbar->_priv;
-
- if (g_slist_index (priv->items, item) != -1) {
- g_warning ("Item has already been added to the dockbar");
- return;
- }
-
- priv->items = g_slist_append (priv->items, item);
-
- /* Create a button for the item. */
- button = gtk_button_new ();
- gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
-
- if (dockbar->_priv->orientation == GTK_ORIENTATION_HORIZONTAL)
- box = gtk_hbox_new (FALSE, 0);
- else
- box = gtk_vbox_new (FALSE, 0);
-
- g_object_get (item, "stock-id", &stock_id, "pixbuf-icon", &pixbuf_icon,
- "long-name", &name, NULL);
-
- if (dockbar->_priv->dockbar_style == GDL_DOCK_BAR_TEXT ||
- dockbar->_priv->dockbar_style == GDL_DOCK_BAR_BOTH) {
- label = gtk_label_new (name);
- if (dockbar->_priv->orientation == GTK_ORIENTATION_VERTICAL)
- gtk_label_set_angle (GTK_LABEL (label), 90);
- gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0);
- }
-
- /* FIXME: For now AUTO behaves same as BOTH */
-
- if (dockbar->_priv->dockbar_style == GDL_DOCK_BAR_ICONS ||
- dockbar->_priv->dockbar_style == GDL_DOCK_BAR_BOTH ||
- dockbar->_priv->dockbar_style == GDL_DOCK_BAR_AUTO) {
- if (stock_id) {
- image = gtk_image_new_from_stock (stock_id,
- GTK_ICON_SIZE_SMALL_TOOLBAR);
- g_free (stock_id);
- } else if (pixbuf_icon) {
- image = gtk_image_new_from_pixbuf (pixbuf_icon);
- } else {
- image = gtk_image_new_from_stock ("gtk-new",
- GTK_ICON_SIZE_SMALL_TOOLBAR);
- }
- gtk_box_pack_start (GTK_BOX (box), image, TRUE, TRUE, 0);
- }
-
- gtk_container_add (GTK_CONTAINER (button), box);
- gtk_box_pack_start (GTK_BOX (dockbar), button, FALSE, FALSE, 0);
-
- gtk_widget_set_tooltip_text (button, name);
- g_free (name);
-
- g_object_set_data (G_OBJECT (item), "GdlDockBar", dockbar);
- g_object_set_data (G_OBJECT (item), "GdlDockBarButton", button);
- g_signal_connect (G_OBJECT (button), "clicked",
- G_CALLBACK (gdl_dock_bar_item_clicked), item);
-
- gtk_widget_show_all (button);
-
- /* Set up destroy notify */
- g_signal_connect_swapped (item, "destroy",
- G_CALLBACK (gdl_dock_bar_remove_item),
- dockbar);
-}
-
-static void
-build_list (GdlDockObject *object, GList **list)
-{
- /* add only items, not toplevels */
- if (GDL_IS_DOCK_ITEM (object))
- *list = g_list_prepend (*list, object);
-}
-
-static void
-update_dock_items (GdlDockBar *dockbar, gboolean full_update)
-{
- GdlDockMaster *master;
- GList *items, *l;
-
- g_return_if_fail (dockbar != NULL);
-
- if (!dockbar->_priv->master)
- return;
-
- master = dockbar->_priv->master;
-
- /* build items list */
- items = NULL;
- gdl_dock_master_foreach (master, (GFunc) build_list, &items);
-
- if (!full_update) {
- for (l = items; l != NULL; l = l->next) {
- GdlDockItem *item = GDL_DOCK_ITEM (l->data);
-
- if (g_slist_index (dockbar->_priv->items, item) != -1 &&
- !GDL_DOCK_ITEM_ICONIFIED (item))
- gdl_dock_bar_remove_item (dockbar, item);
- else if (g_slist_index (dockbar->_priv->items, item) == -1 &&
- GDL_DOCK_ITEM_ICONIFIED (item))
- gdl_dock_bar_add_item (dockbar, item);
- }
- } else {
- for (l = items; l != NULL; l = l->next) {
- GdlDockItem *item = GDL_DOCK_ITEM (l->data);
-
- if (g_slist_index (dockbar->_priv->items, item) != -1)
- gdl_dock_bar_remove_item (dockbar, item);
- if (GDL_DOCK_ITEM_ICONIFIED (item))
- gdl_dock_bar_add_item (dockbar, item);
- }
- }
- g_list_free (items);
-}
-
-static void
-gdl_dock_bar_layout_changed_cb (GdlDockMaster *master,
- GdlDockBar *dockbar)
-{
- update_dock_items (dockbar, FALSE);
-}
-
-static void
-gdl_dock_bar_attach (GdlDockBar *dockbar,
- GdlDockMaster *master)
-{
- g_return_if_fail (dockbar != NULL);
- g_return_if_fail (master == NULL || GDL_IS_DOCK_MASTER (master));
-
- if (dockbar->_priv->master) {
- g_signal_handlers_disconnect_matched (dockbar->_priv->master,
- G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, dockbar);
- g_object_unref (dockbar->_priv->master);
- }
-
- dockbar->_priv->master = master;
- if (dockbar->_priv->master) {
- g_object_ref (dockbar->_priv->master);
- g_signal_connect (dockbar->_priv->master, "layout-changed",
- G_CALLBACK (gdl_dock_bar_layout_changed_cb),
- dockbar);
- }
-
- update_dock_items (dockbar, FALSE);
-}
-
-static void gdl_dock_bar_size_request (GtkWidget *widget,
- GtkRequisition *requisition )
-{
- GdlDockBar *dockbar;
-
- dockbar = GDL_DOCK_BAR (widget);
-
- /* default to vertical for unknown values */
- switch (dockbar->_priv->orientation) {
- case GTK_ORIENTATION_HORIZONTAL:
- gdl_dock_bar_size_hrequest (widget, requisition);
- break;
- case GTK_ORIENTATION_VERTICAL:
- default:
- gdl_dock_bar_size_vrequest (widget, requisition);
- break;
- }
-}
-
-static void gdl_dock_bar_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation )
-{
- GdlDockBar *dockbar;
-
- dockbar = GDL_DOCK_BAR (widget);
-
- /* default to vertical for unknown values */
- switch (dockbar->_priv->orientation) {
- case GTK_ORIENTATION_HORIZONTAL:
- gdl_dock_bar_size_hallocate (widget, allocation);
- break;
- case GTK_ORIENTATION_VERTICAL:
- default:
- gdl_dock_bar_size_vallocate (widget, allocation);
- break;
- }
-}
-
-static void gdl_dock_bar_size_vrequest (GtkWidget *widget,
- GtkRequisition *requisition )
-{
- GtkBox *box;
- GtkRequisition child_requisition;
- GList *child;
- gint nvis_children;
- gint height;
- guint border_width;
-
- box = GTK_BOX (widget);
- requisition->width = 0;
- requisition->height = 0;
- nvis_children = 0;
-
-
- for (child = gtk_container_get_children (GTK_CONTAINER (box));
- child != NULL; child = g_list_next (child))
- {
- if (gtk_widget_get_visible (GTK_WIDGET (child->data)))
- {
- guint padding;
- gboolean expand;
- gboolean fill;
- GtkPackType pack_type;
-
- gtk_widget_size_request (GTK_WIDGET (child->data), &child_requisition);
-
- gtk_box_query_child_packing (box,
- child->data,
- &expand,
- &fill,
- &padding,
- &pack_type);
-
- if (gtk_box_get_homogeneous (box))
- {
- height = child_requisition.height + padding * 2;
- requisition->height = MAX (requisition->height, height);
- }
- else
- {
- requisition->height += child_requisition.height + padding * 2;
- }
-
- requisition->width = MAX (requisition->width, child_requisition.width);
-
- nvis_children += 1;
- }
- }
-
- if (nvis_children > 0)
- {
- if (gtk_box_get_homogeneous (box))
- requisition->height *= nvis_children;
- requisition->height += (nvis_children - 1) * gtk_box_get_spacing (box);
- }
-
- border_width = gtk_container_get_border_width (GTK_CONTAINER (box));
- requisition->width += border_width * 2;
- requisition->height += border_width * 2;
-
-}
-
-static void gdl_dock_bar_size_vallocate (GtkWidget *widget,
- GtkAllocation *allocation)
-{
- GtkBox *box;
- GList *child;
- GtkAllocation child_allocation;
- gint nvis_children;
- gint nexpand_children;
- gint child_height;
- gint height;
- gint extra;
- gint y;
- guint border_width;
- GtkRequisition requisition;
-
- box = GTK_BOX (widget);
- gtk_widget_set_allocation (widget, allocation);
-
- gtk_widget_get_requisition (widget, &requisition);
-
- nvis_children = 0;
- nexpand_children = 0;
-
- for (child = gtk_container_get_children (GTK_CONTAINER (box));
- child != NULL; child = g_list_next (child))
- {
- guint padding;
- gboolean expand;
- gboolean fill;
- GtkPackType pack_type;
-
- gtk_box_query_child_packing (box,
- child->data,
- &expand,
- &fill,
- &padding,
- &pack_type);
- if (gtk_widget_get_visible (GTK_WIDGET(child->data)))
- {
- nvis_children += 1;
- if (expand)
- nexpand_children += 1;
- }
- }
-
- border_width = gtk_container_get_border_width (GTK_CONTAINER (box));
-
- if (nvis_children > 0)
- {
- if (gtk_box_get_homogeneous (box))
- {
- height = (allocation->height -
- border_width * 2 -
- (nvis_children - 1) * gtk_box_get_spacing (box));
- extra = height / nvis_children;
- }
- else if (nexpand_children > 0)
- {
- height = (gint) allocation->height - (gint) requisition.height;
- extra = height / nexpand_children;
- }
- else
- {
- height = 0;
- extra = 0;
- }
-
- y = allocation->y + border_width;
- child_allocation.x = allocation->x + border_width;
- child_allocation.width = MAX (1, (gint) allocation->width - (gint) border_width * 2);
-
- for (child = gtk_container_get_children (GTK_CONTAINER (box));
- child != NULL; child = g_list_next (child))
- {
- guint padding;
- gboolean expand;
- gboolean fill;
- GtkPackType pack_type;
-
- gtk_box_query_child_packing (box,
- child->data,
- &expand,
- &fill,
- &padding,
- &pack_type);
-
- if ((pack_type == GTK_PACK_START) && gtk_widget_get_visible (GTK_WIDGET (child->data)))
- {
- if (gtk_box_get_homogeneous (box))
- {
- if (nvis_children == 1)
- child_height = height;
- else
- child_height = extra;
-
- nvis_children -= 1;
- height -= extra;
- }
- else
- {
- GtkRequisition child_requisition;
-
- gtk_widget_get_child_requisition (GTK_WIDGET (child->data), &child_requisition);
- child_height = child_requisition.height + padding * 2;
-
- if (expand)
- {
- if (nexpand_children == 1)
- child_height += height;
- else
- child_height += extra;
-
- nexpand_children -= 1;
- height -= extra;
- }
- }
-
- if (fill)
- {
- child_allocation.height = MAX (1, child_height - padding * 2);
- child_allocation.y = y + padding;
- }
- else
- {
- GtkRequisition child_requisition;
-
- gtk_widget_get_child_requisition (GTK_WIDGET (child->data), &child_requisition);
- child_allocation.height = child_requisition.height;
- child_allocation.y = y + (child_height - child_allocation.height) / 2;
- }
-
- gtk_widget_size_allocate (GTK_WIDGET (child->data), &child_allocation);
-
- y += child_height + gtk_box_get_spacing (box);
- }
- }
-
- y = allocation->y + allocation->height - border_width;
-
- for (child = gtk_container_get_children (GTK_CONTAINER (box));
- child != NULL; child = g_list_next (child))
- {
- guint padding;
- gboolean expand;
- gboolean fill;
- GtkPackType pack_type;
-
- gtk_box_query_child_packing (box,
- child->data,
- &expand,
- &fill,
- &padding,
- &pack_type);
-
- if ((pack_type == GTK_PACK_END) && gtk_widget_get_visible (GTK_WIDGET (child->data)))
- {
- GtkRequisition child_requisition;
- gtk_widget_get_child_requisition (GTK_WIDGET (child->data), &child_requisition);
-
- if (gtk_box_get_homogeneous (box))
- {
- if (nvis_children == 1)
- child_height = height;
- else
- child_height = extra;
-
- nvis_children -= 1;
- height -= extra;
- }
- else
- {
- child_height = child_requisition.height + padding * 2;
-
- if (expand)
- {
- if (nexpand_children == 1)
- child_height += height;
- else
- child_height += extra;
-
- nexpand_children -= 1;
- height -= extra;
- }
- }
-
- if (fill)
- {
- child_allocation.height = MAX (1, child_height - padding * 2);
- child_allocation.y = y + padding - child_height;
- }
- else
- {
- child_allocation.height = child_requisition.height;
- child_allocation.y = y + (child_height - child_allocation.height) / 2 - child_height;
- }
-
- gtk_widget_size_allocate (GTK_WIDGET (child->data), &child_allocation);
-
- y -= (child_height + gtk_box_get_spacing (box));
- }
- }
- }
-}
-
-static void gdl_dock_bar_size_hrequest (GtkWidget *widget,
- GtkRequisition *requisition )
-{
- GtkBox *box;
- GList *child;
- gint nvis_children;
- gint width;
- guint border_width;
-
- box = GTK_BOX (widget);
- requisition->width = 0;
- requisition->height = 0;
- nvis_children = 0;
-
- for (child = gtk_container_get_children (GTK_CONTAINER (box));
- child != NULL; child = g_list_next (child))
- {
- guint padding;
- gboolean expand;
- gboolean fill;
- GtkPackType pack_type;
-
- gtk_box_query_child_packing (box,
- child->data,
- &expand,
- &fill,
- &padding,
- &pack_type);
-
-
- if (gtk_widget_get_visible (GTK_WIDGET (child->data)))
- {
- GtkRequisition child_requisition;
-
- gtk_widget_size_request (GTK_WIDGET (child->data), &child_requisition);
-
- if (gtk_box_get_homogeneous (box))
- {
- width = child_requisition.width + padding * 2;
- requisition->width = MAX (requisition->width, width);
- }
- else
- {
- requisition->width += child_requisition.width + padding * 2;
- }
-
- requisition->height = MAX (requisition->height, child_requisition.height);
-
- nvis_children += 1;
- }
- }
-
- if (nvis_children > 0)
- {
- if (gtk_box_get_homogeneous (box))
- requisition->width *= nvis_children;
- requisition->width += (nvis_children - 1) * gtk_box_get_spacing (box);
- }
-
- border_width = gtk_container_get_border_width (GTK_CONTAINER (box));
- requisition->width += border_width * 2;
- requisition->height += border_width * 2;
-}
-
-static void gdl_dock_bar_size_hallocate (GtkWidget *widget,
- GtkAllocation *allocation)
-{
- GtkBox *box;
- GList *child;
- GtkAllocation child_allocation;
- gint nvis_children;
- gint nexpand_children;
- gint child_width;
- gint width;
- gint extra;
- gint x;
- guint border_width;
- GtkTextDirection direction;
- GtkRequisition requisition;
-
- box = GTK_BOX (widget);
- gtk_widget_set_allocation (widget, allocation);
- gtk_widget_get_requisition (widget, &requisition);
-
- direction = gtk_widget_get_direction (widget);
-
- nvis_children = 0;
- nexpand_children = 0;
-
- for (child = gtk_container_get_children (GTK_CONTAINER (box));
- child != NULL; child = g_list_next (child))
- {
- guint padding;
- gboolean expand;
- gboolean fill;
- GtkPackType pack_type;
-
- gtk_box_query_child_packing (box,
- child->data,
- &expand,
- &fill,
- &padding,
- &pack_type);
-
- if (gtk_widget_get_visible (GTK_WIDGET (child->data)))
- {
- nvis_children += 1;
- if (expand)
- nexpand_children += 1;
- }
- }
-
- border_width = gtk_container_get_border_width (GTK_CONTAINER (box));
-
- if (nvis_children > 0)
- {
- if (gtk_box_get_homogeneous (box))
- {
- width = (allocation->width -
- border_width * 2 -
- (nvis_children - 1) * gtk_box_get_spacing (box));
- extra = width / nvis_children;
- }
- else if (nexpand_children > 0)
- {
- width = (gint) allocation->width - (gint) requisition.width;
- extra = width / nexpand_children;
- }
- else
- {
- width = 0;
- extra = 0;
- }
-
- x = allocation->x + border_width;
- child_allocation.y = allocation->y + border_width;
- child_allocation.height = MAX (1, (gint) allocation->height - (gint) border_width * 2);
-
- for (child = gtk_container_get_children (GTK_CONTAINER (box));
- child != NULL; child = g_list_next (child))
- {
- guint padding;
- gboolean expand;
- gboolean fill;
- GtkPackType pack_type;
-
- gtk_box_query_child_packing (box,
- child->data,
- &expand,
- &fill,
- &padding,
- &pack_type);
-
- if ((pack_type == GTK_PACK_START) && gtk_widget_get_visible (GTK_WIDGET (child->data)))
- {
- if (gtk_box_get_homogeneous (box))
- {
- if (nvis_children == 1)
- child_width = width;
- else
- child_width = extra;
-
- nvis_children -= 1;
- width -= extra;
- }
- else
- {
- GtkRequisition child_requisition;
-
- gtk_widget_get_child_requisition (GTK_WIDGET (child->data), &child_requisition);
-
- child_width = child_requisition.width + padding * 2;
-
- if (expand)
- {
- if (nexpand_children == 1)
- child_width += width;
- else
- child_width += extra;
-
- nexpand_children -= 1;
- width -= extra;
- }
- }
-
- if (fill)
- {
- child_allocation.width = MAX (1, child_width - padding * 2);
- child_allocation.x = x + padding;
- }
- else
- {
- GtkRequisition child_requisition;
-
- gtk_widget_get_child_requisition (GTK_WIDGET (child->data), &child_requisition);
- child_allocation.width = child_requisition.width;
- child_allocation.x = x + (child_width - child_allocation.width) / 2;
- }
-
- if (direction == GTK_TEXT_DIR_RTL)
- child_allocation.x = allocation->x + allocation->width - (child_allocation.x - allocation->x) - child_allocation.width;
-
- gtk_widget_size_allocate (GTK_WIDGET (child->data), &child_allocation);
-
- x += child_width + gtk_box_get_spacing (box);
- }
- }
-
- x = allocation->x + allocation->width - border_width;
-
- for (child = gtk_container_get_children (GTK_CONTAINER (box));
- child != NULL; child = g_list_next (child))
- {
- guint padding;
- gboolean expand;
- gboolean fill;
- GtkPackType pack_type;
-
- gtk_box_query_child_packing (box,
- child->data,
- &expand,
- &fill,
- &padding,
- &pack_type);
-
- if ((pack_type == GTK_PACK_END) && gtk_widget_get_visible (GTK_WIDGET (child->data)))
- {
- GtkRequisition child_requisition;
- gtk_widget_get_child_requisition (GTK_WIDGET (child->data), &child_requisition);
-
- if (gtk_box_get_homogeneous (box))
- {
- if (nvis_children == 1)
- child_width = width;
- else
- child_width = extra;
-
- nvis_children -= 1;
- width -= extra;
- }
- else
- {
- child_width = child_requisition.width + padding * 2;
-
- if (expand)
- {
- if (nexpand_children == 1)
- child_width += width;
- else
- child_width += extra;
-
- nexpand_children -= 1;
- width -= extra;
- }
- }
-
- if (fill)
- {
- child_allocation.width = MAX (1, child_width - padding * 2);
- child_allocation.x = x + padding - child_width;
- }
- else
- {
- child_allocation.width = child_requisition.width;
- child_allocation.x = x + (child_width - child_allocation.width) / 2 - child_width;
- }
-
- if (direction == GTK_TEXT_DIR_RTL)
- child_allocation.x = allocation->x + allocation->width - (child_allocation.x - allocation->x) - child_allocation.width;
-
- gtk_widget_size_allocate (GTK_WIDGET (child->data), &child_allocation);
-
- x -= (child_width + gtk_box_get_spacing (box));
- }
- }
- }
-}
-
-GtkWidget *
-gdl_dock_bar_new (GdlDock *dock)
-{
- GdlDockMaster *master = NULL;
-
- /* get the master of the given dock */
- if (dock)
- master = GDL_DOCK_OBJECT_GET_MASTER (dock);
-
- return g_object_new (GDL_TYPE_DOCK_BAR,
- "master", master, NULL);
-}
-
-GtkOrientation gdl_dock_bar_get_orientation (GdlDockBar *dockbar)
-{
- g_return_val_if_fail (GDL_IS_DOCK_BAR (dockbar),
- GTK_ORIENTATION_VERTICAL);
-
- return dockbar->_priv->orientation;
-}
-
-void gdl_dock_bar_set_orientation (GdlDockBar *dockbar,
- GtkOrientation orientation)
-{
- g_return_if_fail (GDL_IS_DOCK_BAR (dockbar));
-
- dockbar->_priv->orientation = orientation;
-
- gtk_widget_queue_resize (GTK_WIDGET (dockbar));
-}
-
-void gdl_dock_bar_set_style(GdlDockBar* dockbar,
- GdlDockBarStyle style)
-{
- g_object_set(G_OBJECT(dockbar), "dockbar-style", style, NULL);
-}
-
-GdlDockBarStyle gdl_dock_bar_get_style(GdlDockBar* dockbar)
-{
- GdlDockBarStyle style;
- g_object_get(G_OBJECT(dockbar), "dockbar-style", &style, NULL);
- return style;
-}
diff --git a/src/libgdl/gdl-dock-bar.h b/src/libgdl/gdl-dock-bar.h
deleted file mode 100644
index ca6da1d26..000000000
--- a/src/libgdl/gdl-dock-bar.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * This file is part of the GNOME Devtools Libraries.
- *
- * Copyright (C) 2003 Jeroen Zwartepoorte <jeroen@xs4all.nl>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __GDL_DOCK_BAR_H__
-#define __GDL_DOCK_BAR_H__
-
-#include <gtk/gtk.h>
-
-G_BEGIN_DECLS
-
-/* standard macros */
-#define GDL_TYPE_DOCK_BAR (gdl_dock_bar_get_type ())
-#define GDL_DOCK_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDL_TYPE_DOCK_BAR, GdlDockBar))
-#define GDL_DOCK_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDL_TYPE_DOCK_BAR, GdlDockBarClass))
-#define GDL_IS_DOCK_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDL_TYPE_DOCK_BAR))
-#define GDL_IS_DOCK_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDL_TYPE_DOCK_BAR))
-#define GDL_DOCK_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_DOCK_BAR, GdlDockBarClass))
-
-/* data types & structures */
-typedef struct _GdlDockBar GdlDockBar;
-typedef struct _GdlDockBarClass GdlDockBarClass;
-typedef struct _GdlDockBarPrivate GdlDockBarPrivate;
-
-typedef enum {
- GDL_DOCK_BAR_ICONS,
- GDL_DOCK_BAR_TEXT,
- GDL_DOCK_BAR_BOTH,
- GDL_DOCK_BAR_AUTO
-} GdlDockBarStyle;
-
-struct _GdlDockBar {
- GtkBox parent;
-
- GdlDock *dock;
-
- GdlDockBarPrivate *_priv;
-};
-
-struct _GdlDockBarClass {
- GtkVBoxClass parent_class;
-};
-
-GType gdl_dock_bar_get_type (void);
-
-GtkWidget *gdl_dock_bar_new (GdlDock *dock);
-
-GtkOrientation gdl_dock_bar_get_orientation (GdlDockBar *dockbar);
-void gdl_dock_bar_set_orientation (GdlDockBar *dockbar,
- GtkOrientation orientation);
-void gdl_dock_bar_set_style (GdlDockBar *dockbar,
- GdlDockBarStyle style);
-GdlDockBarStyle gdl_dock_bar_get_style (GdlDockBar *dockbar);
-
-G_END_DECLS
-
-#endif /* __GDL_DOCK_BAR_H__ */
diff --git a/src/libgdl/gdl-dock-item-button-image.c b/src/libgdl/gdl-dock-item-button-image.c
deleted file mode 100644
index 77cfe5d6c..000000000
--- a/src/libgdl/gdl-dock-item-button-image.c
+++ /dev/null
@@ -1,166 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * gdl-dock-item-button-image.c
- *
- * Author: Joel Holdsworth <joel@airwebreathe.org.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "gdl-dock-item-button-image.h"
-
-#include <math.h>
-
-#define ICON_SIZE 12
-
-G_DEFINE_TYPE (GdlDockItemButtonImage,
- gdl_dock_item_button_image,
- GTK_TYPE_WIDGET);
-
-static gint
-gdl_dock_item_button_image_expose (GtkWidget *widget,
- GdkEventExpose *event)
-{
- GdlDockItemButtonImage *button_image;
- GtkStyle *style;
- GdkColor *color;
-
- g_return_val_if_fail (widget != NULL, 0);
- button_image = GDL_DOCK_ITEM_BUTTON_IMAGE (widget);
-
- cairo_t *cr = gdk_cairo_create (event->window);
- cairo_translate (cr, event->area.x, event->area.y);
-
- /* Set up the pen */
- cairo_set_line_width(cr, 1.0);
-
- style = gtk_widget_get_style (widget);
- g_return_val_if_fail (style != NULL, 0);
- color = &style->fg[GTK_STATE_NORMAL];
- cairo_set_source_rgba(cr, color->red / 65535.0,
- color->green / 65535.0, color->blue / 65535.0, 0.55);
-
- /* Draw the icon border */
- cairo_move_to (cr, 10.5, 2.5);
- cairo_arc (cr, 10.5, 4.5, 2, -0.5 * M_PI, 0);
- cairo_line_to (cr, 12.5, 10.5);
- cairo_arc (cr, 10.5, 10.5, 2, 0, 0.5 * M_PI);
- cairo_line_to (cr, 4.5, 12.5);
- cairo_arc (cr, 4.5, 10.5, 2, 0.5 * M_PI, M_PI);
- cairo_line_to (cr, 2.5, 4.5);
- cairo_arc (cr, 4.5, 4.5, 2, M_PI, 1.5 * M_PI);
- cairo_close_path (cr);
-
- cairo_stroke (cr);
-
- /* Draw the icon */
- cairo_new_path (cr);
-
- switch(button_image->image_type) {
- case GDL_DOCK_ITEM_BUTTON_IMAGE_CLOSE:
- cairo_move_to (cr, 4.0, 5.5);
- cairo_line_to (cr, 4.0, 5.5);
- cairo_line_to (cr, 6.0, 7.5);
- cairo_line_to (cr, 4.0, 9.5);
- cairo_line_to (cr, 5.5, 11.0);
- cairo_line_to (cr, 7.5, 9.0);
- cairo_line_to (cr, 9.5, 11.0);
- cairo_line_to (cr, 11.0, 9.5);
- cairo_line_to (cr, 9.0, 7.5);
- cairo_line_to (cr, 11.0, 5.5);
- cairo_line_to (cr, 9.5, 4.0);
- cairo_line_to (cr, 7.5, 6.0);
- cairo_line_to (cr, 5.5, 4.0);
- cairo_close_path (cr);
- break;
-
- case GDL_DOCK_ITEM_BUTTON_IMAGE_ICONIFY:
- if (gtk_widget_get_direction (widget) != GTK_TEXT_DIR_RTL) {
- cairo_move_to (cr, 4.5, 7.5);
- cairo_line_to (cr, 10.0, 4.75);
- cairo_line_to (cr, 10.0, 10.25);
- cairo_close_path (cr);
- } else {
- cairo_move_to (cr, 10.5, 7.5);
- cairo_line_to (cr, 5, 4.75);
- cairo_line_to (cr, 5, 10.25);
- cairo_close_path (cr);
- }
- break;
-
- default:
- break;
- }
-
- cairo_fill (cr);
-
- /* Finish up */
- cairo_destroy (cr);
-
- return 0;
-}
-
-static void
-gdl_dock_item_button_image_init (
- GdlDockItemButtonImage *button_image)
-{
- gtk_widget_set_has_window (GTK_WIDGET (button_image), FALSE);
-}
-
-static void
-gdl_dock_item_button_image_size_request (GtkWidget *widget,
- GtkRequisition *requisition)
-{
- g_return_if_fail (GDL_IS_DOCK_ITEM_BUTTON_IMAGE (widget));
- g_return_if_fail (requisition != NULL);
-
- requisition->width = ICON_SIZE;
- requisition->height = ICON_SIZE;
-}
-
-static void
-gdl_dock_item_button_image_class_init (
- GdlDockItemButtonImageClass *klass)
-{
- //GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- //GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
-
- widget_class->expose_event =
- gdl_dock_item_button_image_expose;
- widget_class->size_request =
- gdl_dock_item_button_image_size_request;
-}
-
-/* ----- Public interface ----- */
-
-/**
- * gdl_dock_item_button_image_new:
- * @image_type: Specifies what type of image the widget should
- * display
- *
- * Creates a new GDL dock button image object.
- * Returns: The newly created dock item button image widget.
- **/
-GtkWidget*
-gdl_dock_item_button_image_new (GdlDockItemButtonImageType image_type)
-{
- GdlDockItemButtonImage *button_image = g_object_new (
- GDL_TYPE_DOCK_ITEM_BUTTON_IMAGE, NULL);
- button_image->image_type = image_type;
-
- return GTK_WIDGET (button_image);
-}
diff --git a/src/libgdl/gdl-dock-item-button-image.h b/src/libgdl/gdl-dock-item-button-image.h
deleted file mode 100644
index ce0c6faaf..000000000
--- a/src/libgdl/gdl-dock-item-button-image.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * gdl-dock-item-button-image.h
- *
- * Author: Joel Holdsworth <joel@airwebreathe.org.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef _GDL_DOCK_ITEM_BUTTON_IMAGE_H_
-#define _GDL_DOCK_ITEM_BUTTON_IMAGE_H_
-
-#include <gtk/gtk.h>
-
-G_BEGIN_DECLS
-
-/* Standard Macros */
-#define GDL_TYPE_DOCK_ITEM_BUTTON_IMAGE \
- (gdl_dock_item_button_image_get_type())
-#define GDL_DOCK_ITEM_BUTTON_IMAGE(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDL_TYPE_DOCK_ITEM_BUTTON_IMAGE, GdlDockItemButtonImage))
-#define GDL_DOCK_ITEM_BUTTON_IMAGE_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST ((klass), GDL_TYPE_DOCK_ITEM_BUTTON_IMAGE, GdlDockItemButtonImageClass))
-#define GDL_IS_DOCK_ITEM_BUTTON_IMAGE(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDL_TYPE_DOCK_ITEM_BUTTON_IMAGE))
-#define GDL_IS_DOCK_ITEM_BUTTON_IMAGE_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE ((klass), GDL_TYPE_DOCK_ITEM_BUTTON_IMAGE))
-#define GDL_DOCK_ITEM_BUTTON_IMAGE_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), GDL_TYPE_DOCK_ITEM_BUTTON_IMAGE, GdlDockItemButtonImageClass))
-
-/* Data Types & Structures */
-typedef enum {
- GDL_DOCK_ITEM_BUTTON_IMAGE_CLOSE,
- GDL_DOCK_ITEM_BUTTON_IMAGE_ICONIFY
-} GdlDockItemButtonImageType;
-
-typedef struct _GdlDockItemButtonImage GdlDockItemButtonImage;
-typedef struct _GdlDockItemButtonImageClass GdlDockItemButtonImageClass;
-
-struct _GdlDockItemButtonImage {
- GtkWidget parent;
-
- GdlDockItemButtonImageType image_type;
-};
-
-struct _GdlDockItemButtonImageClass {
- GtkWidgetClass parent_class;
-};
-
-/* Data Public Functions */
-GType gdl_dock_item_button_image_get_type (void);
-GtkWidget *gdl_dock_item_button_image_new (
- GdlDockItemButtonImageType image_type);
-
-G_END_DECLS
-
-#endif /* _GDL_DOCK_ITEM_BUTTON_IMAGE_H_ */
diff --git a/src/libgdl/gdl-dock-item-grip.c b/src/libgdl/gdl-dock-item-grip.c
deleted file mode 100644
index 9b3810c20..000000000
--- a/src/libgdl/gdl-dock-item-grip.c
+++ /dev/null
@@ -1,809 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 8 -*- */
-/*
- * gdl-dock-item-grip.c
- *
- * Author: Michael Meeks Copyright (C) 2002 Sun Microsystems, Inc.
- *
- * Based on BonoboDockItemGrip. Original copyright notice follows.
- *
- * Copyright (C) 1998 Ettore Perazzoli
- * Copyright (C) 1998 Elliot Lee
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- * All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "gdl-i18n.h"
-#include <string.h>
-#include <glib-object.h>
-#include <gtk/gtk.h>
-#include "gdl-dock-item.h"
-#include "gdl-dock-item-grip.h"
-#include "gdl-dock-item-button-image.h"
-#include "gdl-switcher.h"
-
-#define ALIGN_BORDER 5
-#define DRAG_HANDLE_SIZE 10
-
-enum {
- PROP_0,
- PROP_ITEM
-};
-
-struct _GdlDockItemGripPrivate {
- GtkWidget *label;
-
- GtkWidget *close_button;
- GtkWidget *iconify_button;
-
- gboolean handle_shown;
-};
-
-G_DEFINE_TYPE (GdlDockItemGrip, gdl_dock_item_grip, GTK_TYPE_CONTAINER);
-
-GtkWidget*
-gdl_dock_item_create_label_widget(GdlDockItemGrip *grip)
-{
- GtkHBox *label_box;
- GtkImage *image;
- GtkLabel *label;
- gchar *stock_id = NULL;
- gchar *title = NULL;
- GdkPixbuf *pixbuf;
-
- label_box = (GtkHBox*)gtk_hbox_new (FALSE, 0);
-
- g_object_get (G_OBJECT (grip->item), "stock-id", &stock_id, NULL);
- g_object_get (G_OBJECT (grip->item), "pixbuf-icon", &pixbuf, NULL);
- if(stock_id) {
- image = GTK_IMAGE(gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_MENU));
-
- gtk_widget_show (GTK_WIDGET(image));
- gtk_box_pack_start(GTK_BOX(label_box), GTK_WIDGET(image), FALSE, TRUE, 0);
-
- g_free (stock_id);
- }
- else if (pixbuf) {
- image = GTK_IMAGE(gtk_image_new_from_pixbuf (pixbuf));
-
- gtk_widget_show (GTK_WIDGET(image));
- gtk_box_pack_start(GTK_BOX(label_box), GTK_WIDGET(image), FALSE, TRUE, 0);
- }
-
- g_object_get (G_OBJECT (grip->item), "long-name", &title, NULL);
- if (title) {
- label = GTK_LABEL(gtk_label_new(title));
- gtk_label_set_ellipsize(label, PANGO_ELLIPSIZE_END);
- gtk_label_set_justify(label, GTK_JUSTIFY_LEFT);
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
- gtk_widget_show (GTK_WIDGET(label));
-
- if (gtk_widget_get_direction (GTK_WIDGET(grip)) == GTK_TEXT_DIR_RTL) {
- gtk_box_pack_end(GTK_BOX(label_box), GTK_WIDGET(label), TRUE, TRUE, 1);
- } else {
- gtk_box_pack_start(GTK_BOX(label_box), GTK_WIDGET(label), TRUE, TRUE, 1);
- }
-
- g_free(title);
- }
-
- return GTK_WIDGET(label_box);
-}
-
-static gint
-gdl_dock_item_grip_expose (GtkWidget *widget,
- GdkEventExpose *event)
-{
- GdlDockItemGrip *grip;
- GtkAllocation allocation;
- GdkRectangle handle_area;
- GdkRectangle expose_area;
-
- grip = GDL_DOCK_ITEM_GRIP (widget);
-
- if(grip->_priv->handle_shown) {
-
- gtk_widget_get_allocation (widget, &allocation);
-
- if (gtk_widget_get_direction (widget) != GTK_TEXT_DIR_RTL) {
- handle_area.x = allocation.x;
- handle_area.y = allocation.y;
- handle_area.width = DRAG_HANDLE_SIZE;
- handle_area.height = allocation.height;
- } else {
- handle_area.x = allocation.x + allocation.width - DRAG_HANDLE_SIZE;
- handle_area.y = allocation.y;
- handle_area.width = DRAG_HANDLE_SIZE;
- handle_area.height = allocation.height;
- }
-
- if (gdk_rectangle_intersect (&handle_area, &event->area, &expose_area)) {
-
- gtk_paint_handle (gtk_widget_get_style (widget),
- gtk_widget_get_window (widget),
- gtk_widget_get_state (widget),
- GTK_SHADOW_NONE, &expose_area, widget,
- "handlebox", handle_area.x, handle_area.y,
- handle_area.width, handle_area.height,
- GTK_ORIENTATION_VERTICAL);
-
- }
-
- }
-
-/* see bug #950556: may contribute to regression with GTK2/Quartz */
-#if !defined(GDK_WINDOWING_QUARTZ)
- if (gdl_dock_item_or_child_has_focus(grip->item)) {
-
- gtk_paint_focus (gtk_widget_get_style (widget),
- gtk_widget_get_window (widget),
- gtk_widget_get_state (widget),
- &event->area, widget,
- NULL, 0, 0, -1, -1);
- }
-#endif //GDK_WINDOWING_QUARTZ
-
- return GTK_WIDGET_CLASS (gdl_dock_item_grip_parent_class)->expose_event (widget, event);
-}
-
-static void
-gdl_dock_item_grip_item_notify (GObject *master,
- GParamSpec *pspec,
- gpointer data)
-{
- GdlDockItemGrip *grip;
- gboolean cursor;
-
- grip = GDL_DOCK_ITEM_GRIP (data);
-
- if ((strcmp (pspec->name, "stock-id") == 0) ||
- (strcmp (pspec->name, "long-name") == 0)) {
-
- gdl_dock_item_grip_set_label (grip,
- gdl_dock_item_create_label_widget(grip));
-
- } else if (strcmp (pspec->name, "behavior") == 0) {
- cursor = FALSE;
- if (grip->_priv->close_button) {
- if (GDL_DOCK_ITEM_CANT_CLOSE (grip->item)) {
- gtk_widget_hide (GTK_WIDGET (grip->_priv->close_button));
- } else {
- gtk_widget_show (GTK_WIDGET (grip->_priv->close_button));
- cursor = TRUE;
- }
- }
- if (grip->_priv->iconify_button) {
- if (GDL_DOCK_ITEM_CANT_ICONIFY (grip->item)) {
- gtk_widget_hide (GTK_WIDGET (grip->_priv->iconify_button));
- } else {
- gtk_widget_show (GTK_WIDGET (grip->_priv->iconify_button));
- cursor = TRUE;
- }
- }
- if (grip->title_window && !cursor)
- gdk_window_set_cursor (grip->title_window, NULL);
-
- }
-}
-
-static void
-gdl_dock_item_grip_destroy (GtkObject *object)
-{
- GdlDockItemGrip *grip = GDL_DOCK_ITEM_GRIP (object);
-
- if (grip->_priv) {
- GdlDockItemGripPrivate *priv = grip->_priv;
-
- if (priv->label) {
- gtk_widget_unparent(grip->_priv->label);
- priv->label = NULL;
- }
-
- if (grip->item)
- g_signal_handlers_disconnect_by_func (grip->item,
- gdl_dock_item_grip_item_notify,
- grip);
- grip->item = NULL;
-
- grip->_priv = NULL;
- g_free (priv);
- }
-
- GTK_OBJECT_CLASS (gdl_dock_item_grip_parent_class)->destroy (object);
-}
-
-static void
-gdl_dock_item_grip_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- GdlDockItemGrip *grip;
-
- g_return_if_fail (GDL_IS_DOCK_ITEM_GRIP (object));
-
- grip = GDL_DOCK_ITEM_GRIP (object);
-
- switch (prop_id) {
- case PROP_ITEM:
- grip->item = g_value_get_object (value);
- if (grip->item) {
- g_signal_connect (grip->item, "notify::long-name",
- G_CALLBACK (gdl_dock_item_grip_item_notify),
- grip);
- g_signal_connect (grip->item, "notify::stock-id",
- G_CALLBACK (gdl_dock_item_grip_item_notify),
- grip);
- g_signal_connect (grip->item, "notify::behavior",
- G_CALLBACK (gdl_dock_item_grip_item_notify),
- grip);
-
- if (!GDL_DOCK_ITEM_CANT_CLOSE (grip->item) && grip->_priv->close_button)
- gtk_widget_show (grip->_priv->close_button);
- if (!GDL_DOCK_ITEM_CANT_ICONIFY (grip->item) && grip->_priv->iconify_button)
- gtk_widget_show (grip->_priv->iconify_button);
- }
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-gdl_dock_item_grip_close_clicked (GtkWidget *widget,
- GdlDockItemGrip *grip)
-{
- (void)widget;
- g_return_if_fail (grip->item != NULL);
-
- gdl_dock_item_hide_item (grip->item);
-}
-
-static void
-gdl_dock_item_grip_fix_iconify_button (GdlDockItemGrip *grip)
-{
- GtkWidget *iconify_button = grip->_priv->iconify_button;
- GdkWindow *window = NULL;
- GdkEvent *event = NULL;
-
- GdkModifierType modifiers;
- gint x = 0, y = 0;
- gboolean ev_ret;
-
- g_return_if_fail (gtk_widget_get_realized (iconify_button));
-
- window = gtk_widget_get_parent_window (iconify_button);
- event = gdk_event_new (GDK_LEAVE_NOTIFY);
-
- g_assert (GDK_IS_WINDOW (window));
- gdk_window_get_pointer (window, &x, &y, &modifiers);
-
- event->crossing.window = g_object_ref (window);
- event->crossing.send_event = FALSE;
- event->crossing.subwindow = g_object_ref (window);
- event->crossing.time = GDK_CURRENT_TIME;
- event->crossing.x = x;
- event->crossing.y = y;
- event->crossing.x_root = event->crossing.y_root = 0;
- event->crossing.mode = GDK_CROSSING_STATE_CHANGED;
- event->crossing.detail = GDK_NOTIFY_NONLINEAR;
- event->crossing.focus = FALSE;
- event->crossing.state = modifiers;
-
- //GTK_BUTTON (iconify_button)->in_button = FALSE;
- g_signal_emit_by_name (iconify_button, "leave-notify-event",
- event, &ev_ret, 0);
-
- gdk_event_free (event);
-}
-
-static void
-gdl_dock_item_grip_iconify_clicked (GtkWidget *widget,
- GdlDockItemGrip *grip)
-{
- GtkWidget *parent;
-
- g_return_if_fail (grip->item != NULL);
-
- /* Workaround to unhighlight the iconify button. */
- gdl_dock_item_grip_fix_iconify_button (grip);
-
- parent = gtk_widget_get_parent (GTK_WIDGET (grip->item));
- if (GDL_IS_SWITCHER (parent))
- {
- /* Note: We can not use gtk_container_foreach (parent) here because
- * during iconificatoin, the internal children changes in parent.
- * Instead we keep a list of items to iconify and iconify them
- * one by one.
- */
- GList *node;
- GList *items =
- gtk_container_get_children (GTK_CONTAINER (parent));
- for (node = items; node != NULL; node = node->next)
- {
- GdlDockItem *item = GDL_DOCK_ITEM (node->data);
- if (!GDL_DOCK_ITEM_CANT_ICONIFY (item))
- gdl_dock_item_iconify_item (item);
- }
- g_list_free (items);
- }
- else
- {
- gdl_dock_item_iconify_item (grip->item);
- }
-}
-
-static void
-gdl_dock_item_grip_init (GdlDockItemGrip *grip)
-{
- GtkWidget *image;
-
- gtk_widget_set_has_window (GTK_WIDGET (grip), FALSE);
-
- grip->_priv = g_new0 (GdlDockItemGripPrivate, 1);
- grip->_priv->label = NULL;
- grip->_priv->handle_shown = FALSE;
-
- /* create the close button */
- gtk_widget_push_composite_child ();
- grip->_priv->close_button = gtk_button_new ();
- gtk_widget_pop_composite_child ();
-
- gtk_widget_set_can_focus (grip->_priv->close_button, FALSE);
- gtk_widget_set_parent (grip->_priv->close_button, GTK_WIDGET (grip));
- gtk_button_set_relief (GTK_BUTTON (grip->_priv->close_button), GTK_RELIEF_NONE);
- gtk_widget_show (grip->_priv->close_button);
-
- image = gdl_dock_item_button_image_new(GDL_DOCK_ITEM_BUTTON_IMAGE_CLOSE);
- gtk_container_add (GTK_CONTAINER (grip->_priv->close_button), image);
- gtk_widget_show (image);
-
- g_signal_connect (G_OBJECT (grip->_priv->close_button), "clicked",
- G_CALLBACK (gdl_dock_item_grip_close_clicked), grip);
-
- /* create the iconify button */
- gtk_widget_push_composite_child ();
- grip->_priv->iconify_button = gtk_button_new ();
- gtk_widget_pop_composite_child ();
-
- gtk_widget_set_can_focus (grip->_priv->iconify_button, FALSE);
- gtk_widget_set_parent (grip->_priv->iconify_button, GTK_WIDGET (grip));
- gtk_button_set_relief (GTK_BUTTON (grip->_priv->iconify_button), GTK_RELIEF_NONE);
- gtk_widget_show (grip->_priv->iconify_button);
-
- image = gdl_dock_item_button_image_new(GDL_DOCK_ITEM_BUTTON_IMAGE_ICONIFY);
- gtk_container_add (GTK_CONTAINER (grip->_priv->iconify_button), image);
- gtk_widget_show (image);
-
- g_signal_connect (G_OBJECT (grip->_priv->iconify_button), "clicked",
- G_CALLBACK (gdl_dock_item_grip_iconify_clicked), grip);
-
- /* set tooltips on the buttons */
- gtk_widget_set_tooltip_text (grip->_priv->iconify_button,
- _("Iconify this dock"));
- gtk_widget_set_tooltip_text (grip->_priv->close_button,
- _("Close this dock"));
-}
-
-static void
-gdl_dock_item_grip_realize (GtkWidget *widget)
-{
- GdlDockItemGrip *grip = GDL_DOCK_ITEM_GRIP (widget);
-
- GTK_WIDGET_CLASS (gdl_dock_item_grip_parent_class)->realize (widget);
-
- g_return_if_fail (grip->_priv != NULL);
-
- if (!grip->title_window) {
- GtkAllocation allocation;
- GdkWindowAttr attributes;
- GdkCursor *cursor;
-
- g_return_if_fail (grip->_priv->label != NULL);
-
- gtk_widget_get_allocation (grip->_priv->label, &allocation);
-
- attributes.x = allocation.x;
- attributes.y = allocation.y;
- attributes.width = allocation.width;
- attributes.height = allocation.height;
- attributes.window_type = GDK_WINDOW_CHILD;
- attributes.wclass = GDK_INPUT_OUTPUT;
- attributes.event_mask = GDK_ALL_EVENTS_MASK;
-
- grip->title_window = gdk_window_new (gtk_widget_get_parent_window (widget),
- &attributes, (GDK_WA_X | GDK_WA_Y));
-
- gdk_window_set_user_data (grip->title_window, grip);
-
- /* Unref the ref from parent realize for NO_WINDOW */
- g_object_unref (gtk_widget_get_window (widget));
-
- /* Need to ref widget->window, because parent unrealize unrefs it */
- gtk_widget_set_window (widget, g_object_ref (grip->title_window));
- gtk_widget_set_has_window (widget, TRUE);
-
- /* Unset the background so as to make the colour match the parent window */
- gtk_widget_modify_bg(widget, GTK_STATE_NORMAL, NULL);
-
- if (GDL_DOCK_ITEM_CANT_CLOSE (grip->item) &&
- GDL_DOCK_ITEM_CANT_ICONIFY (grip->item))
- cursor = NULL;
- else
- cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget),
- GDK_HAND2);
- gdk_window_set_cursor (grip->title_window, cursor);
- if (cursor)
- gdk_cursor_unref (cursor);
- }
-}
-
-static void
-gdl_dock_item_grip_unrealize (GtkWidget *widget)
-{
- GdlDockItemGrip *grip = GDL_DOCK_ITEM_GRIP (widget);
-
- if (grip->title_window) {
- gtk_widget_set_has_window (widget, FALSE);
- gdk_window_set_user_data (grip->title_window, NULL);
- gdk_window_destroy (grip->title_window);
- grip->title_window = NULL;
- }
-
- GTK_WIDGET_CLASS (gdl_dock_item_grip_parent_class)->unrealize (widget);
-}
-
-static void
-gdl_dock_item_grip_map (GtkWidget *widget)
-{
- GdlDockItemGrip *grip = GDL_DOCK_ITEM_GRIP (widget);
-
- GTK_WIDGET_CLASS (gdl_dock_item_grip_parent_class)->map (widget);
-
- if (grip->title_window)
- gdk_window_show (grip->title_window);
-}
-
-static void
-gdl_dock_item_grip_unmap (GtkWidget *widget)
-{
- GdlDockItemGrip *grip = GDL_DOCK_ITEM_GRIP (widget);
-
- if (grip->title_window)
- gdk_window_hide (grip->title_window);
-
- GTK_WIDGET_CLASS (gdl_dock_item_grip_parent_class)->unmap (widget);
-}
-
-static void
-gdl_dock_item_grip_size_request (GtkWidget *widget,
- GtkRequisition *requisition)
-{
- GtkRequisition child_requisition;
- GdlDockItemGrip *grip;
- gint layout_height = 0;
- guint border_width;
-
- g_return_if_fail (GDL_IS_DOCK_ITEM_GRIP (widget));
- g_return_if_fail (requisition != NULL);
-
- border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
- grip = GDL_DOCK_ITEM_GRIP (widget);
-
- requisition->width = border_width * 2/* + ALIGN_BORDER*/;
- requisition->height = border_width * 2;
-
- if(grip->_priv->handle_shown)
- requisition->width += DRAG_HANDLE_SIZE;
-
- gtk_widget_size_request (grip->_priv->close_button, &child_requisition);
- layout_height = MAX (layout_height, child_requisition.height);
- if (gtk_widget_get_visible (grip->_priv->close_button)) {
- requisition->width += child_requisition.width;
- }
-
- gtk_widget_size_request (grip->_priv->iconify_button, &child_requisition);
- layout_height = MAX (layout_height, child_requisition.height);
- if (gtk_widget_get_visible (grip->_priv->iconify_button)) {
- requisition->width += child_requisition.width;
- }
-
- gtk_widget_size_request (grip->_priv->label, &child_requisition);
- requisition->width += child_requisition.width;
- layout_height = MAX (layout_height, child_requisition.height);
-
- requisition->height += layout_height;
-}
-
-static void
-gdl_dock_item_grip_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation)
-{
- GdlDockItemGrip *grip;
- GtkRequisition close_requisition = { 0, 0 };
- GtkRequisition iconify_requisition = { 0, 0 };
- GtkAllocation child_allocation;
- guint border_width;
-
- g_return_if_fail (GDL_IS_DOCK_ITEM_GRIP (widget));
- g_return_if_fail (allocation != NULL);
-
- grip = GDL_DOCK_ITEM_GRIP (widget);
- border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
-
- GTK_WIDGET_CLASS (gdl_dock_item_grip_parent_class)->size_allocate (widget, allocation);
-
- gtk_widget_size_request (grip->_priv->close_button,
- &close_requisition);
- gtk_widget_size_request (grip->_priv->iconify_button,
- &iconify_requisition);
-
- /* Calculate the Minimum Width where buttons will fit */
- int min_width = close_requisition.width + iconify_requisition.width
- + border_width * 2;
- if(grip->_priv->handle_shown)
- min_width += DRAG_HANDLE_SIZE;
- const gboolean space_for_buttons = (allocation->width >= min_width);
-
- /* Set up the rolling child_allocation rectangle */
- if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
- child_allocation.x = border_width/* + ALIGN_BORDER*/;
- else
- child_allocation.x = allocation->width - border_width;
- child_allocation.y = border_width;
-
- /* Layout Close Button */
- if (gtk_widget_get_visible (grip->_priv->close_button)) {
-
- if(space_for_buttons) {
- if (gtk_widget_get_direction (widget) != GTK_TEXT_DIR_RTL)
- child_allocation.x -= close_requisition.width;
-
- child_allocation.width = close_requisition.width;
- child_allocation.height = close_requisition.height;
- } else {
- child_allocation.width = 0;
- }
-
- gtk_widget_size_allocate (grip->_priv->close_button, &child_allocation);
-
- if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
- child_allocation.x += close_requisition.width;
- }
-
- /* Layout Iconify Button */
- if (gtk_widget_get_visible (grip->_priv->iconify_button)) {
-
- if(space_for_buttons) {
- if (gtk_widget_get_direction (widget) != GTK_TEXT_DIR_RTL)
- child_allocation.x -= iconify_requisition.width;
-
- child_allocation.width = iconify_requisition.width;
- child_allocation.height = iconify_requisition.height;
- } else {
- child_allocation.width = 0;
- }
-
- gtk_widget_size_allocate (grip->_priv->iconify_button, &child_allocation);
-
- if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
- child_allocation.x += iconify_requisition.width;
- }
-
- /* Layout the Grip Handle*/
- if (gtk_widget_get_direction (widget) != GTK_TEXT_DIR_RTL) {
- child_allocation.width = child_allocation.x;
- child_allocation.x = border_width/* + ALIGN_BORDER*/;
-
- if(grip->_priv->handle_shown) {
- child_allocation.x += DRAG_HANDLE_SIZE;
- child_allocation.width -= DRAG_HANDLE_SIZE;
- }
-
- } else {
- child_allocation.width = allocation->width -
- (child_allocation.x - allocation->x)/* - ALIGN_BORDER*/;
-
- if(grip->_priv->handle_shown)
- child_allocation.width -= DRAG_HANDLE_SIZE;
- }
-
- if(child_allocation.width < 0)
- child_allocation.width = 0;
-
- child_allocation.y = border_width;
- child_allocation.height = allocation->height - border_width * 2;
- if(grip->_priv->label) {
- gtk_widget_size_allocate (grip->_priv->label, &child_allocation);
- }
-
- if (grip->title_window) {
- gdk_window_move_resize (grip->title_window,
- allocation->x,
- allocation->y,
- allocation->width,
- allocation->height);
- }
-}
-
-static void
-gdl_dock_item_grip_add (GtkContainer *container,
- GtkWidget *widget)
-{
- g_warning ("gtk_container_add not implemented for GdlDockItemGrip");
-}
-
-static void
-gdl_dock_item_grip_remove (GtkContainer *container,
- GtkWidget *widget)
-{
- gdl_dock_item_grip_set_label (GDL_DOCK_ITEM_GRIP (container), NULL);
-}
-
-static void
-gdl_dock_item_grip_forall (GtkContainer *container,
- gboolean include_internals,
- GtkCallback callback,
- gpointer callback_data)
-{
- GdlDockItemGrip *grip;
-
- g_return_if_fail (GDL_IS_DOCK_ITEM_GRIP (container));
- grip = GDL_DOCK_ITEM_GRIP (container);
-
- if (grip->_priv) {
- if(grip->_priv->label) {
- (* callback) (grip->_priv->label, callback_data);
- }
-
- if (include_internals) {
- (* callback) (grip->_priv->close_button, callback_data);
- (* callback) (grip->_priv->iconify_button, callback_data);
- }
- }
-}
-
-static GType
-gdl_dock_item_grip_child_type (GtkContainer *container)
-{
- return G_TYPE_NONE;
-}
-
-static void
-gdl_dock_item_grip_class_init (GdlDockItemGripClass *klass)
-{
- GObjectClass *gobject_class;
- GtkObjectClass *gtk_object_class;
- GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
-
- gobject_class = G_OBJECT_CLASS (klass);
- gtk_object_class = GTK_OBJECT_CLASS (klass);
- widget_class = GTK_WIDGET_CLASS (klass);
- container_class = GTK_CONTAINER_CLASS (klass);
-
- gobject_class->set_property = gdl_dock_item_grip_set_property;
-
- gtk_object_class->destroy = gdl_dock_item_grip_destroy;
-
- widget_class->expose_event = gdl_dock_item_grip_expose;
- widget_class->realize = gdl_dock_item_grip_realize;
- widget_class->unrealize = gdl_dock_item_grip_unrealize;
- widget_class->map = gdl_dock_item_grip_map;
- widget_class->unmap = gdl_dock_item_grip_unmap;
- widget_class->size_request = gdl_dock_item_grip_size_request;
- widget_class->size_allocate = gdl_dock_item_grip_size_allocate;
-
- container_class->add = gdl_dock_item_grip_add;
- container_class->remove = gdl_dock_item_grip_remove;
- container_class->forall = gdl_dock_item_grip_forall;
- container_class->child_type = gdl_dock_item_grip_child_type;
-
- g_object_class_install_property (
- gobject_class, PROP_ITEM,
- g_param_spec_object ("item", _("Controlling dock item"),
- _("Dockitem which 'owns' this grip"),
- GDL_TYPE_DOCK_ITEM,
- G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
-}
-
-static void
-gdl_dock_item_grip_showhide_handle (GdlDockItemGrip *grip)
-{
- gtk_widget_queue_resize (GTK_WIDGET (grip));
-}
-
-/* ----- Public interface ----- */
-
-/**
- * gdl_dock_item_grip_new:
- * @item: The dock item that will "own" this grip widget.
- *
- * Creates a new GDL dock item grip object.
- * Returns: The newly created dock item grip widget.
- **/
-GtkWidget *
-gdl_dock_item_grip_new (GdlDockItem *item)
-{
- GdlDockItemGrip *grip = g_object_new (GDL_TYPE_DOCK_ITEM_GRIP, "item", item,
- NULL);
-
- return GTK_WIDGET (grip);
-}
-
-/**
- * gdl_dock_item_grip_set_label:
- * @grip: The grip that will get it's label widget set.
- * @label: The widget that will become the label.
- *
- * Replaces the current label widget with another widget.
- **/
-void
-gdl_dock_item_grip_set_label (GdlDockItemGrip *grip,
- GtkWidget *label)
-{
- g_return_if_fail (grip != NULL);
-
- if (grip->_priv->label) {
- gtk_widget_unparent(grip->_priv->label);
- g_object_unref (grip->_priv->label);
- grip->_priv->label = NULL;
- }
-
- if (label) {
- g_object_ref (label);
- gtk_widget_set_parent (label, GTK_WIDGET (grip));
- gtk_widget_show (label);
- grip->_priv->label = label;
- }
-}
-/**
- * gdl_dock_item_grip_hide_handle:
- * @grip: The dock item grip to hide the handle of.
- *
- * This function hides the dock item's grip widget handle hatching.
- **/
-void
-gdl_dock_item_grip_hide_handle (GdlDockItemGrip *grip)
-{
- g_return_if_fail (grip != NULL);
- if (grip->_priv->handle_shown) {
- grip->_priv->handle_shown = FALSE;
- gdl_dock_item_grip_showhide_handle (grip);
- };
-}
-
-/**
- * gdl_dock_item_grip_show_handle:
- * @grip: The dock item grip to show the handle of.
- *
- * This function shows the dock item's grip widget handle hatching.
- **/
-void
-gdl_dock_item_grip_show_handle (GdlDockItemGrip *grip)
-{
- g_return_if_fail (grip != NULL);
- if (!grip->_priv->handle_shown) {
- grip->_priv->handle_shown = TRUE;
- gdl_dock_item_grip_showhide_handle (grip);
- };
-}
diff --git a/src/libgdl/gdl-dock-item-grip.h b/src/libgdl/gdl-dock-item-grip.h
deleted file mode 100644
index a44ef91fb..000000000
--- a/src/libgdl/gdl-dock-item-grip.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 8 -*- */
-/*
- * gdl-dock-item-grip.h
- *
- * Author: Michael Meeks Copyright (C) 2002 Sun Microsystems, Inc.
- *
- * Based on BonoboDockItemGrip. Original copyright notice follows.
- *
- * Copyright (C) 1998 Ettore Perazzoli
- * Copyright (C) 1998 Elliot Lee
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- * All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef _GDL_DOCK_ITEM_GRIP_H_
-#define _GDL_DOCK_ITEM_GRIP_H_
-
-#include <gtk/gtk.h>
-#include "libgdl/gdl-dock-item.h"
-
-G_BEGIN_DECLS
-
-#define GDL_TYPE_DOCK_ITEM_GRIP (gdl_dock_item_grip_get_type())
-#define GDL_DOCK_ITEM_GRIP(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDL_TYPE_DOCK_ITEM_GRIP, GdlDockItemGrip))
-#define GDL_DOCK_ITEM_GRIP_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST ((klass), GDL_TYPE_DOCK_ITEM_GRIP, GdlDockItemGripClass))
-#define GDL_IS_DOCK_ITEM_GRIP(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDL_TYPE_DOCK_ITEM_GRIP))
-#define GDL_IS_DOCK_ITEM_GRIP_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE ((klass), GDL_TYPE_DOCK_ITEM_GRIP))
-#define GDL_DOCK_ITEM_GRIP_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), GDL_TYPE_DOCK_ITEM_GRIP, GdlDockItemGripClass))
-
-typedef struct _GdlDockItemGrip GdlDockItemGrip;
-typedef struct _GdlDockItemGripClass GdlDockItemGripClass;
-typedef struct _GdlDockItemGripPrivate GdlDockItemGripPrivate;
-
-struct _GdlDockItemGrip {
- GtkContainer parent;
-
- GdlDockItem *item;
-
- GdkWindow *title_window;
-
- GdlDockItemGripPrivate *_priv;
-};
-
-struct _GdlDockItemGripClass {
- GtkContainerClass parent_class;
-};
-
-GType gdl_dock_item_grip_get_type (void);
-GtkWidget *gdl_dock_item_grip_new (GdlDockItem *item);
-void gdl_dock_item_grip_set_label (GdlDockItemGrip *grip,
- GtkWidget *label);
-void gdl_dock_item_grip_hide_handle (GdlDockItemGrip *grip);
-void gdl_dock_item_grip_show_handle (GdlDockItemGrip *grip);
-
-G_END_DECLS
-
-#endif /* _GDL_DOCK_ITEM_GRIP_H_ */
diff --git a/src/libgdl/gdl-dock-item.c b/src/libgdl/gdl-dock-item.c
deleted file mode 100644
index af630e681..000000000
--- a/src/libgdl/gdl-dock-item.c
+++ /dev/null
@@ -1,2401 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * gdl-dock-item.c
- *
- * Author: Gustavo Giráldez <gustavo.giraldez@gmx.net>
- * Naba Kumar <naba@gnome.org>
- *
- * Based on GnomeDockItem/BonoboDockItem. Original copyright notice follows.
- *
- * Copyright (C) 1998 Ettore Perazzoli
- * Copyright (C) 1998 Elliot Lee
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- * All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "gdl-i18n.h"
-#include <string.h>
-#include <gdk/gdkkeysyms.h>
-
-#include "gdl-dock.h"
-#include "gdl-dock-item.h"
-#include "gdl-dock-item-grip.h"
-#include "gdl-dock-notebook.h"
-#include "gdl-dock-paned.h"
-#include "gdl-dock-tablabel.h"
-#include "gdl-dock-placeholder.h"
-#include "gdl-dock-master.h"
-#include "libgdltypebuiltins.h"
-#include "libgdlmarshal.h"
-
-#define NEW_DOCK_ITEM_RATIO 0.3
-
-/* ----- Private prototypes ----- */
-
-static void gdl_dock_item_class_init (GdlDockItemClass *class);
-
-static GObject *gdl_dock_item_constructor (GType type,
- guint n_construct_properties,
- GObjectConstructParam *construct_param);
-
-static void gdl_dock_item_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gdl_dock_item_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
-
-static void gdl_dock_item_destroy (GtkObject *object);
-
-static void gdl_dock_item_add (GtkContainer *container,
- GtkWidget *widget);
-static void gdl_dock_item_remove (GtkContainer *container,
- GtkWidget *widget);
-static void gdl_dock_item_forall (GtkContainer *container,
- gboolean include_internals,
- GtkCallback callback,
- gpointer callback_data);
-static GType gdl_dock_item_child_type (GtkContainer *container);
-
-static void gdl_dock_item_set_focus_child (GtkContainer *container,
- GtkWidget *widget);
-
-static void gdl_dock_item_size_request (GtkWidget *widget,
- GtkRequisition *requisition);
-static void gdl_dock_item_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation);
-static void gdl_dock_item_map (GtkWidget *widget);
-static void gdl_dock_item_unmap (GtkWidget *widget);
-static void gdl_dock_item_realize (GtkWidget *widget);
-static void gdl_dock_item_style_set (GtkWidget *widget,
- GtkStyle *previous_style);
-static gint gdl_dock_item_expose (GtkWidget *widget,
- GdkEventExpose *event);
-
-static void gdl_dock_item_move_focus_child (GdlDockItem *item,
- GtkDirectionType dir);
-
-static gint gdl_dock_item_button_changed (GtkWidget *widget,
- GdkEventButton *event);
-static gint gdl_dock_item_motion (GtkWidget *widget,
- GdkEventMotion *event);
-static gboolean gdl_dock_item_key_press (GtkWidget *widget,
- GdkEventKey *event);
-
-static gboolean gdl_dock_item_dock_request (GdlDockObject *object,
- gint x,
- gint y,
- GdlDockRequest *request);
-static void gdl_dock_item_dock (GdlDockObject *object,
- GdlDockObject *requestor,
- GdlDockPlacement position,
- GValue *other_data);
-
-static void gdl_dock_item_popup_menu (GdlDockItem *item,
- guint button,
- guint32 time);
-static void gdl_dock_item_drag_start (GdlDockItem *item);
-static void gdl_dock_item_drag_end (GdlDockItem *item,
- gboolean cancel);
-
-static void gdl_dock_item_tab_button (GtkWidget *widget,
- GdkEventButton *event,
- gpointer data);
-
-static void gdl_dock_item_hide_cb (GtkWidget *widget,
- GdlDockItem *item);
-
-static void gdl_dock_item_lock_cb (GtkWidget *widget,
- GdlDockItem *item);
-
-static void gdl_dock_item_unlock_cb (GtkWidget *widget,
- GdlDockItem *item);
-
-static void gdl_dock_item_showhide_grip (GdlDockItem *item);
-
-static void gdl_dock_item_real_set_orientation (GdlDockItem *item,
- GtkOrientation orientation);
-
-static void gdl_dock_param_export_gtk_orientation (const GValue *src,
- GValue *dst);
-static void gdl_dock_param_import_gtk_orientation (const GValue *src,
- GValue *dst);
-
-
-
-/* ----- Class variables and definitions ----- */
-
-enum {
- PROP_0,
- PROP_ORIENTATION,
- PROP_RESIZE,
- PROP_BEHAVIOR,
- PROP_LOCKED,
- PROP_PREFERRED_WIDTH,
- PROP_PREFERRED_HEIGHT
-};
-
-enum {
- DOCK_DRAG_BEGIN,
- DOCK_DRAG_MOTION,
- DOCK_DRAG_END,
- SELECTED,
- MOVE_FOCUS_CHILD,
- LAST_SIGNAL
-};
-
-static guint gdl_dock_item_signals [LAST_SIGNAL] = { 0 };
-
-#define GDL_DOCK_ITEM_GRIP_SHOWN(item) \
- (GDL_DOCK_ITEM_HAS_GRIP (item))
-
-struct _GdlDockItemPrivate {
- GtkWidget *menu;
-
- gboolean grip_shown;
- GtkWidget *grip;
- guint grip_size;
-
- GtkWidget *tab_label;
- gboolean intern_tab_label;
- guint notify_label;
- guint notify_stock_id;
-
- gint preferred_width;
- gint preferred_height;
-
- GdlDockPlaceholder *ph;
-
- gint start_x, start_y;
-};
-
-/* FIXME: implement the rest of the behaviors */
-
-#define SPLIT_RATIO 0.4
-
-
-/* ----- Private functions ----- */
-
-G_DEFINE_TYPE (GdlDockItem, gdl_dock_item, GDL_TYPE_DOCK_OBJECT);
-
-static void
-add_tab_bindings (GtkBindingSet *binding_set,
- GdkModifierType modifiers,
- GtkDirectionType direction)
-{
- gtk_binding_entry_add_signal (binding_set, GDK_KEY_Tab, modifiers,
- "move_focus_child", 1,
- GTK_TYPE_DIRECTION_TYPE, direction);
- gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Tab, modifiers,
- "move_focus_child", 1,
- GTK_TYPE_DIRECTION_TYPE, direction);
-}
-
-static void
-add_arrow_bindings (GtkBindingSet *binding_set,
- guint keysym,
- GtkDirectionType direction)
-{
- guint keypad_keysym = keysym - GDK_KEY_Left + GDK_KEY_KP_Left;
-
- gtk_binding_entry_add_signal (binding_set, keysym, 0,
- "move_focus_child", 1,
- GTK_TYPE_DIRECTION_TYPE, direction);
- gtk_binding_entry_add_signal (binding_set, keysym, GDK_CONTROL_MASK,
- "move_focus_child", 1,
- GTK_TYPE_DIRECTION_TYPE, direction);
- gtk_binding_entry_add_signal (binding_set, keysym, GDK_CONTROL_MASK,
- "move_focus_child", 1,
- GTK_TYPE_DIRECTION_TYPE, direction);
- gtk_binding_entry_add_signal (binding_set, keypad_keysym, GDK_CONTROL_MASK,
- "move_focus_child", 1,
- GTK_TYPE_DIRECTION_TYPE, direction);
-}
-
-static void
-gdl_dock_item_class_init (GdlDockItemClass *klass)
-{
- static gboolean style_initialized = FALSE;
-
- GObjectClass *g_object_class;
- GtkObjectClass *gtk_object_class;
- GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
- GdlDockObjectClass *object_class;
- GtkBindingSet *binding_set;
-
- g_object_class = G_OBJECT_CLASS (klass);
- gtk_object_class = GTK_OBJECT_CLASS (klass);
- widget_class = GTK_WIDGET_CLASS (klass);
- container_class = GTK_CONTAINER_CLASS (klass);
- object_class = GDL_DOCK_OBJECT_CLASS (klass);
-
- g_object_class->constructor = gdl_dock_item_constructor;
- g_object_class->set_property = gdl_dock_item_set_property;
- g_object_class->get_property = gdl_dock_item_get_property;
-
- gtk_object_class->destroy = gdl_dock_item_destroy;
-
- widget_class->realize = gdl_dock_item_realize;
- widget_class->map = gdl_dock_item_map;
- widget_class->unmap = gdl_dock_item_unmap;
- widget_class->size_request = gdl_dock_item_size_request;
- widget_class->size_allocate = gdl_dock_item_size_allocate;
- widget_class->style_set = gdl_dock_item_style_set;
- widget_class->expose_event = gdl_dock_item_expose;
- widget_class->button_press_event = gdl_dock_item_button_changed;
- widget_class->button_release_event = gdl_dock_item_button_changed;
- widget_class->motion_notify_event = gdl_dock_item_motion;
- widget_class->key_press_event = gdl_dock_item_key_press;
-
- container_class->add = gdl_dock_item_add;
- container_class->remove = gdl_dock_item_remove;
- container_class->forall = gdl_dock_item_forall;
- container_class->child_type = gdl_dock_item_child_type;
- container_class->set_focus_child = gdl_dock_item_set_focus_child;
-
- object_class->is_compound = FALSE;
-
- object_class->dock_request = gdl_dock_item_dock_request;
- object_class->dock = gdl_dock_item_dock;
-
- /* properties */
-
- /**
- * GdlDockItem:orientation:
- *
- * The orientation of the docking item. If the orientation is set to
- * #GTK_ORIENTATION_VERTICAL, the grip widget will be shown along
- * the top of the edge of item (if it is not hidden). If the
- * orientation is set to #GTK_ORIENTATION_HORIZONTAL, the grip
- * widget will be shown down the left edge of the item (even if the
- * widget text direction is set to RTL).
- */
- g_object_class_install_property (
- g_object_class, PROP_ORIENTATION,
- g_param_spec_enum ("orientation", _("Orientation"),
- _("Orientation of the docking item"),
- GTK_TYPE_ORIENTATION,
- GTK_ORIENTATION_VERTICAL,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT |
- GDL_DOCK_PARAM_EXPORT));
-
- /* --- register exporter/importer for GTK_ORIENTATION */
- g_value_register_transform_func (GTK_TYPE_ORIENTATION, GDL_TYPE_DOCK_PARAM,
- gdl_dock_param_export_gtk_orientation);
- g_value_register_transform_func (GDL_TYPE_DOCK_PARAM, GTK_TYPE_ORIENTATION,
- gdl_dock_param_import_gtk_orientation);
- /* --- end of registration */
-
- g_object_class_install_property (
- g_object_class, PROP_RESIZE,
- g_param_spec_boolean ("resize", _("Resizable"),
- _("If set, the dock item can be resized when "
- "docked in a GtkPanel widget"),
- TRUE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (
- g_object_class, PROP_BEHAVIOR,
- g_param_spec_flags ("behavior", _("Item behavior"),
- _("General behavior for the dock item (i.e. "
- "whether it can float, if it's locked, etc.)"),
- GDL_TYPE_DOCK_ITEM_BEHAVIOR,
- GDL_DOCK_ITEM_BEH_NORMAL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (
- g_object_class, PROP_LOCKED,
- g_param_spec_boolean ("locked", _("Locked"),
- _("If set, the dock item cannot be dragged around "
- "and it doesn't show a grip"),
- FALSE,
- G_PARAM_READWRITE |
- GDL_DOCK_PARAM_EXPORT));
-
- g_object_class_install_property (
- g_object_class, PROP_PREFERRED_WIDTH,
- g_param_spec_int ("preferred-width", _("Preferred width"),
- _("Preferred width for the dock item"),
- -1, G_MAXINT, -1,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (
- g_object_class, PROP_PREFERRED_HEIGHT,
- g_param_spec_int ("preferred-height", _("Preferred height"),
- _("Preferred height for the dock item"),
- -1, G_MAXINT, -1,
- G_PARAM_READWRITE));
-
- /* signals */
-
- /**
- * GdlDockItem::dock-drag-begin:
- * @item: The dock item which is being dragged.
- *
- * Signals that the dock item has begun to be dragged.
- **/
- gdl_dock_item_signals [DOCK_DRAG_BEGIN] =
- g_signal_new ("dock-drag-begin",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (GdlDockItemClass, dock_drag_begin),
- NULL, /* accumulator */
- NULL, /* accu_data */
- gdl_marshal_VOID__VOID,
- G_TYPE_NONE,
- 0);
-
- /**
- * GdlDockItem::dock-drag-motion:
- * @item: The dock item which is being dragged.
- * @x: The x-position that the dock item has been dragged to.
- * @y: The y-position that the dock item has been dragged to.
- *
- * Signals that a dock item dragging motion event has occured.
- **/
- gdl_dock_item_signals [DOCK_DRAG_MOTION] =
- g_signal_new ("dock-drag-motion",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (GdlDockItemClass, dock_drag_motion),
- NULL, /* accumulator */
- NULL, /* accu_data */
- gdl_marshal_VOID__INT_INT,
- G_TYPE_NONE,
- 2,
- G_TYPE_INT,
- G_TYPE_INT);
-
- /**
- * GdlDockItem::dock-drag-end:
- * @item: The dock item which is no longer being dragged.
- * @cancel: This value is set to TRUE if the drag was cancelled by
- * the user. #cancel is set to FALSE if the drag was accepted.
- *
- * Signals that the dock item dragging has ended.
- **/
- gdl_dock_item_signals [DOCK_DRAG_END] =
- g_signal_new ("dock_drag_end",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (GdlDockItemClass, dock_drag_end),
- NULL, /* accumulator */
- NULL, /* accu_data */
- gdl_marshal_VOID__BOOLEAN,
- G_TYPE_NONE,
- 1,
- G_TYPE_BOOLEAN);
-
- /**
- * GdlDockItem::selected:
- *
- * Signals that this dock has been selected from a switcher.
- */
- gdl_dock_item_signals [SELECTED] =
- g_signal_new ("selected",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_FIRST,
- 0,
- NULL,
- NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE,
- 0);
-
- gdl_dock_item_signals [MOVE_FOCUS_CHILD] =
- g_signal_new ("move_focus_child",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
- G_STRUCT_OFFSET (GdlDockItemClass, move_focus_child),
- NULL, /* accumulator */
- NULL, /* accu_data */
- gdl_marshal_VOID__ENUM,
- G_TYPE_NONE,
- 1,
- GTK_TYPE_DIRECTION_TYPE);
-
-
- /* key bindings */
-
- binding_set = gtk_binding_set_by_class (klass);
-
- add_arrow_bindings (binding_set, GDK_KEY_Up, GTK_DIR_UP);
- add_arrow_bindings (binding_set, GDK_KEY_Down, GTK_DIR_DOWN);
- add_arrow_bindings (binding_set, GDK_KEY_Left, GTK_DIR_LEFT);
- add_arrow_bindings (binding_set, GDK_KEY_Right, GTK_DIR_RIGHT);
-
- add_tab_bindings (binding_set, 0, GTK_DIR_TAB_FORWARD);
- add_tab_bindings (binding_set, GDK_CONTROL_MASK, GTK_DIR_TAB_FORWARD);
- add_tab_bindings (binding_set, GDK_SHIFT_MASK, GTK_DIR_TAB_BACKWARD);
- add_tab_bindings (binding_set, GDK_CONTROL_MASK | GDK_SHIFT_MASK, GTK_DIR_TAB_BACKWARD);
-
- klass->has_grip = TRUE;
- klass->dock_drag_begin = NULL;
- klass->dock_drag_motion = NULL;
- klass->dock_drag_end = NULL;
- klass->move_focus_child = gdl_dock_item_move_focus_child;
- klass->set_orientation = gdl_dock_item_real_set_orientation;
-
- if (!style_initialized)
- {
- style_initialized = TRUE;
- gtk_rc_parse_string (
- "style \"gdl-dock-item-default\" {\n"
- "xthickness = 0\n"
- "ythickness = 0\n"
- "}\n"
- "class \"GdlDockItem\" "
- "style : gtk \"gdl-dock-item-default\"\n");
- }
-}
-
-static void
-gdl_dock_item_init (GdlDockItem *item)
-{
- gtk_widget_set_has_window (GTK_WIDGET (item), TRUE);
- gtk_widget_set_can_focus (GTK_WIDGET (item), TRUE);
-
- item->child = NULL;
-
- item->orientation = GTK_ORIENTATION_VERTICAL;
- item->behavior = GDL_DOCK_ITEM_BEH_NORMAL;
-
- item->resize = TRUE;
-
- item->dragoff_x = item->dragoff_y = 0;
-
- item->_priv = g_new0 (GdlDockItemPrivate, 1);
- item->_priv->menu = NULL;
-
- item->_priv->preferred_width = item->_priv->preferred_height = -1;
- item->_priv->tab_label = NULL;
- item->_priv->intern_tab_label = FALSE;
-
- item->_priv->ph = NULL;
-}
-
-static void
-on_long_name_changed (GObject* item,
- GParamSpec* spec,
- gpointer user_data)
-{
- gchar* long_name;
- g_object_get (item, "long-name", &long_name, NULL);
- gtk_label_set_label (GTK_LABEL (user_data), long_name);
- g_free(long_name);
-}
-
-static void
-on_stock_id_changed (GObject* item,
- GParamSpec* spec,
- gpointer user_data)
-{
- gchar* stock_id;
- g_object_get (item, "stock_id", &stock_id, NULL);
- gtk_image_set_from_stock (GTK_IMAGE (user_data), stock_id, GTK_ICON_SIZE_MENU);
- g_free(stock_id);
-}
-
-static GObject *
-gdl_dock_item_constructor (GType type,
- guint n_construct_properties,
- GObjectConstructParam *construct_param)
-{
- GObject *g_object;
-
- g_object = G_OBJECT_CLASS (gdl_dock_item_parent_class)-> constructor (type,
- n_construct_properties,
- construct_param);
- if (g_object) {
- GdlDockItem *item = GDL_DOCK_ITEM (g_object);
- GtkWidget *hbox;
- GtkWidget *label;
- GtkWidget *icon;
- gchar* long_name;
- gchar* stock_id;
-
- if (GDL_DOCK_ITEM_HAS_GRIP (item)) {
- item->_priv->grip_shown = TRUE;
- item->_priv->grip = gdl_dock_item_grip_new (item);
- gtk_widget_set_parent (item->_priv->grip, GTK_WIDGET (item));
- gtk_widget_show (item->_priv->grip);
- }
- else {
- item->_priv->grip_shown = FALSE;
- }
-
- g_object_get (g_object, "long-name", &long_name, "stock-id", &stock_id, NULL);
-
- hbox = gtk_hbox_new (FALSE, 5);
- label = gtk_label_new (long_name);
- icon = gtk_image_new ();
- if (stock_id)
- gtk_image_set_from_stock (GTK_IMAGE (icon), stock_id,
- GTK_ICON_SIZE_MENU);
- gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-
- item->_priv->notify_label =
- g_signal_connect (item, "notify::long-name", G_CALLBACK (on_long_name_changed),
- label);
- item->_priv->notify_stock_id =
- g_signal_connect (item, "notify::stock-id", G_CALLBACK (on_stock_id_changed),
- icon);
-
- gtk_widget_show_all (hbox);
-
- gdl_dock_item_set_tablabel (item, hbox);
- item->_priv->intern_tab_label = TRUE;
-
- g_free (long_name);
- g_free (stock_id);
- }
-
- return g_object;
-}
-
-static void
-gdl_dock_item_set_property (GObject *g_object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- GdlDockItem *item = GDL_DOCK_ITEM (g_object);
-
- switch (prop_id) {
- case PROP_ORIENTATION:
- gdl_dock_item_set_orientation (item, g_value_get_enum (value));
- break;
- case PROP_RESIZE:
- item->resize = g_value_get_boolean (value);
- gtk_widget_queue_resize (GTK_WIDGET (item));
- break;
- case PROP_BEHAVIOR:
- {
- GdlDockItemBehavior old_beh = item->behavior;
- item->behavior = g_value_get_flags (value);
-
- if ((old_beh ^ item->behavior) & GDL_DOCK_ITEM_BEH_LOCKED) {
- if (GDL_DOCK_OBJECT_GET_MASTER (item))
- g_signal_emit_by_name (GDL_DOCK_OBJECT_GET_MASTER (item),
- "layout-changed");
- g_object_notify (g_object, "locked");
- gdl_dock_item_showhide_grip (item);
- }
-
- break;
- }
- case PROP_LOCKED:
- {
- GdlDockItemBehavior old_beh = item->behavior;
-
- if (g_value_get_boolean (value))
- item->behavior |= GDL_DOCK_ITEM_BEH_LOCKED;
- else
- item->behavior &= ~GDL_DOCK_ITEM_BEH_LOCKED;
-
- if (old_beh ^ item->behavior) {
- gdl_dock_item_showhide_grip (item);
- g_object_notify (g_object, "behavior");
-
- if (GDL_DOCK_OBJECT_GET_MASTER (item))
- g_signal_emit_by_name (GDL_DOCK_OBJECT_GET_MASTER (item),
- "layout-changed");
- }
- break;
- }
- case PROP_PREFERRED_WIDTH:
- item->_priv->preferred_width = g_value_get_int (value);
- break;
- case PROP_PREFERRED_HEIGHT:
- item->_priv->preferred_height = g_value_get_int (value);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (g_object, prop_id, pspec);
- break;
- }
-}
-
-static void
-gdl_dock_item_get_property (GObject *g_object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- GdlDockItem *item = GDL_DOCK_ITEM (g_object);
-
- switch (prop_id) {
- case PROP_ORIENTATION:
- g_value_set_enum (value, item->orientation);
- break;
- case PROP_RESIZE:
- g_value_set_boolean (value, item->resize);
- break;
- case PROP_BEHAVIOR:
- g_value_set_flags (value, item->behavior);
- break;
- case PROP_LOCKED:
- g_value_set_boolean (value, !GDL_DOCK_ITEM_NOT_LOCKED (item));
- break;
- case PROP_PREFERRED_WIDTH:
- g_value_set_int (value, item->_priv->preferred_width);
- break;
- case PROP_PREFERRED_HEIGHT:
- g_value_set_int (value, item->_priv->preferred_height);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (g_object, prop_id, pspec);
- break;
- }
-}
-
-static void
-gdl_dock_item_destroy (GtkObject *object)
-{
- GdlDockItem *item = GDL_DOCK_ITEM (object);
-
- if (item->_priv) {
- GdlDockItemPrivate *priv = item->_priv;
-
- if (priv->tab_label) {
- gdl_dock_item_set_tablabel (item, NULL);
- };
- if (priv->menu) {
- gtk_menu_detach (GTK_MENU (priv->menu));
- priv->menu = NULL;
- };
- if (priv->grip) {
- gtk_container_remove (GTK_CONTAINER (item), priv->grip);
- priv->grip = NULL;
- }
- if (priv->ph) {
- g_object_unref (priv->ph);
- priv->ph = NULL;
- }
-
- item->_priv = NULL;
- g_free (priv);
- }
-
- GTK_OBJECT_CLASS (gdl_dock_item_parent_class)->destroy (object);
-}
-
-static void
-gdl_dock_item_add (GtkContainer *container,
- GtkWidget *widget)
-{
- GdlDockItem *item;
-
- g_return_if_fail (GDL_IS_DOCK_ITEM (container));
-
- item = GDL_DOCK_ITEM (container);
- if (GDL_IS_DOCK_OBJECT (widget)) {
- g_warning (_("You can't add a dock object (%p of type %s) inside a %s. "
- "Use a GdlDock or some other compound dock object."),
- widget, G_OBJECT_TYPE_NAME (widget), G_OBJECT_TYPE_NAME (item));
- return;
- }
-
- if (item->child != NULL) {
- g_warning (_("Attempting to add a widget with type %s to a %s, "
- "but it can only contain one widget at a time; "
- "it already contains a widget of type %s"),
- G_OBJECT_TYPE_NAME (widget),
- G_OBJECT_TYPE_NAME (item),
- G_OBJECT_TYPE_NAME (item->child));
- return;
- }
-
- gtk_widget_set_parent (widget, GTK_WIDGET (item));
- item->child = widget;
-}
-
-static void
-gdl_dock_item_remove (GtkContainer *container,
- GtkWidget *widget)
-{
- GdlDockItem *item;
- gboolean was_visible;
-
- g_return_if_fail (GDL_IS_DOCK_ITEM (container));
-
- item = GDL_DOCK_ITEM (container);
- if (item->_priv && widget == item->_priv->grip) {
- gboolean grip_was_visible = gtk_widget_get_visible (widget);
- gtk_widget_unparent (widget);
- item->_priv->grip = NULL;
- if (grip_was_visible)
- gtk_widget_queue_resize (GTK_WIDGET (item));
- return;
- }
-
- if (GDL_DOCK_ITEM_IN_DRAG (item)) {
- gdl_dock_item_drag_end (item, TRUE);
- }
-
- g_return_if_fail (item->child == widget);
-
- was_visible = gtk_widget_get_visible (widget);
-
- gtk_widget_unparent (widget);
- item->child = NULL;
-
- if (was_visible)
- gtk_widget_queue_resize (GTK_WIDGET (container));
-}
-
-static void
-gdl_dock_item_forall (GtkContainer *container,
- gboolean include_internals,
- GtkCallback callback,
- gpointer callback_data)
-{
- GdlDockItem *item = (GdlDockItem *) container;
-
- g_return_if_fail (callback != NULL);
-
- if (include_internals && item->_priv->grip)
- (* callback) (item->_priv->grip, callback_data);
-
- if (item->child)
- (* callback) (item->child, callback_data);
-}
-
-static GType
-gdl_dock_item_child_type (GtkContainer *container)
-{
- g_return_val_if_fail (GDL_IS_DOCK_ITEM (container), G_TYPE_NONE);
-
- if (!GDL_DOCK_ITEM (container)->child)
- return GTK_TYPE_WIDGET;
- else
- return G_TYPE_NONE;
-}
-
-static void
-gdl_dock_item_set_focus_child (GtkContainer *container,
- GtkWidget *child)
-{
- g_return_if_fail (GDL_IS_DOCK_ITEM (container));
-
- if (GTK_CONTAINER_CLASS (gdl_dock_item_parent_class)->set_focus_child) {
- (* GTK_CONTAINER_CLASS (gdl_dock_item_parent_class)->set_focus_child) (container, child);
- }
-
- gdl_dock_item_showhide_grip (GDL_DOCK_ITEM (container));
-}
-
-static void
-gdl_dock_item_size_request (GtkWidget *widget,
- GtkRequisition *requisition)
-{
- GdlDockItem *item;
- GtkRequisition child_requisition;
- GtkRequisition grip_requisition;
- GtkStyle *style;
- guint border_width;
-
- g_return_if_fail (GDL_IS_DOCK_ITEM (widget));
- g_return_if_fail (requisition != NULL);
-
- item = GDL_DOCK_ITEM (widget);
-
- /* If our child is not visible, we still request its size, since
- we won't have any useful hint for our size otherwise. */
- if (item->child)
- gtk_widget_size_request (item->child, &child_requisition);
- else {
- child_requisition.width = 0;
- child_requisition.height = 0;
- }
-
- if (item->orientation == GTK_ORIENTATION_HORIZONTAL) {
- if (GDL_DOCK_ITEM_GRIP_SHOWN (item)) {
- gtk_widget_size_request (item->_priv->grip, &grip_requisition);
- requisition->width = grip_requisition.width;
- } else {
- requisition->width = 0;
- }
-
- if (item->child) {
- requisition->width += child_requisition.width;
- requisition->height = child_requisition.height;
- } else
- requisition->height = 0;
- } else {
- if (GDL_DOCK_ITEM_GRIP_SHOWN (item)) {
- gtk_widget_size_request (item->_priv->grip, &grip_requisition);
- requisition->height = grip_requisition.height;
- } else {
- requisition->height = 0;
- }
-
- if (item->child) {
- requisition->width = child_requisition.width;
- requisition->height += child_requisition.height;
- } else
- requisition->width = 0;
- }
-
- border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
- style = gtk_widget_get_style (widget);
-
- requisition->width += (border_width + style->xthickness) * 2;
- requisition->height += (border_width + style->ythickness) * 2;
-
- //gtk_widget_size_request (widget, requisition);
-}
-
-static void
-gdl_dock_item_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation)
-{
- GdlDockItem *item;
-
- g_return_if_fail (GDL_IS_DOCK_ITEM (widget));
- g_return_if_fail (allocation != NULL);
-
- item = GDL_DOCK_ITEM (widget);
-
- gtk_widget_set_allocation (widget, allocation);
-
- /* Once size is allocated, preferred size is no longer necessary */
- item->_priv->preferred_height = -1;
- item->_priv->preferred_width = -1;
-
- if (gtk_widget_get_realized (widget))
- gdk_window_move_resize (gtk_widget_get_window (widget),
- allocation->x,
- allocation->y,
- allocation->width,
- allocation->height);
-
- if (item->child && gtk_widget_get_visible (item->child)) {
- GtkAllocation child_allocation;
- GtkStyle *style;
- guint border_width;
-
- border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
- style = gtk_widget_get_style (widget);
-
- child_allocation.x = border_width + style->xthickness;
- child_allocation.y = border_width + style->ythickness;
- child_allocation.width = allocation->width
- - 2 * (border_width + style->xthickness);
- child_allocation.height = allocation->height
- - 2 * (border_width + style->ythickness);
-
- if (GDL_DOCK_ITEM_GRIP_SHOWN (item)) {
- GtkAllocation grip_alloc = child_allocation;
- GtkRequisition grip_req;
-
- gtk_widget_size_request (item->_priv->grip, &grip_req);
-
- if (item->orientation == GTK_ORIENTATION_HORIZONTAL) {
- child_allocation.x += grip_req.width;
- child_allocation.width -= grip_req.width;
- grip_alloc.width = grip_req.width;
- } else {
- child_allocation.y += grip_req.height;
- child_allocation.height -= grip_req.height;
- grip_alloc.height = grip_req.height;
- }
- if (item->_priv->grip)
- gtk_widget_size_allocate (item->_priv->grip, &grip_alloc);
- }
- /* Allocation can't be negative */
- if (child_allocation.width < 0)
- child_allocation.width = 0;
- if (child_allocation.height < 0)
- child_allocation.height = 0;
- gtk_widget_size_allocate (item->child, &child_allocation);
- }
-}
-
-static void
-gdl_dock_item_map (GtkWidget *widget)
-{
- GdlDockItem *item;
-
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GDL_IS_DOCK_ITEM (widget));
-
- gtk_widget_set_mapped (widget, TRUE);
-
- item = GDL_DOCK_ITEM (widget);
-
- gdk_window_show (gtk_widget_get_window (widget));
-
- if (item->child
- && gtk_widget_get_visible (item->child)
- && !gtk_widget_get_mapped (item->child))
- gtk_widget_map (item->child);
-
- if (item->_priv->grip
- && gtk_widget_get_visible (GTK_WIDGET (item->_priv->grip))
- && !gtk_widget_get_mapped (GTK_WIDGET (item->_priv->grip)))
- gtk_widget_map (item->_priv->grip);
-}
-
-static void
-gdl_dock_item_unmap (GtkWidget *widget)
-{
- GdlDockItem *item;
-
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GDL_IS_DOCK_ITEM (widget));
-
- gtk_widget_set_mapped (widget, FALSE);
-
- item = GDL_DOCK_ITEM (widget);
-
- gdk_window_hide (gtk_widget_get_window (widget));
-
- if (item->_priv->grip)
- gtk_widget_unmap (item->_priv->grip);
-}
-
-static void
-gdl_dock_item_realize (GtkWidget *widget)
-{
- GdlDockItem *item;
- GtkAllocation allocation;
- GdkWindow *window;
- GdkWindowAttr attributes;
- gint attributes_mask;
-
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GDL_IS_DOCK_ITEM (widget));
-
- item = GDL_DOCK_ITEM (widget);
-
- gtk_widget_set_realized (widget, TRUE);
-
- /* widget window */
- gtk_widget_get_allocation (widget, &allocation);
- attributes.x = allocation.x;
- attributes.y = allocation.y;
- attributes.width = allocation.width;
- attributes.height = allocation.height;
- attributes.window_type = GDK_WINDOW_CHILD;
- attributes.wclass = GDK_INPUT_OUTPUT;
- attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
- attributes.event_mask = (gtk_widget_get_events (widget) |
- GDK_EXPOSURE_MASK |
- GDK_BUTTON1_MOTION_MASK |
- GDK_BUTTON_PRESS_MASK |
- GDK_BUTTON_RELEASE_MASK);
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
- window = gdk_window_new (gtk_widget_get_parent_window (widget),
- &attributes, attributes_mask);
- gtk_widget_set_window (widget, window);
- gdk_window_set_user_data (window, widget);
-
- gtk_widget_style_attach (widget);
- gtk_style_set_background (gtk_widget_get_style (widget), window,
- gtk_widget_get_state (GTK_WIDGET (item)));
- gdk_window_set_back_pixmap (window, NULL, TRUE);
-
- if (item->child)
- gtk_widget_set_parent_window (item->child, window);
-
- if (item->_priv->grip)
- gtk_widget_set_parent_window (item->_priv->grip, window);
-}
-
-static void
-gdl_dock_item_style_set (GtkWidget *widget,
- GtkStyle *previous_style)
-{
- GdkWindow *window;
-
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GDL_IS_DOCK_ITEM (widget));
-
- if (gtk_widget_get_realized (widget) &&
- gtk_widget_get_has_window (widget))
- {
- window = gtk_widget_get_window (widget);
- gtk_style_set_background (gtk_widget_get_style (widget),
- window,
- gtk_widget_get_state (widget));
- if (gtk_widget_is_drawable (widget))
- gdk_window_clear (window);
- }
-}
-
-static void
-gdl_dock_item_paint (GtkWidget *widget,
- GdkEventExpose *event)
-{
- GdlDockItem *item;
-
- item = GDL_DOCK_ITEM (widget);
-
- gtk_paint_box (gtk_widget_get_style (widget),
- gtk_widget_get_window (widget),
- gtk_widget_get_state (widget),
- GTK_SHADOW_NONE,
- &event->area, widget,
- "dockitem",
- 0, 0, -1, -1);
-
-/* see bug #950556: avoid regression with GTK2/Quartz */
-#if !defined(GDK_WINDOWING_QUARTZ)
- if (GTK_IS_WIDGET(item->_priv->grip))
- gtk_widget_queue_draw (GTK_WIDGET(item->_priv->grip));
-#endif
-}
-
-static gint
-gdl_dock_item_expose (GtkWidget *widget,
- GdkEventExpose *event)
-{
- g_return_val_if_fail (widget != NULL, FALSE);
- g_return_val_if_fail (GDL_IS_DOCK_ITEM (widget), FALSE);
- g_return_val_if_fail (event != NULL, FALSE);
-
- if (gtk_widget_is_drawable (widget) &&
- event->window == gtk_widget_get_window (widget))
- {
- gdl_dock_item_paint (widget, event);
- GTK_WIDGET_CLASS (gdl_dock_item_parent_class)->expose_event (widget,event);
- }
-
- return FALSE;
-}
-
-static void
-gdl_dock_item_move_focus_child (GdlDockItem *item,
- GtkDirectionType dir)
-{
- g_return_if_fail (GDL_IS_DOCK_ITEM (item));
- gtk_widget_child_focus (GTK_WIDGET (item->child), dir);
-}
-
-#define EVENT_IN_GRIP_EVENT_WINDOW(ev,gr) \
- ((gr) != NULL && (ev)->window == GDL_DOCK_ITEM_GRIP (gr)->title_window)
-
-#define EVENT_IN_TABLABEL_EVENT_WINDOW(ev,tl) \
- ((tl) != NULL && (ev)->window == GDL_DOCK_TABLABEL (tl)->event_window)
-
-static gint
-gdl_dock_item_button_changed (GtkWidget *widget,
- GdkEventButton *event)
-{
- GdlDockItem *item;
- GtkAllocation allocation;
- GdkCursor *cursor;
- gboolean locked;
- gboolean event_handled;
- gboolean in_handle;
-
- g_return_val_if_fail (widget != NULL, FALSE);
- g_return_val_if_fail (GDL_IS_DOCK_ITEM (widget), FALSE);
- g_return_val_if_fail (event != NULL, FALSE);
-
- item = GDL_DOCK_ITEM (widget);
-
- if (!EVENT_IN_GRIP_EVENT_WINDOW (event, item->_priv->grip))
- return FALSE;
-
- locked = !GDL_DOCK_ITEM_NOT_LOCKED (item);
-
- event_handled = FALSE;
-
- gtk_widget_get_allocation (item->_priv->grip, &allocation);
-
- /* Check if user clicked on the drag handle. */
- switch (item->orientation) {
- case GTK_ORIENTATION_HORIZONTAL:
- in_handle = event->x < allocation.width;
- break;
- case GTK_ORIENTATION_VERTICAL:
- in_handle = event->y < allocation.height;
- break;
- default:
- in_handle = FALSE;
- break;
- }
-
- /* Left mousebutton click on dockitem. */
- if (!locked && event->button == 1 && event->type == GDK_BUTTON_PRESS) {
-
- if (!gdl_dock_item_or_child_has_focus (item))
- gtk_widget_grab_focus (GTK_WIDGET (item));
-
- /* Set in_drag flag, grab pointer and call begin drag operation. */
- if (in_handle) {
- item->_priv->start_x = event->x;
- item->_priv->start_y = event->y;
-
- GDL_DOCK_ITEM_SET_FLAGS (item, GDL_DOCK_IN_PREDRAG);
-
- cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget),
- GDK_FLEUR);
- gdk_window_set_cursor (GDL_DOCK_ITEM_GRIP (item->_priv->grip)->title_window,
- cursor);
- gdk_cursor_unref (cursor);
-
- event_handled = TRUE;
- };
-
- } else if (!locked &&event->type == GDK_BUTTON_RELEASE && event->button == 1) {
- if (GDL_DOCK_ITEM_IN_DRAG (item)) {
- /* User dropped widget somewhere. */
- gdl_dock_item_drag_end (item, FALSE);
- gtk_widget_grab_focus (GTK_WIDGET (item));
- event_handled = TRUE;
- }
- else if (GDL_DOCK_ITEM_IN_PREDRAG (item)) {
- GDL_DOCK_ITEM_UNSET_FLAGS (item, GDL_DOCK_IN_PREDRAG);
- event_handled = TRUE;
- }
-
- /* we check the window since if the item was redocked it's
- been unrealized and maybe it's not realized again yet */
- if (GDL_DOCK_ITEM_GRIP (item->_priv->grip)->title_window) {
- cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget),
- GDK_HAND2);
- gdk_window_set_cursor (GDL_DOCK_ITEM_GRIP (item->_priv->grip)->title_window,
- cursor);
- gdk_cursor_unref (cursor);
- }
-
- } else if (event->button == 3 && event->type == GDK_BUTTON_PRESS && in_handle) {
- gdl_dock_item_popup_menu (item, event->button, event->time);
- event_handled = TRUE;
- }
-
- return event_handled;
-}
-
-static gint
-gdl_dock_item_motion (GtkWidget *widget,
- GdkEventMotion *event)
-{
- GdlDockItem *item;
- gint new_x, new_y;
-
- g_return_val_if_fail (widget != NULL, FALSE);
- g_return_val_if_fail (GDL_IS_DOCK_ITEM (widget), FALSE);
- g_return_val_if_fail (event != NULL, FALSE);
-
- item = GDL_DOCK_ITEM (widget);
-
- if (!EVENT_IN_GRIP_EVENT_WINDOW (event, item->_priv->grip))
- return FALSE;
-
- if (GDL_DOCK_ITEM_IN_PREDRAG (item)) {
- if (gtk_drag_check_threshold (widget,
- item->_priv->start_x,
- item->_priv->start_y,
- event->x,
- event->y)) {
- GDL_DOCK_ITEM_UNSET_FLAGS (item, GDL_DOCK_IN_PREDRAG);
- item->dragoff_x = item->_priv->start_x;
- item->dragoff_y = item->_priv->start_y;
-
- gdl_dock_item_drag_start (item);
- }
- }
-
- if (!GDL_DOCK_ITEM_IN_DRAG (item))
- return FALSE;
-
- new_x = event->x_root;
- new_y = event->y_root;
-
- g_signal_emit (item, gdl_dock_item_signals [DOCK_DRAG_MOTION],
- 0, new_x, new_y);
-
- return TRUE;
-}
-
-static gboolean
-gdl_dock_item_key_press (GtkWidget *widget,
- GdkEventKey *event)
-{
- gboolean event_handled = FALSE;
-
- if (GDL_DOCK_ITEM_IN_DRAG (widget)) {
- if (event->keyval == GDK_Escape) {
- gdl_dock_item_drag_end (GDL_DOCK_ITEM (widget), TRUE);
- event_handled = TRUE;
- }
- }
-
- if (event_handled)
- return TRUE;
- else
- return GTK_WIDGET_CLASS (gdl_dock_item_parent_class)->key_press_event (widget, event);
-}
-
-static gboolean
-gdl_dock_item_dock_request (GdlDockObject *object,
- gint x,
- gint y,
- GdlDockRequest *request)
-{
- GtkAllocation alloc;
- gint rel_x, rel_y;
-
- /* we get (x,y) in our allocation coordinates system */
-
- /* Get item's allocation. */
- gtk_widget_get_allocation (GTK_WIDGET (object), &alloc);
-
- /* Get coordinates relative to our window. */
- rel_x = x - alloc.x;
- rel_y = y - alloc.y;
-
- /* Location is inside. */
- if (rel_x > 0 && rel_x < alloc.width &&
- rel_y > 0 && rel_y < alloc.height) {
- float rx, ry;
- GtkRequisition my, other;
- gint divider = -1;
-
- /* this are for calculating the extra docking parameter */
- gdl_dock_item_preferred_size (GDL_DOCK_ITEM (request->applicant), &other);
- gdl_dock_item_preferred_size (GDL_DOCK_ITEM (object), &my);
-
- /* Calculate location in terms of the available space (0-100%). */
- rx = (float) rel_x / alloc.width;
- ry = (float) rel_y / alloc.height;
-
- /* Determine dock location. */
- if (rx < SPLIT_RATIO) {
- request->position = GDL_DOCK_LEFT;
- divider = other.width;
- }
- else if (rx > (1 - SPLIT_RATIO)) {
- request->position = GDL_DOCK_RIGHT;
- rx = 1 - rx;
- divider = MAX (0, my.width - other.width);
- }
- else if (ry < SPLIT_RATIO && ry < rx) {
- request->position = GDL_DOCK_TOP;
- divider = other.height;
- }
- else if (ry > (1 - SPLIT_RATIO) && (1 - ry) < rx) {
- request->position = GDL_DOCK_BOTTOM;
- divider = MAX (0, my.height - other.height);
- }
- else
- request->position = GDL_DOCK_CENTER;
-
- /* Reset rectangle coordinates to entire item. */
- request->rect.x = 0;
- request->rect.y = 0;
- request->rect.width = alloc.width;
- request->rect.height = alloc.height;
-
- GdlDockItemBehavior behavior = GDL_DOCK_ITEM(object)->behavior;
-
- /* Calculate docking indicator rectangle size for new locations. Only
- do this when we're not over the item's current location. */
- if (request->applicant != object) {
- switch (request->position) {
- case GDL_DOCK_TOP:
- if (behavior & GDL_DOCK_ITEM_BEH_CANT_DOCK_TOP)
- return FALSE;
- request->rect.height *= SPLIT_RATIO;
- break;
- case GDL_DOCK_BOTTOM:
- if (behavior & GDL_DOCK_ITEM_BEH_CANT_DOCK_BOTTOM)
- return FALSE;
- request->rect.y += request->rect.height * (1 - SPLIT_RATIO);
- request->rect.height *= SPLIT_RATIO;
- break;
- case GDL_DOCK_LEFT:
- if (behavior & GDL_DOCK_ITEM_BEH_CANT_DOCK_LEFT)
- return FALSE;
- request->rect.width *= SPLIT_RATIO;
- break;
- case GDL_DOCK_RIGHT:
- if (behavior & GDL_DOCK_ITEM_BEH_CANT_DOCK_RIGHT)
- return FALSE;
- request->rect.x += request->rect.width * (1 - SPLIT_RATIO);
- request->rect.width *= SPLIT_RATIO;
- break;
- case GDL_DOCK_CENTER:
- if (behavior & GDL_DOCK_ITEM_BEH_CANT_DOCK_CENTER)
- return FALSE;
- request->rect.x = request->rect.width * SPLIT_RATIO/2;
- request->rect.y = request->rect.height * SPLIT_RATIO/2;
- request->rect.width = (request->rect.width *
- (1 - SPLIT_RATIO/2)) - request->rect.x;
- request->rect.height = (request->rect.height *
- (1 - SPLIT_RATIO/2)) - request->rect.y;
- break;
- default:
- break;
- }
- }
-
- /* adjust returned coordinates so they are have the same
- origin as our window */
- request->rect.x += alloc.x;
- request->rect.y += alloc.y;
-
- /* Set possible target location and return TRUE. */
- request->target = object;
-
- /* fill-in other dock information */
- if (request->position != GDL_DOCK_CENTER && divider >= 0) {
- if (G_IS_VALUE (&request->extra))
- g_value_unset (&request->extra);
- g_value_init (&request->extra, G_TYPE_UINT);
- g_value_set_uint (&request->extra, (guint) divider);
- }
-
- return TRUE;
- }
- else /* No docking possible at this location. */
- return FALSE;
-}
-
-static void
-gdl_dock_item_dock (GdlDockObject *object,
- GdlDockObject *requestor,
- GdlDockPlacement position,
- GValue *other_data)
-{
- GdlDockObject *new_parent = NULL;
- GdlDockObject *parent, *requestor_parent;
- GtkAllocation allocation;
- gboolean add_ourselves_first = FALSE;
-
- guint available_space=0;
- gint pref_size=-1;
- guint splitpos=0;
- GtkRequisition req, object_req, parent_req;
-
- parent = gdl_dock_object_get_parent_object (object);
- gdl_dock_item_preferred_size (GDL_DOCK_ITEM (requestor), &req);
- gdl_dock_item_preferred_size (GDL_DOCK_ITEM (object), &object_req);
- if (GDL_IS_DOCK_ITEM (parent))
- gdl_dock_item_preferred_size (GDL_DOCK_ITEM (parent), &parent_req);
- else
- {
- gtk_widget_get_allocation (GTK_WIDGET (parent), &allocation);
- parent_req.height = allocation.height;
- parent_req.width = allocation.width;
- }
-
- /* If preferred size is not set on the requestor (perhaps a new item),
- * then estimate and set it. The default value (either 0 or 1 pixels) is
- * not any good.
- */
- switch (position) {
- case GDL_DOCK_TOP:
- case GDL_DOCK_BOTTOM:
- if (req.width < 2)
- {
- req.width = object_req.width;
- g_object_set (requestor, "preferred-width", req.width, NULL);
- }
- if (req.height < 2)
- {
- req.height = NEW_DOCK_ITEM_RATIO * object_req.height;
- g_object_set (requestor, "preferred-height", req.height, NULL);
- }
- if (req.width > 1)
- g_object_set (object, "preferred-width", req.width, NULL);
- if (req.height > 1)
- g_object_set (object, "preferred-height",
- object_req.height - req.height, NULL);
- break;
- case GDL_DOCK_LEFT:
- case GDL_DOCK_RIGHT:
- if (req.height < 2)
- {
- req.height = object_req.height;
- g_object_set (requestor, "preferred-height", req.height, NULL);
- }
- if (req.width < 2)
- {
- req.width = NEW_DOCK_ITEM_RATIO * object_req.width;
- g_object_set (requestor, "preferred-width", req.width, NULL);
- }
- if (req.height > 1)
- g_object_set (object, "preferred-height", req.height, NULL);
- if (req.width > 1)
- g_object_set (object, "preferred-width",
- object_req.width - req.width, NULL);
- break;
- case GDL_DOCK_CENTER:
- if (req.height < 2)
- {
- req.height = object_req.height;
- g_object_set (requestor, "preferred-height", req.height, NULL);
- }
- if (req.width < 2)
- {
- req.width = object_req.width;
- g_object_set (requestor, "preferred-width", req.width, NULL);
- }
- if (req.height > 1)
- g_object_set (object, "preferred-height", req.height, NULL);
- if (req.width > 1)
- g_object_set (object, "preferred-width", req.width, NULL);
- break;
- default:
- {
- GEnumClass *enum_class = G_ENUM_CLASS (g_type_class_ref (GDL_TYPE_DOCK_PLACEMENT));
- GEnumValue *enum_value = g_enum_get_value (enum_class, position);
- const gchar *name = enum_value ? enum_value->value_name : NULL;
-
- g_warning (_("Unsupported docking strategy %s in dock object of type %s"),
- name, G_OBJECT_TYPE_NAME (object));
- g_type_class_unref (enum_class);
- return;
- }
- }
- switch (position) {
- case GDL_DOCK_TOP:
- case GDL_DOCK_BOTTOM:
- /* get a paned style dock object */
- new_parent = g_object_new (gdl_dock_object_type_from_nick ("paned"),
- "orientation", GTK_ORIENTATION_VERTICAL,
- "preferred-width", object_req.width,
- "preferred-height", object_req.height,
- NULL);
- add_ourselves_first = (position == GDL_DOCK_BOTTOM);
- if (parent)
- available_space = parent_req.height;
- pref_size = req.height;
- break;
- case GDL_DOCK_LEFT:
- case GDL_DOCK_RIGHT:
- new_parent = g_object_new (gdl_dock_object_type_from_nick ("paned"),
- "orientation", GTK_ORIENTATION_HORIZONTAL,
- "preferred-width", object_req.width,
- "preferred-height", object_req.height,
- NULL);
- add_ourselves_first = (position == GDL_DOCK_RIGHT);
- if(parent)
- available_space = parent_req.width;
- pref_size = req.width;
- break;
- case GDL_DOCK_CENTER:
- /* If the parent is already a DockNotebook, we don't need
- to create a new one. */
- if (!GDL_IS_DOCK_NOTEBOOK (parent))
- {
- new_parent = g_object_new (gdl_dock_object_type_from_nick ("notebook"),
- "preferred-width", object_req.width,
- "preferred-height", object_req.height,
- NULL);
- add_ourselves_first = TRUE;
- }
- break;
- default:
- {
- GEnumClass *enum_class = G_ENUM_CLASS (g_type_class_ref (GDL_TYPE_DOCK_PLACEMENT));
- GEnumValue *enum_value = g_enum_get_value (enum_class, position);
- const gchar *name = enum_value ? enum_value->value_name : NULL;
-
- g_warning (_("Unsupported docking strategy %s in dock object of type %s"),
- name, G_OBJECT_TYPE_NAME (object));
- g_type_class_unref (enum_class);
- return;
- }
- }
-
- /* freeze the parent so it doesn't reduce automatically */
- if (parent)
- gdl_dock_object_freeze (parent);
-
-
- if (new_parent)
- {
- /* ref ourselves since we could be destroyed when detached */
- g_object_ref (object);
- GDL_DOCK_OBJECT_SET_FLAGS (object, GDL_DOCK_IN_REFLOW);
- gdl_dock_object_detach (object, FALSE);
-
- /* freeze the new parent, so reduce won't get called before it's
- actually added to our parent */
- gdl_dock_object_freeze (new_parent);
-
- /* bind the new parent to our master, so the following adds work */
- gdl_dock_object_bind (new_parent, G_OBJECT (GDL_DOCK_OBJECT_GET_MASTER (object)));
-
- /* add the objects */
- if (add_ourselves_first) {
- gtk_container_add (GTK_CONTAINER (new_parent), GTK_WIDGET (object));
- gtk_container_add (GTK_CONTAINER (new_parent), GTK_WIDGET (requestor));
- splitpos = available_space - pref_size;
- } else {
- gtk_container_add (GTK_CONTAINER (new_parent), GTK_WIDGET (requestor));
- gtk_container_add (GTK_CONTAINER (new_parent), GTK_WIDGET (object));
- splitpos = pref_size;
- }
-
- /* add the new parent to the parent */
- if (parent)
- gtk_container_add (GTK_CONTAINER (parent), GTK_WIDGET (new_parent));
-
- /* show automatic object */
- if (gtk_widget_get_visible (GTK_WIDGET (object)))
- {
- gtk_widget_show (GTK_WIDGET (new_parent));
- GDL_DOCK_OBJECT_UNSET_FLAGS (object, GDL_DOCK_IN_REFLOW);
- }
- gdl_dock_object_thaw (new_parent);
-
- /* use extra docking parameter */
- if (position != GDL_DOCK_CENTER && other_data &&
- G_VALUE_HOLDS (other_data, G_TYPE_UINT)) {
-
- g_object_set (G_OBJECT (new_parent),
- "position", g_value_get_uint (other_data),
- NULL);
- } else if (splitpos > 0 && splitpos < available_space) {
- g_object_set (G_OBJECT (new_parent), "position", splitpos, NULL);
- }
-
- g_object_unref (object);
- }
- else
- {
- /* If the parent is already a DockNotebook, we don't need
- to create a new one. */
- gtk_container_add (GTK_CONTAINER (parent), GTK_WIDGET (requestor));
- }
-
- requestor_parent = gdl_dock_object_get_parent_object (requestor);
- if (GDL_IS_DOCK_NOTEBOOK (requestor_parent))
- {
- /* Activate the page we just added */
- GdlDockItem* notebook = GDL_DOCK_ITEM (gdl_dock_object_get_parent_object (requestor));
- gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook->child),
- gtk_notebook_page_num (GTK_NOTEBOOK (notebook->child), GTK_WIDGET (requestor)));
- }
-
- if (parent)
- gdl_dock_object_thaw (parent);
-}
-
-static void
-gdl_dock_item_detach_menu (GtkWidget *widget,
- GtkMenu *menu)
-{
- GdlDockItem *item;
-
- item = GDL_DOCK_ITEM (widget);
- item->_priv->menu = NULL;
-}
-
-static void
-gdl_dock_item_popup_menu (GdlDockItem *item,
- guint button,
- guint32 time)
-{
- GtkWidget *mitem;
-
- if (!item->_priv->menu) {
- /* Create popup menu and attach it to the dock item */
- item->_priv->menu = gtk_menu_new ();
- gtk_menu_attach_to_widget (GTK_MENU (item->_priv->menu),
- GTK_WIDGET (item),
- gdl_dock_item_detach_menu);
-
- if (item->behavior & GDL_DOCK_ITEM_BEH_LOCKED) {
- /* UnLock menuitem */
- mitem = gtk_menu_item_new_with_label (_("UnLock"));
- gtk_menu_shell_append (GTK_MENU_SHELL (item->_priv->menu),
- mitem);
- g_signal_connect (mitem, "activate",
- G_CALLBACK (gdl_dock_item_unlock_cb), item);
- } else {
- /* Hide menuitem. */
- mitem = gtk_menu_item_new_with_label (_("Hide"));
- gtk_menu_shell_append (GTK_MENU_SHELL (item->_priv->menu), mitem);
- g_signal_connect (mitem, "activate",
- G_CALLBACK (gdl_dock_item_hide_cb), item);
- /* Lock menuitem */
- mitem = gtk_menu_item_new_with_label (_("Lock"));
- gtk_menu_shell_append (GTK_MENU_SHELL (item->_priv->menu), mitem);
- g_signal_connect (mitem, "activate",
- G_CALLBACK (gdl_dock_item_lock_cb), item);
- }
- }
-
- /* Show popup menu. */
- gtk_widget_show_all (item->_priv->menu);
- gtk_menu_popup (GTK_MENU (item->_priv->menu), NULL, NULL, NULL, NULL,
- button, time);
-}
-
-static void
-gdl_dock_item_drag_start (GdlDockItem *item)
-{
- GdkCursor *fleur;
-
- if (!gtk_widget_get_realized (GTK_WIDGET (item)))
- gtk_widget_realize (GTK_WIDGET (item));
-
- GDL_DOCK_ITEM_SET_FLAGS (item, GDL_DOCK_IN_DRAG);
-
- /* grab the pointer so we receive all mouse events */
- fleur = gdk_cursor_new (GDK_FLEUR);
-
- /* grab the keyboard & pointer */
- gtk_grab_add (GTK_WIDGET (item));
-
- gdk_cursor_unref (fleur);
-
- g_signal_emit (item, gdl_dock_item_signals [DOCK_DRAG_BEGIN], 0);
-}
-
-static void
-gdl_dock_item_drag_end (GdlDockItem *item,
- gboolean cancel)
-{
- /* Release pointer & keyboard. */
- GtkWidget *widget = gtk_grab_get_current ();
- if (widget == NULL) {
- widget = GTK_WIDGET (item);
- }
- gtk_grab_remove (widget);
-
- g_signal_emit (item, gdl_dock_item_signals [DOCK_DRAG_END], 0, cancel);
-
- GDL_DOCK_ITEM_UNSET_FLAGS (item, GDL_DOCK_IN_DRAG);
-}
-
-static void
-gdl_dock_item_tab_button (GtkWidget *widget,
- GdkEventButton *event,
- gpointer data)
-{
- GdlDockItem *item;
- GtkAllocation allocation;
-
- item = GDL_DOCK_ITEM (data);
-
- if (!GDL_DOCK_ITEM_NOT_LOCKED (item))
- return;
-
- switch (event->button) {
- case 1:
- /* set dragoff_{x,y} as we the user clicked on the middle of the
- drag handle */
- switch (item->orientation) {
- case GTK_ORIENTATION_HORIZONTAL:
- gtk_widget_get_allocation (GTK_WIDGET (data), &allocation);
- /*item->dragoff_x = item->_priv->grip_size / 2;*/
- item->dragoff_y = allocation.height / 2;
- break;
- case GTK_ORIENTATION_VERTICAL:
- /*item->dragoff_x = GTK_WIDGET (data)->allocation.width / 2;*/
- item->dragoff_y = item->_priv->grip_size / 2;
- break;
- };
- gdl_dock_item_drag_start (item);
- break;
-
- case 3:
- gdl_dock_item_popup_menu (item, event->button, event->time);
- break;
-
- default:
- break;
- };
-}
-
-static void
-gdl_dock_item_hide_cb (GtkWidget *widget,
- GdlDockItem *item)
-{
- GdlDockMaster *master;
-
- g_return_if_fail (item != NULL);
-
- master = GDL_DOCK_OBJECT_GET_MASTER (item);
- gdl_dock_item_hide_item (item);
-}
-
-static void
-gdl_dock_item_lock_cb (GtkWidget *widget,
- GdlDockItem *item)
-{
- g_return_if_fail (item != NULL);
-
- gdl_dock_item_lock (item);
-}
-
-static void
-gdl_dock_item_unlock_cb (GtkWidget *widget,
- GdlDockItem *item)
-{
- g_return_if_fail (item != NULL);
-
- gdl_dock_item_unlock (item);
-}
-
-static void
-gdl_dock_item_showhide_grip (GdlDockItem *item)
-{
- GdkDisplay *display;
- GdkCursor *cursor;
-
- gdl_dock_item_detach_menu (GTK_WIDGET (item), NULL);
- display = gtk_widget_get_display (GTK_WIDGET (item));
- cursor = NULL;
-
- if (item->_priv->grip) {
- if (GDL_DOCK_ITEM_GRIP_SHOWN (item) &&
- GDL_DOCK_ITEM_NOT_LOCKED(item))
- cursor = gdk_cursor_new_for_display (display, GDK_HAND2);
- }
- if (item->_priv->grip && GDL_DOCK_ITEM_GRIP (item->_priv->grip)->title_window)
- gdk_window_set_cursor (GDL_DOCK_ITEM_GRIP (item->_priv->grip)->title_window, cursor);
-
- if (cursor)
- gdk_cursor_unref (cursor);
-
- gtk_widget_queue_resize (GTK_WIDGET (item));
-}
-
-static void
-gdl_dock_item_real_set_orientation (GdlDockItem *item,
- GtkOrientation orientation)
-{
- item->orientation = orientation;
-
- if (gtk_widget_is_drawable (GTK_WIDGET (item)))
- gtk_widget_queue_draw (GTK_WIDGET (item));
- gtk_widget_queue_resize (GTK_WIDGET (item));
-}
-
-
-/* ----- Public interface ----- */
-
-/**
- * gdl_dock_item_new:
- * @name: Unique name for identifying the dock object.
- * @long_name: Human readable name for the dock object.
- * @behavior: General behavior for the dock item (i.e. whether it can
- * float, if it's locked, etc.), as specified by
- * #GdlDockItemBehavior flags.
- *
- * Creates a new dock item widget.
- * Returns: The newly created dock item grip widget.
- **/
-GtkWidget *
-gdl_dock_item_new (const gchar *name,
- const gchar *long_name,
- GdlDockItemBehavior behavior)
-{
- GdlDockItem *item;
-
- item = GDL_DOCK_ITEM (g_object_new (GDL_TYPE_DOCK_ITEM,
- "name", name,
- "long-name", long_name,
- "behavior", behavior,
- NULL));
- GDL_DOCK_OBJECT_UNSET_FLAGS (item, GDL_DOCK_AUTOMATIC);
-
- return GTK_WIDGET (item);
-}
-
-/**
- * gdl_dock_item_new_with_stock:
- * @name: Unique name for identifying the dock object.
- * @long_name: Human readable name for the dock object.
- * @stock_id: Stock icon for the dock object.
- * @behavior: General behavior for the dock item (i.e. whether it can
- * float, if it's locked, etc.), as specified by
- * #GdlDockItemBehavior flags.
- *
- * Creates a new dock item grip widget with a given stock id.
- * Returns: The newly created dock item grip widget.
- **/
-GtkWidget *
-gdl_dock_item_new_with_stock (const gchar *name,
- const gchar *long_name,
- const gchar *stock_id,
- GdlDockItemBehavior behavior)
-{
- GdlDockItem *item;
-
- item = GDL_DOCK_ITEM (g_object_new (GDL_TYPE_DOCK_ITEM,
- "name", name,
- "long-name", long_name,
- "stock-id", stock_id,
- "behavior", behavior,
- NULL));
- GDL_DOCK_OBJECT_UNSET_FLAGS (item, GDL_DOCK_AUTOMATIC);
-
- return GTK_WIDGET (item);
-}
-
-GtkWidget *
-gdl_dock_item_new_with_pixbuf_icon (const gchar *name,
- const gchar *long_name,
- const GdkPixbuf *pixbuf_icon,
- GdlDockItemBehavior behavior)
-{
- GdlDockItem *item;
-
- item = GDL_DOCK_ITEM (g_object_new (GDL_TYPE_DOCK_ITEM,
- "name", name,
- "long-name", long_name,
- "pixbuf-icon", pixbuf_icon,
- "behavior", behavior,
- NULL));
-
- GDL_DOCK_OBJECT_UNSET_FLAGS (item, GDL_DOCK_AUTOMATIC);
- gdl_dock_item_set_tablabel (item, gtk_label_new (long_name));
-
- return GTK_WIDGET (item);
-}
-
-/* convenient function (and to preserve source compat) */
-/**
- * gdl_dock_item_dock_to:
- * @item: The dock item that will be relocated to the dock position.
- * @target: (allow-none): The dock item that will be used as the point of reference.
- * @position: The position to dock #item, relative to #target.
- * @docking_param: This value is unused, and will be ignored.
- *
- * Relocates a dock item to a new location relative to another dock item.
- **/
-void
-gdl_dock_item_dock_to (GdlDockItem *item,
- GdlDockItem *target,
- GdlDockPlacement position,
- gint docking_param)
-{
- g_return_if_fail (item != NULL);
- g_return_if_fail (item != target);
- g_return_if_fail (target != NULL || position == GDL_DOCK_FLOATING);
- g_return_if_fail ((item->behavior & GDL_DOCK_ITEM_BEH_NEVER_FLOATING) == 0 || position != GDL_DOCK_FLOATING);
-
- if (position == GDL_DOCK_FLOATING || !target) {
- GdlDockObject *controller;
-
- if (!gdl_dock_object_is_bound (GDL_DOCK_OBJECT (item))) {
- g_warning (_("Attempt to bind an unbound item %p"), item);
- return;
- }
-
- controller = gdl_dock_master_get_controller (GDL_DOCK_OBJECT_GET_MASTER (item));
-
- /* FIXME: save previous docking position for later
- re-docking... does this make sense now? */
-
- /* Create new floating dock for widget. */
- item->dragoff_x = item->dragoff_y = 0;
- gdl_dock_add_floating_item (GDL_DOCK (controller),
- item, 0, 0, -1, -1);
-
- } else
- gdl_dock_object_dock (GDL_DOCK_OBJECT (target),
- GDL_DOCK_OBJECT (item),
- position, NULL);
-}
-
-/**
- * gdl_dock_item_set_orientation:
- * @item: The dock item which will get it's orientation set.
- * @orientation: The orientation to set the item to. If the orientation
- * is set to #GTK_ORIENTATION_VERTICAL, the grip widget will be shown
- * along the top of the edge of item (if it is not hidden). If the
- * orientation is set to #GTK_ORIENTATION_HORIZONTAL, the grip widget
- * will be shown down the left edge of the item (even if the widget
- * text direction is set to RTL).
- *
- * This function sets the layout of the dock item.
- **/
-void
-gdl_dock_item_set_orientation (GdlDockItem *item,
- GtkOrientation orientation)
-{
- GParamSpec *pspec;
-
- g_return_if_fail (item != NULL);
-
- if (item->orientation != orientation) {
- /* push the property down the hierarchy if our child supports it */
- if (item->child != NULL) {
- pspec = g_object_class_find_property (
- G_OBJECT_GET_CLASS (item->child), "orientation");
- if (pspec && pspec->value_type == GTK_TYPE_ORIENTATION)
- g_object_set (G_OBJECT (item->child),
- "orientation", orientation,
- NULL);
- };
- if (GDL_DOCK_ITEM_GET_CLASS (item)->set_orientation)
- GDL_DOCK_ITEM_GET_CLASS (item)->set_orientation (item, orientation);
- g_object_notify (G_OBJECT (item), "orientation");
- }
-}
-
-/**
- * gdl_dock_item_get_tablabel:
- * @item: The dock item from which to get the tab label widget.
- *
- * Gets the current tab label widget. Note that this label widget is
- * only visible when the "switcher-style" property of the #GdlDockMaster
- * is set to #GDL_SWITCHER_STYLE_TABS
- *
- * Returns: Returns the tab label widget.
- **/
-GtkWidget *
-gdl_dock_item_get_tablabel (GdlDockItem *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
- g_return_val_if_fail (GDL_IS_DOCK_ITEM (item), NULL);
-
- return item->_priv->tab_label;
-}
-
-/**
- * gdl_dock_item_set_tablabel:
- * @item: The dock item which will get it's tab label widget set.
- * @tablabel: The widget that will become the tab label.
- *
- * Replaces the current tab label widget with another widget. Note that
- * this label widget is only visible when the "switcher-style" property
- * of the #GdlDockMaster is set to #GDL_SWITCHER_STYLE_TABS
- **/
-void
-gdl_dock_item_set_tablabel (GdlDockItem *item,
- GtkWidget *tablabel)
-{
- g_return_if_fail (item != NULL);
-
- if (item->_priv->intern_tab_label)
- {
- item->_priv->intern_tab_label = FALSE;
- g_signal_handler_disconnect (item, item->_priv->notify_label);
- g_signal_handler_disconnect (item, item->_priv->notify_stock_id);
- }
-
- if (item->_priv->tab_label) {
- /* disconnect and unref the previous tablabel */
- if (GDL_IS_DOCK_TABLABEL (item->_priv->tab_label)) {
- g_signal_handlers_disconnect_matched (item->_priv->tab_label,
- G_SIGNAL_MATCH_DATA,
- 0, 0, NULL,
- NULL, item);
- g_object_set (item->_priv->tab_label, "item", NULL, NULL);
- }
- g_object_unref (item->_priv->tab_label);
- item->_priv->tab_label = NULL;
- }
-
- if (tablabel) {
- g_object_ref_sink (G_OBJECT (tablabel));
- item->_priv->tab_label = tablabel;
- if (GDL_IS_DOCK_TABLABEL (tablabel)) {
- g_object_set (tablabel, "item", item, NULL);
- /* connect to tablabel signal */
- g_signal_connect (tablabel, "button_pressed_handle",
- G_CALLBACK (gdl_dock_item_tab_button), item);
- }
- }
-}
-
-/**
- * gdl_dock_item_get_grip:
- * @item: The dock item from which to to get the grip of.
- *
- * This function returns the dock item's grip label widget.
- *
- * Returns: Returns the current label widget.
- **/
-GtkWidget *
-gdl_dock_item_get_grip(GdlDockItem *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
- g_return_val_if_fail (GDL_IS_DOCK_ITEM (item), NULL);
-
- return item->_priv->grip;
-}
-
-/**
- * gdl_dock_item_hide_grip:
- * @item: The dock item to hide the grip of.
- *
- * This function hides the dock item's grip widget.
- **/
-void
-gdl_dock_item_hide_grip (GdlDockItem *item)
-{
- g_return_if_fail (item != NULL);
- if (item->_priv->grip_shown) {
- item->_priv->grip_shown = FALSE;
- gdl_dock_item_showhide_grip (item);
- };
- g_warning ("Grips always show unless GDL_DOCK_ITEM_BEH_NO_GRIP is set\n" );
-}
-
-/**
- * gdl_dock_item_show_grip:
- * @item: The dock item to show the grip of.
- *
- * This function shows the dock item's grip widget.
- **/
-void
-gdl_dock_item_show_grip (GdlDockItem *item)
-{
- g_return_if_fail (item != NULL);
- if (!item->_priv->grip_shown) {
- item->_priv->grip_shown = TRUE;
- gdl_dock_item_showhide_grip (item);
- };
-}
-
-/**
- * gdl_dock_item_notify_selected:
- * @item: the dock item to emit a selected signal on.
- *
- * This function emits the selected signal. It is to be used by #GdlSwitcher
- * to let clients know that this item has been switched to.
- **/
-void
-gdl_dock_item_notify_selected (GdlDockItem *item)
-{
- g_signal_emit (item, gdl_dock_item_signals [SELECTED], 0);
-}
-
-/* convenient function (and to preserve source compat) */
-/**
- * gdl_dock_item_bind:
- * @item: The item to bind.
- * @dock: The #GdlDock widget to bind it to. Note that this widget must
- * be a type of #GdlDock.
- *
- * Binds this dock item to a new dock master.
- **/
-void
-gdl_dock_item_bind (GdlDockItem *item,
- GtkWidget *dock)
-{
- g_return_if_fail (item != NULL);
- g_return_if_fail (dock == NULL || GDL_IS_DOCK (dock));
-
- gdl_dock_object_bind (GDL_DOCK_OBJECT (item),
- G_OBJECT (GDL_DOCK_OBJECT_GET_MASTER (dock)));
-}
-
-/* convenient function (and to preserve source compat) */
-/**
- * gdl_dock_item_unbind:
- * @item: The item to unbind.
- *
- * Unbinds this dock item from it's dock master.
- **/
-void
-gdl_dock_item_unbind (GdlDockItem *item)
-{
- g_return_if_fail (item != NULL);
-
- gdl_dock_object_unbind (GDL_DOCK_OBJECT (item));
-}
-
-/**
- * gdl_dock_item_hide_item:
- * @item: The dock item to hide.
- *
- * This function hides the dock item. When dock items are hidden they
- * are completely removed from the layout.
- *
- * The dock item close button causes the panel to be hidden.
- **/
-void
-gdl_dock_item_hide_item (GdlDockItem *item)
-{
- GtkAllocation allocation;
-
- g_return_if_fail (item != NULL);
-
- if (!GDL_DOCK_OBJECT_ATTACHED (item))
- /* already hidden/detached */
- return;
-
- /* if the object is manual, create a new placeholder to be able to
- restore the position later */
- if (!GDL_DOCK_OBJECT_AUTOMATIC (item)) {
- if (item->_priv->ph)
- g_object_unref (item->_priv->ph);
-
- gboolean isFloating = FALSE;
- gint width=0, height=0, x=0, y = 0;
-
- if (GDL_IS_DOCK (gdl_dock_object_get_parent_object (GDL_DOCK_OBJECT (item))))
- {
- GdlDock* dock = GDL_DOCK (gdl_dock_object_get_parent_object (GDL_DOCK_OBJECT (item)));
- g_object_get (dock,
- "floating", &isFloating,
- "width", &width,
- "height",&height,
- "floatx",&x,
- "floaty",&y,
- NULL);
- } else {
- gtk_widget_get_allocation (GTK_WIDGET (item), &allocation);
- item->_priv->preferred_width = allocation.width;
- item->_priv->preferred_height = allocation.height;
- }
- item->_priv->ph = GDL_DOCK_PLACEHOLDER (
- g_object_new (GDL_TYPE_DOCK_PLACEHOLDER,
- "sticky", FALSE,
- "host", item,
- "width", width,
- "height", height,
- "floating", isFloating,
- "floatx", x,
- "floaty", y,
- NULL));
- g_object_ref_sink (item->_priv->ph);
- }
-
- gdl_dock_object_freeze (GDL_DOCK_OBJECT (item));
-
- /* hide our children first, so they can also set placeholders */
- if (gdl_dock_object_is_compound (GDL_DOCK_OBJECT (item)))
- gtk_container_foreach (GTK_CONTAINER (item),
- (GtkCallback) gdl_dock_item_hide_item,
- NULL);
-
- /* detach the item recursively */
- gdl_dock_object_detach (GDL_DOCK_OBJECT (item), TRUE);
-
- gtk_widget_hide (GTK_WIDGET (item));
-
- gdl_dock_object_thaw (GDL_DOCK_OBJECT (item));
-}
-
-/**
- * gdl_dock_item_iconify_item:
- * @item: The dock item to iconify.
- *
- * This function iconifies the dock item. When dock items are iconified
- * they are hidden, and appear only as icons in dock bars.
- *
- * The dock item iconify button causes the panel to be iconified.
- **/
-void
-gdl_dock_item_iconify_item (GdlDockItem *item)
-{
- g_return_if_fail (item != NULL);
-
- GDL_DOCK_OBJECT_SET_FLAGS (item, GDL_DOCK_ICONIFIED);
- gdl_dock_item_hide_item (item);
-}
-
-/**
- * gdl_dock_item_show_item:
- * @item: The dock item to show.
- *
- * This function shows the dock item. When dock items are shown, they
- * are displayed in their normal layout position.
- **/
-void
-gdl_dock_item_show_item (GdlDockItem *item)
-{
- g_return_if_fail (item != NULL);
-
- GDL_DOCK_OBJECT_UNSET_FLAGS (item, GDL_DOCK_ICONIFIED);
-
- if (item->_priv->ph) {
- gboolean isFloating=FALSE;
- gint width = 0, height = 0, x= 0, y = 0;
- g_object_get (G_OBJECT(item->_priv->ph),
- "width", &width,
- "height", &height,
- "floating",&isFloating,
- "floatx", &x,
- "floaty", &y,
- NULL);
- if (isFloating) {
- GdlDockObject *controller =
- gdl_dock_master_get_controller (GDL_DOCK_OBJECT_GET_MASTER (item));
- gdl_dock_add_floating_item (GDL_DOCK (controller),
- item, x, y, width, height);
- } else {
- gtk_container_add (GTK_CONTAINER (item->_priv->ph),
- GTK_WIDGET (item));
- }
- g_object_unref (item->_priv->ph);
- item->_priv->ph = NULL;
-
- } else if (gdl_dock_object_is_bound (GDL_DOCK_OBJECT (item))) {
- GdlDockObject *toplevel;
-
- toplevel = gdl_dock_master_get_controller
- (GDL_DOCK_OBJECT_GET_MASTER (item));
-
- if (item->behavior & GDL_DOCK_ITEM_BEH_NEVER_FLOATING) {
- g_warning("Object %s has no default position and flag GDL_DOCK_ITEM_BEH_NEVER_FLOATING is set.\n",
- GDL_DOCK_OBJECT(item)->name);
- } else if (toplevel) {
- gdl_dock_object_dock (toplevel, GDL_DOCK_OBJECT (item),
- GDL_DOCK_FLOATING, NULL);
- } else
- g_warning("There is no toplevel window. GdlDockItem %s cannot be shown.\n", GDL_DOCK_OBJECT(item)->name);
-
- } else
- g_warning("GdlDockItem %s is not bound. It cannot be shown.\n",
- GDL_DOCK_OBJECT(item)->name);
-
- gtk_widget_show (GTK_WIDGET (item));
-}
-
-/**
- * gdl_dock_item_lock:
- * @item: The dock item to lock.
- *
- * This function locks the dock item. When locked the dock item cannot
- * be dragged around and it doesn't show a grip.
- **/
-void
-gdl_dock_item_lock (GdlDockItem *item)
-{
- g_object_set (item, "locked", TRUE, NULL);
-}
-
-/**
- * gdl_dock_item_unlock:
- * @item: The dock item to unlock.
- *
- * This function unlocks the dock item. When unlocked the dock item can
- * be dragged around and can show a grip.
- **/
-void
-gdl_dock_item_unlock (GdlDockItem *item)
-{
- g_object_set (item, "locked", FALSE, NULL);
-}
-
-/**
- * gdl_dock_item_set_default_position:
- * @item: The dock item
- * @reference: The GdlDockObject which is the default dock for @item
- *
- * This method has only an effect when you add you dock_item with
- * GDL_DOCK_ITEM_BEH_NEVER_FLOATING. In this case you have to assign
- * it a default position.
- **/
-void
-gdl_dock_item_set_default_position (GdlDockItem *item,
- GdlDockObject *reference)
-{
- g_return_if_fail (item != NULL);
-
- if (item->_priv->ph) {
- g_object_unref (item->_priv->ph);
- item->_priv->ph = NULL;
- }
-
- if (reference && GDL_DOCK_OBJECT_ATTACHED (reference)) {
- if (GDL_IS_DOCK_PLACEHOLDER (reference)) {
- g_object_ref_sink (reference);
- item->_priv->ph = GDL_DOCK_PLACEHOLDER (reference);
- } else {
- item->_priv->ph = GDL_DOCK_PLACEHOLDER (
- g_object_new (GDL_TYPE_DOCK_PLACEHOLDER,
- "sticky", TRUE,
- "host", reference,
- NULL));
- g_object_ref_sink (item->_priv->ph);
- }
- }
-}
-
-/**
- * gdl_dock_item_preferred_size:
- * @item: The dock item to get the preferred size of.
- * @req: A pointer to a #GtkRequisition into which the preferred size
- * will be written.
- *
- * Gets the preferred size of the dock item in pixels.
- **/
-void
-gdl_dock_item_preferred_size (GdlDockItem *item,
- GtkRequisition *req)
-{
- GtkAllocation allocation;
-
- if (!req)
- return;
-
- gtk_widget_get_allocation (GTK_WIDGET (item), &allocation);
-
- req->width = MAX (item->_priv->preferred_width, allocation.width);
- req->height = MAX (item->_priv->preferred_height, allocation.height);
-}
-
-
-gboolean
-gdl_dock_item_or_child_has_focus (GdlDockItem *item)
-{
- GtkWidget *item_child;
- gboolean item_or_child_has_focus;
-
- g_return_val_if_fail (GDL_IS_DOCK_ITEM (item), FALSE);
-
- for (item_child = gtk_container_get_focus_child (GTK_CONTAINER (item));
- item_child && GTK_IS_CONTAINER (item_child) && gtk_container_get_focus_child (GTK_CONTAINER (item_child));
- item_child = gtk_container_get_focus_child (GTK_CONTAINER (item_child))) ;
-
- item_or_child_has_focus =
- (gtk_widget_has_focus (GTK_WIDGET (item)) ||
- (GTK_IS_WIDGET (item_child) && gtk_widget_has_focus (item_child)));
-
- return item_or_child_has_focus;
-}
-
-
-/* ----- gtk orientation type exporter/importer ----- */
-
-static void
-gdl_dock_param_export_gtk_orientation (const GValue *src,
- GValue *dst)
-{
- dst->data [0].v_pointer =
- g_strdup_printf ("%s", (src->data [0].v_int == GTK_ORIENTATION_HORIZONTAL) ?
- "horizontal" : "vertical");
-}
-
-static void
-gdl_dock_param_import_gtk_orientation (const GValue *src,
- GValue *dst)
-{
- if (!strcmp (src->data [0].v_pointer, "horizontal"))
- dst->data [0].v_int = GTK_ORIENTATION_HORIZONTAL;
- else
- dst->data [0].v_int = GTK_ORIENTATION_VERTICAL;
-}
-
diff --git a/src/libgdl/gdl-dock-item.h b/src/libgdl/gdl-dock-item.h
deleted file mode 100644
index b9378f783..000000000
--- a/src/libgdl/gdl-dock-item.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * gdl-dock-item.h
- *
- * Author: Gustavo Giráldez <gustavo.giraldez@gmx.net>
- *
- * Based on GnomeDockItem/BonoboDockItem. Original copyright notice follows.
- *
- * Copyright (C) 1998 Ettore Perazzoli
- * Copyright (C) 1998 Elliot Lee
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- * All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GDL_DOCK_ITEM_H__
-#define __GDL_DOCK_ITEM_H__
-
-#include "libgdl/gdl-dock-object.h"
-
-G_BEGIN_DECLS
-
-/* standard macros */
-#define GDL_TYPE_DOCK_ITEM (gdl_dock_item_get_type ())
-#define GDL_DOCK_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDL_TYPE_DOCK_ITEM, GdlDockItem))
-#define GDL_DOCK_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDL_TYPE_DOCK_ITEM, GdlDockItemClass))
-#define GDL_IS_DOCK_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDL_TYPE_DOCK_ITEM))
-#define GDL_IS_DOCK_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDL_TYPE_DOCK_ITEM))
-#define GDL_DOCK_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_DOCK_ITEM, GdlDockItemClass))
-
-/**
- * GdlDockItemBehavior:
- * @GDL_DOCK_ITEM_BEH_NORMAL: Normal dock item
- * @GDL_DOCK_ITEM_BEH_NEVER_FLOATING: item cannot be undocked
- * @GDL_DOCK_ITEM_BEH_NEVER_VERTICAL: item cannot be docked vertically
- * @GDL_DOCK_ITEM_BEH_NEVER_HORIZONTAL: item cannot be docked horizontally
- * @GDL_DOCK_ITEM_BEH_LOCKED: item is locked, it cannot be moved around
- * @GDL_DOCK_ITEM_BEH_CANT_DOCK_TOP: item cannot be docked at top
- * @GDL_DOCK_ITEM_BEH_CANT_DOCK_BOTTOM: item cannot be docked at bottom
- * @GDL_DOCK_ITEM_BEH_CANT_DOCK_LEFT: item cannot be docked left
- * @GDL_DOCK_ITEM_BEH_CANT_DOCK_RIGHT: item cannot be docked right
- * @GDL_DOCK_ITEM_BEH_CANT_DOCK_CENTER: item cannot be docked at center
- * @GDL_DOCK_ITEM_BEH_CANT_CLOSE: item cannot be closed
- * @GDL_DOCK_ITEM_BEH_CANT_ICONIFY: item cannot be iconified
- * @GDL_DOCK_ITEM_BEH_NO_GRIP: item doesn't have a grip
- *
- * Described the behaviour of a doc item. The item can have multiple flags set.
- *
- **/
-
-typedef enum {
- GDL_DOCK_ITEM_BEH_NORMAL = 0,
- GDL_DOCK_ITEM_BEH_NEVER_FLOATING = 1 << 0,
- GDL_DOCK_ITEM_BEH_NEVER_VERTICAL = 1 << 1,
- GDL_DOCK_ITEM_BEH_NEVER_HORIZONTAL = 1 << 2,
- GDL_DOCK_ITEM_BEH_LOCKED = 1 << 3,
- GDL_DOCK_ITEM_BEH_CANT_DOCK_TOP = 1 << 4,
- GDL_DOCK_ITEM_BEH_CANT_DOCK_BOTTOM = 1 << 5,
- GDL_DOCK_ITEM_BEH_CANT_DOCK_LEFT = 1 << 6,
- GDL_DOCK_ITEM_BEH_CANT_DOCK_RIGHT = 1 << 7,
- GDL_DOCK_ITEM_BEH_CANT_DOCK_CENTER = 1 << 8,
- GDL_DOCK_ITEM_BEH_CANT_CLOSE = 1 << 9,
- GDL_DOCK_ITEM_BEH_CANT_ICONIFY = 1 << 10,
- GDL_DOCK_ITEM_BEH_NO_GRIP = 1 << 11
-} GdlDockItemBehavior;
-
-
-/**
- * GdlDockItemFlags:
- * @GDL_DOCK_IN_DRAG: item is in a drag operation
- * @GDL_DOCK_IN_PREDRAG: item is in a predrag operation
- * @GDL_DOCK_ICONIFIED: item is iconified
- * @GDL_DOCK_USER_ACTION: indicates the user has started an action on the dock item
- *
- * Status flag of a GdlDockItem. Don't use unless you derive a widget from GdlDockItem
- *
- **/
-typedef enum {
- GDL_DOCK_IN_DRAG = 1 << GDL_DOCK_OBJECT_FLAGS_SHIFT,
- GDL_DOCK_IN_PREDRAG = 1 << (GDL_DOCK_OBJECT_FLAGS_SHIFT + 1),
- GDL_DOCK_ICONIFIED = 1 << (GDL_DOCK_OBJECT_FLAGS_SHIFT + 2),
- GDL_DOCK_USER_ACTION = 1 << (GDL_DOCK_OBJECT_FLAGS_SHIFT + 3)
-} GdlDockItemFlags;
-
-typedef struct _GdlDockItem GdlDockItem;
-typedef struct _GdlDockItemClass GdlDockItemClass;
-typedef struct _GdlDockItemPrivate GdlDockItemPrivate;
-
-struct _GdlDockItem {
- GdlDockObject object;
-
- GtkWidget *child;
- GdlDockItemBehavior behavior;
- GtkOrientation orientation;
-
- guint resize : 1;
-
- gint dragoff_x, dragoff_y; /* these need to be
- accesible from
- outside */
- GdlDockItemPrivate *_priv;
-};
-
-struct _GdlDockItemClass {
- GdlDockObjectClass parent_class;
-
- gboolean has_grip;
-
- /* virtuals */
- void (* dock_drag_begin) (GdlDockItem *item);
- void (* dock_drag_motion) (GdlDockItem *item,
- gint x,
- gint y);
- void (* dock_drag_end) (GdlDockItem *item,
- gboolean cancelled);
- void (* move_focus_child) (GdlDockItem *item,
- GtkDirectionType direction);
- void (* set_orientation) (GdlDockItem *item,
- GtkOrientation orientation);
-};
-
-#define GDL_DOCK_ITEM_FLAGS(item) (GDL_DOCK_OBJECT (item)->flags)
-#define GDL_DOCK_ITEM_IN_DRAG(item) \
- ((GDL_DOCK_ITEM_FLAGS (item) & GDL_DOCK_IN_DRAG) != 0)
-#define GDL_DOCK_ITEM_IN_PREDRAG(item) \
- ((GDL_DOCK_ITEM_FLAGS (item) & GDL_DOCK_IN_PREDRAG) != 0)
-#define GDL_DOCK_ITEM_ICONIFIED(item) \
- ((GDL_DOCK_ITEM_FLAGS (item) & GDL_DOCK_ICONIFIED) != 0)
-#define GDL_DOCK_ITEM_USER_ACTION(item) \
- ((GDL_DOCK_ITEM_FLAGS (item) & GDL_DOCK_USER_ACTION) != 0)
-#define GDL_DOCK_ITEM_NOT_LOCKED(item) !((item)->behavior & GDL_DOCK_ITEM_BEH_LOCKED)
-#define GDL_DOCK_ITEM_NO_GRIP(item) ((item)->behavior & GDL_DOCK_ITEM_BEH_NO_GRIP)
-
-#define GDL_DOCK_ITEM_SET_FLAGS(item,flag) \
- G_STMT_START { (GDL_DOCK_ITEM_FLAGS (item) |= (flag)); } G_STMT_END
-#define GDL_DOCK_ITEM_UNSET_FLAGS(item,flag) \
- G_STMT_START { (GDL_DOCK_ITEM_FLAGS (item) &= ~(flag)); } G_STMT_END
-
-#define GDL_DOCK_ITEM_HAS_GRIP(item) ((GDL_DOCK_ITEM_GET_CLASS (item)->has_grip)&& \
- ! GDL_DOCK_ITEM_NO_GRIP (item))
-
-#define GDL_DOCK_ITEM_CANT_CLOSE(item) \
- ((((item)->behavior & GDL_DOCK_ITEM_BEH_CANT_CLOSE) != 0)|| \
- ! GDL_DOCK_ITEM_NOT_LOCKED(item))
-
-#define GDL_DOCK_ITEM_CANT_ICONIFY(item) \
- ((((item)->behavior & GDL_DOCK_ITEM_BEH_CANT_ICONIFY) != 0)|| \
- ! GDL_DOCK_ITEM_NOT_LOCKED(item))
-
-/* public interface */
-
-GtkWidget *gdl_dock_item_new (const gchar *name,
- const gchar *long_name,
- GdlDockItemBehavior behavior);
-GtkWidget *gdl_dock_item_new_with_stock (const gchar *name,
- const gchar *long_name,
- const gchar *stock_id,
- GdlDockItemBehavior behavior);
-
-GtkWidget *gdl_dock_item_new_with_pixbuf_icon (const gchar *name,
- const gchar *long_name,
- const GdkPixbuf *pixbuf_icon,
- GdlDockItemBehavior behavior);
-
-GType gdl_dock_item_get_type (void);
-
-void gdl_dock_item_dock_to (GdlDockItem *item,
- GdlDockItem *target,
- GdlDockPlacement position,
- gint docking_param);
-
-void gdl_dock_item_set_orientation (GdlDockItem *item,
- GtkOrientation orientation);
-
-GtkWidget *gdl_dock_item_get_tablabel (GdlDockItem *item);
-void gdl_dock_item_set_tablabel (GdlDockItem *item,
- GtkWidget *tablabel);
-GtkWidget *gdl_dock_item_get_grip (GdlDockItem *item);
-void gdl_dock_item_hide_grip (GdlDockItem *item);
-void gdl_dock_item_show_grip (GdlDockItem *item);
-void gdl_dock_item_notify_selected (GdlDockItem *item);
-
-/* bind and unbind items to a dock */
-void gdl_dock_item_bind (GdlDockItem *item,
- GtkWidget *dock);
-
-void gdl_dock_item_unbind (GdlDockItem *item);
-
-void gdl_dock_item_hide_item (GdlDockItem *item);
-
-void gdl_dock_item_iconify_item (GdlDockItem *item);
-
-void gdl_dock_item_show_item (GdlDockItem *item);
-
-void gdl_dock_item_lock (GdlDockItem *item);
-
-void gdl_dock_item_unlock (GdlDockItem *item);
-
-void gdl_dock_item_set_default_position (GdlDockItem *item,
- GdlDockObject *reference);
-
-void gdl_dock_item_preferred_size (GdlDockItem *item,
- GtkRequisition *req);
-
-gboolean gdl_dock_item_or_child_has_focus (GdlDockItem *item);
-
-G_END_DECLS
-
-#endif
diff --git a/src/libgdl/gdl-dock-master.c b/src/libgdl/gdl-dock-master.c
deleted file mode 100644
index 294614c7e..000000000
--- a/src/libgdl/gdl-dock-master.c
+++ /dev/null
@@ -1,1011 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * gdl-dock-master.c - Object which manages a dock ring
- *
- * This file is part of the GNOME Devtools Libraries.
- *
- * Copyright (C) 2002 Gustavo Giráldez <gustavo.giraldez@gmx.net>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "gdl-i18n.h"
-
-#include "gdl-dock-master.h"
-#include "gdl-dock.h"
-#include "gdl-dock-item.h"
-#include "gdl-dock-notebook.h"
-#include "gdl-switcher.h"
-#include "libgdlmarshal.h"
-#include "libgdltypebuiltins.h"
-#ifdef WIN32
-#include "gdl-win32.h"
-#endif
-
-/* ----- Private prototypes ----- */
-
-static void gdl_dock_master_class_init (GdlDockMasterClass *klass);
-
-static void gdl_dock_master_dispose (GObject *g_object);
-static void gdl_dock_master_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gdl_dock_master_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
-
-static void _gdl_dock_master_remove (GdlDockObject *object,
- GdlDockMaster *master);
-
-static void gdl_dock_master_drag_begin (GdlDockItem *item,
- gpointer data);
-static void gdl_dock_master_drag_end (GdlDockItem *item,
- gboolean cancelled,
- gpointer data);
-static void gdl_dock_master_drag_motion (GdlDockItem *item,
- gint x,
- gint y,
- gpointer data);
-
-static void _gdl_dock_master_foreach (gpointer key,
- gpointer value,
- gpointer user_data);
-
-static void gdl_dock_master_xor_rect (GdlDockMaster *master);
-
-static void gdl_dock_master_layout_changed (GdlDockMaster *master);
-
-static void gdl_dock_master_set_switcher_style (GdlDockMaster *master,
- GdlSwitcherStyle switcher_style);
-
-/* ----- Private data types and variables ----- */
-
-enum {
- PROP_0,
- PROP_DEFAULT_TITLE,
- PROP_LOCKED,
- PROP_SWITCHER_STYLE
-};
-
-enum {
- LAYOUT_CHANGED,
- LAST_SIGNAL
-};
-
-struct _GdlDockMasterPrivate {
- gint number; /* for naming nameless manual objects */
- gchar *default_title;
-
- GdkGC *root_xor_gc;
- gboolean rect_drawn;
- GdlDock *rect_owner;
-
- GdlDockRequest *drag_request;
-
- /* source id for the idle handler to emit a layout_changed signal */
- guint idle_layout_changed_id;
-
- /* hashes to quickly calculate the overall locked status: i.e.
- * if size(unlocked_items) == 0 then locked = 1
- * else if size(locked_items) == 0 then locked = 0
- * else locked = -1
- */
- GHashTable *locked_items;
- GHashTable *unlocked_items;
-
- GdlSwitcherStyle switcher_style;
-};
-
-#define COMPUTE_LOCKED(master) \
- (g_hash_table_size ((master)->_priv->unlocked_items) == 0 ? 1 : \
- (g_hash_table_size ((master)->_priv->locked_items) == 0 ? 0 : -1))
-
-static guint master_signals [LAST_SIGNAL] = { 0 };
-
-
-/* ----- Private interface ----- */
-
-G_DEFINE_TYPE (GdlDockMaster, gdl_dock_master, G_TYPE_OBJECT);
-
-static void
-gdl_dock_master_class_init (GdlDockMasterClass *klass)
-{
- GObjectClass *g_object_class;
-
- g_object_class = G_OBJECT_CLASS (klass);
-
- g_object_class->dispose = gdl_dock_master_dispose;
- g_object_class->set_property = gdl_dock_master_set_property;
- g_object_class->get_property = gdl_dock_master_get_property;
-
- g_object_class_install_property (
- g_object_class, PROP_DEFAULT_TITLE,
- g_param_spec_string ("default-title", _("Default title"),
- _("Default title for newly created floating docks"),
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (
- g_object_class, PROP_LOCKED,
- g_param_spec_int ("locked", _("Locked"),
- _("If is set to 1, all the dock items bound to the master "
- "are locked; if it's 0, all are unlocked; -1 indicates "
- "inconsistency among the items"),
- -1, 1, 0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (
- g_object_class, PROP_SWITCHER_STYLE,
- g_param_spec_enum ("switcher-style", _("Switcher Style"),
- _("Switcher buttons style"),
- GDL_TYPE_SWITCHER_STYLE,
- GDL_SWITCHER_STYLE_BOTH,
- G_PARAM_READWRITE));
-
- master_signals [LAYOUT_CHANGED] =
- g_signal_new ("layout-changed",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GdlDockMasterClass, layout_changed),
- NULL, /* accumulator */
- NULL, /* accu_data */
- gdl_marshal_VOID__VOID,
- G_TYPE_NONE, /* return type */
- 0);
-
- klass->layout_changed = gdl_dock_master_layout_changed;
-}
-
-static void
-gdl_dock_master_init (GdlDockMaster *master)
-{
- master->dock_objects = g_hash_table_new_full (g_str_hash, g_str_equal,
- g_free, NULL);
- master->toplevel_docks = NULL;
- master->controller = NULL;
- master->dock_number = 1;
-
- master->_priv = g_new0 (GdlDockMasterPrivate, 1);
- master->_priv->number = 1;
- master->_priv->switcher_style = GDL_SWITCHER_STYLE_BOTH;
- master->_priv->locked_items = g_hash_table_new (g_direct_hash, g_direct_equal);
- master->_priv->unlocked_items = g_hash_table_new (g_direct_hash, g_direct_equal);
-}
-
-static void
-_gdl_dock_master_remove (GdlDockObject *object,
- GdlDockMaster *master)
-{
- g_return_if_fail (master != NULL && object != NULL);
-
- if (GDL_IS_DOCK (object)) {
- GList *found_link;
-
- found_link = g_list_find (master->toplevel_docks, object);
- if (found_link)
- master->toplevel_docks = g_list_delete_link (master->toplevel_docks,
- found_link);
- if (object == master->controller) {
- GList *last;
- GdlDockObject *new_controller = NULL;
-
- /* now find some other non-automatic toplevel to use as a
- new controller. start from the last dock, since it's
- probably a non-floating and manual */
- last = g_list_last (master->toplevel_docks);
- while (last) {
- if (!GDL_DOCK_OBJECT_AUTOMATIC (last->data)) {
- new_controller = GDL_DOCK_OBJECT (last->data);
- break;
- }
- last = last->prev;
- };
-
- if (new_controller) {
- /* the new controller gets the ref (implicitly of course) */
- master->controller = new_controller;
- } else {
- master->controller = NULL;
- /* no controller, no master */
- g_object_unref (master);
- }
- }
- }
- /* disconnect dock object signals */
- g_signal_handlers_disconnect_matched (object, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, master);
-
- /* unref the object from the hash if it's there */
- if (object->name) {
- GdlDockObject *found_object;
- found_object = g_hash_table_lookup (master->dock_objects, object->name);
- if (found_object == object) {
- g_hash_table_remove (master->dock_objects, object->name);
- g_object_unref (object);
- }
- }
-}
-
-static void
-ht_foreach_build_slist (gpointer key,
- gpointer value,
- GSList **slist)
-{
- *slist = g_slist_prepend (*slist, value);
-}
-
-static void
-gdl_dock_master_dispose (GObject *g_object)
-{
- GdlDockMaster *master;
-
- g_return_if_fail (GDL_IS_DOCK_MASTER (g_object));
-
- master = GDL_DOCK_MASTER (g_object);
-
- if (master->toplevel_docks) {
- g_list_foreach (master->toplevel_docks,
- (GFunc) gdl_dock_object_unbind, NULL);
- g_list_free (master->toplevel_docks);
- master->toplevel_docks = NULL;
- }
-
- if (master->dock_objects) {
- GSList *alive_docks = NULL;
- g_hash_table_foreach (master->dock_objects,
- (GHFunc) ht_foreach_build_slist, &alive_docks);
- while (alive_docks) {
- gdl_dock_object_unbind (GDL_DOCK_OBJECT (alive_docks->data));
- alive_docks = g_slist_delete_link (alive_docks, alive_docks);
- }
-
- g_hash_table_destroy (master->dock_objects);
- master->dock_objects = NULL;
- }
-
- if (master->_priv) {
- if (master->_priv->idle_layout_changed_id)
- g_source_remove (master->_priv->idle_layout_changed_id);
-
- if (master->_priv->root_xor_gc) {
- g_object_unref (master->_priv->root_xor_gc);
- master->_priv->root_xor_gc = NULL;
- }
- if (master->_priv->drag_request) {
- if (G_IS_VALUE (&master->_priv->drag_request->extra))
- g_value_unset (&master->_priv->drag_request->extra);
- g_free (master->_priv->drag_request);
- master->_priv->drag_request = NULL;
- }
- g_free (master->_priv->default_title);
- master->_priv->default_title = NULL;
-
- g_hash_table_destroy (master->_priv->locked_items);
- master->_priv->locked_items = NULL;
- g_hash_table_destroy (master->_priv->unlocked_items);
- master->_priv->unlocked_items = NULL;
-
- g_free (master->_priv);
- master->_priv = NULL;
- }
-
- G_OBJECT_CLASS (gdl_dock_master_parent_class)->dispose (g_object);
-}
-
-static void
-foreach_lock_unlock (GdlDockItem *item,
- gboolean locked)
-{
- if (!GDL_IS_DOCK_ITEM (item))
- return;
-
- g_object_set (item, "locked", locked, NULL);
- if (gdl_dock_object_is_compound (GDL_DOCK_OBJECT (item)))
- gtk_container_foreach (GTK_CONTAINER (item),
- (GtkCallback) foreach_lock_unlock,
- GINT_TO_POINTER (locked));
-}
-
-static void
-gdl_dock_master_lock_unlock (GdlDockMaster *master,
- gboolean locked)
-{
- GList *l;
-
- for (l = master->toplevel_docks; l; l = l->next) {
- GdlDock *dock = GDL_DOCK (l->data);
- if (dock->root)
- foreach_lock_unlock (GDL_DOCK_ITEM (dock->root), locked);
- }
-
- /* just to be sure hidden items are set too */
- gdl_dock_master_foreach (master,
- (GFunc) foreach_lock_unlock,
- GINT_TO_POINTER (locked));
-}
-
-static void
-gdl_dock_master_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- GdlDockMaster *master = GDL_DOCK_MASTER (object);
-
- switch (prop_id) {
- case PROP_DEFAULT_TITLE:
- g_free (master->_priv->default_title);
- master->_priv->default_title = g_value_dup_string (value);
- break;
- case PROP_LOCKED:
- if (g_value_get_int (value) >= 0)
- gdl_dock_master_lock_unlock (master, (g_value_get_int (value) > 0));
- break;
- case PROP_SWITCHER_STYLE:
- gdl_dock_master_set_switcher_style (master, g_value_get_enum (value));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-gdl_dock_master_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- GdlDockMaster *master = GDL_DOCK_MASTER (object);
-
- switch (prop_id) {
- case PROP_DEFAULT_TITLE:
- g_value_set_string (value, master->_priv->default_title);
- break;
- case PROP_LOCKED:
- g_value_set_int (value, COMPUTE_LOCKED (master));
- break;
- case PROP_SWITCHER_STYLE:
- g_value_set_enum (value, master->_priv->switcher_style);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-gdl_dock_master_drag_begin (GdlDockItem *item,
- gpointer data)
-{
- GdlDockMaster *master;
- GdlDockRequest *request;
-
- g_return_if_fail (data != NULL);
- g_return_if_fail (item != NULL);
-
- master = GDL_DOCK_MASTER (data);
-
- if (!master->_priv->drag_request)
- master->_priv->drag_request = g_new0 (GdlDockRequest, 1);
-
- request = master->_priv->drag_request;
-
- /* Set the target to itself so it won't go floating with just a click. */
- request->applicant = GDL_DOCK_OBJECT (item);
- request->target = GDL_DOCK_OBJECT (item);
- request->position = GDL_DOCK_FLOATING;
- if (G_IS_VALUE (&request->extra))
- g_value_unset (&request->extra);
-
- master->_priv->rect_drawn = FALSE;
- master->_priv->rect_owner = NULL;
-}
-
-static void
-gdl_dock_master_drag_end (GdlDockItem *item,
- gboolean cancelled,
- gpointer data)
-{
- GdlDockMaster *master;
- GdlDockRequest *request;
-
- g_return_if_fail (data != NULL);
- g_return_if_fail (item != NULL);
-
- master = GDL_DOCK_MASTER (data);
- request = master->_priv->drag_request;
-
- g_return_if_fail (GDL_DOCK_OBJECT (item) == request->applicant);
-
- /* Erase previously drawn rectangle */
- if (master->_priv->rect_drawn)
- gdl_dock_master_xor_rect (master);
-
- /* cancel conditions */
- if (cancelled || request->applicant == request->target)
- return;
-
- /* dock object to the requested position */
- gdl_dock_object_dock (request->target,
- request->applicant,
- request->position,
- &request->extra);
-
- g_signal_emit (master, master_signals [LAYOUT_CHANGED], 0);
-}
-
-static void
-gdl_dock_master_drag_motion (GdlDockItem *item,
- gint root_x,
- gint root_y,
- gpointer data)
-{
- GdlDockMaster *master;
- GdlDockRequest my_request, *request;
- GdkWindow *window;
- GdkWindow *widget_window;
- gint win_x, win_y;
- gint x, y;
- GdlDock *dock = NULL;
- gboolean may_dock = FALSE;
-
- g_return_if_fail (item != NULL && data != NULL);
-
- master = GDL_DOCK_MASTER (data);
- request = master->_priv->drag_request;
-
- g_return_if_fail (GDL_DOCK_OBJECT (item) == request->applicant);
-
- my_request = *request;
-
- /* first look under the pointer */
- window = gdk_window_at_pointer (&win_x, &win_y);
- if (window) {
- GtkWidget *widget;
- /* ok, now get the widget who owns that window and see if we can
- get to a GdlDock by walking up the hierarchy */
- gdk_window_get_user_data (window, (gpointer) &widget);
- if (GTK_IS_WIDGET (widget)) {
- while (widget && (!GDL_IS_DOCK (widget) ||
- GDL_DOCK_OBJECT_GET_MASTER (widget) != master))
- widget = gtk_widget_get_parent (widget);
- if (widget) {
- gint win_w, win_h;
-
- widget_window = gtk_widget_get_window (widget);
-
- /* verify that the pointer is still in that dock
- (the user could have moved it) */
- gdk_window_get_geometry (widget_window,
- NULL, NULL, &win_w, &win_h, NULL);
- gdk_window_get_origin (widget_window, &win_x, &win_y);
- if (root_x >= win_x && root_x < win_x + win_w &&
- root_y >= win_y && root_y < win_y + win_h)
- dock = GDL_DOCK (widget);
- }
- }
- }
-
- if (dock) {
- GdkWindow *dock_window = gtk_widget_get_window (GTK_WIDGET (dock));
-
- /* translate root coordinates into dock object coordinates
- (i.e. widget coordinates) */
- gdk_window_get_origin (dock_window, &win_x, &win_y);
- x = root_x - win_x;
- y = root_y - win_y;
- may_dock = gdl_dock_object_dock_request (GDL_DOCK_OBJECT (dock),
- x, y, &my_request);
- }
- else {
- GList *l;
-
- /* try to dock the item in all the docks in the ring in turn */
- for (l = master->toplevel_docks; l; l = l->next) {
- GdkWindow *dock_window;
- dock = GDL_DOCK (l->data);
- dock_window = gtk_widget_get_window (GTK_WIDGET (dock));
- /* translate root coordinates into dock object coordinates
- (i.e. widget coordinates) */
- gdk_window_get_origin (dock_window, &win_x, &win_y);
- x = root_x - win_x;
- y = root_y - win_y;
- may_dock = gdl_dock_object_dock_request (GDL_DOCK_OBJECT (dock),
- x, y, &my_request);
- if (may_dock)
- break;
- }
- }
-
-
- if (!may_dock) {
- GtkRequisition req;
- /* Special case for GdlDockItems : they must respect the flags */
- if(GDL_IS_DOCK_ITEM(item)
- && GDL_DOCK_ITEM(item)->behavior & GDL_DOCK_ITEM_BEH_NEVER_FLOATING)
- return;
-
- dock = NULL;
- my_request.target = GDL_DOCK_OBJECT (
- gdl_dock_object_get_toplevel (request->applicant));
- my_request.position = GDL_DOCK_FLOATING;
-
- gdl_dock_item_preferred_size (GDL_DOCK_ITEM (request->applicant), &req);
- my_request.rect.width = req.width;
- my_request.rect.height = req.height;
-
- my_request.rect.x = root_x - GDL_DOCK_ITEM (request->applicant)->dragoff_x;
- my_request.rect.y = root_y - GDL_DOCK_ITEM (request->applicant)->dragoff_y;
-
- /* setup extra docking information */
- if (G_IS_VALUE (&my_request.extra))
- g_value_unset (&my_request.extra);
-
- g_value_init (&my_request.extra, GDK_TYPE_RECTANGLE);
- g_value_set_boxed (&my_request.extra, &my_request.rect);
- }
- /* if we want to enforce GDL_DOCK_ITEM_BEH_NEVER_FLOATING */
- /* the item must remain attached to the controller, otherwise */
- /* it could be inserted in another floating dock */
- /* so check for the flag at this moment */
- else if(GDL_IS_DOCK_ITEM(item)
- && GDL_DOCK_ITEM(item)->behavior & GDL_DOCK_ITEM_BEH_NEVER_FLOATING
- && dock != GDL_DOCK(master->controller))
- return;
-
- if (!(my_request.rect.x == request->rect.x &&
- my_request.rect.y == request->rect.y &&
- my_request.rect.width == request->rect.width &&
- my_request.rect.height == request->rect.height &&
- dock == master->_priv->rect_owner)) {
-
- /* erase the previous rectangle */
- if (master->_priv->rect_drawn)
- gdl_dock_master_xor_rect (master);
- }
-
- /* set the new values */
- *request = my_request;
- master->_priv->rect_owner = dock;
-
- /* draw the previous rectangle */
- if (~master->_priv->rect_drawn)
- gdl_dock_master_xor_rect (master);
-}
-
-static void
-_gdl_dock_master_foreach (gpointer key,
- gpointer value,
- gpointer user_data)
-{
- struct {
- GFunc function;
- gpointer user_data;
- } *data = user_data;
-
- (* data->function) (GTK_WIDGET (value), data->user_data);
-}
-
-static void
-gdl_dock_master_xor_rect (GdlDockMaster *master)
-{
- gint8 dash_list [2];
- GdkWindow *window;
- GdkRectangle *rect;
-
- if (!master->_priv || !master->_priv->drag_request)
- return;
-
- master->_priv->rect_drawn = ~master->_priv->rect_drawn;
-
- if (master->_priv->rect_owner) {
- gdl_dock_xor_rect (master->_priv->rect_owner,
- &master->_priv->drag_request->rect);
- return;
- }
-
- rect = &master->_priv->drag_request->rect;
- window = gdk_get_default_root_window ();
-
- if (!master->_priv->root_xor_gc) {
- GdkGCValues values;
-
- values.function = GDK_INVERT;
- values.subwindow_mode = GDK_INCLUDE_INFERIORS;
- master->_priv->root_xor_gc = gdk_gc_new_with_values (
- window, &values, GDK_GC_FUNCTION | GDK_GC_SUBWINDOW);
- };
-
-#ifdef WIN32
- GdkLineStyle lineStyle = GDK_LINE_ON_OFF_DASH;
- if (is_os_vista())
- {
- // On Vista the dash-line is increadibly slow to draw, it takes several minutes to draw the tracking lines
- // With GDK_LINE_SOLID it is parts of a second
- // No performance issue on WinXP
- lineStyle = GDK_LINE_SOLID;
- }
-#else
- GdkLineStyle lineStyle = GDK_LINE_ON_OFF_DASH;
-#endif
- gdk_gc_set_line_attributes (master->_priv->root_xor_gc, 1,
- lineStyle,
- GDK_CAP_NOT_LAST,
- GDK_JOIN_BEVEL);
-
- dash_list[0] = 1;
- dash_list[1] = 1;
- gdk_gc_set_dashes (master->_priv->root_xor_gc, 1, dash_list, 2);
-
- gdk_draw_rectangle (window, master->_priv->root_xor_gc, 0,
- rect->x, rect->y,
- rect->width, rect->height);
-
- gdk_gc_set_dashes (master->_priv->root_xor_gc, 0, dash_list, 2);
-
- gdk_draw_rectangle (window, master->_priv->root_xor_gc, 0,
- rect->x + 1, rect->y + 1,
- rect->width - 2, rect->height - 2);
-}
-
-static void
-gdl_dock_master_layout_changed (GdlDockMaster *master)
-{
- g_return_if_fail (GDL_IS_DOCK_MASTER (master));
-
- /* emit "layout-changed" on the controller to notify the user who
- * normally shouldn't have access to us */
- if (master->controller)
- g_signal_emit_by_name (master->controller, "layout-changed");
-
- /* remove the idle handler if there is one */
- if (master->_priv->idle_layout_changed_id) {
- g_source_remove (master->_priv->idle_layout_changed_id);
- master->_priv->idle_layout_changed_id = 0;
- }
-}
-
-static gboolean
-idle_emit_layout_changed (gpointer user_data)
-{
- GdlDockMaster *master = user_data;
-
- g_return_val_if_fail (master && GDL_IS_DOCK_MASTER (master), FALSE);
-
- master->_priv->idle_layout_changed_id = 0;
- g_signal_emit (master, master_signals [LAYOUT_CHANGED], 0);
-
- return FALSE;
-}
-
-static void
-item_dock_cb (GdlDockObject *object,
- GdlDockObject *requestor,
- GdlDockPlacement position,
- GValue *other_data,
- gpointer user_data)
-{
- GdlDockMaster *master = user_data;
-
- g_return_if_fail (requestor && GDL_IS_DOCK_OBJECT (requestor));
- g_return_if_fail (master && GDL_IS_DOCK_MASTER (master));
-
- /* here we are in fact interested in the requestor, since it's
- * assumed that object will not change its visibility... for the
- * requestor, however, could mean that it's being shown */
- if (!GDL_DOCK_OBJECT_IN_REFLOW (requestor) &&
- !GDL_DOCK_OBJECT_AUTOMATIC (requestor)) {
- if (!master->_priv->idle_layout_changed_id)
- master->_priv->idle_layout_changed_id =
- g_idle_add (idle_emit_layout_changed, master);
- }
-}
-
-static void
-item_detach_cb (GdlDockObject *object,
- gboolean recursive,
- gpointer user_data)
-{
- GdlDockMaster *master = user_data;
-
- g_return_if_fail (object && GDL_IS_DOCK_OBJECT (object));
- g_return_if_fail (master && GDL_IS_DOCK_MASTER (master));
-
- if (!GDL_DOCK_OBJECT_IN_REFLOW (object) &&
- !GDL_DOCK_OBJECT_AUTOMATIC (object)) {
- if (!master->_priv->idle_layout_changed_id)
- master->_priv->idle_layout_changed_id =
- g_idle_add (idle_emit_layout_changed, master);
- }
-}
-
-static void
-item_notify_cb (GdlDockObject *object,
- GParamSpec *pspec,
- gpointer user_data)
-{
- GdlDockMaster *master = user_data;
- gint locked = COMPUTE_LOCKED (master);
- gboolean item_locked;
-
- g_object_get (object, "locked", &item_locked, NULL);
-
- if (item_locked) {
- g_hash_table_remove (master->_priv->unlocked_items, object);
- g_hash_table_insert (master->_priv->locked_items, object, NULL);
- } else {
- g_hash_table_remove (master->_priv->locked_items, object);
- g_hash_table_insert (master->_priv->unlocked_items, object, NULL);
- }
-
- if (COMPUTE_LOCKED (master) != locked)
- g_object_notify (G_OBJECT (master), "locked");
-}
-
-/* ----- Public interface ----- */
-
-void
-gdl_dock_master_add (GdlDockMaster *master,
- GdlDockObject *object)
-{
- g_return_if_fail (master != NULL && object != NULL);
-
- if (!GDL_DOCK_OBJECT_AUTOMATIC (object)) {
- GdlDockObject *found_object;
-
- /* create a name for the object if it doesn't have one */
- if (!object->name)
- /* directly set the name, since it's a construction only
- property */
- object->name = g_strdup_printf ("__dock_%u", master->_priv->number++);
-
- /* add the object to our hash list */
- if ((found_object = g_hash_table_lookup (master->dock_objects, object->name))) {
- g_warning (_("master %p: unable to add object %p[%s] to the hash. "
- "There already is an item with that name (%p)."),
- master, object, object->name, found_object);
- }
- else {
- g_object_ref_sink (object);
- g_hash_table_insert (master->dock_objects, g_strdup (object->name), object);
- }
- }
-
- if (GDL_IS_DOCK (object)) {
- gboolean floating;
-
- /* if this is the first toplevel we are adding, name it controller */
- if (!master->toplevel_docks)
- /* the dock should already have the ref */
- master->controller = object;
-
- /* add dock to the toplevel list */
- g_object_get (object, "floating", &floating, NULL);
- if (floating)
- master->toplevel_docks = g_list_prepend (master->toplevel_docks, object);
- else
- master->toplevel_docks = g_list_append (master->toplevel_docks, object);
-
- /* we are interested in the dock request this toplevel
- * receives to update the layout */
- g_signal_connect (object, "dock",
- G_CALLBACK (item_dock_cb), master);
-
- }
- else if (GDL_IS_DOCK_ITEM (object)) {
- /* we need to connect the item's signals */
- g_signal_connect (object, "dock_drag_begin",
- G_CALLBACK (gdl_dock_master_drag_begin), master);
- g_signal_connect (object, "dock_drag_motion",
- G_CALLBACK (gdl_dock_master_drag_motion), master);
- g_signal_connect (object, "dock_drag_end",
- G_CALLBACK (gdl_dock_master_drag_end), master);
- g_signal_connect (object, "dock",
- G_CALLBACK (item_dock_cb), master);
- g_signal_connect (object, "detach",
- G_CALLBACK (item_detach_cb), master);
-
- /* register to "locked" notification if the item has a grip,
- * and add the item to the corresponding hash */
- if (GDL_DOCK_ITEM_HAS_GRIP (GDL_DOCK_ITEM (object))) {
- g_signal_connect (object, "notify::locked",
- G_CALLBACK (item_notify_cb), master);
- item_notify_cb (object, NULL, master);
- }
-
- /* If the item is notebook, set the switcher style */
- if (GDL_IS_DOCK_NOTEBOOK (object) &&
- GDL_IS_SWITCHER (GDL_DOCK_ITEM (object)->child))
- {
- g_object_set (GDL_DOCK_ITEM (object)->child, "switcher-style",
- master->_priv->switcher_style, NULL);
- }
-
- /* post a layout_changed emission if the item is not automatic
- * (since it should be added to the items model) */
- if (!GDL_DOCK_OBJECT_AUTOMATIC (object)) {
- if (!master->_priv->idle_layout_changed_id)
- master->_priv->idle_layout_changed_id =
- g_idle_add (idle_emit_layout_changed, master);
- }
- }
-}
-
-void
-gdl_dock_master_remove (GdlDockMaster *master,
- GdlDockObject *object)
-{
- g_return_if_fail (master != NULL && object != NULL);
-
- /* remove from locked/unlocked hashes and property change if
- * that's the case */
- if (GDL_IS_DOCK_ITEM (object) && GDL_DOCK_ITEM_HAS_GRIP (GDL_DOCK_ITEM (object))) {
- gint locked = COMPUTE_LOCKED (master);
- if (g_hash_table_remove (master->_priv->locked_items, object) ||
- g_hash_table_remove (master->_priv->unlocked_items, object)) {
- if (COMPUTE_LOCKED (master) != locked)
- g_object_notify (G_OBJECT (master), "locked");
- }
- }
-
- /* ref the master, since removing the controller could cause master disposal */
- g_object_ref (master);
-
- /* all the interesting stuff happens in _gdl_dock_master_remove */
- _gdl_dock_master_remove (object, master);
-
- /* post a layout_changed emission if the item is not automatic
- * (since it should be removed from the items model) */
- if (!GDL_DOCK_OBJECT_AUTOMATIC (object)) {
- if (!master->_priv->idle_layout_changed_id)
- master->_priv->idle_layout_changed_id =
- g_idle_add (idle_emit_layout_changed, master);
- }
-
- /* balance ref count */
- g_object_unref (master);
-}
-
-void
-gdl_dock_master_foreach (GdlDockMaster *master,
- GFunc function,
- gpointer user_data)
-{
- struct {
- GFunc function;
- gpointer user_data;
- } data;
-
- g_return_if_fail (master != NULL && function != NULL);
-
- data.function = function;
- data.user_data = user_data;
- g_hash_table_foreach (master->dock_objects, _gdl_dock_master_foreach, &data);
-}
-
-void
-gdl_dock_master_foreach_toplevel (GdlDockMaster *master,
- gboolean include_controller,
- GFunc function,
- gpointer user_data)
-{
- GList *l;
-
- g_return_if_fail (master != NULL && function != NULL);
-
- for (l = master->toplevel_docks; l; ) {
- GdlDockObject *object = GDL_DOCK_OBJECT (l->data);
- l = l->next;
- if (object != master->controller || include_controller)
- (* function) (GTK_WIDGET (object), user_data);
- }
-}
-
-GdlDockObject *
-gdl_dock_master_get_object (GdlDockMaster *master,
- const gchar *nick_name)
-{
- gpointer *found;
-
- g_return_val_if_fail (master != NULL, NULL);
-
- if (!nick_name)
- return NULL;
-
- found = g_hash_table_lookup (master->dock_objects, nick_name);
-
- return found ? GDL_DOCK_OBJECT (found) : NULL;
-}
-
-GdlDockObject *
-gdl_dock_master_get_controller (GdlDockMaster *master)
-{
- g_return_val_if_fail (master != NULL, NULL);
-
- return master->controller;
-}
-
-void
-gdl_dock_master_set_controller (GdlDockMaster *master,
- GdlDockObject *new_controller)
-{
- g_return_if_fail (master != NULL);
-
- if (new_controller) {
- if (GDL_DOCK_OBJECT_AUTOMATIC (new_controller))
- g_warning (_("The new dock controller %p is automatic. Only manual "
- "dock objects should be named controller."), new_controller);
-
- /* check that the controller is in the toplevel list */
- if (!g_list_find (master->toplevel_docks, new_controller))
- gdl_dock_master_add (master, new_controller);
- master->controller = new_controller;
-
- } else {
- master->controller = NULL;
- /* no controller, no master */
- g_object_unref (master);
- }
-}
-
-static void
-set_switcher_style_foreach (GtkWidget *obj, gpointer user_data)
-{
- GdlSwitcherStyle style = GPOINTER_TO_INT (user_data);
-
- if (!GDL_IS_DOCK_ITEM (obj))
- return;
-
- if (GDL_IS_DOCK_NOTEBOOK (obj)) {
-
- GtkWidget *child = GDL_DOCK_ITEM (obj)->child;
- if (GDL_IS_SWITCHER (child)) {
-
- g_object_set (child, "switcher-style", style, NULL);
- }
- } else if (gdl_dock_object_is_compound (GDL_DOCK_OBJECT (obj))) {
-
- gtk_container_foreach (GTK_CONTAINER (obj),
- set_switcher_style_foreach,
- user_data);
- }
-}
-
-static void
-gdl_dock_master_set_switcher_style (GdlDockMaster *master,
- GdlSwitcherStyle switcher_style)
-{
- GList *l;
- g_return_if_fail (GDL_IS_DOCK_MASTER (master));
-
- master->_priv->switcher_style = switcher_style;
- for (l = master->toplevel_docks; l; l = l->next) {
- GdlDock *dock = GDL_DOCK (l->data);
- if (dock->root)
- set_switcher_style_foreach (GTK_WIDGET (dock->root),
- GINT_TO_POINTER (switcher_style));
- }
-
- /* just to be sure hidden items are set too */
- gdl_dock_master_foreach (master, (GFunc) set_switcher_style_foreach,
- GINT_TO_POINTER (switcher_style));
-}
diff --git a/src/libgdl/gdl-dock-master.h b/src/libgdl/gdl-dock-master.h
deleted file mode 100644
index 266ca7ee4..000000000
--- a/src/libgdl/gdl-dock-master.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * gdl-dock-master.h - Object which manages a dock ring
- *
- * This file is part of the GNOME Devtools Libraries.
- *
- * Copyright (C) 2002 Gustavo Giráldez <gustavo.giraldez@gmx.net>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __GDL_DOCK_MASTER_H__
-#define __GDL_DOCK_MASTER_H__
-
-#include <glib-object.h>
-#include <gtk/gtk.h>
-#include "libgdl/gdl-dock-object.h"
-
-
-G_BEGIN_DECLS
-
-/* standard macros */
-#define GDL_TYPE_DOCK_MASTER (gdl_dock_master_get_type ())
-#define GDL_DOCK_MASTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDL_TYPE_DOCK_MASTER, GdlDockMaster))
-#define GDL_DOCK_MASTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDL_TYPE_DOCK_MASTER, GdlDockMasterClass))
-#define GDL_IS_DOCK_MASTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDL_TYPE_DOCK_MASTER))
-#define GDL_IS_DOCK_MASTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDL_TYPE_DOCK_MASTER))
-#define GDL_DOCK_MASTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_DOCK_MASTER, GdlDockMasterClass))
-
-/* data types & structures */
-typedef struct _GdlDockMaster GdlDockMaster;
-typedef struct _GdlDockMasterClass GdlDockMasterClass;
-typedef struct _GdlDockMasterPrivate GdlDockMasterPrivate;
-
-typedef enum {
- GDL_SWITCHER_STYLE_TEXT,
- GDL_SWITCHER_STYLE_ICON,
- GDL_SWITCHER_STYLE_BOTH,
- GDL_SWITCHER_STYLE_TOOLBAR,
- GDL_SWITCHER_STYLE_TABS,
- GDL_SWITCHER_STYLE_NONE
-} GdlSwitcherStyle;
-
-struct _GdlDockMaster {
- GObject object;
-
- GHashTable *dock_objects;
- GList *toplevel_docks;
- GdlDockObject *controller; /* GUI root object */
-
- gint dock_number; /* for toplevel dock numbering */
-
- GdlDockMasterPrivate *_priv;
-};
-
-struct _GdlDockMasterClass {
- GObjectClass parent_class;
-
- void (* layout_changed) (GdlDockMaster *master);
-};
-
-/* additional macros */
-
-#define GDL_DOCK_OBJECT_GET_MASTER(object) \
- (GDL_DOCK_OBJECT (object)->master ? \
- GDL_DOCK_MASTER (GDL_DOCK_OBJECT (object)->master) : NULL)
-
-/* public interface */
-
-GType gdl_dock_master_get_type (void);
-
-void gdl_dock_master_add (GdlDockMaster *master,
- GdlDockObject *object);
-void gdl_dock_master_remove (GdlDockMaster *master,
- GdlDockObject *object);
-void gdl_dock_master_foreach (GdlDockMaster *master,
- GFunc function,
- gpointer user_data);
-
-void gdl_dock_master_foreach_toplevel (GdlDockMaster *master,
- gboolean include_controller,
- GFunc function,
- gpointer user_data);
-
-GdlDockObject *gdl_dock_master_get_object (GdlDockMaster *master,
- const gchar *nick_name);
-
-GdlDockObject *gdl_dock_master_get_controller (GdlDockMaster *master);
-void gdl_dock_master_set_controller (GdlDockMaster *master,
- GdlDockObject *new_controller);
-
-G_END_DECLS
-
-#endif /* __GDL_DOCK_MASTER_H__ */
diff --git a/src/libgdl/gdl-dock-notebook.c b/src/libgdl/gdl-dock-notebook.c
deleted file mode 100644
index 0ffaac902..000000000
--- a/src/libgdl/gdl-dock-notebook.c
+++ /dev/null
@@ -1,530 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * This file is part of the GNOME Devtools Libraries.
- *
- * Copyright (C) 2002 Gustavo Giráldez <gustavo.giraldez@gmx.net>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "gdl-i18n.h"
-#include "gdl-switcher.h"
-
-#include "gdl-dock-notebook.h"
-#include "gdl-dock-tablabel.h"
-
-
-/* Private prototypes */
-
-static void gdl_dock_notebook_class_init (GdlDockNotebookClass *klass);
-static void gdl_dock_notebook_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gdl_dock_notebook_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
-
-static void gdl_dock_notebook_destroy (GtkObject *object);
-
-static void gdl_dock_notebook_add (GtkContainer *container,
- GtkWidget *widget);
-static void gdl_dock_notebook_forall (GtkContainer *container,
- gboolean include_internals,
- GtkCallback callback,
- gpointer callback_data);
-static GType gdl_dock_notebook_child_type (GtkContainer *container);
-
-static void gdl_dock_notebook_dock (GdlDockObject *object,
- GdlDockObject *requestor,
- GdlDockPlacement position,
- GValue *other_data);
-
-static void gdl_dock_notebook_switch_page_cb (GtkNotebook *nb,
- GtkWidget *page,
- gint page_num,
- gpointer data);
-
-static void gdl_dock_notebook_set_orientation (GdlDockItem *item,
- GtkOrientation orientation);
-
-static gboolean gdl_dock_notebook_child_placement (GdlDockObject *object,
- GdlDockObject *child,
- GdlDockPlacement *placement);
-
-static void gdl_dock_notebook_present (GdlDockObject *object,
- GdlDockObject *child);
-
-static gboolean gdl_dock_notebook_reorder (GdlDockObject *object,
- GdlDockObject *requestor,
- GdlDockPlacement new_position,
- GValue *other_data);
-
-
-/* Class variables and definitions */
-
-enum {
- PROP_0,
- PROP_PAGE
-};
-
-
-/* ----- Private functions ----- */
-
-G_DEFINE_TYPE (GdlDockNotebook, gdl_dock_notebook, GDL_TYPE_DOCK_ITEM);
-
-static void
-gdl_dock_notebook_class_init (GdlDockNotebookClass *klass)
-{
- static gboolean style_initialized = FALSE;
-
- GObjectClass *g_object_class;
- GtkObjectClass *gtk_object_class;
- GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
- GdlDockObjectClass *object_class;
- GdlDockItemClass *item_class;
-
- g_object_class = G_OBJECT_CLASS (klass);
- gtk_object_class = GTK_OBJECT_CLASS (klass);
- widget_class = GTK_WIDGET_CLASS (klass);
- container_class = GTK_CONTAINER_CLASS (klass);
- object_class = GDL_DOCK_OBJECT_CLASS (klass);
- item_class = GDL_DOCK_ITEM_CLASS (klass);
-
- g_object_class->set_property = gdl_dock_notebook_set_property;
- g_object_class->get_property = gdl_dock_notebook_get_property;
-
- gtk_object_class->destroy = gdl_dock_notebook_destroy;
-
- container_class->add = gdl_dock_notebook_add;
- container_class->forall = gdl_dock_notebook_forall;
- container_class->child_type = gdl_dock_notebook_child_type;
-
- object_class->is_compound = TRUE;
- object_class->dock = gdl_dock_notebook_dock;
- object_class->child_placement = gdl_dock_notebook_child_placement;
- object_class->present = gdl_dock_notebook_present;
- object_class->reorder = gdl_dock_notebook_reorder;
-
- item_class->has_grip = FALSE;
- item_class->set_orientation = gdl_dock_notebook_set_orientation;
-
- g_object_class_install_property (
- g_object_class, PROP_PAGE,
- g_param_spec_int ("page", _("Page"),
- _("The index of the current page"),
- 0, G_MAXINT,
- 0,
- G_PARAM_READWRITE |
- GDL_DOCK_PARAM_EXPORT | GDL_DOCK_PARAM_AFTER));
-
- if (!style_initialized) {
- style_initialized = TRUE;
-
- gtk_rc_parse_string (
- "style \"gdl-dock-notebook-default\" {\n"
- "xthickness = 2\n"
- "ythickness = 2\n"
- "}\n"
- "widget_class \"*.GtkNotebook.GdlDockItem\" "
- "style : gtk \"gdl-dock-notebook-default\"\n");
- }
-}
-
-static void
-gdl_dock_notebook_notify_cb (GObject *g_object,
- GParamSpec *pspec,
- gpointer user_data)
-{
- g_return_if_fail (user_data != NULL && GDL_IS_DOCK_NOTEBOOK (user_data));
-
- /* chain the notify signal */
- g_object_notify (G_OBJECT (user_data), pspec->name);
-}
-
-static gboolean
-gdl_dock_notebook_button_cb (GtkWidget *widget,
- GdkEventButton *event,
- gpointer user_data)
-{
- if (event->type == GDK_BUTTON_PRESS)
- GDL_DOCK_ITEM_SET_FLAGS (user_data, GDL_DOCK_USER_ACTION);
- else
- GDL_DOCK_ITEM_UNSET_FLAGS (user_data, GDL_DOCK_USER_ACTION);
-
- return FALSE;
-}
-
-static void
-gdl_dock_notebook_init (GdlDockNotebook *notebook)
-{
- GdlDockItem *item;
-
- item = GDL_DOCK_ITEM (notebook);
-
- /* create the container notebook */
- item->child = gdl_switcher_new ();
- gtk_widget_set_parent (item->child, GTK_WIDGET (notebook));
- gtk_notebook_set_tab_pos (GTK_NOTEBOOK (item->child), GTK_POS_BOTTOM);
- g_signal_connect (item->child, "switch-page",
- (GCallback) gdl_dock_notebook_switch_page_cb, (gpointer) item);
- g_signal_connect (item->child, "notify::page",
- (GCallback) gdl_dock_notebook_notify_cb, (gpointer) item);
- g_signal_connect (item->child, "button-press-event",
- (GCallback) gdl_dock_notebook_button_cb, (gpointer) item);
- g_signal_connect (item->child, "button-release-event",
- (GCallback) gdl_dock_notebook_button_cb, (gpointer) item);
- gtk_notebook_set_scrollable (GTK_NOTEBOOK (item->child), TRUE);
- gtk_widget_show (item->child);
-}
-
-static void
-gdl_dock_notebook_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- GdlDockItem *item = GDL_DOCK_ITEM (object);
-
- switch (prop_id) {
- case PROP_PAGE:
- if (item->child && GTK_IS_NOTEBOOK (item->child)) {
- gtk_notebook_set_current_page (GTK_NOTEBOOK (item->child),
- g_value_get_int (value));
- }
-
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-gdl_dock_notebook_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- GdlDockItem *item = GDL_DOCK_ITEM (object);
-
- switch (prop_id) {
- case PROP_PAGE:
- if (item->child && GTK_IS_NOTEBOOK (item->child)) {
- g_value_set_int (value, gtk_notebook_get_current_page
- (GTK_NOTEBOOK (item->child)));
- }
-
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-
-static void
-gdl_dock_notebook_destroy (GtkObject *object)
-{
- GdlDockItem *item = GDL_DOCK_ITEM (object);
-
- /* we need to call the virtual first, since in GdlDockDestroy our
- children dock objects are detached */
- GTK_OBJECT_CLASS (gdl_dock_notebook_parent_class)->destroy (object);
-
- /* after that we can remove the GtkNotebook */
- if (item->child) {
- gtk_widget_unparent (item->child);
- item->child = NULL;
- };
-}
-
-static void
-gdl_dock_notebook_switch_page_cb (GtkNotebook *nb,
- GtkWidget *page,
- gint page_num,
- gpointer data)
-{
- GdlDockNotebook *notebook;
- GtkWidget *tablabel;
- GdlDockItem *item;
-
- notebook = GDL_DOCK_NOTEBOOK (data);
-
- /* deactivate old tablabel */
- if (gtk_notebook_get_current_page (nb)) {
- tablabel = gtk_notebook_get_tab_label (
- nb, gtk_notebook_get_nth_page (
- nb, gtk_notebook_get_current_page (nb)));
- if (tablabel && GDL_IS_DOCK_TABLABEL (tablabel))
- gdl_dock_tablabel_deactivate (GDL_DOCK_TABLABEL (tablabel));
- };
-
- /* activate new label */
- tablabel = gtk_notebook_get_tab_label (
- nb, page);
- if (tablabel && GDL_IS_DOCK_TABLABEL (tablabel))
- gdl_dock_tablabel_activate (GDL_DOCK_TABLABEL (tablabel));
-
- if (GDL_DOCK_ITEM_USER_ACTION (notebook) &&
- GDL_DOCK_OBJECT (notebook)->master)
- g_signal_emit_by_name (GDL_DOCK_OBJECT (notebook)->master,
- "layout-changed");
-
- /* Signal that a new dock item has been selected */
- item = GDL_DOCK_ITEM (page);
- gdl_dock_item_notify_selected (item);
-}
-
-static void
-gdl_dock_notebook_add (GtkContainer *container,
- GtkWidget *widget)
-{
- g_return_if_fail (container != NULL && widget != NULL);
- g_return_if_fail (GDL_IS_DOCK_NOTEBOOK (container));
- g_return_if_fail (GDL_IS_DOCK_ITEM (widget));
-
- gdl_dock_object_dock (GDL_DOCK_OBJECT (container),
- GDL_DOCK_OBJECT (widget),
- GDL_DOCK_CENTER,
- NULL);
-}
-
-static void
-gdl_dock_notebook_forall (GtkContainer *container,
- gboolean include_internals,
- GtkCallback callback,
- gpointer callback_data)
-{
- GdlDockItem *item;
-
- g_return_if_fail (container != NULL);
- g_return_if_fail (GDL_IS_DOCK_NOTEBOOK (container));
- g_return_if_fail (callback != NULL);
-
- if (include_internals) {
- /* use GdlDockItem's forall */
- GTK_CONTAINER_CLASS (gdl_dock_notebook_parent_class)->forall
- (container, include_internals, callback, callback_data);
- }
- else {
- item = GDL_DOCK_ITEM (container);
- if (item->child)
- gtk_container_foreach (GTK_CONTAINER (item->child), callback, callback_data);
- }
-}
-
-static GType
-gdl_dock_notebook_child_type (GtkContainer *container)
-{
- return GDL_TYPE_DOCK_ITEM;
-}
-
-static void
-gdl_dock_notebook_dock_child (GdlDockObject *requestor,
- gpointer user_data)
-{
- struct {
- GdlDockObject *object;
- GdlDockPlacement position;
- GValue *other_data;
- } *data = user_data;
-
- gdl_dock_object_dock (data->object, requestor, data->position, data->other_data);
-}
-
-static void
-gdl_dock_notebook_dock (GdlDockObject *object,
- GdlDockObject *requestor,
- GdlDockPlacement position,
- GValue *other_data)
-{
- g_return_if_fail (GDL_IS_DOCK_NOTEBOOK (object));
- g_return_if_fail (GDL_IS_DOCK_ITEM (requestor));
-
- /* we only add support for GDL_DOCK_CENTER docking strategy here... for the rest
- use our parent class' method */
- if (position == GDL_DOCK_CENTER) {
- /* we can only dock simple (not compound) items */
- if (gdl_dock_object_is_compound (requestor)) {
- struct {
- GdlDockObject *object;
- GdlDockPlacement position;
- GValue *other_data;
- } data;
-
- gdl_dock_object_freeze (requestor);
-
- data.object = object;
- data.position = position;
- data.other_data = other_data;
-
- gtk_container_foreach (GTK_CONTAINER (requestor),
- (GtkCallback) gdl_dock_notebook_dock_child, &data);
-
- gdl_dock_object_thaw (requestor);
- }
- else {
- GdlDockItem *item = GDL_DOCK_ITEM (object);
- GdlDockItem *requestor_item = GDL_DOCK_ITEM (requestor);
- gchar *long_name, *stock_id;
- GdkPixbuf *pixbuf_icon;
- GtkWidget *label;
- gint position = -1;
-
- g_object_get (requestor_item, "long-name", &long_name,
- "stock-id", &stock_id, "pixbuf-icon", &pixbuf_icon, NULL);
- label = gdl_dock_item_get_tablabel (requestor_item);
- if (!label) {
- label = gtk_label_new (long_name);
- gdl_dock_item_set_tablabel (requestor_item, label);
- }
-#if 0
- if (GDL_IS_DOCK_TABLABEL (label)) {
- gdl_dock_tablabel_deactivate (GDL_DOCK_TABLABEL (label));
- /* hide the item grip, as we will use the tablabel's */
- gdl_dock_item_hide_grip (requestor_item);
- }
-#endif
-
- if (other_data && G_VALUE_HOLDS (other_data, G_TYPE_INT))
- position = g_value_get_int (other_data);
-
- position = gdl_switcher_insert_page (GDL_SWITCHER (item->child),
- GTK_WIDGET (requestor), label,
- long_name, long_name,
- stock_id, pixbuf_icon, position);
-
- GDL_DOCK_OBJECT_SET_FLAGS (requestor, GDL_DOCK_ATTACHED);
-
- /* Set current page to the newly docked widget. set current page
- * really doesn't work if the page widget is not shown
- */
- gtk_widget_show (GTK_WIDGET (requestor));
- gtk_notebook_set_current_page (GTK_NOTEBOOK (item->child),
- position);
- g_free (long_name);
- g_free (stock_id);
- }
- }
- else
- GDL_DOCK_OBJECT_CLASS (gdl_dock_notebook_parent_class)->dock (object, requestor, position, other_data);
-}
-
-static void
-gdl_dock_notebook_set_orientation (GdlDockItem *item,
- GtkOrientation orientation)
-{
- if (item->child && GTK_IS_NOTEBOOK (item->child)) {
- if (orientation == GTK_ORIENTATION_HORIZONTAL)
- gtk_notebook_set_tab_pos (GTK_NOTEBOOK (item->child), GTK_POS_TOP);
- else
- gtk_notebook_set_tab_pos (GTK_NOTEBOOK (item->child), GTK_POS_LEFT);
- }
-
- GDL_DOCK_ITEM_CLASS (gdl_dock_notebook_parent_class)->set_orientation (item, orientation);
-}
-
-static gboolean
-gdl_dock_notebook_child_placement (GdlDockObject *object,
- GdlDockObject *child,
- GdlDockPlacement *placement)
-{
- GdlDockItem *item = GDL_DOCK_ITEM (object);
- GdlDockPlacement pos = GDL_DOCK_NONE;
-
- if (item->child) {
- GList *children, *l;
-
- children = gtk_container_get_children (GTK_CONTAINER (item->child));
- for (l = children; l; l = l->next) {
- if (l->data == (gpointer) child) {
- pos = GDL_DOCK_CENTER;
- break;
- }
- }
- g_list_free (children);
- }
-
- if (pos != GDL_DOCK_NONE) {
- if (placement)
- *placement = pos;
- return TRUE;
- }
- else
- return FALSE;
-}
-
-static void
-gdl_dock_notebook_present (GdlDockObject *object,
- GdlDockObject *child)
-{
- GdlDockItem *item = GDL_DOCK_ITEM (object);
- int i;
-
- i = gtk_notebook_page_num (GTK_NOTEBOOK (item->child),
- GTK_WIDGET (child));
- if (i >= 0)
- gtk_notebook_set_current_page (GTK_NOTEBOOK (item->child), i);
-
- GDL_DOCK_OBJECT_CLASS (gdl_dock_notebook_parent_class)->present (object, child);
-}
-
-static gboolean
-gdl_dock_notebook_reorder (GdlDockObject *object,
- GdlDockObject *requestor,
- GdlDockPlacement new_position,
- GValue *other_data)
-{
- GdlDockItem *item = GDL_DOCK_ITEM (object);
- gint current_position, new_pos = -1;
- gboolean handled = FALSE;
-
- if (item->child && new_position == GDL_DOCK_CENTER) {
- current_position = gtk_notebook_page_num (GTK_NOTEBOOK (item->child),
- GTK_WIDGET (requestor));
- if (current_position >= 0) {
- handled = TRUE;
-
- if (other_data && G_VALUE_HOLDS (other_data, G_TYPE_INT))
- new_pos = g_value_get_int (other_data);
-
- gtk_notebook_reorder_child (GTK_NOTEBOOK (item->child),
- GTK_WIDGET (requestor),
- new_pos);
- }
- }
- return handled;
-}
-
-/* ----- Public interface ----- */
-
-GtkWidget *
-gdl_dock_notebook_new (void)
-{
- GdlDockNotebook *notebook;
-
- notebook = GDL_DOCK_NOTEBOOK (g_object_new (GDL_TYPE_DOCK_NOTEBOOK, NULL));
- GDL_DOCK_OBJECT_UNSET_FLAGS (notebook, GDL_DOCK_AUTOMATIC);
-
- return GTK_WIDGET (notebook);
-}
-
diff --git a/src/libgdl/gdl-dock-notebook.h b/src/libgdl/gdl-dock-notebook.h
deleted file mode 100644
index 063f53642..000000000
--- a/src/libgdl/gdl-dock-notebook.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * This file is part of the GNOME Devtools Libraries.
- *
- * Copyright (C) 2002 Gustavo Giráldez <gustavo.giraldez@gmx.net>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __GDL_DOCK_NOTEBOOK_H__
-#define __GDL_DOCK_NOTEBOOK_H__
-
-#include "libgdl/gdl-dock-item.h"
-
-G_BEGIN_DECLS
-
-/* standard macros */
-#define GDL_TYPE_DOCK_NOTEBOOK (gdl_dock_notebook_get_type ())
-#define GDL_DOCK_NOTEBOOK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDL_TYPE_DOCK_NOTEBOOK, GdlDockNotebook))
-#define GDL_DOCK_NOTEBOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDL_TYPE_DOCK_NOTEBOOK, GdlDockNotebookClass))
-#define GDL_IS_DOCK_NOTEBOOK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDL_TYPE_DOCK_NOTEBOOK))
-#define GDL_IS_DOCK_NOTEBOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDL_TYPE_DOCK_NOTEBOOK))
-#define GDL_DOCK_NOTEBOOK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_DOCK_NOTEBOOK, GdlDockNotebookClass))
-
-/* data types & structures */
-typedef struct _GdlDockNotebook GdlDockNotebook;
-typedef struct _GdlDockNotebookClass GdlDockNotebookClass;
-
-struct _GdlDockNotebook {
- GdlDockItem item;
-};
-
-struct _GdlDockNotebookClass {
- GdlDockItemClass parent_class;
-};
-
-
-/* public interface */
-
-GtkWidget *gdl_dock_notebook_new (void);
-
-GType gdl_dock_notebook_get_type (void);
-
-G_END_DECLS
-
-#endif
-
diff --git a/src/libgdl/gdl-dock-object.c b/src/libgdl/gdl-dock-object.c
deleted file mode 100644
index 4092ecc9f..000000000
--- a/src/libgdl/gdl-dock-object.c
+++ /dev/null
@@ -1,1027 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * gdl-dock-object.c - Abstract base class for all dock related objects
- *
- * This file is part of the GNOME Devtools Libraries.
- *
- * Copyright (C) 2002 Gustavo Giráldez <gustavo.giraldez@gmx.net>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "gdl-i18n.h"
-#include <stdlib.h>
-#include <string.h>
-
-#include "gdl-dock-object.h"
-#include "gdl-dock-master.h"
-#include "libgdltypebuiltins.h"
-#include "libgdlmarshal.h"
-
-/* for later use by the registry */
-#include "gdl-dock.h"
-#include "gdl-dock-item.h"
-#include "gdl-dock-paned.h"
-#include "gdl-dock-notebook.h"
-#include "gdl-dock-placeholder.h"
-
-
-/* ----- Private prototypes ----- */
-
-static void gdl_dock_object_class_init (GdlDockObjectClass *klass);
-
-static void gdl_dock_object_set_property (GObject *g_object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gdl_dock_object_get_property (GObject *g_object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
-static void gdl_dock_object_finalize (GObject *g_object);
-
-static void gdl_dock_object_destroy (GtkObject *gtk_object);
-
-static void gdl_dock_object_show (GtkWidget *widget);
-static void gdl_dock_object_hide (GtkWidget *widget);
-
-static void gdl_dock_object_real_detach (GdlDockObject *object,
- gboolean recursive);
-static void gdl_dock_object_real_reduce (GdlDockObject *object);
-static void gdl_dock_object_dock_unimplemented (GdlDockObject *object,
- GdlDockObject *requestor,
- GdlDockPlacement position,
- GValue *other_data);
-static void gdl_dock_object_real_present (GdlDockObject *object,
- GdlDockObject *child);
-
-
-/* ----- Private data types and variables ----- */
-
-enum {
- PROP_0,
- PROP_NAME,
- PROP_LONG_NAME,
- PROP_STOCK_ID,
- PROP_PIXBUF_ICON,
- PROP_MASTER,
- PROP_EXPORT_PROPERTIES
-};
-
-enum {
- DETACH,
- DOCK,
- LAST_SIGNAL
-};
-
-static guint gdl_dock_object_signals [LAST_SIGNAL] = { 0 };
-
-struct DockRegisterItem {
- gchar* nick;
- gpointer type;
-};
-
-static GArray *dock_register = NULL;
-
-/* ----- Private interface ----- */
-
-G_DEFINE_TYPE (GdlDockObject, gdl_dock_object, GTK_TYPE_CONTAINER);
-
-static void
-gdl_dock_object_class_init (GdlDockObjectClass *klass)
-{
- GObjectClass *g_object_class;
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
-
- g_object_class = G_OBJECT_CLASS (klass);
- object_class = GTK_OBJECT_CLASS (klass);
- widget_class = GTK_WIDGET_CLASS (klass);
- container_class = GTK_CONTAINER_CLASS (klass);
-
- g_object_class->set_property = gdl_dock_object_set_property;
- g_object_class->get_property = gdl_dock_object_get_property;
- g_object_class->finalize = gdl_dock_object_finalize;
-
- g_object_class_install_property (
- g_object_class, PROP_NAME,
- g_param_spec_string (GDL_DOCK_NAME_PROPERTY, _("Name"),
- _("Unique name for identifying the dock object"),
- NULL,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
- GDL_DOCK_PARAM_EXPORT));
-
- g_object_class_install_property (
- g_object_class, PROP_LONG_NAME,
- g_param_spec_string ("long-name", _("Long name"),
- _("Human readable name for the dock object"),
- NULL,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
-
- g_object_class_install_property (
- g_object_class, PROP_STOCK_ID,
- g_param_spec_string ("stock-id", _("Stock Icon"),
- _("Stock icon for the dock object"),
- NULL,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
-
- g_object_class_install_property (
- g_object_class, PROP_PIXBUF_ICON,
- g_param_spec_pointer ("pixbuf-icon", _("Pixbuf Icon"),
- _("Pixbuf icon for the dock object"),
- G_PARAM_READWRITE));
-
- g_object_class_install_property (
- g_object_class, PROP_MASTER,
- g_param_spec_object ("master", _("Dock master"),
- _("Dock master this dock object is bound to"),
- GDL_TYPE_DOCK_MASTER,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
-
- object_class->destroy = gdl_dock_object_destroy;
-
- widget_class->show = gdl_dock_object_show;
- widget_class->hide = gdl_dock_object_hide;
-
- klass->is_compound = TRUE;
-
- klass->detach = gdl_dock_object_real_detach;
- klass->reduce = gdl_dock_object_real_reduce;
- klass->dock_request = NULL;
- klass->dock = gdl_dock_object_dock_unimplemented;
- klass->reorder = NULL;
- klass->present = gdl_dock_object_real_present;
- klass->child_placement = NULL;
-
- gdl_dock_object_signals [DETACH] =
- g_signal_new ("detach",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GdlDockObjectClass, detach),
- NULL,
- NULL,
- gdl_marshal_VOID__BOOLEAN,
- G_TYPE_NONE,
- 1,
- G_TYPE_BOOLEAN);
-
- gdl_dock_object_signals [DOCK] =
- g_signal_new ("dock",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (GdlDockObjectClass, dock),
- NULL,
- NULL,
- gdl_marshal_VOID__OBJECT_ENUM_BOXED,
- G_TYPE_NONE,
- 3,
- GDL_TYPE_DOCK_OBJECT,
- GDL_TYPE_DOCK_PLACEMENT,
- G_TYPE_VALUE);
-}
-
-static void
-gdl_dock_object_init (GdlDockObject *object)
-{
- object->flags = GDL_DOCK_AUTOMATIC;
- object->freeze_count = 0;
-}
-
-static void
-gdl_dock_object_set_property (GObject *g_object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- GdlDockObject *object = GDL_DOCK_OBJECT (g_object);
-
- switch (prop_id) {
- case PROP_NAME:
- g_free (object->name);
- object->name = g_value_dup_string (value);
- break;
- case PROP_LONG_NAME:
- g_free (object->long_name);
- object->long_name = g_value_dup_string (value);
- break;
- case PROP_STOCK_ID:
- g_free (object->stock_id);
- object->stock_id = g_value_dup_string (value);
- break;
- case PROP_PIXBUF_ICON:
- object->pixbuf_icon = g_value_get_pointer (value);
- break;
- case PROP_MASTER:
- if (g_value_get_object (value))
- gdl_dock_object_bind (object, g_value_get_object (value));
- else
- gdl_dock_object_unbind (object);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-gdl_dock_object_get_property (GObject *g_object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- GdlDockObject *object = GDL_DOCK_OBJECT (g_object);
-
- switch (prop_id) {
- case PROP_NAME:
- g_value_set_string (value, object->name);
- break;
- case PROP_LONG_NAME:
- g_value_set_string (value, object->long_name);
- break;
- case PROP_STOCK_ID:
- g_value_set_string (value, object->stock_id);
- break;
- case PROP_PIXBUF_ICON:
- g_value_set_pointer (value, object->pixbuf_icon);
- break;
- case PROP_MASTER:
- g_value_set_object (value, object->master);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-gdl_dock_object_finalize (GObject *g_object)
-{
- GdlDockObject *object;
-
- g_return_if_fail (g_object != NULL && GDL_IS_DOCK_OBJECT (g_object));
-
- object = GDL_DOCK_OBJECT (g_object);
-
- g_free (object->name);
- object->name = NULL;
- g_free (object->long_name);
- object->long_name = NULL;
- g_free (object->stock_id);
- object->stock_id = NULL;
- object->pixbuf_icon = NULL;
-
- G_OBJECT_CLASS (gdl_dock_object_parent_class)->finalize (g_object);
-}
-
-static void
-gdl_dock_object_foreach_detach (GdlDockObject *object,
- gpointer user_data)
-{
- gdl_dock_object_detach (object, TRUE);
-}
-
-static void
-gdl_dock_object_destroy (GtkObject *gtk_object)
-{
- GdlDockObject *object;
-
- g_return_if_fail (GDL_IS_DOCK_OBJECT (gtk_object));
-
- object = GDL_DOCK_OBJECT (gtk_object);
- if (gdl_dock_object_is_compound (object)) {
- /* detach our dock object children if we have some, and even
- if we are not attached, so they can get notification */
- gdl_dock_object_freeze (object);
- gtk_container_foreach (GTK_CONTAINER (object),
- (GtkCallback) gdl_dock_object_foreach_detach,
- NULL);
- object->reduce_pending = FALSE;
- gdl_dock_object_thaw (object);
- }
- if (GDL_DOCK_OBJECT_ATTACHED (object)) {
- /* detach ourselves */
- gdl_dock_object_detach (object, FALSE);
- }
-
- /* finally unbind us */
- if (object->master)
- gdl_dock_object_unbind (object);
-
- GTK_OBJECT_CLASS(gdl_dock_object_parent_class)->destroy (gtk_object);
-}
-
-static void
-gdl_dock_object_foreach_automatic (GdlDockObject *object,
- gpointer user_data)
-{
- void (* function) (GtkWidget *) = user_data;
-
- if (GDL_DOCK_OBJECT_AUTOMATIC (object))
- (* function) (GTK_WIDGET (object));
-}
-
-static void
-gdl_dock_object_show (GtkWidget *widget)
-{
- if (gdl_dock_object_is_compound (GDL_DOCK_OBJECT (widget))) {
- gtk_container_foreach (GTK_CONTAINER (widget),
- (GtkCallback) gdl_dock_object_foreach_automatic,
- gtk_widget_show);
- }
- GTK_WIDGET_CLASS (gdl_dock_object_parent_class)->show (widget);
-}
-
-static void
-gdl_dock_object_hide (GtkWidget *widget)
-{
- if (gdl_dock_object_is_compound (GDL_DOCK_OBJECT (widget))) {
- gtk_container_foreach (GTK_CONTAINER (widget),
- (GtkCallback) gdl_dock_object_foreach_automatic,
- gtk_widget_hide);
- }
- GTK_WIDGET_CLASS (gdl_dock_object_parent_class)->hide (widget);
-}
-
-static void
-gdl_dock_object_real_detach (GdlDockObject *object,
- gboolean recursive)
-{
- GdlDockObject *parent;
- GtkWidget *widget;
-
- g_return_if_fail (object != NULL);
-
- /* detach children */
- if (recursive && gdl_dock_object_is_compound (object)) {
- gtk_container_foreach (GTK_CONTAINER (object),
- (GtkCallback) gdl_dock_object_detach,
- GINT_TO_POINTER (recursive));
- }
-
- /* detach the object itself */
- GDL_DOCK_OBJECT_UNSET_FLAGS (object, GDL_DOCK_ATTACHED);
- parent = gdl_dock_object_get_parent_object (object);
- widget = GTK_WIDGET (object);
- if (gtk_widget_get_parent (widget))
- gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (GTK_WIDGET (widget))), widget);
- if (parent)
- gdl_dock_object_reduce (parent);
-}
-
-static void
-gdl_dock_object_real_reduce (GdlDockObject *object)
-{
- GdlDockObject *parent;
- GList *children;
-
- g_return_if_fail (object != NULL);
-
- if (!gdl_dock_object_is_compound (object))
- return;
-
- parent = gdl_dock_object_get_parent_object (object);
- children = gtk_container_get_children (GTK_CONTAINER (object));
- if (g_list_length (children) <= 1) {
- GList *l;
- GList *dchildren = NULL;
-
- /* detach ourselves and then re-attach our children to our
- current parent. if we are not currently attached, the
- children are detached */
- if (parent)
- gdl_dock_object_freeze (parent);
- gdl_dock_object_freeze (object);
- /* Detach the children before detaching this object, since in this
- * way the children can have access to the whole object hierarchy.
- * Set the InDetach flag now, so the children know that this object
- * is going to be detached. */
-
-
- GDL_DOCK_OBJECT_SET_FLAGS (object, GDL_DOCK_IN_DETACH);
-
- for (l = children; l; l = l->next) {
- GdlDockObject *child;
-
- if (!GDL_IS_DOCK_OBJECT (l->data))
- continue;
-
- child = GDL_DOCK_OBJECT (l->data);
-
- g_object_ref (child);
- gdl_dock_object_detach (child, FALSE);
- GDL_DOCK_OBJECT_SET_FLAGS (child, GDL_DOCK_IN_REFLOW);
- if (parent)
- dchildren = g_list_append (dchildren, child);
- GDL_DOCK_OBJECT_UNSET_FLAGS (child, GDL_DOCK_IN_REFLOW);
- }
- /* Now it can be detached */
- gdl_dock_object_detach (object, FALSE);
-
- /* After detaching the reduced object, we can add the
- children (the only child in fact) to the new parent */
- for (l = dchildren; l; l = l->next) {
- gtk_container_add (GTK_CONTAINER (parent), l->data);
- g_object_unref (l->data);
- }
- g_list_free (dchildren);
-
-
- /* sink the widget, so any automatic floating widget is destroyed */
- g_object_ref_sink (object);
- /* don't reenter */
- object->reduce_pending = FALSE;
- gdl_dock_object_thaw (object);
- if (parent)
- gdl_dock_object_thaw (parent);
- }
- g_list_free (children);
-}
-
-static void
-gdl_dock_object_dock_unimplemented (GdlDockObject *object,
- GdlDockObject *requestor,
- GdlDockPlacement position,
- GValue *other_data)
-{
- g_warning (_("Call to gdl_dock_object_dock in a dock object %p "
- "(object type is %s) which hasn't implemented this method"),
- object, G_OBJECT_TYPE_NAME (object));
-}
-
-static void
-gdl_dock_object_real_present (GdlDockObject *object,
- GdlDockObject *child)
-{
- gtk_widget_show (GTK_WIDGET (object));
-}
-
-
-/* ----- Public interface ----- */
-
-gboolean
-gdl_dock_object_is_compound (GdlDockObject *object)
-{
- GdlDockObjectClass *klass;
-
- g_return_val_if_fail (object != NULL, FALSE);
- g_return_val_if_fail (GDL_IS_DOCK_OBJECT (object), FALSE);
-
- klass = GDL_DOCK_OBJECT_GET_CLASS (object);
- return klass->is_compound;
-}
-
-void
-gdl_dock_object_detach (GdlDockObject *object,
- gboolean recursive)
-{
- g_return_if_fail (object != NULL);
-
- if (!GDL_IS_DOCK_OBJECT (object))
- return;
-
- if (!GDL_DOCK_OBJECT_ATTACHED (object))
- return;
-
- /* freeze the object to avoid reducing while detaching children */
- gdl_dock_object_freeze (object);
- GDL_DOCK_OBJECT_SET_FLAGS (object, GDL_DOCK_IN_DETACH);
- g_signal_emit (object, gdl_dock_object_signals [DETACH], 0, recursive);
- GDL_DOCK_OBJECT_UNSET_FLAGS (object, GDL_DOCK_IN_DETACH);
- gdl_dock_object_thaw (object);
-}
-
-GdlDockObject *
-gdl_dock_object_get_parent_object (GdlDockObject *object)
-{
- GtkWidget *parent;
-
- g_return_val_if_fail (object != NULL, NULL);
-
- parent = gtk_widget_get_parent (GTK_WIDGET (object));
- while (parent && !GDL_IS_DOCK_OBJECT (parent)) {
- parent = gtk_widget_get_parent (parent);
- }
-
- return parent ? GDL_DOCK_OBJECT (parent) : NULL;
-}
-
-void
-gdl_dock_object_freeze (GdlDockObject *object)
-{
- g_return_if_fail (object != NULL);
-
- if (object->freeze_count == 0) {
- g_object_ref (object); /* dock objects shouldn't be
- destroyed if they are frozen */
- }
- object->freeze_count++;
-}
-
-void
-gdl_dock_object_thaw (GdlDockObject *object)
-{
- g_return_if_fail (object != NULL);
- g_return_if_fail (object->freeze_count > 0);
-
- object->freeze_count--;
- if (object->freeze_count == 0) {
- if (object->reduce_pending) {
- object->reduce_pending = FALSE;
- gdl_dock_object_reduce (object);
- }
- g_object_unref (object);
- }
-}
-
-void
-gdl_dock_object_reduce (GdlDockObject *object)
-{
- g_return_if_fail (object != NULL);
-
- if (GDL_DOCK_OBJECT_FROZEN (object)) {
- object->reduce_pending = TRUE;
- return;
- }
-
- if (GDL_DOCK_OBJECT_GET_CLASS (object)->reduce)
- GDL_DOCK_OBJECT_GET_CLASS (object)->reduce (object);
-}
-
-gboolean
-gdl_dock_object_dock_request (GdlDockObject *object,
- gint x,
- gint y,
- GdlDockRequest *request)
-{
- g_return_val_if_fail (object != NULL && request != NULL, FALSE);
-
- if (GDL_DOCK_OBJECT_GET_CLASS (object)->dock_request)
- return GDL_DOCK_OBJECT_GET_CLASS (object)->dock_request (object, x, y, request);
- else
- return FALSE;
-}
-
-/**
- * gdl_dock_object_dock:
- * @object:
- * @requestor:
- * @position:
- * @other_data: (allow-none):
- **/
-void
-gdl_dock_object_dock (GdlDockObject *object,
- GdlDockObject *requestor,
- GdlDockPlacement position,
- GValue *other_data)
-{
- GdlDockObject *parent;
-
- g_return_if_fail (object != NULL && requestor != NULL);
-
- if (object == requestor)
- return;
-
- if (!object->master)
- g_warning (_("Dock operation requested in a non-bound object %p. "
- "The application might crash"), object);
-
- if (!gdl_dock_object_is_bound (requestor))
- gdl_dock_object_bind (requestor, object->master);
-
- if (requestor->master != object->master) {
- g_warning (_("Cannot dock %p to %p because they belong to different masters"),
- requestor, object);
- return;
- }
-
- /* first, see if we can optimize things by reordering */
- if (position != GDL_DOCK_NONE) {
- parent = gdl_dock_object_get_parent_object (object);
- if (gdl_dock_object_reorder (object, requestor, position, other_data) ||
- (parent && gdl_dock_object_reorder (parent, requestor, position, other_data)))
- return;
- }
-
- /* freeze the object, since under some conditions it might be destroyed when
- detaching the requestor */
- gdl_dock_object_freeze (object);
-
- /* detach the requestor before docking */
- g_object_ref (requestor);
- if (GDL_DOCK_OBJECT_ATTACHED (requestor))
- gdl_dock_object_detach (requestor, FALSE);
-
- if (position != GDL_DOCK_NONE)
- g_signal_emit (object, gdl_dock_object_signals [DOCK], 0,
- requestor, position, other_data);
-
- g_object_unref (requestor);
- gdl_dock_object_thaw (object);
-}
-
-void
-gdl_dock_object_bind (GdlDockObject *object,
- GObject *master)
-{
- g_return_if_fail (object != NULL && master != NULL);
- g_return_if_fail (GDL_IS_DOCK_MASTER (master));
-
- if (object->master == master)
- /* nothing to do here */
- return;
-
- if (object->master) {
- g_warning (_("Attempt to bind to %p an already bound dock object %p "
- "(current master: %p)"), master, object, object->master);
- return;
- }
-
- gdl_dock_master_add (GDL_DOCK_MASTER (master), object);
- object->master = master;
- g_object_add_weak_pointer (master, (gpointer *) &object->master);
-
- g_object_notify (G_OBJECT (object), "master");
-}
-
-void
-gdl_dock_object_unbind (GdlDockObject *object)
-{
- g_return_if_fail (object != NULL);
-
- g_object_ref (object);
-
- /* detach the object first */
- if (GDL_DOCK_OBJECT_ATTACHED (object))
- gdl_dock_object_detach (object, TRUE);
-
- if (object->master) {
- GObject *master = object->master;
- g_object_remove_weak_pointer (master, (gpointer *) &object->master);
- object->master = NULL;
- gdl_dock_master_remove (GDL_DOCK_MASTER (master), object);
- g_object_notify (G_OBJECT (object), "master");
- }
- g_object_unref (object);
-}
-
-gboolean
-gdl_dock_object_is_bound (GdlDockObject *object)
-{
- g_return_val_if_fail (object != NULL, FALSE);
- return (object->master != NULL);
-}
-
-gboolean
-gdl_dock_object_reorder (GdlDockObject *object,
- GdlDockObject *child,
- GdlDockPlacement new_position,
- GValue *other_data)
-{
- g_return_val_if_fail (object != NULL && child != NULL, FALSE);
-
- if (GDL_DOCK_OBJECT_GET_CLASS (object)->reorder)
- return GDL_DOCK_OBJECT_GET_CLASS (object)->reorder (object, child, new_position, other_data);
- else
- return FALSE;
-}
-
-void
-gdl_dock_object_present (GdlDockObject *object,
- GdlDockObject *child)
-{
- GdlDockObject *parent;
-
- g_return_if_fail (object != NULL && GDL_IS_DOCK_OBJECT (object));
-
- parent = gdl_dock_object_get_parent_object (object);
- if (parent)
- /* chain the call to our parent */
- gdl_dock_object_present (parent, object);
-
- if (GDL_DOCK_OBJECT_GET_CLASS (object)->present)
- GDL_DOCK_OBJECT_GET_CLASS (object)->present (object, child);
-}
-
-/**
- * gdl_dock_object_child_placement:
- * @object: the dock object we are asking for child placement
- * @child: the child of the @object we want the placement for
- * @placement: where to return the placement information
- *
- * This function returns information about placement of a child dock
- * object inside another dock object. The function returns %TRUE if
- * @child is effectively a child of @object. @placement should
- * normally be initially setup to %GDL_DOCK_NONE. If it's set to some
- * other value, this function will not touch the stored value if the
- * specified placement is "compatible" with the actual placement of
- * the child.
- *
- * @placement can be %NULL, in which case the function simply tells if
- * @child is attached to @object.
- *
- * Returns: %TRUE if @child is a child of @object.
- */
-gboolean
-gdl_dock_object_child_placement (GdlDockObject *object,
- GdlDockObject *child,
- GdlDockPlacement *placement)
-{
- g_return_val_if_fail (object != NULL && child != NULL, FALSE);
-
- /* simple case */
- if (!gdl_dock_object_is_compound (object))
- return FALSE;
-
- if (GDL_DOCK_OBJECT_GET_CLASS (object)->child_placement)
- return GDL_DOCK_OBJECT_GET_CLASS (object)->child_placement (object, child, placement);
- else
- return FALSE;
-}
-
-
-/* ----- dock param type functions start here ------ */
-
-static void
-gdl_dock_param_export_int (const GValue *src,
- GValue *dst)
-{
- dst->data [0].v_pointer = g_strdup_printf ("%d", src->data [0].v_int);
-}
-
-static void
-gdl_dock_param_export_uint (const GValue *src,
- GValue *dst)
-{
- dst->data [0].v_pointer = g_strdup_printf ("%u", src->data [0].v_uint);
-}
-
-static void
-gdl_dock_param_export_string (const GValue *src,
- GValue *dst)
-{
- dst->data [0].v_pointer = g_strdup (src->data [0].v_pointer);
-}
-
-static void
-gdl_dock_param_export_bool (const GValue *src,
- GValue *dst)
-{
- dst->data [0].v_pointer = g_strdup_printf ("%s", src->data [0].v_int ? "yes" : "no");
-}
-
-static void
-gdl_dock_param_export_placement (const GValue *src,
- GValue *dst)
-{
- switch (src->data [0].v_int) {
- case GDL_DOCK_NONE:
- dst->data [0].v_pointer = g_strdup ("");
- break;
- case GDL_DOCK_TOP:
- dst->data [0].v_pointer = g_strdup ("top");
- break;
- case GDL_DOCK_BOTTOM:
- dst->data [0].v_pointer = g_strdup ("bottom");
- break;
- case GDL_DOCK_LEFT:
- dst->data [0].v_pointer = g_strdup ("left");
- break;
- case GDL_DOCK_RIGHT:
- dst->data [0].v_pointer = g_strdup ("right");
- break;
- case GDL_DOCK_CENTER:
- dst->data [0].v_pointer = g_strdup ("center");
- break;
- case GDL_DOCK_FLOATING:
- dst->data [0].v_pointer = g_strdup ("floating");
- break;
- }
-}
-
-static void
-gdl_dock_param_import_int (const GValue *src,
- GValue *dst)
-{
- dst->data [0].v_int = atoi (src->data [0].v_pointer);
-}
-
-static void
-gdl_dock_param_import_uint (const GValue *src,
- GValue *dst)
-{
- dst->data [0].v_uint = (guint) atoi (src->data [0].v_pointer);
-}
-
-static void
-gdl_dock_param_import_string (const GValue *src,
- GValue *dst)
-{
- dst->data [0].v_pointer = g_strdup (src->data [0].v_pointer);
-}
-
-static void
-gdl_dock_param_import_bool (const GValue *src,
- GValue *dst)
-{
- dst->data [0].v_int = !strcmp (src->data [0].v_pointer, "yes");
-}
-
-static void
-gdl_dock_param_import_placement (const GValue *src,
- GValue *dst)
-{
- if (!strcmp (src->data [0].v_pointer, "top"))
- dst->data [0].v_int = GDL_DOCK_TOP;
- else if (!strcmp (src->data [0].v_pointer, "bottom"))
- dst->data [0].v_int = GDL_DOCK_BOTTOM;
- else if (!strcmp (src->data [0].v_pointer, "center"))
- dst->data [0].v_int = GDL_DOCK_CENTER;
- else if (!strcmp (src->data [0].v_pointer, "left"))
- dst->data [0].v_int = GDL_DOCK_LEFT;
- else if (!strcmp (src->data [0].v_pointer, "right"))
- dst->data [0].v_int = GDL_DOCK_RIGHT;
- else if (!strcmp (src->data [0].v_pointer, "floating"))
- dst->data [0].v_int = GDL_DOCK_FLOATING;
- else
- dst->data [0].v_int = GDL_DOCK_NONE;
-}
-
-GType
-gdl_dock_param_get_type (void)
-{
- static GType our_type = 0;
-
- if (our_type == 0) {
- GTypeInfo tinfo = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
- our_type = g_type_register_static (G_TYPE_STRING, "GdlDockParam", &tinfo, 0);
-
- /* register known transform functions */
- /* exporters */
- g_value_register_transform_func (G_TYPE_INT, our_type, gdl_dock_param_export_int);
- g_value_register_transform_func (G_TYPE_UINT, our_type, gdl_dock_param_export_uint);
- g_value_register_transform_func (G_TYPE_STRING, our_type, gdl_dock_param_export_string);
- g_value_register_transform_func (G_TYPE_BOOLEAN, our_type, gdl_dock_param_export_bool);
- g_value_register_transform_func (GDL_TYPE_DOCK_PLACEMENT, our_type, gdl_dock_param_export_placement);
- /* importers */
- g_value_register_transform_func (our_type, G_TYPE_INT, gdl_dock_param_import_int);
- g_value_register_transform_func (our_type, G_TYPE_UINT, gdl_dock_param_import_uint);
- g_value_register_transform_func (our_type, G_TYPE_STRING, gdl_dock_param_import_string);
- g_value_register_transform_func (our_type, G_TYPE_BOOLEAN, gdl_dock_param_import_bool);
- g_value_register_transform_func (our_type, GDL_TYPE_DOCK_PLACEMENT, gdl_dock_param_import_placement);
- }
-
- return our_type;
-}
-
-/* -------------- nick <-> type conversion functions --------------- */
-
-static void
-gdl_dock_object_register_init (void)
-{
- const size_t n_default = 5;
- guint i = 0;
- struct DockRegisterItem default_items[n_default];
-
- if (dock_register)
- return;
-
- dock_register
- = g_array_new (FALSE, FALSE, sizeof (struct DockRegisterItem));
-
- /* add known types */
- default_items[0].nick = "dock";
- default_items[0].type = (gpointer) GDL_TYPE_DOCK;
- default_items[1].nick = "item";
- default_items[1].type = (gpointer) GDL_TYPE_DOCK_ITEM;
- default_items[2].nick = "paned";
- default_items[2].type = (gpointer) GDL_TYPE_DOCK_PANED;
- default_items[3].nick = "notebook";
- default_items[3].type = (gpointer) GDL_TYPE_DOCK_NOTEBOOK;
- default_items[4].nick = "placeholder";
- default_items[4].type = (gpointer) GDL_TYPE_DOCK_PLACEHOLDER;
-
- for (i = 0; i < n_default; i++)
- g_array_append_val (dock_register, default_items[i]);
-}
-
-/**
- * gdl_dock_object_nick_from_type:
- * @type: The type for which to find the nickname
- *
- * Finds the nickname for a given type
- *
- * Returns: If the object has a nickname, then it is returned.
- * Otherwise, the type name.
- */
-const gchar *
-gdl_dock_object_nick_from_type (GType type)
-{
- gchar *nick = NULL;
- guint i = 0;
-
- if (!dock_register)
- gdl_dock_object_register_init ();
-
- for (i=0; i < dock_register->len; i++) {
- struct DockRegisterItem item
- = g_array_index (dock_register, struct DockRegisterItem, i);
-
- if (g_direct_equal (item.type, (gpointer) type))
- nick = g_strdup (item.nick);
- }
-
- return nick ? nick : g_type_name (type);
-}
-
-/**
- * gdl_dock_object_type_from_nick:
- * @nick: The nickname for the object type
- *
- * Finds the object type assigned to a given nickname.
- *
- * Returns: If the nickname has previously been assigned, then the corresponding
- * object type is returned. Otherwise, %G_TYPE_NONE.
- */
-GType
-gdl_dock_object_type_from_nick (const gchar *nick)
-{
- GType type = G_TYPE_NONE;
- gboolean nick_is_in_register = FALSE;
- guint i = 0;
-
- if (!dock_register)
- gdl_dock_object_register_init ();
-
- for (i = 0; i < dock_register->len; i++) {
- struct DockRegisterItem item
- = g_array_index (dock_register, struct DockRegisterItem, i);
-
- if (!g_strcmp0 (nick, item.nick)) {
- nick_is_in_register = TRUE;
- type = (GType) item.type;
- }
- }
- if (!nick_is_in_register) {
- /* try searching in the glib type system */
- type = g_type_from_name (nick);
- }
-
- return type;
-}
-
-/**
- * gdl_dock_object_set_type_for_nick:
- * @nick: The nickname for the object type
- * @type: The object type
- *
- * Assigns an object type to a given nickname. If the nickname already exists,
- * then it reassigns it to a new object type.
- *
- * Returns: If the nick was previously assigned, the old type is returned.
- * Otherwise, %G_TYPE_NONE.
- */
-GType
-gdl_dock_object_set_type_for_nick (const gchar *nick,
- GType type)
-{
- GType old_type = G_TYPE_NONE;
- guint i = 0;
- struct DockRegisterItem new_item;
- new_item.nick = g_strdup(nick);
- new_item.type = (gpointer) type;
-
- if (!dock_register)
- gdl_dock_object_register_init ();
-
- g_return_val_if_fail (g_type_is_a (type, GDL_TYPE_DOCK_OBJECT), G_TYPE_NONE);
-
- for (i = 0; i < dock_register->len; i++) {
- struct DockRegisterItem item
- = g_array_index (dock_register, struct DockRegisterItem, i);
-
- if (!g_strcmp0 (nick, item.nick)) {
- old_type = (GType) item.type;
- g_array_insert_val (dock_register, i, new_item);
- }
- }
-
- return old_type;
-}
-
diff --git a/src/libgdl/gdl-dock-object.h b/src/libgdl/gdl-dock-object.h
deleted file mode 100644
index f8b192f35..000000000
--- a/src/libgdl/gdl-dock-object.h
+++ /dev/null
@@ -1,225 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * gdl-dock-object.h - Abstract base class for all dock related objects
- *
- * This file is part of the GNOME Devtools Libraries.
- *
- * Copyright (C) 2002 Gustavo Giráldez <gustavo.giraldez@gmx.net>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __GDL_DOCK_OBJECT_H__
-#define __GDL_DOCK_OBJECT_H__
-
-#include <gtk/gtk.h>
-
-G_BEGIN_DECLS
-
-/* standard macros */
-#define GDL_TYPE_DOCK_OBJECT (gdl_dock_object_get_type ())
-#define GDL_DOCK_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDL_TYPE_DOCK_OBJECT, GdlDockObject))
-#define GDL_DOCK_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDL_TYPE_DOCK_OBJECT, GdlDockObjectClass))
-#define GDL_IS_DOCK_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDL_TYPE_DOCK_OBJECT))
-#define GDL_IS_DOCK_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDL_TYPE_DOCK_OBJECT))
-#define GDL_DOCK_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_DOCK_OBJECT, GdlDockObjectClass))
-
-/* data types & structures */
-typedef enum {
- /* the parameter is to be exported for later layout rebuilding */
- GDL_DOCK_PARAM_EXPORT = 1 << G_PARAM_USER_SHIFT,
- /* the parameter must be set after adding the children objects */
- GDL_DOCK_PARAM_AFTER = 1 << (G_PARAM_USER_SHIFT + 1)
-} GdlDockParamFlags;
-
-#define GDL_DOCK_NAME_PROPERTY "name"
-#define GDL_DOCK_MASTER_PROPERTY "master"
-
-typedef enum {
- GDL_DOCK_AUTOMATIC = 1 << 0,
- GDL_DOCK_ATTACHED = 1 << 1,
- GDL_DOCK_IN_REFLOW = 1 << 2,
- GDL_DOCK_IN_DETACH = 1 << 3
-} GdlDockObjectFlags;
-
-#define GDL_DOCK_OBJECT_FLAGS_SHIFT 8
-
-typedef enum {
- GDL_DOCK_NONE = 0,
- GDL_DOCK_TOP,
- GDL_DOCK_BOTTOM,
- GDL_DOCK_RIGHT,
- GDL_DOCK_LEFT,
- GDL_DOCK_CENTER,
- GDL_DOCK_FLOATING
-} GdlDockPlacement;
-
-typedef struct _GdlDockObject GdlDockObject;
-typedef struct _GdlDockObjectClass GdlDockObjectClass;
-typedef struct _GdlDockRequest GdlDockRequest;
-
-struct _GdlDockRequest {
- GdlDockObject *applicant;
- GdlDockObject *target;
- GdlDockPlacement position;
- GdkRectangle rect;
- GValue extra;
-};
-
-struct _GdlDockObject {
- GtkContainer container;
-
- GdlDockObjectFlags flags;
- gint freeze_count;
-
- GObject *master;
- gchar *name;
- gchar *long_name;
- gchar *stock_id;
- GdkPixbuf *pixbuf_icon;
-
- gboolean reduce_pending;
-};
-
-struct _GdlDockObjectClass {
- GtkContainerClass parent_class;
-
- gboolean is_compound;
-
- void (* detach) (GdlDockObject *object,
- gboolean recursive);
- void (* reduce) (GdlDockObject *object);
-
- gboolean (* dock_request) (GdlDockObject *object,
- gint x,
- gint y,
- GdlDockRequest *request);
-
- void (* dock) (GdlDockObject *object,
- GdlDockObject *requestor,
- GdlDockPlacement position,
- GValue *other_data);
-
- gboolean (* reorder) (GdlDockObject *object,
- GdlDockObject *child,
- GdlDockPlacement new_position,
- GValue *other_data);
-
- void (* present) (GdlDockObject *object,
- GdlDockObject *child);
-
- gboolean (* child_placement) (GdlDockObject *object,
- GdlDockObject *child,
- GdlDockPlacement *placement);
-};
-
-/* additional macros */
-#define GDL_DOCK_OBJECT_FLAGS(obj) (GDL_DOCK_OBJECT (obj)->flags)
-#define GDL_DOCK_OBJECT_AUTOMATIC(obj) \
- ((GDL_DOCK_OBJECT_FLAGS (obj) & GDL_DOCK_AUTOMATIC) != 0)
-#define GDL_DOCK_OBJECT_ATTACHED(obj) \
- ((GDL_DOCK_OBJECT_FLAGS (obj) & GDL_DOCK_ATTACHED) != 0)
-#define GDL_DOCK_OBJECT_IN_REFLOW(obj) \
- ((GDL_DOCK_OBJECT_FLAGS (obj) & GDL_DOCK_IN_REFLOW) != 0)
-#define GDL_DOCK_OBJECT_IN_DETACH(obj) \
- ((GDL_DOCK_OBJECT_FLAGS (obj) & GDL_DOCK_IN_DETACH) != 0)
-
-#define GDL_DOCK_OBJECT_SET_FLAGS(obj,flag) \
- G_STMT_START { (GDL_DOCK_OBJECT_FLAGS (obj) |= (flag)); } G_STMT_END
-#define GDL_DOCK_OBJECT_UNSET_FLAGS(obj,flag) \
- G_STMT_START { (GDL_DOCK_OBJECT_FLAGS (obj) &= ~(flag)); } G_STMT_END
-
-#define GDL_DOCK_OBJECT_FROZEN(obj) (GDL_DOCK_OBJECT (obj)->freeze_count > 0)
-
-
-/* public interface */
-
-GType gdl_dock_object_get_type (void);
-
-gboolean gdl_dock_object_is_compound (GdlDockObject *object);
-
-void gdl_dock_object_detach (GdlDockObject *object,
- gboolean recursive);
-
-GdlDockObject *gdl_dock_object_get_parent_object (GdlDockObject *object);
-
-void gdl_dock_object_freeze (GdlDockObject *object);
-void gdl_dock_object_thaw (GdlDockObject *object);
-
-void gdl_dock_object_reduce (GdlDockObject *object);
-
-gboolean gdl_dock_object_dock_request (GdlDockObject *object,
- gint x,
- gint y,
- GdlDockRequest *request);
-void gdl_dock_object_dock (GdlDockObject *object,
- GdlDockObject *requestor,
- GdlDockPlacement position,
- GValue *other_data);
-
-void gdl_dock_object_bind (GdlDockObject *object,
- GObject *master);
-void gdl_dock_object_unbind (GdlDockObject *object);
-gboolean gdl_dock_object_is_bound (GdlDockObject *object);
-
-gboolean gdl_dock_object_reorder (GdlDockObject *object,
- GdlDockObject *child,
- GdlDockPlacement new_position,
- GValue *other_data);
-
-void gdl_dock_object_present (GdlDockObject *object,
- GdlDockObject *child);
-
-gboolean gdl_dock_object_child_placement (GdlDockObject *object,
- GdlDockObject *child,
- GdlDockPlacement *placement);
-
-/* other types */
-
-/* this type derives from G_TYPE_STRING and is meant to be the basic
- type for serializing object parameters which are exported
- (i.e. those that are needed for layout rebuilding) */
-#define GDL_TYPE_DOCK_PARAM (gdl_dock_param_get_type ())
-
-GType gdl_dock_param_get_type (void);
-
-/* functions for setting/retrieving nick names for serializing GdlDockObject types */
-const gchar *gdl_dock_object_nick_from_type (GType type);
-GType gdl_dock_object_type_from_nick (const gchar *nick);
-GType gdl_dock_object_set_type_for_nick (const gchar *nick,
- GType type);
-
-
-/* helper macros */
-#define GDL_TRACE_OBJECT(object, format, args...) \
- G_STMT_START { \
- g_log (G_LOG_DOMAIN, \
- G_LOG_LEVEL_DEBUG, \
- "%s:%d (%s) %s [%p %d%s:%d]: " format, \
- __FILE__, \
- __LINE__, \
- __PRETTY_FUNCTION__, \
- G_OBJECT_TYPE_NAME (object), object, \
- G_OBJECT (object)->ref_count, \
- (GTK_IS_OBJECT (object) && g_object_is_floating (object)) ? "(float)" : "", \
- GDL_IS_DOCK_OBJECT (object) ? GDL_DOCK_OBJECT (object)->freeze_count : -1, \
- ##args); } G_STMT_END
-
-
-
-G_END_DECLS
-
-#endif /* __GDL_DOCK_OBJECT_H__ */
-
diff --git a/src/libgdl/gdl-dock-paned.c b/src/libgdl/gdl-dock-paned.c
deleted file mode 100644
index 5b4561ef3..000000000
--- a/src/libgdl/gdl-dock-paned.c
+++ /dev/null
@@ -1,678 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * gdl-dock-paned.h
- *
- * This file is part of the GNOME Devtools Libraries.
- *
- * Copyright (C) 2002 Gustavo Giráldez <gustavo.giraldez@gmx.net>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "gdl-i18n.h"
-#include <string.h>
-#include <gtk/gtk.h>
-
-#include "gdl-dock-paned.h"
-
-
-/* Private prototypes */
-
-static void gdl_dock_paned_class_init (GdlDockPanedClass *klass);
-static void gdl_dock_paned_init (GdlDockPaned *paned);
-static GObject *gdl_dock_paned_constructor (GType type,
- guint n_construct_properties,
- GObjectConstructParam *construct_param);
-static void gdl_dock_paned_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gdl_dock_paned_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
-
-static void gdl_dock_paned_destroy (GtkObject *object);
-
-static void gdl_dock_paned_add (GtkContainer *container,
- GtkWidget *widget);
-static void gdl_dock_paned_forall (GtkContainer *container,
- gboolean include_internals,
- GtkCallback callback,
- gpointer callback_data);
-static GType gdl_dock_paned_child_type (GtkContainer *container);
-
-static gboolean gdl_dock_paned_dock_request (GdlDockObject *object,
- gint x,
- gint y,
- GdlDockRequest *request);
-static void gdl_dock_paned_dock (GdlDockObject *object,
- GdlDockObject *requestor,
- GdlDockPlacement position,
- GValue *other_data);
-
-static void gdl_dock_paned_set_orientation (GdlDockItem *item,
- GtkOrientation orientation);
-
-static gboolean gdl_dock_paned_child_placement (GdlDockObject *object,
- GdlDockObject *child,
- GdlDockPlacement *placement);
-
-
-/* ----- Class variables and definitions ----- */
-
-#define SPLIT_RATIO 0.3
-
-enum {
- PROP_0,
- PROP_POSITION
-};
-
-
-/* ----- Private functions ----- */
-
-G_DEFINE_TYPE (GdlDockPaned, gdl_dock_paned, GDL_TYPE_DOCK_ITEM);
-
-static void
-gdl_dock_paned_class_init (GdlDockPanedClass *klass)
-{
- GObjectClass *g_object_class;
- GtkObjectClass *gtk_object_class;
- GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
- GdlDockObjectClass *object_class;
- GdlDockItemClass *item_class;
-
- g_object_class = G_OBJECT_CLASS (klass);
- gtk_object_class = GTK_OBJECT_CLASS (klass);
- widget_class = GTK_WIDGET_CLASS (klass);
- container_class = GTK_CONTAINER_CLASS (klass);
- object_class = GDL_DOCK_OBJECT_CLASS (klass);
- item_class = GDL_DOCK_ITEM_CLASS (klass);
-
- g_object_class->set_property = gdl_dock_paned_set_property;
- g_object_class->get_property = gdl_dock_paned_get_property;
- g_object_class->constructor = gdl_dock_paned_constructor;
-
- gtk_object_class->destroy = gdl_dock_paned_destroy;
-
- container_class->add = gdl_dock_paned_add;
- container_class->forall = gdl_dock_paned_forall;
- container_class->child_type = gdl_dock_paned_child_type;
-
- object_class->is_compound = TRUE;
-
- object_class->dock_request = gdl_dock_paned_dock_request;
- object_class->dock = gdl_dock_paned_dock;
- object_class->child_placement = gdl_dock_paned_child_placement;
-
- item_class->has_grip = FALSE;
- item_class->set_orientation = gdl_dock_paned_set_orientation;
-
- g_object_class_install_property (
- g_object_class, PROP_POSITION,
- g_param_spec_uint ("position", _("Position"),
- _("Position of the divider in pixels"),
- 0, G_MAXINT, 0,
- G_PARAM_READWRITE |
- GDL_DOCK_PARAM_EXPORT | GDL_DOCK_PARAM_AFTER));
-}
-
-static void
-gdl_dock_paned_init (GdlDockPaned *paned)
-{
- paned->position_changed = FALSE;
-}
-
-static void
-gdl_dock_paned_notify_cb (GObject *g_object,
- GParamSpec *pspec,
- gpointer user_data)
-{
- GdlDockPaned *paned;
-
- g_return_if_fail (user_data != NULL && GDL_IS_DOCK_PANED (user_data));
-
- /* chain the notification to the GdlDockPaned */
- g_object_notify (G_OBJECT (user_data), pspec->name);
-
- paned = GDL_DOCK_PANED (user_data);
-
- if (GDL_DOCK_ITEM_USER_ACTION (user_data) && !strcmp (pspec->name, "position"))
- paned->position_changed = TRUE;
-}
-
-static gboolean
-gdl_dock_paned_button_cb (GtkWidget *widget,
- GdkEventButton *event,
- gpointer user_data)
-{
- GdlDockPaned *paned;
-
- g_return_val_if_fail (user_data != NULL && GDL_IS_DOCK_PANED (user_data), FALSE);
-
- paned = GDL_DOCK_PANED (user_data);
- if (event->button == 1) {
- if (event->type == GDK_BUTTON_PRESS)
- GDL_DOCK_ITEM_SET_FLAGS (user_data, GDL_DOCK_USER_ACTION);
- else {
- GDL_DOCK_ITEM_UNSET_FLAGS (user_data, GDL_DOCK_USER_ACTION);
- if (paned->position_changed) {
- /* emit pending layout changed signal to track separator position */
- if (GDL_DOCK_OBJECT (paned)->master)
- g_signal_emit_by_name (GDL_DOCK_OBJECT (paned)->master, "layout-changed");
- paned->position_changed = FALSE;
- }
- }
- }
-
- return FALSE;
-}
-
-static void
-gdl_dock_paned_create_child (GdlDockPaned *paned,
- GtkOrientation orientation)
-{
- GdlDockItem *item;
-
- item = GDL_DOCK_ITEM (paned);
-
- if (item->child)
- gtk_widget_unparent (GTK_WIDGET (item->child));
-
- /* create the container paned */
- if (orientation == GTK_ORIENTATION_HORIZONTAL)
- item->child = gtk_hpaned_new ();
- else
- item->child = gtk_vpaned_new ();
-
- /* get notification for propagation */
- g_signal_connect (item->child, "notify::position",
- (GCallback) gdl_dock_paned_notify_cb, (gpointer) item);
- g_signal_connect (item->child, "button-press-event",
- (GCallback) gdl_dock_paned_button_cb, (gpointer) item);
- g_signal_connect (item->child, "button-release-event",
- (GCallback) gdl_dock_paned_button_cb, (gpointer) item);
-
- gtk_widget_set_parent (item->child, GTK_WIDGET (item));
- gtk_widget_show (item->child);
-}
-
-static GObject *
-gdl_dock_paned_constructor (GType type,
- guint n_construct_properties,
- GObjectConstructParam *construct_param)
-{
- GObject *g_object;
-
- g_object = G_OBJECT_CLASS (gdl_dock_paned_parent_class)-> constructor (type,
- n_construct_properties,
- construct_param);
- if (g_object) {
- GdlDockItem *item = GDL_DOCK_ITEM (g_object);
-
- if (!item->child)
- gdl_dock_paned_create_child (GDL_DOCK_PANED (g_object),
- item->orientation);
- /* otherwise, the orientation was set as a construction
- parameter and the child is already created */
- }
-
- return g_object;
-}
-
-static void
-gdl_dock_paned_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- GdlDockItem *item = GDL_DOCK_ITEM (object);
-
- switch (prop_id) {
- case PROP_POSITION:
- if (item->child && GTK_IS_PANED (item->child))
- gtk_paned_set_position (GTK_PANED (item->child),
- g_value_get_uint (value));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-gdl_dock_paned_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- GdlDockItem *item = GDL_DOCK_ITEM (object);
-
- switch (prop_id) {
- case PROP_POSITION:
- if (item->child && GTK_IS_PANED (item->child))
- g_value_set_uint (value,
- gtk_paned_get_position (GTK_PANED (item->child)));
- else
- g_value_set_uint (value, 0);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-gdl_dock_paned_destroy (GtkObject *object)
-{
- GdlDockItem *item = GDL_DOCK_ITEM (object);
-
- /* we need to call the virtual first, since in GdlDockDestroy our
- children dock objects are detached */
- GTK_OBJECT_CLASS (gdl_dock_paned_parent_class)->destroy (object);
-
- /* after that we can remove the GtkNotebook */
- if (item->child) {
- gtk_widget_unparent (item->child);
- item->child = NULL;
- };
-}
-
-static void
-gdl_dock_paned_add (GtkContainer *container,
- GtkWidget *widget)
-{
- GdlDockItem *item;
- GdlDockPlacement pos = GDL_DOCK_NONE;
- GtkPaned *paned;
- GtkWidget *child1, *child2;
-
- g_return_if_fail (container != NULL && widget != NULL);
- g_return_if_fail (GDL_IS_DOCK_PANED (container));
- g_return_if_fail (GDL_IS_DOCK_ITEM (widget));
-
- item = GDL_DOCK_ITEM (container);
- g_return_if_fail (item->child != NULL);
-
- paned = GTK_PANED (item->child);
- child1 = gtk_paned_get_child1 (paned);
- child2 = gtk_paned_get_child2 (paned);
- g_return_if_fail (!child1 || !child2);
-
- if (!child1)
- pos = item->orientation == GTK_ORIENTATION_HORIZONTAL ?
- GDL_DOCK_LEFT : GDL_DOCK_TOP;
- else if (!child2)
- pos = item->orientation == GTK_ORIENTATION_HORIZONTAL ?
- GDL_DOCK_RIGHT : GDL_DOCK_BOTTOM;
-
- if (pos != GDL_DOCK_NONE)
- gdl_dock_object_dock (GDL_DOCK_OBJECT (container),
- GDL_DOCK_OBJECT (widget),
- pos, NULL);
-}
-
-static void
-gdl_dock_paned_forall (GtkContainer *container,
- gboolean include_internals,
- GtkCallback callback,
- gpointer callback_data)
-{
- GdlDockItem *item;
-
- g_return_if_fail (container != NULL);
- g_return_if_fail (GDL_IS_DOCK_PANED (container));
- g_return_if_fail (callback != NULL);
-
- if (include_internals) {
- /* use GdlDockItem's forall */
- GTK_CONTAINER_CLASS (gdl_dock_paned_parent_class)->forall
- (container, include_internals, callback, callback_data);
- }
- else {
- item = GDL_DOCK_ITEM (container);
- if (item->child)
- gtk_container_foreach (GTK_CONTAINER (item->child), callback, callback_data);
- }
-}
-
-static GType
-gdl_dock_paned_child_type (GtkContainer *container)
-{
- GdlDockItem *item = GDL_DOCK_ITEM (container);
-
- if (gtk_container_child_type (GTK_CONTAINER (item->child)) == G_TYPE_NONE)
- return G_TYPE_NONE;
- else
- return GDL_TYPE_DOCK_ITEM;
-}
-
-static void
-gdl_dock_paned_request_foreach (GdlDockObject *object,
- gpointer user_data)
-{
- struct {
- gint x, y;
- GdlDockRequest *request;
- gboolean may_dock;
- } *data = user_data;
-
- GdlDockRequest my_request;
- gboolean may_dock;
-
- my_request = *data->request;
- may_dock = gdl_dock_object_dock_request (object, data->x, data->y, &my_request);
- if (may_dock) {
- data->may_dock = TRUE;
- *data->request = my_request;
- }
-}
-
-static gboolean
-gdl_dock_paned_dock_request (GdlDockObject *object,
- gint x,
- gint y,
- GdlDockRequest *request)
-{
- GdlDockItem *item;
- guint bw;
- gint rel_x, rel_y;
- GtkAllocation alloc;
- gboolean may_dock = FALSE;
- GdlDockRequest my_request;
-
- g_return_val_if_fail (GDL_IS_DOCK_ITEM (object), FALSE);
-
- /* we get (x,y) in our allocation coordinates system */
-
- item = GDL_DOCK_ITEM (object);
-
- /* Get item's allocation. */
- gtk_widget_get_allocation (GTK_WIDGET (object), &alloc);
- bw = gtk_container_get_border_width (GTK_CONTAINER (object));
-
- /* Get coordinates relative to our window. */
- rel_x = x - alloc.x;
- rel_y = y - alloc.y;
-
- if (request)
- my_request = *request;
-
- /* Check if coordinates are inside the widget. */
- if (rel_x > 0 && rel_x < alloc.width &&
- rel_y > 0 && rel_y < alloc.height) {
- GtkRequisition my, other;
- gint divider = -1;
-
- gdl_dock_item_preferred_size (GDL_DOCK_ITEM (my_request.applicant), &other);
- gdl_dock_item_preferred_size (GDL_DOCK_ITEM (object), &my);
-
- /* It's inside our area. */
- may_dock = TRUE;
-
- /* Set docking indicator rectangle to the widget size. */
- my_request.rect.x = bw;
- my_request.rect.y = bw;
- my_request.rect.width = alloc.width - 2*bw;
- my_request.rect.height = alloc.height - 2*bw;
-
- my_request.target = object;
-
- /* See if it's in the border_width band. */
- if (rel_x < (gint)bw) {
- my_request.position = GDL_DOCK_LEFT;
- my_request.rect.width *= SPLIT_RATIO;
- divider = other.width;
- } else if (rel_x > alloc.width - (gint)bw) {
- my_request.position = GDL_DOCK_RIGHT;
- my_request.rect.x += my_request.rect.width * (1 - SPLIT_RATIO);
- my_request.rect.width *= SPLIT_RATIO;
- divider = MAX (0, my.width - other.width);
- } else if (rel_y < (gint)bw) {
- my_request.position = GDL_DOCK_TOP;
- my_request.rect.height *= SPLIT_RATIO;
- divider = other.height;
- } else if (rel_y > alloc.height - (gint)bw) {
- my_request.position = GDL_DOCK_BOTTOM;
- my_request.rect.y += my_request.rect.height * (1 - SPLIT_RATIO);
- my_request.rect.height *= SPLIT_RATIO;
- divider = MAX (0, my.height - other.height);
-
- } else { /* Otherwise try our children. */
- struct {
- gint x, y;
- GdlDockRequest *request;
- gboolean may_dock;
- } data;
-
- /* give them coordinates in their allocation system... the
- GtkPaned has no window, so our children allocation
- coordinates are our window coordinates */
- data.x = rel_x;
- data.y = rel_y;
- data.request = &my_request;
- data.may_dock = FALSE;
-
- gtk_container_foreach (GTK_CONTAINER (object),
- (GtkCallback) gdl_dock_paned_request_foreach,
- &data);
-
- may_dock = data.may_dock;
- if (!may_dock) {
- /* the pointer is on the handle, so snap to top/bottom
- or left/right */
- may_dock = TRUE;
- if (item->orientation == GTK_ORIENTATION_HORIZONTAL) {
- if (rel_y < alloc.height / 2) {
- my_request.position = GDL_DOCK_TOP;
- my_request.rect.height *= SPLIT_RATIO;
- divider = other.height;
- } else {
- my_request.position = GDL_DOCK_BOTTOM;
- my_request.rect.y += my_request.rect.height * (1 - SPLIT_RATIO);
- my_request.rect.height *= SPLIT_RATIO;
- divider = MAX (0, my.height - other.height);
- }
- } else {
- if (rel_x < alloc.width / 2) {
- my_request.position = GDL_DOCK_LEFT;
- my_request.rect.width *= SPLIT_RATIO;
- divider = other.width;
- } else {
- my_request.position = GDL_DOCK_RIGHT;
- my_request.rect.x += my_request.rect.width * (1 - SPLIT_RATIO);
- my_request.rect.width *= SPLIT_RATIO;
- divider = MAX (0, my.width - other.width);
- }
- }
- }
- }
-
- if (divider >= 0 && my_request.position != GDL_DOCK_CENTER) {
- if (G_IS_VALUE (&my_request.extra))
- g_value_unset (&my_request.extra);
- g_value_init (&my_request.extra, G_TYPE_UINT);
- g_value_set_uint (&my_request.extra, (guint) divider);
- }
-
- if (may_dock) {
- /* adjust returned coordinates so they are relative to
- our allocation */
- my_request.rect.x += alloc.x;
- my_request.rect.y += alloc.y;
- }
- }
-
- if (may_dock && request)
- *request = my_request;
-
- return may_dock;
-}
-
-static void
-gdl_dock_paned_dock (GdlDockObject *object,
- GdlDockObject *requestor,
- GdlDockPlacement position,
- GValue *other_data)
-{
- GtkPaned *paned;
- GtkWidget *child1, *child2;
- gboolean done = FALSE;
- gboolean hresize = FALSE;
- gboolean wresize = FALSE;
- gint temp = 0;
-
- g_return_if_fail (GDL_IS_DOCK_PANED (object));
- g_return_if_fail (GDL_DOCK_ITEM (object)->child != NULL);
-
- paned = GTK_PANED (GDL_DOCK_ITEM (object)->child);
-
- if (GDL_IS_DOCK_ITEM (requestor)) {
- g_object_get (G_OBJECT (requestor), "preferred_height", &temp, NULL);
- if (temp == -2)
- hresize = TRUE;
- temp = 0;
- g_object_get (G_OBJECT (requestor), "preferred_width", &temp, NULL);
- if (temp == -2)
- wresize = TRUE;
- }
-
- child1 = gtk_paned_get_child1 (paned);
- child2 = gtk_paned_get_child2 (paned);
-
- /* see if we can dock the item in our paned */
- switch (GDL_DOCK_ITEM (object)->orientation) {
- case GTK_ORIENTATION_HORIZONTAL:
- if (!child1 && position == GDL_DOCK_LEFT) {
- gtk_paned_pack1 (paned, GTK_WIDGET (requestor), FALSE, FALSE);
- done = TRUE;
- } else if (!child2 && position == GDL_DOCK_RIGHT) {
- gtk_paned_pack2 (paned, GTK_WIDGET (requestor), TRUE, FALSE);
- done = TRUE;
- }
- break;
- case GTK_ORIENTATION_VERTICAL:
- if (!child1 && position == GDL_DOCK_TOP) {
- gtk_paned_pack1 (paned, GTK_WIDGET (requestor), hresize, FALSE);
- done = TRUE;
- } else if (!child2 && position == GDL_DOCK_BOTTOM) {
- gtk_paned_pack2 (paned, GTK_WIDGET (requestor), hresize, FALSE);
- done = TRUE;
- }
- break;
- default:
- break;
- }
-
- if (!done) {
- /* this will create another paned and reparent us there */
- GDL_DOCK_OBJECT_CLASS (gdl_dock_paned_parent_class)->dock (object, requestor, position,
- other_data);
- }
- else {
- gdl_dock_item_show_grip (GDL_DOCK_ITEM (requestor));
- gtk_widget_show (GTK_WIDGET (requestor));
- GDL_DOCK_OBJECT_SET_FLAGS (requestor, GDL_DOCK_ATTACHED);
- }
-}
-
-static void
-gdl_dock_paned_set_orientation (GdlDockItem *item,
- GtkOrientation orientation)
-{
- GtkPaned *old_paned = NULL, *new_paned;
- GtkWidget *child1, *child2;
-
- g_return_if_fail (GDL_IS_DOCK_PANED (item));
-
- if (item->child) {
- old_paned = GTK_PANED (item->child);
- g_object_ref (old_paned);
- gtk_widget_unparent (GTK_WIDGET (old_paned));
- item->child = NULL;
- }
-
- gdl_dock_paned_create_child (GDL_DOCK_PANED (item), orientation);
-
- if (old_paned) {
- new_paned = GTK_PANED (item->child);
- child1 = gtk_paned_get_child1 (old_paned);
- child2 = gtk_paned_get_child2 (old_paned);
-
- if (child1) {
- g_object_ref (child1);
- gtk_container_remove (GTK_CONTAINER (old_paned), child1);
- gtk_paned_pack1 (new_paned, child1, TRUE, FALSE);
- g_object_unref (child1);
- }
- if (child2) {
- g_object_ref (child2);
- gtk_container_remove (GTK_CONTAINER (old_paned), child2);
- gtk_paned_pack1 (new_paned, child2, TRUE, FALSE);
- g_object_unref (child2);
- }
- }
-
- GDL_DOCK_ITEM_CLASS (gdl_dock_paned_parent_class)->set_orientation (item, orientation);
-}
-
-static gboolean
-gdl_dock_paned_child_placement (GdlDockObject *object,
- GdlDockObject *child,
- GdlDockPlacement *placement)
-{
- GdlDockItem *item = GDL_DOCK_ITEM (object);
- GtkPaned *paned;
- GdlDockPlacement pos = GDL_DOCK_NONE;
-
- if (item->child) {
- paned = GTK_PANED (item->child);
- if (GTK_WIDGET (child) == gtk_paned_get_child1 (paned))
- pos = item->orientation == GTK_ORIENTATION_HORIZONTAL ?
- GDL_DOCK_LEFT : GDL_DOCK_TOP;
- else if (GTK_WIDGET (child) == gtk_paned_get_child2 (paned))
- pos = item->orientation == GTK_ORIENTATION_HORIZONTAL ?
- GDL_DOCK_RIGHT : GDL_DOCK_BOTTOM;
- }
-
- if (pos != GDL_DOCK_NONE) {
- if (placement)
- *placement = pos;
- return TRUE;
- }
- else
- return FALSE;
-}
-
-
-/* ----- Public interface ----- */
-
-GtkWidget *
-gdl_dock_paned_new (GtkOrientation orientation)
-{
- GdlDockPaned *paned;
-
- paned = GDL_DOCK_PANED (g_object_new (GDL_TYPE_DOCK_PANED,
- "orientation", orientation, NULL));
- GDL_DOCK_OBJECT_UNSET_FLAGS (paned, GDL_DOCK_AUTOMATIC);
-
- return GTK_WIDGET (paned);
-}
-
diff --git a/src/libgdl/gdl-dock-paned.h b/src/libgdl/gdl-dock-paned.h
deleted file mode 100644
index 2b4a40700..000000000
--- a/src/libgdl/gdl-dock-paned.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * gdl-dock-paned.h
- *
- * This file is part of the GNOME Devtools Libraries.
- *
- * Copyright (C) 2002 Gustavo Giráldez <gustavo.giraldez@gmx.net>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __GDL_DOCK_PANED_H__
-#define __GDL_DOCK_PANED_H__
-
-#include "libgdl/gdl-dock-item.h"
-
-G_BEGIN_DECLS
-
-/* standard macros */
-#define GDL_TYPE_DOCK_PANED (gdl_dock_paned_get_type ())
-#define GDL_DOCK_PANED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDL_TYPE_DOCK_PANED, GdlDockPaned))
-#define GDL_DOCK_PANED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDL_TYPE_DOCK_PANED, GdlDockPanedClass))
-#define GDL_IS_DOCK_PANED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDL_TYPE_DOCK_PANED))
-#define GDL_IS_DOCK_PANED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDL_TYPE_DOCK_PANED))
-#define GDL_DOCK_PANED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDL_TYE_DOCK_PANED, GdlDockPanedClass))
-
-/* data types & structures */
-typedef struct _GdlDockPaned GdlDockPaned;
-typedef struct _GdlDockPanedClass GdlDockPanedClass;
-
-struct _GdlDockPaned {
- GdlDockItem dock_item;
-
- gboolean position_changed;
-};
-
-struct _GdlDockPanedClass {
- GdlDockItemClass parent_class;
-};
-
-
-/* public interface */
-
-GType gdl_dock_paned_get_type (void);
-
-GtkWidget *gdl_dock_paned_new (GtkOrientation orientation);
-
-
-G_END_DECLS
-
-#endif /* __GDL_DOCK_PANED_H__ */
-
diff --git a/src/libgdl/gdl-dock-placeholder.c b/src/libgdl/gdl-dock-placeholder.c
deleted file mode 100644
index 8cde7a51d..000000000
--- a/src/libgdl/gdl-dock-placeholder.c
+++ /dev/null
@@ -1,827 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * gdl-dock-placeholder.c - Placeholders for docking items
- *
- * This file is part of the GNOME Devtools Libraries.
- *
- * Copyright (C) 2002 Gustavo Giráldez <gustavo.giraldez@gmx.net>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "gdl-i18n.h"
-
-#include "gdl-dock-placeholder.h"
-#include "gdl-dock-item.h"
-#include "gdl-dock-paned.h"
-#include "gdl-dock-master.h"
-#include "libgdltypebuiltins.h"
-
-
-#undef PLACEHOLDER_DEBUG
-
-/* ----- Private prototypes ----- */
-
-static void gdl_dock_placeholder_class_init (GdlDockPlaceholderClass *klass);
-
-static void gdl_dock_placeholder_set_property (GObject *g_object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gdl_dock_placeholder_get_property (GObject *g_object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
-
-static void gdl_dock_placeholder_destroy (GtkObject *object);
-
-static void gdl_dock_placeholder_add (GtkContainer *container,
- GtkWidget *widget);
-
-static void gdl_dock_placeholder_detach (GdlDockObject *object,
- gboolean recursive);
-static void gdl_dock_placeholder_reduce (GdlDockObject *object);
-static void gdl_dock_placeholder_dock (GdlDockObject *object,
- GdlDockObject *requestor,
- GdlDockPlacement position,
- GValue *other_data);
-
-static void gdl_dock_placeholder_weak_notify (gpointer data,
- GObject *old_object);
-
-static void disconnect_host (GdlDockPlaceholder *ph);
-static void connect_host (GdlDockPlaceholder *ph,
- GdlDockObject *new_host);
-static void do_excursion (GdlDockPlaceholder *ph);
-
-static void gdl_dock_placeholder_present (GdlDockObject *object,
- GdlDockObject *child);
-
-static void detach_cb (GdlDockObject *object,
- gboolean recursive,
- gpointer user_data);
-
-/* ----- Private variables and data structures ----- */
-
-enum {
- PROP_0,
- PROP_STICKY,
- PROP_HOST,
- PROP_NEXT_PLACEMENT,
- PROP_WIDTH,
- PROP_HEIGHT,
- PROP_FLOATING,
- PROP_FLOAT_X,
- PROP_FLOAT_Y
-};
-
-struct _GdlDockPlaceholderPrivate {
- /* current object this placeholder is pinned to */
- GdlDockObject *host;
- gboolean sticky;
-
- /* when the placeholder is moved up the hierarchy, this stack
- keeps track of the necessary dock positions needed to get the
- placeholder to the original position */
- GSList *placement_stack;
-
- /* Width and height of the attachments */
- gint width;
- gint height;
-
- /* connected signal handlers */
- guint host_detach_handler;
- guint host_dock_handler;
-
- /* Window Coordinates if Dock was floating */
- gboolean floating;
- gint floatx;
- gint floaty;
-};
-
-
-/* ----- Private interface ----- */
-
-G_DEFINE_TYPE (GdlDockPlaceholder, gdl_dock_placeholder, GDL_TYPE_DOCK_OBJECT);
-
-static void
-gdl_dock_placeholder_class_init (GdlDockPlaceholderClass *klass)
-{
- GObjectClass *g_object_class;
- GtkObjectClass *gtk_object_class;
- GtkContainerClass *container_class;
- GdlDockObjectClass *object_class;
-
- g_object_class = G_OBJECT_CLASS (klass);
- gtk_object_class = GTK_OBJECT_CLASS (klass);
- container_class = GTK_CONTAINER_CLASS (klass);
- object_class = GDL_DOCK_OBJECT_CLASS (klass);
-
- g_object_class->get_property = gdl_dock_placeholder_get_property;
- g_object_class->set_property = gdl_dock_placeholder_set_property;
-
- g_object_class_install_property (
- g_object_class, PROP_STICKY,
- g_param_spec_boolean ("sticky", _("Sticky"),
- _("Whether the placeholder will stick to its host or "
- "move up the hierarchy when the host is redocked"),
- FALSE,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-
- g_object_class_install_property (
- g_object_class, PROP_HOST,
- g_param_spec_object ("host", _("Host"),
- _("The dock object this placeholder is attached to"),
- GDL_TYPE_DOCK_OBJECT,
- G_PARAM_READWRITE));
-
- /* this will return the top of the placement stack */
- g_object_class_install_property (
- g_object_class, PROP_NEXT_PLACEMENT,
- g_param_spec_enum ("next-placement", _("Next placement"),
- _("The position an item will be docked to our host if a "
- "request is made to dock to us"),
- GDL_TYPE_DOCK_PLACEMENT,
- GDL_DOCK_CENTER,
- G_PARAM_READWRITE |
- GDL_DOCK_PARAM_EXPORT | GDL_DOCK_PARAM_AFTER));
-
- g_object_class_install_property (
- g_object_class, PROP_WIDTH,
- g_param_spec_int ("width", _("Width"),
- _("Width for the widget when it's attached to the placeholder"),
- -1, G_MAXINT, -1,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT |
- GDL_DOCK_PARAM_EXPORT));
-
- g_object_class_install_property (
- g_object_class, PROP_HEIGHT,
- g_param_spec_int ("height", _("Height"),
- _("Height for the widget when it's attached to the placeholder"),
- -1, G_MAXINT, -1,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT |
- GDL_DOCK_PARAM_EXPORT));
- g_object_class_install_property (
- g_object_class, PROP_FLOATING,
- g_param_spec_boolean ("floating", _("Floating Toplevel"),
- _("Whether the placeholder is standing in for a "
- "floating toplevel dock"),
- FALSE,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property (
- g_object_class, PROP_FLOAT_X,
- g_param_spec_int ("floatx", _("X Coordinate"),
- _("X coordinate for dock when floating"),
- -1, G_MAXINT, -1,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
- GDL_DOCK_PARAM_EXPORT));
- g_object_class_install_property (
- g_object_class, PROP_FLOAT_Y,
- g_param_spec_int ("floaty", _("Y Coordinate"),
- _("Y coordinate for dock when floating"),
- -1, G_MAXINT, -1,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
- GDL_DOCK_PARAM_EXPORT));
-
-
- gtk_object_class->destroy = gdl_dock_placeholder_destroy;
- container_class->add = gdl_dock_placeholder_add;
-
- object_class->is_compound = FALSE;
- object_class->detach = gdl_dock_placeholder_detach;
- object_class->reduce = gdl_dock_placeholder_reduce;
- object_class->dock = gdl_dock_placeholder_dock;
- object_class->present = gdl_dock_placeholder_present;
-}
-
-static void
-gdl_dock_placeholder_init (GdlDockPlaceholder *ph)
-{
- gtk_widget_set_has_window (GTK_WIDGET (ph), FALSE);
- gtk_widget_set_can_focus (GTK_WIDGET (ph), FALSE);
-
- ph->_priv = g_new0 (GdlDockPlaceholderPrivate, 1);
-}
-
-static void
-gdl_dock_placeholder_set_property (GObject *g_object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- GdlDockPlaceholder *ph = GDL_DOCK_PLACEHOLDER (g_object);
-
- switch (prop_id) {
- case PROP_STICKY:
- if (ph->_priv)
- ph->_priv->sticky = g_value_get_boolean (value);
- break;
- case PROP_HOST:
- gdl_dock_placeholder_attach (ph, g_value_get_object (value));
- break;
- case PROP_NEXT_PLACEMENT:
- if (ph->_priv) {
- ph->_priv->placement_stack =
- g_slist_prepend (ph->_priv->placement_stack,
- GINT_TO_POINTER (g_value_get_enum (value)));
- }
- break;
- case PROP_WIDTH:
- ph->_priv->width = g_value_get_int (value);
- break;
- case PROP_HEIGHT:
- ph->_priv->height = g_value_get_int (value);
- break;
- case PROP_FLOATING:
- ph->_priv->floating = g_value_get_boolean (value);
- break;
- case PROP_FLOAT_X:
- ph->_priv->floatx = g_value_get_int (value);
- break;
- case PROP_FLOAT_Y:
- ph->_priv->floaty = g_value_get_int (value);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (g_object, prop_id, pspec);
- break;
- }
-}
-
-static void
-gdl_dock_placeholder_get_property (GObject *g_object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- GdlDockPlaceholder *ph = GDL_DOCK_PLACEHOLDER (g_object);
-
- switch (prop_id) {
- case PROP_STICKY:
- if (ph->_priv)
- g_value_set_boolean (value, ph->_priv->sticky);
- else
- g_value_set_boolean (value, FALSE);
- break;
- case PROP_HOST:
- if (ph->_priv)
- g_value_set_object (value, ph->_priv->host);
- else
- g_value_set_object (value, NULL);
- break;
- case PROP_NEXT_PLACEMENT:
- if (ph->_priv && ph->_priv->placement_stack)
- g_value_set_enum (value, (GdlDockPlacement) ph->_priv->placement_stack->data);
- else
- g_value_set_enum (value, GDL_DOCK_CENTER);
- break;
- case PROP_WIDTH:
- g_value_set_int (value, ph->_priv->width);
- break;
- case PROP_HEIGHT:
- g_value_set_int (value, ph->_priv->height);
- break;
- case PROP_FLOATING:
- g_value_set_boolean (value, ph->_priv->floating);
- break;
- case PROP_FLOAT_X:
- g_value_set_int (value, ph->_priv->floatx);
- break;
- case PROP_FLOAT_Y:
- g_value_set_int (value, ph->_priv->floaty);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (g_object, prop_id, pspec);
- break;
- }
-}
-
-static void
-gdl_dock_placeholder_destroy (GtkObject *object)
-{
- GdlDockPlaceholder *ph = GDL_DOCK_PLACEHOLDER (object);
-
- if (ph->_priv) {
- if (ph->_priv->host)
- gdl_dock_placeholder_detach (GDL_DOCK_OBJECT (object), FALSE);
- g_free (ph->_priv);
- ph->_priv = NULL;
- }
-
- GTK_OBJECT_CLASS (gdl_dock_placeholder_parent_class)->destroy (object);
-}
-
-static void
-gdl_dock_placeholder_add (GtkContainer *container,
- GtkWidget *widget)
-{
- GdlDockPlaceholder *ph;
- GdlDockPlacement pos = GDL_DOCK_CENTER; /* default position */
-
- g_return_if_fail (GDL_IS_DOCK_PLACEHOLDER (container));
- g_return_if_fail (GDL_IS_DOCK_ITEM (widget));
-
- ph = GDL_DOCK_PLACEHOLDER (container);
- if (ph->_priv->placement_stack)
- pos = (GdlDockPlacement) ph->_priv->placement_stack->data;
-
- gdl_dock_object_dock (GDL_DOCK_OBJECT (ph), GDL_DOCK_OBJECT (widget),
- pos, NULL);
-}
-
-static void
-gdl_dock_placeholder_detach (GdlDockObject *object,
- gboolean recursive)
-{
- GdlDockPlaceholder *ph = GDL_DOCK_PLACEHOLDER (object);
-
- /* disconnect handlers */
- disconnect_host (ph);
-
- /* free the placement stack */
- g_slist_free (ph->_priv->placement_stack);
- ph->_priv->placement_stack = NULL;
-
- GDL_DOCK_OBJECT_UNSET_FLAGS (object, GDL_DOCK_ATTACHED);
-}
-
-static void
-gdl_dock_placeholder_reduce (GdlDockObject *object)
-{
- /* placeholders are not reduced */
- return;
-}
-
-static void
-find_biggest_dock_item (GtkContainer *container, GtkWidget **biggest_child,
- gint *biggest_child_area)
-{
- GList *children, *child;
- GtkAllocation allocation;
-
- children = gtk_container_get_children (GTK_CONTAINER (container));
- child = children;
- while (child) {
- gint area;
- GtkWidget *child_widget;
-
- child_widget = GTK_WIDGET (child->data);
-
- if (gdl_dock_object_is_compound (GDL_DOCK_OBJECT(child_widget))) {
- find_biggest_dock_item (GTK_CONTAINER (child_widget),
- biggest_child, biggest_child_area);
- child = g_list_next (child);
- continue;
- }
- gtk_widget_get_allocation (child_widget, &allocation);
- area = allocation.width * allocation.height;
-
- if (area > *biggest_child_area) {
- *biggest_child_area = area;
- *biggest_child = child_widget;
- }
- child = g_list_next (child);
- }
-}
-
-static void
-attempt_to_dock_on_host (GdlDockPlaceholder *ph, GdlDockObject *host,
- GdlDockObject *requestor, GdlDockPlacement placement,
- gpointer other_data)
-{
- GdlDockObject *parent;
- GtkAllocation allocation;
- gint host_width;
- gint host_height;
-
- gtk_widget_get_allocation (GTK_WIDGET (host), &allocation);
- host_width = allocation.width;
- host_height = allocation.height;
-
- if (placement != GDL_DOCK_CENTER || !GDL_IS_DOCK_PANED (host)) {
- /* we simply act as a proxy for our host */
- gdl_dock_object_dock (host, requestor,
- placement, other_data);
- } else {
- /* If the requested pos is center, we have to make sure that it
- * does not colapses existing paned items. Find the larget item
- * which is not a paned item to dock to.
- */
- GtkWidget *biggest_child = NULL;
- gint biggest_child_area = 0;
-
- find_biggest_dock_item (GTK_CONTAINER (host), &biggest_child,
- &biggest_child_area);
-
- if (biggest_child) {
- /* we simply act as a proxy for our host */
- gdl_dock_object_dock (GDL_DOCK_OBJECT (biggest_child), requestor,
- placement, other_data);
- } else {
- g_warning ("No suitable child found! Should not be here!");
- /* we simply act as a proxy for our host */
- gdl_dock_object_dock (GDL_DOCK_OBJECT (host), requestor,
- placement, other_data);
- }
- }
-
- parent = gdl_dock_object_get_parent_object (requestor);
-
- /* Restore dock item's dimention */
- switch (placement) {
- case GDL_DOCK_LEFT:
- if (ph->_priv->width > 0) {
- g_object_set (G_OBJECT (parent), "position",
- ph->_priv->width, NULL);
- }
- break;
- case GDL_DOCK_RIGHT:
- if (ph->_priv->width > 0) {
- gint complementary_width = host_width - ph->_priv->width;
-
- if (complementary_width > 0)
- g_object_set (G_OBJECT (parent), "position",
- complementary_width, NULL);
- }
- break;
- case GDL_DOCK_TOP:
- if (ph->_priv->height > 0) {
- g_object_set (G_OBJECT (parent), "position",
- ph->_priv->height, NULL);
- }
- break;
- case GDL_DOCK_BOTTOM:
- if (ph->_priv->height > 0) {
- gint complementary_height = host_height - ph->_priv->height;
-
- if (complementary_height > 0)
- g_object_set (G_OBJECT (parent), "position",
- complementary_height, NULL);
- }
- break;
- default:
- /* nothing */
- break;
- }
-}
-
-static void
-gdl_dock_placeholder_dock (GdlDockObject *object,
- GdlDockObject *requestor,
- GdlDockPlacement position,
- GValue *other_data)
-{
- GdlDockPlaceholder *ph = GDL_DOCK_PLACEHOLDER (object);
-
- if (ph->_priv->host) {
- attempt_to_dock_on_host (ph, ph->_priv->host, requestor,
- position, other_data);
- }
- else {
- GdlDockObject *toplevel;
-
- if (!gdl_dock_object_is_bound (GDL_DOCK_OBJECT (ph))) {
- g_warning ("%s", _("Attempt to dock a dock object to an unbound placeholder"));
- return;
- }
-
- /* dock the item as a floating of the controller */
- toplevel = gdl_dock_master_get_controller (GDL_DOCK_OBJECT_GET_MASTER (ph));
- gdl_dock_object_dock (toplevel, requestor,
- GDL_DOCK_FLOATING, NULL);
- }
-}
-
-#ifdef PLACEHOLDER_DEBUG
-static void
-print_placement_stack (GdlDockPlaceholder *ph)
-{
- GSList *s = ph->_priv->placement_stack;
- GEnumClass *enum_class = G_ENUM_CLASS (g_type_class_ref (GDL_TYPE_DOCK_PLACEMENT));
- GEnumValue *enum_value;
- gchar *name;
- GString *message;
-
- message = g_string_new (NULL);
- g_string_printf (message, "[%p] host: %p (%s), stack: ",
- ph, ph->_priv->host, G_OBJECT_TYPE_NAME (ph->_priv->host));
- for (; s; s = s->next) {
- enum_value = g_enum_get_value (enum_class, (GdlDockPlacement) s->data);
- name = enum_value ? enum_value->value_name : NULL;
- g_string_append_printf (message, "%s, ", name);
- }
- g_message ("%s", message->str);
-
- g_string_free (message, TRUE);
- g_type_class_unref (enum_class);
-}
-#endif
-
-static void
-gdl_dock_placeholder_present (GdlDockObject *object,
- GdlDockObject *child)
-{
- /* do nothing */
- return;
-}
-
-/* ----- Public interface ----- */
-
-GtkWidget *
-gdl_dock_placeholder_new (const gchar *name,
- GdlDockObject *object,
- GdlDockPlacement position,
- gboolean sticky)
-{
- GdlDockPlaceholder *ph;
-
- ph = GDL_DOCK_PLACEHOLDER (g_object_new (GDL_TYPE_DOCK_PLACEHOLDER,
- "name", name,
- "sticky", sticky,
- "next-placement", position,
- "host", object,
- NULL));
- GDL_DOCK_OBJECT_UNSET_FLAGS (ph, GDL_DOCK_AUTOMATIC);
-
- return GTK_WIDGET (ph);
-}
-
-static void
-gdl_dock_placeholder_weak_notify (gpointer data,
- GObject *old_object)
-{
- GdlDockPlaceholder *ph;
-
- g_return_if_fail (data != NULL && GDL_IS_DOCK_PLACEHOLDER (data));
-
- ph = GDL_DOCK_PLACEHOLDER (data);
-
-#ifdef PLACEHOLDER_DEBUG
- g_message ("The placeholder just lost its host, ph = %p", ph);
-#endif
-
- /* we shouldn't get here, so perform an emergency detach. instead
- we should have gotten a detach signal from our host */
- ph->_priv->host = NULL;
-
- /* We didn't get a detach signal from the host. Detach from the
- supposedly dead host (consequently attaching to the controller) */
-
- detach_cb (NULL, TRUE, data);
-#if 0
- /* free the placement stack */
- g_slist_free (ph->_priv->placement_stack);
- ph->_priv->placement_stack = NULL;
- GDL_DOCK_OBJECT_UNSET_FLAGS (ph, GDL_DOCK_ATTACHED);
-#endif
-}
-
-static void
-detach_cb (GdlDockObject *object,
- gboolean recursive,
- gpointer user_data)
-{
- GdlDockPlaceholder *ph;
- GdlDockObject *new_host, *obj;
-
- g_return_if_fail (user_data != NULL && GDL_IS_DOCK_PLACEHOLDER (user_data));
-
- /* we go up in the hierarchy and we store the hinted placement in
- * the placement stack so we can rebuild the docking layout later
- * when we get the host's dock signal. */
-
- ph = GDL_DOCK_PLACEHOLDER (user_data);
- obj = ph->_priv->host;
- if (obj != object) {
- g_warning (_("Got a detach signal from an object (%p) who is not "
- "our host %p"), object, ph->_priv->host);
- return;
- }
-
- /* skip sticky objects */
- if (ph->_priv->sticky)
- return;
-
- if (obj)
- /* go up in the hierarchy */
- new_host = gdl_dock_object_get_parent_object (obj);
- else
- /* Detaching from the dead host */
- new_host = NULL;
-
- while (new_host) {
- GdlDockPlacement pos = GDL_DOCK_NONE;
-
- /* get placement hint from the new host */
- if (gdl_dock_object_child_placement (new_host, obj, &pos)) {
- ph->_priv->placement_stack = g_slist_prepend (
- ph->_priv->placement_stack, (gpointer) pos);
- }
- else {
- g_warning (_("Something weird happened while getting the child "
- "placement for %p from parent %p"), obj, new_host);
- }
-
- if (!GDL_DOCK_OBJECT_IN_DETACH (new_host))
- /* we found a "stable" dock object */
- break;
-
- obj = new_host;
- new_host = gdl_dock_object_get_parent_object (obj);
- }
-
- /* disconnect host */
- disconnect_host (ph);
-
- if (!new_host) {
-#ifdef PLACEHOLDER_DEBUG
- g_message ("Detaching from the toplevel. Assignaing to controller");
-#endif
- /* the toplevel was detached: we attach ourselves to the
- controller with an initial placement of floating */
- new_host = gdl_dock_master_get_controller (GDL_DOCK_OBJECT_GET_MASTER (ph));
-
- /*
- ph->_priv->placement_stack = g_slist_prepend (
- ph->_priv->placement_stack, (gpointer) GDL_DOCK_FLOATING);
- */
- }
- if (new_host)
- connect_host (ph, new_host);
-
-#ifdef PLACEHOLDER_DEBUG
- print_placement_stack (ph);
-#endif
-}
-
-/**
- * do_excursion:
- * @ph: placeholder object
- *
- * Tries to shrink the placement stack by examining the host's
- * children and see if any of them matches the placement which is at
- * the top of the stack. If this is the case, it tries again with the
- * new host.
- **/
-static void
-do_excursion (GdlDockPlaceholder *ph)
-{
- if (ph->_priv->host &&
- !ph->_priv->sticky &&
- ph->_priv->placement_stack &&
- gdl_dock_object_is_compound (ph->_priv->host)) {
-
- GdlDockPlacement pos, stack_pos =
- (GdlDockPlacement) ph->_priv->placement_stack->data;
- GList *children, *l;
- GdlDockObject *host = ph->_priv->host;
-
- children = gtk_container_get_children (GTK_CONTAINER (host));
- for (l = children; l; l = l->next) {
- pos = stack_pos;
- gdl_dock_object_child_placement (GDL_DOCK_OBJECT (host),
- GDL_DOCK_OBJECT (l->data),
- &pos);
- if (pos == stack_pos) {
- /* remove the stack position */
- ph->_priv->placement_stack =
- g_slist_remove_link (ph->_priv->placement_stack,
- ph->_priv->placement_stack);
-
- /* connect to the new host */
- disconnect_host (ph);
- connect_host (ph, GDL_DOCK_OBJECT (l->data));
-
- /* recurse... */
- if (!GDL_DOCK_OBJECT_IN_REFLOW (l->data))
- do_excursion (ph);
-
- break;
- }
- }
- g_list_free (children);
- }
-}
-
-static void
-dock_cb (GdlDockObject *object,
- GdlDockObject *requestor,
- GdlDockPlacement position,
- GValue *other_data,
- gpointer user_data)
-{
- GdlDockPlacement pos = GDL_DOCK_NONE;
- GdlDockPlaceholder *ph;
-
- g_return_if_fail (user_data != NULL && GDL_IS_DOCK_PLACEHOLDER (user_data));
- ph = GDL_DOCK_PLACEHOLDER (user_data);
- g_return_if_fail (ph->_priv->host == object);
-
- /* see if the given position is compatible for the stack's top
- element */
- if (!ph->_priv->sticky && ph->_priv->placement_stack) {
- pos = (GdlDockPlacement) ph->_priv->placement_stack->data;
- if (gdl_dock_object_child_placement (object, requestor, &pos)) {
- if (pos == (GdlDockPlacement) ph->_priv->placement_stack->data) {
- /* the position is compatible: excurse down */
- do_excursion (ph);
- }
- }
- }
-#ifdef PLACEHOLDER_DEBUG
- print_placement_stack (ph);
-#endif
-}
-
-static void
-disconnect_host (GdlDockPlaceholder *ph)
-{
- if (!ph->_priv->host)
- return;
-
- if (ph->_priv->host_detach_handler)
- g_signal_handler_disconnect (ph->_priv->host, ph->_priv->host_detach_handler);
- if (ph->_priv->host_dock_handler)
- g_signal_handler_disconnect (ph->_priv->host, ph->_priv->host_dock_handler);
- ph->_priv->host_detach_handler = 0;
- ph->_priv->host_dock_handler = 0;
-
- /* remove weak ref to object */
- g_object_weak_unref (G_OBJECT (ph->_priv->host),
- gdl_dock_placeholder_weak_notify, ph);
- ph->_priv->host = NULL;
-
-#ifdef PLACEHOLDER_DEBUG
- g_message ("Host just disconnected!, ph = %p", ph);
-#endif
-}
-
-static void
-connect_host (GdlDockPlaceholder *ph,
- GdlDockObject *new_host)
-{
- if (ph->_priv->host)
- disconnect_host (ph);
-
- ph->_priv->host = new_host;
- g_object_weak_ref (G_OBJECT (ph->_priv->host),
- gdl_dock_placeholder_weak_notify, ph);
-
- ph->_priv->host_detach_handler =
- g_signal_connect (ph->_priv->host,
- "detach",
- (GCallback) detach_cb,
- (gpointer) ph);
-
- ph->_priv->host_dock_handler =
- g_signal_connect (ph->_priv->host,
- "dock",
- (GCallback) dock_cb,
- (gpointer) ph);
-
-#ifdef PLACEHOLDER_DEBUG
- g_message ("Host just connected!, ph = %p", ph);
-#endif
-}
-
-void
-gdl_dock_placeholder_attach (GdlDockPlaceholder *ph,
- GdlDockObject *object)
-{
- g_return_if_fail (ph != NULL && GDL_IS_DOCK_PLACEHOLDER (ph));
- g_return_if_fail (ph->_priv != NULL);
- g_return_if_fail (object != NULL);
-
- /* object binding */
- if (!gdl_dock_object_is_bound (GDL_DOCK_OBJECT (ph)))
- gdl_dock_object_bind (GDL_DOCK_OBJECT (ph), object->master);
-
- g_return_if_fail (GDL_DOCK_OBJECT (ph)->master == object->master);
-
- gdl_dock_object_freeze (GDL_DOCK_OBJECT (ph));
-
- /* detach from previous host first */
- if (ph->_priv->host)
- gdl_dock_object_detach (GDL_DOCK_OBJECT (ph), FALSE);
-
- connect_host (ph, object);
-
- GDL_DOCK_OBJECT_SET_FLAGS (ph, GDL_DOCK_ATTACHED);
-
- gdl_dock_object_thaw (GDL_DOCK_OBJECT (ph));
-}
diff --git a/src/libgdl/gdl-dock-placeholder.h b/src/libgdl/gdl-dock-placeholder.h
deleted file mode 100644
index c7e57e204..000000000
--- a/src/libgdl/gdl-dock-placeholder.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * gdl-dock-placeholder.h - Placeholders for docking items
- *
- * This file is part of the GNOME Devtools Libraries.
- *
- * Copyright (C) 2002 Gustavo Giráldez <gustavo.giraldez@gmx.net>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __GDL_DOCK_PLACEHOLDER_H__
-#define __GDL_DOCK_PLACEHOLDER_H__
-
-#include "libgdl/gdl-dock-object.h"
-
-G_BEGIN_DECLS
-
-/* standard macros */
-#define GDL_TYPE_DOCK_PLACEHOLDER (gdl_dock_placeholder_get_type ())
-#define GDL_DOCK_PLACEHOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDL_TYPE_DOCK_PLACEHOLDER, GdlDockPlaceholder))
-#define GDL_DOCK_PLACEHOLDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDL_TYPE_DOCK_PLACEHOLDER, GdlDockPlaceholderClass))
-#define GDL_IS_DOCK_PLACEHOLDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDL_TYPE_DOCK_PLACEHOLDER))
-#define GDL_IS_DOCK_PLACEHOLDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDL_TYPE_DOCK_PLACEHOLDER))
-#define GDL_DOCK_PLACEHOLDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_DOCK_PLACEHOLDER, GdlDockPlaceholderClass))
-
-/* data types & structures */
-typedef struct _GdlDockPlaceholder GdlDockPlaceholder;
-typedef struct _GdlDockPlaceholderClass GdlDockPlaceholderClass;
-typedef struct _GdlDockPlaceholderPrivate GdlDockPlaceholderPrivate;
-
-struct _GdlDockPlaceholder {
- GdlDockObject object;
-
- GdlDockPlaceholderPrivate *_priv;
-};
-
-struct _GdlDockPlaceholderClass {
- GdlDockObjectClass parent_class;
-};
-
-/* public interface */
-
-GType gdl_dock_placeholder_get_type (void);
-
-GtkWidget *gdl_dock_placeholder_new (const gchar *name,
- GdlDockObject *object,
- GdlDockPlacement position,
- gboolean sticky);
-
-void gdl_dock_placeholder_attach (GdlDockPlaceholder *ph,
- GdlDockObject *object);
-
-
-G_END_DECLS
-
-#endif /* __GDL_DOCK_PLACEHOLDER_H__ */
diff --git a/src/libgdl/gdl-dock-tablabel.c b/src/libgdl/gdl-dock-tablabel.c
deleted file mode 100644
index 441db3438..000000000
--- a/src/libgdl/gdl-dock-tablabel.c
+++ /dev/null
@@ -1,632 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * gdl-dock-tablabel.c
- *
- * This file is part of the GNOME Devtools Libraries.
- *
- * Copyright (C) 2002 Gustavo Giráldez <gustavo.giraldez@gmx.net>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "gdl-i18n.h"
-#include <gtk/gtk.h>
-
-#include "gdl-dock-tablabel.h"
-#include "gdl-dock-item.h"
-#include "libgdlmarshal.h"
-
-
-/* ----- Private prototypes ----- */
-
-static void gdl_dock_tablabel_class_init (GdlDockTablabelClass *klass);
-
-static void gdl_dock_tablabel_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gdl_dock_tablabel_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
-
-static void gdl_dock_tablabel_item_notify (GObject *master,
- GParamSpec *pspec,
- gpointer data);
-
-static void gdl_dock_tablabel_size_request (GtkWidget *widget,
- GtkRequisition *requisition);
-static void gdl_dock_tablabel_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation);
-
-static void gdl_dock_tablabel_paint (GtkWidget *widget,
- GdkEventExpose *event);
-static gint gdl_dock_tablabel_expose (GtkWidget *widget,
- GdkEventExpose *event);
-
-static gboolean gdl_dock_tablabel_button_event (GtkWidget *widget,
- GdkEventButton *event);
-static gboolean gdl_dock_tablabel_motion_event (GtkWidget *widget,
- GdkEventMotion *event);
-
-static void gdl_dock_tablabel_realize (GtkWidget *widget);
-static void gdl_dock_tablabel_unrealize (GtkWidget *widget);
-static void gdl_dock_tablabel_map (GtkWidget *widget);
-static void gdl_dock_tablabel_unmap (GtkWidget *widget);
-
-/* ----- Private data types and variables ----- */
-
-#define DEFAULT_DRAG_HANDLE_SIZE 10
-#define HANDLE_RATIO 1.0
-
-enum {
- BUTTON_PRESSED_HANDLE,
- LAST_SIGNAL
-};
-
-enum {
- PROP_0,
- PROP_ITEM
-};
-
-
-static guint dock_tablabel_signals [LAST_SIGNAL] = { 0 };
-
-
-/* ----- Private interface ----- */
-
-G_DEFINE_TYPE (GdlDockTablabel, gdl_dock_tablabel, GTK_TYPE_BIN);
-
-static void
-gdl_dock_tablabel_class_init (GdlDockTablabelClass *klass)
-{
- GObjectClass *g_object_class;
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
-
- g_object_class = G_OBJECT_CLASS (klass);
- object_class = GTK_OBJECT_CLASS (klass);
- widget_class = GTK_WIDGET_CLASS (klass);
- container_class = GTK_CONTAINER_CLASS (klass);
-
- g_object_class->set_property = gdl_dock_tablabel_set_property;
- g_object_class->get_property = gdl_dock_tablabel_get_property;
-
- widget_class->size_request = gdl_dock_tablabel_size_request;
- widget_class->size_allocate = gdl_dock_tablabel_size_allocate;
- widget_class->expose_event = gdl_dock_tablabel_expose;
- widget_class->button_press_event = gdl_dock_tablabel_button_event;
- widget_class->button_release_event = gdl_dock_tablabel_button_event;
- widget_class->motion_notify_event = gdl_dock_tablabel_motion_event;
- widget_class->realize = gdl_dock_tablabel_realize;
- widget_class->unrealize = gdl_dock_tablabel_unrealize;
- widget_class->map = gdl_dock_tablabel_map;
- widget_class->unmap = gdl_dock_tablabel_unmap;
-
- g_object_class_install_property (
- g_object_class, PROP_ITEM,
- g_param_spec_object ("item", _("Controlling dock item"),
- _("Dockitem which 'owns' this tablabel"),
- GDL_TYPE_DOCK_ITEM,
- G_PARAM_READWRITE));
-
- dock_tablabel_signals [BUTTON_PRESSED_HANDLE] =
- g_signal_new ("button_pressed_handle",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GdlDockTablabelClass,
- button_pressed_handle),
- NULL, NULL,
- gdl_marshal_VOID__BOXED,
- G_TYPE_NONE,
- 1,
- GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
-
- klass->button_pressed_handle = NULL;
-}
-
-static void
-gdl_dock_tablabel_init (GdlDockTablabel *tablabel)
-{
- GtkWidget *widget;
- GtkWidget *label_widget;
-
- widget = GTK_WIDGET (tablabel);
-
- tablabel->drag_handle_size = DEFAULT_DRAG_HANDLE_SIZE;
- tablabel->item = NULL;
-
- label_widget = gtk_label_new ("Dock item");
- gtk_container_add (GTK_CONTAINER (tablabel), label_widget);
- gtk_widget_show (label_widget);
-
- tablabel->active = FALSE;
- gtk_widget_set_state (GTK_WIDGET (tablabel), GTK_STATE_ACTIVE);
-}
-
-static void
-gdl_dock_tablabel_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- GdlDockTablabel *tablabel;
- GtkBin *bin;
-
- tablabel = GDL_DOCK_TABLABEL (object);
-
- switch (prop_id) {
- case PROP_ITEM:
- if (tablabel->item) {
- g_object_remove_weak_pointer (G_OBJECT (tablabel->item),
- (gpointer *) &tablabel->item);
- g_signal_handlers_disconnect_by_func (
- tablabel->item, gdl_dock_tablabel_item_notify, tablabel);
- };
-
- tablabel->item = g_value_get_object (value);
- if (tablabel->item) {
- gboolean locked;
- gchar *long_name;
-
- g_object_add_weak_pointer (G_OBJECT (tablabel->item),
- (gpointer *) &tablabel->item);
-
- g_signal_connect (tablabel->item, "notify::locked",
- G_CALLBACK (gdl_dock_tablabel_item_notify),
- tablabel);
- g_signal_connect (tablabel->item, "notify::long_name",
- G_CALLBACK (gdl_dock_tablabel_item_notify),
- tablabel);
- g_signal_connect (tablabel->item, "notify::grip_size",
- G_CALLBACK (gdl_dock_tablabel_item_notify),
- tablabel);
-
- g_object_get (tablabel->item,
- "locked", &locked,
- "long-name", &long_name,
- "grip-size", &tablabel->drag_handle_size,
- NULL);
-
- if (locked)
- tablabel->drag_handle_size = 0;
-
- bin = GTK_BIN (tablabel);
- if (gtk_bin_get_child (bin) && g_object_class_find_property (
- G_OBJECT_GET_CLASS (gtk_bin_get_child (bin)), "label"))
- g_object_set (gtk_bin_get_child (bin), "label", long_name, NULL);
- g_free (long_name);
- };
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-gdl_dock_tablabel_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- GdlDockTablabel *tablabel;
-
- tablabel = GDL_DOCK_TABLABEL (object);
-
- switch (prop_id) {
- case PROP_ITEM:
- g_value_set_object (value, tablabel->item);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-gdl_dock_tablabel_item_notify (GObject *master,
- GParamSpec *pspec,
- gpointer data)
-{
- GdlDockTablabel *tablabel = GDL_DOCK_TABLABEL (data);
- gboolean locked;
- gchar *label;
- GtkBin *bin;
-
- g_object_get (master,
- "locked", &locked,
- "grip-size", &tablabel->drag_handle_size,
- "long-name", &label,
- NULL);
-
- if (locked)
- tablabel->drag_handle_size = 0;
-
- bin = GTK_BIN (tablabel);
- if (gtk_bin_get_child (bin) && g_object_class_find_property (
- G_OBJECT_GET_CLASS (gtk_bin_get_child (bin)), "label"))
- g_object_set (gtk_bin_get_child (bin), "label", label, NULL);
- g_free (label);
-
- gtk_widget_queue_resize (GTK_WIDGET (tablabel));
-}
-
-static void
-gdl_dock_tablabel_size_request (GtkWidget *widget,
- GtkRequisition *requisition)
-{
- GtkBin *bin;
- GtkRequisition child_req;
- GdlDockTablabel *tablabel;
- guint border_width;
-
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GDL_IS_DOCK_TABLABEL (widget));
- g_return_if_fail (requisition != NULL);
-
- tablabel = GDL_DOCK_TABLABEL (widget);
- bin = GTK_BIN (widget);
-
- requisition->width = tablabel->drag_handle_size;
- requisition->height = 0;
-
- if (gtk_bin_get_child (bin))
- gtk_widget_size_request (gtk_bin_get_child (bin), &child_req);
- else
- child_req.width = child_req.height = 0;
-
- requisition->width += child_req.width;
- requisition->height += child_req.height;
-
- border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
-
- requisition->width += border_width * 2;
- requisition->height += border_width * 2;
-
- //gtk_widget_size_request (widget, requisition);
-}
-
-static void
-gdl_dock_tablabel_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation)
-{
- GtkBin *bin;
- GtkAllocation widget_allocation;
- GdlDockTablabel *tablabel;
- gint border_width;
-
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GDL_IS_DOCK_TABLABEL (widget));
- g_return_if_fail (allocation != NULL);
-
- bin = GTK_BIN (widget);
- tablabel = GDL_DOCK_TABLABEL (widget);
-
- border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
-
- gtk_widget_set_allocation (widget, allocation);
-
- if (gtk_widget_get_realized (widget))
- gdk_window_move_resize (tablabel->event_window,
- allocation->x,
- allocation->y,
- allocation->width,
- allocation->height);
-
- if (gtk_bin_get_child (bin) && gtk_widget_get_visible (gtk_bin_get_child (bin))) {
- GtkAllocation child_allocation;
-
- gtk_widget_get_allocation (widget, &widget_allocation);
- child_allocation.x = widget_allocation.x + border_width;
- child_allocation.y = widget_allocation.y + border_width;
-
- allocation->width = MAX (1, (int) allocation->width -
- (int) tablabel->drag_handle_size);
- child_allocation.x += tablabel->drag_handle_size;
-
- child_allocation.width =
- MAX (1, (int) allocation->width - 2 * border_width);
- child_allocation.height =
- MAX (1, (int) allocation->height - 2 * border_width);
-
- gtk_widget_size_allocate (gtk_bin_get_child (bin), &child_allocation);
- }
-}
-
-static void
-gdl_dock_tablabel_paint (GtkWidget *widget,
- GdkEventExpose *event)
-{
- GdkRectangle dest, rect;
- GtkBin *bin;
- GtkAllocation widget_allocation;
- GdlDockTablabel *tablabel;
- gint border_width;
-
- bin = GTK_BIN (widget);
- tablabel = GDL_DOCK_TABLABEL (widget);
- border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
-
- gtk_widget_get_allocation (widget, &widget_allocation);
- rect.x = widget_allocation.x + border_width;
- rect.y = widget_allocation.y + border_width;
- rect.width = tablabel->drag_handle_size * HANDLE_RATIO;
- rect.height = widget_allocation.height - 2*border_width;
-
- if (gdk_rectangle_intersect (&event->area, &rect, &dest)) {
- gtk_paint_handle (gtk_widget_get_style (widget), gtk_widget_get_window (widget),
- tablabel->active ? GTK_STATE_NORMAL : GTK_STATE_ACTIVE,
- GTK_SHADOW_NONE,
- &dest, widget, "dock-tablabel",
- rect.x, rect.y, rect.width, rect.height,
- GTK_ORIENTATION_VERTICAL);
- };
-}
-
-static gint
-gdl_dock_tablabel_expose (GtkWidget *widget,
- GdkEventExpose *event)
-{
- g_return_val_if_fail (widget != NULL, FALSE);
- g_return_val_if_fail (GDL_IS_DOCK_TABLABEL (widget), FALSE);
- g_return_val_if_fail (event != NULL, FALSE);
-
- if (gtk_widget_get_visible (widget) && gtk_widget_get_mapped (widget)) {
- GTK_WIDGET_CLASS (gdl_dock_tablabel_parent_class)->expose_event (widget,event);
- gdl_dock_tablabel_paint (widget, event);
- };
-
- return FALSE;
-}
-
-static gboolean
-gdl_dock_tablabel_button_event (GtkWidget *widget,
- GdkEventButton *event)
-{
- GdlDockTablabel *tablabel;
- GtkAllocation widget_allocation;
- gboolean event_handled;
-
- g_return_val_if_fail (widget != NULL, FALSE);
- g_return_val_if_fail (GDL_IS_DOCK_TABLABEL (widget), FALSE);
- g_return_val_if_fail (event != NULL, FALSE);
-
- tablabel = GDL_DOCK_TABLABEL (widget);
-
- event_handled = FALSE;
-
- if (event->window != tablabel->event_window)
- return FALSE;
-
- switch (event->type) {
- case GDK_BUTTON_PRESS:
- if (tablabel->active) {
- gboolean in_handle;
- gint rel_x, rel_y;
- guint border_width;
- GtkBin *bin;
-
- bin = GTK_BIN (widget);
- border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
-
- rel_x = event->x - border_width;
- rel_y = event->y - border_width;
-
- /* Check if user clicked on the drag handle. */
- in_handle = (rel_x < tablabel->drag_handle_size * HANDLE_RATIO) &&
- (rel_x > 0);
-
- if (event->button == 1) {
- tablabel->pre_drag = TRUE;
- tablabel->drag_start_event = *event;
- }
- else {
- g_signal_emit (widget,
- dock_tablabel_signals [BUTTON_PRESSED_HANDLE],
- 0,
- event);
- }
-
- event_handled = TRUE;
- }
- break;
-
- case GDK_BUTTON_RELEASE:
- tablabel->pre_drag = FALSE;
- break;
-
- default:
- break;
- }
-
- if (!event_handled) {
- /* propagate the event to the parent's gdkwindow */
- GdkEventButton e;
-
- e = *event;
- e.window = gtk_widget_get_parent_window (widget);
- gtk_widget_get_allocation (widget, &widget_allocation);
- e.x += widget_allocation.x;
- e.y += widget_allocation.y;
-
- gdk_event_put ((GdkEvent *) &e);
- };
-
- return event_handled;
-}
-
-static gboolean
-gdl_dock_tablabel_motion_event (GtkWidget *widget,
- GdkEventMotion *event)
-{
- GdlDockTablabel *tablabel;
- GtkAllocation widget_allocation;
- gboolean event_handled;
-
- g_return_val_if_fail (widget != NULL, FALSE);
- g_return_val_if_fail (GDL_IS_DOCK_TABLABEL (widget), FALSE);
- g_return_val_if_fail (event != NULL, FALSE);
-
- tablabel = GDL_DOCK_TABLABEL (widget);
-
- event_handled = FALSE;
-
- if (event->window != tablabel->event_window)
- return FALSE;
-
- if (tablabel->pre_drag) {
- if (gtk_drag_check_threshold (widget,
- tablabel->drag_start_event.x,
- tablabel->drag_start_event.y,
- event->x,
- event->y)) {
- tablabel->pre_drag = FALSE;
- g_signal_emit (widget,
- dock_tablabel_signals [BUTTON_PRESSED_HANDLE],
- 0,
- &tablabel->drag_start_event);
- event_handled = TRUE;
- }
- }
-
- if (!event_handled) {
- /* propagate the event to the parent's gdkwindow */
- GdkEventMotion e;
-
- e = *event;
- e.window = gtk_widget_get_parent_window (widget);
- gtk_widget_get_allocation (widget, &widget_allocation);
- e.x += widget_allocation.x;
- e.y += widget_allocation.y;
-
- gdk_event_put ((GdkEvent *) &e);
- };
-
- return event_handled;
-}
-
-static void
-gdl_dock_tablabel_realize (GtkWidget *widget)
-{
- GdlDockTablabel *tablabel;
- GdkWindowAttr attributes;
- GtkAllocation widget_allocation;
- int attributes_mask;
-
- tablabel = GDL_DOCK_TABLABEL (widget);
-
- attributes.window_type = GDK_WINDOW_CHILD;
- gtk_widget_get_allocation (widget, &widget_allocation);
- attributes.x = widget_allocation.x;
- attributes.y = widget_allocation.y;
- attributes.width = widget_allocation.width;
- attributes.height = widget_allocation.height;
- attributes.wclass = GDK_INPUT_ONLY;
- attributes.event_mask = gtk_widget_get_events (widget);
- attributes.event_mask |= (GDK_EXPOSURE_MASK |
- GDK_BUTTON_PRESS_MASK |
- GDK_BUTTON_RELEASE_MASK |
- GDK_ENTER_NOTIFY_MASK |
- GDK_POINTER_MOTION_MASK |
- GDK_LEAVE_NOTIFY_MASK);
- attributes_mask = GDK_WA_X | GDK_WA_Y;
-
- gtk_widget_set_window (widget, gtk_widget_get_parent_window (widget));
- g_object_ref (gtk_widget_get_window (widget));
-
- tablabel->event_window =
- gdk_window_new (gtk_widget_get_parent_window (widget),
- &attributes, attributes_mask);
- gdk_window_set_user_data (tablabel->event_window, widget);
-
- gtk_widget_set_style (widget, gtk_style_attach (gtk_widget_get_style (widget),
- gtk_widget_get_window (widget)));
-
- gtk_widget_set_realized (widget, TRUE);
-}
-
-static void
-gdl_dock_tablabel_unrealize (GtkWidget *widget)
-{
- GdlDockTablabel *tablabel = GDL_DOCK_TABLABEL (widget);
-
- if (tablabel->event_window) {
- gdk_window_set_user_data (tablabel->event_window, NULL);
- gdk_window_destroy (tablabel->event_window);
- tablabel->event_window = NULL;
- }
-
- GTK_WIDGET_CLASS (gdl_dock_tablabel_parent_class)->unrealize (widget);
-}
-
-static void
-gdl_dock_tablabel_map (GtkWidget *widget)
-{
- GdlDockTablabel *tablabel = GDL_DOCK_TABLABEL (widget);
-
- GTK_WIDGET_CLASS (gdl_dock_tablabel_parent_class)->map (widget);
-
- gdk_window_show (tablabel->event_window);
-}
-
-static void
-gdl_dock_tablabel_unmap (GtkWidget *widget)
-{
- GdlDockTablabel *tablabel = GDL_DOCK_TABLABEL (widget);
-
- gdk_window_hide (tablabel->event_window);
-
- GTK_WIDGET_CLASS (gdl_dock_tablabel_parent_class)->unmap (widget);
-}
-
-/* ----- Public interface ----- */
-
-GtkWidget *
-gdl_dock_tablabel_new (GdlDockItem *item)
-{
- GdlDockTablabel *tablabel;
-
- tablabel = GDL_DOCK_TABLABEL (g_object_new (GDL_TYPE_DOCK_TABLABEL,
- "item", item,
- NULL));
-
- return GTK_WIDGET (tablabel);
-}
-
-void
-gdl_dock_tablabel_activate (GdlDockTablabel *tablabel)
-{
- g_return_if_fail (tablabel != NULL);
-
- tablabel->active = TRUE;
- gtk_widget_set_state (GTK_WIDGET (tablabel), GTK_STATE_NORMAL);
-}
-
-void
-gdl_dock_tablabel_deactivate (GdlDockTablabel *tablabel)
-{
- g_return_if_fail (tablabel != NULL);
-
- tablabel->active = FALSE;
- /* yeah, i know it contradictive */
- gtk_widget_set_state (GTK_WIDGET (tablabel), GTK_STATE_ACTIVE);
-}
diff --git a/src/libgdl/gdl-dock-tablabel.h b/src/libgdl/gdl-dock-tablabel.h
deleted file mode 100644
index b78c1c5c7..000000000
--- a/src/libgdl/gdl-dock-tablabel.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * gdl-dock-tablabel.h
- *
- * This file is part of the GNOME Devtools Libraries.
- *
- * Copyright (C) 2002 Gustavo Giráldez <gustavo.giraldez@gmx.net>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __GDL_DOCK_TABLABEL_H__
-#define __GDL_DOCK_TABLABEL_H__
-
-#include <gtk/gtk.h>
-#include "libgdl/gdl-dock-item.h"
-
-
-G_BEGIN_DECLS
-
-/* standard macros */
-#define GDL_TYPE_DOCK_TABLABEL (gdl_dock_tablabel_get_type ())
-#define GDL_DOCK_TABLABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDL_TYPE_DOCK_TABLABEL, GdlDockTablabel))
-#define GDL_DOCK_TABLABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDL_TYPE_DOCK_TABLABEL, GdlDockTablabelClass))
-#define GDL_IS_DOCK_TABLABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDL_TYPE_DOCK_TABLABEL))
-#define GDL_IS_DOCK_TABLABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDL_TYPE_DOCK_TABLABEL))
-#define GDL_DOCK_TABLABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_DOCK_TABLABEL, GdlDockTablabelClass))
-
-/* data types & structures */
-typedef struct _GdlDockTablabel GdlDockTablabel;
-typedef struct _GdlDockTablabelClass GdlDockTablabelClass;
-
-struct _GdlDockTablabel {
- GtkBin parent;
-
- guint drag_handle_size;
- GtkWidget *item;
- GdkWindow *event_window;
- gboolean active;
-
- GdkEventButton drag_start_event;
- gboolean pre_drag;
-};
-
-struct _GdlDockTablabelClass {
- GtkBinClass parent_class;
-
- void (*button_pressed_handle) (GdlDockTablabel *tablabel,
- GdkEventButton *event);
-};
-
-/* public interface */
-
-GtkWidget *gdl_dock_tablabel_new (GdlDockItem *item);
-GType gdl_dock_tablabel_get_type (void);
-
-void gdl_dock_tablabel_activate (GdlDockTablabel *tablabel);
-void gdl_dock_tablabel_deactivate (GdlDockTablabel *tablabel);
-
-G_END_DECLS
-
-#endif
diff --git a/src/libgdl/gdl-dock.c b/src/libgdl/gdl-dock.c
deleted file mode 100644
index c87468e5c..000000000
--- a/src/libgdl/gdl-dock.c
+++ /dev/null
@@ -1,1365 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * This file is part of the GNOME Devtools Libraries.
- *
- * Copyright (C) 2002 Gustavo Giráldez <gustavo.giraldez@gmx.net>
- * 2007 Naba Kumar <naba@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "gdl-i18n.h"
-#include <stdlib.h>
-#include <string.h>
-
-#include "gdl-dock.h"
-#include "gdl-dock-master.h"
-#include "gdl-dock-paned.h"
-#include "gdl-dock-notebook.h"
-#include "gdl-dock-placeholder.h"
-
-#include "libgdlmarshal.h"
-
-#ifndef __FUNCTION__
-#define __FUNCTION__ __func__
-#endif
-
-/* ----- Private prototypes ----- */
-
-static void gdl_dock_class_init (GdlDockClass *class);
-
-static GObject *gdl_dock_constructor (GType type,
- guint n_construct_properties,
- GObjectConstructParam *construct_param);
-static void gdl_dock_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gdl_dock_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
-static void gdl_dock_notify_cb (GObject *object,
- GParamSpec *pspec,
- gpointer user_data);
-
-static void gdl_dock_set_title (GdlDock *dock);
-
-static void gdl_dock_destroy (GtkObject *object);
-
-static void gdl_dock_size_request (GtkWidget *widget,
- GtkRequisition *requisition);
-static void gdl_dock_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation);
-static void gdl_dock_map (GtkWidget *widget);
-static void gdl_dock_unmap (GtkWidget *widget);
-static void gdl_dock_show (GtkWidget *widget);
-static void gdl_dock_hide (GtkWidget *widget);
-
-static void gdl_dock_add (GtkContainer *container,
- GtkWidget *widget);
-static void gdl_dock_remove (GtkContainer *container,
- GtkWidget *widget);
-static void gdl_dock_forall (GtkContainer *container,
- gboolean include_internals,
- GtkCallback callback,
- gpointer callback_data);
-static GType gdl_dock_child_type (GtkContainer *container);
-
-static void gdl_dock_detach (GdlDockObject *object,
- gboolean recursive);
-static void gdl_dock_reduce (GdlDockObject *object);
-static gboolean gdl_dock_dock_request (GdlDockObject *object,
- gint x,
- gint y,
- GdlDockRequest *request);
-static void gdl_dock_dock (GdlDockObject *object,
- GdlDockObject *requestor,
- GdlDockPlacement position,
- GValue *other_data);
-static gboolean gdl_dock_reorder (GdlDockObject *object,
- GdlDockObject *requestor,
- GdlDockPlacement new_position,
- GValue *other_data);
-
-static gboolean gdl_dock_floating_window_delete_event_cb (GtkWidget *widget);
-
-static gboolean gdl_dock_child_placement (GdlDockObject *object,
- GdlDockObject *child,
- GdlDockPlacement *placement);
-
-static void gdl_dock_present (GdlDockObject *object,
- GdlDockObject *child);
-
-
-/* ----- Class variables and definitions ----- */
-
-struct _GdlDockPrivate
-{
- /* for floating docks */
- gboolean floating;
- GtkWidget *window;
- gboolean auto_title;
-
- gint float_x;
- gint float_y;
- gint width;
- gint height;
-
- /* auxiliary fields */
- GdkGC *xor_gc;
-};
-
-enum {
- LAYOUT_CHANGED,
- LAST_SIGNAL
-};
-
-enum {
- PROP_0,
- PROP_FLOATING,
- PROP_DEFAULT_TITLE,
- PROP_WIDTH,
- PROP_HEIGHT,
- PROP_FLOAT_X,
- PROP_FLOAT_Y
-};
-
-static guint dock_signals [LAST_SIGNAL] = { 0 };
-
-#define SPLIT_RATIO 0.3
-
-
-/* ----- Private functions ----- */
-
-G_DEFINE_TYPE (GdlDock, gdl_dock, GDL_TYPE_DOCK_OBJECT);
-
-static void
-gdl_dock_class_init (GdlDockClass *klass)
-{
- GObjectClass *g_object_class;
- GtkObjectClass *gtk_object_class;
- GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
- GdlDockObjectClass *object_class;
-
- g_object_class = G_OBJECT_CLASS (klass);
- gtk_object_class = GTK_OBJECT_CLASS (klass);
- widget_class = GTK_WIDGET_CLASS (klass);
- container_class = GTK_CONTAINER_CLASS (klass);
- object_class = GDL_DOCK_OBJECT_CLASS (klass);
-
- g_object_class->constructor = gdl_dock_constructor;
- g_object_class->set_property = gdl_dock_set_property;
- g_object_class->get_property = gdl_dock_get_property;
-
- /* properties */
-
- g_object_class_install_property (
- g_object_class, PROP_FLOATING,
- g_param_spec_boolean ("floating", _("Floating"),
- _("Whether the dock is floating in its own window"),
- FALSE,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
- GDL_DOCK_PARAM_EXPORT));
-
- g_object_class_install_property (
- g_object_class, PROP_DEFAULT_TITLE,
- g_param_spec_string ("default-title", _("Default title"),
- _("Default title for the newly created floating docks"),
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (
- g_object_class, PROP_WIDTH,
- g_param_spec_int ("width", _("Width"),
- _("Width for the dock when it's of floating type"),
- -1, G_MAXINT, -1,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT |
- GDL_DOCK_PARAM_EXPORT));
-
- g_object_class_install_property (
- g_object_class, PROP_HEIGHT,
- g_param_spec_int ("height", _("Height"),
- _("Height for the dock when it's of floating type"),
- -1, G_MAXINT, -1,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT |
- GDL_DOCK_PARAM_EXPORT));
-
- g_object_class_install_property (
- g_object_class, PROP_FLOAT_X,
- g_param_spec_int ("floatx", _("Float X"),
- _("X coordinate for a floating dock"),
- G_MININT, G_MAXINT, 0,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT |
- GDL_DOCK_PARAM_EXPORT));
-
- g_object_class_install_property (
- g_object_class, PROP_FLOAT_Y,
- g_param_spec_int ("floaty", _("Float Y"),
- _("Y coordinate for a floating dock"),
- G_MININT, G_MAXINT, 0,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT |
- GDL_DOCK_PARAM_EXPORT));
-
- gtk_object_class->destroy = gdl_dock_destroy;
-
- widget_class->size_request = gdl_dock_size_request;
- widget_class->size_allocate = gdl_dock_size_allocate;
- widget_class->map = gdl_dock_map;
- widget_class->unmap = gdl_dock_unmap;
- widget_class->show = gdl_dock_show;
- widget_class->hide = gdl_dock_hide;
-
- container_class->add = gdl_dock_add;
- container_class->remove = gdl_dock_remove;
- container_class->forall = gdl_dock_forall;
- container_class->child_type = gdl_dock_child_type;
-
- object_class->is_compound = TRUE;
-
- object_class->detach = gdl_dock_detach;
- object_class->reduce = gdl_dock_reduce;
- object_class->dock_request = gdl_dock_dock_request;
- object_class->dock = gdl_dock_dock;
- object_class->reorder = gdl_dock_reorder;
- object_class->child_placement = gdl_dock_child_placement;
- object_class->present = gdl_dock_present;
-
- /* signals */
-
- dock_signals [LAYOUT_CHANGED] =
- g_signal_new ("layout-changed",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GdlDockClass, layout_changed),
- NULL, /* accumulator */
- NULL, /* accu_data */
- gdl_marshal_VOID__VOID,
- G_TYPE_NONE, /* return type */
- 0);
-
- klass->layout_changed = NULL;
-}
-
-static void
-gdl_dock_init (GdlDock *dock)
-{
- gtk_widget_set_has_window (GTK_WIDGET (dock), FALSE);
-
- dock->root = NULL;
- dock->_priv = g_new0 (GdlDockPrivate, 1);
- dock->_priv->width = -1;
- dock->_priv->height = -1;
-}
-
-static gboolean
-gdl_dock_floating_configure_event_cb (GtkWidget *widget,
- GdkEventConfigure *event,
- gpointer user_data)
-{
- GdlDock *dock;
-
- g_return_val_if_fail (user_data != NULL && GDL_IS_DOCK (user_data), TRUE);
-
- dock = GDL_DOCK (user_data);
- dock->_priv->float_x = event->x;
- dock->_priv->float_y = event->y;
- dock->_priv->width = event->width;
- dock->_priv->height = event->height;
-
- return FALSE;
-}
-
-static GObject *
-gdl_dock_constructor (GType type,
- guint n_construct_properties,
- GObjectConstructParam *construct_param)
-{
- GObject *g_object;
-
- g_object = G_OBJECT_CLASS (gdl_dock_parent_class)-> constructor (type,
- n_construct_properties,
- construct_param);
- if (g_object) {
- GdlDock *dock = GDL_DOCK (g_object);
- GdlDockMaster *master;
-
- /* create a master for the dock if none was provided in the construction */
- master = GDL_DOCK_OBJECT_GET_MASTER (GDL_DOCK_OBJECT (dock));
- if (!master) {
- GDL_DOCK_OBJECT_UNSET_FLAGS (dock, GDL_DOCK_AUTOMATIC);
- master = g_object_new (GDL_TYPE_DOCK_MASTER, NULL);
- /* the controller owns the master ref */
- gdl_dock_object_bind (GDL_DOCK_OBJECT (dock), G_OBJECT (master));
- }
-
- if (dock->_priv->floating) {
- /* create floating window for this dock */
- dock->_priv->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- g_object_set_data (G_OBJECT (dock->_priv->window), "dock", dock);
-
- /* set position and default size */
- gtk_window_set_position (GTK_WINDOW (dock->_priv->window),
- GTK_WIN_POS_MOUSE);
- gtk_window_set_default_size (GTK_WINDOW (dock->_priv->window),
- dock->_priv->width,
- dock->_priv->height);
- gtk_window_set_type_hint (GTK_WINDOW (dock->_priv->window),
- GDK_WINDOW_TYPE_HINT_NORMAL);
-
- gtk_window_set_skip_taskbar_hint (GTK_WINDOW (dock->_priv->window),
- TRUE);
-
- /* metacity ignores this */
- gtk_window_move (GTK_WINDOW (dock->_priv->window),
- dock->_priv->float_x,
- dock->_priv->float_y);
-
- /* connect to the configure event so we can track down window geometry */
- g_signal_connect (dock->_priv->window, "configure_event",
- (GCallback) gdl_dock_floating_configure_event_cb,
- dock);
-
- /* set the title and connect to the long_name notify queue
- so we can reset the title when this prop changes */
- gdl_dock_set_title (dock);
- g_signal_connect (dock, "notify::long-name",
- (GCallback) gdl_dock_notify_cb, NULL);
-
- gtk_container_add (GTK_CONTAINER (dock->_priv->window), GTK_WIDGET (dock));
-
- g_signal_connect (dock->_priv->window, "delete_event",
- G_CALLBACK (gdl_dock_floating_window_delete_event_cb),
- NULL);
- }
- GDL_DOCK_OBJECT_SET_FLAGS (dock, GDL_DOCK_ATTACHED);
- }
-
- return g_object;
-}
-
-static void
-gdl_dock_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- GdlDock *dock = GDL_DOCK (object);
-
- switch (prop_id) {
- case PROP_FLOATING:
- dock->_priv->floating = g_value_get_boolean (value);
- break;
- case PROP_DEFAULT_TITLE:
- if (GDL_DOCK_OBJECT (object)->master)
- g_object_set (GDL_DOCK_OBJECT (object)->master,
- "default-title", g_value_get_string (value),
- NULL);
- break;
- case PROP_WIDTH:
- dock->_priv->width = g_value_get_int (value);
- break;
- case PROP_HEIGHT:
- dock->_priv->height = g_value_get_int (value);
- break;
- case PROP_FLOAT_X:
- dock->_priv->float_x = g_value_get_int (value);
- break;
- case PROP_FLOAT_Y:
- dock->_priv->float_y = g_value_get_int (value);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-
- switch (prop_id) {
- case PROP_WIDTH:
- case PROP_HEIGHT:
- case PROP_FLOAT_X:
- case PROP_FLOAT_Y:
- if (dock->_priv->floating && dock->_priv->window) {
- gtk_window_resize (GTK_WINDOW (dock->_priv->window),
- dock->_priv->width,
- dock->_priv->height);
- }
- break;
- }
-}
-
-static void
-gdl_dock_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- GdlDock *dock = GDL_DOCK (object);
-
- switch (prop_id) {
- case PROP_FLOATING:
- g_value_set_boolean (value, dock->_priv->floating);
- break;
- case PROP_DEFAULT_TITLE:
- if (GDL_DOCK_OBJECT (object)->master) {
- gchar *default_title;
- g_object_get (GDL_DOCK_OBJECT (object)->master,
- "default-title", &default_title,
- NULL);
-#if GLIB_CHECK_VERSION(2,3,0)
- g_value_take_string (value, default_title);
-#else
- g_value_set_string_take_ownership (value, default_title);
-#endif
- }
- else
- g_value_set_string (value, NULL);
- break;
- case PROP_WIDTH:
- g_value_set_int (value, dock->_priv->width);
- break;
- case PROP_HEIGHT:
- g_value_set_int (value, dock->_priv->height);
- break;
- case PROP_FLOAT_X:
- g_value_set_int (value, dock->_priv->float_x);
- break;
- case PROP_FLOAT_Y:
- g_value_set_int (value, dock->_priv->float_y);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-gdl_dock_set_title (GdlDock *dock)
-{
- GdlDockObject *object = GDL_DOCK_OBJECT (dock);
- gchar *title = NULL;
-
- if (!dock->_priv->window)
- return;
-
- if (!dock->_priv->auto_title && object->long_name) {
- title = object->long_name;
- }
- else if (object->master) {
- g_object_get (object->master, "default-title", &title, NULL);
- }
-
- if (!title && dock->root) {
- g_object_get (dock->root, "long-name", &title, NULL);
- }
-
- if (!title) {
- /* set a default title in the long_name */
- dock->_priv->auto_title = TRUE;
- title = g_strdup_printf (
- _("Dock #%d"), GDL_DOCK_MASTER (object->master)->dock_number++);
- }
-
- gtk_window_set_title (GTK_WINDOW (dock->_priv->window), title);
-
- g_free (title);
-}
-
-static void
-gdl_dock_notify_cb (GObject *object,
- GParamSpec *pspec,
- gpointer user_data)
-{
- GdlDock *dock;
- gchar* long_name;
-
- g_return_if_fail (object != NULL || GDL_IS_DOCK (object));
-
- g_object_get (object, "long-name", &long_name, NULL);
-
- if (long_name)
- {
- dock = GDL_DOCK (object);
- dock->_priv->auto_title = FALSE;
- gdl_dock_set_title (dock);
- }
- g_free (long_name);
-}
-
-static void
-gdl_dock_destroy (GtkObject *object)
-{
- GdlDock *dock = GDL_DOCK (object);
-
- if (dock->_priv) {
- GdlDockPrivate *priv = dock->_priv;
- dock->_priv = NULL;
-
- if (priv->window) {
- gtk_widget_destroy (priv->window);
- priv->floating = FALSE;
- priv->window = NULL;
- }
-
- /* destroy the xor gc */
- if (priv->xor_gc) {
- g_object_unref (priv->xor_gc);
- priv->xor_gc = NULL;
- }
-
- g_free (priv);
- }
-
- GTK_OBJECT_CLASS (gdl_dock_parent_class)->destroy (object);
-}
-
-static void
-gdl_dock_size_request (GtkWidget *widget,
- GtkRequisition *requisition)
-{
- GdlDock *dock;
- GtkContainer *container;
- guint border_width;
-
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GDL_IS_DOCK (widget));
-
- dock = GDL_DOCK (widget);
- container = GTK_CONTAINER (widget);
- border_width = gtk_container_get_border_width (container);
-
- /* make request to root */
- if (dock->root && gtk_widget_get_visible (GTK_WIDGET (dock->root)))
- gtk_widget_size_request (GTK_WIDGET (dock->root), requisition);
- else {
- requisition->width = 0;
- requisition->height = 0;
- };
-
- requisition->width += 2 * border_width;
- requisition->height += 2 * border_width;
-
- //gtk_widget_size_request (widget, requisition);
-}
-
-static void
-gdl_dock_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation)
-{
- GdlDock *dock;
- GtkContainer *container;
- guint border_width;
-
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GDL_IS_DOCK (widget));
-
- dock = GDL_DOCK (widget);
- container = GTK_CONTAINER (widget);
- border_width = gtk_container_get_border_width (container);
-
- gtk_widget_set_allocation (widget, allocation);
-
- /* reduce allocation by border width */
- allocation->x += border_width;
- allocation->y += border_width;
- allocation->width = MAX (1, allocation->width - 2 * border_width);
- allocation->height = MAX (1, allocation->height - 2 * border_width);
-
- if (dock->root && gtk_widget_get_visible (GTK_WIDGET (dock->root)))
- gtk_widget_size_allocate (GTK_WIDGET (dock->root), allocation);
-}
-
-static void
-gdl_dock_map (GtkWidget *widget)
-{
- GtkWidget *child;
- GdlDock *dock;
-
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GDL_IS_DOCK (widget));
-
- dock = GDL_DOCK (widget);
-
- GTK_WIDGET_CLASS (gdl_dock_parent_class)->map (widget);
-
- if (dock->root) {
- child = GTK_WIDGET (dock->root);
- if (gtk_widget_get_visible (child) && !gtk_widget_get_mapped (child))
- gtk_widget_map (child);
- }
-}
-
-static void
-gdl_dock_unmap (GtkWidget *widget)
-{
- GtkWidget *child;
- GdlDock *dock;
-
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GDL_IS_DOCK (widget));
-
- dock = GDL_DOCK (widget);
-
- GTK_WIDGET_CLASS (gdl_dock_parent_class)->unmap (widget);
-
- if (dock->root) {
- child = GTK_WIDGET (dock->root);
- if (gtk_widget_get_visible (child) && gtk_widget_get_mapped (child))
- gtk_widget_unmap (child);
- }
-
- if (dock->_priv->window)
- gtk_widget_unmap (dock->_priv->window);
-}
-
-static void
-gdl_dock_foreach_automatic (GdlDockObject *object,
- gpointer user_data)
-{
- void (* function) (GtkWidget *) = user_data;
-
- if (GDL_DOCK_OBJECT_AUTOMATIC (object))
- (* function) (GTK_WIDGET (object));
-}
-
-static void
-gdl_dock_show (GtkWidget *widget)
-{
- GdlDock *dock;
-
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GDL_IS_DOCK (widget));
-
- GTK_WIDGET_CLASS (gdl_dock_parent_class)->show (widget);
-
- dock = GDL_DOCK (widget);
- if (dock->_priv->floating && dock->_priv->window)
- gtk_widget_show (dock->_priv->window);
-
- if (GDL_DOCK_IS_CONTROLLER (dock)) {
- gdl_dock_master_foreach_toplevel (GDL_DOCK_OBJECT_GET_MASTER (dock),
- FALSE, (GFunc) gdl_dock_foreach_automatic,
- gtk_widget_show);
- }
-}
-
-static void
-gdl_dock_hide (GtkWidget *widget)
-{
- GdlDock *dock;
-
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GDL_IS_DOCK (widget));
-
- GTK_WIDGET_CLASS (gdl_dock_parent_class)->hide (widget);
-
- dock = GDL_DOCK (widget);
- if (dock->_priv->floating && dock->_priv->window)
- gtk_widget_hide (dock->_priv->window);
-
- if (GDL_DOCK_IS_CONTROLLER (dock)) {
- gdl_dock_master_foreach_toplevel (GDL_DOCK_OBJECT_GET_MASTER (dock),
- FALSE, (GFunc) gdl_dock_foreach_automatic,
- gtk_widget_hide);
- }
-}
-
-static void
-gdl_dock_add (GtkContainer *container,
- GtkWidget *widget)
-{
- g_return_if_fail (container != NULL);
- g_return_if_fail (GDL_IS_DOCK (container));
- g_return_if_fail (GDL_IS_DOCK_ITEM (widget));
-
- gdl_dock_add_item (GDL_DOCK (container),
- GDL_DOCK_ITEM (widget),
- GDL_DOCK_TOP); /* default position */
-}
-
-static void
-gdl_dock_remove (GtkContainer *container,
- GtkWidget *widget)
-{
- GdlDock *dock;
- gboolean was_visible;
-
- g_return_if_fail (container != NULL);
- g_return_if_fail (widget != NULL);
-
- dock = GDL_DOCK (container);
- was_visible = gtk_widget_get_visible (widget);
-
- if (GTK_WIDGET (dock->root) == widget) {
- dock->root = NULL;
- GDL_DOCK_OBJECT_UNSET_FLAGS (widget, GDL_DOCK_ATTACHED);
- gtk_widget_unparent (widget);
-
- if (was_visible && gtk_widget_get_visible (GTK_WIDGET (container)))
- gtk_widget_queue_resize (GTK_WIDGET (dock));
- }
-}
-
-static void
-gdl_dock_forall (GtkContainer *container,
- gboolean include_internals,
- GtkCallback callback,
- gpointer callback_data)
-{
- GdlDock *dock;
-
- g_return_if_fail (container != NULL);
- g_return_if_fail (GDL_IS_DOCK (container));
- g_return_if_fail (callback != NULL);
-
- dock = GDL_DOCK (container);
-
- if (dock->root)
- (*callback) (GTK_WIDGET (dock->root), callback_data);
-}
-
-static GType
-gdl_dock_child_type (GtkContainer *container)
-{
- return GDL_TYPE_DOCK_ITEM;
-}
-
-static void
-gdl_dock_detach (GdlDockObject *object,
- gboolean recursive)
-{
- GdlDock *dock = GDL_DOCK (object);
-
- /* detach children */
- if (recursive && dock->root) {
- gdl_dock_object_detach (dock->root, recursive);
- }
- GDL_DOCK_OBJECT_UNSET_FLAGS (object, GDL_DOCK_ATTACHED);
-}
-
-static void
-gdl_dock_reduce (GdlDockObject *object)
-{
- GdlDock *dock = GDL_DOCK (object);
- GtkWidget *parent;
-
- if (dock->root)
- return;
-
- if (GDL_DOCK_OBJECT_AUTOMATIC (dock)) {
- gtk_widget_destroy (GTK_WIDGET (dock));
-
- } else if (!GDL_DOCK_OBJECT_ATTACHED (dock)) {
- /* if the user explicitly detached the object */
- if (dock->_priv->floating)
- gtk_widget_hide (GTK_WIDGET (dock));
- else {
- GtkWidget *widget = GTK_WIDGET (object);
- parent = gtk_widget_get_parent (widget);
- if (parent)
- gtk_container_remove (GTK_CONTAINER (parent), widget);
- }
- }
-}
-
-static gboolean
-gdl_dock_dock_request (GdlDockObject *object,
- gint x,
- gint y,
- GdlDockRequest *request)
-{
- GdlDock *dock;
- guint bw;
- gint rel_x, rel_y;
- GtkAllocation alloc;
- gboolean may_dock = FALSE;
- GdlDockRequest my_request;
-
- g_return_val_if_fail (GDL_IS_DOCK (object), FALSE);
-
- /* we get (x,y) in our allocation coordinates system */
-
- dock = GDL_DOCK (object);
-
- /* Get dock size. */
- gtk_widget_get_allocation (GTK_WIDGET (dock), &alloc);
- bw = gtk_container_get_border_width (GTK_CONTAINER (dock));
-
- /* Get coordinates relative to our allocation area. */
- rel_x = x - alloc.x;
- rel_y = y - alloc.y;
-
- if (request)
- my_request = *request;
-
- /* Check if coordinates are in GdlDock widget. */
- if (rel_x > 0 && rel_x < alloc.width &&
- rel_y > 0 && rel_y < alloc.height) {
-
- /* It's inside our area. */
- may_dock = TRUE;
-
- /* Set docking indicator rectangle to the GdlDock size. */
- my_request.rect.x = alloc.x + bw;
- my_request.rect.y = alloc.y + bw;
- my_request.rect.width = alloc.width - 2*bw;
- my_request.rect.height = alloc.height - 2*bw;
-
- /* If GdlDock has no root item yet, set the dock itself as
- possible target. */
- if (!dock->root) {
- my_request.position = GDL_DOCK_TOP;
- my_request.target = object;
- } else {
- my_request.target = dock->root;
-
- /* See if it's in the border_width band. */
- if (rel_x < (gint)bw) {
- my_request.position = GDL_DOCK_LEFT;
- my_request.rect.width *= SPLIT_RATIO;
- } else if (rel_x > alloc.width - (gint)bw) {
- my_request.position = GDL_DOCK_RIGHT;
- my_request.rect.x += my_request.rect.width * (1 - SPLIT_RATIO);
- my_request.rect.width *= SPLIT_RATIO;
- } else if (rel_y < (gint)bw) {
- my_request.position = GDL_DOCK_TOP;
- my_request.rect.height *= SPLIT_RATIO;
- } else if (rel_y > alloc.height - (gint)bw) {
- my_request.position = GDL_DOCK_BOTTOM;
- my_request.rect.y += my_request.rect.height * (1 - SPLIT_RATIO);
- my_request.rect.height *= SPLIT_RATIO;
- } else {
- /* Otherwise try our children. */
- /* give them allocation coordinates (we are a
- GTK_NO_WINDOW) widget */
- may_dock = gdl_dock_object_dock_request (GDL_DOCK_OBJECT (dock->root),
- x, y, &my_request);
- }
- }
- }
-
- if (may_dock && request)
- *request = my_request;
-
- return may_dock;
-}
-
-static void
-gdl_dock_dock (GdlDockObject *object,
- GdlDockObject *requestor,
- GdlDockPlacement position,
- GValue *user_data)
-{
- GdlDock *dock;
-
- g_return_if_fail (GDL_IS_DOCK (object));
- /* only dock items allowed at this time */
- g_return_if_fail (GDL_IS_DOCK_ITEM (requestor));
-
- dock = GDL_DOCK (object);
-
- if (position == GDL_DOCK_FLOATING) {
- GdlDockItem *item = GDL_DOCK_ITEM (requestor);
- gint x, y, width, height;
-
- if (user_data && G_VALUE_HOLDS (user_data, GDK_TYPE_RECTANGLE)) {
- GdkRectangle *rect;
-
- rect = g_value_get_boxed (user_data);
- x = rect->x;
- y = rect->y;
- width = rect->width;
- height = rect->height;
- }
- else {
- x = y = 0;
- width = height = -1;
- }
-
- gdl_dock_add_floating_item (dock, item,
- x, y, width, height);
- }
- else if (dock->root) {
- /* This is somewhat a special case since we know which item to
- pass the request on because we only have on child */
- gdl_dock_object_dock (dock->root, requestor, position, NULL);
- gdl_dock_set_title (dock);
-
- }
- else { /* Item about to be added is root item. */
- GtkWidget *widget = GTK_WIDGET (requestor);
-
- dock->root = requestor;
- GDL_DOCK_OBJECT_SET_FLAGS (requestor, GDL_DOCK_ATTACHED);
- gtk_widget_set_parent (widget, GTK_WIDGET (dock));
-
- gdl_dock_item_show_grip (GDL_DOCK_ITEM (requestor));
-
- /* Realize the item (create its corresponding GdkWindow) when
- GdlDock has been realized. */
- if (gtk_widget_get_realized (GTK_WIDGET (dock)))
- gtk_widget_realize (widget);
-
- /* Map the widget if it's visible and the parent is visible and has
- been mapped. This is done to make sure that the GdkWindow is
- visible. */
- if (gtk_widget_get_visible (GTK_WIDGET (dock)) &&
- gtk_widget_get_visible (widget)) {
- if (gtk_widget_get_mapped (GTK_WIDGET (dock)))
- gtk_widget_map (widget);
-
- /* Make the widget resize. */
- gtk_widget_queue_resize (widget);
- }
- gdl_dock_set_title (dock);
- }
-}
-
-static gboolean
-gdl_dock_floating_window_delete_event_cb (GtkWidget *widget)
-{
- GdlDock *dock;
-
- g_return_val_if_fail (GTK_IS_WINDOW (widget), FALSE);
-
- dock = GDL_DOCK (g_object_get_data (G_OBJECT (widget), "dock"));
- if (dock->root) {
- /* this will call reduce on ourselves, hiding the window if appropiate */
- gdl_dock_item_hide_item (GDL_DOCK_ITEM (dock->root));
- }
-
- return TRUE;
-}
-
-static void
-_gdl_dock_foreach_build_list (GdlDockObject *object,
- gpointer user_data)
-{
- GList **l = (GList **) user_data;
-
- if (GDL_IS_DOCK_ITEM (object))
- *l = g_list_prepend (*l, object);
-}
-
-static gboolean
-gdl_dock_reorder (GdlDockObject *object,
- GdlDockObject *requestor,
- GdlDockPlacement new_position,
- GValue *other_data)
-{
- GdlDock *dock = GDL_DOCK (object);
- gboolean handled = FALSE;
-
- if (dock->_priv->floating &&
- new_position == GDL_DOCK_FLOATING &&
- dock->root == requestor) {
-
- if (other_data && G_VALUE_HOLDS (other_data, GDK_TYPE_RECTANGLE)) {
- GdkRectangle *rect;
-
- rect = g_value_get_boxed (other_data);
- gtk_window_move (GTK_WINDOW (dock->_priv->window),
- rect->x,
- rect->y);
- handled = TRUE;
- }
- }
-
- return handled;
-}
-
-static gboolean
-gdl_dock_child_placement (GdlDockObject *object,
- GdlDockObject *child,
- GdlDockPlacement *placement)
-{
- GdlDock *dock = GDL_DOCK (object);
- gboolean retval = TRUE;
-
- if (dock->root == child) {
- if (placement) {
- if (*placement == GDL_DOCK_NONE || *placement == GDL_DOCK_FLOATING)
- *placement = GDL_DOCK_TOP;
- }
- } else
- retval = FALSE;
-
- return retval;
-}
-
-static void
-gdl_dock_present (GdlDockObject *object,
- GdlDockObject *child)
-{
- GdlDock *dock = GDL_DOCK (object);
-
- if (dock->_priv->floating)
- gtk_window_present (GTK_WINDOW (dock->_priv->window));
-}
-
-
-/* ----- Public interface ----- */
-
-GtkWidget *
-gdl_dock_new (void)
-{
- GObject *dock;
-
- dock = g_object_new (GDL_TYPE_DOCK, NULL);
- GDL_DOCK_OBJECT_UNSET_FLAGS (dock, GDL_DOCK_AUTOMATIC);
-
- return GTK_WIDGET (dock);
-}
-
-GtkWidget *
-gdl_dock_new_from (GdlDock *original,
- gboolean floating)
-{
- GObject *new_dock;
-
- g_return_val_if_fail (original != NULL, NULL);
-
- new_dock = g_object_new (GDL_TYPE_DOCK,
- "master", GDL_DOCK_OBJECT_GET_MASTER (original),
- "floating", floating,
- NULL);
- GDL_DOCK_OBJECT_UNSET_FLAGS (new_dock, GDL_DOCK_AUTOMATIC);
-
- return GTK_WIDGET (new_dock);
-}
-
-/* Depending on where the dock item (where new item will be docked) locates
- * in the dock, we might need to change the docking placement. If the
- * item is does not touches the center of dock, the new-item-to-dock would
- * require a center dock on this item.
- */
-static GdlDockPlacement
-gdl_dock_refine_placement (GdlDock *dock, GdlDockItem *dock_item,
- GdlDockPlacement placement)
-{
- GtkAllocation allocation;
- GtkRequisition object_size;
-
- gdl_dock_item_preferred_size (dock_item, &object_size);
- gtk_widget_get_allocation (GTK_WIDGET (dock), &allocation);
-
- g_return_val_if_fail (allocation.width > 0, placement);
- g_return_val_if_fail (allocation.height > 0, placement);
- g_return_val_if_fail (object_size.width > 0, placement);
- g_return_val_if_fail (object_size.height > 0, placement);
-
- if (placement == GDL_DOCK_LEFT || placement == GDL_DOCK_RIGHT) {
- /* Check if dock_object touches center in terms of width */
- if (allocation.width/2 > object_size.width) {
- return GDL_DOCK_CENTER;
- }
- } else if (placement == GDL_DOCK_TOP || placement == GDL_DOCK_BOTTOM) {
- /* Check if dock_object touches center in terms of height */
- if (allocation.height/2 > object_size.height) {
- return GDL_DOCK_CENTER;
- }
- }
- return placement;
-}
-
-/* Determines the larger item of the two based on the placement:
- * for left/right placement, height determines it.
- * for top/bottom placement, width determines it.
- * for center placement, area determines it.
- */
-static GdlDockItem*
-gdl_dock_select_larger_item (GdlDockItem *dock_item_1,
- GdlDockItem *dock_item_2,
- GdlDockPlacement placement,
- gint level /* for debugging */)
-{
- GtkRequisition size_1, size_2;
-
- g_return_val_if_fail (dock_item_1 != NULL, dock_item_2);
- g_return_val_if_fail (dock_item_2 != NULL, dock_item_1);
-
- gdl_dock_item_preferred_size (dock_item_1, &size_1);
- gdl_dock_item_preferred_size (dock_item_2, &size_2);
-
- g_return_val_if_fail (size_1.width > 0, dock_item_2);
- g_return_val_if_fail (size_1.height > 0, dock_item_2);
- g_return_val_if_fail (size_2.width > 0, dock_item_1);
- g_return_val_if_fail (size_2.height > 0, dock_item_1);
-
- if (placement == GDL_DOCK_LEFT || placement == GDL_DOCK_RIGHT)
- {
- /* For left/right placement, height is what matters */
- return (size_1.height >= size_2.height?
- dock_item_1 : dock_item_2);
- } else if (placement == GDL_DOCK_TOP || placement == GDL_DOCK_BOTTOM)
- {
- /* For top/bottom placement, width is what matters */
- return (size_1.width >= size_2.width?
- dock_item_1 : dock_item_2);
- } else if (placement == GDL_DOCK_CENTER) {
- /* For center place, area is what matters */
- return ((size_1.width * size_1.height)
- >= (size_2.width * size_2.height)?
- dock_item_1 : dock_item_2);
- } else if (placement == GDL_DOCK_NONE) {
- return dock_item_1;
- } else {
- g_warning ("Should not reach here: %s:%d", __FUNCTION__, __LINE__);
- }
- return dock_item_1;
-}
-
-/* Determines the best dock item to dock a new item with the given placement.
- * It traverses the dock tree and (based on the placement) tries to find
- * the best located item wrt to the placement. The approach is to find the
- * largest item on/around the placement side (for side placements) and to
- * find the largest item for center placement. In most situations, this is
- * what user wants and the heuristic should be therefore sufficient.
- */
-static GdlDockItem*
-gdl_dock_find_best_placement_item (GdlDockItem *dock_item,
- GdlDockPlacement placement,
- gint level /* for debugging */)
-{
- GdlDockItem *ret_item = NULL;
-
- if (GDL_IS_DOCK_PANED (dock_item))
- {
- GtkOrientation orientation;
- GdlDockItem *dock_item_1, *dock_item_2;
- GList* children;
-
- children = gtk_container_get_children (GTK_CONTAINER (dock_item));
-
- g_assert (g_list_length (children) == 2);
-
- g_object_get (dock_item, "orientation", &orientation, NULL);
- if ((orientation == GTK_ORIENTATION_HORIZONTAL &&
- placement == GDL_DOCK_LEFT) ||
- (orientation == GTK_ORIENTATION_VERTICAL &&
- placement == GDL_DOCK_TOP)) {
- /* Return left or top pane widget */
- ret_item =
- gdl_dock_find_best_placement_item (GDL_DOCK_ITEM
- (children->data),
- placement, level + 1);
- } else if ((orientation == GTK_ORIENTATION_HORIZONTAL &&
- placement == GDL_DOCK_RIGHT) ||
- (orientation == GTK_ORIENTATION_VERTICAL &&
- placement == GDL_DOCK_BOTTOM)) {
- /* Return right or top pane widget */
- ret_item =
- gdl_dock_find_best_placement_item (GDL_DOCK_ITEM
- (children->next->data),
- placement, level + 1);
- } else {
- /* Evaluate which of the two sides is bigger */
- dock_item_1 =
- gdl_dock_find_best_placement_item (GDL_DOCK_ITEM
- (children->data),
- placement, level + 1);
- dock_item_2 =
- gdl_dock_find_best_placement_item (GDL_DOCK_ITEM
- (children->next->data),
- placement, level + 1);
- ret_item = gdl_dock_select_larger_item (dock_item_1,
- dock_item_2,
- placement, level);
- }
- g_list_free (children);
- }
- else if (GDL_IS_DOCK_ITEM (dock_item))
- {
- ret_item = dock_item;
- }
- else
- {
- /* should not be here */
- g_warning ("Should not reach here: %s:%d", __FUNCTION__, __LINE__);
- }
- return ret_item;
-}
-
-void
-gdl_dock_add_item (GdlDock *dock,
- GdlDockItem *item,
- GdlDockPlacement placement)
-{
- g_return_if_fail (dock != NULL);
- g_return_if_fail (item != NULL);
-
- if (placement == GDL_DOCK_FLOATING)
- /* Add the item to a new floating dock */
- gdl_dock_add_floating_item (dock, item, 0, 0, -1, -1);
-
- else {
- GdlDockItem *best_dock_item;
- /* Non-floating item. */
- if (dock->root) {
- GdlDockPlacement local_placement;
-
- best_dock_item =
- gdl_dock_find_best_placement_item (GDL_DOCK_ITEM (dock->root),
- placement, 0);
- local_placement = gdl_dock_refine_placement (dock, best_dock_item,
- placement);
- gdl_dock_object_dock (GDL_DOCK_OBJECT (best_dock_item),
- GDL_DOCK_OBJECT (item),
- local_placement, NULL);
- } else {
- gdl_dock_object_dock (GDL_DOCK_OBJECT (dock),
- GDL_DOCK_OBJECT (item),
- placement, NULL);
- }
- }
-}
-
-void
-gdl_dock_add_floating_item (GdlDock *dock,
- GdlDockItem *item,
- gint x,
- gint y,
- gint width,
- gint height)
-{
- GdlDock *new_dock;
-
- g_return_if_fail (dock != NULL);
- g_return_if_fail (item != NULL);
-
- new_dock = GDL_DOCK (g_object_new (GDL_TYPE_DOCK,
- "master", GDL_DOCK_OBJECT_GET_MASTER (dock),
- "floating", TRUE,
- "width", width,
- "height", height,
- "floatx", x,
- "floaty", y,
- NULL));
-
- if (gtk_widget_get_visible (GTK_WIDGET (dock))) {
- gtk_widget_show (GTK_WIDGET (new_dock));
- if (gtk_widget_get_mapped (GTK_WIDGET (dock)))
- gtk_widget_map (GTK_WIDGET (new_dock));
-
- /* Make the widget resize. */
- gtk_widget_queue_resize (GTK_WIDGET (new_dock));
- }
-
- gdl_dock_add_item (GDL_DOCK (new_dock), item, GDL_DOCK_TOP);
-}
-
-GdlDockItem *
-gdl_dock_get_item_by_name (GdlDock *dock,
- const gchar *name)
-{
- GdlDockObject *found;
-
- g_return_val_if_fail (dock != NULL && name != NULL, NULL);
-
- /* proxy the call to our master */
- found = gdl_dock_master_get_object (GDL_DOCK_OBJECT_GET_MASTER (dock), name);
-
- return (found && GDL_IS_DOCK_ITEM (found)) ? GDL_DOCK_ITEM (found) : NULL;
-}
-
-GdlDockPlaceholder *
-gdl_dock_get_placeholder_by_name (GdlDock *dock,
- const gchar *name)
-{
- GdlDockObject *found;
-
- g_return_val_if_fail (dock != NULL && name != NULL, NULL);
-
- /* proxy the call to our master */
- found = gdl_dock_master_get_object (GDL_DOCK_OBJECT_GET_MASTER (dock), name);
-
- return (found && GDL_IS_DOCK_PLACEHOLDER (found)) ?
- GDL_DOCK_PLACEHOLDER (found) : NULL;
-}
-
-GList *
-gdl_dock_get_named_items (GdlDock *dock)
-{
- GList *list = NULL;
-
- g_return_val_if_fail (dock != NULL, NULL);
-
- gdl_dock_master_foreach (GDL_DOCK_OBJECT_GET_MASTER (dock),
- (GFunc) _gdl_dock_foreach_build_list, &list);
-
- return list;
-}
-
-GdlDock *
-gdl_dock_object_get_toplevel (GdlDockObject *object)
-{
- GdlDockObject *parent = object;
-
- g_return_val_if_fail (object != NULL, NULL);
-
- while (parent && !GDL_IS_DOCK (parent))
- parent = gdl_dock_object_get_parent_object (parent);
-
- return parent ? GDL_DOCK (parent) : NULL;
-}
-
-void
-gdl_dock_xor_rect (GdlDock *dock,
- GdkRectangle *rect)
-{
- GtkWidget *widget;
- GdkWindow *window;
- gint8 dash_list [2];
-
- widget = GTK_WIDGET (dock);
-
- if (!dock->_priv->xor_gc) {
- if (gtk_widget_get_realized (widget)) {
- GdkGCValues values;
-
- values.function = GDK_INVERT;
- values.subwindow_mode = GDK_INCLUDE_INFERIORS;
- dock->_priv->xor_gc = gdk_gc_new_with_values
- (gtk_widget_get_window (widget), &values, GDK_GC_FUNCTION | GDK_GC_SUBWINDOW);
- } else
- return;
- };
-
- gdk_gc_set_line_attributes (dock->_priv->xor_gc, 1,
- GDK_LINE_ON_OFF_DASH,
- GDK_CAP_NOT_LAST,
- GDK_JOIN_BEVEL);
-
- window = gtk_widget_get_window (widget);
-
- dash_list [0] = 1;
- dash_list [1] = 1;
-
- gdk_gc_set_dashes (dock->_priv->xor_gc, 1, dash_list, 2);
-
- gdk_draw_rectangle (window, dock->_priv->xor_gc, FALSE,
- rect->x, rect->y,
- rect->width, rect->height);
-
- gdk_gc_set_dashes (dock->_priv->xor_gc, 0, dash_list, 2);
-
- gdk_draw_rectangle (window, dock->_priv->xor_gc, FALSE,
- rect->x + 1, rect->y + 1,
- rect->width - 2, rect->height - 2);
-}
diff --git a/src/libgdl/gdl-dock.h b/src/libgdl/gdl-dock.h
deleted file mode 100644
index 2259d395d..000000000
--- a/src/libgdl/gdl-dock.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * This file is part of the GNOME Devtools Libraries.
- *
- * Copyright (C) 2002 Gustavo Giráldez <gustavo.giraldez@gmx.net>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __GDL_DOCK_H__
-#define __GDL_DOCK_H__
-
-#include <gtk/gtk.h>
-#include "libgdl/gdl-dock-object.h"
-#include "libgdl/gdl-dock-item.h"
-#include "libgdl/gdl-dock-placeholder.h"
-
-G_BEGIN_DECLS
-
-/* standard macros */
-#define GDL_TYPE_DOCK (gdl_dock_get_type ())
-#define GDL_DOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDL_TYPE_DOCK, GdlDock))
-#define GDL_DOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDL_TYPE_DOCK, GdlDockClass))
-#define GDL_IS_DOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDL_TYPE_DOCK))
-#define GDL_IS_DOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDL_TYPE_DOCK))
-#define GDL_DOCK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_DOCK, GdlDockClass))
-
-/* data types & structures */
-typedef struct _GdlDock GdlDock;
-typedef struct _GdlDockClass GdlDockClass;
-typedef struct _GdlDockPrivate GdlDockPrivate;
-
-struct _GdlDock {
- GdlDockObject object;
-
- GdlDockObject *root;
-
- GdlDockPrivate *_priv;
-};
-
-struct _GdlDockClass {
- GdlDockObjectClass parent_class;
-
- void (* layout_changed) (GdlDock *dock); /* proxy signal for the master */
-};
-
-/* additional macros */
-#define GDL_DOCK_IS_CONTROLLER(dock) \
- (gdl_dock_master_get_controller (GDL_DOCK_OBJECT_GET_MASTER (dock)) == \
- GDL_DOCK_OBJECT (dock))
-
-/* public interface */
-
-GtkWidget *gdl_dock_new (void);
-
-GtkWidget *gdl_dock_new_from (GdlDock *original,
- gboolean floating);
-
-GType gdl_dock_get_type (void);
-
-void gdl_dock_add_item (GdlDock *dock,
- GdlDockItem *item,
- GdlDockPlacement place);
-
-void gdl_dock_add_floating_item (GdlDock *dock,
- GdlDockItem *item,
- gint x,
- gint y,
- gint width,
- gint height);
-
-GdlDockItem *gdl_dock_get_item_by_name (GdlDock *dock,
- const gchar *name);
-
-GdlDockPlaceholder *gdl_dock_get_placeholder_by_name (GdlDock *dock,
- const gchar *name);
-
-GList *gdl_dock_get_named_items (GdlDock *dock);
-
-GdlDock *gdl_dock_object_get_toplevel (GdlDockObject *object);
-
-void gdl_dock_xor_rect (GdlDock *dock,
- GdkRectangle *rect);
-
-G_END_DECLS
-
-#endif
diff --git a/src/libgdl/gdl-i18n.c b/src/libgdl/gdl-i18n.c
deleted file mode 100644
index 5f92b66c7..000000000
--- a/src/libgdl/gdl-i18n.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation
- * All rights reserved.
- *
- * This file is part of the Gnome Devtools Library.
- *
- * The Gnome Devtools Library is free software; you can redistribute
- * it and/or modify it under the terms of the GNU Library General
- * Public License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * The Gnome Devtools Library is distributed in the hope that it will
- * be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with the Gnome Library; see the file COPYING.LIB. If not,
- * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "gdl-i18n.h"
-
-char *
-gdl_gettext (const char *msgid)
-{
- static gboolean initialized = FALSE;
-
- if (!initialized) {
-/* bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); */
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- initialized = TRUE;
- }
-
- return dgettext (GETTEXT_PACKAGE, msgid);
-}
-
-
diff --git a/src/libgdl/gdl-i18n.h b/src/libgdl/gdl-i18n.h
deleted file mode 100644
index 1582e957d..000000000
--- a/src/libgdl/gdl-i18n.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation
- * All rights reserved.
- *
- * This file is part of the Gnome Devtools Library.
- *
- * The Gnome Devtools Library is free software; you can redistribute
- * it and/or modify it under the terms of the GNU Library General
- * Public License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * The Gnome Devtools Library is distributed in the hope that it will
- * be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with the Gnome Library; see the file COPYING.LIB. If not,
- * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-/*
- @NOTATION@
- */
-
-/*
- * Handles all of the internationalization configuration options.
- * Author: Tom Tromey <tromey@creche.cygnus.com>
- */
-
-#ifndef __GDL_18N_H__
-#define __GDL_18N_H__ 1
-
-#include <glib.h>
-
-
-G_BEGIN_DECLS
-
-#ifdef ENABLE_NLS
-# include <libintl.h>
-# undef _
-# define _(String) gdl_gettext (String)
-# ifdef gettext_noop
-# define N_(String) gettext_noop (String)
-# else
-# define N_(String) (String)
-# endif
-#else
-/* Stubs that do something close enough. */
-# undef textdomain
-# define textdomain(String) (String)
-# undef gettext
-# define gettext(String) (String)
-# undef dgettext
-# define dgettext(Domain,Message) (Message)
-# undef dcgettext
-# define dcgettext(Domain,Message,Type) (Message)
-# undef bindtextdomain
-# define bindtextdomain(Domain,Directory) (Domain)
-# undef bind_textdomain_codeset
-# define bind_textdomain_codeset(Domain,CodeSet) (Domain)
-# undef _
-# define _(String) (String)
-# undef N_
-# define N_(String) (String)
-#endif
-
-char *gdl_gettext (const char *msgid);
-
-G_END_DECLS
-
-#endif /* __GDL_I18N_H__ */
diff --git a/src/libgdl/gdl-switcher.c b/src/libgdl/gdl-switcher.c
deleted file mode 100644
index 53a4b1989..000000000
--- a/src/libgdl/gdl-switcher.c
+++ /dev/null
@@ -1,1031 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 8 -*- */
-/* gdl-switcher.c
- *
- * Copyright (C) 2003 Ettore Perazzoli,
- * 2007 Naba Kumar
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- *
- * Copied and adapted from ESidebar.[ch] from evolution
- *
- * Authors: Ettore Perazzoli <ettore@ximian.com>
- * Naba Kumar <naba@gnome.org>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "gdl-i18n.h"
-#include "gdl-switcher.h"
-#include "libgdlmarshal.h"
-#include "libgdltypebuiltins.h"
-
-#include <gtk/gtk.h>
-
-static void gdl_switcher_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gdl_switcher_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
-
-static void gdl_switcher_add_button (GdlSwitcher *switcher,
- const gchar *label,
- const gchar *tooltips,
- const gchar *stock_id,
- GdkPixbuf *pixbuf_icon,
- gint switcher_id,
- GtkWidget *page);
-/* static void gdl_switcher_remove_button (GdlSwitcher *switcher, gint switcher_id); */
-static void gdl_switcher_select_page (GdlSwitcher *switcher, gint switcher_id);
-static void gdl_switcher_select_button (GdlSwitcher *switcher, gint switcher_id);
-static void gdl_switcher_set_show_buttons (GdlSwitcher *switcher, gboolean show);
-static void gdl_switcher_set_style (GdlSwitcher *switcher,
- GdlSwitcherStyle switcher_style);
-static GdlSwitcherStyle gdl_switcher_get_style (GdlSwitcher *switcher);
-
-enum {
- PROP_0,
- PROP_SWITCHER_STYLE
-};
-
-typedef struct {
- GtkWidget *button_widget;
- GtkWidget *label;
- GtkWidget *icon;
- GtkWidget *arrow;
- GtkWidget *hbox;
- GtkWidget *page;
- int id;
-} Button;
-
-struct _GdlSwitcherPrivate {
- GdlSwitcherStyle switcher_style;
- GdlSwitcherStyle toolbar_style;
-
- gboolean show;
- GSList *buttons;
-
- guint style_changed_id;
- gint buttons_height_request;
- gboolean in_toggle;
-};
-
-G_DEFINE_TYPE (GdlSwitcher, gdl_switcher, GTK_TYPE_NOTEBOOK)
-
-#define INTERNAL_MODE(switcher) (switcher->priv->switcher_style == \
- GDL_SWITCHER_STYLE_TOOLBAR ? switcher->priv->toolbar_style : \
- switcher->priv->switcher_style)
-
-#define H_PADDING 2
-#define V_PADDING 2
-
-/* Utility functions. */
-
-static void
-gdl_switcher_long_name_changed (GObject* object,
- GParamSpec* spec,
- gpointer user_data)
-{
- Button* button = user_data;
- gchar* label;
-
- g_object_get (object, "long-name", &label, NULL);
- gtk_label_set_text (GTK_LABEL (button->label), label);
- g_free (label);
-}
-
-static void
-gdl_switcher_stock_id_changed (GObject* object,
- GParamSpec* spec,
- gpointer user_data)
-{
- Button* button = user_data;
- gchar* id;
-
- g_object_get (object, "stock-id", &id, NULL);
- gtk_image_set_from_stock (GTK_IMAGE(button->icon), id, GTK_ICON_SIZE_MENU);
- g_free (id);
-}
-
-
-static Button *
-button_new (GtkWidget *button_widget, GtkWidget *label, GtkWidget *icon,
- GtkWidget *arrow, GtkWidget *hbox, int id, GtkWidget *page)
-{
- Button *button = g_new (Button, 1);
-
- button->button_widget = button_widget;
- button->label = label;
- button->icon = icon;
- button->arrow = arrow;
- button->hbox = hbox;
- button->id = id;
- button->page = page;
-
- g_signal_connect (page, "notify::long-name", G_CALLBACK (gdl_switcher_long_name_changed),
- button);
- g_signal_connect (page, "notify::stock-id", G_CALLBACK (gdl_switcher_stock_id_changed),
- button);
-
- g_object_ref (button_widget);
- g_object_ref (label);
- g_object_ref (icon);
- g_object_ref (arrow);
- g_object_ref (hbox);
-
- return button;
-}
-
-static void
-button_free (Button *button)
-{
- g_signal_handlers_disconnect_by_func (button->page,
- gdl_switcher_long_name_changed,
- button);
- g_signal_handlers_disconnect_by_func (button->page,
- gdl_switcher_stock_id_changed,
- button);
-
- g_object_unref (button->button_widget);
- g_object_unref (button->label);
- g_object_unref (button->icon);
- g_object_unref (button->hbox);
- g_free (button);
-}
-
-static gint
-gdl_switcher_get_page_id (GtkWidget *widget)
-{
- static gint switcher_id_count = 0;
- gint switcher_id;
- switcher_id = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget),
- "__switcher_id"));
- if (switcher_id <= 0) {
- switcher_id = ++switcher_id_count;
- g_object_set_data (G_OBJECT (widget), "__switcher_id",
- GINT_TO_POINTER (switcher_id));
- }
- return switcher_id;
-}
-
-static void
-update_buttons (GdlSwitcher *switcher, int new_selected_id)
-{
- GSList *p;
-
- switcher->priv->in_toggle = TRUE;
-
- for (p = switcher->priv->buttons; p != NULL; p = p->next) {
- Button *button = p->data;
-
- if (button->id == new_selected_id) {
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
- (button->button_widget), TRUE);
- gtk_widget_set_sensitive (button->arrow, TRUE);
- } else {
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
- (button->button_widget), FALSE);
- gtk_widget_set_sensitive (button->arrow, FALSE);
- }
- }
-
- switcher->priv->in_toggle = FALSE;
-}
-
-/* Callbacks. */
-
-static void
-button_toggled_callback (GtkToggleButton *toggle_button,
- GdlSwitcher *switcher)
-{
- int id = 0;
- gboolean is_active = FALSE;
- GSList *p;
-
- if (switcher->priv->in_toggle)
- return;
-
- switcher->priv->in_toggle = TRUE;
-
- if (gtk_toggle_button_get_active (toggle_button))
- is_active = TRUE;
-
- for (p = switcher->priv->buttons; p != NULL; p = p->next) {
- Button *button = p->data;
-
- if (button->button_widget != GTK_WIDGET (toggle_button)) {
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
- (button->button_widget), FALSE);
- gtk_widget_set_sensitive (button->arrow, FALSE);
- } else {
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
- (button->button_widget), TRUE);
- gtk_widget_set_sensitive (button->arrow, TRUE);
- id = button->id;
- }
- }
-
- switcher->priv->in_toggle = FALSE;
-
- if (is_active)
- {
- gdl_switcher_select_page (switcher, id);
- }
-}
-
-/* Returns -1 if layout didn't happen because a resize request was queued */
-static int
-layout_buttons (GdlSwitcher *switcher)
-{
- GtkRequisition client_requisition = {0,0};
- GtkAllocation allocation;
- GdlSwitcherStyle switcher_style;
- gboolean icons_only;
- int num_btns = g_slist_length (switcher->priv->buttons);
- unsigned int btns_per_row;
- GSList **rows, *p;
- Button *button;
- int row_number;
- int max_btn_width = 0, max_btn_height = 0;
- int optimal_layout_width = 0;
- int row_last;
- int x, y;
- int i;
- int rows_count;
- int last_buttons_height;
-
- gtk_widget_get_allocation (GTK_WIDGET (switcher), &allocation);
-
- last_buttons_height = switcher->priv->buttons_height_request;
-
- GTK_WIDGET_CLASS (gdl_switcher_parent_class)->size_request (GTK_WIDGET (switcher), &client_requisition);
-
- y = allocation.y + allocation.height - V_PADDING - 1;
-
- if (num_btns == 0)
- return y;
-
- switcher_style = INTERNAL_MODE (switcher);
- icons_only = (switcher_style == GDL_SWITCHER_STYLE_ICON);
-
- /* Figure out the max width and height */
- optimal_layout_width = H_PADDING;
- for (p = switcher->priv->buttons; p != NULL; p = p->next) {
- GtkRequisition requisition;
-
- button = p->data;
- gtk_widget_size_request (GTK_WIDGET (button->button_widget),
- &requisition);
- optimal_layout_width += requisition.width + H_PADDING;
- max_btn_height = MAX (max_btn_height, requisition.height);
- max_btn_width = MAX (max_btn_width, requisition.width);
- }
-
- /* Figure out how many rows and columns we'll use. */
- btns_per_row = allocation.width / (max_btn_width + H_PADDING);
- /* Use at least one column */
- if (btns_per_row == 0) btns_per_row = 1;
-
- /* If all the buttons could fit in the single row, have it so */
- if (allocation.width >= optimal_layout_width)
- {
- btns_per_row = num_btns;
- }
- if (!icons_only) {
- /* If using text buttons, we want to try to have a
- * completely filled-in grid, but if we can't, we want
- * the odd row to have just a single button.
- */
- while (num_btns % btns_per_row > 1)
- btns_per_row--;
- }
-
- rows_count = num_btns / btns_per_row;
- if (num_btns % btns_per_row != 0)
- rows_count++;
-
- /* Assign buttons to rows */
- rows = g_new0 (GSList *, rows_count);
-
- if (!icons_only && num_btns % btns_per_row != 0) {
- button = switcher->priv->buttons->data;
- rows [0] = g_slist_append (rows [0], button->button_widget);
-
- p = switcher->priv->buttons->next;
- row_number = p ? 1 : 0;
- } else {
- p = switcher->priv->buttons;
- row_number = 0;
- }
-
- for (; p != NULL; p = p->next) {
- button = p->data;
-
- if (g_slist_length (rows [row_number]) == btns_per_row)
- row_number ++;
-
- rows [row_number] = g_slist_append (rows [row_number],
- button->button_widget);
- }
-
- row_last = row_number;
-
- /* If there are more than 1 row of buttons, save the current height
- * requirement for subsequent size requests.
- */
- if (row_last > 0)
- {
- switcher->priv->buttons_height_request =
- (row_last + 1) * (max_btn_height + V_PADDING) + 1;
- } else { /* Otherwize clear it */
- if (last_buttons_height >= 0) {
-
- switcher->priv->buttons_height_request = -1;
- }
- }
-
- /* If it turns out that we now require smaller height for the buttons
- * than it was last time, make a resize request to ensure our
- * size requisition is properly communicated to the parent (otherwise
- * parent tend to keep assuming the older size).
- */
- if (last_buttons_height > switcher->priv->buttons_height_request)
- {
- gtk_widget_queue_resize (GTK_WIDGET (switcher));
- y = -1; // set return value
- }
- else
- {
- /* Layout the buttons. */
- for (i = row_last; i >= 0; i --) {
- int len, extra_width;
-
- y -= max_btn_height;
-
- /* Check for possible size over flow (taking into account client
- * requisition
- */
- if (y < (allocation.y + client_requisition.height)) {
- /* We have an overflow: Insufficient allocation */
- if (last_buttons_height < switcher->priv->buttons_height_request) {
- /* Request for a new resize */
- gtk_widget_queue_resize (GTK_WIDGET (switcher));
- y = -1; // set return value
- goto exit;
- }
- }
- x = H_PADDING + allocation.x;
- len = g_slist_length (rows[i]);
- if (switcher_style == GDL_SWITCHER_STYLE_TEXT ||
- switcher_style == GDL_SWITCHER_STYLE_BOTH)
- extra_width = (allocation.width - (len * max_btn_width )
- - (len * H_PADDING)) / len;
- else
- extra_width = 0;
- for (p = rows [i]; p != NULL; p = p->next) {
- GtkAllocation child_allocation;
-
- child_allocation.x = x;
- child_allocation.y = y;
- if (rows_count == 1 && row_number == 0)
- {
- GtkRequisition child_requisition;
- gtk_widget_size_request (GTK_WIDGET (p->data),
- &child_requisition);
- child_allocation.width = child_requisition.width;
- }
- else
- {
- child_allocation.width = max_btn_width + extra_width;
- }
- child_allocation.height = max_btn_height;
-
- gtk_widget_size_allocate (GTK_WIDGET (p->data), &child_allocation);
-
- x += child_allocation.width + H_PADDING;
- }
-
- y -= V_PADDING;
- }
- }
-
- exit:
- for (i = 0; i <= row_last; i ++) {
- g_slist_free (rows [i]);
- }
- g_free (rows);
-
- return y;
-}
-
-static void
-do_layout (GdlSwitcher *switcher)
-{
- GtkAllocation allocation;
- GtkAllocation child_allocation;
- int y;
-
- gtk_widget_get_allocation (GTK_WIDGET (switcher), &allocation);
-
- if (switcher->priv->show) {
- y = layout_buttons (switcher);
- if (y < 0) /* Layout did not happen and a resize was requested */
- return;
- }
- else
- y = allocation.y + allocation.height;
-
- /* Place the parent widget. */
- child_allocation.x = allocation.x;
- child_allocation.y = allocation.y;
- child_allocation.width = allocation.width;
- child_allocation.height = y - allocation.y;
-
- GTK_WIDGET_CLASS (gdl_switcher_parent_class)->size_allocate (GTK_WIDGET (switcher), &child_allocation);
-}
-
-/* GtkContainer methods. */
-
-static void
-gdl_switcher_forall (GtkContainer *container, gboolean include_internals,
- GtkCallback callback, void *callback_data)
-{
- GdlSwitcher *switcher =
- GDL_SWITCHER (container);
- GSList *p;
-
- GTK_CONTAINER_CLASS (gdl_switcher_parent_class)->forall (GTK_CONTAINER (switcher),
- include_internals,
- callback, callback_data);
- if (include_internals) {
- for (p = switcher->priv->buttons; p != NULL; p = p->next) {
- GtkWidget *widget = ((Button *) p->data)->button_widget;
- (* callback) (widget, callback_data);
- }
- }
-}
-
-static void
-gdl_switcher_remove (GtkContainer *container, GtkWidget *widget)
-{
- gint switcher_id;
- GdlSwitcher *switcher =
- GDL_SWITCHER (container);
- GSList *p;
-
- switcher_id = gdl_switcher_get_page_id (widget);
- for (p = switcher->priv->buttons; p != NULL; p = p->next) {
- Button *b = (Button *) p->data;
-
- if (b->id == switcher_id) {
- gtk_widget_unparent (b->button_widget);
- switcher->priv->buttons =
- g_slist_remove_link (switcher->priv->buttons, p);
- button_free (b);
- gtk_widget_queue_resize (GTK_WIDGET (switcher));
- break;
- }
- }
- GTK_CONTAINER_CLASS (gdl_switcher_parent_class)->remove (GTK_CONTAINER (switcher), widget);
-}
-
-/* GtkWidget methods. */
-
-static void
-gdl_switcher_size_request (GtkWidget *widget, GtkRequisition *requisition)
-{
- GdlSwitcher *switcher = GDL_SWITCHER (widget);
- GSList *p;
- gint button_height = 0;
-
- GTK_WIDGET_CLASS (gdl_switcher_parent_class)->size_request (GTK_WIDGET (switcher), requisition);
-
- if (!switcher->priv->show)
- return;
-
- for (p = switcher->priv->buttons; p != NULL; p = p->next) {
- gint button_width;
- Button *button = p->data;
- GtkRequisition button_requisition;
-
- gtk_widget_size_request (button->button_widget, &button_requisition);
- button_width = button_requisition.width + 2 * H_PADDING;
- requisition->width = MAX (requisition->width, button_width);
- button_height = MAX (button_height,
- button_requisition.height + 2 * V_PADDING);
- }
-
- if (switcher->priv->buttons_height_request > 0) {
- requisition->height += switcher->priv->buttons_height_request;
- } else {
- requisition->height += button_height + V_PADDING;
- }
-}
-
-static void
-gdl_switcher_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
-{
- gtk_widget_set_allocation (widget, allocation);
- do_layout (GDL_SWITCHER (widget));
-}
-
-static gint
-gdl_switcher_expose (GtkWidget *widget, GdkEventExpose *event)
-{
- GSList *p;
- GdlSwitcher *switcher = GDL_SWITCHER (widget);
- if (switcher->priv->show) {
- for (p = switcher->priv->buttons; p != NULL; p = p->next) {
- GtkWidget *button = ((Button *) p->data)->button_widget;
- gtk_container_propagate_expose (GTK_CONTAINER (widget),
- button, event);
- }
- }
- return GTK_WIDGET_CLASS (gdl_switcher_parent_class)->expose_event (widget, event);
-}
-
-static void
-gdl_switcher_map (GtkWidget *widget)
-{
- GSList *p;
- GdlSwitcher *switcher = GDL_SWITCHER (widget);
-
- if (switcher->priv->show) {
- for (p = switcher->priv->buttons; p != NULL; p = p->next) {
- GtkWidget *button = ((Button *) p->data)->button_widget;
- gtk_widget_map (button);
- }
- }
- GTK_WIDGET_CLASS (gdl_switcher_parent_class)->map (widget);
-}
-
-/* GObject methods. */
-
-static void
-gdl_switcher_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- GdlSwitcher *switcher = GDL_SWITCHER (object);
-
- switch (prop_id) {
- case PROP_SWITCHER_STYLE:
- gdl_switcher_set_style (switcher, g_value_get_enum (value));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-gdl_switcher_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- GdlSwitcher *switcher = GDL_SWITCHER (object);
-
- switch (prop_id) {
- case PROP_SWITCHER_STYLE:
- g_value_set_enum (value, gdl_switcher_get_style (switcher));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-gdl_switcher_dispose (GObject *object)
-{
- GdlSwitcherPrivate *priv = GDL_SWITCHER (object)->priv;
-
-#if HAVE_GNOME
- GConfClient *gconf_client = gconf_client_get_default ();
-
- if (priv->style_changed_id) {
- gconf_client_notify_remove (gconf_client, priv->style_changed_id);
- priv->style_changed_id = 0;
- }
- g_object_unref (gconf_client);
-#endif
-
- g_slist_foreach (priv->buttons, (GFunc) button_free, NULL);
- g_slist_free (priv->buttons);
- priv->buttons = NULL;
-
- G_OBJECT_CLASS (gdl_switcher_parent_class)->dispose (object);
-}
-
-static void
-gdl_switcher_finalize (GObject *object)
-{
- GdlSwitcherPrivate *priv = GDL_SWITCHER (object)->priv;
-
- g_free (priv);
-
- G_OBJECT_CLASS (gdl_switcher_parent_class)->finalize (object);
-}
-
-/* Signal handlers */
-
-static void
-gdl_switcher_notify_cb (GObject *g_object, GParamSpec *pspec,
- GdlSwitcher *switcher)
-{
-}
-
-static void
-gdl_switcher_switch_page_cb (GtkNotebook *nb, GtkWidget *page_widget,
- gint page_num, GdlSwitcher *switcher)
-{
- gint switcher_id;
-
- /* Change switcher button */
- switcher_id = gdl_switcher_get_page_id (page_widget);
- gdl_switcher_select_button (GDL_SWITCHER (switcher), switcher_id);
-}
-
-static void
-gdl_switcher_page_added_cb (GtkNotebook *nb, GtkWidget *page,
- gint page_num, GdlSwitcher *switcher)
-{
- gint switcher_id;
-
- (void)nb;
- (void)page_num;
- switcher_id = gdl_switcher_get_page_id (page);
-
- gdl_switcher_add_button (GDL_SWITCHER (switcher), NULL, NULL, NULL, NULL,
- switcher_id, page);
- gdl_switcher_select_button (GDL_SWITCHER (switcher), switcher_id);
-}
-
-static void
-gdl_switcher_select_page (GdlSwitcher *switcher, gint id)
-{
- GList *children, *node;
- children = gtk_container_get_children (GTK_CONTAINER (switcher));
- node = children;
- while (node)
- {
- gint switcher_id;
- switcher_id = gdl_switcher_get_page_id (GTK_WIDGET (node->data));
- if (switcher_id == id)
- {
- gint page_num;
- page_num = gtk_notebook_page_num (GTK_NOTEBOOK (switcher),
- GTK_WIDGET (node->data));
- g_signal_handlers_block_by_func (switcher,
- gdl_switcher_switch_page_cb,
- switcher);
- gtk_notebook_set_current_page (GTK_NOTEBOOK (switcher), page_num);
- g_signal_handlers_unblock_by_func (switcher,
- gdl_switcher_switch_page_cb,
- switcher);
- break;
- }
- node = g_list_next (node);
- }
- g_list_free (children);
-}
-
-/* Initialization. */
-
-static void
-gdl_switcher_class_init (GdlSwitcherClass *klass)
-{
- GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass);
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- container_class->forall = gdl_switcher_forall;
- container_class->remove = gdl_switcher_remove;
-
- widget_class->size_request = gdl_switcher_size_request;
- widget_class->size_allocate = gdl_switcher_size_allocate;
- widget_class->expose_event = gdl_switcher_expose;
- widget_class->map = gdl_switcher_map;
-
- object_class->dispose = gdl_switcher_dispose;
- object_class->finalize = gdl_switcher_finalize;
- object_class->set_property = gdl_switcher_set_property;
- object_class->get_property = gdl_switcher_get_property;
-
- g_object_class_install_property (
- object_class, PROP_SWITCHER_STYLE,
- g_param_spec_enum ("switcher-style", _("Switcher Style"),
- _("Switcher buttons style"),
- GDL_TYPE_SWITCHER_STYLE,
- GDL_SWITCHER_STYLE_BOTH,
- G_PARAM_READWRITE));
-
- gtk_rc_parse_string ("style \"gdl-button-style\"\n"
- "{\n"
- "GtkWidget::focus-padding = 1\n"
- "GtkWidget::focus-line-width = 1\n"
- "xthickness = 0\n"
- "ythickness = 0\n"
- "}\n"
- "widget \"*.gdl-button\" style \"gdl-button-style\"");
-}
-
-static void
-gdl_switcher_init (GdlSwitcher *switcher)
-{
- GdlSwitcherPrivate *priv;
-
- gtk_widget_set_has_window (GTK_WIDGET (switcher), FALSE);
-
- priv = g_new0 (GdlSwitcherPrivate, 1);
- switcher->priv = priv;
-
- priv->show = TRUE;
- priv->buttons_height_request = -1;
-
- gtk_notebook_set_tab_pos (GTK_NOTEBOOK (switcher), GTK_POS_BOTTOM);
- gtk_notebook_set_show_tabs (GTK_NOTEBOOK (switcher), FALSE);
- gtk_notebook_set_show_border (GTK_NOTEBOOK (switcher), FALSE);
- gdl_switcher_set_style (switcher, GDL_SWITCHER_STYLE_BOTH);
-
- /* notebook signals */
- g_signal_connect (switcher, "switch-page",
- G_CALLBACK (gdl_switcher_switch_page_cb), switcher);
- g_signal_connect (switcher, "page-added",
- G_CALLBACK (gdl_switcher_page_added_cb), switcher);
- g_signal_connect (switcher, "notify::show-tabs",
- G_CALLBACK (gdl_switcher_notify_cb), switcher);
-}
-
-GtkWidget *
-gdl_switcher_new (void)
-{
- GdlSwitcher *switcher = g_object_new (gdl_switcher_get_type (), NULL);
- return GTK_WIDGET (switcher);
-}
-
-static void
-gdl_switcher_add_button (GdlSwitcher *switcher, const gchar *label,
- const gchar *tooltips, const gchar *stock_id,
- GdkPixbuf *pixbuf_icon,
- gint switcher_id, GtkWidget* page)
-{
- GtkWidget *button_widget;
- GtkWidget *hbox;
- GtkWidget *icon_widget;
- GtkWidget *label_widget;
- GtkWidget *arrow;
-
- button_widget = gtk_toggle_button_new ();
- gtk_widget_set_name (button_widget, "gdl-button");
- gtk_button_set_relief (GTK_BUTTON(button_widget), GTK_RELIEF_HALF);
- if (switcher->priv->show)
- gtk_widget_show (button_widget);
- g_signal_connect (button_widget, "toggled",
- G_CALLBACK (button_toggled_callback),
- switcher);
- hbox = gtk_hbox_new (FALSE, 3);
- gtk_container_set_border_width (GTK_CONTAINER (hbox), 0);
- gtk_container_add (GTK_CONTAINER (button_widget), hbox);
- gtk_widget_show (hbox);
-
- if (stock_id) {
- icon_widget = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_MENU);
- } else if (pixbuf_icon) {
- icon_widget = gtk_image_new_from_pixbuf (pixbuf_icon);
- } else {
- icon_widget = gtk_image_new_from_stock (GTK_STOCK_NEW, GTK_ICON_SIZE_MENU);
- }
-
- gtk_widget_show (icon_widget);
-
- if (!label) {
- gchar *text = g_strdup_printf ("Item %d", switcher_id);
- label_widget = gtk_label_new (text);
- g_free (text);
- } else {
- label_widget = gtk_label_new (label);
- }
- gtk_misc_set_alignment (GTK_MISC (label_widget), 0.0, 0.5);
- gtk_widget_show (label_widget);
-
-
- gtk_widget_set_tooltip_text (button_widget,
- tooltips);
-
- switch (INTERNAL_MODE (switcher)) {
- case GDL_SWITCHER_STYLE_TEXT:
- gtk_box_pack_start (GTK_BOX (hbox), label_widget, TRUE, TRUE, 0);
- break;
- case GDL_SWITCHER_STYLE_ICON:
- gtk_box_pack_start (GTK_BOX (hbox), icon_widget, TRUE, TRUE, 0);
- break;
- case GDL_SWITCHER_STYLE_BOTH:
- default:
- gtk_box_pack_start (GTK_BOX (hbox), icon_widget, FALSE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), label_widget, TRUE, TRUE, 0);
- break;
- }
- arrow = gtk_arrow_new (GTK_ARROW_UP, GTK_SHADOW_NONE);
- gtk_widget_show (arrow);
- gtk_box_pack_start (GTK_BOX (hbox), arrow, FALSE, FALSE, 0);
-
- switcher->priv->buttons =
- g_slist_append (switcher->priv->buttons,
- button_new (button_widget, label_widget,
- icon_widget,
- arrow, hbox, switcher_id, page));
-
- gtk_widget_set_parent (button_widget, GTK_WIDGET (switcher));
- gtk_widget_queue_resize (GTK_WIDGET (switcher));
-}
-
-#if 0
-static void
-gdl_switcher_remove_button (GdlSwitcher *switcher, gint switcher_id)
-{
- GSList *p;
-
- for (p = switcher->priv->buttons; p != NULL; p = p->next) {
- Button *button = p->data;
-
- if (button->id == switcher_id)
- {
- gtk_container_remove (GTK_CONTAINER (switcher),
- button->button_widget);
- break;
- }
- }
- gtk_widget_queue_resize (GTK_WIDGET (switcher));
-}
-#endif
-
-static void
-gdl_switcher_select_button (GdlSwitcher *switcher, gint switcher_id)
-{
- update_buttons (switcher, switcher_id);
-
- /* Select the notebook page associated with this button */
- gdl_switcher_select_page (switcher, switcher_id);
-}
-
-
-gint
-gdl_switcher_insert_page (GdlSwitcher *switcher, GtkWidget *page,
- GtkWidget *tab_widget, const gchar *label,
- const gchar *tooltips, const gchar *stock_id,
- GdkPixbuf *pixbuf_icon, gint position)
-{
- gint ret_position;
- gint switcher_id;
- g_signal_handlers_block_by_func (switcher,
- gdl_switcher_page_added_cb,
- switcher);
-
- if (!tab_widget) {
- tab_widget = gtk_label_new (label);
- gtk_widget_show (tab_widget);
- }
- switcher_id = gdl_switcher_get_page_id (page);
- gdl_switcher_add_button (switcher, label, tooltips, stock_id, pixbuf_icon, switcher_id, page);
-
- ret_position = gtk_notebook_insert_page (GTK_NOTEBOOK (switcher), page,
- tab_widget, position);
- g_signal_handlers_unblock_by_func (switcher,
- gdl_switcher_page_added_cb,
- switcher);
-
- return ret_position;
-}
-
-static void
-set_switcher_style_toolbar (GdlSwitcher *switcher,
- GdlSwitcherStyle switcher_style)
-{
- GSList *p;
-
- if (switcher_style == GDL_SWITCHER_STYLE_NONE
- || switcher_style == GDL_SWITCHER_STYLE_TABS)
- return;
-
- if (switcher_style == GDL_SWITCHER_STYLE_TOOLBAR)
- switcher_style = GDL_SWITCHER_STYLE_BOTH;
-
- if (switcher_style == INTERNAL_MODE (switcher))
- return;
-
- gtk_notebook_set_show_tabs (GTK_NOTEBOOK (switcher), FALSE);
-
- for (p = switcher->priv->buttons; p != NULL; p = p->next) {
- Button *button = p->data;
-
- gtk_container_remove (GTK_CONTAINER (button->hbox), button->arrow);
-
- if (gtk_widget_get_parent (button->icon))
- gtk_container_remove (GTK_CONTAINER (button->hbox), button->icon);
- if (gtk_widget_get_parent (button->label))
- gtk_container_remove (GTK_CONTAINER (button->hbox), button->label);
-
- switch (switcher_style) {
- case GDL_SWITCHER_STYLE_TEXT:
- gtk_box_pack_start (GTK_BOX (button->hbox), button->label,
- TRUE, TRUE, 0);
- gtk_widget_show (button->label);
- break;
-
- case GDL_SWITCHER_STYLE_ICON:
- gtk_box_pack_start (GTK_BOX (button->hbox), button->icon,
- TRUE, TRUE, 0);
- gtk_widget_show (button->icon);
- break;
-
- case GDL_SWITCHER_STYLE_BOTH:
- gtk_box_pack_start (GTK_BOX (button->hbox), button->icon,
- FALSE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (button->hbox), button->label,
- TRUE, TRUE, 0);
- gtk_widget_show (button->icon);
- gtk_widget_show (button->label);
- break;
-
- default:
- break;
- }
-
- gtk_box_pack_start (GTK_BOX (button->hbox), button->arrow,
- FALSE, FALSE, 0);
- }
-
- gdl_switcher_set_show_buttons (switcher, TRUE);
-}
-
-static void
-gdl_switcher_set_style (GdlSwitcher *switcher, GdlSwitcherStyle switcher_style)
-{
- if (switcher->priv->switcher_style == switcher_style)
- return;
-
- if (switcher_style == GDL_SWITCHER_STYLE_NONE) {
- gdl_switcher_set_show_buttons (switcher, FALSE);
- gtk_notebook_set_show_tabs (GTK_NOTEBOOK (switcher), FALSE);
- }
- else if (switcher_style == GDL_SWITCHER_STYLE_TABS) {
- gdl_switcher_set_show_buttons (switcher, FALSE);
- gtk_notebook_set_show_tabs (GTK_NOTEBOOK (switcher), TRUE);
- }
- else
- set_switcher_style_toolbar (switcher, switcher_style);
-
- gtk_widget_queue_resize (GTK_WIDGET (switcher));
- switcher->priv->switcher_style = switcher_style;
-}
-
-static void
-gdl_switcher_set_show_buttons (GdlSwitcher *switcher, gboolean show)
-{
- GSList *p;
-
- if (switcher->priv->show == show)
- return;
-
- for (p = switcher->priv->buttons; p != NULL; p = p->next) {
- Button *button = p->data;
-
- if (show)
- gtk_widget_show (button->button_widget);
- else
- gtk_widget_hide (button->button_widget);
- }
-
- switcher->priv->show = show;
-
- gtk_widget_queue_resize (GTK_WIDGET (switcher));
-}
-
-static GdlSwitcherStyle
-gdl_switcher_get_style (GdlSwitcher *switcher)
-{
- if (!switcher->priv->show)
- return GDL_SWITCHER_STYLE_TABS;
- return switcher->priv->switcher_style;
-}
diff --git a/src/libgdl/gdl-switcher.h b/src/libgdl/gdl-switcher.h
deleted file mode 100644
index 0caf3a0aa..000000000
--- a/src/libgdl/gdl-switcher.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 8 -*- */
-/* gdl-switcher.h
- *
- * Copyright (C) 2003 Ettore Perazzoli
- * 2007 Naba Kumar
- *
-* This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- *
- * Authors: Ettore Perazzoli <ettore@ximian.com>
- * Naba Kumar <naba@gnome.org>
- */
-
-#ifndef _GDL_SWITCHER_H_
-#define _GDL_SWITCHER_H_
-
-#include <gtk/gtk.h>
-
-G_BEGIN_DECLS
-
-#define GDL_TYPE_SWITCHER (gdl_switcher_get_type ())
-#define GDL_SWITCHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDL_TYPE_SWITCHER, GdlSwitcher))
-#define GDL_SWITCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDL_TYPE_SWITCHER, GdlSwitcherClass))
-#define GDL_IS_SWITCHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDL_TYPE_SWITCHER))
-#define GDL_IS_SWITCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), GDL_TYPE_SWITCHER))
-
-typedef struct _GdlSwitcher GdlSwitcher;
-typedef struct _GdlSwitcherPrivate GdlSwitcherPrivate;
-typedef struct _GdlSwitcherClass GdlSwitcherClass;
-
-struct _GdlSwitcher {
- GtkNotebook parent;
-
- GdlSwitcherPrivate *priv;
-};
-
-struct _GdlSwitcherClass {
- GtkNotebookClass parent_class;
-};
-
-GType gdl_switcher_get_type (void);
-GtkWidget *gdl_switcher_new (void);
-
-gint gdl_switcher_insert_page (GdlSwitcher *switcher,
- GtkWidget *page,
- GtkWidget *tab_widget,
- const gchar *label,
- const gchar *tooltips,
- const gchar *stock_id,
- GdkPixbuf *pixbuf_icon,
- gint position);
-G_END_DECLS
-
-#endif /* _GDL_SWITCHER_H_ */
diff --git a/src/libgdl/gdl-win32.c b/src/libgdl/gdl-win32.c
deleted file mode 100644
index f23036ed6..000000000
--- a/src/libgdl/gdl-win32.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Windows stuff
- *
- * Author:
- * Albin Sunnanbo
- * Based on code by Lauris Kaplinski <lauris@kaplinski.com> (/src/extension/internal/win32.cpp)
- *
- * This code is in public domain
- */
-#ifdef WIN32
-
-#include "gdl-win32.h"
-#include <windows.h>
-
-/* Platform detection */
-gboolean
-is_os_vista()
-{
- static gboolean initialized = FALSE;
- static gboolean is_vista = FALSE;
- static OSVERSIONINFOA osver;
-
- if ( !initialized )
- {
- BOOL result;
-
- initialized = TRUE;
-
- memset (&osver, 0, sizeof(OSVERSIONINFOA));
- osver.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
- result = GetVersionExA (&osver);
- if (result)
- {
- if (osver.dwMajorVersion == WIN32_MAJORVERSION_VISTA)
- is_vista = TRUE;
- }
- }
-
- return is_vista;
-}
-
-#endif
diff --git a/src/libgdl/gdl-win32.h b/src/libgdl/gdl-win32.h
deleted file mode 100644
index 90c0cbafa..000000000
--- a/src/libgdl/gdl-win32.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Windows stuff
- *
- * Author:
- * Albin Sunnanbo
- *
- * This code is in public domain
- */
-#ifndef __INKSCAPE_GDL_WIN32_H__
-#define __INKSCAPE_GDL_WIN32_H__
-#ifdef WIN32
-
-#include <gdk/gdk.h>
-
-#define WIN32_MAJORVERSION_VISTA 0x0006
-
-/* Platform detection */
-gboolean is_os_vista();
-
-#endif // ifdef WIN32
-#endif /* __INKSCAPE_GDL_WIN32_H__ */
diff --git a/src/libgdl/gdl.h b/src/libgdl/gdl.h
deleted file mode 100644
index 235c5e3eb..000000000
--- a/src/libgdl/gdl.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * This file is part of the GNOME Devtools Libraries.
- *
- * Copyright (C) 1999-2000 Dave Camp <dave@helixcode.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __GDL_H__
-#define __GDL_H__
-
-#include "libgdl/gdl-dock-object.h"
-#include "libgdl/gdl-dock-master.h"
-#include "libgdl/gdl-dock.h"
-#include "libgdl/gdl-dock-item.h"
-#include "libgdl/gdl-dock-item-grip.h"
-#include "libgdl/gdl-dock-bar.h"
-
-#endif
diff --git a/src/libgdl/libgdlmarshal.c b/src/libgdl/libgdlmarshal.c
deleted file mode 100644
index a2a9fe220..000000000
--- a/src/libgdl/libgdlmarshal.c
+++ /dev/null
@@ -1,173 +0,0 @@
-#include "libgdlmarshal.h"
-
-#include <glib-object.h>
-
-
-#ifdef G_ENABLE_DEBUG
-#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v)
-#define g_marshal_value_peek_char(v) g_value_get_char (v)
-#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v)
-#define g_marshal_value_peek_int(v) g_value_get_int (v)
-#define g_marshal_value_peek_uint(v) g_value_get_uint (v)
-#define g_marshal_value_peek_long(v) g_value_get_long (v)
-#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v)
-#define g_marshal_value_peek_int64(v) g_value_get_int64 (v)
-#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v)
-#define g_marshal_value_peek_enum(v) g_value_get_enum (v)
-#define g_marshal_value_peek_flags(v) g_value_get_flags (v)
-#define g_marshal_value_peek_float(v) g_value_get_float (v)
-#define g_marshal_value_peek_double(v) g_value_get_double (v)
-#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v)
-#define g_marshal_value_peek_param(v) g_value_get_param (v)
-#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v)
-#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v)
-#define g_marshal_value_peek_object(v) g_value_get_object (v)
-#define g_marshal_value_peek_variant(v) g_value_get_variant (v)
-#else /* !G_ENABLE_DEBUG */
-/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
- * Do not access GValues directly in your code. Instead, use the
- * g_value_get_*() functions
- */
-#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int
-#define g_marshal_value_peek_char(v) (v)->data[0].v_int
-#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint
-#define g_marshal_value_peek_int(v) (v)->data[0].v_int
-#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint
-#define g_marshal_value_peek_long(v) (v)->data[0].v_long
-#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong
-#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64
-#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64
-#define g_marshal_value_peek_enum(v) (v)->data[0].v_long
-#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong
-#define g_marshal_value_peek_float(v) (v)->data[0].v_float
-#define g_marshal_value_peek_double(v) (v)->data[0].v_double
-#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer
-#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer
-#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer
-#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer
-#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer
-#define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer
-#endif /* !G_ENABLE_DEBUG */
-
-
-/* VOID:VOID (./libgdlmarshal.list:1) */
-
-/* VOID:ENUM (./libgdlmarshal.list:2) */
-
-/* VOID:INT,INT (./libgdlmarshal.list:3) */
-void
-gdl_marshal_VOID__INT_INT (GClosure *closure,
- GValue *return_value G_GNUC_UNUSED,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint G_GNUC_UNUSED,
- gpointer marshal_data)
-{
- typedef void (*GMarshalFunc_VOID__INT_INT) (gpointer data1,
- gint arg_1,
- gint arg_2,
- gpointer data2);
- register GMarshalFunc_VOID__INT_INT callback;
- register GCClosure *cc = (GCClosure*) closure;
- register gpointer data1, data2;
-
- g_return_if_fail (n_param_values == 3);
-
- if (G_CCLOSURE_SWAP_DATA (closure))
- {
- data1 = closure->data;
- data2 = g_value_peek_pointer (param_values + 0);
- }
- else
- {
- data1 = g_value_peek_pointer (param_values + 0);
- data2 = closure->data;
- }
- callback = (GMarshalFunc_VOID__INT_INT) (marshal_data ? marshal_data : cc->callback);
-
- callback (data1,
- g_marshal_value_peek_int (param_values + 1),
- g_marshal_value_peek_int (param_values + 2),
- data2);
-}
-
-/* VOID:UINT,UINT (./libgdlmarshal.list:4) */
-void
-gdl_marshal_VOID__UINT_UINT (GClosure *closure,
- GValue *return_value G_GNUC_UNUSED,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint G_GNUC_UNUSED,
- gpointer marshal_data)
-{
- typedef void (*GMarshalFunc_VOID__UINT_UINT) (gpointer data1,
- guint arg_1,
- guint arg_2,
- gpointer data2);
- register GMarshalFunc_VOID__UINT_UINT callback;
- register GCClosure *cc = (GCClosure*) closure;
- register gpointer data1, data2;
-
- g_return_if_fail (n_param_values == 3);
-
- if (G_CCLOSURE_SWAP_DATA (closure))
- {
- data1 = closure->data;
- data2 = g_value_peek_pointer (param_values + 0);
- }
- else
- {
- data1 = g_value_peek_pointer (param_values + 0);
- data2 = closure->data;
- }
- callback = (GMarshalFunc_VOID__UINT_UINT) (marshal_data ? marshal_data : cc->callback);
-
- callback (data1,
- g_marshal_value_peek_uint (param_values + 1),
- g_marshal_value_peek_uint (param_values + 2),
- data2);
-}
-
-/* VOID:BOOLEAN (./libgdlmarshal.list:5) */
-
-/* VOID:OBJECT,ENUM,BOXED (./libgdlmarshal.list:6) */
-void
-gdl_marshal_VOID__OBJECT_ENUM_BOXED (GClosure *closure,
- GValue *return_value G_GNUC_UNUSED,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint G_GNUC_UNUSED,
- gpointer marshal_data)
-{
- typedef void (*GMarshalFunc_VOID__OBJECT_ENUM_BOXED) (gpointer data1,
- gpointer arg_1,
- gint arg_2,
- gpointer arg_3,
- gpointer data2);
- register GMarshalFunc_VOID__OBJECT_ENUM_BOXED callback;
- register GCClosure *cc = (GCClosure*) closure;
- register gpointer data1, data2;
-
- g_return_if_fail (n_param_values == 4);
-
- if (G_CCLOSURE_SWAP_DATA (closure))
- {
- data1 = closure->data;
- data2 = g_value_peek_pointer (param_values + 0);
- }
- else
- {
- data1 = g_value_peek_pointer (param_values + 0);
- data2 = closure->data;
- }
- callback = (GMarshalFunc_VOID__OBJECT_ENUM_BOXED) (marshal_data ? marshal_data : cc->callback);
-
- callback (data1,
- g_marshal_value_peek_object (param_values + 1),
- g_marshal_value_peek_enum (param_values + 2),
- g_marshal_value_peek_boxed (param_values + 3),
- data2);
-}
-
-/* VOID:BOXED (./libgdlmarshal.list:7) */
-
diff --git a/src/libgdl/libgdlmarshal.h b/src/libgdl/libgdlmarshal.h
deleted file mode 100644
index 2d6bc800f..000000000
--- a/src/libgdl/libgdlmarshal.h
+++ /dev/null
@@ -1,48 +0,0 @@
-
-#ifndef __gdl_marshal_MARSHAL_H__
-#define __gdl_marshal_MARSHAL_H__
-
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-
-/* VOID:VOID (./libgdlmarshal.list:1) */
-#define gdl_marshal_VOID__VOID g_cclosure_marshal_VOID__VOID
-
-/* VOID:ENUM (./libgdlmarshal.list:2) */
-#define gdl_marshal_VOID__ENUM g_cclosure_marshal_VOID__ENUM
-
-/* VOID:INT,INT (./libgdlmarshal.list:3) */
-extern void gdl_marshal_VOID__INT_INT (GClosure *closure,
- GValue *return_value,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint,
- gpointer marshal_data);
-
-/* VOID:UINT,UINT (./libgdlmarshal.list:4) */
-extern void gdl_marshal_VOID__UINT_UINT (GClosure *closure,
- GValue *return_value,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint,
- gpointer marshal_data);
-
-/* VOID:BOOLEAN (./libgdlmarshal.list:5) */
-#define gdl_marshal_VOID__BOOLEAN g_cclosure_marshal_VOID__BOOLEAN
-
-/* VOID:OBJECT,ENUM,BOXED (./libgdlmarshal.list:6) */
-extern void gdl_marshal_VOID__OBJECT_ENUM_BOXED (GClosure *closure,
- GValue *return_value,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint,
- gpointer marshal_data);
-
-/* VOID:BOXED (./libgdlmarshal.list:7) */
-#define gdl_marshal_VOID__BOXED g_cclosure_marshal_VOID__BOXED
-
-G_END_DECLS
-
-#endif /* __gdl_marshal_MARSHAL_H__ */
-
diff --git a/src/libgdl/libgdlmarshal.list b/src/libgdl/libgdlmarshal.list
deleted file mode 100644
index 750989abc..000000000
--- a/src/libgdl/libgdlmarshal.list
+++ /dev/null
@@ -1,7 +0,0 @@
-VOID:VOID
-VOID:ENUM
-VOID:INT,INT
-VOID:UINT,UINT
-VOID:BOOLEAN
-VOID:OBJECT,ENUM,BOXED
-VOID:BOXED
diff --git a/src/libgdl/libgdltypebuiltins.c b/src/libgdl/libgdltypebuiltins.c
deleted file mode 100644
index b347fe6f5..000000000
--- a/src/libgdl/libgdltypebuiltins.c
+++ /dev/null
@@ -1,162 +0,0 @@
-
-
-
-#include <glib-object.h>
-#include "libgdltypebuiltins.h"
-
-
-/* enumerations from "gdl-dock-object.h" */
-static const GFlagsValue _gdl_dock_param_flags_values[] = {
- { GDL_DOCK_PARAM_EXPORT, "GDL_DOCK_PARAM_EXPORT", "export" },
- { GDL_DOCK_PARAM_AFTER, "GDL_DOCK_PARAM_AFTER", "after" },
- { 0, NULL, NULL }
-};
-
-GType
-gdl_dock_param_flags_get_type (void)
-{
- static GType type = 0;
-
- if (!type)
- type = g_flags_register_static ("GdlDockParamFlags", _gdl_dock_param_flags_values);
-
- return type;
-}
-
-static const GFlagsValue _gdl_dock_object_flags_values[] = {
- { GDL_DOCK_AUTOMATIC, "GDL_DOCK_AUTOMATIC", "automatic" },
- { GDL_DOCK_ATTACHED, "GDL_DOCK_ATTACHED", "attached" },
- { GDL_DOCK_IN_REFLOW, "GDL_DOCK_IN_REFLOW", "in-reflow" },
- { GDL_DOCK_IN_DETACH, "GDL_DOCK_IN_DETACH", "in-detach" },
- { 0, NULL, NULL }
-};
-
-GType
-gdl_dock_object_flags_get_type (void)
-{
- static GType type = 0;
-
- if (!type)
- type = g_flags_register_static ("GdlDockObjectFlags", _gdl_dock_object_flags_values);
-
- return type;
-}
-
-static const GEnumValue _gdl_dock_placement_values[] = {
- { GDL_DOCK_NONE, "GDL_DOCK_NONE", "none" },
- { GDL_DOCK_TOP, "GDL_DOCK_TOP", "top" },
- { GDL_DOCK_BOTTOM, "GDL_DOCK_BOTTOM", "bottom" },
- { GDL_DOCK_RIGHT, "GDL_DOCK_RIGHT", "right" },
- { GDL_DOCK_LEFT, "GDL_DOCK_LEFT", "left" },
- { GDL_DOCK_CENTER, "GDL_DOCK_CENTER", "center" },
- { GDL_DOCK_FLOATING, "GDL_DOCK_FLOATING", "floating" },
- { 0, NULL, NULL }
-};
-
-GType
-gdl_dock_placement_get_type (void)
-{
- static GType type = 0;
-
- if (!type)
- type = g_enum_register_static ("GdlDockPlacement", _gdl_dock_placement_values);
-
- return type;
-}
-
-
-/* enumerations from "gdl-dock-master.h" */
-static const GEnumValue _gdl_switcher_style_values[] = {
- { GDL_SWITCHER_STYLE_TEXT, "GDL_SWITCHER_STYLE_TEXT", "text" },
- { GDL_SWITCHER_STYLE_ICON, "GDL_SWITCHER_STYLE_ICON", "icon" },
- { GDL_SWITCHER_STYLE_BOTH, "GDL_SWITCHER_STYLE_BOTH", "both" },
- { GDL_SWITCHER_STYLE_TOOLBAR, "GDL_SWITCHER_STYLE_TOOLBAR", "toolbar" },
- { GDL_SWITCHER_STYLE_TABS, "GDL_SWITCHER_STYLE_TABS", "tabs" },
- { GDL_SWITCHER_STYLE_NONE, "GDL_SWITCHER_STYLE_NONE", "none" },
- { 0, NULL, NULL }
-};
-
-GType
-gdl_switcher_style_get_type (void)
-{
- static GType type = 0;
-
- if (!type)
- type = g_enum_register_static ("GdlSwitcherStyle", _gdl_switcher_style_values);
-
- return type;
-}
-
-
-/* enumerations from "gdl-dock-item.h" */
-static const GFlagsValue _gdl_dock_item_behavior_values[] = {
- { GDL_DOCK_ITEM_BEH_NORMAL, "GDL_DOCK_ITEM_BEH_NORMAL", "normal" },
- { GDL_DOCK_ITEM_BEH_NEVER_FLOATING, "GDL_DOCK_ITEM_BEH_NEVER_FLOATING", "never-floating" },
- { GDL_DOCK_ITEM_BEH_NEVER_VERTICAL, "GDL_DOCK_ITEM_BEH_NEVER_VERTICAL", "never-vertical" },
- { GDL_DOCK_ITEM_BEH_NEVER_HORIZONTAL, "GDL_DOCK_ITEM_BEH_NEVER_HORIZONTAL", "never-horizontal" },
- { GDL_DOCK_ITEM_BEH_LOCKED, "GDL_DOCK_ITEM_BEH_LOCKED", "locked" },
- { GDL_DOCK_ITEM_BEH_CANT_DOCK_TOP, "GDL_DOCK_ITEM_BEH_CANT_DOCK_TOP", "cant-dock-top" },
- { GDL_DOCK_ITEM_BEH_CANT_DOCK_BOTTOM, "GDL_DOCK_ITEM_BEH_CANT_DOCK_BOTTOM", "cant-dock-bottom" },
- { GDL_DOCK_ITEM_BEH_CANT_DOCK_LEFT, "GDL_DOCK_ITEM_BEH_CANT_DOCK_LEFT", "cant-dock-left" },
- { GDL_DOCK_ITEM_BEH_CANT_DOCK_RIGHT, "GDL_DOCK_ITEM_BEH_CANT_DOCK_RIGHT", "cant-dock-right" },
- { GDL_DOCK_ITEM_BEH_CANT_DOCK_CENTER, "GDL_DOCK_ITEM_BEH_CANT_DOCK_CENTER", "cant-dock-center" },
- { GDL_DOCK_ITEM_BEH_CANT_CLOSE, "GDL_DOCK_ITEM_BEH_CANT_CLOSE", "cant-close" },
- { GDL_DOCK_ITEM_BEH_CANT_ICONIFY, "GDL_DOCK_ITEM_BEH_CANT_ICONIFY", "cant-iconify" },
- { GDL_DOCK_ITEM_BEH_NO_GRIP, "GDL_DOCK_ITEM_BEH_NO_GRIP", "no-grip" },
- { 0, NULL, NULL }
-};
-
-GType
-gdl_dock_item_behavior_get_type (void)
-{
- static GType type = 0;
-
- if (!type)
- type = g_flags_register_static ("GdlDockItemBehavior", _gdl_dock_item_behavior_values);
-
- return type;
-}
-
-static const GFlagsValue _gdl_dock_item_flags_values[] = {
- { GDL_DOCK_IN_DRAG, "GDL_DOCK_IN_DRAG", "in-drag" },
- { GDL_DOCK_IN_PREDRAG, "GDL_DOCK_IN_PREDRAG", "in-predrag" },
- { GDL_DOCK_ICONIFIED, "GDL_DOCK_ICONIFIED", "iconified" },
- { GDL_DOCK_USER_ACTION, "GDL_DOCK_USER_ACTION", "user-action" },
- { 0, NULL, NULL }
-};
-
-GType
-gdl_dock_item_flags_get_type (void)
-{
- static GType type = 0;
-
- if (!type)
- type = g_flags_register_static ("GdlDockItemFlags", _gdl_dock_item_flags_values);
-
- return type;
-}
-
-
-/* enumerations from "gdl-dock-bar.h" */
-static const GEnumValue _gdl_dock_bar_style_values[] = {
- { GDL_DOCK_BAR_ICONS, "GDL_DOCK_BAR_ICONS", "icons" },
- { GDL_DOCK_BAR_TEXT, "GDL_DOCK_BAR_TEXT", "text" },
- { GDL_DOCK_BAR_BOTH, "GDL_DOCK_BAR_BOTH", "both" },
- { GDL_DOCK_BAR_AUTO, "GDL_DOCK_BAR_AUTO", "auto" },
- { 0, NULL, NULL }
-};
-
-GType
-gdl_dock_bar_style_get_type (void)
-{
- static GType type = 0;
-
- if (!type)
- type = g_enum_register_static ("GdlDockBarStyle", _gdl_dock_bar_style_values);
-
- return type;
-}
-
-
-
-
diff --git a/src/libgdl/libgdltypebuiltins.h b/src/libgdl/libgdltypebuiltins.h
deleted file mode 100644
index 19eac4989..000000000
--- a/src/libgdl/libgdltypebuiltins.h
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-#ifndef __LIBGDLTYPEBUILTINS_H__
-#define __LIBGDLTYPEBUILTINS_H__ 1
-
-#include "libgdl/gdl.h"
-
-G_BEGIN_DECLS
-
-
-/* --- gdl-dock-object.h --- */
-#define GDL_TYPE_DOCK_PARAM_FLAGS gdl_dock_param_flags_get_type()
-GType gdl_dock_param_flags_get_type (void);
-#define GDL_TYPE_DOCK_OBJECT_FLAGS gdl_dock_object_flags_get_type()
-GType gdl_dock_object_flags_get_type (void);
-#define GDL_TYPE_DOCK_PLACEMENT gdl_dock_placement_get_type()
-GType gdl_dock_placement_get_type (void);
-
-/* --- gdl-dock-master.h --- */
-#define GDL_TYPE_SWITCHER_STYLE gdl_switcher_style_get_type()
-GType gdl_switcher_style_get_type (void);
-
-/* --- gdl-dock-item.h --- */
-#define GDL_TYPE_DOCK_ITEM_BEHAVIOR gdl_dock_item_behavior_get_type()
-GType gdl_dock_item_behavior_get_type (void);
-#define GDL_TYPE_DOCK_ITEM_FLAGS gdl_dock_item_flags_get_type()
-GType gdl_dock_item_flags_get_type (void);
-
-/* --- gdl-dock-bar.h --- */
-#define GDL_TYPE_DOCK_BAR_STYLE gdl_dock_bar_style_get_type()
-GType gdl_dock_bar_style_get_type (void);
-G_END_DECLS
-
-#endif /* __LIBGDLTYPEBUILTINS_H__ */
-
-
-
diff --git a/src/libgdl/makefile.in b/src/libgdl/makefile.in
deleted file mode 100644
index 9dc8cb2ca..000000000
--- a/src/libgdl/makefile.in
+++ /dev/null
@@ -1,17 +0,0 @@
-# Convenience stub makefile to call the real Makefile.
-
-@SET_MAKE@
-
-OBJEXT = @OBJEXT@
-
-# Explicit so that it's the default rule.
-all:
- cd .. && $(MAKE) libgdl/all
-
-clean %.a %.$(OBJEXT):
- cd .. && $(MAKE) libgdl/$@
-
-.PHONY: all clean
-
-.SUFFIXES:
-.SUFFIXES: .a .$(OBJEXT)
diff --git a/src/libnrtype/Makefile_insert b/src/libnrtype/Makefile_insert
deleted file mode 100644
index ab9465daa..000000000
--- a/src/libnrtype/Makefile_insert
+++ /dev/null
@@ -1,28 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-ink_common_sources += \
- libnrtype/boundary-type.h \
- libnrtype/font-glyph.h \
- libnrtype/font-instance.h \
- libnrtype/font-style.h \
- libnrtype/nr-type-primitives.cpp \
- libnrtype/nr-type-primitives.h \
- libnrtype/FontFactory.cpp \
- libnrtype/FontFactory.h \
- libnrtype/FontInstance.cpp \
- libnrtype/font-lister.h \
- libnrtype/font-lister.cpp \
- libnrtype/one-box.h \
- libnrtype/one-glyph.h \
- libnrtype/one-para.h \
- libnrtype/text-boundary.h \
- libnrtype/TextWrapper.cpp \
- libnrtype/TextWrapper.h \
- libnrtype/Layout-TNG-Compute.cpp \
- libnrtype/Layout-TNG-Input.cpp \
- libnrtype/Layout-TNG-OutIter.cpp \
- libnrtype/Layout-TNG-Output.cpp \
- libnrtype/Layout-TNG-Scanline-Maker.h \
- libnrtype/Layout-TNG-Scanline-Makers.cpp \
- libnrtype/Layout-TNG.cpp \
- libnrtype/Layout-TNG.h
diff --git a/src/libnrtype/font-lister.cpp b/src/libnrtype/font-lister.cpp
index 568a7c8cc..4deae821a 100644
--- a/src/libnrtype/font-lister.cpp
+++ b/src/libnrtype/font-lister.cpp
@@ -298,8 +298,8 @@ void FontLister::update_font_list_recursive(SPObject *r, std::list<Glib::ustring
l->push_back(Glib::ustring(font_family));
}
- for (SPObject *child = r->firstChild(); child; child = child->getNext()) {
- update_font_list_recursive(child, l);
+ for (auto& child: r->children) {
+ update_font_list_recursive(&child, l);
}
}
diff --git a/src/libuemf/Makefile_insert b/src/libuemf/Makefile_insert
deleted file mode 100644
index 427a0e80e..000000000
--- a/src/libuemf/Makefile_insert
+++ /dev/null
@@ -1,30 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-libuemf/all: libuemf.a
-
-libuemf/clean:
- rm -f libuemf/libuemf.a $(libuemf_libuemf_a_OBJECTS)
-
-libuemf_libuemf_a_SOURCES = \
- libuemf/uemf.c \
- libuemf/uemf.h \
- libuemf/uemf_endian.c \
- libuemf/uemf_endian.h \
- libuemf/uemf_print.c \
- libuemf/uemf_print.h \
- libuemf/uemf_safe.c \
- libuemf/uemf_safe.h \
- libuemf/uemf_utf.c \
- libuemf/uemf_utf.h \
- libuemf/uwmf.c \
- libuemf/uwmf.h \
- libuemf/uwmf_endian.c \
- libuemf/uwmf_endian.h \
- libuemf/uwmf_print.c \
- libuemf/uwmf_print.h \
- libuemf/upmf.c \
- libuemf/upmf.h \
- libuemf/upmf_print.c \
- libuemf/upmf_print.h \
- libuemf/symbol_convert.c \
- libuemf/symbol_convert.h
diff --git a/src/libvpsc/Makefile_insert b/src/libvpsc/Makefile_insert
deleted file mode 100644
index cb05be6c0..000000000
--- a/src/libvpsc/Makefile_insert
+++ /dev/null
@@ -1,23 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-libvpsc/all: libvpsc/libvpsc.a
-
-libvpsc/clean:
- rm -f libvpsc/libvpsc.a $(libvpsc_libvpsc_a_OBJECTS)
-
-libvpsc_libvpsc_a_SOURCES = libvpsc/block.cpp\
- libvpsc/blocks.cpp\
- libvpsc/constraint.cpp\
- libvpsc/generate-constraints.cpp\
- libvpsc/pairingheap/PairingHeap.cpp\
- libvpsc/remove_rectangle_overlap.cpp\
- libvpsc/solve_VPSC.cpp\
- libvpsc/variable.cpp\
- libvpsc/block.h\
- libvpsc/blocks.h\
- libvpsc/constraint.h\
- libvpsc/generate-constraints.h\
- libvpsc/pairingheap/PairingHeap.h\
- libvpsc/pairingheap/dsexceptions.h\
- libvpsc/remove_rectangle_overlap.h\
- libvpsc/solve_VPSC.h\
- libvpsc/variable.h
diff --git a/src/livarot/Makefile_insert b/src/livarot/Makefile_insert
deleted file mode 100644
index 69078d073..000000000
--- a/src/livarot/Makefile_insert
+++ /dev/null
@@ -1,41 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-livarot/all: livarot/libvarot.a
-
-livarot/clean:
- rm -f livarot/libvarot.a $(livarot_libvarot_a_OBJECTS)
-
-livarot_libvarot_a_SOURCES = \
- livarot/AVL.cpp \
- livarot/AVL.h \
- livarot/AlphaLigne.cpp \
- livarot/AlphaLigne.h \
- livarot/BitLigne.cpp \
- livarot/BitLigne.h \
- livarot/float-line.cpp \
- livarot/float-line.h \
- livarot/int-line.cpp \
- livarot/int-line.h \
- livarot/LivarotDefs.h \
- livarot/Path.cpp \
- livarot/Path.h \
- livarot/PathConversion.cpp \
- livarot/PathCutting.cpp \
- livarot/PathOutline.cpp \
- livarot/PathSimplify.cpp \
- livarot/PathStroke.cpp \
- livarot/Shape.cpp \
- livarot/Shape.h \
- livarot/ShapeDraw.cpp \
- livarot/ShapeMisc.cpp \
- livarot/ShapeRaster.cpp \
- livarot/ShapeSweep.cpp \
- livarot/sweep-tree-list.cpp \
- livarot/sweep-tree-list.h \
- livarot/sweep-tree.cpp \
- livarot/sweep-tree.h \
- livarot/sweep-event.cpp \
- livarot/sweep-event.h \
- livarot/sweep-event-queue.h \
- livarot/path-description.h \
- livarot/path-description.cpp
diff --git a/src/live_effects/Makefile_insert b/src/live_effects/Makefile_insert
deleted file mode 100644
index b5bee55c8..000000000
--- a/src/live_effects/Makefile_insert
+++ /dev/null
@@ -1,115 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-ink_common_sources += \
- live_effects/effect.cpp \
- live_effects/effect.h \
- live_effects/effect-enum.h \
- live_effects/lpeobject.cpp \
- live_effects/lpeobject.h \
- live_effects/lpegroupbbox.cpp \
- live_effects/lpegroupbbox.h \
- live_effects/lpeobject-reference.cpp \
- live_effects/lpeobject-reference.h \
- live_effects/lpe-patternalongpath.cpp \
- live_effects/lpe-patternalongpath.h \
- live_effects/lpe-bendpath.cpp \
- live_effects/lpe-bendpath.h \
- live_effects/lpe-dynastroke.cpp \
- live_effects/lpe-dynastroke.h \
- live_effects/lpe-extrude.cpp \
- live_effects/lpe-extrude.h \
- live_effects/lpe-sketch.cpp \
- live_effects/lpe-sketch.h \
- live_effects/lpe-knot.cpp \
- live_effects/lpe-knot.h \
- live_effects/lpe-vonkoch.cpp \
- live_effects/lpe-vonkoch.h \
- live_effects/lpe-rough-hatches.cpp \
- live_effects/lpe-rough-hatches.h \
- live_effects/lpe-curvestitch.cpp \
- live_effects/lpe-curvestitch.h \
- live_effects/lpe-constructgrid.cpp \
- live_effects/lpe-constructgrid.h \
- live_effects/lpe-fillet-chamfer.cpp \
- live_effects/lpe-fillet-chamfer.h \
- live_effects/lpe-gears.cpp \
- live_effects/lpe-gears.h \
- live_effects/lpe-interpolate.cpp \
- live_effects/lpe-interpolate.h \
- live_effects/lpe-interpolate_points.cpp \
- live_effects/lpe-interpolate_points.h \
- live_effects/lpe-test-doEffect-stack.cpp \
- live_effects/lpe-test-doEffect-stack.h \
- live_effects/lpe-bspline.cpp \
- live_effects/lpe-bspline.h \
- live_effects/lpe-lattice.cpp \
- live_effects/lpe-lattice.h \
- live_effects/lpe-lattice2.cpp \
- live_effects/lpe-lattice2.h \
- live_effects/lpe-roughen.cpp \
- live_effects/lpe-roughen.h \
- live_effects/lpe-show_handles.cpp \
- live_effects/lpe-show_handles.h \
- live_effects/lpe-simplify.cpp \
- live_effects/lpe-simplify.h \
- live_effects/lpe-envelope.cpp \
- live_effects/lpe-envelope.h \
- live_effects/lpe-spiro.cpp \
- live_effects/lpe-spiro.h \
- live_effects/lpe-tangent_to_curve.cpp \
- live_effects/lpe-tangent_to_curve.h \
- live_effects/lpe-perp_bisector.cpp \
- live_effects/lpe-perp_bisector.h \
- live_effects/spiro.h \
- live_effects/spiro.cpp \
- live_effects/spiro-converters.h \
- live_effects/spiro-converters.cpp \
- live_effects/lpe-circle_with_radius.cpp \
- live_effects/lpe-circle_with_radius.h \
- live_effects/lpe-perspective_path.cpp \
- live_effects/lpe-perspective_path.h \
- live_effects/lpe-perspective-envelope.cpp \
- live_effects/lpe-perspective-envelope.h \
- live_effects/lpe-mirror_symmetry.cpp \
- live_effects/lpe-mirror_symmetry.h \
- live_effects/lpe-circle_3pts.cpp \
- live_effects/lpe-circle_3pts.h \
- live_effects/lpe-transform_2pts.cpp \
- live_effects/lpe-transform_2pts.h \
- live_effects/lpe-angle_bisector.cpp \
- live_effects/lpe-angle_bisector.h \
- live_effects/lpe-parallel.cpp \
- live_effects/lpe-parallel.h \
- live_effects/lpe-copy_rotate.cpp \
- live_effects/lpe-copy_rotate.h \
- live_effects/lpe-powerstroke.cpp \
- live_effects/lpe-powerstroke.h \
- live_effects/lpe-powerstroke-interpolators.h \
- live_effects/lpe-offset.cpp \
- live_effects/lpe-offset.h \
- live_effects/lpe-clone-original.cpp \
- live_effects/lpe-clone-original.h \
- live_effects/lpe-ruler.cpp \
- live_effects/lpe-ruler.h \
- live_effects/lpe-recursiveskeleton.cpp \
- live_effects/lpe-recursiveskeleton.h \
- live_effects/lpe-text_label.cpp \
- live_effects/lpe-text_label.h \
- live_effects/lpe-path_length.cpp \
- live_effects/lpe-path_length.h \
- live_effects/lpe-line_segment.cpp \
- live_effects/lpe-line_segment.h \
- live_effects/lpe-bounding-box.cpp \
- live_effects/lpe-bounding-box.h \
- live_effects/lpe-attach-path.cpp \
- live_effects/lpe-attach-path.h \
- live_effects/lpe-fill-between-strokes.cpp \
- live_effects/lpe-fill-between-strokes.h \
- live_effects/lpe-fill-between-many.cpp \
- live_effects/lpe-fill-between-many.h \
- live_effects/lpe-ellipse_5pts.cpp \
- live_effects/lpe-ellipse_5pts.h \
- live_effects/lpe-jointype.cpp \
- live_effects/lpe-jointype.h \
- live_effects/lpe-taperstroke.cpp \
- live_effects/lpe-taperstroke.h
diff --git a/src/live_effects/lpe-perspective_path.cpp b/src/live_effects/lpe-perspective_path.cpp
index 6857d4363..cb4e43d87 100644
--- a/src/live_effects/lpe-perspective_path.cpp
+++ b/src/live_effects/lpe-perspective_path.cpp
@@ -102,12 +102,12 @@ void LPEPerspectivePath::refresh(Gtk::Entry* perspective) {
perspectiveID = perspective->get_text();
Persp3D *first = 0;
Persp3D *persp = 0;
- for ( SPObject *child = this->lpeobj->document->getDefs()->firstChild(); child && !persp; child = child->getNext() ) {
- if (SP_IS_PERSP3D(child) && first == 0) {
- first = SP_PERSP3D(child);
+ for (auto& child: lpeobj->document->getDefs()->children) {
+ if (SP_IS_PERSP3D(&child) && first == 0) {
+ first = SP_PERSP3D(&child);
}
- if (SP_IS_PERSP3D(child) && strcmp(child->getId(), const_cast<const gchar *>(perspectiveID.c_str())) == 0) {
- persp = SP_PERSP3D(child);
+ if (SP_IS_PERSP3D(&child) && strcmp(child.getId(), const_cast<const gchar *>(perspectiveID.c_str())) == 0) {
+ persp = SP_PERSP3D(&child);
break;
}
}
diff --git a/src/live_effects/parameter/Makefile_insert b/src/live_effects/parameter/Makefile_insert
deleted file mode 100644
index bd1c5b600..000000000
--- a/src/live_effects/parameter/Makefile_insert
+++ /dev/null
@@ -1,36 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-ink_common_sources += \
- live_effects/parameter/parameter.cpp \
- live_effects/parameter/parameter.h \
- live_effects/parameter/array.cpp \
- live_effects/parameter/array.h \
- live_effects/parameter/bool.cpp \
- live_effects/parameter/bool.h \
- live_effects/parameter/random.cpp \
- live_effects/parameter/random.h \
- live_effects/parameter/point.cpp \
- live_effects/parameter/point.h \
- live_effects/parameter/enum.h \
- live_effects/parameter/path-reference.cpp \
- live_effects/parameter/path-reference.h \
- live_effects/parameter/path.cpp \
- live_effects/parameter/path.h \
- live_effects/parameter/originalpath.cpp \
- live_effects/parameter/originalpath.h \
- live_effects/parameter/originalpatharray.cpp \
- live_effects/parameter/originalpatharray.h \
- live_effects/parameter/powerstrokepointarray.cpp \
- live_effects/parameter/powerstrokepointarray.h \
- live_effects/parameter/filletchamferpointarray.cpp \
- live_effects/parameter/filletchamferpointarray.h \
- live_effects/parameter/text.cpp \
- live_effects/parameter/text.h \
- live_effects/parameter/transformedpoint.cpp \
- live_effects/parameter/transformedpoint.h \
- live_effects/parameter/togglebutton.cpp \
- live_effects/parameter/togglebutton.h \
- live_effects/parameter/unit.cpp \
- live_effects/parameter/unit.h \
- live_effects/parameter/vector.cpp \
- live_effects/parameter/vector.h
diff --git a/src/live_effects/parameter/togglebutton.cpp b/src/live_effects/parameter/togglebutton.cpp
index c761731b7..023bebc03 100644
--- a/src/live_effects/parameter/togglebutton.cpp
+++ b/src/live_effects/parameter/togglebutton.cpp
@@ -74,12 +74,8 @@ ToggleButtonParam::param_newWidget()
false,
param_effect->getRepr(),
param_effect->getSPDoc()) );
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget * box_button = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+ auto box_button = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous(GTK_BOX(box_button), false);
-#else
- GtkWidget * box_button = gtk_hbox_new (false, 0);
-#endif
GtkWidget * label_button = gtk_label_new ("");
if (!param_label.empty()) {
if(value || inactive_label.empty()){
diff --git a/src/main-cmdlineact.cpp b/src/main-cmdlineact.cpp
index d22b513d6..c1b756ad5 100644
--- a/src/main-cmdlineact.cpp
+++ b/src/main-cmdlineact.cpp
@@ -61,7 +61,7 @@ CmdLineAction::doIt (ActionContext const & context) {
}
Inkscape::Selection * selection = context.getSelection();
- selection->add(obj, false);
+ selection->add(obj);
}
return;
}
diff --git a/src/main.cpp b/src/main.cpp
index cd93f2ed3..28ae6992f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -46,10 +46,7 @@
#include <libxml/tree.h>
-#if GTK_CHECK_VERSION(3,0,0)
-#include <gtkmm/cssprovider.h>
#include <gdkmm/screen.h>
-#endif
#include "inkgc/gc-core.h"
@@ -103,9 +100,12 @@
#endif // WITH_DBUS
#include <glibmm/i18n.h>
+#include <glibmm/convert.h>
+#include <glibmm/fileutils.h>
#include <glibmm/miscutils.h>
#include <glibmm/main.h>
#include <gtkmm/main.h>
+#include <gtkmm/window.h>
#ifndef HAVE_BIND_TEXTDOMAIN_CODESET
#define bind_textdomain_codeset(p,c)
@@ -853,8 +853,8 @@ static int sp_common_main( int argc, char const **argv, GSList **flDest )
// temporarily switch gettext encoding to locale, so that help messages can be output properly
- gchar const *charset;
- g_get_charset(&charset);
+ std::string charset;
+ Glib::get_charset(charset);
bind_textdomain_codeset(GETTEXT_PACKAGE, charset);
@@ -1000,16 +1000,6 @@ snooper(GdkEvent *event, gpointer /*data*/) {
gtk_main_do_event (event);
}
-static std::vector<Glib::ustring> getDirectorySet(const gchar* userDir, const gchar* const * systemDirs) {
- std::vector<Glib::ustring> listing;
- listing.push_back(userDir);
- for ( const char* const* cur = systemDirs; *cur; cur++ )
- {
- listing.push_back(*cur);
- }
- return listing;
-}
-
int
sp_main_gui(int argc, char const **argv)
{
@@ -1019,106 +1009,23 @@ sp_main_gui(int argc, char const **argv)
int retVal = sp_common_main( argc, argv, &fl );
g_return_val_if_fail(retVal == 0, 1);
- // Add possible icon entry directories
- std::vector<Glib::ustring> dataDirs = getDirectorySet( g_get_user_data_dir(),
- g_get_system_data_dirs() );
- for (std::vector<Glib::ustring>::iterator it = dataDirs.begin(); it != dataDirs.end(); ++it)
- {
- std::vector<Glib::ustring> listing;
- listing.push_back(*it);
- listing.push_back("inkscape");
- listing.push_back("icons");
- Glib::ustring dir = Glib::build_filename(listing);
- gtk_icon_theme_append_search_path(gtk_icon_theme_get_default(), dir.c_str());
- }
-
- // Add our icon directory to the search path for icon theme lookups.
- gchar *usericondir = Inkscape::Application::profile_path("icons");
- gtk_icon_theme_append_search_path(gtk_icon_theme_get_default(), usericondir);
- gtk_icon_theme_append_search_path(gtk_icon_theme_get_default(), INKSCAPE_PIXMAPDIR);
-#ifdef INKSCAPE_THEMEDIR
- gtk_icon_theme_append_search_path(gtk_icon_theme_get_default(), INKSCAPE_THEMEDIR);
- gtk_icon_theme_rescan_if_needed (gtk_icon_theme_get_default());
-#endif
- g_free(usericondir);
-
-
-#if GTK_CHECK_VERSION(3,0,0)
- // Add style sheet (GTK3)
- Glib::RefPtr<Gdk::Screen> screen = Gdk::Screen::get_default();
-
- Glib::ustring inkscape_style = INKSCAPE_UIDIR;
- inkscape_style += "/style.css";
- // std::cout << "CSS Stylesheet Inkscape: " << inkscape_style << std::endl;
-
- if (g_file_test (inkscape_style.c_str(), G_FILE_TEST_EXISTS)) {
- Glib::RefPtr<Gtk::CssProvider> provider = Gtk::CssProvider::create();
-
- // From 3.16, throws an error which we must catch.
- try {
- provider->load_from_path (inkscape_style);
- }
-#if GTK_CHECK_VERSION(3,16,0)
- // Gtk::CssProviderError not defined until 3.16.
- catch (const Gtk::CssProviderError& ex)
- {
- std::cerr << "CSSProviderError::load_from_path(): failed to load: " << inkscape_style
- << "\n (" << ex.what() << ")" << std::endl;
- }
-#else
- catch (...)
- {}
-#endif
-
- Gtk::StyleContext::add_provider_for_screen (screen, provider, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
- } else {
- std::cerr << "sp_main_gui: Cannot find default style file:\n (" << inkscape_style
- << ")" << std::endl;
- }
-
- Glib::ustring user_style = Inkscape::Application::profile_path("ui/style.css");
- // std::cout << "CSS Stylesheet User: " << user_style << std::endl;
-
- if (g_file_test (user_style.c_str(), G_FILE_TEST_EXISTS)) {
- Glib::RefPtr<Gtk::CssProvider> provider2 = Gtk::CssProvider::create();
-
- // From 3.16, throws an error which we must catch.
- try {
- provider2->load_from_path (user_style);
- }
-#if GTK_CHECK_VERSION(3,16,0)
- // Gtk::CssProviderError not defined until 3.16.
- catch (const Gtk::CssProviderError& ex)
- {
- std::cerr << "CSSProviderError::load_from_path(): failed to load: " << user_style
- << "\n (" << ex.what() << ")" << std::endl;
- }
-#else
- catch (...)
- {}
-#endif
-
- Gtk::StyleContext::add_provider_for_screen (screen, provider2, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
- }
-#endif
-
gdk_event_handler_set((GdkEventFunc)snooper, NULL, NULL);
Inkscape::Debug::log_display_config();
// Set default window icon. Obeys the theme.
- gtk_window_set_default_icon_name("inkscape");
+ Gtk::Window::set_default_icon_name("inkscape");
// Do things that were previously in inkscape_gtk_stock_init().
sp_icon_get_phys_size(GTK_ICON_SIZE_MENU);
Inkscape::UI::Widget::Panel::prep();
- gboolean create_new = TRUE;
+ bool create_new = true;
/// \todo FIXME BROKEN - non-UTF-8 sneaks in here.
Inkscape::Application::create(argv[0], true);
while (fl) {
if (sp_file_open((gchar *)fl->data,NULL)) {
- create_new=FALSE;
+ create_new=false;
}
fl = g_slist_remove(fl, fl->data);
}
@@ -1214,8 +1121,8 @@ static int sp_process_file_list(GSList *fl)
std::vector<SPItem*> items;
SPRoot *root = doc->getRoot();
doc->ensureUpToDate();
- for ( SPObject *iter = root->firstChild(); iter ; iter = iter->getNext()) {
- SPItem* item = (SPItem*) iter;
+ for (auto& iter: root->children) {
+ SPItem* item = (SPItem*) &iter;
if (! (SP_IS_TEXT(item) || SP_IS_FLOWTEXT(item) || SP_IS_GROUP(item))) {
continue;
}
@@ -1469,10 +1376,8 @@ do_query_all_recurse (SPObject *o)
}
}
- SPObject *child = o->children;
- while (child) {
- do_query_all_recurse (child);
- child = child->next;
+ for(auto& child: o->children) {
+ do_query_all_recurse (&child);
}
}
diff --git a/src/object-set.cpp b/src/object-set.cpp
new file mode 100644
index 000000000..92bcf6b07
--- /dev/null
+++ b/src/object-set.cpp
@@ -0,0 +1,370 @@
+/*
+ * Multiindex container for selection
+ *
+ * Authors:
+ * Adrian Boguszewski
+ *
+ * Copyright (C) 2016 Adrian Boguszewski
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
+#include <sigc++/sigc++.h>
+#include <glib.h>
+#include "object-set.h"
+#include "box3d.h"
+#include "persp3d.h"
+#include "preferences.h"
+#include <boost/range/adaptor/filtered.hpp>
+#include <boost/range/adaptor/transformed.hpp>
+
+namespace Inkscape {
+
+bool ObjectSet::add(SPObject* object) {
+ g_return_val_if_fail(object != NULL, false);
+ g_return_val_if_fail(SP_IS_OBJECT(object), false);
+
+ // any ancestor is in the set - do nothing
+ if (_anyAncestorIsInSet(object)) {
+ return false;
+ }
+
+ // very nice function, but changes selection behavior (probably needs new selection option to deal with it)
+ // check if there is mutual ancestor for some elements, which can replace all of them in the set
+// object = _getMutualAncestor(object);
+
+ // remove all descendants from the set
+ _removeDescendantsFromSet(object);
+
+ _add(object);
+ _emitSignals();
+ return true;
+}
+
+bool ObjectSet::remove(SPObject* object) {
+ g_return_val_if_fail(object != NULL, false);
+ g_return_val_if_fail(SP_IS_OBJECT(object), false);
+
+ // object is the top of subtree
+ if (includes(object)) {
+ _remove(object);
+ _emitSignals();
+ return true;
+ }
+
+ // any ancestor of object is in the set
+ if (_anyAncestorIsInSet(object)) {
+ _removeAncestorsFromSet(object);
+ _emitSignals();
+ return true;
+ }
+
+ // no object nor any parent in the set
+ return false;
+}
+
+bool ObjectSet::includes(SPObject *object) {
+ g_return_val_if_fail(object != NULL, false);
+ g_return_val_if_fail(SP_IS_OBJECT(object), false);
+
+ return _container.get<hashed>().find(object) != _container.get<hashed>().end();
+}
+
+void ObjectSet::clear() {
+ _clear();
+ _emitSignals();
+}
+
+int ObjectSet::size() {
+ return _container.size();
+}
+
+bool ObjectSet::_anyAncestorIsInSet(SPObject *object) {
+ SPObject* o = object;
+ while (o != nullptr) {
+ if (includes(o)) {
+ return true;
+ }
+ o = o->parent;
+ }
+
+ return false;
+}
+
+void ObjectSet::_removeDescendantsFromSet(SPObject *object) {
+ for (auto& child: object->children) {
+ if (includes(&child)) {
+ _remove(&child);
+ // there is certainly no children of this child in the set
+ continue;
+ }
+
+ _removeDescendantsFromSet(&child);
+ }
+}
+
+void ObjectSet::_remove(SPObject *object) {
+ _releaseConnections[object].disconnect();
+ _releaseConnections.erase(object);
+ _container.get<hashed>().erase(object);
+ _remove3DBoxesRecursively(object);
+ _releaseSignals(object);
+}
+
+void ObjectSet::_add(SPObject *object) {
+ _releaseConnections[object] = object->connectRelease(sigc::hide_return(sigc::mem_fun(*this, &ObjectSet::remove)));
+ _container.push_back(object);
+ _add3DBoxesRecursively(object);
+ _connectSignals(object);
+}
+
+void ObjectSet::_clear() {
+ for (auto object: _container) {
+ _remove(object);
+ }
+}
+
+SPObject *ObjectSet::_getMutualAncestor(SPObject *object) {
+ SPObject *o = object;
+
+ bool flag = true;
+ while (o->parent != nullptr) {
+ for (auto &child: o->parent->children) {
+ if(&child != o && !includes(&child)) {
+ flag = false;
+ break;
+ }
+ }
+ if (!flag) {
+ break;
+ }
+ o = o->parent;
+ }
+ return o;
+}
+
+void ObjectSet::_removeAncestorsFromSet(SPObject *object) {
+ SPObject* o = object;
+ while (o->parent != nullptr) {
+ for (auto &child: o->parent->children) {
+ if (&child != o) {
+ _add(&child);
+ }
+ }
+ if (includes(o->parent)) {
+ _remove(o->parent);
+ break;
+ }
+ o = o->parent;
+ }
+}
+
+ObjectSet::~ObjectSet() {
+ _clear();
+}
+
+void ObjectSet::toggle(SPObject *obj) {
+ if (includes(obj)) {
+ remove(obj);
+ } else {
+ add(obj);
+ }
+}
+
+bool ObjectSet::isEmpty() {
+ return _container.size() == 0;
+}
+
+SPObject *ObjectSet::single() {
+ return _container.size() == 1 ? *_container.begin() : nullptr;
+}
+
+SPItem *ObjectSet::singleItem() {
+ if (_container.size() == 1) {
+ SPObject* obj = *_container.begin();
+ if (SP_IS_ITEM(obj)) {
+ return SP_ITEM(obj);
+ }
+ }
+
+ return nullptr;
+}
+
+SPItem *ObjectSet::smallestItem(CompareSize compare) {
+ return _sizeistItem(true, compare);
+}
+
+SPItem *ObjectSet::largestItem(CompareSize compare) {
+ return _sizeistItem(false, compare);
+}
+
+SPItem *ObjectSet::_sizeistItem(bool sml, CompareSize compare) {
+ auto items = this->items();
+ gdouble max = sml ? 1e18 : 0;
+ SPItem *ist = NULL;
+
+ for (auto i = items.begin(); i != items.end(); ++i) {
+ Geom::OptRect obox = SP_ITEM(*i)->desktopPreferredBounds();
+ if (!obox || obox.empty()) {
+ continue;
+ }
+
+ Geom::Rect bbox = *obox;
+
+ gdouble size = compare == AREA ? bbox.area() :
+ (compare == VERTICAL ? bbox.width() : bbox.height());
+ size = sml ? size : size * -1;
+ if (size < max) {
+ max = size;
+ ist = SP_ITEM(*i);
+ }
+ }
+
+ return ist;
+}
+
+SPObjectRange ObjectSet::objects() {
+ return SPObjectRange(_container.get<random_access>().begin(), _container.get<random_access>().end());
+}
+
+Inkscape::XML::Node *ObjectSet::singleRepr() {
+ SPObject *obj = single();
+ return obj ? obj->getRepr() : nullptr;
+}
+
+void ObjectSet::set(SPObject *object) {
+ _clear();
+ _add(object);
+ // can't emit signal here due to boolean argument in Selection
+// _emitSignals();
+}
+
+Geom::OptRect ObjectSet::bounds(SPItem::BBoxType type) const
+{
+ return (type == SPItem::GEOMETRIC_BBOX) ?
+ geometricBounds() : visualBounds();
+}
+
+Geom::OptRect ObjectSet::geometricBounds() const
+{
+ auto items = const_cast<ObjectSet *>(this)->items();
+
+ Geom::OptRect bbox;
+ for (auto iter = items.begin(); iter != items.end(); ++iter) {
+ bbox.unionWith(SP_ITEM(*iter)->desktopGeometricBounds());
+ }
+ return bbox;
+}
+
+Geom::OptRect ObjectSet::visualBounds() const
+{
+ auto items = const_cast<ObjectSet *>(this)->items();
+
+ Geom::OptRect bbox;
+ for (auto iter = items.begin(); iter != items.end(); ++iter) {
+ bbox.unionWith(SP_ITEM(*iter)->desktopVisualBounds());
+ }
+ return bbox;
+}
+
+Geom::OptRect ObjectSet::preferredBounds() const
+{
+ if (Inkscape::Preferences::get()->getInt("/tools/bounding_box") == 0) {
+ return bounds(SPItem::VISUAL_BBOX);
+ } else {
+ return bounds(SPItem::GEOMETRIC_BBOX);
+ }
+}
+
+Geom::OptRect ObjectSet::documentBounds(SPItem::BBoxType type) const
+{
+ Geom::OptRect bbox;
+ auto items = const_cast<ObjectSet *>(this)->items();
+ if (items.empty()) return bbox;
+
+ for (auto iter = items.begin(); iter != items.end(); ++iter) {
+ SPItem *item = SP_ITEM(*iter);
+ bbox |= item->documentBounds(type);
+ }
+
+ return bbox;
+}
+
+// If we have a selection of multiple items, then the center of the first item
+// will be returned; this is also the case in SelTrans::centerRequest()
+boost::optional<Geom::Point> ObjectSet::center() const {
+ auto items = const_cast<ObjectSet *>(this)->items();
+ if (!items.empty()) {
+ SPItem *first = items.back(); // from the first item in selection
+ if (first->isCenterSet()) { // only if set explicitly
+ return first->getCenter();
+ }
+ }
+ Geom::OptRect bbox = preferredBounds();
+ if (bbox) {
+ return bbox->midpoint();
+ } else {
+ return boost::optional<Geom::Point>();
+ }
+}
+
+std::list<Persp3D *> const ObjectSet::perspList() {
+ std::list<Persp3D *> pl;
+ for (std::list<SPBox3D *>::iterator i = _3dboxes.begin(); i != _3dboxes.end(); ++i) {
+ Persp3D *persp = box3d_get_perspective(*i);
+ if (std::find(pl.begin(), pl.end(), persp) == pl.end())
+ pl.push_back(persp);
+ }
+ return pl;
+}
+
+std::list<SPBox3D *> const ObjectSet::box3DList(Persp3D *persp) {
+ std::list<SPBox3D *> boxes;
+ if (persp) {
+ for (std::list<SPBox3D *>::iterator i = _3dboxes.begin(); i != _3dboxes.end(); ++i) {
+ SPBox3D *box = *i;
+ if (persp == box3d_get_perspective(box)) {
+ boxes.push_back(box);
+ }
+ }
+ } else {
+ boxes = _3dboxes;
+ }
+ return boxes;
+}
+
+void ObjectSet::_add3DBoxesRecursively(SPObject *obj) {
+ std::list<SPBox3D *> boxes = box3d_extract_boxes(obj);
+
+ for (std::list<SPBox3D *>::iterator i = boxes.begin(); i != boxes.end(); ++i) {
+ SPBox3D *box = *i;
+ _3dboxes.push_back(box);
+ }
+}
+
+void ObjectSet::_remove3DBoxesRecursively(SPObject *obj) {
+ std::list<SPBox3D *> boxes = box3d_extract_boxes(obj);
+
+ for (std::list<SPBox3D *>::iterator i = boxes.begin(); i != boxes.end(); ++i) {
+ SPBox3D *box = *i;
+ std::list<SPBox3D *>::iterator b = std::find(_3dboxes.begin(), _3dboxes.end(), box);
+ if (b == _3dboxes.end()) {
+ g_print ("Warning! Trying to remove unselected box from selection.\n");
+ return;
+ }
+ _3dboxes.erase(b);
+ }
+}
+
+} // namespace Inkscape
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
diff --git a/src/object-set.h b/src/object-set.h
new file mode 100644
index 000000000..fae365f70
--- /dev/null
+++ b/src/object-set.h
@@ -0,0 +1,329 @@
+/*
+ * Multiindex container for selection
+ *
+ * Authors:
+ * Adrian Boguszewski
+ *
+ * Copyright (C) 2016 Adrian Boguszewski
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
+#ifndef INKSCAPE_PROTOTYPE_OBJECTSET_H
+#define INKSCAPE_PROTOTYPE_OBJECTSET_H
+
+#include <string>
+#include <unordered_map>
+#include <boost/multi_index_container.hpp>
+#include <boost/multi_index/identity.hpp>
+#include <boost/multi_index/sequenced_index.hpp>
+#include <boost/multi_index/hashed_index.hpp>
+#include <boost/multi_index/random_access_index.hpp>
+#include <boost/range/adaptor/filtered.hpp>
+#include <boost/range/adaptor/transformed.hpp>
+#include <boost/range/sub_range.hpp>
+#include <boost/range/any_range.hpp>
+#include <boost/type_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <sigc++/connection.h>
+#include <inkgc/gc-soft-ptr.h>
+#include "sp-object.h"
+#include "sp-item.h"
+#include "sp-item-group.h"
+
+class SPBox3D;
+class Persp3D;
+class SPDesktop;
+
+namespace Inkscape {
+
+namespace XML {
+class Node;
+}
+
+struct hashed{};
+struct random_access{};
+
+struct is_item {
+ bool operator()(SPObject* obj) {
+ return SP_IS_ITEM(obj);
+ }
+};
+
+struct is_group {
+ bool operator()(SPObject* obj) {
+ return SP_IS_GROUP(obj);
+ }
+};
+
+struct object_to_item {
+ typedef SPItem* result_type;
+ SPItem* operator()(SPObject* obj) const {
+ return SP_ITEM(obj);
+ }
+};
+
+struct object_to_node {
+ typedef XML::Node* result_type;
+ XML::Node* operator()(SPObject* obj) const {
+ return obj->getRepr();
+ }
+};
+
+struct object_to_group {
+ typedef SPGroup* result_type;
+ SPGroup* operator()(SPObject* obj) const {
+ return SP_GROUP(obj);
+ }
+};
+
+typedef boost::multi_index_container<
+ SPObject*,
+ boost::multi_index::indexed_by<
+ boost::multi_index::sequenced<>,
+ boost::multi_index::random_access<
+ boost::multi_index::tag<random_access>>,
+ boost::multi_index::hashed_unique<
+ boost::multi_index::tag<hashed>,
+ boost::multi_index::identity<SPObject*>>
+ >> MultiIndexContainer;
+
+typedef boost::any_range<
+ SPObject*,
+ boost::random_access_traversal_tag,
+ SPObject* const&,
+ std::ptrdiff_t> SPObjectRange;
+
+class ObjectSet {
+public:
+ enum CompareSize {HORIZONTAL, VERTICAL, AREA};
+ typedef decltype(MultiIndexContainer().get<random_access>() | boost::adaptors::filtered(is_item()) | boost::adaptors::transformed(object_to_item())) SPItemRange;
+ typedef decltype(MultiIndexContainer().get<random_access>() | boost::adaptors::filtered(is_group()) | boost::adaptors::transformed(object_to_group())) SPGroupRange;
+ typedef decltype(MultiIndexContainer().get<random_access>() | boost::adaptors::filtered(is_item()) | boost::adaptors::transformed(object_to_node())) XMLNodeRange;
+
+ ObjectSet(SPDesktop* desktop): _desktop(desktop) {};
+ ObjectSet(): _desktop(nullptr) {};
+ virtual ~ObjectSet();
+
+ /**
+ * Add an SPObject to the set of selected objects.
+ *
+ * @param obj the SPObject to add
+ */
+ bool add(SPObject* object);
+
+ /** Add items from an STL iterator range to the selection.
+ * \param from the begin iterator
+ * \param to the end iterator
+ */
+ template <typename InputIterator>
+ void add(InputIterator from, InputIterator to) {
+ for(auto it = from; it != to; ++it) {
+ _add(*it);
+ }
+ _emitSignals();
+ }
+
+ /**
+ * Removes an item from the set of selected objects.
+ *
+ * It is ok to call this method for an unselected item.
+ *
+ * @param item the item to unselect
+ *
+ * @return is success
+ */
+ bool remove(SPObject* object);
+
+ /**
+ * Returns true if the given object is selected.
+ */
+ bool includes(SPObject *object);
+
+ /**
+ * Set the selection to a single specific object.
+ *
+ * @param obj the object to select
+ */
+ void set(SPObject *object);
+
+ /**
+ * Unselects all selected objects.
+ */
+ void clear();
+
+ /**
+ * Returns size of the selection.
+ */
+ int size();
+
+ /**
+ * Returns true if no items are selected.
+ */
+ bool isEmpty();
+
+ /**
+ * Removes an item if selected, adds otherwise.
+ *
+ * @param item the item to unselect
+ */
+ void toggle(SPObject *obj);
+
+ /**
+ * Returns a single selected object.
+ *
+ * @return NULL unless exactly one object is selected
+ */
+ SPObject *single();
+
+ /**
+ * Returns a single selected item.
+ *
+ * @return NULL unless exactly one object is selected
+ */
+ SPItem *singleItem();
+
+ /**
+ * Returns the smallest item from this selection.
+ */
+ SPItem *smallestItem(CompareSize compare);
+
+ /**
+ * Returns the largest item from this selection.
+ */
+ SPItem *largestItem(CompareSize compare);
+
+ /** Returns the list of selected objects. */
+ SPObjectRange objects();
+
+ /** Returns a range of selected SPItems. */
+ SPItemRange items() {
+ return SPItemRange(_container.get<random_access>()
+ | boost::adaptors::filtered(is_item())
+ | boost::adaptors::transformed(object_to_item()));
+ };
+
+ /** Returns a range of selected groups. */
+ SPGroupRange groups() {
+ return SPGroupRange (_container.get<random_access>()
+ | boost::adaptors::filtered(is_group())
+ | boost::adaptors::transformed(object_to_group()));
+ }
+
+ /** Returns a range of the xml nodes of all selected objects. */
+ XMLNodeRange xmlNodes() {
+ return XMLNodeRange(_container.get<random_access>()
+ | boost::adaptors::filtered(is_item())
+ | boost::adaptors::transformed(object_to_node()));
+ }
+
+ /**
+ * Returns a single selected object's xml node.
+ *
+ * @return NULL unless exactly one object is selected
+ */
+ XML::Node *singleRepr();
+
+ /**
+ * Selects exactly the specified objects.
+ *
+ * @param objs the objects to select
+ */
+ template <class T>
+ typename boost::enable_if<boost::is_base_of<SPObject, T>, void>::type
+ setList(const std::vector<T*> &objs) {
+ _clear();
+ addList(objs);
+ }
+
+ /**
+ * Adds the specified objects to selection, without deselecting first.
+ *
+ * @param objs the objects to select
+ */
+ template <class T>
+ typename boost::enable_if<boost::is_base_of<SPObject, T>, void>::type
+ addList(const std::vector<T*> &objs) {
+ for (auto obj: objs) {
+ if (!includes(obj)) {
+ add(obj);
+ }
+ }
+ }
+
+ /** Returns the bounding rectangle of the selection. */
+ Geom::OptRect bounds(SPItem::BBoxType type) const;
+ Geom::OptRect visualBounds() const;
+ Geom::OptRect geometricBounds() const;
+
+ /**
+ * Returns either the visual or geometric bounding rectangle of the selection, based on the
+ * preferences specified for the selector tool
+ */
+ Geom::OptRect preferredBounds() const;
+
+ /* Returns the bounding rectangle of the selectionin document coordinates.*/
+ Geom::OptRect documentBounds(SPItem::BBoxType type) const;
+
+ /**
+ * Returns the rotation/skew center of the selection.
+ */
+ boost::optional<Geom::Point> center() const;
+
+ /** Returns a list of all perspectives which have a 3D box in the current selection.
+ (these may also be nested in groups) */
+ std::list<Persp3D *> const perspList();
+
+ /**
+ * Returns a list of all 3D boxes in the current selection which are associated to @c
+ * persp. If @c pers is @c NULL, return all selected boxes.
+ */
+ std::list<SPBox3D *> const box3DList(Persp3D *persp = NULL);
+
+ /**
+ * Returns the desktop the selection is bound to
+ *
+ * @return the desktop the selection is bound to, or NULL if in console mode
+ */
+ SPDesktop *desktop() { return _desktop; }
+
+protected:
+ virtual void _connectSignals(SPObject* object) {};
+ virtual void _releaseSignals(SPObject* object) {};
+ virtual void _emitSignals() {};
+ void _add(SPObject* object);
+ void _clear();
+ void _remove(SPObject* object);
+ bool _anyAncestorIsInSet(SPObject *object);
+ void _removeDescendantsFromSet(SPObject *object);
+ void _removeAncestorsFromSet(SPObject *object);
+ SPItem *_sizeistItem(bool sml, CompareSize compare);
+ SPObject *_getMutualAncestor(SPObject *object);
+ virtual void _add3DBoxesRecursively(SPObject *obj);
+ virtual void _remove3DBoxesRecursively(SPObject *obj);
+
+ MultiIndexContainer _container;
+ GC::soft_ptr<SPDesktop> _desktop;
+ std::list<SPBox3D *> _3dboxes;
+ std::unordered_map<SPObject*, sigc::connection> _releaseConnections;
+
+};
+
+typedef ObjectSet::SPItemRange SPItemRange;
+typedef ObjectSet::SPGroupRange SPGroupRange;
+typedef ObjectSet::XMLNodeRange XMLNodeRange;
+
+} // namespace Inkscape
+
+#endif //INKSCAPE_PROTOTYPE_OBJECTSET_H
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp
index af33415a1..b4f4024cc 100644
--- a/src/object-snapper.cpp
+++ b/src/object-snapper.cpp
@@ -84,9 +84,9 @@ void Inkscape::ObjectSnapper::_findCandidates(SPObject* parent,
Geom::Rect bbox_to_snap_incl = bbox_to_snap; // _incl means: will include the snapper tolerance
bbox_to_snap_incl.expandBy(getSnapperTolerance()); // see?
- for ( SPObject *o = parent->firstChild(); o; o = o->getNext() ) {
+ for (auto& o: parent->children) {
g_assert(dt != NULL);
- SPItem *item = dynamic_cast<SPItem *>(o);
+ SPItem *item = dynamic_cast<SPItem *>(&o);
if (item && !(dt->itemIsHidden(item) && !clip_or_mask)) {
// Snapping to items in a locked layer is allowed
// Don't snap to hidden objects, unless they're a clipped path or a mask
@@ -94,7 +94,7 @@ void Inkscape::ObjectSnapper::_findCandidates(SPObject* parent,
std::vector<SPItem const *>::const_iterator i;
if (it != NULL) {
i = it->begin();
- while (i != it->end() && *i != o) {
+ while (i != it->end() && *i != &o) {
++i;
}
}
@@ -116,7 +116,7 @@ void Inkscape::ObjectSnapper::_findCandidates(SPObject* parent,
}
if (dynamic_cast<SPGroup *>(item)) {
- _findCandidates(o, it, false, bbox_to_snap, clip_or_mask, additional_affine);
+ _findCandidates(&o, it, false, bbox_to_snap, clip_or_mask, additional_affine);
} else {
Geom::OptRect bbox_of_item;
Preferences *prefs = Preferences::get();
diff --git a/src/object-test.h b/src/object-test.h
index 4f0be3251..0af823684 100644
--- a/src/object-test.h
+++ b/src/object-test.h
@@ -115,7 +115,6 @@ public:
prev = next;
next = next->getNext();
}
- TS_ASSERT(child->lastChild() == next);
// Test hrefcount
TS_ASSERT(path->isReferenced());
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp
index fe5b83b65..1d6610b81 100644
--- a/src/path-chemistry.cpp
+++ b/src/path-chemistry.cpp
@@ -54,7 +54,7 @@ sp_selected_path_combine(SPDesktop *desktop, bool skip_undo)
Inkscape::Selection *selection = desktop->getSelection();
SPDocument *doc = desktop->getDocument();
- std::vector<SPItem*> items(selection->itemList());
+ std::vector<SPItem*> items(selection->items().begin(), selection->items().end());
if (items.size() < 1) {
desktop->getMessageStack()->flash(Inkscape::WARNING_MESSAGE, _("Select <b>object(s)</b> to combine."));
@@ -200,7 +200,7 @@ sp_selected_path_break_apart(SPDesktop *desktop, bool skip_undo)
bool did = false;
- std::vector<SPItem*> itemlist(selection->itemList());
+ std::vector<SPItem*> itemlist(selection->items().begin(), selection->items().end());
for (std::vector<SPItem*>::const_iterator i = itemlist.begin(); i != itemlist.end(); ++i){
SPItem *item = *i;
@@ -300,7 +300,7 @@ sp_selected_path_to_curves(Inkscape::Selection *selection, SPDesktop *desktop, b
desktop->setWaitingCursor();
}
- std::vector<SPItem*> selected(selection->itemList());
+ std::vector<SPItem*> selected(selection->items().begin(), selection->items().end());
std::vector<Inkscape::XML::Node*> to_select;
selection->clear();
std::vector<SPItem*> items(selected);
@@ -331,7 +331,7 @@ void sp_selected_to_lpeitems(SPDesktop *desktop)
return;
}
- std::vector<SPItem*> selected(selection->itemList());
+ std::vector<SPItem*> selected(selection->items().begin(), selection->items().end());
std::vector<Inkscape::XML::Node*> to_select;
selection->clear();
std::vector<SPItem*> items(selected);
@@ -600,7 +600,7 @@ void
sp_selected_path_reverse(SPDesktop *desktop)
{
Inkscape::Selection *selection = desktop->getSelection();
- std::vector<SPItem*> items = selection->itemList();
+ auto items = selection->items();
if (items.empty()) {
desktop->getMessageStack()->flash(Inkscape::WARNING_MESSAGE, _("Select <b>path(s)</b> to reverse."));
@@ -614,7 +614,7 @@ sp_selected_path_reverse(SPDesktop *desktop)
bool did = false;
desktop->messageStack()->flash(Inkscape::IMMEDIATE_MESSAGE, _("Reversing paths..."));
- for (std::vector<SPItem*>::const_iterator i = items.begin(); i != items.end(); ++i){
+ for (auto i = items.begin(); i != items.end(); ++i){
SPPath *path = dynamic_cast<SPPath *>(*i);
if (!path) {
diff --git a/src/path-prefix.h b/src/path-prefix.h
index 7f9bcec51..8a39ede84 100644
--- a/src/path-prefix.h
+++ b/src/path-prefix.h
@@ -21,28 +21,33 @@
//#endif /* __cplusplus */
#ifdef ENABLE_BINRELOC
-# define INKSCAPE_APPICONDIR BR_DATADIR( "/pixmaps" )
-# define INKSCAPE_ATTRRELDIR BR_DATADIR( "/inkscape/attributes" )
-# define INKSCAPE_BINDDIR BR_DATADIR( "/inkscape/bind" )
-# define INKSCAPE_EXAMPLESDIR BR_DATADIR( "/inkscape/examples" )
-# define INKSCAPE_EXTENSIONDIR BR_DATADIR( "/inkscape/extensions" )
-# define INKSCAPE_FILTERDIR BR_DATADIR( "/inkscape/filters" )
-# define INKSCAPE_GRADIENTSDIR BR_DATADIR( "/inkscape/gradients" )
-# define INKSCAPE_KEYSDIR BR_DATADIR( "/inkscape/keys" )
-# define INKSCAPE_PIXMAPDIR BR_DATADIR( "/inkscape/icons" )
-# define INKSCAPE_MARKERSDIR BR_DATADIR( "/inkscape/markers" )
-# define INKSCAPE_PALETTESDIR BR_DATADIR( "/inkscape/palettes" )
-# define INKSCAPE_PATTERNSDIR BR_DATADIR( "/inkscape/patterns" )
-# define INKSCAPE_SCREENSDIR BR_DATADIR( "/inkscape/screens" )
-# define INKSCAPE_SYMBOLSDIR BR_DATADIR( "/inkscape/symbols" )
-# define INKSCAPE_THEMEDIR BR_DATADIR( "/icons" )
-# define INKSCAPE_TUTORIALSDIR BR_DATADIR( "/inkscape/tutorials" )
-# define INKSCAPE_TEMPLATESDIR BR_DATADIR( "/inkscape/templates" )
-# define INKSCAPE_UIDIR BR_DATADIR( "/inkscape/ui" )
+/* The way that we're building now is with a shared library between Inkscape
+ and Inkview, and the code will find the path to the library then. But we
+ don't really want that. This prefix then pulls things out of the lib directory
+ and back into the root install dir. */
+# define INKSCAPE_LIBPREFIX "/../.."
+# define INKSCAPE_APPICONDIR BR_DATADIR( INKSCAPE_LIBPREFIX "/share/pixmaps" )
+# define INKSCAPE_ATTRRELDIR BR_DATADIR( INKSCAPE_LIBPREFIX "/share/inkscape/attributes" )
+# define INKSCAPE_BINDDIR BR_DATADIR( INKSCAPE_LIBPREFIX "/share/inkscape/bind" )
+# define INKSCAPE_EXAMPLESDIR BR_DATADIR( INKSCAPE_LIBPREFIX "/share/inkscape/examples" )
+# define INKSCAPE_EXTENSIONDIR BR_DATADIR( INKSCAPE_LIBPREFIX "/share/inkscape/extensions" )
+# define INKSCAPE_FILTERDIR BR_DATADIR( INKSCAPE_LIBPREFIX "/share/inkscape/filters" )
+# define INKSCAPE_GRADIENTSDIR BR_DATADIR( INKSCAPE_LIBPREFIX "/share/inkscape/gradients" )
+# define INKSCAPE_KEYSDIR BR_DATADIR( INKSCAPE_LIBPREFIX "/share/inkscape/keys" )
+# define INKSCAPE_PIXMAPDIR BR_DATADIR( INKSCAPE_LIBPREFIX "/share/inkscape/icons" )
+# define INKSCAPE_MARKERSDIR BR_DATADIR( INKSCAPE_LIBPREFIX "/share/inkscape/markers" )
+# define INKSCAPE_PALETTESDIR BR_DATADIR( INKSCAPE_LIBPREFIX "/share/inkscape/palettes" )
+# define INKSCAPE_PATTERNSDIR BR_DATADIR( INKSCAPE_LIBPREFIX "/share/inkscape/patterns" )
+# define INKSCAPE_SCREENSDIR BR_DATADIR( INKSCAPE_LIBPREFIX "/share/inkscape/screens" )
+# define INKSCAPE_SYMBOLSDIR BR_DATADIR( INKSCAPE_LIBPREFIX "/share/inkscape/symbols" )
+# define INKSCAPE_THEMEDIR BR_DATADIR( INKSCAPE_LIBPREFIX "/share/icons" )
+# define INKSCAPE_TUTORIALSDIR BR_DATADIR( INKSCAPE_LIBPREFIX "/share/inkscape/tutorials" )
+# define INKSCAPE_TEMPLATESDIR BR_DATADIR( INKSCAPE_LIBPREFIX "/share/inkscape/templates" )
+# define INKSCAPE_UIDIR BR_DATADIR( INKSCAPE_LIBPREFIX "/share/inkscape/ui" )
//CREATE V0.1 support
-# define CREATE_GRADIENTSDIR BR_DATADIR( "/create/gradients/gimp" )
-# define CREATE_PALETTESDIR BR_DATADIR( "/create/swatches" )
-# define CREATE_PATTERNSDIR BR_DATADIR( "/create/patterns/vector" )
+# define CREATE_GRADIENTSDIR BR_DATADIR( INKSCAPE_LIBPREFIX "/share/create/gradients/gimp" )
+# define CREATE_PALETTESDIR BR_DATADIR( INKSCAPE_LIBPREFIX "/share/create/swatches" )
+# define CREATE_PATTERNSDIR BR_DATADIR( INKSCAPE_LIBPREFIX "/share/create/patterns/vector" )
#else
# ifdef WIN32
# define INKSCAPE_APPICONDIR WIN32_DATADIR("pixmaps")
diff --git a/src/persp3d.cpp b/src/persp3d.cpp
index 809242ed8..ff00f9441 100644
--- a/src/persp3d.cpp
+++ b/src/persp3d.cpp
@@ -213,9 +213,10 @@ Persp3D *persp3d_create_xml_element(SPDocument *document, Persp3DImpl *dup) {//
Persp3D *persp3d_document_first_persp(SPDocument *document)
{
Persp3D *first = 0;
- for ( SPObject *child = document->getDefs()->firstChild(); child && !first; child = child->getNext() ) {
- if (SP_IS_PERSP3D(child)) {
- first = SP_PERSP3D(child);
+ for (auto& child: document->getDefs()->children) {
+ if (SP_IS_PERSP3D(&child)) {
+ first = SP_PERSP3D(&child);
+ break;
}
}
return first;
@@ -491,10 +492,10 @@ persp3d_on_repr_attr_changed ( Inkscape::XML::Node * /*repr*/,
/* checks whether all boxes linked to this perspective are currently selected */
bool
-persp3d_has_all_boxes_in_selection (Persp3D *persp, Inkscape::Selection *selection) {
+persp3d_has_all_boxes_in_selection (Persp3D *persp, Inkscape::ObjectSet *set) {
Persp3DImpl *persp_impl = persp->perspective_impl;
- std::list<SPBox3D *> selboxes = selection->box3DList();
+ std::list<SPBox3D *> selboxes = set->box3DList();
for (std::vector<SPBox3D *>::iterator i = persp_impl->boxes.begin(); i != persp_impl->boxes.end(); ++i) {
if (std::find(selboxes.begin(), selboxes.end(), *i) == selboxes.end()) {
@@ -531,9 +532,9 @@ persp3d_print_debugging_info (Persp3D *persp) {
void persp3d_print_debugging_info_all(SPDocument *document)
{
- for ( SPObject *child = document->getDefs()->firstChild(); child; child = child->getNext() ) {
- if (SP_IS_PERSP3D(child)) {
- persp3d_print_debugging_info(SP_PERSP3D(child));
+ for (auto& child: document->getDefs()->children) {
+ if (SP_IS_PERSP3D(&child)) {
+ persp3d_print_debugging_info(SP_PERSP3D(&child));
}
}
persp3d_print_all_selected();
diff --git a/src/persp3d.h b/src/persp3d.h
index be5680bcb..ce0e3c120 100644
--- a/src/persp3d.h
+++ b/src/persp3d.h
@@ -107,7 +107,7 @@ void persp3d_absorb(Persp3D *persp1, Persp3D *persp2);
Persp3D * persp3d_create_xml_element (SPDocument *document, Persp3DImpl *dup = NULL);
Persp3D * persp3d_document_first_persp (SPDocument *document);
-bool persp3d_has_all_boxes_in_selection (Persp3D *persp, Inkscape::Selection *selection);
+bool persp3d_has_all_boxes_in_selection (Persp3D *persp, Inkscape::ObjectSet *set);
void persp3d_print_debugging_info (Persp3D *persp);
void persp3d_print_debugging_info_all(SPDocument *doc);
diff --git a/src/selcue.cpp b/src/selcue.cpp
index 3d9f3c619..13600231a 100644
--- a/src/selcue.cpp
+++ b/src/selcue.cpp
@@ -93,15 +93,15 @@ void Inkscape::SelCue::_updateItemBboxes(Inkscape::Preferences *prefs)
void Inkscape::SelCue::_updateItemBboxes(gint mode, int prefs_bbox)
{
- const std::vector<SPItem*> items = _selection->itemList();
- if (_item_bboxes.size() != items.size()) {
+ auto items = _selection->items();
+ if (_item_bboxes.size() != boost::distance(items)) {
_newItemBboxes();
return;
}
int bcount = 0;
- std::vector<SPItem*> ll=_selection->itemList();
- for (std::vector<SPItem*>::const_iterator l = ll.begin(); l != ll.end(); ++l) {
+ auto ll= _selection->items();
+ for (auto l = ll.begin(); l != ll.end(); ++l) {
SPItem *item = *l;
SPCanvasItem* box = _item_bboxes[bcount ++];
@@ -143,8 +143,8 @@ void Inkscape::SelCue::_newItemBboxes()
int prefs_bbox = prefs->getBool("/tools/bounding_box");
- std::vector<SPItem*> ll=_selection->itemList();
- for (std::vector<SPItem*>::const_iterator l = ll.begin(); l != ll.end(); ++l) {
+ auto ll= _selection->items();
+ for (auto l = ll.begin(); l != ll.end(); ++l) {
SPItem *item = *l;
Geom::OptRect const b = (prefs_bbox == 0) ?
@@ -198,8 +198,8 @@ void Inkscape::SelCue::_newTextBaselines()
}
_text_baselines.clear();
- std::vector<SPItem*> ll = _selection->itemList();
- for (std::vector<SPItem*>::const_iterator l=ll.begin();l!=ll.end();++l) {
+ auto ll = _selection->items();
+ for (auto l=ll.begin();l!=ll.end();++l) {
SPItem *item = *l;
SPCanvasItem* baseline_point = NULL;
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp
index f6923d1ea..37a0e42e1 100644
--- a/src/selection-chemistry.cpp
+++ b/src/selection-chemistry.cpp
@@ -12,8 +12,9 @@
* Abhishek Sharma
* Kris De Gussem <Kris.DeGussem@gmail.com>
* Tavmjong Bah <tavmjong@free.fr> (Symbol additions)
+ * Adrian Boguszewski
*
- * Copyright (C) 1999-2010,2012 authors
+ * Copyright (C) 1999-2016 authors
* Copyright (C) 2001-2002 Ximian, Inc.
*
* Released under GNU GPL, read the file 'COPYING' for more information
@@ -78,6 +79,11 @@ SPCycleType SP_CYCLING = SP_CYCLE_FOCUS;
#include "helper/png-write.h"
#include "layer-fns.h"
#include "context-fns.h"
+#include <map>
+#include <cstring>
+#include <string>
+#include <boost/range/adaptor/reversed.hpp>
+#include "sp-item.h"
#include "box3d.h"
#include "persp3d.h"
#include "xml/simple-document.h"
@@ -89,6 +95,7 @@ SPCycleType SP_CYCLING = SP_CYCLE_FOCUS;
#include "live_effects/effect.h"
#include "live_effects/parameter/originalpath.h"
#include "layer-manager.h"
+#include "object-set.h"
// For clippath editing
#include "ui/tools/node-tool.h"
@@ -100,6 +107,7 @@ using Inkscape::DocumentUndo;
using Geom::X;
using Geom::Y;
using Inkscape::UI::Tools::NodeTool;
+using namespace Inkscape;
/* The clipboard handling is in ui/clipboard.cpp now. There are some legacy functions left here,
because the layer manipulation code uses them. It should be rewritten specifically
@@ -259,9 +267,9 @@ void SelectionHelper::fixSelection(SPDesktop *dt)
std::vector<SPItem*> items ;
- std::vector<SPItem*> const selList = selection->itemList();
+ auto selList = selection->items();
- for( std::vector<SPItem*>::const_reverse_iterator i = selList.rbegin(); i != selList.rend(); ++i ) {
+ for(auto i = boost::rbegin(selList); i != boost::rend(selList); ++i) {
SPItem *item = *i;
if( item &&
!dt->isLayer(item) &&
@@ -386,7 +394,7 @@ void sp_selection_delete(SPDesktop *desktop)
desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("<b>Nothing</b> was deleted."));
return;
}
- std::vector<SPItem*> selected(selection->itemList());
+ std::vector<SPItem*> selected(selection->items().begin(), selection->items().end());
selection->clear();
sp_selection_delete_impl(selected);
desktop->currentLayer()->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
@@ -409,8 +417,8 @@ static void add_ids_recursive(std::vector<const gchar *> &ids, SPObject *obj)
ids.push_back(obj->getId());
if (dynamic_cast<SPGroup *>(obj)) {
- for (SPObject *child = obj->firstChild() ; child; child = child->getNext() ) {
- add_ids_recursive(ids, child);
+ for (auto& child: obj->children) {
+ add_ids_recursive(ids, &child);
}
}
}
@@ -431,7 +439,7 @@ void sp_selection_duplicate(SPDesktop *desktop, bool suppressDone, bool duplicat
desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Select <b>object(s)</b> to duplicate."));
return;
}
- std::vector<Inkscape::XML::Node*> reprs(selection->reprList());
+ std::vector<Inkscape::XML::Node*> reprs(selection->xmlNodes().begin(), selection->xmlNodes().end());
if(duplicateLayer){
reprs.clear();
@@ -563,20 +571,20 @@ void sp_edit_clear_all(Inkscape::Selection *selection)
*/
std::vector<SPItem*> &get_all_items(std::vector<SPItem*> &list, SPObject *from, SPDesktop *desktop, bool onlyvisible, bool onlysensitive, bool ingroups, std::vector<SPItem*> const &exclude)
{
- for ( SPObject *child = from->firstChild() ; child; child = child->getNext() ) {
- SPItem *item = dynamic_cast<SPItem *>(child);
+ for (auto& child: from->children) {
+ SPItem *item = dynamic_cast<SPItem *>(&child);
if (item &&
!desktop->isLayer(item) &&
(!onlysensitive || !item->isLocked()) &&
(!onlyvisible || !desktop->itemIsHidden(item)) &&
- (exclude.empty() || exclude.end() == std::find(exclude.begin(),exclude.end(),child))
+ (exclude.empty() || exclude.end() == std::find(exclude.begin(), exclude.end(), &child))
)
{
list.insert(list.begin(),item);
}
if (ingroups || (item && desktop->isLayer(item))) {
- list = get_all_items(list, child, desktop, onlyvisible, onlysensitive, ingroups, exclude);
+ list = get_all_items(list, &child, desktop, onlyvisible, onlysensitive, ingroups, exclude);
}
}
@@ -601,7 +609,7 @@ static void sp_edit_select_all_full(SPDesktop *dt, bool force_all_layers, bool i
std::vector<SPItem*> exclude;
if (invert) {
- exclude = selection->itemList();
+ exclude.insert(exclude.end(), selection->items().begin(), selection->items().end());
}
if (force_all_layers)
@@ -667,9 +675,13 @@ void sp_edit_invert_in_all_layers(SPDesktop *desktop)
sp_edit_select_all_full(desktop, true, true);
}
-static void sp_selection_group_impl(std::vector<Inkscape::XML::Node*> p, Inkscape::XML::Node *group, Inkscape::XML::Document *xml_doc, SPDocument *doc) {
+static Inkscape::XML::Node* sp_object_set_group(ObjectSet *set) {
+ SPDocument *doc = set->desktop()->getDocument();
+ Inkscape::XML::Document *xml_doc = doc->getReprDoc();
+ Inkscape::XML::Node *group = xml_doc->createElement("svg:g");
- sort(p.begin(),p.end(),sp_repr_compare_position_bool);
+ std::vector<Inkscape::XML::Node*> p(set->xmlNodes().begin(), set->xmlNodes().end());
+ std::sort(p.begin(), p.end(), sp_repr_compare_position_bool);
// Remember the position and parent of the topmost object.
gint topmost = p.back()->position();
@@ -727,31 +739,24 @@ static void sp_selection_group_impl(std::vector<Inkscape::XML::Node*> p, Inkscap
// Move to the position of the topmost, reduced by the number of items deleted from topmost_parent
group->setPosition(topmost + 1);
+
+ set->set(doc->getObjectByRepr(group));
+
+ return group;
}
void sp_selection_group(Inkscape::Selection *selection, SPDesktop *desktop)
{
- SPDocument *doc = selection->layers()->getDocument();
- Inkscape::XML::Document *xml_doc = doc->getReprDoc();
-
// Check if something is selected.
if (selection->isEmpty()) {
selection_display_message(desktop, Inkscape::WARNING_MESSAGE, _("Select <b>some objects</b> to group."));
return;
}
+ Inkscape::XML::Node* group = sp_object_set_group(selection);
- std::vector<Inkscape::XML::Node*> p (selection->reprList());
-
- selection->clear();
-
- Inkscape::XML::Node *group = xml_doc->createElement("svg:g");
-
- sp_selection_group_impl(p, group, xml_doc, doc);
-
- DocumentUndo::done(doc, SP_VERB_SELECTION_GROUP,
+ DocumentUndo::done(selection->layers()->getDocument(), SP_VERB_SELECTION_GROUP,
C_("Verb", "Group"));
- selection->set(group);
Inkscape::GC::release(group);
}
@@ -775,9 +780,8 @@ void sp_selection_ungroup_pop_selection(Inkscape::Selection *selection, SPDeskto
selection_display_message(desktop, Inkscape::WARNING_MESSAGE, _("<b>No objects selected</b> to pop out of group."));
return;
}
- std::vector<SPItem*> selection_list = selection->itemList();
- std::vector<SPItem*>::const_iterator item = selection_list.begin(); // leaving this because it will be useful for
+ auto item = selection->items().begin(); // leaving this because it will be useful for
// future implementation of complex pop ungrouping
SPItem *obj = *item;
SPItem *parent_group = static_cast<SPItem*>(obj->parent);
@@ -800,32 +804,16 @@ void sp_selection_ungroup_pop_selection(Inkscape::Selection *selection, SPDeskto
}
-
-void sp_selection_ungroup(Inkscape::Selection *selection, SPDesktop *desktop)
+static void sp_object_set_ungroup(ObjectSet *set)
{
- if (selection->isEmpty()) {
- selection_display_message(desktop, Inkscape::WARNING_MESSAGE, _("Select a <b>group</b> to ungroup."));
- }
-
- // first check whether there is anything to ungroup
- std::vector<SPItem*> old_select = selection->itemList();
- std::vector<SPItem*> new_select;
GSList *groups = NULL;
- for (std::vector<SPItem*>::const_iterator item = old_select.begin(); item!=old_select.end(); ++item) {
- SPItem *obj = *item;
- if (dynamic_cast<SPGroup *>(obj)) {
- groups = g_slist_prepend(groups, obj);
- }
+ for (auto g: set->groups()) {
+ groups = g_slist_prepend(groups, g);
}
- if (groups == NULL) {
- selection_display_message(desktop, Inkscape::ERROR_MESSAGE, _("<b>No groups</b> to ungroup in the selection."));
- g_slist_free(groups);
- return;
- }
-
- std::vector<SPItem*> items(old_select);
- selection->clear();
+ std::vector<SPItem*> new_select;
+ auto old_select = set->items();
+ std::vector<SPItem*> items(old_select.begin(), old_select.end());
// If any of the clones refer to the groups, unlink them and replace them with successors
// in the items list.
@@ -872,7 +860,21 @@ void sp_selection_ungroup(Inkscape::Selection *selection, SPDesktop *desktop)
}
}
- selection->addList(new_select);
+ set->setList(new_select);
+}
+
+void sp_selection_ungroup(Inkscape::Selection *selection, SPDesktop *desktop)
+{
+ if (selection->isEmpty()) {
+ selection_display_message(desktop, Inkscape::WARNING_MESSAGE, _("Select a <b>group</b> to ungroup."));
+ }
+
+ if (boost::distance(selection->groups()) == 0) {
+ selection_display_message(desktop, Inkscape::ERROR_MESSAGE, _("<b>No groups</b> to ungroup in the selection."));
+ return;
+ }
+
+ sp_object_set_ungroup(selection);
DocumentUndo::done(selection->layers()->getDocument(), SP_VERB_SELECTION_UNGROUP,
_("Ungroup"));
@@ -908,18 +910,18 @@ sp_degroup_list(std::vector<SPItem*> &items)
/** If items in the list have a common parent, return it, otherwise return NULL */
static SPGroup *
-sp_item_list_common_parent_group(std::vector<SPItem*> const &items)
+sp_item_list_common_parent_group(const SPItemRange &items)
{
if (items.empty()) {
return NULL;
}
- SPObject *parent = items[0]->parent;
+ SPObject *parent = items.front()->parent;
// Strictly speaking this CAN happen, if user selects <svg> from Inkscape::XML editor
if (!dynamic_cast<SPGroup *>(parent)) {
return NULL;
}
- for (std::vector<SPItem*>::const_iterator item=items.begin();item!=items.end();++item) {
- if((*item)==items[0])continue;
+ for (auto item=items.begin();item!=items.end();++item) {
+ if((*item)==items.front())continue;
if ((*item)->parent != parent) {
return NULL;
}
@@ -957,22 +959,9 @@ bool sp_item_repr_compare_position_bool(SPObject const *first, SPObject const *s
((SPItem*)second)->getRepr())<0;
}
-void
-sp_selection_raise(Inkscape::Selection *selection, SPDesktop *desktop)
-{
- std::vector<SPItem*> items= selection->itemList();
- if (items.empty()) {
- selection_display_message(desktop, Inkscape::WARNING_MESSAGE, _("Select <b>object(s)</b> to raise."));
- return;
- }
-
- SPGroup const *group = sp_item_list_common_parent_group(items);
- if (!group) {
- selection_display_message(desktop, Inkscape::ERROR_MESSAGE, _("You cannot raise/lower objects from <b>different groups</b> or <b>layers</b>."));
- return;
- }
-
- Inkscape::XML::Node *grepr = const_cast<Inkscape::XML::Node *>(group->getRepr());
+void sp_object_set_raise(ObjectSet *set) {
+ std::vector<SPItem*> items(set->items().begin(), set->items().end());
+ Inkscape::XML::Node *grepr = const_cast<Inkscape::XML::Node *>(items.front()->parent->getRepr());
/* Construct reverse-ordered list of selected children. */
std::vector<SPItem*> rev(items);
@@ -986,7 +975,7 @@ sp_selection_raise(Inkscape::Selection *selection, SPDesktop *desktop)
for (std::vector<SPItem*>::const_iterator item=rev.begin();item!=rev.end();++item) {
SPObject *child = *item;
// for each selected object, find the next sibling
- for (SPObject *newref = child->next; newref; newref = newref->next) {
+ for (SPObject *newref = child->getNext(); newref; newref = newref->getNext()) {
// if the sibling is an item AND overlaps our selection,
SPItem *newItem = dynamic_cast<SPItem *>(newref);
if (newItem) {
@@ -1003,55 +992,61 @@ sp_selection_raise(Inkscape::Selection *selection, SPDesktop *desktop)
}
}
}
- DocumentUndo::done(selection->layers()->getDocument(), SP_VERB_SELECTION_RAISE,
- //TRANSLATORS: "Raise" means "to raise an object" in the undo history
- C_("Undo action", "Raise"));
}
-void sp_selection_raise_to_top(Inkscape::Selection *selection, SPDesktop *desktop)
+void sp_selection_raise(Inkscape::Selection *selection, SPDesktop *desktop)
{
- SPDocument *document = selection->layers()->getDocument();
-
- if (selection->isEmpty()) {
- selection_display_message(desktop, Inkscape::WARNING_MESSAGE, _("Select <b>object(s)</b> to raise to top."));
+ if (selection->items().empty()) {
+ selection_display_message(desktop, Inkscape::WARNING_MESSAGE, _("Select <b>object(s)</b> to raise."));
return;
}
- std::vector<SPItem*> items = selection->itemList();
-
- SPGroup const *group = sp_item_list_common_parent_group(items);
+ SPGroup const *group = sp_item_list_common_parent_group(selection->items());
if (!group) {
selection_display_message(desktop, Inkscape::ERROR_MESSAGE, _("You cannot raise/lower objects from <b>different groups</b> or <b>layers</b>."));
return;
}
+ sp_object_set_raise(selection);
- std::vector<Inkscape::XML::Node*> rl(selection->reprList());
+ DocumentUndo::done(selection->layers()->getDocument(), SP_VERB_SELECTION_RAISE,
+ //TRANSLATORS: "Raise" means "to raise an object" in the undo history
+ C_("Undo action", "Raise"));
+}
+
+void sp_object_set_raise_to_top(ObjectSet *set) {
+ std::vector<Inkscape::XML::Node*> rl(set->xmlNodes().begin(), set->xmlNodes().end());
sort(rl.begin(),rl.end(),sp_repr_compare_position_bool);
for (std::vector<Inkscape::XML::Node*>::const_iterator l=rl.begin(); l!=rl.end();++l) {
Inkscape::XML::Node *repr =(*l);
repr->setPosition(-1);
}
-
- DocumentUndo::done(document, SP_VERB_SELECTION_TO_FRONT,
- _("Raise to top"));
}
-void sp_selection_lower(Inkscape::Selection *selection, SPDesktop *desktop)
+void sp_selection_raise_to_top(Inkscape::Selection *selection, SPDesktop *desktop)
{
- std::vector<SPItem*> items = selection->itemList();
- if (items.empty()) {
- selection_display_message(desktop, Inkscape::WARNING_MESSAGE, _("Select <b>object(s)</b> to lower."));
+ SPDocument *document = selection->layers()->getDocument();
+
+ if (selection->isEmpty()) {
+ selection_display_message(desktop, Inkscape::WARNING_MESSAGE, _("Select <b>object(s)</b> to raise to top."));
return;
}
- SPGroup const *group = sp_item_list_common_parent_group(items);
+ SPGroup const *group = sp_item_list_common_parent_group(selection->items());
if (!group) {
selection_display_message(desktop, Inkscape::ERROR_MESSAGE, _("You cannot raise/lower objects from <b>different groups</b> or <b>layers</b>."));
return;
}
- Inkscape::XML::Node *grepr = const_cast<Inkscape::XML::Node *>(group->getRepr());
+ sp_object_set_raise_to_top(selection);
+
+ DocumentUndo::done(document, SP_VERB_SELECTION_TO_FRONT,
+ _("Raise to top"));
+}
+
+void sp_object_set_lower(ObjectSet *set) {
+ std::vector<SPItem*> items(set->items().begin(), set->items().end());
+ Inkscape::XML::Node *grepr = const_cast<Inkscape::XML::Node *>(items.front()->parent->getRepr());
// Determine the common bbox of the selected items.
Geom::OptRect selected = enclose_items(items);
@@ -1086,48 +1081,65 @@ void sp_selection_lower(Inkscape::Selection *selection, SPDesktop *desktop)
}
}
}
-
- DocumentUndo::done(selection->layers()->getDocument(), SP_VERB_SELECTION_LOWER,
- //TRANSLATORS: "Lower" means "to lower an object" in the undo history
- C_("Undo action", "Lower"));
}
-void sp_selection_lower_to_bottom(Inkscape::Selection *selection, SPDesktop *desktop)
+void sp_selection_lower(Inkscape::Selection *selection, SPDesktop *desktop)
{
- SPDocument *document = selection->layers()->getDocument();
-
- if (selection->isEmpty()) {
- selection_display_message(desktop, Inkscape::WARNING_MESSAGE, _("Select <b>object(s)</b> to lower to bottom."));
+ if (selection->items().empty()) {
+ selection_display_message(desktop, Inkscape::WARNING_MESSAGE, _("Select <b>object(s)</b> to lower."));
return;
}
- std::vector<SPItem*> items =selection->itemList();
-
- SPGroup const *group = sp_item_list_common_parent_group(items);
+ SPGroup const *group = sp_item_list_common_parent_group(selection->items());
if (!group) {
selection_display_message(desktop, Inkscape::ERROR_MESSAGE, _("You cannot raise/lower objects from <b>different groups</b> or <b>layers</b>."));
return;
}
- std::vector<Inkscape::XML::Node*> rl(selection->reprList());
+ sp_object_set_lower(selection);
+
+ DocumentUndo::done(selection->layers()->getDocument(), SP_VERB_SELECTION_LOWER,
+ //TRANSLATORS: "Lower" means "to lower an object" in the undo history
+ C_("Undo action", "Lower"));
+}
+
+void sp_object_set_lower_to_bottom(ObjectSet *set) {
+ std::vector<Inkscape::XML::Node*> rl(set->xmlNodes().begin(), set->xmlNodes().end());
sort(rl.begin(),rl.end(),sp_repr_compare_position_bool);
for (std::vector<Inkscape::XML::Node*>::const_reverse_iterator l=rl.rbegin();l!=rl.rend();++l) {
gint minpos;
- SPObject *pp, *pc;
+ SPObject *pp;
Inkscape::XML::Node *repr = (*l);
- pp = document->getObjectByRepr(repr->parent());
+ pp = set->desktop()->getDocument()->getObjectByRepr(repr->parent());
minpos = 0;
g_assert(dynamic_cast<SPGroup *>(pp));
- pc = pp->firstChild();
- while (!dynamic_cast<SPItem *>(pc)) {
+ for (auto& pc: pp->children) {
+ if(dynamic_cast<SPItem *>(&pc)) {
+ break;
+ }
minpos += 1;
- pc = pc->next;
}
repr->setPosition(minpos);
}
+}
+
+void sp_selection_lower_to_bottom(Inkscape::Selection *selection, SPDesktop *desktop)
+{
+ if (selection->isEmpty()) {
+ selection_display_message(desktop, Inkscape::WARNING_MESSAGE, _("Select <b>object(s)</b> to lower to bottom."));
+ return;
+ }
+
+ SPGroup const *group = sp_item_list_common_parent_group(selection->items());
+ if (!group) {
+ selection_display_message(desktop, Inkscape::ERROR_MESSAGE, _("You cannot raise/lower objects from <b>different groups</b> or <b>layers</b>."));
+ return;
+ }
- DocumentUndo::done(document, SP_VERB_SELECTION_TO_BACK,
+ sp_object_set_lower_to_bottom(selection);
+
+ DocumentUndo::done(selection->layers()->getDocument(), SP_VERB_SELECTION_TO_BACK,
_("Lower to bottom"));
}
@@ -1173,13 +1185,14 @@ take_style_from_item(SPObject *object)
if (css == NULL)
return NULL;
- if ((dynamic_cast<SPGroup *>(object) && object->children) ||
- (dynamic_cast<SPText *>(object) && object->children && object->children->next == NULL)) {
+ if ((dynamic_cast<SPGroup *>(object) && object->firstChild()) ||
+ (dynamic_cast<SPText *>(object) && object->firstChild() && object->firstChild()->getNext() == NULL)) {
// if this is a text with exactly one tspan child, merge the style of that tspan as well
// If this is a group, merge the style of its topmost (last) child with style
- for (SPObject *last_element = object->lastChild(); last_element != NULL; last_element = last_element->getPrev()) {
- if ( last_element->style ) {
- SPCSSAttr *temp = sp_css_attr_from_object(last_element, SP_STYLE_FLAG_IFSET);
+ auto list = object->children | boost::adaptors::reversed;
+ for (auto& element: list) {
+ if (element.style ) {
+ SPCSSAttr *temp = sp_css_attr_from_object(&element, SP_STYLE_FLAG_IFSET);
if (temp) {
sp_repr_css_merge(css, temp);
sp_repr_css_attr_unref(temp);
@@ -1264,8 +1277,8 @@ void sp_selection_remove_livepatheffect(SPDesktop *desktop)
desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Select <b>object(s)</b> to remove live path effects from."));
return;
}
- std::vector<SPItem*> list=selection->itemList();
- for ( std::vector<SPItem*>::const_iterator itemlist=list.begin();itemlist!=list.end();++itemlist) {
+ auto list= selection->items();
+ for (auto itemlist=list.begin();itemlist!=list.end();++itemlist) {
SPItem *item = *itemlist;
sp_selection_remove_livepatheffect_impl(item);
@@ -1345,7 +1358,7 @@ void sp_selection_to_next_layer(SPDesktop *dt, bool suppressDone)
return;
}
- std::vector<SPItem*> items(selection->itemList());
+ std::vector<SPItem*> items(selection->items().begin(), selection->items().end());
bool no_more = false; // Set to true, if no more layers above
SPObject *next=Inkscape::next_layer(dt->currentRoot(), dt->currentLayer());
@@ -1389,7 +1402,7 @@ void sp_selection_to_prev_layer(SPDesktop *dt, bool suppressDone)
return;
}
- const std::vector<SPItem*> items(selection->itemList());
+ std::vector<SPItem*> items(selection->items().begin(), selection->items().end());
bool no_more = false; // Set to true, if no more layers below
SPObject *next=Inkscape::previous_layer(dt->currentRoot(), dt->currentLayer());
@@ -1432,7 +1445,7 @@ void sp_selection_to_layer(SPDesktop *dt, SPObject *moveto, bool suppressDone)
return;
}
- std::vector<SPItem*> items(selection->itemList());
+ std::vector<SPItem*> items(selection->items().begin(), selection->items().end());
if (moveto) {
selection->clear();
@@ -1452,7 +1465,7 @@ void sp_selection_to_layer(SPDesktop *dt, SPObject *moveto, bool suppressDone)
}
static bool
-selection_contains_original(SPItem *item, Inkscape::Selection *selection)
+object_set_contains_original(SPItem *item, ObjectSet *set)
{
bool contains_original = false;
@@ -1463,7 +1476,7 @@ selection_contains_original(SPItem *item, Inkscape::Selection *selection)
{
item_use = use->get_original();
use = dynamic_cast<SPUse *>(item_use);
- contains_original |= selection->includes(item_use);
+ contains_original |= set->includes(item_use);
if (item_use == item_use_first)
break;
}
@@ -1472,7 +1485,7 @@ selection_contains_original(SPItem *item, Inkscape::Selection *selection)
// data is part of the selection
SPTRef *tref = dynamic_cast<SPTRef *>(item);
if (!contains_original && tref) {
- contains_original = selection->includes(tref->getObjectReferredTo());
+ contains_original = set->includes(tref->getObjectReferredTo());
}
return contains_original;
@@ -1480,14 +1493,14 @@ selection_contains_original(SPItem *item, Inkscape::Selection *selection)
static bool
-selection_contains_both_clone_and_original(Inkscape::Selection *selection)
+object_set_contains_both_clone_and_original(ObjectSet *set)
{
bool clone_with_original = false;
- std::vector<SPItem*> items = selection->itemList();
- for (std::vector<SPItem*>::const_iterator l=items.begin();l!=items.end() ;++l) {
+ auto items = set->items();
+ for (auto l=items.begin();l!=items.end() ;++l) {
SPItem *item = *l;
if (item) {
- clone_with_original |= selection_contains_original(item, selection);
+ clone_with_original |= object_set_contains_original(item, set);
if (clone_with_original)
break;
}
@@ -1501,21 +1514,22 @@ value of set_i2d==false is only used by seltrans when it's dragging objects live
that case, items are already in the new position, but the repr is in the old, and this function
then simply updates the repr from item->transform.
*/
-void sp_selection_apply_affine(Inkscape::Selection *selection, Geom::Affine const &affine, bool set_i2d, bool compensate, bool adjust_transf_center)
+void sp_object_set_apply_affine(ObjectSet *set, Geom::Affine const &affine, bool set_i2d, bool compensate,
+ bool adjust_transf_center)
{
- if (selection->isEmpty())
+ if (set->isEmpty())
return;
// For each perspective with a box in selection, check whether all boxes are selected and
// unlink all non-selected boxes.
Persp3D *persp;
Persp3D *transf_persp;
- std::list<Persp3D *> plist = selection->perspList();
+ std::list<Persp3D *> plist = set->perspList();
for (std::list<Persp3D *>::iterator i = plist.begin(); i != plist.end(); ++i) {
persp = (Persp3D *) (*i);
- if (!persp3d_has_all_boxes_in_selection (persp, selection)) {
- std::list<SPBox3D *> selboxes = selection->box3DList(persp);
+ if (!persp3d_has_all_boxes_in_selection (persp, set)) {
+ std::list<SPBox3D *> selboxes = set->box3DList(persp);
// create a new perspective as a copy of the current one and link the selected boxes to it
transf_persp = persp3d_create_xml_element (persp->document, persp->perspective_impl);
@@ -1528,14 +1542,14 @@ void sp_selection_apply_affine(Inkscape::Selection *selection, Geom::Affine cons
persp3d_apply_affine_transformation(transf_persp, affine);
}
- std::vector<SPItem*> items = selection->itemList();
- for (std::vector<SPItem*>::const_iterator l=items.begin();l!=items.end() ;++l) {
+ auto items = set->items();
+ for (auto l=items.begin();l!=items.end() ;++l) {
SPItem *item = *l;
if( dynamic_cast<SPRoot *>(item) ) {
// An SVG element cannot have a transform. We could change 'x' and 'y' in response
// to a translation... but leave that for another day.
- selection->desktop()->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Cannot transform an embedded SVG."));
+ set->desktop()->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Cannot transform an embedded SVG."));
break;
}
@@ -1549,17 +1563,17 @@ void sp_selection_apply_affine(Inkscape::Selection *selection, Geom::Affine cons
#endif
// we're moving both a clone and its original or any ancestor in clone chain?
- bool transform_clone_with_original = selection_contains_original(item, selection);
+ bool transform_clone_with_original = object_set_contains_original(item, set);
// ...both a text-on-path and its path?
bool transform_textpath_with_path = ((dynamic_cast<SPText *>(item) && item->firstChild() && dynamic_cast<SPTextPath *>(item->firstChild()))
- && selection->includes( sp_textpath_get_path_item(dynamic_cast<SPTextPath *>(item->firstChild())) ));
+ && set->includes( sp_textpath_get_path_item(dynamic_cast<SPTextPath *>(item->firstChild())) ));
// ...both a flowtext and its frame?
- bool transform_flowtext_with_frame = (dynamic_cast<SPFlowtext *>(item) && selection->includes( dynamic_cast<SPFlowtext *>(item)->get_frame(NULL))); // (only the first frame is checked so far)
+ bool transform_flowtext_with_frame = (dynamic_cast<SPFlowtext *>(item) && set->includes( dynamic_cast<SPFlowtext *>(item)->get_frame(NULL))); // (only the first frame is checked so far)
// ...both an offset and its source?
- bool transform_offset_with_source = (dynamic_cast<SPOffset *>(item) && dynamic_cast<SPOffset *>(item)->sourceHref) && selection->includes( sp_offset_get_source(dynamic_cast<SPOffset *>(item)) );
+ bool transform_offset_with_source = (dynamic_cast<SPOffset *>(item) && dynamic_cast<SPOffset *>(item)->sourceHref) && set->includes( sp_offset_get_source(dynamic_cast<SPOffset *>(item)) );
// If we're moving a connector, we want to detach it
// from shapes that aren't part of the selection, but
@@ -1570,7 +1584,7 @@ void sp_selection_apply_affine(Inkscape::Selection *selection, Geom::Affine cons
SPItem *attItem[2] = {0, 0};
path->connEndPair.getAttachedItems(attItem);
for (int n = 0; n < 2; ++n) {
- if (!selection->includes(attItem[n])) {
+ if (!set->includes(attItem[n])) {
sp_conn_end_detach(item, n);
}
}
@@ -1598,10 +1612,10 @@ void sp_selection_apply_affine(Inkscape::Selection *selection, Geom::Affine cons
} else if (transform_flowtext_with_frame) {
// apply the inverse of the region's transform to the <use> so that the flow remains
// the same (even though the output itself gets transformed)
- for ( SPObject *region = item->firstChild() ; region ; region = region->getNext() ) {
- if (dynamic_cast<SPFlowregion *>(region) || dynamic_cast<SPFlowregionExclude *>(region)) {
- for ( SPObject *item = region->firstChild() ; item ; item = item->getNext() ) {
- SPUse *use = dynamic_cast<SPUse *>(item);
+ for (auto& region: item->children) {
+ if (dynamic_cast<SPFlowregion *>(&region) || dynamic_cast<SPFlowregionExclude *>(&region)) {
+ for (auto& itm: region.children) {
+ SPUse *use = dynamic_cast<SPUse *>(&itm);
if ( use ) {
use->doWriteTransform(use->getRepr(), use->transform.inverse(), NULL, compensate);
}
@@ -1692,15 +1706,15 @@ void sp_selection_apply_affine(Inkscape::Selection *selection, Geom::Affine cons
}
}
-void sp_selection_remove_transform(SPDesktop *desktop)
+void sp_object_set_remove_transform(SPDesktop *desktop)
{
if (desktop == NULL)
return;
Inkscape::Selection *selection = desktop->getSelection();
- std::vector<Inkscape::XML::Node*> items = selection->reprList();
- for (std::vector<Inkscape::XML::Node*>::const_iterator l=items.begin();l!=items.end() ;++l) {
+ auto items = selection->xmlNodes();
+ for (auto l=items.begin();l!=items.end() ;++l) {
(*l)->setAttribute("transform", NULL, false);
}
@@ -1709,14 +1723,14 @@ void sp_selection_remove_transform(SPDesktop *desktop)
}
void
-sp_selection_scale_absolute(Inkscape::Selection *selection,
- double const x0, double const x1,
- double const y0, double const y1)
+sp_object_set_scale_absolute(ObjectSet *set,
+ double x0, double x1,
+ double y0, double y1)
{
- if (selection->isEmpty())
+ if (set->isEmpty())
return;
- Geom::OptRect bbox = selection->visualBounds();
+ Geom::OptRect bbox = set->visualBounds();
if ( !bbox ) {
return;
}
@@ -1729,16 +1743,16 @@ sp_selection_scale_absolute(Inkscape::Selection *selection,
Geom::Translate const o2n(x0, y0);
Geom::Affine const final( p2o * scale * o2n );
- sp_selection_apply_affine(selection, final);
+ sp_object_set_apply_affine(set, final);
}
-void sp_selection_scale_relative(Inkscape::Selection *selection, Geom::Point const &align, Geom::Scale const &scale)
+void sp_object_set_scale_relative(ObjectSet *set, Geom::Point const &align, Geom::Scale const &scale)
{
- if (selection->isEmpty())
+ if (set->isEmpty())
return;
- Geom::OptRect bbox = selection->visualBounds();
+ Geom::OptRect bbox = set->visualBounds();
if ( !bbox ) {
return;
@@ -1754,21 +1768,21 @@ void sp_selection_scale_relative(Inkscape::Selection *selection, Geom::Point con
Geom::Translate const n2d(-align);
Geom::Translate const d2n(align);
Geom::Affine const final( n2d * scale * d2n );
- sp_selection_apply_affine(selection, final);
+ sp_object_set_apply_affine(set, final);
}
void
-sp_selection_rotate_relative(Inkscape::Selection *selection, Geom::Point const &center, gdouble const angle_degrees)
+sp_object_set_rotate_relative(ObjectSet *set, Geom::Point const &center, double angle_degrees)
{
Geom::Translate const d2n(center);
Geom::Translate const n2d(-center);
Geom::Rotate const rotate(Geom::Rotate::from_degrees(angle_degrees));
Geom::Affine const final( Geom::Affine(n2d) * rotate * d2n );
- sp_selection_apply_affine(selection, final);
+ sp_object_set_apply_affine(set, final);
}
void
-sp_selection_skew_relative(Inkscape::Selection *selection, Geom::Point const &align, double dx, double dy)
+sp_object_set_skew_relative(ObjectSet *set, Geom::Point const &align, double dx, double dy)
{
Geom::Translate const d2n(align);
Geom::Translate const n2d(-align);
@@ -1776,17 +1790,17 @@ sp_selection_skew_relative(Inkscape::Selection *selection, Geom::Point const &al
dx, 1,
0, 0);
Geom::Affine const final( n2d * skew * d2n );
- sp_selection_apply_affine(selection, final);
+ sp_object_set_apply_affine(set, final);
}
-void sp_selection_move_relative(Inkscape::Selection *selection, Geom::Point const &move, bool compensate)
+void sp_object_set_move_relative(ObjectSet *set, Geom::Point const &move, bool compensate)
{
- sp_selection_apply_affine(selection, Geom::Affine(Geom::Translate(move)), true, compensate);
+ sp_object_set_apply_affine(set, Geom::Affine(Geom::Translate(move)), true, compensate);
}
-void sp_selection_move_relative(Inkscape::Selection *selection, double dx, double dy)
+void sp_object_set_move_relative(ObjectSet *set, double dx, double dy)
{
- sp_selection_apply_affine(selection, Geom::Affine(Geom::Translate(dx, dy)));
+ sp_object_set_apply_affine(set, Geom::Affine(Geom::Translate(dx, dy)));
}
/**
@@ -1799,9 +1813,9 @@ void sp_selection_rotate_90(SPDesktop *desktop, bool ccw)
if (selection->isEmpty())
return;
- std::vector<SPItem*> items = selection->itemList();
+ auto items = selection->items();
Geom::Rotate const rot_90(Geom::Point(0, ccw ? 1 : -1)); // pos. or neg. rotation, depending on the value of ccw
- for (std::vector<SPItem*>::const_iterator l=items.begin();l!=items.end() ;++l) {
+ for (auto l=items.begin();l!=items.end() ;++l) {
SPItem *item = *l;
if (item) {
sp_item_rotate_rel(item, rot_90);
@@ -1826,7 +1840,7 @@ sp_selection_rotate(Inkscape::Selection *selection, gdouble const angle_degrees)
return;
}
- sp_selection_rotate_relative(selection, *center, angle_degrees);
+ sp_object_set_rotate_relative(selection, *center, angle_degrees);
DocumentUndo::maybeDone(selection->desktop()->getDocument(),
( ( angle_degrees > 0 )
@@ -1863,7 +1877,7 @@ void sp_select_same_fill_stroke_style(SPDesktop *desktop, gboolean fill, gboolea
std::vector<SPItem*> all_matches;
Inkscape::Selection *selection = desktop->getSelection();
- std::vector<SPItem*> items = selection->itemList();
+ auto items = selection->items();
std::vector<SPItem*> tmp;
for (std::vector<SPItem*>::const_iterator iter=all_list.begin();iter!=all_list.end();++iter) {
@@ -1873,7 +1887,7 @@ void sp_select_same_fill_stroke_style(SPDesktop *desktop, gboolean fill, gboolea
}
all_list=tmp;
- for (std::vector<SPItem*>::const_iterator sel_iter=items.begin();sel_iter!=items.end();++sel_iter) {
+ for (auto sel_iter=items.begin();sel_iter!=items.end();++sel_iter) {
SPItem *sel = *sel_iter;
std::vector<SPItem*> matches = all_list;
if (fill && stroke && style) {
@@ -1920,8 +1934,8 @@ void sp_select_same_object_type(SPDesktop *desktop)
Inkscape::Selection *selection = desktop->getSelection();
- std::vector<SPItem*> items=selection->itemList();
- for (std::vector<SPItem*>::const_iterator sel_iter=items.begin();sel_iter!=items.end();++sel_iter) {
+ auto items= selection->items();
+ for (auto sel_iter=items.begin();sel_iter!=items.end();++sel_iter) {
SPItem *sel = *sel_iter;
if (sel) {
matches = sp_get_same_object_type(sel, matches);
@@ -2175,7 +2189,7 @@ sp_selection_rotate_screen(Inkscape::Selection *selection, gdouble angle)
gdouble const zangle = 180 * atan2(zmove, r) / M_PI;
- sp_selection_rotate_relative(selection, *center, zangle);
+ sp_object_set_rotate_relative(selection, *center, zangle);
DocumentUndo::maybeDone(selection->desktop()->getDocument(),
( (angle > 0)
@@ -2205,7 +2219,7 @@ sp_selection_scale(Inkscape::Selection *selection, gdouble grow)
}
double const times = 1.0 + grow / max_len;
- sp_selection_scale_relative(selection, center, Geom::Scale(times, times));
+ sp_object_set_scale_relative(selection, center, Geom::Scale(times, times));
DocumentUndo::maybeDone(selection->desktop()->getDocument(),
( (grow > 0)
@@ -2218,8 +2232,7 @@ sp_selection_scale(Inkscape::Selection *selection, gdouble grow)
void
sp_selection_scale_screen(Inkscape::Selection *selection, gdouble grow_pixels)
{
- sp_selection_scale(selection,
- grow_pixels / selection->desktop()->current_zoom());
+ sp_selection_scale(selection, grow_pixels / selection->desktop()->current_zoom());
}
void
@@ -2235,7 +2248,7 @@ sp_selection_scale_times(Inkscape::Selection *selection, gdouble times)
}
Geom::Point const center(sel_bbox->midpoint());
- sp_selection_scale_relative(selection, center, Geom::Scale(times, times));
+ sp_object_set_scale_relative(selection, center, Geom::Scale(times, times));
DocumentUndo::done(selection->desktop()->getDocument(), SP_VERB_CONTEXT_SELECT,
_("Scale by whole factor"));
}
@@ -2247,7 +2260,7 @@ sp_selection_move(Inkscape::Selection *selection, gdouble dx, gdouble dy)
return;
}
- sp_selection_move_relative(selection, dx, dy);
+ sp_object_set_move_relative(selection, dx, dy);
SPDocument *doc = selection->layers()->getDocument();
if (dx == 0) {
@@ -2273,7 +2286,7 @@ sp_selection_move_screen(Inkscape::Selection *selection, gdouble dx, gdouble dy)
gdouble const zoom = selection->desktop()->current_zoom();
gdouble const zdx = dx / zoom;
gdouble const zdy = dy / zoom;
- sp_selection_move_relative(selection, zdx, zdy);
+ sp_object_set_move_relative(selection, zdx, zdy);
SPDocument *doc = selection->layers()->getDocument();
if (dx == 0) {
@@ -2305,10 +2318,10 @@ typedef struct ListReverse {
typedef GSList *Iterator;
static Iterator children(SPObject *o) {
- return make_list(o->firstChild(), NULL);
+ return make_list(o, NULL);
}
static Iterator siblings_after(SPObject *o) {
- return make_list(o->parent->firstChild(), o);
+ return make_list(o->parent, o);
}
static void dispose(Iterator i) {
g_slist_free(i);
@@ -2322,13 +2335,12 @@ typedef struct ListReverse {
private:
static GSList *make_list(SPObject *object, SPObject *limit) {
GSList *list = NULL;
- while ( object != limit ) {
- if (!object) { // TODO check if this happens in practice
- g_warning("Unexpected list overrun");
+ for (auto &child: object->children) {
+ if (&child == limit) {
break;
}
- list = g_slist_prepend(list, object);
- object = object->getNext();
+ list = g_slist_prepend(list, &child);
+
}
return list;
}
@@ -2433,7 +2445,8 @@ sp_selection_item_next(SPDesktop *desktop)
root = desktop->currentRoot();
}
- SPItem *item=next_item_from_list<Forward>(desktop, selection->itemList(), root, SP_CYCLING == SP_CYCLE_VISIBLE, inlayer, onlyvisible, onlysensitive);
+ std::vector<SPItem *> vec(selection->items().begin(), selection->items().end());
+ SPItem *item=next_item_from_list<Forward>(desktop, vec, root, SP_CYCLING == SP_CYCLE_VISIBLE, inlayer, onlyvisible, onlysensitive);
if (item) {
selection->set(item, PREFS_SELECTION_LAYER_RECURSIVE == inlayer);
@@ -2463,7 +2476,8 @@ sp_selection_item_prev(SPDesktop *desktop)
root = desktop->currentRoot();
}
- SPItem *item=next_item_from_list<ListReverse>(desktop, selection->itemList(), root, SP_CYCLING == SP_CYCLE_VISIBLE, inlayer, onlyvisible, onlysensitive);
+ std::vector<SPItem *> vec(selection->items().begin(), selection->items().end());
+ SPItem *item=next_item_from_list<ListReverse>(desktop, vec, root, SP_CYCLING == SP_CYCLE_VISIBLE, inlayer, onlyvisible, onlysensitive);
if (item) {
selection->set(item, PREFS_SELECTION_LAYER_RECURSIVE == inlayer);
@@ -2580,7 +2594,7 @@ void sp_selection_clone(SPDesktop *desktop)
return;
}
- std::vector<Inkscape::XML::Node*> reprs (selection->reprList());
+ std::vector<Inkscape::XML::Node*> reprs(selection->xmlNodes().begin(), selection->xmlNodes().end());
selection->clear();
@@ -2639,8 +2653,8 @@ sp_selection_relink(SPDesktop *desktop)
// Get a copy of current selection.
bool relinked = false;
- std::vector<SPItem*> items=selection->itemList();
- for (std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end();++i){
+ auto items= selection->items();
+ for (auto i=items.begin();i!=items.end();++i){
SPItem *item = *i;
if (dynamic_cast<SPUse *>(item)) {
@@ -2677,8 +2691,9 @@ sp_selection_unlink(SPDesktop *desktop)
// Get a copy of current selection.
std::vector<SPItem*> new_select;
bool unlinked = false;
- std::vector<SPItem*> items=selection->itemList();
- for (std::vector<SPItem*>::const_reverse_iterator i=items.rbegin();i!=items.rend();++i){
+ std::vector<SPItem *> items(selection->items().begin(), selection->items().end());
+
+ for (auto i=items.rbegin();i!=items.rend();++i){
SPItem *item = *i;
if (dynamic_cast<SPText *>(item)) {
@@ -2744,8 +2759,8 @@ sp_select_clone_original(SPDesktop *desktop)
// Check if other than two objects are selected
- std::vector<SPItem*> items=selection->itemList();
- if (items.size() != 1 || !item) {
+ auto items= selection->items();
+ if (boost::distance(items) != 1 || !item) {
desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, error);
return;
}
@@ -2842,8 +2857,8 @@ void sp_selection_clone_original_path_lpe(SPDesktop *desktop)
Inkscape::SVGOStringStream os;
SPObject * firstItem = NULL;
- std::vector<SPItem*> items=selection->itemList();
- for (std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end();++i){
+ auto items= selection->items();
+ for (auto i=items.begin();i!=items.end();++i){
if (SP_IS_SHAPE(*i) || SP_IS_TEXT(*i)) {
if (firstItem) {
os << "|";
@@ -2927,12 +2942,12 @@ void sp_selection_to_marker(SPDesktop *desktop, bool apply)
Geom::Point center( *c - corner ); // As defined by rotation center
center[Geom::Y] = -center[Geom::Y];
- std::vector<SPItem*> items(selection->itemList());
+ std::vector<SPItem*> items(selection->items().begin(), selection->items().end());
//items = g_slist_sort(items, (GCompareFunc) sp_object_compare_position); // Why needed?
// bottommost object, after sorting
- SPObject *parent = items[0]->parent;
+ SPObject *parent = items.front()->parent;
Geom::Affine parent_transform;
{
@@ -3001,7 +3016,7 @@ void sp_selection_to_guides(SPDesktop *desktop)
SPDocument *doc = desktop->getDocument();
Inkscape::Selection *selection = desktop->getSelection();
// we need to copy the list because it gets reset when objects are deleted
- std::vector<SPItem*> items(selection->itemList());
+ std::vector<SPItem*> items(selection->items().begin(), selection->items().end());
if (items.empty()) {
desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Select <b>object(s)</b> to convert to guides."));
@@ -3067,7 +3082,7 @@ void sp_selection_symbol(SPDesktop *desktop, bool /*apply*/ )
doc->ensureUpToDate();
- std::vector<SPObject*> items(selection->list());
+ std::vector<SPObject*> items(selection->objects().begin(), selection->objects().end());
sort(items.begin(),items.end(),sp_object_compare_position_bool);
// Keep track of parent, this is where <use> will be inserted.
@@ -3279,7 +3294,7 @@ sp_selection_tile(SPDesktop *desktop, bool apply)
move_p[Geom::Y] = -move_p[Geom::Y];
Geom::Affine move = Geom::Affine(Geom::Translate(move_p));
- std::vector<SPItem*> items (selection->itemList());
+ std::vector<SPItem*> items(selection->items().begin(), selection->items().end());
sort(items.begin(),items.end(),sp_object_compare_position_bool);
@@ -3384,7 +3399,7 @@ void sp_selection_untile(SPDesktop *desktop)
bool did = false;
- std::vector<SPItem*> items(selection->itemList());
+ std::vector<SPItem*> items(selection->items().begin(), selection->items().end());
for (std::vector<SPItem*>::const_reverse_iterator i=items.rbegin();i!=items.rend();++i){
SPItem *item = *i;
@@ -3407,9 +3422,9 @@ void sp_selection_untile(SPDesktop *desktop)
Geom::Affine pat_transform = basePat->getTransform();
pat_transform *= item->transform;
- for (SPObject *child = pattern->firstChild() ; child != NULL; child = child->next ) {
- if (dynamic_cast<SPItem *>(child)) {
- Inkscape::XML::Node *copy = child->getRepr()->duplicate(xml_doc);
+ for (auto& child: pattern->children) {
+ if (dynamic_cast<SPItem *>(&child)) {
+ Inkscape::XML::Node *copy = child.getRepr()->duplicate(xml_doc);
SPItem *i = dynamic_cast<SPItem *>(desktop->currentLayer()->appendChildRepr(copy));
// FIXME: relink clones to the new canvas objects
@@ -3443,18 +3458,18 @@ void sp_selection_untile(SPDesktop *desktop)
}
}
-void sp_selection_get_export_hints(Inkscape::Selection *selection, Glib::ustring &filename, float *xdpi, float *ydpi)
+void sp_object_set_get_export_hints(ObjectSet *set, Glib::ustring &filename, float *xdpi, float *ydpi)
{
- if (selection->isEmpty()) {
+ if (set->isEmpty()) {
return;
}
- std::vector<Inkscape::XML::Node*> const reprlst = selection->reprList();
+ auto reprlst = set->xmlNodes();
bool filename_search = TRUE;
bool xdpi_search = TRUE;
bool ydpi_search = TRUE;
- for (std::vector<Inkscape::XML::Node*>::const_iterator i=reprlst.begin();filename_search&&xdpi_search&&ydpi_search&&i!=reprlst.end();++i){
+ for (auto i=reprlst.begin();filename_search&&xdpi_search&&ydpi_search&&i!=reprlst.end();++i){
gchar const *dpi_string;
Inkscape::XML::Node *repr = *i;
@@ -3541,7 +3556,7 @@ void sp_selection_create_bitmap_copy(SPDesktop *desktop)
}
// List of the items to show; all others will be hidden
- std::vector<SPItem*> items(selection->itemList());
+ std::vector<SPItem*> items(selection->items().begin(), selection->items().end());
// Sort items so that the topmost comes last
sort(items.begin(),items.end(),sp_item_repr_compare_position_bool);
@@ -3594,7 +3609,7 @@ void sp_selection_create_bitmap_copy(SPDesktop *desktop)
float hint_xdpi = 0, hint_ydpi = 0;
Glib::ustring hint_filename;
// take resolution hint from the selected objects
- sp_selection_get_export_hints(selection, hint_filename, &hint_xdpi, &hint_ydpi);
+ sp_object_set_get_export_hints(selection, hint_filename, &hint_xdpi, &hint_ydpi);
if (hint_xdpi != 0) {
res = hint_xdpi;
} else {
@@ -3742,7 +3757,7 @@ void sp_selection_set_clipgroup(SPDesktop *desktop)
return;
}
- std::vector<Inkscape::XML::Node*> p(selection->reprList());
+ std::vector<Inkscape::XML::Node*> p(selection->xmlNodes().begin(), selection->xmlNodes().end());
sort(p.begin(),p.end(),sp_repr_compare_position_bool);
@@ -3852,14 +3867,14 @@ void sp_selection_set_mask(SPDesktop *desktop, bool apply_clip_path, bool apply_
if ( apply_to_layer && is_empty) {
desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Select <b>object(s)</b> to create clippath or mask from."));
return;
- } else if (!apply_to_layer && ( is_empty || selection->itemList().size()==1 )) {
+ } else if (!apply_to_layer && ( is_empty || boost::distance(selection->items())==1 )) {
desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Select mask object and <b>object(s)</b> to apply clippath or mask to."));
return;
}
// FIXME: temporary patch to prevent crash!
// Remove this when bboxes are fixed to not blow up on an item clipped/masked with its own clone
- bool clone_with_original = selection_contains_both_clone_and_original(selection);
+ bool clone_with_original = object_set_contains_both_clone_and_original(selection);
if (clone_with_original) {
return; // in this version, you cannot clip/mask an object with its own clone
}
@@ -3867,7 +3882,7 @@ void sp_selection_set_mask(SPDesktop *desktop, bool apply_clip_path, bool apply_
doc->ensureUpToDate();
- std::vector<SPItem*> items(selection->itemList());
+ std::vector<SPItem*> items(selection->items().begin(), selection->items().end());
sort(items.begin(),items.end(),sp_object_compare_position_bool);
@@ -3919,18 +3934,13 @@ void sp_selection_set_mask(SPDesktop *desktop, bool apply_clip_path, bool apply_
if (grouping == PREFS_MASKOBJECT_GROUPING_ALL) {
// group all those objects into one group
// and apply mask to that
- Inkscape::XML::Node *group = xml_doc->createElement("svg:g");
+ ObjectSet* set = new ObjectSet(selection->desktop());
+ set->add(apply_to_items.begin(), apply_to_items.end());
- // make a note we should ungroup this when unsetting mask
- group->setAttribute("inkscape:groupmode", "maskhelper");
-
- std::vector<Inkscape::XML::Node*> reprs_to_group;
- for (std::vector<SPItem*>::const_iterator i = apply_to_items.begin(); i != apply_to_items.end(); ++i) {
- reprs_to_group.push_back(static_cast<SPObject*>(*i)->getRepr());
- }
items_to_select.clear();
- sp_selection_group_impl(reprs_to_group, group, xml_doc, doc);
+ Inkscape::XML::Node *group = sp_object_set_group(set);
+ group->setAttribute("inkscape:groupmode", "maskhelper");
// apply clip/mask only to newly created group
apply_to_items.clear();
@@ -3938,6 +3948,7 @@ void sp_selection_set_mask(SPDesktop *desktop, bool apply_clip_path, bool apply_
items_to_select.push_back((SPItem*)(doc->getObjectByRepr(group)));
+ delete set;
Inkscape::GC::release(group);
}
if (grouping == PREFS_MASKOBJECT_GROUPING_SEPARATE) {
@@ -4029,7 +4040,7 @@ void sp_selection_unset_mask(SPDesktop *desktop, bool apply_clip_path) {
gchar const *attributeName = apply_clip_path ? "clip-path" : "mask";
std::map<SPObject*,SPItem*> referenced_objects;
- std::vector<SPItem*> items(selection->itemList());
+ std::vector<SPItem*> items(selection->items().begin(), selection->items().end());
selection->clear();
GSList *items_to_ungroup = NULL;
@@ -4075,9 +4086,9 @@ void sp_selection_unset_mask(SPDesktop *desktop, bool apply_clip_path) {
for ( std::map<SPObject*,SPItem*>::iterator it = referenced_objects.begin() ; it != referenced_objects.end() ; ++it) {
SPObject *obj = (*it).first; // Group containing the clipped paths or masks
GSList *items_to_move = NULL;
- for ( SPObject *child = obj->firstChild() ; child; child = child->getNext() ) {
+ for (auto& child: obj->children) {
// Collect all clipped paths and masks within a single group
- Inkscape::XML::Node *copy = child->getRepr()->duplicate(xml_doc);
+ Inkscape::XML::Node *copy = child.getRepr()->duplicate(xml_doc);
if(copy->attribute("inkscape:original-d") && copy->attribute("inkscape:path-effect"))
{
copy->setAttribute("d", copy->attribute("inkscape:original-d"));
@@ -4236,11 +4247,11 @@ static void itemtree_map(void (*f)(SPItem *, SPDesktop *), SPObject *root, SPDes
f(item, desktop);
}
}
- for ( SPObject::SiblingIterator iter = root->firstChild() ; iter ; ++iter ) {
+ for (auto& child: root->children) {
//don't recurse into locked layers
- SPItem *item = dynamic_cast<SPItem *>(&*iter);
+ SPItem *item = dynamic_cast<SPItem *>(&child);
if (!(item && desktop->isLayer(item) && item->isLocked())) {
- itemtree_map(f, iter, desktop);
+ itemtree_map(f, &child, desktop);
}
}
}
diff --git a/src/selection-chemistry.h b/src/selection-chemistry.h
index 82b91c617..ca9062320 100644
--- a/src/selection-chemistry.h
+++ b/src/selection-chemistry.h
@@ -26,6 +26,7 @@ class SPDesktop;
namespace Inkscape {
class Selection;
+class ObjectSet;
namespace LivePathEffect {
class PathParam;
@@ -78,6 +79,11 @@ void sp_selection_group(Inkscape::Selection *selection, SPDesktop *desktop);
void sp_selection_ungroup(Inkscape::Selection *selection, SPDesktop *desktop);
void sp_selection_ungroup_pop_selection(Inkscape::Selection *selection, SPDesktop *desktop);
+void sp_object_set_raise(Inkscape::ObjectSet *set);
+void sp_object_set_raise_to_top(Inkscape::ObjectSet *set);
+void sp_object_set_lower(Inkscape::ObjectSet *set);
+void sp_object_set_lower_to_bottom(Inkscape::ObjectSet *set);
+
void sp_selection_raise(Inkscape::Selection *selection, SPDesktop *desktop);
void sp_selection_raise_to_top(Inkscape::Selection *selection, SPDesktop *desktop);
void sp_selection_lower(Inkscape::Selection *selection, SPDesktop *desktop);
@@ -103,14 +109,15 @@ void sp_selection_to_next_layer( SPDesktop *desktop, bool suppressDone = false )
void sp_selection_to_prev_layer( SPDesktop *desktop, bool suppressDone = false );
void sp_selection_to_layer( SPDesktop *desktop, SPObject *layer, bool suppressDone = false );
-void sp_selection_apply_affine(Inkscape::Selection *selection, Geom::Affine const &affine, bool set_i2d = true, bool compensate = true, bool adjust_transf_center = true);
-void sp_selection_remove_transform (SPDesktop *desktop);
-void sp_selection_scale_absolute (Inkscape::Selection *selection, double x0, double x1, double y0, double y1);
-void sp_selection_scale_relative(Inkscape::Selection *selection, Geom::Point const &align, Geom::Scale const &scale);
-void sp_selection_rotate_relative (Inkscape::Selection *selection, Geom::Point const &center, double angle);
-void sp_selection_skew_relative (Inkscape::Selection *selection, Geom::Point const &align, double dx, double dy);
-void sp_selection_move_relative (Inkscape::Selection *selection, Geom::Point const &move, bool compensate = true);
-void sp_selection_move_relative (Inkscape::Selection *selection, double dx, double dy);
+void sp_object_set_apply_affine(Inkscape::ObjectSet *set, Geom::Affine const &affine, bool set_i2d = true,
+ bool compensate = true, bool adjust_transf_center = true);
+void sp_object_set_remove_transform(SPDesktop *desktop);
+void sp_object_set_scale_absolute(Inkscape::ObjectSet *set, double x0, double x1, double y0, double y1);
+void sp_object_set_scale_relative(Inkscape::ObjectSet *set, Geom::Point const &align, Geom::Scale const &scale);
+void sp_object_set_rotate_relative(Inkscape::ObjectSet *set, Geom::Point const &center, double angle);
+void sp_object_set_skew_relative(Inkscape::ObjectSet *set, Geom::Point const &align, double dx, double dy);
+void sp_object_set_move_relative(Inkscape::ObjectSet *set, Geom::Point const &move, bool compensate = true);
+void sp_object_set_move_relative(Inkscape::ObjectSet *set, double dx, double dy);
void sp_selection_rotate_90 (SPDesktop *desktop, bool ccw);
void sp_selection_rotate (Inkscape::Selection *selection, double angle);
@@ -151,7 +158,7 @@ void scroll_to_show_item(SPDesktop *desktop, SPItem *item);
void sp_undo (SPDesktop *desktop, SPDocument *doc);
void sp_redo (SPDesktop *desktop, SPDocument *doc);
-void sp_selection_get_export_hints (Inkscape::Selection *selection, Glib::ustring &filename, float *xdpi, float *ydpi);
+void sp_object_set_get_export_hints(Inkscape::ObjectSet *set, Glib::ustring &filename, float *xdpi, float *ydpi);
void sp_document_get_export_hints (SPDocument * doc, Glib::ustring &filename, float *xdpi, float *ydpi);
void sp_selection_create_bitmap_copy (SPDesktop *desktop);
diff --git a/src/selection-describer.cpp b/src/selection-describer.cpp
index 584510756..43fe1311d 100644
--- a/src/selection-describer.cpp
+++ b/src/selection-describer.cpp
@@ -113,7 +113,7 @@ void SelectionDescriber::_selectionModified(Inkscape::Selection *selection, guin
}
void SelectionDescriber::_updateMessageFromSelection(Inkscape::Selection *selection) {
- std::vector<SPItem*> const items = selection->itemList();
+ std::vector<SPItem*> items(selection->items().begin(), selection->items().end());
if (items.empty()) { // no items
_context.set(Inkscape::NORMAL_MESSAGE, _when_nothing);
diff --git a/src/selection.cpp b/src/selection.cpp
index 05ab68550..bdd4f0dc7 100644
--- a/src/selection.cpp
+++ b/src/selection.cpp
@@ -7,8 +7,10 @@
* bulia byak <buliabyak@users.sf.net>
* Andrius R. <knutux@gmail.com>
* Abhishek Sharma
+ * Adrian Boguszewski
*
- * Copyright (C) 2006 Andrius R.
+ * Copyright (C) 2016 Adrian Boguszewski
+ * Copyright (C) 2006 Andrius R.
* Copyright (C) 2004-2005 MenTaLguY
* Copyright (C) 1999-2002 Lauris Kaplinski
* Copyright (C) 2001-2002 Ximian, Inc.
@@ -17,32 +19,24 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
#endif
#include "inkscape.h"
-#include "document.h"
#include "xml/repr.h"
#include "preferences.h"
#include "sp-shape.h"
#include "sp-path.h"
-#include "sp-item-group.h"
-#include "box3d.h"
-#include "persp3d.h"
+#include "desktop.h"
+#include "document.h"
#define SP_SELECTION_UPDATE_PRIORITY (G_PRIORITY_HIGH_IDLE + 1)
namespace Inkscape {
-Selection::Selection(LayerModel *layers, SPDesktop *desktop) :
- _objs(std::list<SPObject*>()),
- _objs_vector(std::vector<SPObject*>()),
- _objs_set(std::set<SPObject*>()),
- _reprs(std::vector<XML::Node*>()),
- _items(std::vector<SPItem*>()),
+Selection::Selection(LayerModel *layers, SPDesktop *desktop):
+ ObjectSet(desktop),
_layers(layers),
- _desktop(desktop),
_selection_context(NULL),
_flags(0),
_idle(0)
@@ -50,7 +44,6 @@ Selection::Selection(LayerModel *layers, SPDesktop *desktop) :
}
Selection::~Selection() {
- _clear();
_layers = NULL;
if (_idle) {
g_source_remove(_idle);
@@ -70,8 +63,7 @@ void Selection::_schedule_modified(SPObject */*obj*/, guint flags) {
this->_flags |= flags;
}
-gboolean
-Selection::_emit_modified(Selection *selection)
+gboolean Selection::_emit_modified(Selection *selection)
{
/* force new handler to be created if requested before we return */
selection->_idle = 0;
@@ -104,8 +96,7 @@ void Selection::_emitChanged(bool persist_selection_context/* = false */) {
_changed_signal.emit(this);
}
-void
-Selection::_releaseContext(SPObject *obj)
+void Selection::_releaseContext(SPObject *obj)
{
if (NULL == _selection_context || _selection_context != obj)
return;
@@ -116,354 +107,38 @@ Selection::_releaseContext(SPObject *obj)
_selection_context = NULL;
}
-void Selection::_invalidateCachedLists() {
- _items.clear();
- _reprs.clear();
- _objs_vector.clear();
-}
-
-void Selection::_clear() {
- _invalidateCachedLists();
- while (!_objs.empty()) {
- SPObject *obj=_objs.front();
- _remove(obj);
- }
-}
-
SPObject *Selection::activeContext() {
if (NULL != _selection_context)
return _selection_context;
return _layers->currentLayer();
- }
-
-bool Selection::includes(SPObject *obj) const {
- if (obj == NULL)
- return FALSE;
-
- g_return_val_if_fail(SP_IS_OBJECT(obj), FALSE);
-
- return ( _objs_set.find(obj)!=_objs_set.end() );
-}
-
-void Selection::add(SPObject *obj, bool persist_selection_context/* = false */) {
- g_return_if_fail(obj != NULL);
- g_return_if_fail(SP_IS_OBJECT(obj));
- g_return_if_fail(obj->document != NULL);
-
- if (includes(obj)) {
- return;
- }
-
- _invalidateCachedLists();
- _add(obj);
- _emitChanged(persist_selection_context);
-}
-
-void Selection::add_3D_boxes_recursively(SPObject *obj) {
- std::list<SPBox3D *> boxes = box3d_extract_boxes(obj);
-
- for (std::list<SPBox3D *>::iterator i = boxes.begin(); i != boxes.end(); ++i) {
- SPBox3D *box = *i;
- _3dboxes.push_back(box);
- }
-}
-
-void Selection::_add(SPObject *obj) {
- // unselect any of the item's ancestors and descendants which may be selected
- // (to prevent double-selection)
- _removeObjectDescendants(obj);
- _removeObjectAncestors(obj);
- g_return_if_fail(SP_IS_OBJECT(obj));
-
- _objs.push_front(obj);
- _objs_set.insert(obj);
-
- add_3D_boxes_recursively(obj);
-
- _release_connections[obj] = obj->connectRelease(sigc::mem_fun(*this, (void (Selection::*)(SPObject *))&Selection::remove));
- _modified_connections[obj] = obj->connectModified(sigc::mem_fun(*this, &Selection::_schedule_modified));
}
void Selection::set(SPObject *object, bool persist_selection_context) {
- _clear();
- add(object, persist_selection_context);
-}
-
-void Selection::toggle(SPObject *obj) {
- if (includes (obj)) {
- remove (obj);
- } else {
- add(obj);
- }
-}
-
-void Selection::remove(SPObject *obj) {
- g_return_if_fail(obj != NULL);
- g_return_if_fail(SP_IS_OBJECT(obj));
- g_return_if_fail(includes(obj));
-
- _invalidateCachedLists();
- _remove(obj);
- _emitChanged();
-}
-
-void Selection::remove_3D_boxes_recursively(SPObject *obj) {
- std::list<SPBox3D *> boxes = box3d_extract_boxes(obj);
-
- for (std::list<SPBox3D *>::iterator i = boxes.begin(); i != boxes.end(); ++i) {
- SPBox3D *box = *i;
- std::list<SPBox3D *>::iterator b = std::find(_3dboxes.begin(), _3dboxes.end(), box);
- if (b == _3dboxes.end()) {
- g_print ("Warning! Trying to remove unselected box from selection.\n");
- return;
- }
- _3dboxes.erase(b);
- }
-}
-
-void Selection::_remove(SPObject *obj) {
- _modified_connections[obj].disconnect();
- _modified_connections.erase(obj);
-
- _release_connections[obj].disconnect();
- _release_connections.erase(obj);
-
- remove_3D_boxes_recursively(obj);
-
- _objs.remove(obj);
- _objs_set.erase(obj);
-}
-
-void Selection::setList(std::vector<SPItem*> const &list) {
- // Clear and add, or just clear with emit.
- if (!list.empty()) {
- _clear();
- addList(list);
- } else clear();
-}
-
-void Selection::addList(std::vector<SPItem*> const &list) {
-
- if (list.empty())
- return;
-
- _invalidateCachedLists();
-
- for ( std::vector<SPItem*>::const_iterator iter=list.begin();iter!=list.end(); ++iter) {
- SPObject *obj = *iter;
- if (includes(obj)) continue;
- _add (obj);
- }
-
- _emitChanged();
+ ObjectSet::set(object);
+ _emitChanged(persist_selection_context);
}
void Selection::setReprList(std::vector<XML::Node*> const &list) {
- _clear();
+ clear();
- for ( std::vector<XML::Node*>::const_reverse_iterator iter=list.rbegin();iter!=list.rend(); ++iter) {
- SPObject *obj=_objectForXMLNode(*iter);
+ for (std::vector<XML::Node*>::const_reverse_iterator iter = list.rbegin(); iter != list.rend(); ++iter) {
+ SPObject *obj = _objectForXMLNode(*iter);
if (obj) {
- _add(obj);
+ add(obj);
}
}
_emitChanged();
}
-void Selection::clear() {
- _clear();
- _emitChanged();
-}
-
-std::vector<SPObject*> const &Selection::list() {
- if(!_objs_vector.empty())
- return _objs_vector;
-
- for ( std::list<SPObject*>::const_iterator iter=_objs.begin();iter!=_objs.end(); ++iter) {
- _objs_vector.push_back(*iter);
- }
- return _objs_vector;
-
-}
-
-std::vector<SPItem*> const &Selection::itemList() {
- if (!_items.empty()) {
- return _items;
- }
-
- for ( std::list<SPObject*>::const_iterator iter=_objs.begin();iter!=_objs.end(); ++iter) {
- SPObject *obj=*iter;
- if (SP_IS_ITEM(obj)) {
- _items.push_back(SP_ITEM(obj));
- }
- }
- return _items;
-}
-
-std::vector<XML::Node*> const &Selection::reprList() {
- if (!_reprs.empty()) { return _reprs; }
- std::vector<SPItem*> list = itemList();
- for ( std::vector<SPItem*>::const_iterator iter=list.begin();iter!=list.end(); ++iter) {
- SPObject *obj = *iter;
- _reprs.push_back(obj->getRepr());
- }
- return _reprs;
-}
-
-std::list<Persp3D *> const Selection::perspList() {
- std::list<Persp3D *> pl;
- for (std::list<SPBox3D *>::iterator i = _3dboxes.begin(); i != _3dboxes.end(); ++i) {
- Persp3D *persp = box3d_get_perspective(*i);
- if (std::find(pl.begin(), pl.end(), persp) == pl.end())
- pl.push_back(persp);
- }
- return pl;
-}
-
-std::list<SPBox3D *> const Selection::box3DList(Persp3D *persp) {
- std::list<SPBox3D *> boxes;
- if (persp) {
- for (std::list<SPBox3D *>::iterator i = _3dboxes.begin(); i != _3dboxes.end(); ++i) {
- SPBox3D *box = *i;
- if (persp == box3d_get_perspective(box)) {
- boxes.push_back(box);
- }
- }
- } else {
- boxes = _3dboxes;
- }
- return boxes;
-}
-
-SPObject *Selection::single() {
- if ( _objs.size() == 1 ) {
- return _objs.front();
- } else {
- return NULL;
- }
-}
-
-SPItem *Selection::singleItem() {
- std::vector<SPItem*> const items=itemList();
- if ( items.size()==1) {
- return items[0];
- } else {
- return NULL;
- }
-}
-
-SPItem *Selection::smallestItem(Selection::CompareSize compare) {
- return _sizeistItem(true, compare);
-}
-
-SPItem *Selection::largestItem(Selection::CompareSize compare) {
- return _sizeistItem(false, compare);
-}
-
-SPItem *Selection::_sizeistItem(bool sml, Selection::CompareSize compare) {
- std::vector<SPItem*> const items = const_cast<Selection *>(this)->itemList();
- gdouble max = sml ? 1e18 : 0;
- SPItem *ist = NULL;
-
- for ( std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end(); ++i) {
- Geom::OptRect obox = SP_ITEM(*i)->desktopPreferredBounds();
- if (!obox || obox.empty()) continue;
- Geom::Rect bbox = *obox;
-
- gdouble size = compare == 2 ? bbox.area() :
- (compare == 1 ? bbox.width() : bbox.height());
- size = sml ? size : size * -1;
- if (size < max) {
- max = size;
- ist = SP_ITEM(*i);
- }
- }
- return ist;
-}
-
-Inkscape::XML::Node *Selection::singleRepr() {
- SPObject *obj=single();
- return obj ? obj->getRepr() : NULL;
-}
-
-Geom::OptRect Selection::bounds(SPItem::BBoxType type) const
-{
- return (type == SPItem::GEOMETRIC_BBOX) ?
- geometricBounds() : visualBounds();
-}
-
-Geom::OptRect Selection::geometricBounds() const
-{
- std::vector<SPItem*> const items = const_cast<Selection *>(this)->itemList();
-
- Geom::OptRect bbox;
- for ( std::vector<SPItem*>::const_iterator iter=items.begin();iter!=items.end(); ++iter) {
- bbox.unionWith(SP_ITEM(*iter)->desktopGeometricBounds());
- }
- return bbox;
-}
-
-Geom::OptRect Selection::visualBounds() const
-{
- std::vector<SPItem*> const items = const_cast<Selection *>(this)->itemList();
-
- Geom::OptRect bbox;
- for ( std::vector<SPItem*>::const_iterator iter=items.begin();iter!=items.end(); ++iter) {
- bbox.unionWith(SP_ITEM(*iter)->desktopVisualBounds());
- }
- return bbox;
-}
-
-Geom::OptRect Selection::preferredBounds() const
-{
- if (Inkscape::Preferences::get()->getInt("/tools/bounding_box") == 0) {
- return bounds(SPItem::VISUAL_BBOX);
- } else {
- return bounds(SPItem::GEOMETRIC_BBOX);
- }
-}
-
-Geom::OptRect Selection::documentBounds(SPItem::BBoxType type) const
-{
- Geom::OptRect bbox;
- std::vector<SPItem*> const items = const_cast<Selection *>(this)->itemList();
- if (items.empty()) return bbox;
-
- for ( std::vector<SPItem*>::const_iterator iter=items.begin();iter!=items.end(); ++iter) {
- SPItem *item = SP_ITEM(*iter);
- bbox |= item->documentBounds(type);
- }
-
- return bbox;
-}
-
-// If we have a selection of multiple items, then the center of the first item
-// will be returned; this is also the case in SelTrans::centerRequest()
-boost::optional<Geom::Point> Selection::center() const {
- std::vector<SPItem*> const items = const_cast<Selection *>(this)->itemList();
- if (!items.empty()) {
- SPItem *first = items.back(); // from the first item in selection
- if (first->isCenterSet()) { // only if set explicitly
- return first->getCenter();
- }
- }
- Geom::OptRect bbox = preferredBounds();
- if (bbox) {
- return bbox->midpoint();
- } else {
- return boost::optional<Geom::Point>();
- }
-}
-
std::vector<Inkscape::SnapCandidatePoint> Selection::getSnapPoints(SnapPreferences const *snapprefs) const {
std::vector<Inkscape::SnapCandidatePoint> p;
if (snapprefs != NULL){
SnapPreferences snapprefs_dummy = *snapprefs; // create a local copy of the snapping prefs
snapprefs_dummy.setTargetSnappable(Inkscape::SNAPTARGET_ROTATION_CENTER, false); // locally disable snapping to the item center
- std::vector<SPItem*> const items = const_cast<Selection *>(this)->itemList();
- for ( std::vector<SPItem*>::const_iterator iter=items.begin();iter!=items.end(); ++iter) {
+ auto items = const_cast<Selection *>(this)->items();
+ for (auto iter = items.begin(); iter != items.end(); ++iter) {
SPItem *this_item = *iter;
this_item->getSnappoints(p, &snapprefs_dummy);
@@ -478,34 +153,6 @@ std::vector<Inkscape::SnapCandidatePoint> Selection::getSnapPoints(SnapPreferenc
return p;
}
-void Selection::_removeObjectDescendants(SPObject *obj) {
- std::vector<SPObject*> toremove;
- for ( std::list<SPObject*>::const_iterator iter=_objs.begin();iter!=_objs.end(); ++iter) {
- SPObject *sel_obj= dynamic_cast<SPObject*>(*iter);
- SPObject *parent = sel_obj->parent;
- while (parent) {
- if ( parent == obj ) {
- toremove.push_back(sel_obj);
- break;
- }
- parent = parent->parent;
- }
- }
- for ( std::vector<SPObject*>::const_iterator iter=toremove.begin();iter!=toremove.end(); ++iter) {
- _remove(*iter);
- }
-}
-
-void Selection::_removeObjectAncestors(SPObject *obj) {
- SPObject *parent = obj->parent;
- while (parent) {
- if (includes(parent)) {
- _remove(parent);
- }
- parent = parent->parent;
- }
-}
-
SPObject *Selection::_objectForXMLNode(Inkscape::XML::Node *repr) const {
g_return_val_if_fail(repr != NULL, NULL);
gchar const *id = repr->attribute("id");
@@ -516,25 +163,39 @@ SPObject *Selection::_objectForXMLNode(Inkscape::XML::Node *repr) const {
}
size_t Selection::numberOfLayers() {
- std::vector<SPItem*> const items = const_cast<Selection *>(this)->itemList();
+ auto items = this->items();
std::set<SPObject*> layers;
- for ( std::vector<SPItem*>::const_iterator iter=items.begin();iter!=items.end(); ++iter) {
+ for (auto iter = items.begin(); iter != items.end(); ++iter) {
SPObject *layer = _layers->layerForObject(*iter);
layers.insert(layer);
}
+
return layers.size();
}
size_t Selection::numberOfParents() {
- std::vector<SPItem*> const items = const_cast<Selection *>(this)->itemList();
+ auto items = this->items();
std::set<SPObject*> parents;
- for ( std::vector<SPItem*>::const_iterator iter=items.begin();iter!=items.end(); ++iter) {
+ for (auto iter = items.begin(); iter != items.end(); ++iter) {
SPObject *parent = (*iter)->parent;
parents.insert(parent);
}
return parents.size();
}
+void Selection::_emitSignals() {
+ _emitChanged();
+}
+
+void Selection::_connectSignals(SPObject *object) {
+ _modified_connections[object] = object->connectModified(sigc::mem_fun(*this, &Selection::_schedule_modified));
+}
+
+void Selection::_releaseSignals(SPObject *object) {
+ _modified_connections[object].disconnect();
+ _modified_connections.erase(object);
+}
+
}
/*
diff --git a/src/selection.h b/src/selection.h
index 04bcca402..4ea70c38d 100644
--- a/src/selection.h
+++ b/src/selection.h
@@ -5,7 +5,9 @@
* Lauris Kaplinski <lauris@kaplinski.com>
* MenTaLguY <mental@rydia.net>
* bulia byak <buliabyak@users.sf.net>
+ * Adrian Boguszewski
*
+ * Copyright (C) 2016 Adrian Boguszewski
* Copyright (C) 2004-2005 MenTaLguY
* Copyright (C) 1999-2002 Lauris Kaplinski
* Copyright (C) 2001-2002 Ximian, Inc.
@@ -15,21 +17,16 @@
#include <vector>
#include <map>
-#include <list>
-#include <set>
#include <stddef.h>
#include <sigc++/sigc++.h>
#include "inkgc/gc-managed.h"
#include "gc-finalized.h"
#include "gc-anchored.h"
-#include "inkgc/gc-soft-ptr.h"
#include "sp-item.h"
+#include "object-set.h"
-class SPDesktop;
class SPItem;
-class SPBox3D;
-class Persp3D;
namespace Inkscape {
class LayerModel;
@@ -38,7 +35,6 @@ class Node;
}
}
-
namespace Inkscape {
/**
@@ -60,10 +56,10 @@ namespace Inkscape {
*/
class Selection : public Inkscape::GC::Managed<>,
public Inkscape::GC::Finalized,
- public Inkscape::GC::Anchored
+ public Inkscape::GC::Anchored,
+ public ObjectSet
{
public:
- enum CompareSize { HORIZONTAL, VERTICAL, AREA };
/**
* Constructs an selection object, bound to a particular
* layer model
@@ -82,12 +78,7 @@ public:
*/
LayerModel *layers() { return _layers; }
- /**
- * Returns the desktop the selection is bound to
- *
- * @return the desktop the selection is bound to, or NULL if in console mode
- */
- SPDesktop *desktop() { return _desktop; }
+
/**
* Returns active layer for selection (currentLayer or its parent).
@@ -96,19 +87,16 @@ public:
*/
SPObject *activeContext();
- /**
- * Add an SPObject to the set of selected objects.
- *
- * @param obj the SPObject to add
- */
- void add(SPObject *obj, bool persist_selection_context = false);
+ using ObjectSet::add;
/**
* Add an XML node's SPObject to the set of selected objects.
*
* @param the xml node of the item to add
*/
- void add(XML::Node *repr) { add(_objectForXMLNode(repr)); }
+ void add(XML::Node *repr) {
+ add(_objectForXMLNode(repr));
+ }
/**
* Set the selection to a single specific object.
@@ -122,23 +110,11 @@ public:
*
* @param repr the xml node of the item to select
*/
- void set(XML::Node *repr) { set(_objectForXMLNode(repr)); }
-
- /**
- * Removes an item from the set of selected objects.
- *
- * It is ok to call this method for an unselected item.
- *
- * @param item the item to unselect
- */
- void remove(SPObject *obj);
+ void set(XML::Node *repr) {
+ set(_objectForXMLNode(repr));
+ }
- /**
- * Removes an item if selected, adds otherwise.
- *
- * @param item the item to unselect
- */
- void toggle(SPObject *obj);
+ using ObjectSet::remove;
/**
* Removes an item from the set of selected objects.
@@ -147,21 +123,9 @@ public:
*
* @param repr the xml node of the item to remove
*/
- void remove(XML::Node *repr) { remove(_objectForXMLNode(repr)); }
-
- /**
- * Selects exactly the specified objects.
- *
- * @param objs the objects to select
- */
- void setList(std::vector<SPItem*> const &objs);
-
- /**
- * Adds the specified objects to selection, without deselecting first.
- *
- * @param objs the objects to select
- */
- void addList(std::vector<SPItem*> const &objs);
+ void remove(XML::Node *repr) {
+ remove(_objectForXMLNode(repr));
+ }
/**
* Clears the selection and selects the specified objects.
@@ -170,117 +134,21 @@ public:
*/
void setReprList(std::vector<XML::Node*> const &reprs);
- /** Add items from an STL iterator range to the selection.
- * \param from the begin iterator
- * \param to the end iterator
- */
- template <typename InputIterator>
- void add(InputIterator from, InputIterator to) {
- _invalidateCachedLists();
- while ( from != to ) {
- _add(*from);
- ++from;
- }
- _emitChanged();
- }
-
- /**
- * Unselects all selected objects..
- */
- void clear();
-
- /**
- * Returns true if no items are selected.
- */
- bool isEmpty() const { return _objs.empty(); }
-
- /**
- * Returns true if the given object is selected.
- */
- bool includes(SPObject *obj) const;
+ using ObjectSet::includes;
/**
* Returns true if the given item is selected.
*/
- bool includes(XML::Node *repr) const {
+ bool includes(XML::Node *repr) {
return includes(_objectForXMLNode(repr));
}
- /**
- * Returns a single selected object.
- *
- * @return NULL unless exactly one object is selected
- */
- SPObject *single();
-
- /**
- * Returns a single selected item.
- *
- * @return NULL unless exactly one object is selected
- */
- SPItem *singleItem();
-
- /**
- * Returns the smallest item from this selection.
- */
- SPItem *smallestItem(CompareSize compare);
-
- /**
- * Returns the largest item from this selection.
- */
- SPItem *largestItem(CompareSize compare);
-
- /**
- * Returns a single selected object's xml node.
- *
- * @return NULL unless exactly one object is selected
- */
- XML::Node *singleRepr();
-
- /** Returns the list of selected objects. */
- std::vector<SPObject*> const &list();
- /** Returns the list of selected SPItems. */
- std::vector<SPItem*> const &itemList();
- /** Returns a list of the xml nodes of all selected objects. */
- /// \todo only returns reprs of SPItems currently; need a separate
- /// method for that
- std::vector<XML::Node*> const &reprList();
-
- /** Returns a list of all perspectives which have a 3D box in the current selection.
- (these may also be nested in groups) */
- std::list<Persp3D *> const perspList();
-
- /**
- * Returns a list of all 3D boxes in the current selection which are associated to @c
- * persp. If @c pers is @c NULL, return all selected boxes.
- */
- std::list<SPBox3D *> const box3DList(Persp3D *persp = NULL);
-
/** Returns the number of layers in which there are selected objects. */
size_t numberOfLayers();
/** Returns the number of parents to which the selected objects belong. */
size_t numberOfParents();
- /** Returns the bounding rectangle of the selection. */
- Geom::OptRect bounds(SPItem::BBoxType type) const;
- Geom::OptRect visualBounds() const;
- Geom::OptRect geometricBounds() const;
-
- /**
- * Returns either the visual or geometric bounding rectangle of the selection, based on the
- * preferences specified for the selector tool
- */
- Geom::OptRect preferredBounds() const;
-
- /// Returns the bounding rectangle of the selectionin document coordinates.
- Geom::OptRect documentBounds(SPItem::BBoxType type) const;
-
- /**
- * Returns the rotation/skew center of the selection.
- */
- boost::optional<Geom::Point> center() const;
-
/**
* Compute the list of points in the selection that are to be considered for snapping from.
*
@@ -327,6 +195,11 @@ public:
return _modified_signal.slots().insert(_modified_signal.slots().begin(), slot);
}
+protected:
+ void _emitSignals();
+ void _connectSignals(SPObject* object);
+ void _releaseSignals(SPObject* object);
+
private:
/** no copy. */
Selection(Selection const &);
@@ -342,46 +215,17 @@ private:
void _emitModified(unsigned int flags);
/** Issues changed selection signal. */
void _emitChanged(bool persist_selection_context = false);
-
- void _invalidateCachedLists();
-
- /** unselect all descendants of the given item. */
- void _removeObjectDescendants(SPObject *obj);
- /** unselect all ancestors of the given item. */
- void _removeObjectAncestors(SPObject *obj);
- /** clears the selection (without issuing a notification). */
- void _clear();
- /** adds an object (without issuing a notification). */
- void _add(SPObject *obj);
- /** removes an object (without issuing a notification). */
- void _remove(SPObject *obj);
/** returns the SPObject corresponding to an xml node (if any). */
SPObject *_objectForXMLNode(XML::Node *repr) const;
/** Releases an active layer object that is being removed. */
void _releaseContext(SPObject *obj);
- mutable std::list<SPObject*> _objs; //to more efficiently remove arbitrary elements
- mutable std::vector<SPObject*> _objs_vector; // to be returned by list();
- mutable std::set<SPObject*> _objs_set; //to efficiently test if object is selected
- mutable std::vector<XML::Node*> _reprs;
- mutable std::vector<SPItem*> _items;
-
- void add_box_perspective(SPBox3D *box);
- void add_3D_boxes_recursively(SPObject *obj);
- void remove_box_perspective(SPBox3D *box);
- void remove_3D_boxes_recursively(SPObject *obj);
- SPItem *_sizeistItem(bool sml, CompareSize compare);
-
- std::list<SPBox3D *> _3dboxes;
-
LayerModel *_layers;
- GC::soft_ptr<SPDesktop> _desktop;
SPObject* _selection_context;
unsigned int _flags;
unsigned int _idle;
std::map<SPObject *, sigc::connection> _modified_connections;
- std::map<SPObject *, sigc::connection> _release_connections;
sigc::connection _context_release_connection;
sigc::signal<void, Selection *> _changed_signal;
diff --git a/src/seltrans.cpp b/src/seltrans.cpp
index c1fb652be..7b17a294a 100644
--- a/src/seltrans.cpp
+++ b/src/seltrans.cpp
@@ -234,8 +234,8 @@ void Inkscape::SelTrans::setCenter(Geom::Point const &p)
_center_is_set = true;
// Write the new center position into all selected items
- std::vector<SPItem*> items=_desktop->selection->itemList();
- for ( std::vector<SPItem*>::const_iterator iter=items.begin();iter!=items.end(); ++iter) {
+ auto items= _desktop->selection->items();
+ for (auto iter=items.begin();iter!=items.end(); ++iter) {
SPItem *it = SP_ITEM(*iter);
it->setCenter(p);
// only set the value; updating repr and document_done will be done once, on ungrab
@@ -264,8 +264,8 @@ void Inkscape::SelTrans::grab(Geom::Point const &p, gdouble x, gdouble y, bool s
return;
}
- std::vector<SPItem*> items=_desktop->selection->itemList();
- for ( std::vector<SPItem*>::const_iterator iter=items.begin();iter!=items.end(); ++iter) {
+ auto items= _desktop->selection->items();
+ for (auto iter=items.begin();iter!=items.end(); ++iter) {
SPItem *it = static_cast<SPItem*>(sp_object_ref(*iter, NULL));
_items.push_back(it);
_items_const.push_back(it);
@@ -439,7 +439,7 @@ void Inkscape::SelTrans::ungrab()
if (!_current_relative_affine.isIdentity()) { // we can have a identity affine
// when trying to stretch a perfectly vertical line in horizontal direction, which will not be allowed by the handles;
- sp_selection_apply_affine(selection, _current_relative_affine, (_show == SHOW_OUTLINE)? true : false);
+ sp_object_set_apply_affine(selection, _current_relative_affine, (_show == SHOW_OUTLINE) ? true : false);
if (_center) {
*_center *= _current_relative_affine;
_center_is_set = true;
@@ -486,8 +486,8 @@ void Inkscape::SelTrans::ungrab()
if (_center_is_set) {
// we were dragging center; update reprs and commit undoable action
- std::vector<SPItem*> items=_desktop->selection->itemList();
- for ( std::vector<SPItem*>::const_iterator iter=items.begin();iter!=items.end(); ++iter) {
+ auto items= _desktop->selection->items();
+ for (auto iter=items.begin();iter!=items.end(); ++iter) {
SPItem *it = *iter;
it->updateRepr();
}
@@ -523,8 +523,8 @@ void Inkscape::SelTrans::stamp()
l = _stamp_cache;
} else {
/* Build cache */
- l = selection->itemList();
- sort(l.begin(),l.end(),sp_object_compare_position_bool);
+ l.insert(l.end(), selection->items().begin(), selection->items().end());
+ sort(l.begin(), l.end(), sp_object_compare_position_bool);
_stamp_cache = l;
}
@@ -615,7 +615,8 @@ void Inkscape::SelTrans::_updateVolatileState()
return;
}
- _strokewidth = stroke_average_width (selection->itemList());
+ std::vector<SPItem *> vec(selection->items().begin(), selection->items().end());
+ _strokewidth = stroke_average_width(vec);
}
void Inkscape::SelTrans::_showHandles(SPSelTransType type)
@@ -705,8 +706,8 @@ void Inkscape::SelTrans::handleClick(SPKnot */*knot*/, guint state, SPSelTransHa
case HANDLE_CENTER:
if (state & GDK_SHIFT_MASK) {
// Unset the center position for all selected items
- std::vector<SPItem*> items=_desktop->selection->itemList();
- for ( std::vector<SPItem*>::const_iterator iter=items.begin();iter!=items.end(); ++iter) {
+ auto items = _desktop->selection->items();
+ for (auto iter=items.begin();iter!=items.end(); ++iter) {
SPItem *it = *iter;
it->unsetCenter();
it->updateRepr();
@@ -1281,7 +1282,7 @@ gboolean Inkscape::SelTrans::centerRequest(Geom::Point &pt, guint state)
// items will share a single center. While dragging that single center, it should never snap to the
// centers of any of the selected objects. Therefore we will have to pass the list of selected items
// to the snapper, to avoid self-snapping of the rotation center
- std::vector<SPItem*> items = const_cast<Selection *>(_selection)->itemList();
+ std::vector<SPItem *> items(_selection->items().begin(), _selection->items().end());
SnapManager &m = _desktop->namedview->snap_manager;
m.setup(_desktop);
m.setRotationCenterSource(items);
diff --git a/src/snap.cpp b/src/snap.cpp
index 50f40a9a1..c84da0491 100644
--- a/src/snap.cpp
+++ b/src/snap.cpp
@@ -702,8 +702,8 @@ void SnapManager::setupIgnoreSelection(SPDesktop const *desktop,
_items_to_ignore.clear();
Inkscape::Selection *sel = _desktop->selection;
- std::vector<SPItem*> const items = sel->itemList();
- for (std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end();++i) {
+ auto items = sel->items();
+ for (auto i=items.begin();i!=items.end();++i) {
_items_to_ignore.push_back(*i);
}
}
diff --git a/src/sp-clippath.cpp b/src/sp-clippath.cpp
index 915c57e45..b371e15b2 100644
--- a/src/sp-clippath.cpp
+++ b/src/sp-clippath.cpp
@@ -127,9 +127,9 @@ void SPClipPath::update(SPCtx* ctx, unsigned int flags) {
flags &= SP_OBJECT_MODIFIED_CASCADE;
GSList *l = NULL;
- for ( SPObject *child = this->firstChild(); child; child = child->getNext()) {
- sp_object_ref(child);
- l = g_slist_prepend(l, child);
+ for (auto& child: children) {
+ sp_object_ref(&child);
+ l = g_slist_prepend(l, &child);
}
l = g_slist_reverse(l);
@@ -166,9 +166,9 @@ void SPClipPath::modified(unsigned int flags) {
flags &= SP_OBJECT_MODIFIED_CASCADE;
GSList *l = NULL;
- for (SPObject *child = this->firstChild(); child; child = child->getNext()) {
- sp_object_ref(child);
- l = g_slist_prepend(l, child);
+ for (auto& child: children) {
+ sp_object_ref(&child);
+ l = g_slist_prepend(l, &child);
}
l = g_slist_reverse(l);
@@ -199,9 +199,9 @@ Inkscape::DrawingItem *SPClipPath::show(Inkscape::Drawing &drawing, unsigned int
Inkscape::DrawingGroup *ai = new Inkscape::DrawingGroup(drawing);
display = sp_clippath_view_new_prepend(display, key, ai);
- for ( SPObject *child = firstChild() ; child ; child = child->getNext() ) {
- if (SP_IS_ITEM(child)) {
- Inkscape::DrawingItem *ac = SP_ITEM(child)->invoke_show(drawing, key, SP_ITEM_REFERENCE_FLAGS);
+ for (auto& child: children) {
+ if (SP_IS_ITEM(&child)) {
+ Inkscape::DrawingItem *ac = SP_ITEM(&child)->invoke_show(drawing, key, SP_ITEM_REFERENCE_FLAGS);
if (ac) {
/* The order is not important in clippath */
@@ -222,9 +222,9 @@ Inkscape::DrawingItem *SPClipPath::show(Inkscape::Drawing &drawing, unsigned int
}
void SPClipPath::hide(unsigned int key) {
- for ( SPObject *child = firstChild() ; child; child = child->getNext() ) {
- if (SP_IS_ITEM(child)) {
- SP_ITEM(child)->invoke_hide(key);
+ for (auto& child: children) {
+ if (SP_IS_ITEM(&child)) {
+ SP_ITEM(&child)->invoke_hide(key);
}
}
@@ -251,9 +251,9 @@ void SPClipPath::setBBox(unsigned int key, Geom::OptRect const &bbox) {
Geom::OptRect SPClipPath::geometricBounds(Geom::Affine const &transform) {
Geom::OptRect bbox;
- for (SPObject *i = firstChild(); i; i = i->getNext()) {
- if (SP_IS_ITEM(i)) {
- Geom::OptRect tmp = SP_ITEM(i)->geometricBounds(Geom::Affine(SP_ITEM(i)->transform) * transform);
+ for (auto& i: children) {
+ if (SP_IS_ITEM(&i)) {
+ Geom::OptRect tmp = SP_ITEM(&i)->geometricBounds(Geom::Affine(SP_ITEM(&i)->transform) * transform);
bbox.unionWith(tmp);
}
}
diff --git a/src/sp-defs.cpp b/src/sp-defs.cpp
index dd779c0da..865c6891e 100644
--- a/src/sp-defs.cpp
+++ b/src/sp-defs.cpp
@@ -54,9 +54,9 @@ void SPDefs::modified(unsigned int flags) {
flags &= SP_OBJECT_MODIFIED_CASCADE;
GSList *l = NULL;
- for ( SPObject *child = this->firstChild() ; child; child = child->getNext() ) {
- sp_object_ref(child);
- l = g_slist_prepend(l, child);
+ for (auto& child: children) {
+ sp_object_ref(&child);
+ l = g_slist_prepend(l, &child);
}
l = g_slist_reverse(l);
@@ -79,8 +79,8 @@ Inkscape::XML::Node* SPDefs::write(Inkscape::XML::Document *xml_doc, Inkscape::X
}
GSList *l = NULL;
- for ( SPObject *child = this->firstChild() ; child; child = child->getNext() ) {
- Inkscape::XML::Node *crepr = child->updateRepr(xml_doc, NULL, flags);
+ for (auto& child: children) {
+ Inkscape::XML::Node *crepr = child.updateRepr(xml_doc, NULL, flags);
if (crepr) {
l = g_slist_prepend(l, crepr);
}
@@ -93,8 +93,8 @@ Inkscape::XML::Node* SPDefs::write(Inkscape::XML::Document *xml_doc, Inkscape::X
}
} else {
- for ( SPObject *child = this->firstChild() ; child; child = child->getNext() ) {
- child->updateRepr(flags);
+ for (auto& child: children) {
+ child.updateRepr(flags);
}
}
diff --git a/src/sp-filter-primitive.cpp b/src/sp-filter-primitive.cpp
index 2e6e06caf..0fbeed15b 100644
--- a/src/sp-filter-primitive.cpp
+++ b/src/sp-filter-primitive.cpp
@@ -242,8 +242,10 @@ int sp_filter_primitive_read_result(SPFilterPrimitive *prim, gchar const *name)
*/
int sp_filter_primitive_name_previous_out(SPFilterPrimitive *prim) {
SPFilter *parent = SP_FILTER(prim->parent);
- SPObject *i = parent->children;
- while (i && i->next != prim) i = i->next;
+ SPObject *i = parent->firstChild();
+ while (i && i->getNext() != prim) {
+ i = i->getNext();
+ }
if (i) {
SPFilterPrimitive *i_prim = SP_FILTER_PRIMITIVE(i);
if (i_prim->image_out < 0) {
diff --git a/src/sp-filter.cpp b/src/sp-filter.cpp
index 64a972ff4..26ea03c6c 100644
--- a/src/sp-filter.cpp
+++ b/src/sp-filter.cpp
@@ -264,8 +264,8 @@ Inkscape::XML::Node* SPFilter::write(Inkscape::XML::Document *doc, Inkscape::XML
}
GSList *l = NULL;
- for ( SPObject *child = this->firstChild(); child; child = child->getNext() ) {
- Inkscape::XML::Node *crepr = child->updateRepr(doc, NULL, flags);
+ for (auto& child: children) {
+ Inkscape::XML::Node *crepr = child.updateRepr(doc, NULL, flags);
if (crepr) {
l = g_slist_prepend (l, crepr);
@@ -278,8 +278,8 @@ Inkscape::XML::Node* SPFilter::write(Inkscape::XML::Document *doc, Inkscape::XML
l = g_slist_remove (l, l->data);
}
} else {
- for ( SPObject *child = this->firstChild() ; child; child = child->getNext() ) {
- child->updateRepr(flags);
+ for (auto& child: children) {
+ child.updateRepr(flags);
}
}
@@ -416,10 +416,9 @@ void sp_filter_build_renderer(SPFilter *sp_filter, Inkscape::Filters::Filter *nr
}
nr_filter->clear_primitives();
- SPObject *primitive_obj = sp_filter->children;
- while (primitive_obj) {
- if (SP_IS_FILTER_PRIMITIVE(primitive_obj)) {
- SPFilterPrimitive *primitive = SP_FILTER_PRIMITIVE(primitive_obj);
+ for(auto& primitive_obj: sp_filter->children) {
+ if (SP_IS_FILTER_PRIMITIVE(&primitive_obj)) {
+ SPFilterPrimitive *primitive = SP_FILTER_PRIMITIVE(&primitive_obj);
g_assert(primitive != NULL);
// if (((SPFilterPrimitiveClass*) G_OBJECT_GET_CLASS(primitive))->build_renderer) {
@@ -429,7 +428,6 @@ void sp_filter_build_renderer(SPFilter *sp_filter, Inkscape::Filters::Filter *nr
// } // CPPIFY: => FilterPrimitive should be abstract.
primitive->build_renderer(nr_filter);
}
- primitive_obj = primitive_obj->next;
}
}
@@ -437,11 +435,12 @@ int sp_filter_primitive_count(SPFilter *filter) {
g_assert(filter != NULL);
int count = 0;
- SPObject *primitive_obj = filter->children;
- while (primitive_obj) {
- if (SP_IS_FILTER_PRIMITIVE(primitive_obj)) count++;
- primitive_obj = primitive_obj->next;
+ for(auto& primitive_obj: filter->children) {
+ if (SP_IS_FILTER_PRIMITIVE(&primitive_obj)) {
+ count++;
+ }
}
+
return count;
}
@@ -509,10 +508,9 @@ Glib::ustring sp_filter_get_new_result_name(SPFilter *filter) {
g_assert(filter != NULL);
int largest = 0;
- SPObject *primitive_obj = filter->children;
- while (primitive_obj) {
- if (SP_IS_FILTER_PRIMITIVE(primitive_obj)) {
- Inkscape::XML::Node *repr = primitive_obj->getRepr();
+ for(auto& primitive_obj: filter->children) {
+ if (SP_IS_FILTER_PRIMITIVE(&primitive_obj)) {
+ Inkscape::XML::Node *repr = primitive_obj.getRepr();
char const *result = repr->attribute("result");
int index;
if (result)
@@ -526,7 +524,6 @@ Glib::ustring sp_filter_get_new_result_name(SPFilter *filter) {
}
}
}
- primitive_obj = primitive_obj->next;
}
return "result" + Glib::Ascii::dtostr(largest + 1);
diff --git a/src/sp-flowdiv.cpp b/src/sp-flowdiv.cpp
index 8d9c51ab8..17b841e37 100644
--- a/src/sp-flowdiv.cpp
+++ b/src/sp-flowdiv.cpp
@@ -27,9 +27,9 @@ void SPFlowdiv::update(SPCtx *ctx, unsigned int flags) {
childflags &= SP_OBJECT_MODIFIED_CASCADE;
GSList* l = NULL;
- for (SPObject *child = this->firstChild() ; child ; child = child->getNext() ) {
- sp_object_ref(child);
- l = g_slist_prepend(l, child);
+ for (auto& child: children) {
+ sp_object_ref(&child);
+ l = g_slist_prepend(l, &child);
}
l = g_slist_reverse(l);
@@ -65,9 +65,9 @@ void SPFlowdiv::modified(unsigned int flags) {
flags &= SP_OBJECT_MODIFIED_CASCADE;
GSList *l = NULL;
- for ( SPObject *child = this->firstChild() ; child ; child = child->getNext() ) {
- sp_object_ref(child);
- l = g_slist_prepend(l, child);
+ for (auto& child: children) {
+ sp_object_ref(&child);
+ l = g_slist_prepend(l, &child);
}
l = g_slist_reverse (l);
@@ -104,15 +104,15 @@ Inkscape::XML::Node* SPFlowdiv::write(Inkscape::XML::Document *xml_doc, Inkscape
GSList *l = NULL;
- for (SPObject* child = this->firstChild() ; child ; child = child->getNext() ) {
+ for (auto& child: children) {
Inkscape::XML::Node* c_repr = NULL;
- if ( SP_IS_FLOWTSPAN (child) ) {
- c_repr = child->updateRepr(xml_doc, NULL, flags);
- } else if ( SP_IS_FLOWPARA(child) ) {
- c_repr = child->updateRepr(xml_doc, NULL, flags);
- } else if ( SP_IS_STRING(child) ) {
- c_repr = xml_doc->createTextNode(SP_STRING(child)->string.c_str());
+ if ( SP_IS_FLOWTSPAN (&child) ) {
+ c_repr = child.updateRepr(xml_doc, NULL, flags);
+ } else if ( SP_IS_FLOWPARA(&child) ) {
+ c_repr = child.updateRepr(xml_doc, NULL, flags);
+ } else if ( SP_IS_STRING(&child) ) {
+ c_repr = xml_doc->createTextNode(SP_STRING(&child)->string.c_str());
}
if ( c_repr ) {
@@ -126,13 +126,13 @@ Inkscape::XML::Node* SPFlowdiv::write(Inkscape::XML::Document *xml_doc, Inkscape
l = g_slist_remove(l, l->data);
}
} else {
- for ( SPObject* child = this->firstChild() ; child ; child = child->getNext() ) {
- if ( SP_IS_FLOWTSPAN (child) ) {
- child->updateRepr(flags);
- } else if ( SP_IS_FLOWPARA(child) ) {
- child->updateRepr(flags);
- } else if ( SP_IS_STRING(child) ) {
- child->getRepr()->setContent(SP_STRING(child)->string.c_str());
+ for (auto& child: children) {
+ if ( SP_IS_FLOWTSPAN (&child) ) {
+ child.updateRepr(flags);
+ } else if ( SP_IS_FLOWPARA(&child) ) {
+ child.updateRepr(flags);
+ } else if ( SP_IS_STRING(&child) ) {
+ child.getRepr()->setContent(SP_STRING(&child)->string.c_str());
}
}
}
@@ -168,9 +168,9 @@ void SPFlowtspan::update(SPCtx *ctx, unsigned int flags) {
childflags &= SP_OBJECT_MODIFIED_CASCADE;
GSList* l = NULL;
- for ( SPObject *child = this->firstChild() ; child ; child = child->getNext() ) {
- sp_object_ref(child);
- l = g_slist_prepend(l, child);
+ for (auto& child: children) {
+ sp_object_ref(&child);
+ l = g_slist_prepend(l, &child);
}
l = g_slist_reverse (l);
@@ -206,9 +206,9 @@ void SPFlowtspan::modified(unsigned int flags) {
flags &= SP_OBJECT_MODIFIED_CASCADE;
GSList *l = NULL;
- for ( SPObject *child = this->firstChild() ; child ; child = child->getNext() ) {
- sp_object_ref(child);
- l = g_slist_prepend(l, child);
+ for (auto& child: children) {
+ sp_object_ref(&child);
+ l = g_slist_prepend(l, &child);
}
l = g_slist_reverse (l);
@@ -242,15 +242,15 @@ Inkscape::XML::Node *SPFlowtspan::write(Inkscape::XML::Document *xml_doc, Inksca
GSList *l = NULL;
- for ( SPObject* child = this->firstChild() ; child ; child = child->getNext() ) {
+ for (auto& child: children) {
Inkscape::XML::Node* c_repr = NULL;
- if ( SP_IS_FLOWTSPAN(child) ) {
- c_repr = child->updateRepr(xml_doc, NULL, flags);
- } else if ( SP_IS_FLOWPARA(child) ) {
- c_repr = child->updateRepr(xml_doc, NULL, flags);
- } else if ( SP_IS_STRING(child) ) {
- c_repr = xml_doc->createTextNode(SP_STRING(child)->string.c_str());
+ if ( SP_IS_FLOWTSPAN(&child) ) {
+ c_repr = child.updateRepr(xml_doc, NULL, flags);
+ } else if ( SP_IS_FLOWPARA(&child) ) {
+ c_repr = child.updateRepr(xml_doc, NULL, flags);
+ } else if ( SP_IS_STRING(&child) ) {
+ c_repr = xml_doc->createTextNode(SP_STRING(&child)->string.c_str());
}
if ( c_repr ) {
@@ -264,13 +264,13 @@ Inkscape::XML::Node *SPFlowtspan::write(Inkscape::XML::Document *xml_doc, Inksca
l = g_slist_remove(l, l->data);
}
} else {
- for ( SPObject* child = this->firstChild() ; child ; child = child->getNext() ) {
- if ( SP_IS_FLOWTSPAN(child) ) {
- child->updateRepr(flags);
- } else if ( SP_IS_FLOWPARA(child) ) {
- child->updateRepr(flags);
- } else if ( SP_IS_STRING(child) ) {
- child->getRepr()->setContent(SP_STRING(child)->string.c_str());
+ for (auto& child: children) {
+ if ( SP_IS_FLOWTSPAN(&child) ) {
+ child.updateRepr(flags);
+ } else if ( SP_IS_FLOWPARA(&child) ) {
+ child.updateRepr(flags);
+ } else if ( SP_IS_STRING(&child) ) {
+ child.getRepr()->setContent(SP_STRING(&child)->string.c_str());
}
}
}
@@ -307,9 +307,9 @@ void SPFlowpara::update(SPCtx *ctx, unsigned int flags) {
flags &= SP_OBJECT_MODIFIED_CASCADE;
GSList* l = NULL;
- for ( SPObject *child = this->firstChild() ; child ; child = child->getNext() ) {
- sp_object_ref(child);
- l = g_slist_prepend(l, child);
+ for (auto& child: children) {
+ sp_object_ref(&child);
+ l = g_slist_prepend(l, &child);
}
l = g_slist_reverse (l);
@@ -343,9 +343,9 @@ void SPFlowpara::modified(unsigned int flags) {
flags &= SP_OBJECT_MODIFIED_CASCADE;
GSList *l = NULL;
- for ( SPObject *child = this->firstChild() ; child ; child = child->getNext() ) {
- sp_object_ref(child);
- l = g_slist_prepend(l, child);
+ for (auto& child: children) {
+ sp_object_ref(&child);
+ l = g_slist_prepend(l, &child);
}
l = g_slist_reverse (l);
@@ -379,15 +379,15 @@ Inkscape::XML::Node *SPFlowpara::write(Inkscape::XML::Document *xml_doc, Inkscap
GSList *l = NULL;
- for ( SPObject* child = this->firstChild() ; child ; child = child->getNext() ) {
+ for (auto& child: children) {
Inkscape::XML::Node* c_repr = NULL;
- if ( SP_IS_FLOWTSPAN(child) ) {
- c_repr = child->updateRepr(xml_doc, NULL, flags);
- } else if ( SP_IS_FLOWPARA(child) ) {
- c_repr = child->updateRepr(xml_doc, NULL, flags);
- } else if ( SP_IS_STRING(child) ) {
- c_repr = xml_doc->createTextNode(SP_STRING(child)->string.c_str());
+ if ( SP_IS_FLOWTSPAN(&child) ) {
+ c_repr = child.updateRepr(xml_doc, NULL, flags);
+ } else if ( SP_IS_FLOWPARA(&child) ) {
+ c_repr = child.updateRepr(xml_doc, NULL, flags);
+ } else if ( SP_IS_STRING(&child) ) {
+ c_repr = xml_doc->createTextNode(SP_STRING(&child)->string.c_str());
}
if ( c_repr ) {
@@ -401,13 +401,13 @@ Inkscape::XML::Node *SPFlowpara::write(Inkscape::XML::Document *xml_doc, Inkscap
l = g_slist_remove(l, l->data);
}
} else {
- for ( SPObject* child = this->firstChild() ; child ; child = child->getNext() ) {
- if ( SP_IS_FLOWTSPAN(child) ) {
- child->updateRepr(flags);
- } else if ( SP_IS_FLOWPARA(child) ) {
- child->updateRepr(flags);
- } else if ( SP_IS_STRING(child) ) {
- child->getRepr()->setContent(SP_STRING(child)->string.c_str());
+ for (auto& child: children) {
+ if ( SP_IS_FLOWTSPAN(&child) ) {
+ child.updateRepr(flags);
+ } else if ( SP_IS_FLOWPARA(&child) ) {
+ child.updateRepr(flags);
+ } else if ( SP_IS_STRING(&child) ) {
+ child.getRepr()->setContent(SP_STRING(&child)->string.c_str());
}
}
}
diff --git a/src/sp-flowregion.cpp b/src/sp-flowregion.cpp
index 3dc02c3ca..4064c12f1 100644
--- a/src/sp-flowregion.cpp
+++ b/src/sp-flowregion.cpp
@@ -61,9 +61,9 @@ void SPFlowregion::update(SPCtx *ctx, unsigned int flags) {
GSList *l = NULL;
- for ( SPObject *child = this->firstChild() ; child ; child = child->getNext() ) {
- sp_object_ref(child);
- l = g_slist_prepend(l, child);
+ for (auto& child: children) {
+ sp_object_ref(&child);
+ l = g_slist_prepend(l, &child);
}
l = g_slist_reverse(l);
@@ -100,9 +100,9 @@ void SPFlowregion::UpdateComputed(void)
}
computed.clear();
- for (SPObject* child = firstChild() ; child ; child = child->getNext() ) {
+ for (auto& child: children) {
Shape *shape = 0;
- GetDest(child, &shape);
+ GetDest(&child, &shape);
computed.push_back(shape);
}
}
@@ -116,9 +116,9 @@ void SPFlowregion::modified(guint flags) {
GSList *l = NULL;
- for ( SPObject *child = this->firstChild() ; child ; child = child->getNext() ) {
- sp_object_ref(child);
- l = g_slist_prepend(l, child);
+ for (auto& child: children) {
+ sp_object_ref(&child);
+ l = g_slist_prepend(l, &child);
}
l = g_slist_reverse(l);
@@ -143,9 +143,9 @@ Inkscape::XML::Node *SPFlowregion::write(Inkscape::XML::Document *xml_doc, Inksc
}
GSList *l = NULL;
- for ( SPObject *child = this->firstChild() ; child; child = child->getNext() ) {
- if ( !dynamic_cast<SPTitle *>(child) && !dynamic_cast<SPDesc *>(child) ) {
- Inkscape::XML::Node *crepr = child->updateRepr(xml_doc, NULL, flags);
+ for (auto& child: children) {
+ if ( !dynamic_cast<SPTitle *>(&child) && !dynamic_cast<SPDesc *>(&child) ) {
+ Inkscape::XML::Node *crepr = child.updateRepr(xml_doc, NULL, flags);
if (crepr) {
l = g_slist_prepend(l, crepr);
@@ -159,10 +159,9 @@ Inkscape::XML::Node *SPFlowregion::write(Inkscape::XML::Document *xml_doc, Inksc
l = g_slist_remove(l, l->data);
}
- } else {
- for ( SPObject *child = this->firstChild() ; child; child = child->getNext() ) {
- if ( !dynamic_cast<SPTitle *>(child) && !dynamic_cast<SPDesc *>(child) ) {
- child->updateRepr(flags);
+ for (auto& child: children) {
+ if ( !dynamic_cast<SPTitle *>(&child) && !dynamic_cast<SPDesc *>(&child) ) {
+ child.updateRepr(flags);
}
}
}
@@ -219,9 +218,9 @@ void SPFlowregionExclude::update(SPCtx *ctx, unsigned int flags) {
GSList *l = NULL;
- for ( SPObject *child = this->firstChild() ; child ; child = child->getNext() ) {
- sp_object_ref(child);
- l = g_slist_prepend(l, child);
+ for (auto& child: children) {
+ sp_object_ref(&child);
+ l = g_slist_prepend(l, &child);
}
l = g_slist_reverse (l);
@@ -257,8 +256,8 @@ void SPFlowregionExclude::UpdateComputed(void)
computed = NULL;
}
- for ( SPObject* child = firstChild() ; child ; child = child->getNext() ) {
- GetDest(child, &computed);
+ for (auto& child: children) {
+ GetDest(&child, &computed);
}
}
@@ -271,9 +270,9 @@ void SPFlowregionExclude::modified(guint flags) {
GSList *l = NULL;
- for ( SPObject *child = this->firstChild() ; child ; child = child->getNext() ) {
- sp_object_ref(child);
- l = g_slist_prepend(l, child);
+ for (auto& child: children) {
+ sp_object_ref(&child);
+ l = g_slist_prepend(l, &child);
}
l = g_slist_reverse (l);
@@ -299,8 +298,8 @@ Inkscape::XML::Node *SPFlowregionExclude::write(Inkscape::XML::Document *xml_doc
GSList *l = NULL;
- for ( SPObject *child = this->firstChild() ; child; child = child->getNext() ) {
- Inkscape::XML::Node *crepr = child->updateRepr(xml_doc, NULL, flags);
+ for (auto& child: children) {
+ Inkscape::XML::Node *crepr = child.updateRepr(xml_doc, NULL, flags);
if (crepr) {
l = g_slist_prepend(l, crepr);
@@ -314,8 +313,8 @@ Inkscape::XML::Node *SPFlowregionExclude::write(Inkscape::XML::Document *xml_doc
}
} else {
- for ( SPObject *child = this->firstChild() ; child; child = child->getNext() ) {
- child->updateRepr(flags);
+ for (auto& child: children) {
+ child.updateRepr(flags);
}
}
diff --git a/src/sp-flowtext.cpp b/src/sp-flowtext.cpp
index 89850c1f8..d79652bf4 100644
--- a/src/sp-flowtext.cpp
+++ b/src/sp-flowtext.cpp
@@ -67,9 +67,9 @@ void SPFlowtext::update(SPCtx* ctx, unsigned int flags) {
GSList *l = NULL;
- for (SPObject *child = this->firstChild() ; child ; child = child->getNext() ) {
- sp_object_ref(child);
- l = g_slist_prepend(l, child);
+ for (auto& child: children) {
+ sp_object_ref(&child);
+ l = g_slist_prepend(l, &child);
}
l = g_slist_reverse(l);
@@ -130,9 +130,9 @@ void SPFlowtext::modified(unsigned int flags) {
}
}
- for ( SPObject *o = this->firstChild() ; o ; o = o->getNext() ) {
- if (dynamic_cast<SPFlowregion *>(o)) {
- region = o;
+ for (auto& o: children) {
+ if (dynamic_cast<SPFlowregion *>(&o)) {
+ region = &o;
break;
}
}
@@ -218,11 +218,11 @@ Inkscape::XML::Node* SPFlowtext::write(Inkscape::XML::Document* doc, Inkscape::X
GSList *l = NULL;
- for (SPObject *child = this->firstChild() ; child ; child = child->getNext() ) {
+ for (auto& child: children) {
Inkscape::XML::Node *c_repr = NULL;
- if ( dynamic_cast<SPFlowdiv *>(child) || dynamic_cast<SPFlowpara *>(child) || dynamic_cast<SPFlowregion *>(child) || dynamic_cast<SPFlowregionExclude *>(child)) {
- c_repr = child->updateRepr(doc, NULL, flags);
+ if ( dynamic_cast<SPFlowdiv *>(&child) || dynamic_cast<SPFlowpara *>(&child) || dynamic_cast<SPFlowregion *>(&child) || dynamic_cast<SPFlowregionExclude *>(&child)) {
+ c_repr = child.updateRepr(doc, NULL, flags);
}
if ( c_repr ) {
@@ -236,9 +236,9 @@ Inkscape::XML::Node* SPFlowtext::write(Inkscape::XML::Document* doc, Inkscape::X
l = g_slist_remove(l, l->data);
}
} else {
- for (SPObject *child = this->firstChild() ; child ; child = child->getNext() ) {
- if ( dynamic_cast<SPFlowdiv *>(child) || dynamic_cast<SPFlowpara *>(child) || dynamic_cast<SPFlowregion *>(child) || dynamic_cast<SPFlowregionExclude *>(child)) {
- child->updateRepr(flags);
+ for (auto& child: children) {
+ if ( dynamic_cast<SPFlowdiv *>(&child) || dynamic_cast<SPFlowpara *>(&child) || dynamic_cast<SPFlowregion *>(&child) || dynamic_cast<SPFlowregionExclude *>(&child)) {
+ child.updateRepr(flags);
}
}
}
@@ -385,8 +385,8 @@ void SPFlowtext::_buildLayoutInput(SPObject *root, Shape const *exclusion_shape,
*pending_line_break_object = NULL;
}
- for (SPObject *child = root->firstChild() ; child ; child = child->getNext() ) {
- SPString *str = dynamic_cast<SPString *>(child);
+ for (auto& child: root->children) {
+ SPString *str = dynamic_cast<SPString *>(&child);
if (str) {
if (*pending_line_break_object) {
if (dynamic_cast<SPFlowregionbreak *>(*pending_line_break_object))
@@ -397,12 +397,12 @@ void SPFlowtext::_buildLayoutInput(SPObject *root, Shape const *exclusion_shape,
*pending_line_break_object = NULL;
}
if (with_indent) {
- layout.appendText(str->string, root->style, child, &pi);
+ layout.appendText(str->string, root->style, &child, &pi);
} else {
- layout.appendText(str->string, root->style, child);
+ layout.appendText(str->string, root->style, &child);
}
} else {
- SPFlowregion *region = dynamic_cast<SPFlowregion *>(child);
+ SPFlowregion *region = dynamic_cast<SPFlowregion *>(&child);
if (region) {
std::vector<Shape*> const &computed = region->computed;
for (std::vector<Shape*>::const_iterator it = computed.begin() ; it != computed.end() ; ++it) {
@@ -416,8 +416,8 @@ void SPFlowtext::_buildLayoutInput(SPObject *root, Shape const *exclusion_shape,
}
}
//Xml Tree is being directly used while it shouldn't be.
- else if (!dynamic_cast<SPFlowregionExclude *>(child) && !sp_repr_is_meta_element(child->getRepr())) {
- _buildLayoutInput(child, exclusion_shape, shapes, pending_line_break_object);
+ else if (!dynamic_cast<SPFlowregionExclude *>(&child) && !sp_repr_is_meta_element(child.getRepr())) {
+ _buildLayoutInput(&child, exclusion_shape, shapes, pending_line_break_object);
}
}
}
@@ -435,9 +435,9 @@ Shape* SPFlowtext::_buildExclusionShape() const
Shape *shape = new Shape();
Shape *shape_temp = new Shape();
- for (SPObject *child = children ; child ; child = child->getNext() ) {
+ for (auto& child: children) {
// RH: is it right that this shouldn't be recursive?
- SPFlowregionExclude *c_child = dynamic_cast<SPFlowregionExclude *>(child);
+ SPFlowregionExclude *c_child = dynamic_cast<SPFlowregionExclude *>(const_cast<SPObject*>(&child));
if ( c_child && c_child->computed && c_child->computed->hasEdges() ) {
if (shape->hasEdges()) {
shape_temp->Booleen(shape, c_child->computed, bool_op_union);
@@ -588,9 +588,9 @@ SPItem *SPFlowtext::get_frame(SPItem const *after)
SPItem *frame = 0;
SPObject *region = 0;
- for (SPObject *o = firstChild() ; o ; o = o->getNext() ) {
- if (dynamic_cast<SPFlowregion *>(o)) {
- region = o;
+ for (auto& o: children) {
+ if (dynamic_cast<SPFlowregion *>(&o)) {
+ region = &o;
break;
}
}
@@ -598,8 +598,8 @@ SPItem *SPFlowtext::get_frame(SPItem const *after)
if (region) {
bool past = false;
- for (SPObject *o = region->firstChild() ; o ; o = o->getNext() ) {
- SPItem *item = dynamic_cast<SPItem *>(o);
+ for (auto& o: region->children) {
+ SPItem *item = dynamic_cast<SPItem *>(&o);
if (item) {
if ( (after == NULL) || past ) {
frame = item;
@@ -702,9 +702,9 @@ Geom::Affine SPFlowtext::set_transform (Geom::Affine const &xform)
}
SPObject *region = NULL;
- for ( SPObject *o = this->firstChild() ; o ; o = o->getNext() ) {
- if (dynamic_cast<SPFlowregion *>(o)) {
- region = o;
+ for (auto& o: children) {
+ if (dynamic_cast<SPFlowregion *>(&o)) {
+ region = &o;
break;
}
}
diff --git a/src/sp-flowtext.h b/src/sp-flowtext.h
index 9ee676893..d0b0a19a4 100644
--- a/src/sp-flowtext.h
+++ b/src/sp-flowtext.h
@@ -8,6 +8,7 @@
#include "libnrtype/Layout-TNG.h"
#include "sp-item.h"
+#include "desktop.h"
#define SP_FLOWTEXT(obj) (dynamic_cast<SPFlowtext*>((SPObject*)obj))
#define SP_IS_FLOWTEXT(obj) (dynamic_cast<const SPFlowtext*>((SPObject*)obj) != NULL)
diff --git a/src/sp-gradient.cpp b/src/sp-gradient.cpp
index 49143bda4..f24e25ab1 100644
--- a/src/sp-gradient.cpp
+++ b/src/sp-gradient.cpp
@@ -269,8 +269,8 @@ void SPGradient::build(SPDocument *document, Inkscape::XML::Node *repr)
SPPaintServer::build(document, repr);
- for ( SPObject *ochild = this->firstChild() ; ochild ; ochild = ochild->getNext() ) {
- if (SP_IS_STOP(ochild)) {
+ for (auto& ochild: children) {
+ if (SP_IS_STOP(&ochild)) {
this->has_stops = TRUE;
break;
}
@@ -474,8 +474,8 @@ void SPGradient::remove_child(Inkscape::XML::Node *child)
SPPaintServer::remove_child(child);
this->has_stops = FALSE;
- for ( SPObject *ochild = this->firstChild() ; ochild ; ochild = ochild->getNext() ) {
- if (SP_IS_STOP(ochild)) {
+ for (auto& ochild: children) {
+ if (SP_IS_STOP(&ochild)) {
this->has_stops = TRUE;
break;
}
@@ -529,9 +529,9 @@ void SPGradient::modified(guint flags)
// FIXME: climb up the ladder of hrefs
GSList *l = NULL;
- for (SPObject *child = this->firstChild() ; child; child = child->getNext() ) {
- sp_object_ref(child);
- l = g_slist_prepend(l, child);
+ for (auto& child: children) {
+ sp_object_ref(&child);
+ l = g_slist_prepend(l, &child);
}
l = g_slist_reverse(l);
@@ -550,10 +550,11 @@ void SPGradient::modified(guint flags)
SPStop* SPGradient::getFirstStop()
{
- SPStop* first = 0;
- for (SPObject *ochild = firstChild(); ochild && !first; ochild = ochild->getNext()) {
- if (SP_IS_STOP(ochild)) {
- first = SP_STOP(ochild);
+ SPStop* first = nullptr;
+ for (auto& ochild: children) {
+ if (SP_IS_STOP(&ochild)) {
+ first = SP_STOP(&ochild);
+ break;
}
}
return first;
@@ -580,8 +581,8 @@ Inkscape::XML::Node *SPGradient::write(Inkscape::XML::Document *xml_doc, Inkscap
if (flags & SP_OBJECT_WRITE_BUILD) {
GSList *l = NULL;
- for (SPObject *child = this->firstChild(); child; child = child->getNext()) {
- Inkscape::XML::Node *crepr = child->updateRepr(xml_doc, NULL, flags);
+ for (auto& child: children) {
+ Inkscape::XML::Node *crepr = child.updateRepr(xml_doc, NULL, flags);
if (crepr) {
l = g_slist_prepend(l, crepr);
@@ -908,8 +909,8 @@ bool SPGradient::invalidateArray()
void SPGradient::rebuildVector()
{
gint len = 0;
- for ( SPObject *child = firstChild() ; child ; child = child->getNext() ) {
- if (SP_IS_STOP(child)) {
+ for (auto& child: children) {
+ if (SP_IS_STOP(&child)) {
len ++;
}
}
@@ -930,9 +931,9 @@ void SPGradient::rebuildVector()
}
}
- for ( SPObject *child = firstChild(); child; child = child->getNext() ) {
- if (SP_IS_STOP(child)) {
- SPStop *stop = SP_STOP(child);
+ for (auto& child: children) {
+ if (SP_IS_STOP(&child)) {
+ SPStop *stop = SP_STOP(&child);
SPGradientStop gstop;
if (!vector.stops.empty()) {
@@ -1015,8 +1016,8 @@ void SPGradient::rebuildArray()
array.read( SP_MESH( this ) );
has_patches = false;
- for ( SPObject *ro = firstChild() ; ro ; ro = ro->getNext() ) {
- if (SP_IS_MESHROW(ro)) {
+ for (auto& ro: children) {
+ if (SP_IS_MESHROW(&ro)) {
has_patches = true;
// std::cout << " Has Patches" << std::endl;
break;
diff --git a/src/sp-hatch.cpp b/src/sp-hatch.cpp
index a17a555b8..02d95c75c 100644
--- a/src/sp-hatch.cpp
+++ b/src/sp-hatch.cpp
@@ -230,14 +230,13 @@ void SPHatch::set(unsigned int key, const gchar* value)
bool SPHatch::_hasHatchPatchChildren(SPHatch const *hatch)
{
- bool matched = false;
- for (SPObject const *child = hatch->firstChild(); child && !matched; child = child->getNext() ) {
- SPHatchPath const *hatchPath = dynamic_cast<SPHatchPath const *>(child);
+ for (auto& child: hatch->children) {
+ SPHatchPath const *hatchPath = dynamic_cast<SPHatchPath const *>(&child);
if (hatchPath) {
- matched = true;
+ return true;
}
}
- return matched;
+ return false;
}
std::vector<SPHatchPath*> SPHatch::hatchPaths()
@@ -246,8 +245,8 @@ std::vector<SPHatchPath*> SPHatch::hatchPaths()
SPHatch *src = chase_hrefs<SPHatch>(this, sigc::ptr_fun(&_hasHatchPatchChildren));
if (src) {
- for (SPObject *child = src->firstChild(); child; child = child->getNext()) {
- SPHatchPath *hatchPath = dynamic_cast<SPHatchPath *>(child);
+ for (auto& child: src->children) {
+ SPHatchPath *hatchPath = dynamic_cast<SPHatchPath *>(&child);
if (hatchPath) {
list.push_back(hatchPath);
}
@@ -262,8 +261,8 @@ std::vector<SPHatchPath const*> SPHatch::hatchPaths() const
SPHatch const *src = chase_hrefs<SPHatch const>(this, sigc::ptr_fun(&_hasHatchPatchChildren));
if (src) {
- for (SPObject const *child = src->firstChild(); child; child = child->getNext()) {
- SPHatchPath const *hatchPath = dynamic_cast<SPHatchPath const*>(child);
+ for (auto& child: src->children) {
+ SPHatchPath const *hatchPath = dynamic_cast<SPHatchPath const*>(&child);
if (hatchPath) {
list.push_back(hatchPath);
}
diff --git a/src/sp-item-group.cpp b/src/sp-item-group.cpp
index f5c8f348e..097026057 100644
--- a/src/sp-item-group.cpp
+++ b/src/sp-item-group.cpp
@@ -230,9 +230,9 @@ Inkscape::XML::Node* SPGroup::write(Inkscape::XML::Document *xml_doc, Inkscape::
l = NULL;
- for (SPObject *child = firstChild(); child; child = child->getNext() ) {
- if ( !dynamic_cast<SPTitle *>(child) && !dynamic_cast<SPDesc *>(child) ) {
- Inkscape::XML::Node *crepr = child->updateRepr(xml_doc, NULL, flags);
+ for (auto& child: children) {
+ if ( !dynamic_cast<SPTitle *>(&child) && !dynamic_cast<SPDesc *>(&child) ) {
+ Inkscape::XML::Node *crepr = child.updateRepr(xml_doc, NULL, flags);
if (crepr) {
l = g_slist_prepend (l, crepr);
@@ -246,9 +246,9 @@ Inkscape::XML::Node* SPGroup::write(Inkscape::XML::Document *xml_doc, Inkscape::
l = g_slist_remove (l, l->data);
}
} else {
- for (SPObject *child = firstChild() ; child ; child = child->getNext() ) {
- if ( !dynamic_cast<SPTitle *>(child) && !dynamic_cast<SPDesc *>(child) ) {
- child->updateRepr(flags);
+ for (auto& child: children) {
+ if ( !dynamic_cast<SPTitle *>(&child) && !dynamic_cast<SPDesc *>(&child) ) {
+ child.updateRepr(flags);
}
}
}
@@ -292,9 +292,8 @@ Geom::OptRect SPGroup::bbox(Geom::Affine const &transform, SPItem::BBoxType bbox
}
void SPGroup::print(SPPrintContext *ctx) {
- std::vector<SPObject*> l=this->childList(false);
- for(std::vector<SPObject*>::const_iterator i=l.begin();i!=l.end();++i){
- SPObject *o = *i;
+ for(auto& child: children){
+ SPObject *o = &child;
SPItem *item = dynamic_cast<SPItem *>(o);
if (item) {
item->invoke_print(ctx);
@@ -361,9 +360,9 @@ void SPGroup::hide (unsigned int key) {
void SPGroup::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) const {
- for ( SPObject const *o = this->firstChild(); o; o = o->getNext() )
+ for (auto& o: children)
{
- SPItem const *item = dynamic_cast<SPItem const *>(o);
+ SPItem const *item = dynamic_cast<SPItem const *>(&o);
if (item) {
item->getSnappoints(p, snapprefs);
}
@@ -507,20 +506,21 @@ sp_item_group_ungroup (SPGroup *group, std::vector<SPItem*> &children, bool do_d
GSList *objects = NULL;
Geom::Affine const g(group->transform);
- for (SPObject *child = group->firstChild() ; child; child = child->getNext() )
- if (SPItem *citem = dynamic_cast<SPItem *>(child))
- sp_item_group_ungroup_handle_clones(citem,g);
-
+ for (auto& child: group->children) {
+ if (SPItem *citem = dynamic_cast<SPItem *>(&child)) {
+ sp_item_group_ungroup_handle_clones(citem, g);
+ }
+ }
- for (SPObject *child = group->firstChild() ; child; child = child->getNext() ) {
- SPItem *citem = dynamic_cast<SPItem *>(child);
+ for (auto& child: group->children) {
+ SPItem *citem = dynamic_cast<SPItem *>(&child);
if (citem) {
/* Merging of style */
// this converts the gradient/pattern fill/stroke, if any, to userSpaceOnUse; we need to do
// it here _before_ the new transform is set, so as to use the pre-transform bbox
citem->adjust_paint_recursive (Geom::identity(), Geom::identity(), false);
- child->style->merge( group->style );
+ child.style->merge( group->style );
/*
* fixme: We currently make no allowance for the case where child is cloned
* and the group has any style settings.
@@ -542,9 +542,9 @@ sp_item_group_ungroup (SPGroup *group, std::vector<SPItem*> &children, bool do_d
* extra complication & maintenance burden and this case is rare.
*/
- child->updateRepr();
+ child.updateRepr();
- Inkscape::XML::Node *nrepr = child->getRepr()->duplicate(prepr->document());
+ Inkscape::XML::Node *nrepr = child.getRepr()->duplicate(prepr->document());
// Merging transform
Geom::Affine ctrans = citem->transform * g;
@@ -578,7 +578,7 @@ sp_item_group_ungroup (SPGroup *group, std::vector<SPItem*> &children, bool do_d
if (text) {
//this causes a change in text-on-path appearance when there is a non-conformal transform, see bug #1594565
double scale = (ctrans.expansionX() + ctrans.expansionY()) / 2.0;
- SPTextPath * text_path = dynamic_cast<SPTextPath *>(text->children);
+ SPTextPath * text_path = dynamic_cast<SPTextPath *>(text->firstChild());
if (!text_path) {
nrepr->setAttribute("transform", affinestr);
} else {
@@ -595,7 +595,7 @@ sp_item_group_ungroup (SPGroup *group, std::vector<SPItem*> &children, bool do_d
items = g_slist_prepend (items, nrepr);
} else {
- Inkscape::XML::Node *nrepr = child->getRepr()->duplicate(prepr->document());
+ Inkscape::XML::Node *nrepr = child.getRepr()->duplicate(prepr->document());
objects = g_slist_prepend (objects, nrepr);
}
}
@@ -657,9 +657,9 @@ std::vector<SPItem*> sp_item_group_item_list(SPGroup * group)
std::vector<SPItem*> s;
g_return_val_if_fail(group != NULL, s);
- for (SPObject *o = group->firstChild() ; o ; o = o->getNext() ) {
- if ( dynamic_cast<SPItem *>(o) ) {
- s.push_back((SPItem*)o);
+ for (auto& o: group->children) {
+ if ( dynamic_cast<SPItem *>(&o) ) {
+ s.push_back((SPItem*)&o);
}
}
return s;
@@ -730,8 +730,8 @@ void SPGroup::_updateLayerMode(unsigned int display_key) {
void SPGroup::translateChildItems(Geom::Translate const &tr)
{
if ( hasChildren() ) {
- for (SPObject *o = firstChild() ; o ; o = o->getNext() ) {
- SPItem *item = dynamic_cast<SPItem *>(o);
+ for (auto& o: children) {
+ SPItem *item = dynamic_cast<SPItem *>(&o);
if ( item ) {
sp_item_move_rel(item, tr);
}
@@ -743,14 +743,14 @@ void SPGroup::translateChildItems(Geom::Translate const &tr)
void SPGroup::scaleChildItemsRec(Geom::Scale const &sc, Geom::Point const &p, bool noRecurse)
{
if ( hasChildren() ) {
- for (SPObject *o = firstChild() ; o ; o = o->getNext() ) {
- if ( SPDefs *defs = dynamic_cast<SPDefs *>(o) ) { // select symbols from defs, ignore clips, masks, patterns
- for (SPObject *defschild = defs->firstChild() ; defschild ; defschild = defschild->getNext() ) {
- SPGroup *defsgroup = dynamic_cast<SPGroup *>(defschild);
+ for (auto& o: children) {
+ if ( SPDefs *defs = dynamic_cast<SPDefs *>(&o) ) { // select symbols from defs, ignore clips, masks, patterns
+ for (auto& defschild: defs->children) {
+ SPGroup *defsgroup = dynamic_cast<SPGroup *>(&defschild);
if (defsgroup)
defsgroup->scaleChildItemsRec(sc, p, false);
}
- } else if ( SPItem *item = dynamic_cast<SPItem *>(o) ) {
+ } else if ( SPItem *item = dynamic_cast<SPItem *>(&o) ) {
SPGroup *group = dynamic_cast<SPGroup *>(item);
if (group && !dynamic_cast<SPBox3D *>(item)) {
/* Using recursion breaks clipping because transforms are applied
@@ -866,8 +866,8 @@ void SPGroup::scaleChildItemsRec(Geom::Scale const &sc, Geom::Point const &p, bo
gint SPGroup::getItemCount() const {
gint len = 0;
- for (SPObject const *o = this->firstChild() ; o ; o = o->getNext() ) {
- if (dynamic_cast<SPItem const *>(o)) {
+ for (auto& child: children) {
+ if (dynamic_cast<SPItem const *>(&child)) {
len++;
}
}
diff --git a/src/sp-item.cpp b/src/sp-item.cpp
index 01cb2d09f..0ba74f9fd 100644
--- a/src/sp-item.cpp
+++ b/src/sp-item.cpp
@@ -298,50 +298,35 @@ bool is_item(SPObject const &object) {
void SPItem::raiseToTop() {
using Inkscape::Algorithms::find_last_if;
- SPObject *topmost=find_last_if<SPObject::SiblingIterator>(
- next, NULL, &is_item
- );
- if (topmost) {
+ auto topmost = find_last_if(++parent->children.iterator_to(*this), parent->children.end(), &is_item);
+ if (topmost != parent->children.end()) {
getRepr()->parent()->changeOrder( getRepr(), topmost->getRepr() );
}
}
void SPItem::raiseOne() {
- SPObject *next_higher=std::find_if<SPObject::SiblingIterator>(
- next, NULL, &is_item
- );
- if (next_higher) {
+ auto next_higher = std::find_if(++parent->children.iterator_to(*this), parent->children.end(), &is_item);
+ if (next_higher != parent->children.end()) {
Inkscape::XML::Node *ref = next_higher->getRepr();
getRepr()->parent()->changeOrder(getRepr(), ref);
}
}
void SPItem::lowerOne() {
- using Inkscape::Util::MutableList;
- using Inkscape::Util::reverse_list;
-
- MutableList<SPObject &> next_lower=std::find_if(
- reverse_list<SPObject::SiblingIterator>(
- parent->firstChild(), this
- ),
- MutableList<SPObject &>(),
- &is_item
- );
- if (next_lower) {
- ++next_lower;
- Inkscape::XML::Node *ref = ( next_lower ? next_lower->getRepr() : NULL );
+ using Inkscape::Algorithms::find_last_if;
+
+ auto next_lower = find_last_if(parent->children.begin(), parent->children.iterator_to(*this), &is_item);
+ if (next_lower != parent->children.iterator_to(*this)) {
+ next_lower--;
+ Inkscape::XML::Node *ref = next_lower->getRepr();
getRepr()->parent()->changeOrder(getRepr(), ref);
}
}
void SPItem::lowerToBottom() {
- using Inkscape::Algorithms::find_last_if;
- using Inkscape::Util::MutableList;
- using Inkscape::Util::reverse_list;
-
- SPObject * bottom=parent->firstChild();
- while(dynamic_cast<SPObject*>(bottom) && dynamic_cast<SPObject*>(bottom->next) && bottom!=this && !is_item(*(bottom->next))) bottom=bottom->next;
- if (bottom && bottom != this) {
+ auto bottom = std::find_if(parent->children.begin(), parent->children.iterator_to(*this), &is_item);
+ if (bottom != parent->children.iterator_to(*this)) {
+ bottom--;
Inkscape::XML::Node *ref = bottom->getRepr() ;
parent->getRepr()->changeOrder(getRepr(), ref);
}
@@ -356,8 +341,8 @@ void SPItem::moveTo(SPItem *target, bool intoafter) {
// Assume move to the "first" in the top node, find the top node
intoafter = false;
SPObject* bottom = this->document->getObjectByRepr(our_ref->root())->firstChild();
- while(!dynamic_cast<SPItem*>(bottom->next)){
- bottom=bottom->next;
+ while(!dynamic_cast<SPItem*>(bottom->getNext())){
+ bottom = bottom->getNext();
}
target_ref = bottom->getRepr();
}
@@ -710,9 +695,9 @@ Inkscape::XML::Node* SPItem::write(Inkscape::XML::Document *xml_doc, Inkscape::X
// so we need to add any children from the underlying object to the new repr
if (flags & SP_OBJECT_WRITE_BUILD) {
GSList *l = NULL;
- for (SPObject *child = object->firstChild(); child != NULL; child = child->next ) {
- if (dynamic_cast<SPTitle *>(child) || dynamic_cast<SPDesc *>(child)) {
- Inkscape::XML::Node *crepr = child->updateRepr(xml_doc, NULL, flags);
+ for (auto& child: object->children) {
+ if (dynamic_cast<SPTitle *>(&child) || dynamic_cast<SPDesc *>(&child)) {
+ Inkscape::XML::Node *crepr = child.updateRepr(xml_doc, NULL, flags);
if (crepr) {
l = g_slist_prepend (l, crepr);
}
@@ -724,9 +709,9 @@ Inkscape::XML::Node* SPItem::write(Inkscape::XML::Document *xml_doc, Inkscape::X
l = g_slist_remove (l, l->data);
}
} else {
- for (SPObject *child = object->firstChild() ; child != NULL; child = child->next ) {
- if (dynamic_cast<SPTitle *>(child) || dynamic_cast<SPDesc *>(child)) {
- child->updateRepr(flags);
+ for (auto& child: object->children) {
+ if (dynamic_cast<SPTitle *>(&child) || dynamic_cast<SPDesc *>(&child)) {
+ child.updateRepr(flags);
}
}
}
@@ -933,12 +918,12 @@ unsigned int SPItem::pos_in_parent() const {
unsigned int pos = 0;
- for ( SPObject *iter = parent->firstChild() ; iter ; iter = iter->next) {
- if (iter == this) {
+ for (auto& iter: parent->children) {
+ if (&iter == this) {
return pos;
}
- if (dynamic_cast<SPItem *>(iter)) {
+ if (dynamic_cast<SPItem *>(&iter)) {
pos++;
}
}
@@ -979,8 +964,8 @@ void SPItem::getSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscap
for (std::list<SPObject const *>::const_iterator o = clips_and_masks.begin(); o != clips_and_masks.end(); ++o) {
if (*o) {
// obj is a group object, the children are the actual clippers
- for (SPObject *child = (*o)->children ; child ; child = child->next) {
- SPItem *item = dynamic_cast<SPItem *>(child);
+ for(auto& child: (*o)->children) {
+ SPItem *item = dynamic_cast<SPItem *>(const_cast<SPObject*>(&child));
if (item) {
std::vector<Inkscape::SnapCandidatePoint> p_clip_or_mask;
// Please note the recursive call here!
@@ -1307,8 +1292,8 @@ void SPItem::adjust_stroke_width_recursive(double expansion)
// A clone's child is the ghost of its original - we must not touch it, skip recursion
if ( !dynamic_cast<SPUse *>(this) ) {
- for ( SPObject *o = children; o; o = o->getNext() ) {
- SPItem *item = dynamic_cast<SPItem *>(o);
+ for (auto& o: children) {
+ SPItem *item = dynamic_cast<SPItem *>(&o);
if (item) {
item->adjust_stroke_width_recursive(expansion);
}
@@ -1322,8 +1307,8 @@ void SPItem::freeze_stroke_width_recursive(bool freeze)
// A clone's child is the ghost of its original - we must not touch it, skip recursion
if ( !dynamic_cast<SPUse *>(this) ) {
- for ( SPObject *o = children; o; o = o->getNext() ) {
- SPItem *item = dynamic_cast<SPItem *>(o);
+ for (auto& o: children) {
+ SPItem *item = dynamic_cast<SPItem *>(&o);
if (item) {
item->freeze_stroke_width_recursive(freeze);
}
@@ -1342,10 +1327,10 @@ sp_item_adjust_rects_recursive(SPItem *item, Geom::Affine advertized_transform)
rect->compensateRxRy(advertized_transform);
}
- for (SPObject *o = item->children; o != NULL; o = o->next) {
- SPItem *item = dynamic_cast<SPItem *>(o);
- if (item) {
- sp_item_adjust_rects_recursive(item, advertized_transform);
+ for(auto& o: item->children) {
+ SPItem *itm = dynamic_cast<SPItem *>(&o);
+ if (itm) {
+ sp_item_adjust_rects_recursive(itm, advertized_transform);
}
}
}
@@ -1362,8 +1347,8 @@ void SPItem::adjust_paint_recursive (Geom::Affine advertized_transform, Geom::Af
// also we do not recurse into clones, because a clone's child is the ghost of its original -
// we must not touch it
if (!(this && (dynamic_cast<SPText *>(this) || dynamic_cast<SPUse *>(this)))) {
- for (SPObject *o = children; o != NULL; o = o->next) {
- SPItem *item = dynamic_cast<SPItem *>(o);
+ for (auto& o: children) {
+ SPItem *item = dynamic_cast<SPItem *>(&o);
if (item) {
// At the level of the transformed item, t_ancestors is identity;
// below it, it is the accmmulated chain of transforms from this level to the top level
@@ -1671,8 +1656,8 @@ SPItem const *sp_item_first_item_child(SPObject const *obj)
SPItem *sp_item_first_item_child(SPObject *obj)
{
SPItem *child = 0;
- for ( SPObject *iter = obj->firstChild() ; iter ; iter = iter->next ) {
- SPItem *tmp = dynamic_cast<SPItem *>(iter);
+ for (auto& iter: obj->children) {
+ SPItem *tmp = dynamic_cast<SPItem *>(&iter);
if ( tmp ) {
child = tmp;
break;
diff --git a/src/sp-mask.cpp b/src/sp-mask.cpp
index e860206a2..4690ffda2 100644
--- a/src/sp-mask.cpp
+++ b/src/sp-mask.cpp
@@ -137,12 +137,8 @@ void SPMask::update(SPCtx* ctx, unsigned int flags) {
flags &= SP_OBJECT_MODIFIED_CASCADE;
- std::vector<SPObject *> children = this->childList(false);
- for (std::vector<SPObject *>::const_iterator child = children.begin();child != children.end();++child) {
- sp_object_ref(*child);
- }
-
-
+ std::vector<SPObject *> children = this->childList(true);
+
for (std::vector<SPObject *>::const_iterator child = children.begin();child != children.end();++child) {
if (flags || ((*child)->uflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) {
(*child)->updateDisplay(ctx, flags);
@@ -171,11 +167,8 @@ void SPMask::modified(unsigned int flags) {
flags &= SP_OBJECT_MODIFIED_CASCADE;
- std::vector<SPObject *> children = this->childList(false);
- for (std::vector<SPObject *>::const_iterator child = children.begin();child != children.end();++child) {
- sp_object_ref(*child);
- }
-
+ std::vector<SPObject *> children = this->childList(true);
+
for (std::vector<SPObject *>::const_iterator child = children.begin();child != children.end();++child) {
if (flags || ((*child)->mflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) {
(*child)->emitModified(flags);
@@ -233,9 +226,9 @@ Inkscape::DrawingItem *SPMask::sp_mask_show(Inkscape::Drawing &drawing, unsigned
Inkscape::DrawingGroup *ai = new Inkscape::DrawingGroup(drawing);
this->display = sp_mask_view_new_prepend (this->display, key, ai);
- for ( SPObject *child = this->firstChild() ; child; child = child->getNext() ) {
- if (SP_IS_ITEM (child)) {
- Inkscape::DrawingItem *ac = SP_ITEM (child)->invoke_show (drawing, key, SP_ITEM_REFERENCE_FLAGS);
+ for (auto& child: children) {
+ if (SP_IS_ITEM (&child)) {
+ Inkscape::DrawingItem *ac = SP_ITEM (&child)->invoke_show (drawing, key, SP_ITEM_REFERENCE_FLAGS);
if (ac) {
ai->prependChild(ac);
@@ -256,9 +249,9 @@ void SPMask::sp_mask_hide(unsigned int key) {
g_return_if_fail (this != NULL);
g_return_if_fail (SP_IS_MASK (this));
- for ( SPObject *child = this->firstChild(); child; child = child->getNext()) {
- if (SP_IS_ITEM (child)) {
- SP_ITEM(child)->invoke_hide (key);
+ for (auto& child: children) {
+ if (SP_IS_ITEM (&child)) {
+ SP_ITEM(&child)->invoke_hide (key);
}
}
diff --git a/src/sp-mesh-array.cpp b/src/sp-mesh-array.cpp
index 355150893..6bd5c85d7 100644
--- a/src/sp-mesh-array.cpp
+++ b/src/sp-mesh-array.cpp
@@ -632,16 +632,16 @@ void SPMeshNodeArray::read( SPMesh *mg_in ) {
guint max_column = 0;
guint irow = 0; // Corresponds to top of patch being read in.
- for ( SPObject *ro = mg->firstChild() ; ro ; ro = ro->getNext() ) {
+ for (auto& ro: mg->children) {
- if (SP_IS_MESHROW(ro)) {
+ if (SP_IS_MESHROW(&ro)) {
guint icolumn = 0; // Corresponds to left of patch being read in.
- for ( SPObject *po = ro->firstChild() ; po ; po = po->getNext() ) {
+ for (auto& po: ro.children) {
- if (SP_IS_MESHPATCH(po)) {
+ if (SP_IS_MESHPATCH(&po)) {
- SPMeshpatch *patch = SP_MESHPATCH(po);
+ SPMeshpatch *patch = SP_MESHPATCH(&po);
// std::cout << "SPMeshNodeArray::read: row size: " << nodes.size() << std::endl;
SPMeshPatchI new_patch( &nodes, irow, icolumn ); // Adds new nodes.
@@ -652,15 +652,15 @@ void SPMeshNodeArray::read( SPMesh *mg_in ) {
// Only 'top' side defined for first row.
if( irow != 0 ) ++istop;
- for ( SPObject *so = po->firstChild() ; so ; so = so->getNext() ) {
- if (SP_IS_STOP(so)) {
+ for (auto& so: po.children) {
+ if (SP_IS_STOP(&so)) {
if( istop > 3 ) {
// std::cout << " Mesh Gradient: Too many stops: " << istop << std::endl;
break;
}
- SPStop *stop = SP_STOP(so);
+ SPStop *stop = SP_STOP(&so);
// Handle top of first row.
if( istop == 0 && icolumn == 0 ) {
@@ -848,15 +848,15 @@ void SPMeshNodeArray::write( SPMesh *mg ) {
// First we must delete reprs for old mesh rows and patches.
GSList *descendant_reprs = NULL;
GSList *descendant_objects = NULL;
- for ( SPObject *row = mg->firstChild(); row; row = row->getNext() ) {
- descendant_reprs = g_slist_prepend (descendant_reprs, row->getRepr());
- descendant_objects = g_slist_prepend (descendant_objects, row );
- for ( SPObject *patch = row->firstChild(); patch; patch = patch->getNext() ) {
- descendant_reprs = g_slist_prepend (descendant_reprs, patch->getRepr());
- descendant_objects = g_slist_prepend (descendant_objects, patch );
- for ( SPObject *stop = patch->firstChild(); stop; stop = stop->getNext() ) {
- descendant_reprs = g_slist_prepend (descendant_reprs, stop->getRepr());
- descendant_objects = g_slist_prepend (descendant_objects, stop );
+ for (auto& row: mg->children) {
+ descendant_reprs = g_slist_prepend (descendant_reprs, row.getRepr());
+ descendant_objects = g_slist_prepend (descendant_objects, &row);
+ for (auto& patch: row.children) {
+ descendant_reprs = g_slist_prepend (descendant_reprs, patch.getRepr());
+ descendant_objects = g_slist_prepend (descendant_objects, &patch);
+ for (auto& stop: patch.children) {
+ descendant_reprs = g_slist_prepend (descendant_reprs, stop.getRepr());
+ descendant_objects = g_slist_prepend (descendant_objects, &stop);
}
}
}
diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp
index 45e3d4cf8..b9526433f 100644
--- a/src/sp-namedview.cpp
+++ b/src/sp-namedview.cpp
@@ -246,9 +246,9 @@ void SPNamedView::build(SPDocument *document, Inkscape::XML::Node *repr) {
this->readAttr( "inkscape:lockguides" );
/* Construct guideline list */
- for (SPObject *o = this->firstChild() ; o; o = o->getNext() ) {
- if (SP_IS_GUIDE(o)) {
- SPGuide * g = SP_GUIDE(o);
+ for (auto& o: children) {
+ if (SP_IS_GUIDE(&o)) {
+ SPGuide * g = SP_GUIDE(&o);
this->guides.push_back(g);
//g_object_set(G_OBJECT(g), "color", nv->guidecolor, "hicolor", nv->guidehicolor, NULL);
g->setColor(this->guidecolor);
@@ -856,9 +856,9 @@ void sp_namedview_update_layers_from_document (SPDesktop *desktop)
}
// if that didn't work out, look for the topmost layer
if (!layer) {
- for ( SPObject *iter = document->getRoot()->firstChild(); iter ; iter = iter->getNext() ) {
- if (desktop->isLayer(iter)) {
- layer = iter;
+ for (auto& iter: document->getRoot()->children) {
+ if (desktop->isLayer(&iter)) {
+ layer = &iter;
}
}
}
diff --git a/src/sp-object-group.cpp b/src/sp-object-group.cpp
index c3967461e..62c6f7a87 100644
--- a/src/sp-object-group.cpp
+++ b/src/sp-object-group.cpp
@@ -50,8 +50,8 @@ Inkscape::XML::Node *SPObjectGroup::write(Inkscape::XML::Document *xml_doc, Inks
}
GSList *l = 0;
- for ( SPObject *child = this->firstChild() ; child ; child = child->getNext() ) {
- Inkscape::XML::Node *crepr = child->updateRepr(xml_doc, NULL, flags);
+ for (auto& child: children) {
+ Inkscape::XML::Node *crepr = child.updateRepr(xml_doc, NULL, flags);
if (crepr) {
l = g_slist_prepend(l, crepr);
@@ -64,8 +64,8 @@ Inkscape::XML::Node *SPObjectGroup::write(Inkscape::XML::Document *xml_doc, Inks
l = g_slist_remove(l, l->data);
}
} else {
- for ( SPObject *child = this->firstChild() ; child ; child = child->getNext() ) {
- child->updateRepr(flags);
+ for (auto& child: children) {
+ child.updateRepr(flags);
}
}
diff --git a/src/sp-object.cpp b/src/sp-object.cpp
index cb6b0ad4d..008182616 100644
--- a/src/sp-object.cpp
+++ b/src/sp-object.cpp
@@ -7,8 +7,9 @@
* Stephen Silver <sasilver@users.sourceforge.net>
* Jon A. Cruz <jon@joncruz.org>
* Abhishek Sharma
+ * Adrian Boguszewski
*
- * Copyright (C) 1999-2008 authors
+ * Copyright (C) 1999-2016 authors
* Copyright (C) 2001-2002 Ximian, Inc.
*
* Released under GNU GPL, read the file 'COPYING' for more information
@@ -16,6 +17,7 @@
#include <cstring>
#include <string>
+#include <boost/range/adaptor/transformed.hpp>
#include "helper/sp-marshal.h"
#include "xml/node-event-vector.h"
@@ -114,8 +116,7 @@ static gchar *sp_object_get_unique_id(SPObject *object,
*/
SPObject::SPObject()
: cloned(0), uflags(0), mflags(0), hrefcount(0), _total_hrefcount(0),
- document(NULL), parent(NULL), children(NULL), _last_child(NULL),
- next(NULL), id(NULL), repr(NULL), refCount(1),hrefList(std::list<SPObject*>()),
+ document(NULL), parent(NULL), id(NULL), repr(NULL), refCount(1), hrefList(std::list<SPObject*>()),
_successor(NULL), _collection_policy(SPObject::COLLECT_WITH_PARENT),
_label(NULL), _default_label(NULL)
{
@@ -148,6 +149,9 @@ SPObject::~SPObject() {
sp_object_unref(this->_successor, NULL);
this->_successor = NULL;
}
+ if (parent) {
+ parent->children.erase(parent->children.iterator_to(*this));
+ }
if( style == NULL ) {
// style pointer could be NULL if unreffed too many times.
@@ -396,13 +400,12 @@ void SPObject::changeCSS(SPCSSAttr *css, gchar const *attr)
}
std::vector<SPObject*> SPObject::childList(bool add_ref, Action) {
- std::vector<SPObject*> l;
- for ( SPObject *child = firstChild() ; child; child = child->getNext() ) {
+ std::vector<SPObject*> l;
+ for (auto& child: children) {
if (add_ref) {
- sp_object_ref (child);
+ sp_object_ref(&child);
}
-
- l.push_back(child);
+ l.push_back(&child);
}
return l;
@@ -465,9 +468,9 @@ void SPObject::requestOrphanCollection() {
}
void SPObject::_sendDeleteSignalRecursive() {
- for (SPObject *child = firstChild(); child; child = child->getNext()) {
- child->_delete_signal.emit(child);
- child->_sendDeleteSignalRecursive();
+ for (auto& child: children) {
+ child._delete_signal.emit(&child);
+ child._sendDeleteSignalRecursive();
}
}
@@ -495,12 +498,12 @@ void SPObject::deleteObject(bool propagate, bool propagate_descendants)
void SPObject::cropToObject(SPObject *except)
{
std::vector<SPObject*> toDelete;
- for ( SPObject *child = this->firstChild(); child; child = child->getNext() ) {
- if (SP_IS_ITEM(child)) {
- if (child->isAncestorOf(except)) {
- child->cropToObject(except);
- } else if(child != except) {
- toDelete.push_back(child);
+ for (auto& child: children) {
+ if (SP_IS_ITEM(&child)) {
+ if (child.isAncestorOf(except)) {
+ child.cropToObject(except);
+ } else if(&child != except) {
+ toDelete.push_back(&child);
}
}
}
@@ -523,60 +526,29 @@ void SPObject::attach(SPObject *object, SPObject *prev)
object->parent = this;
this->_updateTotalHRefCount(object->_total_hrefcount);
- SPObject *next;
- if (prev) {
- next = prev->next;
- prev->next = object;
- } else {
- next = this->children;
- this->children = object;
- }
- object->next = next;
- if (!next) {
- this->_last_child = object;
+ auto it = children.begin();
+ if (prev != nullptr) {
+ it = ++children.iterator_to(*prev);
}
+ children.insert(it, *object);
+
if (!object->xml_space.set)
object->xml_space.value = this->xml_space.value;
}
-void SPObject::reorder(SPObject *prev)
-{
- //g_return_if_fail(object != NULL);
- //g_return_if_fail(SP_IS_OBJECT(object));
- g_return_if_fail(this->parent != NULL);
- g_return_if_fail(this != prev);
- g_return_if_fail(!prev || SP_IS_OBJECT(prev));
- g_return_if_fail(!prev || prev->parent == this->parent);
-
- SPObject *const parent=this->parent;
+void SPObject::reorder(SPObject* obj, SPObject* prev) {
+ g_return_if_fail(obj != nullptr);
+ g_return_if_fail(obj->parent);
+ g_return_if_fail(obj->parent == this);
+ g_return_if_fail(obj != prev);
+ g_return_if_fail(!prev || prev->parent == obj->parent);
- SPObject *old_prev=NULL;
- for ( SPObject *child = parent->children ; child && child != this ;
- child = child->next )
- {
- old_prev = child;
+ auto it = children.begin();
+ if (prev != nullptr) {
+ it = ++children.iterator_to(*prev);
}
- SPObject *next=this->next;
- if (old_prev) {
- old_prev->next = next;
- } else {
- parent->children = next;
- }
- if (!next) {
- parent->_last_child = old_prev;
- }
- if (prev) {
- next = prev->next;
- prev->next = this;
- } else {
- next = parent->children;
- parent->children = this;
- }
- this->next = next;
- if (!next) {
- parent->_last_child = this;
- }
+ children.splice(it, children, children.iterator_to(*obj));
}
void SPObject::detach(SPObject *object)
@@ -587,26 +559,9 @@ void SPObject::detach(SPObject *object)
g_return_if_fail(SP_IS_OBJECT(object));
g_return_if_fail(object->parent == this);
+ children.erase(children.iterator_to(*object));
object->releaseReferences();
- SPObject *prev=NULL;
- for ( SPObject *child = this->children ; child && child != object ;
- child = child->next )
- {
- prev = child;
- }
-
- SPObject *next=object->next;
- if (prev) {
- prev->next = next;
- } else {
- this->children = next;
- }
- if (!next) {
- this->_last_child = prev;
- }
-
- object->next = NULL;
object->parent = NULL;
this->_updateTotalHRefCount(-object->_total_hrefcount);
@@ -616,14 +571,14 @@ void SPObject::detach(SPObject *object)
SPObject *SPObject::get_child_by_repr(Inkscape::XML::Node *repr)
{
g_return_val_if_fail(repr != NULL, NULL);
- SPObject *result = 0;
+ SPObject *result = nullptr;
- if ( _last_child && (_last_child->getRepr() == repr) ) {
- result = _last_child; // optimization for common scenario
+ if (children.size() > 0 && children.back().getRepr() == repr) {
+ result = &children.back(); // optimization for common scenario
} else {
- for ( SPObject *child = children ; child ; child = child->next ) {
- if ( child->getRepr() == repr ) {
- result = child;
+ for (auto& child: children) {
+ if (child.getRepr() == repr) {
+ result = &child;
break;
}
}
@@ -654,10 +609,12 @@ void SPObject::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref)
void SPObject::release() {
SPObject* object = this;
-
debug("id=%p, typename=%s", object, g_type_name_from_instance((GTypeInstance*)object));
- while (object->children) {
- object->detach(object->children);
+ auto tmp = children | boost::adaptors::transformed([](SPObject& obj){return &obj;});
+ std::vector<SPObject *> toRelease(tmp.begin(), tmp.end());
+
+ for (auto& p: toRelease) {
+ object->detach(p);
}
}
@@ -678,7 +635,7 @@ void SPObject::order_changed(Inkscape::XML::Node *child, Inkscape::XML::Node * /
SPObject *ochild = object->get_child_by_repr(child);
g_return_if_fail(ochild != NULL);
SPObject *prev = new_ref ? object->get_child_by_repr(new_ref) : NULL;
- ochild->reorder(prev);
+ object->reorder(ochild, prev);
ochild->_position_changed_signal.emit(ochild);
}
@@ -840,15 +797,22 @@ void SPObject::releaseReferences() {
SPObject *SPObject::getPrev()
{
- SPObject *prev = 0;
- for ( SPObject *obj = parent->firstChild(); obj && !prev; obj = obj->getNext() ) {
- if (obj->getNext() == this) {
- prev = obj;
- }
+ SPObject *prev = nullptr;
+ if (parent && !parent->children.empty() && &parent->children.front() != this) {
+ prev = &*(--parent->children.iterator_to(*this));
}
return prev;
}
+SPObject* SPObject::getNext()
+{
+ SPObject *next = nullptr;
+ if (parent && !parent->children.empty() && &parent->children.back() != this) {
+ next = &*(++parent->children.iterator_to(*this));
+ }
+ return next;
+}
+
void SPObject::repr_child_added(Inkscape::XML::Node * /*repr*/, Inkscape::XML::Node *child, Inkscape::XML::Node *ref, gpointer data)
{
SPObject *object = SP_OBJECT(data);
@@ -1514,8 +1478,11 @@ bool SPObject::setTitleOrDesc(gchar const *value, gchar const *svg_tagname, bool
}
else {
// remove the current content of the 'text' or 'desc' element
- SPObject *child;
- while (NULL != (child = elem->firstChild())) child->deleteObject();
+ auto tmp = elem->children | boost::adaptors::transformed([](SPObject& obj) { return &obj; });
+ std::vector<SPObject*> vec(tmp.begin(), tmp.end());
+ for (auto &child: vec) {
+ child->deleteObject();
+ }
}
// add the new content
@@ -1523,33 +1490,33 @@ bool SPObject::setTitleOrDesc(gchar const *value, gchar const *svg_tagname, bool
return true;
}
-SPObject * SPObject::findFirstChild(gchar const *tagname) const
+SPObject* SPObject::findFirstChild(gchar const *tagname) const
{
- for (SPObject *child = children; child; child = child->next)
+ for (auto& child: const_cast<SPObject*>(this)->children)
{
- if (child->repr->type() == Inkscape::XML::ELEMENT_NODE &&
- !strcmp(child->repr->name(), tagname)) {
- return child;
+ if (child.repr->type() == Inkscape::XML::ELEMENT_NODE &&
+ !strcmp(child.repr->name(), tagname)) {
+ return &child;
}
}
- return NULL;
+ return nullptr;
}
char* SPObject::textualContent() const
{
GString* text = g_string_new("");
- for (const SPObject *child = firstChild(); child; child = child->next)
+ for (auto& child: children)
{
- Inkscape::XML::NodeType child_type = child->repr->type();
+ Inkscape::XML::NodeType child_type = child.repr->type();
if (child_type == Inkscape::XML::ELEMENT_NODE) {
- char* new_string = child->textualContent();
+ char* new_string = child.textualContent();
g_string_append(text, new_string);
g_free(new_string);
}
else if (child_type == Inkscape::XML::TEXT_NODE) {
- g_string_append(text, child->repr->content());
+ g_string_append(text, child.repr->content());
}
}
return g_string_free(text, FALSE);
@@ -1566,8 +1533,8 @@ void SPObject::recursivePrintTree( unsigned level )
std::cout << " ";
}
std::cout << (getId()?getId():"No object id") << std::endl;
- for (SPObject *child = children; child; child = child->next) {
- child->recursivePrintTree( level+1 );
+ for (auto& child: children) {
+ child.recursivePrintTree(level + 1);
}
}
diff --git a/src/sp-object.h b/src/sp-object.h
index 70d3e5df5..1c6212664 100644
--- a/src/sp-object.h
+++ b/src/sp-object.h
@@ -6,8 +6,9 @@
* Lauris Kaplinski <lauris@kaplinski.com>
* Jon A. Cruz <jon@joncruz.org>
* Abhishek Sharma
+ * Adrian Boguszewski
*
- * Copyright (C) 1999-2002 authors
+ * Copyright (C) 1999-2016 authors
* Copyright (C) 2001-2002 Ximian, Inc.
*
* Released under GNU GPL, read the file 'COPYING' for more information
@@ -53,6 +54,7 @@ class SPObject;
#include <sigc++/functors/slot.h>
#include <sigc++/signal.h>
#include <vector>
+#include <boost/intrusive/list.hpp>
#include "version.h"
#include "util/forward-pointer-iterator.h"
@@ -206,9 +208,6 @@ public:
unsigned int _total_hrefcount; /* our hrefcount + total descendants */
SPDocument *document; /* Document we are part of */
SPObject *parent; /* Our parent (only one allowed) */
- SPObject *children; /* Our children */
- SPObject *_last_child; /* Remembered last child */
- SPObject *next; /* Next object in linked list */
private:
SPObject(const SPObject&);
@@ -216,6 +215,7 @@ private:
char *id; /* Our very own unique id */
Inkscape::XML::Node *repr; /* Our xml representation */
+
public:
int refCount;
std::list<SPObject*> hrefList;
@@ -279,17 +279,9 @@ public:
return object->parent;
}
};
- /// Switch containing next() method.
- struct SiblingIteratorStrategy {
- static SPObject const *next(SPObject const *object) {
- return object->next;
- }
- };
typedef Inkscape::Util::ForwardPointerIterator<SPObject, ParentIteratorStrategy> ParentIterator;
typedef Inkscape::Util::ForwardPointerIterator<SPObject const, ParentIteratorStrategy> ConstParentIterator;
- typedef Inkscape::Util::ForwardPointerIterator<SPObject, SiblingIteratorStrategy> SiblingIterator;
- typedef Inkscape::Util::ForwardPointerIterator<SPObject const, SiblingIteratorStrategy> ConstSiblingIterator;
bool isSiblingOf(SPObject const *object) const {
if (object == NULL) return false;
@@ -306,24 +298,21 @@ public:
*/
SPObject const *nearestCommonAncestor(SPObject const *object) const;
- /* A non-const version can be similarly constructed if you want one.
- * (Don't just cast away the constness, which would be ill-formed.) */
- SPObject *getNext() {return next;}
-
- SPObject const *getNext() const {return next;}
+ /* Returns next object in sibling list or NULL. */
+ SPObject *getNext();
/**
* Returns previous object in sibling list or NULL.
*/
SPObject *getPrev();
- bool hasChildren() const { return ( children != NULL ); }
+ bool hasChildren() const { return ( children.size() > 0 ); }
- SPObject *firstChild() { return children; }
- SPObject const *firstChild() const { return children; }
+ SPObject *firstChild() { return children.empty() ? nullptr : &children.front(); }
+ SPObject const *firstChild() const { return children.empty() ? nullptr : &children.front(); }
- SPObject *lastChild() { return _last_child; }
- SPObject const *lastChild() const { return _last_child; }
+ SPObject *lastChild() { return children.empty() ? nullptr : &children.back(); }
+ SPObject const *lastChild() const { return children.empty() ? nullptr : &children.back(); }
enum Action { ActionGeneral, ActionBBox, ActionUpdate, ActionShow };
@@ -681,9 +670,9 @@ public:
void attach(SPObject *object, SPObject *prev);
/**
- * In list of object's siblings, move object behind prev.
+ * In list of object's children, move object behind prev.
*/
- void reorder(SPObject *prev);
+ void reorder(SPObject* obj, SPObject *prev);
/**
* Remove object from parent's children, release and unref it.
@@ -858,7 +847,17 @@ protected:
virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags);
+ typedef boost::intrusive::list_member_hook<> ListHook;
+ ListHook _child_hook;
public:
+ typedef boost::intrusive::list<
+ SPObject,
+ boost::intrusive::member_hook<
+ SPObject,
+ ListHook,
+ &SPObject::_child_hook
+ >> ChildrenList;
+ ChildrenList children;
virtual void read_content();
void recursivePrintTree(unsigned level = 0); // For debugging
diff --git a/src/sp-pattern.cpp b/src/sp-pattern.cpp
index a68bee721..77fa9034d 100644
--- a/src/sp-pattern.cpp
+++ b/src/sp-pattern.cpp
@@ -219,8 +219,8 @@ void SPPattern::_getChildren(std::list<SPObject *> &l)
{
for (SPPattern *pat_i = this; pat_i != NULL; pat_i = pat_i->ref ? pat_i->ref->getObject() : NULL) {
if (pat_i->firstChild()) { // find the first one with children
- for (SPObject *child = pat_i->firstChild(); child; child = child->getNext()) {
- l.push_back(child);
+ for (auto& child: pat_i->children) {
+ l.push_back(&child);
}
break; // do not go further up the chain if children are found
}
@@ -315,8 +315,8 @@ guint SPPattern::_countHrefs(SPObject *o) const
i++;
}
- for (SPObject *child = o->firstChild(); child != NULL; child = child->next) {
- i += _countHrefs(child);
+ for (auto& child: o->children) {
+ i += _countHrefs(&child);
}
return i;
@@ -504,13 +504,13 @@ Geom::OptRect SPPattern::viewbox() const
bool SPPattern::_hasItemChildren() const
{
- bool hasChildren = false;
- for (SPObject const *child = firstChild(); child && !hasChildren; child = child->getNext()) {
- if (SP_IS_ITEM(child)) {
- hasChildren = true;
+ for (auto& child: children) {
+ if (SP_IS_ITEM(&child)) {
+ return true;
}
}
- return hasChildren;
+
+ return false;
}
bool SPPattern::isValid() const
@@ -554,12 +554,12 @@ cairo_pattern_t *SPPattern::pattern_new(cairo_t *base_ct, Geom::OptRect const &b
Inkscape::DrawingGroup *root = new Inkscape::DrawingGroup(drawing);
drawing.setRoot(root);
- for (SPObject *child = shown->firstChild(); child != NULL; child = child->getNext()) {
- if (SP_IS_ITEM(child)) {
+ for (auto& child: shown->children) {
+ if (SP_IS_ITEM(&child)) {
// for each item in pattern, show it on our drawing, add to the group,
// and connect to the release signal in case the item gets deleted
Inkscape::DrawingItem *cai;
- cai = SP_ITEM(child)->invoke_show(drawing, dkey, SP_ITEM_SHOW_DISPLAY);
+ cai = SP_ITEM(&child)->invoke_show(drawing, dkey, SP_ITEM_SHOW_DISPLAY);
root->appendChild(cai);
}
}
@@ -650,9 +650,9 @@ cairo_pattern_t *SPPattern::pattern_new(cairo_t *base_ct, Geom::OptRect const &b
// Render drawing to pattern_surface via drawing context, this calls root->render
// which is really DrawingItem->render().
drawing.render(dc, one_tile);
- for (SPObject *child = shown->firstChild(); child != NULL; child = child->getNext()) {
- if (SP_IS_ITEM(child)) {
- SP_ITEM(child)->invoke_hide(dkey);
+ for (auto& child: shown->children) {
+ if (SP_IS_ITEM(&child)) {
+ SP_ITEM(&child)->invoke_hide(dkey);
}
}
diff --git a/src/sp-root.cpp b/src/sp-root.cpp
index 98eae2159..34047054a 100644
--- a/src/sp-root.cpp
+++ b/src/sp-root.cpp
@@ -73,9 +73,9 @@ void SPRoot::build(SPDocument *document, Inkscape::XML::Node *repr)
SPGroup::build(document, repr);
// Search for first <defs> node
- for (SPObject *o = this->firstChild() ; o ; o = o->getNext()) {
- if (SP_IS_DEFS(o)) {
- this->defs = SP_DEFS(o);
+ for (auto& o: children) {
+ if (SP_IS_DEFS(&o)) {
+ this->defs = SP_DEFS(&o);
break;
}
}
@@ -174,9 +174,9 @@ void SPRoot::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref)
if (co && SP_IS_DEFS(co)) {
// We search for first <defs> node - it is not beautiful, but works
- for (SPObject *c = this->firstChild() ; c ; c = c->getNext()) {
- if (SP_IS_DEFS(c)) {
- this->defs = SP_DEFS(c);
+ for (auto& c: children) {
+ if (SP_IS_DEFS(&c)) {
+ this->defs = SP_DEFS(&c);
break;
}
}
@@ -189,7 +189,8 @@ void SPRoot::remove_child(Inkscape::XML::Node *child)
SPObject *iter = 0;
// We search for first remaining <defs> node - it is not beautiful, but works
- for (iter = this->firstChild() ; iter ; iter = iter->getNext()) {
+ for (auto& child: children) {
+ iter = &child;
if (SP_IS_DEFS(iter) && (SPDefs *)iter != this->defs) {
this->defs = (SPDefs *)iter;
break;
diff --git a/src/sp-switch.cpp b/src/sp-switch.cpp
index 1e0d81db9..d6ab1e904 100644
--- a/src/sp-switch.cpp
+++ b/src/sp-switch.cpp
@@ -31,9 +31,10 @@ SPSwitch::~SPSwitch() {
SPObject *SPSwitch::_evaluateFirst() {
SPObject *first = 0;
- for (SPObject *child = this->firstChild() ; child && !first ; child = child->getNext() ) {
- if (SP_IS_ITEM(child) && sp_item_evaluate(SP_ITEM(child))) {
- first = child;
+ for (auto& child: children) {
+ if (SP_IS_ITEM(&child) && sp_item_evaluate(SP_ITEM(&child))) {
+ first = &child;
+ break;
}
}
diff --git a/src/sp-text.cpp b/src/sp-text.cpp
index 2e1d4993d..9beb812f5 100644
--- a/src/sp-text.cpp
+++ b/src/sp-text.cpp
@@ -150,9 +150,9 @@ void SPText::update(SPCtx *ctx, guint flags) {
// Create temporary list of children
GSList *l = NULL;
- for (SPObject *child = this->firstChild() ; child ; child = child->getNext() ) {
- sp_object_ref(child, this);
- l = g_slist_prepend (l, child);
+ for (auto& child: children) {
+ sp_object_ref(&child, this);
+ l = g_slist_prepend (l, &child);
}
l = g_slist_reverse (l);
@@ -230,9 +230,9 @@ void SPText::modified(guint flags) {
// Create temporary list of children
GSList *l = NULL;
- for (SPObject *child = this->firstChild() ; child ; child = child->getNext() ) {
- sp_object_ref(child, this);
- l = g_slist_prepend (l, child);
+ for (auto& child: children) {
+ sp_object_ref(&child, this);
+ l = g_slist_prepend (l, &child);
}
l = g_slist_reverse (l);
@@ -257,17 +257,17 @@ Inkscape::XML::Node *SPText::write(Inkscape::XML::Document *xml_doc, Inkscape::X
GSList *l = NULL;
- for (SPObject *child = this->firstChild() ; child ; child = child->getNext() ) {
- if (SP_IS_TITLE(child) || SP_IS_DESC(child)) {
+ for (auto& child: children) {
+ if (SP_IS_TITLE(&child) || SP_IS_DESC(&child)) {
continue;
}
Inkscape::XML::Node *crepr = NULL;
- if (SP_IS_STRING(child)) {
- crepr = xml_doc->createTextNode(SP_STRING(child)->string.c_str());
+ if (SP_IS_STRING(&child)) {
+ crepr = xml_doc->createTextNode(SP_STRING(&child)->string.c_str());
} else {
- crepr = child->updateRepr(xml_doc, NULL, flags);
+ crepr = child.updateRepr(xml_doc, NULL, flags);
}
if (crepr) {
@@ -281,15 +281,15 @@ Inkscape::XML::Node *SPText::write(Inkscape::XML::Document *xml_doc, Inkscape::X
l = g_slist_remove (l, l->data);
}
} else {
- for (SPObject *child = this->firstChild() ; child ; child = child->getNext() ) {
- if (SP_IS_TITLE(child) || SP_IS_DESC(child)) {
+ for (auto& child: children) {
+ if (SP_IS_TITLE(&child) || SP_IS_DESC(&child)) {
continue;
}
- if (SP_IS_STRING(child)) {
- child->getRepr()->setContent(SP_STRING(child)->string.c_str());
+ if (SP_IS_STRING(&child)) {
+ child.getRepr()->setContent(SP_STRING(&child)->string.c_str());
} else {
- child->updateRepr(flags);
+ child.updateRepr(flags);
}
}
}
@@ -601,16 +601,16 @@ unsigned SPText::_buildLayoutInput(SPObject *root, Inkscape::Text::Layout::Optio
}
}
- for (SPObject *child = root->firstChild() ; child ; child = child->getNext() ) {
- SPString *str = dynamic_cast<SPString *>(child);
+ for (auto& child: root->children) {
+ SPString *str = dynamic_cast<SPString *>(&child);
if (str) {
Glib::ustring const &string = str->string;
// std::cout << " Appending: >" << string << "<" << std::endl;
- layout.appendText(string, root->style, child, &optional_attrs, child_attrs_offset + length);
+ layout.appendText(string, root->style, &child, &optional_attrs, child_attrs_offset + length);
length += string.length();
- } else if (!sp_repr_is_meta_element(child->getRepr())) {
+ } else if (!sp_repr_is_meta_element(child.getRepr())) {
/* ^^^^ XML Tree being directly used here while it shouldn't be.*/
- length += _buildLayoutInput(child, optional_attrs, child_attrs_offset + length, in_textpath);
+ length += _buildLayoutInput(&child, optional_attrs, child_attrs_offset + length, in_textpath);
}
}
@@ -623,9 +623,9 @@ void SPText::rebuildLayout()
Inkscape::Text::Layout::OptionalTextTagAttrs optional_attrs;
_buildLayoutInput(this, optional_attrs, 0, false);
layout.calculateFlow();
- for (SPObject *child = firstChild() ; child ; child = child->getNext() ) {
- if (SP_IS_TEXTPATH(child)) {
- SPTextPath const *textpath = SP_TEXTPATH(child);
+ for (auto& child: children) {
+ if (SP_IS_TEXTPATH(&child)) {
+ SPTextPath const *textpath = SP_TEXTPATH(&child);
if (textpath->originalPath != NULL) {
//g_print("%s", layout.dumpAsText().c_str());
layout.fitToPathAlign(textpath->startOffset, *textpath->originalPath);
@@ -635,9 +635,9 @@ void SPText::rebuildLayout()
//g_print("%s", layout.dumpAsText().c_str());
// set the x,y attributes on role:line spans
- for (SPObject *child = firstChild() ; child ; child = child->getNext() ) {
- if (SP_IS_TSPAN(child)) {
- SPTSpan *tspan = SP_TSPAN(child);
+ for (auto& child: children) {
+ if (SP_IS_TSPAN(&child)) {
+ SPTSpan *tspan = SP_TSPAN(&child);
if ( (tspan->role != SP_TSPAN_ROLE_UNSPECIFIED)
&& tspan->attributes.singleXYCoordinates() ) {
Inkscape::Text::Layout::iterator iter = layout.sourceToIterator(tspan);
@@ -671,9 +671,9 @@ void SPText::_adjustFontsizeRecursive(SPItem *item, double ex, bool is_root)
item->updateRepr();
}
- for (SPObject *o = item->children; o != NULL; o = o->next) {
- if (SP_IS_ITEM(o))
- _adjustFontsizeRecursive(SP_ITEM(o), ex, false);
+ for(auto& o: item->children) {
+ if (SP_IS_ITEM(&o))
+ _adjustFontsizeRecursive(SP_ITEM(&o), ex, false);
}
}
@@ -690,9 +690,9 @@ void SPText::_adjustCoordsRecursive(SPItem *item, Geom::Affine const &m, double
SP_TREF(item)->attributes.transform(m, ex, ex, is_root);
}
- for (SPObject *o = item->children; o != NULL; o = o->next) {
- if (SP_IS_ITEM(o))
- _adjustCoordsRecursive(SP_ITEM(o), m, ex, false);
+ for(auto& o: item->children) {
+ if (SP_IS_ITEM(&o))
+ _adjustCoordsRecursive(SP_ITEM(&o), m, ex, false);
}
}
diff --git a/src/sp-tref.cpp b/src/sp-tref.cpp
index 20bfc8cd0..e25ddb5a4 100644
--- a/src/sp-tref.cpp
+++ b/src/sp-tref.cpp
@@ -501,9 +501,9 @@ sp_tref_convert_to_tspan(SPObject *obj)
////////////////////
else {
GSList *l = NULL;
- for (SPObject *child = obj->firstChild() ; child != NULL ; child = child->getNext() ) {
- sp_object_ref(child, obj);
- l = g_slist_prepend (l, child);
+ for (auto& child: obj->children) {
+ sp_object_ref(&child, obj);
+ l = g_slist_prepend (l, &child);
}
l = g_slist_reverse (l);
while (l) {
diff --git a/src/sp-tspan.cpp b/src/sp-tspan.cpp
index 2b4ecf92b..2e169ad77 100644
--- a/src/sp-tspan.cpp
+++ b/src/sp-tspan.cpp
@@ -94,9 +94,9 @@ void SPTSpan::update(SPCtx *ctx, guint flags) {
}
childflags &= SP_OBJECT_MODIFIED_CASCADE;
- for ( SPObject *ochild = this->firstChild() ; ochild ; ochild = ochild->getNext() ) {
- if ( flags || ( ochild->uflags & SP_OBJECT_MODIFIED_FLAG )) {
- ochild->updateDisplay(ctx, childflags);
+ for (auto& ochild: children) {
+ if ( flags || ( ochild.uflags & SP_OBJECT_MODIFIED_FLAG )) {
+ ochild.updateDisplay(ctx, childflags);
}
}
@@ -126,9 +126,9 @@ void SPTSpan::modified(unsigned int flags) {
flags &= SP_OBJECT_MODIFIED_CASCADE;
- for ( SPObject *ochild = this->firstChild() ; ochild ; ochild = ochild->getNext() ) {
- if (flags || (ochild->mflags & SP_OBJECT_MODIFIED_FLAG)) {
- ochild->emitModified(flags);
+ for (auto& ochild: children) {
+ if (flags || (ochild.mflags & SP_OBJECT_MODIFIED_FLAG)) {
+ ochild.emitModified(flags);
}
}
}
@@ -173,15 +173,15 @@ Inkscape::XML::Node* SPTSpan::write(Inkscape::XML::Document *xml_doc, Inkscape::
if ( flags&SP_OBJECT_WRITE_BUILD ) {
GSList *l = NULL;
- for (SPObject* child = this->firstChild() ; child ; child = child->getNext() ) {
+ for (auto& child: children) {
Inkscape::XML::Node* c_repr=NULL;
- if ( SP_IS_TSPAN(child) || SP_IS_TREF(child) ) {
- c_repr = child->updateRepr(xml_doc, NULL, flags);
- } else if ( SP_IS_TEXTPATH(child) ) {
- //c_repr = child->updateRepr(xml_doc, NULL, flags); // shouldn't happen
- } else if ( SP_IS_STRING(child) ) {
- c_repr = xml_doc->createTextNode(SP_STRING(child)->string.c_str());
+ if ( SP_IS_TSPAN(&child) || SP_IS_TREF(&child) ) {
+ c_repr = child.updateRepr(xml_doc, NULL, flags);
+ } else if ( SP_IS_TEXTPATH(&child) ) {
+ //c_repr = child.updateRepr(xml_doc, NULL, flags); // shouldn't happen
+ } else if ( SP_IS_STRING(&child) ) {
+ c_repr = xml_doc->createTextNode(SP_STRING(&child)->string.c_str());
}
if ( c_repr ) {
@@ -195,13 +195,13 @@ Inkscape::XML::Node* SPTSpan::write(Inkscape::XML::Document *xml_doc, Inkscape::
l = g_slist_remove(l, l->data);
}
} else {
- for (SPObject* child = this->firstChild() ; child ; child = child->getNext() ) {
- if ( SP_IS_TSPAN(child) || SP_IS_TREF(child) ) {
- child->updateRepr(flags);
- } else if ( SP_IS_TEXTPATH(child) ) {
+ for (auto& child: children) {
+ if ( SP_IS_TSPAN(&child) || SP_IS_TREF(&child) ) {
+ child.updateRepr(flags);
+ } else if ( SP_IS_TEXTPATH(&child) ) {
//c_repr = child->updateRepr(xml_doc, NULL, flags); // shouldn't happen
- } else if ( SP_IS_STRING(child) ) {
- child->getRepr()->setContent(SP_STRING(child)->string.c_str());
+ } else if ( SP_IS_STRING(&child) ) {
+ child.getRepr()->setContent(SP_STRING(&child)->string.c_str());
}
}
}
@@ -311,9 +311,9 @@ void SPTextPath::update(SPCtx *ctx, guint flags) {
flags &= SP_OBJECT_MODIFIED_CASCADE;
- for ( SPObject *ochild = this->firstChild() ; ochild ; ochild = ochild->getNext() ) {
- if ( flags || ( ochild->uflags & SP_OBJECT_MODIFIED_FLAG )) {
- ochild->updateDisplay(ctx, flags);
+ for (auto& ochild: children) {
+ if ( flags || ( ochild.uflags & SP_OBJECT_MODIFIED_FLAG )) {
+ ochild.updateDisplay(ctx, flags);
}
}
@@ -365,9 +365,9 @@ void SPTextPath::modified(unsigned int flags) {
flags &= SP_OBJECT_MODIFIED_CASCADE;
- for ( SPObject *ochild = this->firstChild() ; ochild ; ochild = ochild->getNext() ) {
- if (flags || (ochild->mflags & SP_OBJECT_MODIFIED_FLAG)) {
- ochild->emitModified(flags);
+ for (auto& ochild: children) {
+ if (flags || (ochild.mflags & SP_OBJECT_MODIFIED_FLAG)) {
+ ochild.emitModified(flags);
}
}
}
@@ -397,15 +397,15 @@ Inkscape::XML::Node* SPTextPath::write(Inkscape::XML::Document *xml_doc, Inkscap
if ( flags & SP_OBJECT_WRITE_BUILD ) {
GSList *l = NULL;
- for (SPObject* child = this->firstChild() ; child ; child = child->getNext() ) {
+ for (auto& child: children) {
Inkscape::XML::Node* c_repr=NULL;
- if ( SP_IS_TSPAN(child) || SP_IS_TREF(child) ) {
- c_repr = child->updateRepr(xml_doc, NULL, flags);
- } else if ( SP_IS_TEXTPATH(child) ) {
+ if ( SP_IS_TSPAN(&child) || SP_IS_TREF(&child) ) {
+ c_repr = child.updateRepr(xml_doc, NULL, flags);
+ } else if ( SP_IS_TEXTPATH(&child) ) {
//c_repr = child->updateRepr(xml_doc, NULL, flags); // shouldn't happen
- } else if ( SP_IS_STRING(child) ) {
- c_repr = xml_doc->createTextNode(SP_STRING(child)->string.c_str());
+ } else if ( SP_IS_STRING(&child) ) {
+ c_repr = xml_doc->createTextNode(SP_STRING(&child)->string.c_str());
}
if ( c_repr ) {
@@ -419,13 +419,13 @@ Inkscape::XML::Node* SPTextPath::write(Inkscape::XML::Document *xml_doc, Inkscap
l = g_slist_remove(l, l->data);
}
} else {
- for (SPObject* child = this->firstChild() ; child ; child = child->getNext() ) {
- if ( SP_IS_TSPAN(child) || SP_IS_TREF(child) ) {
- child->updateRepr(flags);
- } else if ( SP_IS_TEXTPATH(child) ) {
- //c_repr = child->updateRepr(xml_doc, NULL, flags); // shouldn't happen
- } else if ( SP_IS_STRING(child) ) {
- child->getRepr()->setContent(SP_STRING(child)->string.c_str());
+ for (auto& child: children) {
+ if ( SP_IS_TSPAN(&child) || SP_IS_TREF(&child) ) {
+ child.updateRepr(flags);
+ } else if ( SP_IS_TEXTPATH(&child) ) {
+ //c_repr = child.updateRepr(xml_doc, NULL, flags); // shouldn't happen
+ } else if ( SP_IS_STRING(&child) ) {
+ child.getRepr()->setContent(SP_STRING(&child)->string.c_str());
}
}
}
@@ -464,8 +464,8 @@ void sp_textpath_to_text(SPObject *tp)
// make a list of textpath children
GSList *tp_reprs = NULL;
- for (SPObject *o = tp->firstChild() ; o != NULL; o = o->next) {
- tp_reprs = g_slist_prepend(tp_reprs, o->getRepr());
+ for (auto& o: tp->children) {
+ tp_reprs = g_slist_prepend(tp_reprs, o.getRepr());
}
for ( GSList *i = tp_reprs ; i ; i = i->next ) {
diff --git a/src/sp-use.cpp b/src/sp-use.cpp
index 59064ce21..6ba03dad9 100644
--- a/src/sp-use.cpp
+++ b/src/sp-use.cpp
@@ -435,27 +435,23 @@ void SPUse::move_compensate(Geom::Affine const *mp) {
//BUT move clippaths accordingly.
//if clone has a clippath, move it accordingly
if(clip_ref->getObject()){
- SPObject *clip = clip_ref->getObject()->firstChild() ;
- while(clip){
- SPItem *item = (SPItem*) clip;
+ for(auto& clip: clip_ref->getObject()->children){
+ SPItem *item = (SPItem*) &clip;
if(item){
item->transform *= m;
Geom::Affine identity;
- item->doWriteTransform(clip->getRepr(),item->transform, &identity);
+ item->doWriteTransform(clip.getRepr(),item->transform, &identity);
}
- clip = clip->getNext();
}
}
if(mask_ref->getObject()){
- SPObject *mask = mask_ref->getObject()->firstChild() ;
- while(mask){
- SPItem *item = (SPItem*) mask;
+ for(auto& mask: mask_ref->getObject()->children){
+ SPItem *item = (SPItem*) &mask;
if(item){
item->transform *= m;
Geom::Affine identity;
- item->doWriteTransform(mask->getRepr(),item->transform, &identity);
+ item->doWriteTransform(mask.getRepr(),item->transform, &identity);
}
- mask = mask->getNext();
}
}
return;
@@ -479,27 +475,23 @@ void SPUse::move_compensate(Geom::Affine const *mp) {
//if clone has a clippath, move it accordingly
if(clip_ref->getObject()){
- SPObject *clip = clip_ref->getObject()->firstChild() ;
- while(clip){
- SPItem *item = (SPItem*) clip;
+ for(auto& clip: clip_ref->getObject()->children){
+ SPItem *item = (SPItem*) &clip;
if(item){
item->transform *= clone_move.inverse();
Geom::Affine identity;
- item->doWriteTransform(clip->getRepr(),item->transform, &identity);
+ item->doWriteTransform(clip.getRepr(),item->transform, &identity);
}
- clip = clip->getNext();
}
}
if(mask_ref->getObject()){
- SPObject *mask = mask_ref->getObject()->firstChild() ;
- while(mask){
- SPItem *item = (SPItem*) mask;
+ for(auto& mask: mask_ref->getObject()->children){
+ SPItem *item = (SPItem*) &mask;
if(item){
item->transform *= clone_move.inverse();
Geom::Affine identity;
- item->doWriteTransform(mask->getRepr(),item->transform, &identity);
+ item->doWriteTransform(mask.getRepr(),item->transform, &identity);
}
- mask = mask->getNext();
}
}
diff --git a/src/splivarot.cpp b/src/splivarot.cpp
index c2e5a2f2e..7a5df4c97 100644
--- a/src/splivarot.cpp
+++ b/src/splivarot.cpp
@@ -34,7 +34,6 @@
#include "message-stack.h"
#include "selection.h"
-#include "desktop.h"
#include <glibmm/i18n.h>
#include "xml/repr-sorting.h"
@@ -48,65 +47,96 @@
#include "verbs.h"
#include "2geom/svg-path-parser.h" // to get from SVG on boolean to Geom::Path
+enum BoolOpErrors {
+ DONE,
+ DONE_NO_PATH,
+ DONE_NO_ACTION,
+ ERR_TOO_LESS_PATHS_1,
+ ERR_TOO_LESS_PATHS_2,
+ ERR_NO_PATHS,
+ ERR_Z_ORDER
+};
+
using Inkscape::DocumentUndo;
bool Ancetre(Inkscape::XML::Node *a, Inkscape::XML::Node *who);
-void sp_selected_path_boolop(Inkscape::Selection *selection, SPDesktop *desktop, bool_op bop, const unsigned int verb=SP_VERB_NONE, const Glib::ustring description="");
+void sp_selected_path_boolop_ui(Inkscape::Selection *selection, SPDesktop *desktop, bool_op bop,
+ const unsigned int verb = SP_VERB_NONE, const Glib::ustring description = "");
+BoolOpErrors sp_selected_path_boolop(Inkscape::ObjectSet *set, bool_op bop);
void sp_selected_path_do_offset(SPDesktop *desktop, bool expand, double prefOffset);
void sp_selected_path_create_offset_object(SPDesktop *desktop, int expand, bool updating);
void
sp_selected_path_union(Inkscape::Selection *selection, SPDesktop *desktop)
{
- sp_selected_path_boolop(selection, desktop, bool_op_union, SP_VERB_SELECTION_UNION, _("Union"));
+ sp_selected_path_boolop_ui(selection, desktop, bool_op_union, SP_VERB_SELECTION_UNION, _("Union"));
}
void
-sp_selected_path_union_skip_undo(Inkscape::Selection *selection, SPDesktop *desktop)
+sp_selected_path_union_skip_undo(Inkscape::ObjectSet *set)
{
- sp_selected_path_boolop(selection, desktop, bool_op_union, SP_VERB_NONE, _("Union"));
+ sp_selected_path_boolop(set, bool_op_union);
}
void
sp_selected_path_intersect(Inkscape::Selection *selection, SPDesktop *desktop)
{
- sp_selected_path_boolop(selection, desktop, bool_op_inters, SP_VERB_SELECTION_INTERSECT, _("Intersection"));
+ sp_selected_path_boolop_ui(selection, desktop, bool_op_inters, SP_VERB_SELECTION_INTERSECT, _("Intersection"));
+}
+
+void
+sp_selected_path_intersect_skip_undo(Inkscape::ObjectSet *set)
+{
+ sp_selected_path_boolop(set, bool_op_inters);
}
void
sp_selected_path_diff(Inkscape::Selection *selection, SPDesktop *desktop)
{
- sp_selected_path_boolop(selection, desktop, bool_op_diff, SP_VERB_SELECTION_DIFF, _("Difference"));
+ sp_selected_path_boolop_ui(selection, desktop, bool_op_diff, SP_VERB_SELECTION_DIFF, _("Difference"));
}
void
-sp_selected_path_diff_skip_undo(Inkscape::Selection *selection, SPDesktop *desktop)
+sp_selected_path_diff_skip_undo(Inkscape::ObjectSet *set)
{
- sp_selected_path_boolop(selection, desktop, bool_op_diff, SP_VERB_NONE, _("Difference"));
+ sp_selected_path_boolop(set, bool_op_diff);
}
void
sp_selected_path_symdiff(Inkscape::Selection *selection, SPDesktop *desktop)
{
- sp_selected_path_boolop(selection, desktop, bool_op_symdiff, SP_VERB_SELECTION_SYMDIFF, _("Exclusion"));
+ sp_selected_path_boolop_ui(selection, desktop, bool_op_symdiff, SP_VERB_SELECTION_SYMDIFF, _("Exclusion"));
+}
+
+void
+sp_selected_path_symdiff_skip_undo(Inkscape::ObjectSet *set)
+{
+ sp_selected_path_boolop(set, bool_op_symdiff);
}
+
void
sp_selected_path_cut(Inkscape::Selection *selection, SPDesktop *desktop)
{
- sp_selected_path_boolop(selection, desktop, bool_op_cut, SP_VERB_SELECTION_CUT, _("Division"));
+ sp_selected_path_boolop_ui(selection, desktop, bool_op_cut, SP_VERB_SELECTION_CUT, _("Division"));
}
void
-sp_selected_path_cut_skip_undo(Inkscape::Selection *selection, SPDesktop *desktop)
+sp_selected_path_cut_skip_undo(Inkscape::ObjectSet *set)
{
- sp_selected_path_boolop(selection, desktop, bool_op_cut, SP_VERB_NONE, _("Division"));
+ sp_selected_path_boolop(set, bool_op_cut);
}
void
sp_selected_path_slice(Inkscape::Selection *selection, SPDesktop *desktop)
{
- sp_selected_path_boolop(selection, desktop, bool_op_slice, SP_VERB_SELECTION_SLICE, _("Cut path"));
+ sp_selected_path_boolop_ui(selection, desktop, bool_op_slice, SP_VERB_SELECTION_SLICE, _("Cut path"));
+}
+
+void
+sp_selected_path_slice_skip_undo(Inkscape::ObjectSet *set)
+{
+ sp_selected_path_boolop(set, bool_op_slice);
}
// helper for printing error messages, regardless of whether we have a GUI or not
@@ -322,20 +352,17 @@ Geom::PathVector pathliv_to_pathvector(Path *pathliv){
// boolean operations on the desktop
// take the source paths from the file, do the operation, delete the originals and add the results
-void
-sp_selected_path_boolop(Inkscape::Selection *selection, SPDesktop *desktop, bool_op bop, const unsigned int verb, const Glib::ustring description)
+BoolOpErrors sp_selected_path_boolop(Inkscape::ObjectSet * set, bool_op bop)
{
- SPDocument *doc = selection->layers()->getDocument();
- std::vector<SPItem*> il= selection->itemList();
-
+ SPDocument *doc = set->desktop()->getDocument();
+ std::vector<SPItem*> il(set->items().begin(), set->items().end());
+
// allow union on a single object for the purpose of removing self overlapse (svn log, revision 13334)
- if ( (il.size() < 2) && (bop != bool_op_union)) {
- boolop_display_error_message(desktop, _("Select <b>at least 2 paths</b> to perform a boolean operation."));
- return;
+ if (il.size() < 2 && bop != bool_op_union) {
+ return ERR_TOO_LESS_PATHS_2;
}
- else if ( il.size() < 1 ) {
- boolop_display_error_message(desktop, _("Select <b>at least 1 path</b> to perform a boolean union."));
- return;
+ else if (il.size() < 1) {
+ return ERR_TOO_LESS_PATHS_1;
}
g_assert(!il.empty());
@@ -351,8 +378,7 @@ sp_selected_path_boolop(Inkscape::Selection *selection, SPDesktop *desktop, bool
Inkscape::XML::Node *b = il.back()->getRepr();
if (a == NULL || b == NULL) {
- boolop_display_error_message(desktop, _("Unable to determine the <b>z-order</b> of the objects selected for difference, XOR, division, or path cut."));
- return;
+ return ERR_Z_ORDER;
}
if (Ancetre(a, b)) {
@@ -366,8 +392,7 @@ sp_selected_path_boolop(Inkscape::Selection *selection, SPDesktop *desktop, bool
// find their lowest common ancestor
Inkscape::XML::Node *parent = LCA(a, b);
if (parent == NULL) {
- boolop_display_error_message(desktop, _("Unable to determine the <b>z-order</b> of the objects selected for difference, XOR, division, or path cut."));
- return;
+ return ERR_Z_ORDER;
}
// find the children of the LCA that lead from it to the a and b
@@ -396,8 +421,7 @@ sp_selected_path_boolop(Inkscape::Selection *selection, SPDesktop *desktop, bool
SPItem *item = *l;
if (!SP_IS_SHAPE(item) && !SP_IS_TEXT(item) && !SP_IS_FLOWTEXT(item))
{
- boolop_display_error_message(desktop, _("One of the objects is <b>not a path</b>, cannot perform boolean operation."));
- return;
+ return ERR_NO_PATHS;
}
}
@@ -430,7 +454,7 @@ sp_selected_path_boolop(Inkscape::Selection *selection, SPDesktop *desktop, bool
if (originaux[curOrig] == NULL || originaux[curOrig]->descr_cmd.size() <= 1)
{
for (int i = curOrig; i >= 0; i--) delete originaux[i];
- return;
+ return DONE_NO_ACTION;
}
curOrig++;
}
@@ -491,18 +515,18 @@ sp_selected_path_boolop(Inkscape::Selection *selection, SPDesktop *desktop, bool
bool zeroA = theShapeA->numberOfEdges() == 0;
bool zeroB = theShapeB->numberOfEdges() == 0;
if (zeroA || zeroB) {
- // We might need to do a swap. Apply the above rules depending on operation type.
- bool resultIsB = ((bop == bool_op_union || bop == bool_op_symdiff) && zeroA)
- || ((bop == bool_op_inters) && zeroB)
- || (bop == bool_op_diff);
+ // We might need to do a swap. Apply the above rules depending on operation type.
+ bool resultIsB = ((bop == bool_op_union || bop == bool_op_symdiff) && zeroA)
+ || ((bop == bool_op_inters) && zeroB)
+ || (bop == bool_op_diff);
if (resultIsB) {
- // Swap A and B to use B as the result
+ // Swap A and B to use B as the result
Shape *swap = theShapeB;
theShapeB = theShapeA;
theShapeA = swap;
}
} else {
- // Just do the Boolean operation as usual
+ // Just do the Boolean operation as usual
// les elements arrivent en ordre inverse dans la liste
theShape->Booleen(theShapeB, theShapeA, bop);
Shape *swap = theShape;
@@ -663,24 +687,23 @@ sp_selected_path_boolop(Inkscape::Selection *selection, SPDesktop *desktop, bool
for (std::vector<SPItem*>::const_iterator l = il.begin(); l != il.end(); l++){
(*l)->deleteObject();
}
- DocumentUndo::done(doc, SP_VERB_NONE, description);
- selection->clear();
+ set->clear();
delete res;
- return;
+ return DONE_NO_PATH;
}
// get the source path object
SPObject *source;
if ( bop == bool_op_diff || bop == bool_op_cut || bop == bool_op_slice ) {
if (reverseOrderForOp) {
- source = il[0];
+ source = il[0];
} else {
- source = il.back();
+ source = il.back();
}
} else {
// find out the bottom object
- std::vector<Inkscape::XML::Node*> sorted(selection->reprList());
+ std::vector<Inkscape::XML::Node*> sorted(set->xmlNodes().begin(), set->xmlNodes().end());
sort(sorted.begin(),sorted.end(),sp_repr_compare_position_bool);
@@ -708,7 +731,7 @@ sp_selected_path_boolop(Inkscape::Selection *selection, SPDesktop *desktop, bool
gchar *title = source->title();
gchar *desc = source->desc();
// remove source paths
- selection->clear();
+ set->clear();
for (std::vector<SPItem*>::const_iterator l = il.begin(); l != il.end(); l++){
// if this is the bottommost object,
if (!strcmp(reinterpret_cast<SPObject *>(*l)->getRepr()->attribute("id"), id)) {
@@ -787,7 +810,7 @@ sp_selected_path_boolop(Inkscape::Selection *selection, SPDesktop *desktop, bool
// move to the saved position
repr->setPosition(pos > 0 ? pos : 0);
- selection->add(repr);
+ set->add(doc->getObjectByRepr(repr));
Inkscape::GC::release(repr);
delete resPath[i];
@@ -815,14 +838,14 @@ sp_selected_path_boolop(Inkscape::Selection *selection, SPDesktop *desktop, bool
repr->setAttribute("id", id);
parent->appendChild(repr);
if (title) {
- doc->getObjectByRepr(repr)->setTitle(title);
- }
+ doc->getObjectByRepr(repr)->setTitle(title);
+ }
if (desc) {
- doc->getObjectByRepr(repr)->setDesc(desc);
+ doc->getObjectByRepr(repr)->setDesc(desc);
}
- repr->setPosition(pos > 0 ? pos : 0);
+ repr->setPosition(pos > 0 ? pos : 0);
- selection->add(repr);
+ set->add(doc->getObjectByRepr(repr));
Inkscape::GC::release(repr);
}
@@ -830,11 +853,39 @@ sp_selected_path_boolop(Inkscape::Selection *selection, SPDesktop *desktop, bool
if (title) g_free(title);
if (desc) g_free(desc);
- if (verb != SP_VERB_NONE) {
- DocumentUndo::done(doc, verb, description);
- }
-
delete res;
+
+ return DONE;
+}
+
+void sp_selected_path_boolop_ui(Inkscape::Selection *selection, SPDesktop *desktop, bool_op bop, const unsigned int verb,
+ const Glib::ustring description)
+{
+ SPDocument *doc = selection->desktop()->getDocument();
+ BoolOpErrors returnCode = sp_selected_path_boolop(selection, bop);
+ switch(returnCode) {
+ case ERR_TOO_LESS_PATHS_1:
+ boolop_display_error_message(desktop, _("Select <b>at least 1 path</b> to perform a boolean union."));
+ return;
+ case ERR_TOO_LESS_PATHS_2:
+ boolop_display_error_message(desktop, _("Select <b>at least 2 paths</b> to perform a boolean operation."));
+ return;
+ case ERR_NO_PATHS:
+ boolop_display_error_message(desktop, _("One of the objects is <b>not a path</b>, cannot perform boolean operation."));
+ return;
+ case ERR_Z_ORDER:
+ boolop_display_error_message(desktop, _("Unable to determine the <b>z-order</b> of the objects selected for difference, XOR, division, or path cut."));
+ return;
+ case DONE_NO_PATH:
+ DocumentUndo::done(doc, SP_VERB_NONE, description);
+ return;
+ case DONE:
+ DocumentUndo::done(doc, verb, description);
+ return;
+ case DONE_NO_ACTION:
+ default:
+ return;
+ }
}
static
@@ -880,9 +931,9 @@ void item_outline_add_marker_child( SPItem const *item, Geom::Affine marker_tran
// note: a marker child item can be an item group!
if (SP_IS_GROUP(item)) {
// recurse through all childs:
- for (SPObject const *o = item->firstChild() ; o ; o = o->getNext() ) {
- if ( SP_IS_ITEM(o) ) {
- item_outline_add_marker_child(SP_ITEM(o), tr, pathv_in);
+ for (auto& o: item->children) {
+ if ( SP_IS_ITEM(&o) ) {
+ item_outline_add_marker_child(SP_ITEM(&o), tr, pathv_in);
}
}
} else {
@@ -1150,6 +1201,7 @@ sp_item_path_outline(SPItem *item, SPDesktop *desktop, bool legacy)
if (lpeitem) {
lpeitem->removeAllPathEffects(true);
}
+
SPGroup *group = dynamic_cast<SPGroup *>(item);
if (group) {
if (legacy) {
@@ -1638,7 +1690,7 @@ sp_selected_path_outline(SPDesktop *desktop, bool legacy)
bool scale_stroke = prefs->getBool("/options/transform/stroke", true);
prefs->setBool("/options/transform/stroke", true);
bool did = false;
- std::vector<SPItem*> il(selection->itemList());
+ std::vector<SPItem*> il(selection->items().begin(), selection->items().end());
for (std::vector<SPItem*>::const_iterator l = il.begin(); l != il.end(); l++){
SPItem *item = *l;
did = sp_item_path_outline(item, desktop, legacy);
@@ -1910,7 +1962,7 @@ sp_selected_path_do_offset(SPDesktop *desktop, bool expand, double prefOffset)
}
bool did = false;
- std::vector<SPItem*> il(selection->itemList());
+ std::vector<SPItem*> il(selection->items().begin(), selection->items().end());
for (std::vector<SPItem*>::const_iterator l = il.begin(); l != il.end(); l++){
SPItem *item = *l;
SPCurve *curve = NULL;
@@ -2335,7 +2387,7 @@ sp_selected_path_simplify_selection(SPDesktop *desktop, float threshold, bool ju
return;
}
- std::vector<SPItem*> items(selection->itemList());
+ std::vector<SPItem*> items(selection->items().begin(), selection->items().end());
bool didSomething = sp_selected_path_simplify_items(desktop, selection,
items, threshold,
diff --git a/src/splivarot.h b/src/splivarot.h
index 665946f71..6adc05946 100644
--- a/src/splivarot.h
+++ b/src/splivarot.h
@@ -17,6 +17,7 @@ class SPItem;
namespace Inkscape {
class Selection;
+ class ObjectSet;
}
// boolean operations
@@ -27,14 +28,17 @@ namespace Inkscape {
// command-line mode, i.e. without a desktop. If a desktop is not
// provided (desktop == NULL), error messages will be shown on stderr.
void sp_selected_path_union (Inkscape::Selection *selection, SPDesktop *desktop);
-void sp_selected_path_union_skip_undo (Inkscape::Selection *selection, SPDesktop *desktop);
+void sp_selected_path_union_skip_undo (Inkscape::ObjectSet *set);
void sp_selected_path_intersect (Inkscape::Selection *selection, SPDesktop *desktop);
+void sp_selected_path_intersect_skip_undo (Inkscape::ObjectSet *set);
void sp_selected_path_diff (Inkscape::Selection *selection, SPDesktop *desktop);
-void sp_selected_path_diff_skip_undo (Inkscape::Selection *selection, SPDesktop *desktop);
+void sp_selected_path_diff_skip_undo (Inkscape::ObjectSet *set);
void sp_selected_path_symdiff (Inkscape::Selection *selection, SPDesktop *desktop);
+void sp_selected_path_symdiff_skip_undo (Inkscape::ObjectSet *set);
void sp_selected_path_cut (Inkscape::Selection *selection, SPDesktop *desktop);
-void sp_selected_path_cut_skip_undo (Inkscape::Selection *selection, SPDesktop *desktop);
+void sp_selected_path_cut_skip_undo (Inkscape::ObjectSet *set);
void sp_selected_path_slice (Inkscape::Selection *selection, SPDesktop *desktop);
+void sp_selected_path_slice_skip_undo (Inkscape::ObjectSet *set);
// offset/inset of a curve
// takes the fill-rule in consideration
diff --git a/src/svg-view-widget.cpp b/src/svg-view-widget.cpp
index b1fddd7e6..7c72686b4 100644
--- a/src/svg-view-widget.cpp
+++ b/src/svg-view-widget.cpp
@@ -27,7 +27,6 @@ static void sp_svg_view_widget_dispose(GObject *object);
static void sp_svg_view_widget_size_allocate (GtkWidget *widget, GtkAllocation *allocation);
static void sp_svg_view_widget_size_request (GtkWidget *widget, GtkRequisition *req);
-#if GTK_CHECK_VERSION(3,0,0)
static void sp_svg_view_widget_get_preferred_width(GtkWidget *widget,
gint *minimal_width,
gint *natural_width);
@@ -35,7 +34,6 @@ static void sp_svg_view_widget_get_preferred_width(GtkWidget *widget,
static void sp_svg_view_widget_get_preferred_height(GtkWidget *widget,
gint *minimal_height,
gint *natural_height);
-#endif
static void sp_svg_view_widget_view_resized (SPViewWidget *vw, Inkscape::UI::View::View *view, gdouble width, gdouble height);
@@ -53,12 +51,8 @@ static void sp_svg_view_widget_class_init(SPSVGSPViewWidgetClass *klass)
object_class->dispose = sp_svg_view_widget_dispose;
widget_class->size_allocate = sp_svg_view_widget_size_allocate;
-#if GTK_CHECK_VERSION(3,0,0)
widget_class->get_preferred_width = sp_svg_view_widget_get_preferred_width;
widget_class->get_preferred_height = sp_svg_view_widget_get_preferred_height;
-#else
- widget_class->size_request = sp_svg_view_widget_size_request;
-#endif
vw_class->view_resized = sp_svg_view_widget_view_resized;
}
@@ -83,16 +77,10 @@ static void sp_svg_view_widget_init(SPSVGSPViewWidget *vw)
gtk_widget_show (vw->sw);
/* Canvas */
-#if !GTK_CHECK_VERSION(3,0,0)
- GdkColormap *cmap = gdk_colormap_get_system();
- gtk_widget_push_colormap(cmap);
-#endif
-
vw->canvas = SPCanvas::createAA();
-#if GTK_CHECK_VERSION(3,0,0)
- GtkCssProvider *css_provider = gtk_css_provider_new();
- GtkStyleContext *style_context = gtk_widget_get_style_context(GTK_WIDGET(vw->canvas));
+ auto css_provider = gtk_css_provider_new();
+ auto style_context = gtk_widget_get_style_context(GTK_WIDGET(vw->canvas));
gtk_css_provider_load_from_data(css_provider,
"SPCanvas {\n"
@@ -103,19 +91,8 @@ static void sp_svg_view_widget_init(SPSVGSPViewWidget *vw)
gtk_style_context_add_provider(style_context,
GTK_STYLE_PROVIDER(css_provider),
GTK_STYLE_PROVIDER_PRIORITY_USER);
-#else
- gtk_widget_pop_colormap ();
- GtkStyle *style = gtk_style_copy (gtk_widget_get_style (vw->canvas));
- style->bg[GTK_STATE_NORMAL] = style->white;
- gtk_widget_set_style (vw->canvas, style);
-#endif
-
-#if GTK_CHECK_VERSION(3,0,0)
- gtk_container_add (GTK_CONTAINER (vw->sw), vw->canvas);
-#else
- gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (vw->sw), vw->canvas);
-#endif
+ gtk_container_add (GTK_CONTAINER (vw->sw), vw->canvas);
gtk_widget_show (vw->canvas);
/* View */
@@ -146,7 +123,6 @@ static void sp_svg_view_widget_size_request(GtkWidget *widget, GtkRequisition *r
SPSVGSPViewWidget *vw = SP_SVG_VIEW_WIDGET (widget);
Inkscape::UI::View::View *v = SP_VIEW_WIDGET_VIEW (widget);
-#if GTK_CHECK_VERSION(3,0,0)
if (GTK_WIDGET_CLASS(sp_svg_view_widget_parent_class)->get_preferred_width &&
GTK_WIDGET_CLASS(sp_svg_view_widget_parent_class)->get_preferred_height) {
gint width_min, height_min, width_nat, height_nat;
@@ -156,11 +132,6 @@ static void sp_svg_view_widget_size_request(GtkWidget *widget, GtkRequisition *r
req->width=width_min;
req->height=height_min;
}
-#else
- if (GTK_WIDGET_CLASS(sp_svg_view_widget_parent_class)->size_request) {
- GTK_WIDGET_CLASS(sp_svg_view_widget_parent_class)->size_request(widget, req);
- }
-#endif
if (v->doc()) {
SPSVGView *svgv;
@@ -189,7 +160,6 @@ static void sp_svg_view_widget_size_request(GtkWidget *widget, GtkRequisition *r
}
}
-#if GTK_CHECK_VERSION(3,0,0)
static void sp_svg_view_widget_get_preferred_width(GtkWidget *widget, gint *minimal_width, gint *natural_width)
{
GtkRequisition requisition;
@@ -203,7 +173,6 @@ static void sp_svg_view_widget_get_preferred_height(GtkWidget *widget, gint *min
sp_svg_view_widget_size_request(widget, &requisition);
*minimal_height = *natural_height = requisition.height;
}
-#endif
/**
* Callback connected with size_allocate signal.
diff --git a/src/svg-view.cpp b/src/svg-view.cpp
index 53fa8633f..00ea0d381 100644
--- a/src/svg-view.cpp
+++ b/src/svg-view.cpp
@@ -107,11 +107,7 @@ void SPSVGView::mouseover()
GdkCursor *cursor = gdk_cursor_new_for_display(display, GDK_HAND2);
GdkWindow *window = gtk_widget_get_window (GTK_WIDGET(SP_CANVAS_ITEM(_drawing)->canvas));
gdk_window_set_cursor(window, cursor);
-#if GTK_CHECK_VERSION(3,0,0)
g_object_unref(cursor);
-#else
- gdk_cursor_unref(cursor);
-#endif
}
void SPSVGView::mouseout()
diff --git a/src/svg/Makefile_insert b/src/svg/Makefile_insert
deleted file mode 100644
index 4f82bdd76..000000000
--- a/src/svg/Makefile_insert
+++ /dev/null
@@ -1,32 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-ink_common_sources += \
- svg/css-ostringstream.h \
- svg/css-ostringstream.cpp \
- svg/path-string.h \
- svg/path-string.cpp \
- svg/stringstream.h \
- svg/stringstream.cpp \
- svg/strip-trailing-zeros.h \
- svg/strip-trailing-zeros.cpp \
- svg/svg-affine.cpp \
- svg/svg-color.cpp \
- svg/svg-color.h \
- svg/svg-icc-color.h \
- svg/svg-angle.cpp \
- svg/svg-angle.h \
- svg/svg-length.cpp \
- svg/svg-length.h \
- svg/svg-path.cpp \
- svg/svg.h
-
-# ######################
-# ### CxxTest stuff ####
-# ######################
-CXXTEST_TESTSUITES += \
- $(srcdir)/svg/css-ostringstream-test.h \
- $(srcdir)/svg/stringstream-test.h \
- $(srcdir)/svg/svg-affine-test.h \
- $(srcdir)/svg/svg-color-test.h \
- $(srcdir)/svg/svg-length-test.h \
- $(srcdir)/svg/svg-path-geom-test.h
diff --git a/src/text-chemistry.cpp b/src/text-chemistry.cpp
index ddadf8275..2b731c75d 100644
--- a/src/text-chemistry.cpp
+++ b/src/text-chemistry.cpp
@@ -42,8 +42,8 @@ using Inkscape::DocumentUndo;
static SPItem *
flowtext_in_selection(Inkscape::Selection *selection)
{
- std::vector<SPItem*> items = selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end();++i){
+ auto items = selection->items();
+ for(auto i=items.begin();i!=items.end();++i){
if (SP_IS_FLOWTEXT(*i))
return *i;
}
@@ -53,8 +53,8 @@ flowtext_in_selection(Inkscape::Selection *selection)
static SPItem *
text_or_flowtext_in_selection(Inkscape::Selection *selection)
{
- std::vector<SPItem*> items = selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end();++i){
+ auto items = selection->items();
+ for(auto i=items.begin();i!=items.end();++i){
if (SP_IS_TEXT(*i) || SP_IS_FLOWTEXT(*i))
return *i;
}
@@ -64,8 +64,8 @@ text_or_flowtext_in_selection(Inkscape::Selection *selection)
static SPItem *
shape_in_selection(Inkscape::Selection *selection)
{
- std::vector<SPItem*> items = selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end();++i){
+ auto items = selection->items();
+ for(auto i=items.begin();i!=items.end();++i){
if (SP_IS_SHAPE(*i))
return *i;
}
@@ -86,7 +86,7 @@ text_put_on_path()
Inkscape::XML::Document *xml_doc = desktop->doc()->getReprDoc();
- if (!text || !shape || selection->itemList().size() != 2) {
+ if (!text || !shape || boost::distance(selection->items()) != 2) {
desktop->getMessageStack()->flash(Inkscape::WARNING_MESSAGE, _("Select <b>a text and a path</b> to put text on path."));
return;
}
@@ -141,8 +141,8 @@ text_put_on_path()
// make a list of text children
GSList *text_reprs = NULL;
- for (SPObject *o = text->children; o != NULL; o = o->next) {
- text_reprs = g_slist_prepend(text_reprs, o->getRepr());
+ for(auto& o: text->children) {
+ text_reprs = g_slist_prepend(text_reprs, o.getRepr());
}
// create textPath and put it into the text
@@ -195,8 +195,8 @@ text_remove_from_path()
}
bool did = false;
- std::vector<SPItem*> items(selection->itemList());
- for(std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end();++i){
+ auto items = selection->items();
+ for(auto i=items.begin();i!=items.end();++i){
SPObject *obj = *i;
if (SP_IS_TEXT_TEXTPATH(obj)) {
@@ -213,7 +213,8 @@ text_remove_from_path()
} else {
DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_TEXT,
_("Remove text from path"));
- selection->setList(selection->itemList()); // reselect to update statusbar description
+ std::vector<SPItem *> vec(selection->items().begin(), selection->items().end());
+ selection->setList(vec); // reselect to update statusbar description
}
}
@@ -238,9 +239,9 @@ text_remove_all_kerns_recursively(SPObject *o)
g_strfreev(xa_comma);
}
- for (SPObject *i = o->firstChild(); i != NULL; i = i->getNext()) {
- text_remove_all_kerns_recursively(i);
- i->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_TEXT_LAYOUT_MODIFIED_FLAG);
+ for (auto& i: o->children) {
+ text_remove_all_kerns_recursively(&i);
+ i.requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_TEXT_LAYOUT_MODIFIED_FLAG);
}
}
@@ -259,8 +260,8 @@ text_remove_all_kerns()
bool did = false;
- std::vector<SPItem*> items = selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end();++i){
+ auto items = selection->items();
+ for(auto i=items.begin();i!=items.end();++i){
SPObject *obj = *i;
if (!SP_IS_TEXT(obj) && !SP_IS_TSPAN(obj) && !SP_IS_FLOWTEXT(obj)) {
@@ -295,7 +296,7 @@ text_flow_into_shape()
SPItem *text = text_or_flowtext_in_selection(selection);
SPItem *shape = shape_in_selection(selection);
- if (!text || !shape || selection->itemList().size() < 2) {
+ if (!text || !shape || boost::distance(selection->items()) < 2) {
desktop->getMessageStack()->flash(Inkscape::WARNING_MESSAGE, _("Select <b>a text</b> and one or more <b>paths or shapes</b> to flow text into frame."));
return;
}
@@ -319,8 +320,8 @@ text_flow_into_shape()
g_return_if_fail(SP_IS_FLOWREGION(object));
/* Add clones */
- std::vector<SPItem*> items = selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end();++i){
+ auto items = selection->items();
+ for(auto i=items.begin();i!=items.end();++i){
SPItem *item = *i;
if (SP_IS_SHAPE(item)){
Inkscape::XML::Node *clone = xml_doc->createElement("svg:use");
@@ -351,9 +352,9 @@ text_flow_into_shape()
Inkscape::GC::release(text_repr);
} else { // reflow an already flowed text, preserving paras
- for (SPObject *o = text->children; o != NULL; o = o->next) {
- if (SP_IS_FLOWPARA(o)) {
- Inkscape::XML::Node *para_repr = o->getRepr()->duplicate(xml_doc);
+ for(auto& o: text->children) {
+ if (SP_IS_FLOWPARA(&o)) {
+ Inkscape::XML::Node *para_repr = o.getRepr()->duplicate(xml_doc);
root_repr->appendChild(para_repr);
object = doc->getObjectByRepr(para_repr);
g_return_if_fail(SP_IS_FLOWPARA(object));
@@ -386,7 +387,7 @@ text_unflow ()
Inkscape::Selection *selection = desktop->getSelection();
- if (!flowtext_in_selection(selection) || selection->itemList().size() < 1) {
+ if (!flowtext_in_selection(selection) || boost::distance(selection->items()) < 1) {
desktop->getMessageStack()->flash(Inkscape::WARNING_MESSAGE, _("Select <b>a flowed text</b> to unflow it."));
return;
}
@@ -394,8 +395,8 @@ text_unflow ()
std::vector<SPItem*> new_objs;
GSList *old_objs = NULL;
- std::vector<SPItem*> items = selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end();++i){
+ auto items = selection->items();
+ for(auto i=items.begin();i!=items.end();++i){
if (!SP_IS_FLOWTEXT(*i)) {
continue;
@@ -479,7 +480,7 @@ flowtext_to_text()
bool did = false;
std::vector<Inkscape::XML::Node*> reprs;
- std::vector<SPItem*> items(selection->itemList());
+ std::vector<SPItem*> items(selection->items().begin(), selection->items().end());
for(std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end();++i){
SPItem *item = *i;
diff --git a/src/text-editing.cpp b/src/text-editing.cpp
index 6669abcef..6809a4bc5 100644
--- a/src/text-editing.cpp
+++ b/src/text-editing.cpp
@@ -89,8 +89,8 @@ bool sp_te_input_is_empty(SPObject const *item)
if (SP_IS_STRING(item)) {
empty = SP_STRING(item)->string.empty();
} else {
- for (SPObject const *child = item->firstChild() ; child ; child = child->getNext()) {
- if (!sp_te_input_is_empty(child)) {
+ for (auto& child: item->children) {
+ if (!sp_te_input_is_empty(&child)) {
empty = false;
break;
}
@@ -235,11 +235,11 @@ unsigned sp_text_get_length(SPObject const *item)
length++;
}
- for (SPObject const *child = item->firstChild() ; child ; child = child->getNext()) {
- if (SP_IS_STRING(child)) {
- length += SP_STRING(child)->string.length();
+ for (auto& child: item->children) {
+ if (SP_IS_STRING(&child)) {
+ length += SP_STRING(&child)->string.length();
} else {
- length += sp_text_get_length(child);
+ length += sp_text_get_length(&child);
}
}
}
@@ -265,22 +265,22 @@ unsigned sp_text_get_length_upto(SPObject const *item, SPObject const *upto)
}
// Count the length of the children
- for (SPObject const *child = item->firstChild() ; child ; child = child->getNext()) {
- if (upto && child == upto) {
+ for (auto& child: item->children) {
+ if (upto && &child == upto) {
// hit upto, return immediately
return length;
}
- if (SP_IS_STRING(child)) {
- length += SP_STRING(child)->string.length();
+ if (SP_IS_STRING(&child)) {
+ length += SP_STRING(&child)->string.length();
}
else {
- if (upto && child->isAncestorOf(upto)) {
+ if (upto && child.isAncestorOf(upto)) {
// upto is below us, recurse and break loop
- length += sp_text_get_length_upto(child, upto);
+ length += sp_text_get_length_upto(&child, upto);
return length;
} else {
// recurse and go to the next sibling
- length += sp_text_get_length_upto(child, upto);
+ length += sp_text_get_length_upto(&child, upto);
}
}
}
@@ -321,8 +321,11 @@ to \a item at the same level. */
static unsigned sum_sibling_text_lengths_before(SPObject const *item)
{
unsigned char_index = 0;
- for (SPObject *sibling = item->parent->firstChild() ; sibling && sibling != item ; sibling = sibling->getNext()) {
- char_index += sp_text_get_length(sibling);
+ for (auto& sibling: item->parent->children) {
+ if (&sibling == item) {
+ break;
+ }
+ char_index += sp_text_get_length(&sibling);
}
return char_index;
}
@@ -855,11 +858,11 @@ static void sp_te_get_ustring_multiline(SPObject const *root, Glib::ustring *str
if (*pending_line_break) {
*string += '\n';
}
- for (SPObject const *child = root->firstChild() ; child ; child = child->getNext()) {
- if (SP_IS_STRING(child)) {
- *string += SP_STRING(child)->string;
+ for (auto& child: root->children) {
+ if (SP_IS_STRING(&child)) {
+ *string += SP_STRING(&child)->string;
} else {
- sp_te_get_ustring_multiline(child, string, pending_line_break);
+ sp_te_get_ustring_multiline(&child, string, pending_line_break);
}
}
if (!SP_IS_TEXT(root) && !SP_IS_TEXTPATH(root) && is_line_break_object(root)) {
@@ -939,13 +942,10 @@ sp_te_set_repr_text_multiline(SPItem *text, gchar const *str)
gchar *content = g_strdup (str);
repr->setContent("");
- SPObject *child = object->firstChild();
- while (child) {
- SPObject *next = child->getNext();
- if (!SP_IS_FLOWREGION(child) && !SP_IS_FLOWREGIONEXCLUDE(child)) {
- repr->removeChild(child->getRepr());
+ for (auto& child: object->children) {
+ if (!SP_IS_FLOWREGION(&child) && !SP_IS_FLOWREGIONEXCLUDE(&child)) {
+ repr->removeChild(child.getRepr());
}
- child = next;
}
gchar *p = content;
@@ -1403,17 +1403,17 @@ static void apply_css_recursive(SPObject *o, SPCSSAttr const *css)
{
sp_repr_css_change(o->getRepr(), const_cast<SPCSSAttr*>(css), "style");
- for (SPObject *child = o->firstChild() ; child ; child = child->getNext() ) {
+ for (auto& child: o->children) {
if (sp_repr_css_property(const_cast<SPCSSAttr*>(css), "opacity", NULL) != NULL) {
// Unset properties which are accumulating and thus should not be set recursively.
// For example, setting opacity 0.5 on a group recursively would result in the visible opacity of 0.25 for an item in the group.
SPCSSAttr *css_recurse = sp_repr_css_attr_new();
sp_repr_css_merge(css_recurse, const_cast<SPCSSAttr*>(css));
sp_repr_css_set_property(css_recurse, "opacity", NULL);
- apply_css_recursive(child, css_recurse);
+ apply_css_recursive(&child, css_recurse);
sp_repr_css_attr_unref(css_recurse);
} else {
- apply_css_recursive(child, const_cast<SPCSSAttr*>(css));
+ apply_css_recursive(&child, const_cast<SPCSSAttr*>(css));
}
}
}
@@ -1427,7 +1427,7 @@ static void recursively_apply_style(SPObject *common_ancestor, SPCSSAttr const *
{
bool passed_start = start_item == NULL ? true : false;
Inkscape::XML::Document *xml_doc = common_ancestor->document->getReprDoc();
-
+
for (SPObject *child = common_ancestor->firstChild() ; child ; child = child->getNext()) {
if (start_item == child) {
passed_start = true;
@@ -2071,8 +2071,8 @@ bool has_visible_text(SPObject *obj)
if (SP_IS_STRING(obj) && !SP_STRING(obj)->string.empty()) {
hasVisible = true; // maybe we should also check that it's not all whitespace?
} else {
- for (SPObject const *child = obj->firstChild() ; child ; child = child->getNext()) {
- if (has_visible_text(const_cast<SPObject *>(child))) {
+ for (auto& child: obj->children) {
+ if (has_visible_text(const_cast<SPObject *>(&child))) {
hasVisible = true;
break;
}
diff --git a/src/trace/Makefile_insert b/src/trace/Makefile_insert
deleted file mode 100644
index 27353df15..000000000
--- a/src/trace/Makefile_insert
+++ /dev/null
@@ -1,23 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-if HAVE_POTRACE
-
-ink_common_sources += \
- trace/pool.h \
- trace/trace.h \
- trace/trace.cpp \
- trace/imagemap-gdk.cpp \
- trace/imagemap-gdk.h \
- trace/imagemap.cpp \
- trace/imagemap.h \
- trace/quantize.h \
- trace/quantize.cpp \
- trace/filterset.h \
- trace/filterset.cpp \
- trace/siox.h \
- trace/siox.cpp \
- trace/potrace/bitmap.h \
- trace/potrace/inkscape-potrace.cpp \
- trace/potrace/inkscape-potrace.h
-
-endif
diff --git a/src/trace/trace.cpp b/src/trace/trace.cpp
index 379682668..52e99886a 100644
--- a/src/trace/trace.cpp
+++ b/src/trace/trace.cpp
@@ -65,7 +65,7 @@ SPImage *Tracer::getSelectedSPImage()
if (sioxEnabled)
{
SPImage *img = NULL;
- std::vector<SPItem*> const list = sel->itemList();
+ auto list = sel->items();
std::vector<SPItem *> items;
sioxShapes.clear();
@@ -74,7 +74,7 @@ SPImage *Tracer::getSelectedSPImage()
them as bottom-to-top so that we can discover the image and any
SPItems above it
*/
- for (std::vector<SPItem*>::const_iterator i=list.begin() ; list.end()!=i ; ++i)
+ for (auto i=list.begin() ; list.end()!=i ; ++i)
{
if (!SP_IS_ITEM(*i))
{
diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt
index 4d838eb7f..cc7a6df2e 100644
--- a/src/ui/CMakeLists.txt
+++ b/src/ui/CMakeLists.txt
@@ -132,8 +132,6 @@ set(ui_SRC
widget/filter-effect-chooser.cpp
widget/font-variants.cpp
widget/frame.cpp
- widget/gimpcolorwheel.c
- widget/gimpspinscale.c
widget/highlight-picker.cpp
widget/imageicon.cpp
widget/imagetoggler.cpp
@@ -318,8 +316,6 @@ set(ui_SRC
widget/filter-effect-chooser.h
widget/font-variants.h
widget/frame.h
- widget/gimpspinscale.h
- widget/gimpcolorwheel.h
widget/highlight-picker.h
widget/insertordericon.h
widget/imageicon.h
diff --git a/src/ui/Makefile_insert b/src/ui/Makefile_insert
deleted file mode 100644
index bbfdb532c..000000000
--- a/src/ui/Makefile_insert
+++ /dev/null
@@ -1,31 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-ink_common_sources += \
- ui/clipboard.cpp \
- ui/clipboard.h \
- ui/control-manager.cpp \
- ui/control-manager.h \
- ui/control-types.h \
- ui/dialog-events.cpp \
- ui/dialog-events.h \
- ui/draw-anchor.cpp \
- ui/draw-anchor.h \
- ui/icon-names.h \
- ui/interface.cpp \
- ui/interface.h \
- ui/object-edit.cpp \
- ui/object-edit.h \
- ui/previewable.h \
- ui/previewfillable.h \
- ui/previewholder.cpp \
- ui/previewholder.h \
- ui/selected-color.h \
- ui/selected-color.cpp \
- ui/shape-editor.cpp \
- ui/shape-editor.h \
- ui/tool-factory.cpp \
- ui/tool-factory.h \
- ui/tools-switch.cpp \
- ui/tools-switch.h \
- ui/uxmanager.cpp \
- ui/uxmanager.h
diff --git a/src/ui/cache/Makefile_insert b/src/ui/cache/Makefile_insert
deleted file mode 100644
index c648777f8..000000000
--- a/src/ui/cache/Makefile_insert
+++ /dev/null
@@ -1,6 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-ink_common_sources += \
- ui/cache/svg_preview_cache.h \
- ui/cache/svg_preview_cache.cpp
-
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp
index 09ba9a1a9..66b13ed9d 100644
--- a/src/ui/clipboard.cpp
+++ b/src/ui/clipboard.cpp
@@ -510,8 +510,8 @@ bool ClipboardManagerImpl::pasteSize(SPDesktop *desktop, bool separately, bool a
// resize each object in the selection
if (separately) {
- std::vector<SPItem*> itemlist=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
+ auto itemlist= selection->items();
+ for(auto i=itemlist.begin();i!=itemlist.end();++i){
SPItem *item = *i;
if (item) {
Geom::OptRect obj_size = item->desktopVisualBounds();
@@ -527,8 +527,8 @@ bool ClipboardManagerImpl::pasteSize(SPDesktop *desktop, bool separately, bool a
else {
Geom::OptRect sel_size = selection->visualBounds();
if ( sel_size ) {
- sp_selection_scale_relative(selection, sel_size->midpoint(),
- _getScale(desktop, min, max, *sel_size, apply_x, apply_y));
+ sp_object_set_scale_relative(selection, sel_size->midpoint(),
+ _getScale(desktop, min, max, *sel_size, apply_x, apply_y));
}
}
pasted = true;
@@ -566,8 +566,8 @@ bool ClipboardManagerImpl::pastePathEffect(SPDesktop *desktop)
desktop->doc()->importDefs(tempdoc);
// make sure all selected items are converted to paths first (i.e. rectangles)
sp_selected_to_lpeitems(desktop);
- std::vector<SPItem*> itemlist=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
+ auto itemlist= selection->items();
+ for(auto i=itemlist.begin();i!=itemlist.end();++i){
SPItem *item = *i;
_applyPathEffect(item, effectstack);
}
@@ -649,9 +649,9 @@ Glib::ustring ClipboardManagerImpl::getShapeOrTextObjectId(SPDesktop *desktop)
void ClipboardManagerImpl::_copySelection(Inkscape::Selection *selection)
{
// copy the defs used by all items
- std::vector<SPItem*> itemlist=selection->itemList();
+ auto itemlist= selection->items();
cloned_elements.clear();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
+ for(auto i=itemlist.begin();i!=itemlist.end();++i){
SPItem *item = *i;
if (item) {
_copyUsedDefs(item);
@@ -662,7 +662,7 @@ void ClipboardManagerImpl::_copySelection(Inkscape::Selection *selection)
// copy the representation of the items
std::vector<SPObject*> sorted_items;
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i)
+ for(auto i=itemlist.begin();i!=itemlist.end();++i)
sorted_items.push_back(*i);
sort(sorted_items.begin(),sorted_items.end(),sp_object_compare_position_bool);
@@ -827,8 +827,8 @@ void ClipboardManagerImpl::_copyUsedDefs(SPItem *item)
SPObject *mask = item->mask_ref->getObject();
_copyNode(mask->getRepr(), _doc, _defs);
// recurse into the mask for its gradients etc.
- for (SPObject *o = mask->children ; o != NULL ; o = o->next) {
- SPItem *childItem = dynamic_cast<SPItem *>(o);
+ for(auto& o: mask->children) {
+ SPItem *childItem = dynamic_cast<SPItem *>(&o);
if (childItem) {
_copyUsedDefs(childItem);
}
@@ -845,8 +845,8 @@ void ClipboardManagerImpl::_copyUsedDefs(SPItem *item)
}
// recurse
- for (SPObject *o = item->children ; o != NULL ; o = o->next) {
- SPItem *childItem = dynamic_cast<SPItem *>(o);
+ for(auto& o: item->children) {
+ SPItem *childItem = dynamic_cast<SPItem *>(&o);
if (childItem) {
_copyUsedDefs(childItem);
}
@@ -882,8 +882,8 @@ void ClipboardManagerImpl::_copyPattern(SPPattern *pattern)
_copyNode(pattern->getRepr(), _doc, _defs);
// items in the pattern may also use gradients and other patterns, so recurse
- for ( SPObject *child = pattern->firstChild() ; child ; child = child->getNext() ) {
- SPItem *childItem = dynamic_cast<SPItem *>(child);
+ for (auto& child: pattern->children) {
+ SPItem *childItem = dynamic_cast<SPItem *>(&child);
if (childItem) {
_copyUsedDefs(childItem);
}
@@ -1288,11 +1288,7 @@ Geom::Scale ClipboardManagerImpl::_getScale(SPDesktop *desktop, Geom::Point cons
*/
Glib::ustring ClipboardManagerImpl::_getBestTarget()
{
-#if WITH_GTKMM_3_0
- std::vector<Glib::ustring> targets = _clipboard->wait_for_targets();
-#else
- std::list<Glib::ustring> targets = _clipboard->wait_for_targets();
-#endif
+ auto targets = _clipboard->wait_for_targets();
// clipboard target debugging snippet
/*
@@ -1351,12 +1347,7 @@ void ClipboardManagerImpl::_setClipboardTargets()
{
Inkscape::Extension::DB::OutputList outlist;
Inkscape::Extension::db.get_output_list(outlist);
-
-#if WITH_GTKMM_3_0
std::vector<Gtk::TargetEntry> target_list;
-#else
- std::list<Gtk::TargetEntry> target_list;
-#endif
bool plaintextSet = false;
for (Inkscape::Extension::DB::OutputList::const_iterator out = outlist.begin() ; out != outlist.end() ; ++out) {
diff --git a/src/ui/dialog-events.h b/src/ui/dialog-events.h
index b4a5d7c35..547cfb95d 100644
--- a/src/ui/dialog-events.h
+++ b/src/ui/dialog-events.h
@@ -12,6 +12,7 @@
#ifndef SEEN_DIALOG_EVENTS_H
#define SEEN_DIALOG_EVENTS_H
+#include <gtk/gtk.h>
/*
* event callback can only accept one argument, but we need two,
diff --git a/src/ui/dialog/Makefile_insert b/src/ui/dialog/Makefile_insert.THIS
index 3add3f214..3add3f214 100644
--- a/src/ui/dialog/Makefile_insert
+++ b/src/ui/dialog/Makefile_insert.THIS
diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp
index 6276d3391..04cf9d02a 100644
--- a/src/ui/dialog/aboutbox.cpp
+++ b/src/ui/dialog/aboutbox.cpp
@@ -98,11 +98,7 @@ AboutBox::AboutBox() : Gtk::Dialog(_("About Inkscape")) {
tabs->append_page(*manage(
make_scrolled_text(license_text)), _("_License"), true);
-#if WITH_GTKMM_3_0
get_content_area()->pack_end(*manage(tabs), true, true);
-#else
- get_vbox()->pack_end(*manage(tabs), true, true);
-#endif
tabs->show_all();
@@ -130,23 +126,16 @@ AboutBox::AboutBox() : Gtk::Dialog(_("About Inkscape")) {
link->set_selectable(true);
link->show();
-#if WITH_GTKMM_3_0
get_content_area()->pack_start(*manage(label), false, false);
get_content_area()->pack_start(*manage(link), false, false);
-#else
- get_vbox()->pack_start(*manage(label), false, false);
- get_vbox()->pack_start(*manage(link), false, false);
-#endif
- Gtk::Requisition requisition;
-#if GTK_CHECK_VERSION(3,0,0)
- gtk_widget_get_preferred_size(reinterpret_cast<GtkWidget*>(gobj()), &requisition, NULL);
-#else
- gtk_widget_size_request (reinterpret_cast<GtkWidget*>(gobj()), &requisition);
-#endif
+ Gtk::Requisition minimum_size;
+ Gtk::Requisition natural_size;
+ get_preferred_size(minimum_size, natural_size);
+
// allow window to shrink
set_size_request(0, 0);
- set_default_size(requisition.width, requisition.height);
+ set_default_size(minimum_size.width, minimum_size.height);
}
diff --git a/src/ui/dialog/align-and-distribute.cpp b/src/ui/dialog/align-and-distribute.cpp
index f269d1cb9..ed9ec3b0a 100644
--- a/src/ui/dialog/align-and-distribute.cpp
+++ b/src/ui/dialog/align-and-distribute.cpp
@@ -58,11 +58,7 @@ namespace Dialog {
Action::Action(const Glib::ustring &id,
const Glib::ustring &tiptext,
guint row, guint column,
-#if WITH_GTKMM_3_0
- Gtk::Grid &parent,
-#else
- Gtk::Table &parent,
-#endif
+ Gtk::Grid &parent,
AlignAndDistribute &dialog):
_dialog(dialog),
_id(id),
@@ -78,11 +74,7 @@ Action::Action(const Glib::ustring &id,
pButton->signal_clicked()
.connect(sigc::mem_fun(*this, &Action::on_button_click));
pButton->set_tooltip_text(tiptext);
-#if WITH_GTKMM_3_0
parent.attach(*pButton, column, row, 1, 1);
-#else
- parent.attach(*pButton, column, column+1, row, row+1, Gtk::FILL, Gtk::FILL);
-#endif
}
@@ -130,7 +122,7 @@ void ActionAlign::do_action(SPDesktop *desktop, int index)
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
bool sel_as_group = prefs->getBool("/dialogs/align/sel-as-groups");
- std::vector<SPItem*> selected(selection->itemList());
+ std::vector<SPItem*> selected(selection->items().begin(), selection->items().end());
if (selected.empty()) return;
const Coeffs &a = _allCoeffs[index];
@@ -290,7 +282,7 @@ private :
Inkscape::Selection *selection = desktop->getSelection();
if (!selection) return;
- std::vector<SPItem*> selected(selection->itemList());
+ std::vector<SPItem*> selected(selection->items().begin(), selection->items().end());
if (selected.empty()) return;
//Check 2 or more selected objects
@@ -444,11 +436,7 @@ public:
Action(id, tiptext, row, column + 4,
dialog.removeOverlap_table(), dialog)
{
-#if WITH_GTKMM_3_0
dialog.removeOverlap_table().set_column_spacing(3);
-#else
- dialog.removeOverlap_table().set_col_spacings(3);
-#endif
removeOverlapXGap.set_digits(1);
removeOverlapXGap.set_size_request(60, -1);
@@ -470,17 +458,10 @@ public:
removeOverlapYGapLabel.set_text_with_mnemonic(C_("Gap", "_V:"));
removeOverlapYGapLabel.set_mnemonic_widget(removeOverlapYGap);
-#if WITH_GTKMM_3_0
dialog.removeOverlap_table().attach(removeOverlapXGapLabel, column, row, 1, 1);
dialog.removeOverlap_table().attach(removeOverlapXGap, column+1, row, 1, 1);
dialog.removeOverlap_table().attach(removeOverlapYGapLabel, column+2, row, 1, 1);
dialog.removeOverlap_table().attach(removeOverlapYGap, column+3, row, 1, 1);
-#else
- dialog.removeOverlap_table().attach(removeOverlapXGapLabel, column, column+1, row, row+1, Gtk::FILL, Gtk::FILL);
- dialog.removeOverlap_table().attach(removeOverlapXGap, column+1, column+2, row, row+1, Gtk::FILL, Gtk::FILL);
- dialog.removeOverlap_table().attach(removeOverlapYGapLabel, column+2, column+3, row, row+1, Gtk::FILL, Gtk::FILL);
- dialog.removeOverlap_table().attach(removeOverlapYGap, column+3, column+4, row, row+1, Gtk::FILL, Gtk::FILL);
-#endif
}
private :
@@ -496,7 +477,9 @@ private :
// xGap and yGap are the minimum space required between bounding rectangles.
double const xGap = removeOverlapXGap.get_value();
double const yGap = removeOverlapYGap.get_value();
- removeoverlap(_dialog.getDesktop()->getSelection()->itemList(), xGap, yGap);
+ auto tmp = _dialog.getDesktop()->getSelection()->items();
+ std::vector<SPItem *> vec(tmp.begin(), tmp.end());
+ removeoverlap(vec, xGap, yGap);
// restore compensation setting
prefs->setInt("/options/clonecompensation/value", saved_compensation);
@@ -527,8 +510,9 @@ private :
int saved_compensation = prefs->getInt("/options/clonecompensation/value", SP_CLONE_COMPENSATION_UNMOVED);
prefs->setInt("/options/clonecompensation/value", SP_CLONE_COMPENSATION_UNMOVED);
- graphlayout(_dialog.getDesktop()->getSelection()->itemList());
-
+ auto tmp = _dialog.getDesktop()->getSelection()->items();
+ std::vector<SPItem *> vec(tmp.begin(), tmp.end());
+ graphlayout(vec);
// restore compensation setting
prefs->setInt("/options/clonecompensation/value", saved_compensation);
@@ -587,7 +571,7 @@ private :
Inkscape::Selection *selection = desktop->getSelection();
if (!selection) return;
- std::vector<SPItem*> selected(selection->itemList());
+ std::vector<SPItem*> selected(selection->items().begin(), selection->items().end());
if (selected.empty()) return;
//Check 2 or more selected objects
@@ -653,7 +637,8 @@ private :
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
int saved_compensation = prefs->getInt("/options/clonecompensation/value", SP_CLONE_COMPENSATION_UNMOVED);
prefs->setInt("/options/clonecompensation/value", SP_CLONE_COMPENSATION_UNMOVED);
- std::vector<SPItem*> x(_dialog.getDesktop()->getSelection()->itemList());
+ auto tmp = _dialog.getDesktop()->getSelection()->items();
+ std::vector<SPItem*> x(tmp.begin(), tmp.end());
unclump (x);
// restore compensation setting
@@ -684,7 +669,7 @@ private :
Inkscape::Selection *selection = desktop->getSelection();
if (!selection) return;
- std::vector<SPItem*> selected(selection->itemList());
+ std::vector<SPItem*> selected(selection->items().begin(), selection->items().end());
if (selected.empty()) return;
//Check 2 or more selected objects
@@ -759,11 +744,7 @@ public :
guint row,
guint column,
AlignAndDistribute &dialog,
-#if WITH_GTKMM_3_0
Gtk::Grid &table,
-#else
- Gtk::Table &table,
-#endif
Geom::Dim2 orientation, bool distribute):
Action(id, tiptext, row, column,
table, dialog),
@@ -782,7 +763,7 @@ private :
Inkscape::Selection *selection = desktop->getSelection();
if (!selection) return;
- std::vector<SPItem*> selected(selection->itemList());
+ std::vector<SPItem*> selected(selection->items().begin(), selection->items().end());
//Check 2 or more selected objects
if (selected.size() < 2) return;
@@ -936,19 +917,11 @@ AlignAndDistribute::AlignAndDistribute()
_rearrangeFrame(_("Rearrange")),
_removeOverlapFrame(_("Remove overlaps")),
_nodesFrame(_("Nodes")),
-#if WITH_GTKMM_3_0
_alignTable(),
_distributeTable(),
_rearrangeTable(),
_removeOverlapTable(),
_nodesTable(),
-#else
- _alignTable(2, 6, true),
- _distributeTable(2, 6, true),
- _rearrangeTable(1, 5, false),
- _removeOverlapTable(1, 5, false),
- _nodesTable(1, 4, true),
-#endif
_anchorLabel(_("Relative to: ")),
_anchorLabelNode(_("Relative to: ")),
_selgrpLabel(_("_Treat selection as group: "), 1)
@@ -1313,13 +1286,8 @@ void AlignAndDistribute::addRandomizeButton(const Glib::ustring &id, const Glib:
);
}
-#if WITH_GTKMM_3_0
void AlignAndDistribute::addBaselineButton(const Glib::ustring &id, const Glib::ustring tiptext,
guint row, guint col, Gtk::Grid &table, Geom::Dim2 orientation, bool distribute)
-#else
-void AlignAndDistribute::addBaselineButton(const Glib::ustring &id, const Glib::ustring tiptext,
- guint row, guint col, Gtk::Table &table, Geom::Dim2 orientation, bool distribute)
-#endif
{
_actionList.push_back(
new ActionBaseline(
diff --git a/src/ui/dialog/align-and-distribute.h b/src/ui/dialog/align-and-distribute.h
index f8cc61af2..acb3d02ed 100644
--- a/src/ui/dialog/align-and-distribute.h
+++ b/src/ui/dialog/align-and-distribute.h
@@ -22,15 +22,11 @@
#include <gtkmm/frame.h>
#include <gtkmm/comboboxtext.h>
#include <gtkmm/label.h>
-#include "2geom/rect.h"
-#include "ui/dialog/desktop-tracker.h"
-
-#if WITH_GTKMM_3_0
#include <gtkmm/checkbutton.h>
#include <gtkmm/grid.h>
-#else
-#include <gtkmm/table.h>
-#endif
+
+#include "2geom/rect.h"
+#include "ui/dialog/desktop-tracker.h"
class SPItem;
@@ -51,19 +47,11 @@ public:
static AlignAndDistribute &getInstance() { return *new AlignAndDistribute(); }
-#if WITH_GTKMM_3_0
Gtk::Grid &align_table(){return _alignTable;}
Gtk::Grid &distribute_table(){return _distributeTable;}
Gtk::Grid &rearrange_table(){return _rearrangeTable;}
Gtk::Grid &removeOverlap_table(){return _removeOverlapTable;}
Gtk::Grid &nodes_table(){return _nodesTable;}
-#else
- Gtk::Table &align_table(){return _alignTable;}
- Gtk::Table &distribute_table(){return _distributeTable;}
- Gtk::Table &rearrange_table(){return _rearrangeTable;}
- Gtk::Table &removeOverlap_table(){return _removeOverlapTable;}
- Gtk::Table &nodes_table(){return _nodesTable;}
-#endif
void setMode(bool nodeEdit);
@@ -100,22 +88,13 @@ protected:
guint row, guint col);
void addRandomizeButton(const Glib::ustring &id, const Glib::ustring tiptext,
guint row, guint col);
-#if WITH_GTKMM_3_0
void addBaselineButton(const Glib::ustring &id, const Glib::ustring tiptext,
guint row, guint col, Gtk::Grid &table, Geom::Dim2 orientation, bool distribute);
-#else
- void addBaselineButton(const Glib::ustring &id, const Glib::ustring tiptext,
- guint row, guint col, Gtk::Table &table, Geom::Dim2 orientation, bool distribute);
-#endif
void setTargetDesktop(SPDesktop *desktop);
std::list<Action *> _actionList;
UI::Widget::Frame _alignFrame, _distributeFrame, _rearrangeFrame, _removeOverlapFrame, _nodesFrame;
-#if WITH_GTKMM_3_0
Gtk::Grid _alignTable, _distributeTable, _rearrangeTable, _removeOverlapTable, _nodesTable;
-#else
- Gtk::Table _alignTable, _distributeTable, _rearrangeTable, _removeOverlapTable, _nodesTable;
-#endif
Gtk::HBox _anchorBox;
Gtk::HBox _selgrpBox;
Gtk::VBox _alignBox;
@@ -163,11 +142,7 @@ public :
Action(const Glib::ustring &id,
const Glib::ustring &tiptext,
guint row, guint column,
- #if WITH_GTKMM_3_0
- Gtk::Grid &parent,
- #else
- Gtk::Table &parent,
- #endif
+ Gtk::Grid &parent,
AlignAndDistribute &dialog);
virtual ~Action(){}
@@ -178,12 +153,7 @@ private :
virtual void on_button_click(){}
Glib::ustring _id;
-
-#if WITH_GTKMM_3_0
Gtk::Grid &_parent;
-#else
- Gtk::Table &_parent;
-#endif
};
diff --git a/src/ui/dialog/calligraphic-profile-rename.cpp b/src/ui/dialog/calligraphic-profile-rename.cpp
index 9ae22db2d..50dae0fd8 100644
--- a/src/ui/dialog/calligraphic-profile-rename.cpp
+++ b/src/ui/dialog/calligraphic-profile-rename.cpp
@@ -16,12 +16,7 @@
#include "calligraphic-profile-rename.h"
#include <glibmm/i18n.h>
#include <gtkmm/stock.h>
-
-#if WITH_GTKMM_3_0
-# include <gtkmm/grid.h>
-#else
-# include <gtkmm/table.h>
-#endif
+#include <gtkmm/grid.h>
#include "desktop.h"
@@ -30,40 +25,24 @@ namespace UI {
namespace Dialog {
CalligraphicProfileRename::CalligraphicProfileRename() :
-#if WITH_GTKMM_3_0
_layout_table(Gtk::manage(new Gtk::Grid())),
-#else
- _layout_table(Gtk::manage(new Gtk::Table(1, 2))),
-#endif
_applied(false)
{
set_title(_("Edit profile"));
-#if WITH_GTKMM_3_0
- Gtk::Box *mainVBox = get_content_area();
+ auto mainVBox = get_content_area();
_layout_table->set_column_spacing(4);
_layout_table->set_row_spacing(4);
-#else
- Gtk::Box *mainVBox = get_vbox();
- _layout_table->set_spacings(4);
-#endif
_profile_name_entry.set_activates_default(true);
_profile_name_label.set_label(_("Profile name:"));
_profile_name_label.set_alignment(1.0, 0.5);
-#if WITH_GTKMM_3_0
_layout_table->attach(_profile_name_label, 0, 0, 1, 1);
_profile_name_entry.set_hexpand();
_layout_table->attach(_profile_name_entry, 1, 0, 1, 1);
-#else
- _layout_table->attach(_profile_name_label,
- 0, 1, 0, 1, Gtk::FILL, Gtk::FILL);
- _layout_table->attach(_profile_name_entry,
- 1, 2, 0, 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL);
-#endif
mainVBox->pack_start(*_layout_table, false, false, 4);
// Buttons
diff --git a/src/ui/dialog/calligraphic-profile-rename.h b/src/ui/dialog/calligraphic-profile-rename.h
index 4ef71900b..b7a97a1e7 100644
--- a/src/ui/dialog/calligraphic-profile-rename.h
+++ b/src/ui/dialog/calligraphic-profile-rename.h
@@ -20,11 +20,7 @@
#include <gtkmm/label.h>
namespace Gtk {
-#if WITH_GTKMM_3_0
class Grid;
-#else
-class Table;
-#endif
}
class SPDesktop;
@@ -59,12 +55,7 @@ protected:
Gtk::Label _profile_name_label;
Gtk::Entry _profile_name_entry;
-
-#if WITH_GTKMM_3_0
Gtk::Grid* _layout_table;
-#else
- Gtk::Table* _layout_table;
-#endif
Gtk::Button _close_button;
Gtk::Button _delete_button;
diff --git a/src/ui/dialog/clonetiler.cpp b/src/ui/dialog/clonetiler.cpp
index bdb826384..8e9d3dbbf 100644
--- a/src/ui/dialog/clonetiler.cpp
+++ b/src/ui/dialog/clonetiler.cpp
@@ -22,7 +22,12 @@
#include <glibmm/i18n.h>
#include <2geom/transforms.h>
+
#include <gtkmm/adjustment.h>
+#include <gtkmm/checkbutton.h>
+#include <gtkmm/combobox.h>
+#include <gtkmm/liststore.h>
+#include <gtkmm/radiobutton.h>
#include "desktop.h"
@@ -63,10 +68,8 @@ static unsigned trace_visionkey;
static gdouble trace_zoom;
static SPDocument *trace_doc = NULL;
-
CloneTiler::CloneTiler () :
UI::Widget::Panel ("", "/dialogs/clonetiler/", SP_VERB_DIALOG_CLONETILER),
- dlg(NULL),
desktop(NULL),
deskTrack(),
table_row_labels(NULL)
@@ -75,16 +78,10 @@ CloneTiler::CloneTiler () :
contents->set_spacing(0);
{
- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ auto prefs = Inkscape::Preferences::get();
- dlg = GTK_WIDGET(gobj());
-
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *mainbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4);
+ auto mainbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4);
gtk_box_set_homogeneous(GTK_BOX(mainbox), FALSE);
-#else
- GtkWidget *mainbox = gtk_vbox_new(FALSE, 4);
-#endif
gtk_container_set_border_width (GTK_CONTAINER (mainbox), 6);
contents->pack_start (*Gtk::manage(Glib::wrap(mainbox)), true, true, 0);
@@ -95,7 +92,7 @@ CloneTiler::CloneTiler () :
// Symmetry
{
- GtkWidget *vb = clonetiler_new_tab (nb, _("_Symmetry"));
+ GtkWidget *vb = new_tab (nb, _("_Symmetry"));
/* TRANSLATORS: For the following 17 symmetry groups, see
* http://www.bib.ulb.ac.be/coursmath/doc/17.htm (visual examples);
@@ -104,7 +101,7 @@ CloneTiler::CloneTiler () :
*/
struct SymGroups {
gint group;
- gchar const *label;
+ Glib::ustring label;
} const sym_groups[] = {
// TRANSLATORS: "translation" means "shift" / "displacement" here.
{TILE_P1, _("<b>P1</b>: simple translation")},
@@ -130,42 +127,36 @@ CloneTiler::CloneTiler () :
gint current = prefs->getInt(prefs_path + "symmetrygroup", 0);
- // Create a list structure containing all the data to be displayed in
- // the symmetry group combo box.
- GtkListStore *store = gtk_list_store_new (1, G_TYPE_STRING);
- GtkTreeIter iter;
+ // Add a new combo box widget with the list of symmetry groups to the vbox
+ auto combo = Gtk::manage(new Gtk::ComboBoxText());
+ combo->set_tooltip_text(_("Select one of the 17 symmetry groups for the tiling"));
- for (unsigned j = 0; j < G_N_ELEMENTS(sym_groups); ++j) {
- SymGroups const &sg = sym_groups[j];
+ // Hack to add markup support
+ auto cell_list = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(combo->gobj()));
+ gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(combo->gobj()),
+ GTK_CELL_RENDERER(cell_list->data),
+ "markup", 0, NULL);
- // Add the description of the symgroup to a new row
- gtk_list_store_append(store, &iter);
- gtk_list_store_set(store, &iter, 0, sg.label, -1);
- }
-
- // Add a new combo box widget with the list of symmetry groups to the vbox
- GtkWidget *combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store));
- gtk_widget_set_tooltip_text (combo, _("Select one of the 17 symmetry groups for the tiling"));
- gtk_box_pack_start (GTK_BOX (vb), combo, FALSE, FALSE, SB_MARGIN);
+ for (unsigned j = 0; j < G_N_ELEMENTS(sym_groups); ++j) {
+ SymGroups const &sg = sym_groups[j];
- // Specify the rendering of data from the list in a combo box cell
- GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
- gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, FALSE);
- gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(combo), renderer, "markup", 0, NULL);
+ // Add the description of the symgroup to a new row
+ combo->append(sg.label);
+ }
- gtk_combo_box_set_active (GTK_COMBO_BOX (combo), current);
+ gtk_box_pack_start (GTK_BOX (vb), GTK_WIDGET(combo->gobj()), FALSE, FALSE, SB_MARGIN);
- g_signal_connect(G_OBJECT(combo), "changed",
- G_CALLBACK(clonetiler_symgroup_changed), NULL);
+ combo->set_active(current);
+ combo->signal_changed().connect(sigc::bind(sigc::mem_fun(*this, &CloneTiler::symgroup_changed), combo));
}
table_row_labels = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
// Shift
{
- GtkWidget *vb = clonetiler_new_tab (nb, _("S_hift"));
+ GtkWidget *vb = new_tab (nb, _("S_hift"));
- GtkWidget *table = clonetiler_table_x_y_rand (3);
+ GtkWidget *table = table_x_y_rand (3);
gtk_box_pack_start (GTK_BOX (vb), table, FALSE, FALSE, 0);
// X
@@ -175,29 +166,29 @@ CloneTiler::CloneTiler () :
// xgettext:no-c-format
gtk_label_set_markup (GTK_LABEL(l), _("<b>Shift X:</b>"));
gtk_size_group_add_widget(table_row_labels, l);
- clonetiler_table_attach (table, l, 1, 2, 1);
+ table_attach (table, l, 1, 2, 1);
}
{
- GtkWidget *l = clonetiler_spinbox (
+ auto l = spinbox (
// xgettext:no-c-format
_("Horizontal shift per row (in % of tile width)"), "shiftx_per_j",
-10000, 10000, "%");
- clonetiler_table_attach (table, l, 0, 2, 2);
+ table_attach (table, l, 0, 2, 2);
}
{
- GtkWidget *l = clonetiler_spinbox (
+ auto l = spinbox (
// xgettext:no-c-format
_("Horizontal shift per column (in % of tile width)"), "shiftx_per_i",
-10000, 10000, "%");
- clonetiler_table_attach (table, l, 0, 2, 3);
+ table_attach (table, l, 0, 2, 3);
}
{
- GtkWidget *l = clonetiler_spinbox (_("Randomize the horizontal shift by this percentage"), "shiftx_rand",
+ auto l = spinbox (_("Randomize the horizontal shift by this percentage"), "shiftx_rand",
0, 1000, "%");
- clonetiler_table_attach (table, l, 0, 2, 4);
+ table_attach (table, l, 0, 2, 4);
}
// Y
@@ -207,30 +198,30 @@ CloneTiler::CloneTiler () :
// xgettext:no-c-format
gtk_label_set_markup (GTK_LABEL(l), _("<b>Shift Y:</b>"));
gtk_size_group_add_widget(table_row_labels, l);
- clonetiler_table_attach (table, l, 1, 3, 1);
+ table_attach (table, l, 1, 3, 1);
}
{
- GtkWidget *l = clonetiler_spinbox (
+ auto l = spinbox (
// xgettext:no-c-format
_("Vertical shift per row (in % of tile height)"), "shifty_per_j",
-10000, 10000, "%");
- clonetiler_table_attach (table, l, 0, 3, 2);
+ table_attach (table, l, 0, 3, 2);
}
{
- GtkWidget *l = clonetiler_spinbox (
+ auto l = spinbox (
// xgettext:no-c-format
_("Vertical shift per column (in % of tile height)"), "shifty_per_i",
-10000, 10000, "%");
- clonetiler_table_attach (table, l, 0, 3, 3);
+ table_attach (table, l, 0, 3, 3);
}
{
- GtkWidget *l = clonetiler_spinbox (
+ auto l = spinbox (
_("Randomize the vertical shift by this percentage"), "shifty_rand",
0, 1000, "%");
- clonetiler_table_attach (table, l, 0, 3, 4);
+ table_attach (table, l, 0, 3, 4);
}
// Exponent
@@ -238,21 +229,21 @@ CloneTiler::CloneTiler () :
GtkWidget *l = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL(l), _("<b>Exponent:</b>"));
gtk_size_group_add_widget(table_row_labels, l);
- clonetiler_table_attach (table, l, 1, 4, 1);
+ table_attach (table, l, 1, 4, 1);
}
{
- GtkWidget *l = clonetiler_spinbox (
+ auto l = spinbox (
_("Whether rows are spaced evenly (1), converge (<1) or diverge (>1)"), "shifty_exp",
0, 10, "", true);
- clonetiler_table_attach (table, l, 0, 4, 2);
+ table_attach (table, l, 0, 4, 2);
}
{
- GtkWidget *l = clonetiler_spinbox (
+ auto l = spinbox (
_("Whether columns are spaced evenly (1), converge (<1) or diverge (>1)"), "shiftx_exp",
0, 10, "", true);
- clonetiler_table_attach (table, l, 0, 4, 3);
+ table_attach (table, l, 0, 4, 3);
}
{ // alternates
@@ -260,17 +251,17 @@ CloneTiler::CloneTiler () :
// TRANSLATORS: "Alternate" is a verb here
gtk_label_set_markup (GTK_LABEL(l), _("<small>Alternate:</small>"));
gtk_size_group_add_widget(table_row_labels, l);
- clonetiler_table_attach (table, l, 1, 5, 1);
+ table_attach (table, l, 1, 5, 1);
}
{
- GtkWidget *l = clonetiler_checkbox (_("Alternate the sign of shifts for each row"), "shifty_alternate");
- clonetiler_table_attach (table, l, 0, 5, 2);
+ auto l = checkbox (_("Alternate the sign of shifts for each row"), "shifty_alternate");
+ table_attach (table, l, 0, 5, 2);
}
{
- GtkWidget *l = clonetiler_checkbox (_("Alternate the sign of shifts for each column"), "shiftx_alternate");
- clonetiler_table_attach (table, l, 0, 5, 3);
+ auto l = checkbox (_("Alternate the sign of shifts for each column"), "shiftx_alternate");
+ table_attach (table, l, 0, 5, 3);
}
{ // Cumulate
@@ -278,17 +269,17 @@ CloneTiler::CloneTiler () :
// TRANSLATORS: "Cumulate" is a verb here
gtk_label_set_markup (GTK_LABEL(l), _("<small>Cumulate:</small>"));
gtk_size_group_add_widget(table_row_labels, l);
- clonetiler_table_attach (table, l, 1, 6, 1);
+ table_attach (table, l, 1, 6, 1);
}
{
- GtkWidget *l = clonetiler_checkbox (_("Cumulate the shifts for each row"), "shifty_cumulate");
- clonetiler_table_attach (table, l, 0, 6, 2);
+ auto l = checkbox (_("Cumulate the shifts for each row"), "shifty_cumulate");
+ table_attach (table, l, 0, 6, 2);
}
{
- GtkWidget *l = clonetiler_checkbox (_("Cumulate the shifts for each column"), "shiftx_cumulate");
- clonetiler_table_attach (table, l, 0, 6, 3);
+ auto l = checkbox (_("Cumulate the shifts for each column"), "shiftx_cumulate");
+ table_attach (table, l, 0, 6, 3);
}
{ // Exclude tile width and height in shift
@@ -296,17 +287,17 @@ CloneTiler::CloneTiler () :
// TRANSLATORS: "Cumulate" is a verb here
gtk_label_set_markup (GTK_LABEL(l), _("<small>Exclude tile:</small>"));
gtk_size_group_add_widget(table_row_labels, l);
- clonetiler_table_attach (table, l, 1, 7, 1);
+ table_attach (table, l, 1, 7, 1);
}
{
- GtkWidget *l = clonetiler_checkbox (_("Exclude tile height in shift"), "shifty_excludeh");
- clonetiler_table_attach (table, l, 0, 7, 2);
+ auto l = checkbox (_("Exclude tile height in shift"), "shifty_excludeh");
+ table_attach (table, l, 0, 7, 2);
}
{
- GtkWidget *l = clonetiler_checkbox (_("Exclude tile width in shift"), "shiftx_excludew");
- clonetiler_table_attach (table, l, 0, 7, 3);
+ auto l = checkbox (_("Exclude tile width in shift"), "shiftx_excludew");
+ table_attach (table, l, 0, 7, 3);
}
}
@@ -314,9 +305,9 @@ CloneTiler::CloneTiler () :
// Scale
{
- GtkWidget *vb = clonetiler_new_tab (nb, _("Sc_ale"));
+ GtkWidget *vb = new_tab (nb, _("Sc_ale"));
- GtkWidget *table = clonetiler_table_x_y_rand (2);
+ GtkWidget *table = table_x_y_rand (2);
gtk_box_pack_start (GTK_BOX (vb), table, FALSE, FALSE, 0);
// X
@@ -324,29 +315,29 @@ CloneTiler::CloneTiler () :
GtkWidget *l = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL(l), _("<b>Scale X:</b>"));
gtk_size_group_add_widget(table_row_labels, l);
- clonetiler_table_attach (table, l, 1, 2, 1);
+ table_attach (table, l, 1, 2, 1);
}
{
- GtkWidget *l = clonetiler_spinbox (
+ auto l = spinbox (
// xgettext:no-c-format
_("Horizontal scale per row (in % of tile width)"), "scalex_per_j",
-100, 1000, "%");
- clonetiler_table_attach (table, l, 0, 2, 2);
+ table_attach (table, l, 0, 2, 2);
}
{
- GtkWidget *l = clonetiler_spinbox (
+ auto l = spinbox (
// xgettext:no-c-format
_("Horizontal scale per column (in % of tile width)"), "scalex_per_i",
-100, 1000, "%");
- clonetiler_table_attach (table, l, 0, 2, 3);
+ table_attach (table, l, 0, 2, 3);
}
{
- GtkWidget *l = clonetiler_spinbox (_("Randomize the horizontal scale by this percentage"), "scalex_rand",
+ auto l = spinbox (_("Randomize the horizontal scale by this percentage"), "scalex_rand",
0, 1000, "%");
- clonetiler_table_attach (table, l, 0, 2, 4);
+ table_attach (table, l, 0, 2, 4);
}
// Y
@@ -354,29 +345,29 @@ CloneTiler::CloneTiler () :
GtkWidget *l = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL(l), _("<b>Scale Y:</b>"));
gtk_size_group_add_widget(table_row_labels, l);
- clonetiler_table_attach (table, l, 1, 3, 1);
+ table_attach (table, l, 1, 3, 1);
}
{
- GtkWidget *l = clonetiler_spinbox (
+ auto l = spinbox (
// xgettext:no-c-format
_("Vertical scale per row (in % of tile height)"), "scaley_per_j",
-100, 1000, "%");
- clonetiler_table_attach (table, l, 0, 3, 2);
+ table_attach (table, l, 0, 3, 2);
}
{
- GtkWidget *l = clonetiler_spinbox (
+ auto l = spinbox (
// xgettext:no-c-format
_("Vertical scale per column (in % of tile height)"), "scaley_per_i",
-100, 1000, "%");
- clonetiler_table_attach (table, l, 0, 3, 3);
+ table_attach (table, l, 0, 3, 3);
}
{
- GtkWidget *l = clonetiler_spinbox (_("Randomize the vertical scale by this percentage"), "scaley_rand",
+ auto l = spinbox (_("Randomize the vertical scale by this percentage"), "scaley_rand",
0, 1000, "%");
- clonetiler_table_attach (table, l, 0, 3, 4);
+ table_attach (table, l, 0, 3, 4);
}
// Exponent
@@ -384,19 +375,19 @@ CloneTiler::CloneTiler () :
GtkWidget *l = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL(l), _("<b>Exponent:</b>"));
gtk_size_group_add_widget(table_row_labels, l);
- clonetiler_table_attach (table, l, 1, 4, 1);
+ table_attach (table, l, 1, 4, 1);
}
{
- GtkWidget *l = clonetiler_spinbox (_("Whether row scaling is uniform (1), converge (<1) or diverge (>1)"), "scaley_exp",
+ auto l = spinbox (_("Whether row scaling is uniform (1), converge (<1) or diverge (>1)"), "scaley_exp",
0, 10, "", true);
- clonetiler_table_attach (table, l, 0, 4, 2);
+ table_attach (table, l, 0, 4, 2);
}
{
- GtkWidget *l = clonetiler_spinbox (_("Whether column scaling is uniform (1), converge (<1) or diverge (>1)"), "scalex_exp",
+ auto l = spinbox (_("Whether column scaling is uniform (1), converge (<1) or diverge (>1)"), "scalex_exp",
0, 10, "", true);
- clonetiler_table_attach (table, l, 0, 4, 3);
+ table_attach (table, l, 0, 4, 3);
}
// Logarithmic (as in logarithmic spiral)
@@ -404,19 +395,19 @@ CloneTiler::CloneTiler () :
GtkWidget *l = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL(l), _("<b>Base:</b>"));
gtk_size_group_add_widget(table_row_labels, l);
- clonetiler_table_attach (table, l, 1, 5, 1);
+ table_attach (table, l, 1, 5, 1);
}
{
- GtkWidget *l = clonetiler_spinbox (_("Base for a logarithmic spiral: not used (0), converge (<1), or diverge (>1)"), "scaley_log",
+ auto l = spinbox (_("Base for a logarithmic spiral: not used (0), converge (<1), or diverge (>1)"), "scaley_log",
0, 10, "", false);
- clonetiler_table_attach (table, l, 0, 5, 2);
+ table_attach (table, l, 0, 5, 2);
}
{
- GtkWidget *l = clonetiler_spinbox (_("Base for a logarithmic spiral: not used (0), converge (<1), or diverge (>1)"), "scalex_log",
+ auto l = spinbox (_("Base for a logarithmic spiral: not used (0), converge (<1), or diverge (>1)"), "scalex_log",
0, 10, "", false);
- clonetiler_table_attach (table, l, 0, 5, 3);
+ table_attach (table, l, 0, 5, 3);
}
{ // alternates
@@ -424,17 +415,17 @@ CloneTiler::CloneTiler () :
// TRANSLATORS: "Alternate" is a verb here
gtk_label_set_markup (GTK_LABEL(l), _("<small>Alternate:</small>"));
gtk_size_group_add_widget(table_row_labels, l);
- clonetiler_table_attach (table, l, 1, 6, 1);
+ table_attach (table, l, 1, 6, 1);
}
{
- GtkWidget *l = clonetiler_checkbox (_("Alternate the sign of scales for each row"), "scaley_alternate");
- clonetiler_table_attach (table, l, 0, 6, 2);
+ auto l = checkbox (_("Alternate the sign of scales for each row"), "scaley_alternate");
+ table_attach (table, l, 0, 6, 2);
}
{
- GtkWidget *l = clonetiler_checkbox (_("Alternate the sign of scales for each column"), "scalex_alternate");
- clonetiler_table_attach (table, l, 0, 6, 3);
+ auto l = checkbox (_("Alternate the sign of scales for each column"), "scalex_alternate");
+ table_attach (table, l, 0, 6, 3);
}
{ // Cumulate
@@ -442,17 +433,17 @@ CloneTiler::CloneTiler () :
// TRANSLATORS: "Cumulate" is a verb here
gtk_label_set_markup (GTK_LABEL(l), _("<small>Cumulate:</small>"));
gtk_size_group_add_widget(table_row_labels, l);
- clonetiler_table_attach (table, l, 1, 7, 1);
+ table_attach (table, l, 1, 7, 1);
}
{
- GtkWidget *l = clonetiler_checkbox (_("Cumulate the scales for each row"), "scaley_cumulate");
- clonetiler_table_attach (table, l, 0, 7, 2);
+ auto l = checkbox (_("Cumulate the scales for each row"), "scaley_cumulate");
+ table_attach (table, l, 0, 7, 2);
}
{
- GtkWidget *l = clonetiler_checkbox (_("Cumulate the scales for each column"), "scalex_cumulate");
- clonetiler_table_attach (table, l, 0, 7, 3);
+ auto l = checkbox (_("Cumulate the scales for each column"), "scalex_cumulate");
+ table_attach (table, l, 0, 7, 3);
}
}
@@ -460,9 +451,9 @@ CloneTiler::CloneTiler () :
// Rotation
{
- GtkWidget *vb = clonetiler_new_tab (nb, _("_Rotation"));
+ GtkWidget *vb = new_tab (nb, _("_Rotation"));
- GtkWidget *table = clonetiler_table_x_y_rand (1);
+ GtkWidget *table = table_x_y_rand (1);
gtk_box_pack_start (GTK_BOX (vb), table, FALSE, FALSE, 0);
// Angle
@@ -470,29 +461,29 @@ CloneTiler::CloneTiler () :
GtkWidget *l = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL(l), _("<b>Angle:</b>"));
gtk_size_group_add_widget(table_row_labels, l);
- clonetiler_table_attach (table, l, 1, 2, 1);
+ table_attach (table, l, 1, 2, 1);
}
{
- GtkWidget *l = clonetiler_spinbox (
+ auto l = spinbox (
// xgettext:no-c-format
_("Rotate tiles by this angle for each row"), "rotate_per_j",
-180, 180, "&#176;");
- clonetiler_table_attach (table, l, 0, 2, 2);
+ table_attach (table, l, 0, 2, 2);
}
{
- GtkWidget *l = clonetiler_spinbox (
+ auto l = spinbox (
// xgettext:no-c-format
_("Rotate tiles by this angle for each column"), "rotate_per_i",
-180, 180, "&#176;");
- clonetiler_table_attach (table, l, 0, 2, 3);
+ table_attach (table, l, 0, 2, 3);
}
{
- GtkWidget *l = clonetiler_spinbox (_("Randomize the rotation angle by this percentage"), "rotate_rand",
+ auto l = spinbox (_("Randomize the rotation angle by this percentage"), "rotate_rand",
0, 100, "%");
- clonetiler_table_attach (table, l, 0, 2, 4);
+ table_attach (table, l, 0, 2, 4);
}
{ // alternates
@@ -500,17 +491,17 @@ CloneTiler::CloneTiler () :
// TRANSLATORS: "Alternate" is a verb here
gtk_label_set_markup (GTK_LABEL(l), _("<small>Alternate:</small>"));
gtk_size_group_add_widget(table_row_labels, l);
- clonetiler_table_attach (table, l, 1, 3, 1);
+ table_attach (table, l, 1, 3, 1);
}
{
- GtkWidget *l = clonetiler_checkbox (_("Alternate the rotation direction for each row"), "rotate_alternatej");
- clonetiler_table_attach (table, l, 0, 3, 2);
+ auto l = checkbox (_("Alternate the rotation direction for each row"), "rotate_alternatej");
+ table_attach (table, l, 0, 3, 2);
}
{
- GtkWidget *l = clonetiler_checkbox (_("Alternate the rotation direction for each column"), "rotate_alternatei");
- clonetiler_table_attach (table, l, 0, 3, 3);
+ auto l = checkbox (_("Alternate the rotation direction for each column"), "rotate_alternatei");
+ table_attach (table, l, 0, 3, 3);
}
{ // Cumulate
@@ -518,17 +509,17 @@ CloneTiler::CloneTiler () :
// TRANSLATORS: "Cumulate" is a verb here
gtk_label_set_markup (GTK_LABEL(l), _("<small>Cumulate:</small>"));
gtk_size_group_add_widget(table_row_labels, l);
- clonetiler_table_attach (table, l, 1, 4, 1);
+ table_attach (table, l, 1, 4, 1);
}
{
- GtkWidget *l = clonetiler_checkbox (_("Cumulate the rotation for each row"), "rotate_cumulatej");
- clonetiler_table_attach (table, l, 0, 4, 2);
+ auto l = checkbox (_("Cumulate the rotation for each row"), "rotate_cumulatej");
+ table_attach (table, l, 0, 4, 2);
}
{
- GtkWidget *l = clonetiler_checkbox (_("Cumulate the rotation for each column"), "rotate_cumulatei");
- clonetiler_table_attach (table, l, 0, 4, 3);
+ auto l = checkbox (_("Cumulate the rotation for each column"), "rotate_cumulatei");
+ table_attach (table, l, 0, 4, 3);
}
}
@@ -536,9 +527,9 @@ CloneTiler::CloneTiler () :
// Blur and opacity
{
- GtkWidget *vb = clonetiler_new_tab (nb, _("_Blur & opacity"));
+ GtkWidget *vb = new_tab (nb, _("_Blur & opacity"));
- GtkWidget *table = clonetiler_table_x_y_rand (1);
+ GtkWidget *table = table_x_y_rand (1);
gtk_box_pack_start (GTK_BOX (vb), table, FALSE, FALSE, 0);
@@ -547,25 +538,25 @@ CloneTiler::CloneTiler () :
GtkWidget *l = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL(l), _("<b>Blur:</b>"));
gtk_size_group_add_widget(table_row_labels, l);
- clonetiler_table_attach (table, l, 1, 2, 1);
+ table_attach (table, l, 1, 2, 1);
}
{
- GtkWidget *l = clonetiler_spinbox (_("Blur tiles by this percentage for each row"), "blur_per_j",
+ auto l = spinbox (_("Blur tiles by this percentage for each row"), "blur_per_j",
0, 100, "%");
- clonetiler_table_attach (table, l, 0, 2, 2);
+ table_attach (table, l, 0, 2, 2);
}
{
- GtkWidget *l = clonetiler_spinbox (_("Blur tiles by this percentage for each column"), "blur_per_i",
+ auto l = spinbox (_("Blur tiles by this percentage for each column"), "blur_per_i",
0, 100, "%");
- clonetiler_table_attach (table, l, 0, 2, 3);
+ table_attach (table, l, 0, 2, 3);
}
{
- GtkWidget *l = clonetiler_spinbox (_("Randomize the tile blur by this percentage"), "blur_rand",
+ auto l = spinbox (_("Randomize the tile blur by this percentage"), "blur_rand",
0, 100, "%");
- clonetiler_table_attach (table, l, 0, 2, 4);
+ table_attach (table, l, 0, 2, 4);
}
{ // alternates
@@ -573,17 +564,17 @@ CloneTiler::CloneTiler () :
// TRANSLATORS: "Alternate" is a verb here
gtk_label_set_markup (GTK_LABEL(l), _("<small>Alternate:</small>"));
gtk_size_group_add_widget(table_row_labels, l);
- clonetiler_table_attach (table, l, 1, 3, 1);
+ table_attach (table, l, 1, 3, 1);
}
{
- GtkWidget *l = clonetiler_checkbox (_("Alternate the sign of blur change for each row"), "blur_alternatej");
- clonetiler_table_attach (table, l, 0, 3, 2);
+ auto l = checkbox (_("Alternate the sign of blur change for each row"), "blur_alternatej");
+ table_attach (table, l, 0, 3, 2);
}
{
- GtkWidget *l = clonetiler_checkbox (_("Alternate the sign of blur change for each column"), "blur_alternatei");
- clonetiler_table_attach (table, l, 0, 3, 3);
+ auto l = checkbox (_("Alternate the sign of blur change for each column"), "blur_alternatei");
+ table_attach (table, l, 0, 3, 3);
}
@@ -593,25 +584,25 @@ CloneTiler::CloneTiler () :
GtkWidget *l = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL(l), _("<b>Opacity:</b>"));
gtk_size_group_add_widget(table_row_labels, l);
- clonetiler_table_attach (table, l, 1, 4, 1);
+ table_attach (table, l, 1, 4, 1);
}
{
- GtkWidget *l = clonetiler_spinbox (_("Decrease tile opacity by this percentage for each row"), "opacity_per_j",
+ auto l = spinbox (_("Decrease tile opacity by this percentage for each row"), "opacity_per_j",
0, 100, "%");
- clonetiler_table_attach (table, l, 0, 4, 2);
+ table_attach (table, l, 0, 4, 2);
}
{
- GtkWidget *l = clonetiler_spinbox (_("Decrease tile opacity by this percentage for each column"), "opacity_per_i",
+ auto l = spinbox (_("Decrease tile opacity by this percentage for each column"), "opacity_per_i",
0, 100, "%");
- clonetiler_table_attach (table, l, 0, 4, 3);
+ table_attach (table, l, 0, 4, 3);
}
{
- GtkWidget *l = clonetiler_spinbox (_("Randomize the tile opacity by this percentage"), "opacity_rand",
+ auto l = spinbox (_("Randomize the tile opacity by this percentage"), "opacity_rand",
0, 100, "%");
- clonetiler_table_attach (table, l, 0, 4, 4);
+ table_attach (table, l, 0, 4, 4);
}
{ // alternates
@@ -619,39 +610,35 @@ CloneTiler::CloneTiler () :
// TRANSLATORS: "Alternate" is a verb here
gtk_label_set_markup (GTK_LABEL(l), _("<small>Alternate:</small>"));
gtk_size_group_add_widget(table_row_labels, l);
- clonetiler_table_attach (table, l, 1, 5, 1);
+ table_attach (table, l, 1, 5, 1);
}
{
- GtkWidget *l = clonetiler_checkbox (_("Alternate the sign of opacity change for each row"), "opacity_alternatej");
- clonetiler_table_attach (table, l, 0, 5, 2);
+ auto l = checkbox (_("Alternate the sign of opacity change for each row"), "opacity_alternatej");
+ table_attach (table, l, 0, 5, 2);
}
{
- GtkWidget *l = clonetiler_checkbox (_("Alternate the sign of opacity change for each column"), "opacity_alternatei");
- clonetiler_table_attach (table, l, 0, 5, 3);
+ auto l = checkbox (_("Alternate the sign of opacity change for each column"), "opacity_alternatei");
+ table_attach (table, l, 0, 5, 3);
}
}
// Color
{
- GtkWidget *vb = clonetiler_new_tab (nb, _("Co_lor"));
+ GtkWidget *vb = new_tab (nb, _("Co_lor"));
{
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
+ auto hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous(GTK_BOX(hb), FALSE);
-#else
- GtkWidget *hb = gtk_hbox_new (FALSE, 0);
-#endif
GtkWidget *l = gtk_label_new (_("Initial color: "));
gtk_box_pack_start (GTK_BOX (hb), l, FALSE, FALSE, 0);
guint32 rgba = 0x000000ff | sp_svg_read_color (prefs->getString(prefs_path + "initial_color").data(), 0x000000ff);
color_picker = new Inkscape::UI::Widget::ColorPicker (*new Glib::ustring(_("Initial color of tiled clones")), *new Glib::ustring(_("Initial color for clones (works only if the original has unset fill or stroke or on spray tool in copy mode)")), rgba, false);
- color_changed_connection = color_picker->connectChanged (sigc::ptr_fun(on_picker_color_changed));
+ color_changed_connection = color_picker->connectChanged(sigc::mem_fun(*this, &CloneTiler::on_picker_color_changed));
gtk_box_pack_start (GTK_BOX (hb), reinterpret_cast<GtkWidget*>(color_picker->gobj()), FALSE, FALSE, 0);
@@ -659,7 +646,7 @@ CloneTiler::CloneTiler () :
}
- GtkWidget *table = clonetiler_table_x_y_rand (3);
+ GtkWidget *table = table_x_y_rand (3);
gtk_box_pack_start (GTK_BOX (vb), table, FALSE, FALSE, 0);
// Hue
@@ -667,25 +654,25 @@ CloneTiler::CloneTiler () :
GtkWidget *l = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL(l), _("<b>H:</b>"));
gtk_size_group_add_widget(table_row_labels, l);
- clonetiler_table_attach (table, l, 1, 2, 1);
+ table_attach (table, l, 1, 2, 1);
}
{
- GtkWidget *l = clonetiler_spinbox (_("Change the tile hue by this percentage for each row"), "hue_per_j",
+ auto l = spinbox (_("Change the tile hue by this percentage for each row"), "hue_per_j",
-100, 100, "%");
- clonetiler_table_attach (table, l, 0, 2, 2);
+ table_attach (table, l, 0, 2, 2);
}
{
- GtkWidget *l = clonetiler_spinbox (_("Change the tile hue by this percentage for each column"), "hue_per_i",
+ auto l = spinbox (_("Change the tile hue by this percentage for each column"), "hue_per_i",
-100, 100, "%");
- clonetiler_table_attach (table, l, 0, 2, 3);
+ table_attach (table, l, 0, 2, 3);
}
{
- GtkWidget *l = clonetiler_spinbox (_("Randomize the tile hue by this percentage"), "hue_rand",
+ auto l = spinbox (_("Randomize the tile hue by this percentage"), "hue_rand",
0, 100, "%");
- clonetiler_table_attach (table, l, 0, 2, 4);
+ table_attach (table, l, 0, 2, 4);
}
@@ -694,25 +681,25 @@ CloneTiler::CloneTiler () :
GtkWidget *l = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL(l), _("<b>S:</b>"));
gtk_size_group_add_widget(table_row_labels, l);
- clonetiler_table_attach (table, l, 1, 3, 1);
+ table_attach (table, l, 1, 3, 1);
}
{
- GtkWidget *l = clonetiler_spinbox (_("Change the color saturation by this percentage for each row"), "saturation_per_j",
+ auto l = spinbox (_("Change the color saturation by this percentage for each row"), "saturation_per_j",
-100, 100, "%");
- clonetiler_table_attach (table, l, 0, 3, 2);
+ table_attach (table, l, 0, 3, 2);
}
{
- GtkWidget *l = clonetiler_spinbox (_("Change the color saturation by this percentage for each column"), "saturation_per_i",
+ auto l = spinbox (_("Change the color saturation by this percentage for each column"), "saturation_per_i",
-100, 100, "%");
- clonetiler_table_attach (table, l, 0, 3, 3);
+ table_attach (table, l, 0, 3, 3);
}
{
- GtkWidget *l = clonetiler_spinbox (_("Randomize the color saturation by this percentage"), "saturation_rand",
+ auto l = spinbox (_("Randomize the color saturation by this percentage"), "saturation_rand",
0, 100, "%");
- clonetiler_table_attach (table, l, 0, 3, 4);
+ table_attach (table, l, 0, 3, 4);
}
// Lightness
@@ -720,25 +707,25 @@ CloneTiler::CloneTiler () :
GtkWidget *l = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL(l), _("<b>L:</b>"));
gtk_size_group_add_widget(table_row_labels, l);
- clonetiler_table_attach (table, l, 1, 4, 1);
+ table_attach (table, l, 1, 4, 1);
}
{
- GtkWidget *l = clonetiler_spinbox (_("Change the color lightness by this percentage for each row"), "lightness_per_j",
+ auto l = spinbox (_("Change the color lightness by this percentage for each row"), "lightness_per_j",
-100, 100, "%");
- clonetiler_table_attach (table, l, 0, 4, 2);
+ table_attach (table, l, 0, 4, 2);
}
{
- GtkWidget *l = clonetiler_spinbox (_("Change the color lightness by this percentage for each column"), "lightness_per_i",
+ auto l = spinbox (_("Change the color lightness by this percentage for each column"), "lightness_per_i",
-100, 100, "%");
- clonetiler_table_attach (table, l, 0, 4, 3);
+ table_attach (table, l, 0, 4, 3);
}
{
- GtkWidget *l = clonetiler_spinbox (_("Randomize the color lightness by this percentage"), "lightness_rand",
+ auto l = spinbox (_("Randomize the color lightness by this percentage"), "lightness_rand",
0, 100, "%");
- clonetiler_table_attach (table, l, 0, 4, 4);
+ table_attach (table, l, 0, 4, 4);
}
@@ -746,135 +733,109 @@ CloneTiler::CloneTiler () :
GtkWidget *l = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL(l), _("<small>Alternate:</small>"));
gtk_size_group_add_widget(table_row_labels, l);
- clonetiler_table_attach (table, l, 1, 5, 1);
+ table_attach (table, l, 1, 5, 1);
}
{
- GtkWidget *l = clonetiler_checkbox (_("Alternate the sign of color changes for each row"), "color_alternatej");
- clonetiler_table_attach (table, l, 0, 5, 2);
+ auto l = checkbox (_("Alternate the sign of color changes for each row"), "color_alternatej");
+ table_attach (table, l, 0, 5, 2);
}
{
- GtkWidget *l = clonetiler_checkbox (_("Alternate the sign of color changes for each column"), "color_alternatei");
- clonetiler_table_attach (table, l, 0, 5, 3);
+ auto l = checkbox (_("Alternate the sign of color changes for each column"), "color_alternatei");
+ table_attach (table, l, 0, 5, 3);
}
}
// Trace
{
- GtkWidget *vb = clonetiler_new_tab (nb, _("_Trace"));
+ GtkWidget *vb = new_tab (nb, _("_Trace"));
{
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, VB_MARGIN);
+ auto hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, VB_MARGIN);
gtk_box_set_homogeneous(GTK_BOX(hb), FALSE);
-#else
- GtkWidget *hb = gtk_hbox_new(FALSE, VB_MARGIN);
-#endif
gtk_box_pack_start (GTK_BOX (vb), hb, FALSE, FALSE, 0);
- b = gtk_check_button_new_with_label (_("Trace the drawing under the clones/sprayed items"));
- g_object_set_data (G_OBJECT(b), "uncheckable", GINT_TO_POINTER(TRUE));
+ _b = Gtk::manage(new Gtk::CheckButton(_("Trace the drawing under the clones/sprayed items")));
+ _b->set_data("uncheckable", GINT_TO_POINTER(TRUE));
bool old = prefs->getBool(prefs_path + "dotrace");
- gtk_toggle_button_set_active ((GtkToggleButton *) b, old);
- gtk_widget_set_tooltip_text (b, _("For each clone/sprayed item, pick a value from the drawing in its location and apply it"));
- gtk_box_pack_start (GTK_BOX (hb), b, FALSE, FALSE, 0);
-
- g_signal_connect(G_OBJECT(b), "toggled",
- G_CALLBACK(clonetiler_do_pick_toggled), (gpointer)dlg);
+ _b->set_active(old);
+ _b->set_tooltip_text(_("For each clone/sprayed item, pick a value from the drawing in its location and apply it"));
+ gtk_box_pack_start (GTK_BOX (hb), GTK_WIDGET(_b->gobj()), FALSE, FALSE, 0);
+ _b->signal_toggled().connect(sigc::mem_fun(*this, &CloneTiler::do_pick_toggled));
}
{
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *vvb = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
+ auto vvb = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_box_set_homogeneous(GTK_BOX(vvb), FALSE);
-#else
- GtkWidget *vvb = gtk_vbox_new (FALSE, 0);
-#endif
gtk_box_pack_start (GTK_BOX (vb), vvb, FALSE, FALSE, 0);
- g_object_set_data (G_OBJECT(dlg), "dotrace", (gpointer) vvb);
-
+ _dotrace = vvb;
{
GtkWidget *frame = gtk_frame_new (_("1. Pick from the drawing:"));
gtk_box_pack_start (GTK_BOX (vvb), frame, FALSE, FALSE, 0);
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *table = gtk_grid_new();
+ auto table = gtk_grid_new();
gtk_grid_set_row_spacing(GTK_GRID(table), 4);
gtk_grid_set_column_spacing(GTK_GRID(table), 6);
-#else
- GtkWidget *table = gtk_table_new (3, 3, FALSE);
- gtk_table_set_row_spacings (GTK_TABLE (table), 4);
- gtk_table_set_col_spacings (GTK_TABLE (table), 6);
-#endif
gtk_container_add(GTK_CONTAINER(frame), table);
-
- GtkWidget* radio;
+ Gtk::RadioButtonGroup rb_group;
{
- radio = gtk_radio_button_new_with_label (NULL, _("Color"));
- gtk_widget_set_tooltip_text (radio, _("Pick the visible color and opacity"));
- clonetiler_table_attach (table, radio, 0.0, 1, 1);
- g_signal_connect (G_OBJECT (radio), "toggled",
- G_CALLBACK (clonetiler_pick_switched), GINT_TO_POINTER(PICK_COLOR));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), prefs->getInt(prefs_path + "pick", 0) == PICK_COLOR);
+ auto radio = Gtk::manage(new Gtk::RadioButton(rb_group, _("Color")));
+ radio->set_tooltip_text(_("Pick the visible color and opacity"));
+ table_attach(table, radio, 0.0, 1, 1);
+ radio->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this, &CloneTiler::pick_switched), PICK_COLOR));
+ radio->set_active(prefs->getInt(prefs_path + "pick", 0) == PICK_COLOR);
}
{
- radio = gtk_radio_button_new_with_label (gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio)), _("Opacity"));
- gtk_widget_set_tooltip_text (radio, _("Pick the total accumulated opacity"));
- clonetiler_table_attach (table, radio, 0.0, 2, 1);
- g_signal_connect (G_OBJECT (radio), "toggled",
- G_CALLBACK (clonetiler_pick_switched), GINT_TO_POINTER(PICK_OPACITY));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), prefs->getInt(prefs_path + "pick", 0) == PICK_OPACITY);
+ auto radio = Gtk::manage(new Gtk::RadioButton(rb_group, _("Opacity")));
+ radio->set_tooltip_text(_("Pick the total accumulated opacity"));
+ table_attach (table, radio, 0.0, 2, 1);
+ radio->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this, &CloneTiler::pick_switched), PICK_OPACITY));
+ radio->set_active(prefs->getInt(prefs_path + "pick", 0) == PICK_OPACITY);
}
{
- radio = gtk_radio_button_new_with_label (gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio)), _("R"));
- gtk_widget_set_tooltip_text (radio, _("Pick the Red component of the color"));
- clonetiler_table_attach (table, radio, 0.0, 1, 2);
- g_signal_connect (G_OBJECT (radio), "toggled",
- G_CALLBACK (clonetiler_pick_switched), GINT_TO_POINTER(PICK_R));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), prefs->getInt(prefs_path + "pick", 0) == PICK_R);
+ auto radio = Gtk::manage(new Gtk::RadioButton(rb_group, _("R")));
+ radio->set_tooltip_text(_("Pick the Red component of the color"));
+ table_attach (table, radio, 0.0, 1, 2);
+ radio->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this, &CloneTiler::pick_switched), PICK_R));
+ radio->set_active(prefs->getInt(prefs_path + "pick", 0) == PICK_R);
}
{
- radio = gtk_radio_button_new_with_label (gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio)), _("G"));
- gtk_widget_set_tooltip_text (radio, _("Pick the Green component of the color"));
- clonetiler_table_attach (table, radio, 0.0, 2, 2);
- g_signal_connect (G_OBJECT (radio), "toggled",
- G_CALLBACK (clonetiler_pick_switched), GINT_TO_POINTER(PICK_G));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), prefs->getInt(prefs_path + "pick", 0) == PICK_G);
+ auto radio = Gtk::manage(new Gtk::RadioButton(rb_group, _("G")));
+ radio->set_tooltip_text(_("Pick the Green component of the color"));
+ table_attach (table, radio, 0.0, 2, 2);
+ radio->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this, &CloneTiler::pick_switched), PICK_G));
+ radio->set_active(prefs->getInt(prefs_path + "pick", 0) == PICK_G);
}
{
- radio = gtk_radio_button_new_with_label (gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio)), _("B"));
- gtk_widget_set_tooltip_text (radio, _("Pick the Blue component of the color"));
- clonetiler_table_attach (table, radio, 0.0, 3, 2);
- g_signal_connect (G_OBJECT (radio), "toggled",
- G_CALLBACK (clonetiler_pick_switched), GINT_TO_POINTER(PICK_B));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), prefs->getInt(prefs_path + "pick", 0) == PICK_B);
+ auto radio = Gtk::manage(new Gtk::RadioButton(rb_group, _("B")));
+ radio->set_tooltip_text(_("Pick the Blue component of the color"));
+ table_attach (table, radio, 0.0, 3, 2);
+ radio->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this, &CloneTiler::pick_switched), PICK_B));
+ radio->set_active(prefs->getInt(prefs_path + "pick", 0) == PICK_B);
}
{
- radio = gtk_radio_button_new_with_label (gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio)), C_("Clonetiler color hue", "H"));
- gtk_widget_set_tooltip_text (radio, _("Pick the hue of the color"));
- clonetiler_table_attach (table, radio, 0.0, 1, 3);
- g_signal_connect (G_OBJECT (radio), "toggled",
- G_CALLBACK (clonetiler_pick_switched), GINT_TO_POINTER(PICK_H));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), prefs->getInt(prefs_path + "pick", 0) == PICK_H);
+ auto radio = Gtk::manage(new Gtk::RadioButton(rb_group, C_("Clonetiler color hue", "H")));
+ radio->set_tooltip_text(_("Pick the hue of the color"));
+ table_attach (table, radio, 0.0, 1, 3);
+ radio->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this, &CloneTiler::pick_switched), PICK_H));
+ radio->set_active(prefs->getInt(prefs_path + "pick", 0) == PICK_H);
}
{
- radio = gtk_radio_button_new_with_label (gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio)), C_("Clonetiler color saturation", "S"));
- gtk_widget_set_tooltip_text (radio, _("Pick the saturation of the color"));
- clonetiler_table_attach (table, radio, 0.0, 2, 3);
- g_signal_connect (G_OBJECT (radio), "toggled",
- G_CALLBACK (clonetiler_pick_switched), GINT_TO_POINTER(PICK_S));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), prefs->getInt(prefs_path + "pick", 0) == PICK_S);
+ auto radio = Gtk::manage(new Gtk::RadioButton(rb_group, C_("Clonetiler color saturation", "S")));
+ radio->set_tooltip_text(_("Pick the saturation of the color"));
+ table_attach (table, radio, 0.0, 2, 3);
+ radio->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this, &CloneTiler::pick_switched), PICK_S));
+ radio->set_active(prefs->getInt(prefs_path + "pick", 0) == PICK_S);
}
{
- radio = gtk_radio_button_new_with_label (gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio)), C_("Clonetiler color lightness", "L"));
- gtk_widget_set_tooltip_text (radio, _("Pick the lightness of the color"));
- clonetiler_table_attach (table, radio, 0.0, 3, 3);
- g_signal_connect (G_OBJECT (radio), "toggled",
- G_CALLBACK (clonetiler_pick_switched), GINT_TO_POINTER(PICK_L));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), prefs->getInt(prefs_path + "pick", 0) == PICK_L);
+ auto radio = Gtk::manage(new Gtk::RadioButton(rb_group, C_("Clonetiler color lightness", "L")));
+ radio->set_tooltip_text(_("Pick the lightness of the color"));
+ table_attach (table, radio, 0.0, 3, 3);
+ radio->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this, &CloneTiler::pick_switched), PICK_L));
+ radio->set_active(prefs->getInt(prefs_path + "pick", 0) == PICK_L);
}
}
@@ -883,48 +844,42 @@ CloneTiler::CloneTiler () :
GtkWidget *frame = gtk_frame_new (_("2. Tweak the picked value:"));
gtk_box_pack_start (GTK_BOX (vvb), frame, FALSE, FALSE, VB_MARGIN);
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *table = gtk_grid_new();
+ auto table = gtk_grid_new();
gtk_grid_set_row_spacing(GTK_GRID(table), 4);
gtk_grid_set_column_spacing(GTK_GRID(table), 6);
-#else
- GtkWidget *table = gtk_table_new (4, 2, FALSE);
- gtk_table_set_row_spacings (GTK_TABLE (table), 4);
- gtk_table_set_col_spacings (GTK_TABLE (table), 6);
-#endif
gtk_container_add(GTK_CONTAINER(frame), table);
{
GtkWidget *l = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL(l), _("Gamma-correct:"));
- clonetiler_table_attach (table, l, 1.0, 1, 1);
+ table_attach (table, l, 1.0, 1, 1);
}
{
- GtkWidget *l = clonetiler_spinbox (_("Shift the mid-range of the picked value upwards (>0) or downwards (<0)"), "gamma_picked",
+ auto l = spinbox (_("Shift the mid-range of the picked value upwards (>0) or downwards (<0)"), "gamma_picked",
-10, 10, "");
- clonetiler_table_attach (table, l, 0.0, 1, 2);
+ table_attach (table, l, 0.0, 1, 2);
}
{
GtkWidget *l = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL(l), _("Randomize:"));
- clonetiler_table_attach (table, l, 1.0, 1, 3);
+ table_attach (table, l, 1.0, 1, 3);
}
{
- GtkWidget *l = clonetiler_spinbox (_("Randomize the picked value by this percentage"), "rand_picked",
+ auto l = spinbox (_("Randomize the picked value by this percentage"), "rand_picked",
0, 100, "%");
- clonetiler_table_attach (table, l, 0.0, 1, 4);
+ table_attach (table, l, 0.0, 1, 4);
}
{
GtkWidget *l = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL(l), _("Invert:"));
- clonetiler_table_attach (table, l, 1.0, 2, 1);
+ table_attach (table, l, 1.0, 2, 1);
}
{
- GtkWidget *l = clonetiler_checkbox (_("Invert the picked value"), "invert_picked");
- clonetiler_table_attach (table, l, 0.0, 2, 2);
+ auto l = checkbox (_("Invert the picked value"), "invert_picked");
+ table_attach (table, l, 0.0, 2, 2);
}
}
@@ -932,55 +887,45 @@ CloneTiler::CloneTiler () :
GtkWidget *frame = gtk_frame_new (_("3. Apply the value to the clones':"));
gtk_box_pack_start (GTK_BOX (vvb), frame, FALSE, FALSE, 0);
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *table = gtk_grid_new();
+ auto table = gtk_grid_new();
gtk_grid_set_row_spacing(GTK_GRID(table), 4);
gtk_grid_set_column_spacing(GTK_GRID(table), 6);
-#else
- GtkWidget *table = gtk_table_new (2, 2, FALSE);
- gtk_table_set_row_spacings (GTK_TABLE (table), 4);
- gtk_table_set_col_spacings (GTK_TABLE (table), 6);
-#endif
gtk_container_add(GTK_CONTAINER(frame), table);
{
- GtkWidget *b = gtk_check_button_new_with_label (_("Presence"));
+ auto b = Gtk::manage(new Gtk::CheckButton(_("Presence")));
bool old = prefs->getBool(prefs_path + "pick_to_presence", true);
- gtk_toggle_button_set_active ((GtkToggleButton *) b, old);
- gtk_widget_set_tooltip_text (b, _("Each clone is created with the probability determined by the picked value in that point"));
- clonetiler_table_attach (table, b, 0.0, 1, 1);
- g_signal_connect(G_OBJECT(b), "toggled",
- G_CALLBACK(clonetiler_pick_to), (gpointer) "pick_to_presence");
+ b->set_active(old);
+ b->set_tooltip_text(_("Each clone is created with the probability determined by the picked value in that point"));
+ table_attach (table, b, 0.0, 1, 1);
+ b->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this, &CloneTiler::pick_to), b, "pick_to_presence"));
}
{
- GtkWidget *b = gtk_check_button_new_with_label (_("Size"));
+ auto b = Gtk::manage(new Gtk::CheckButton(_("Size")));
bool old = prefs->getBool(prefs_path + "pick_to_size");
- gtk_toggle_button_set_active ((GtkToggleButton *) b, old);
- gtk_widget_set_tooltip_text (b, _("Each clone's size is determined by the picked value in that point"));
- clonetiler_table_attach (table, b, 0.0, 2, 1);
- g_signal_connect(G_OBJECT(b), "toggled",
- G_CALLBACK(clonetiler_pick_to), (gpointer) "pick_to_size");
+ b->set_active(old);
+ b->set_tooltip_text(_("Each clone's size is determined by the picked value in that point"));
+ table_attach (table, b, 0.0, 2, 1);
+ b->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this, &CloneTiler::pick_to), b, "pick_to_size"));
}
{
- GtkWidget *b = gtk_check_button_new_with_label (_("Color"));
+ auto b = Gtk::manage(new Gtk::CheckButton(_("Color")));
bool old = prefs->getBool(prefs_path + "pick_to_color", 0);
- gtk_toggle_button_set_active ((GtkToggleButton *) b, old);
- gtk_widget_set_tooltip_text (b, _("Each clone is painted by the picked color (the original must have unset fill or stroke)"));
- clonetiler_table_attach (table, b, 0.0, 1, 2);
- g_signal_connect(G_OBJECT(b), "toggled",
- G_CALLBACK(clonetiler_pick_to), (gpointer) "pick_to_color");
+ b->set_active(old);
+ b->set_tooltip_text(_("Each clone is painted by the picked color (the original must have unset fill or stroke)"));
+ table_attach (table, b, 0.0, 1, 2);
+ b->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this, &CloneTiler::pick_to), b, "pick_to_color"));
}
{
- GtkWidget *b = gtk_check_button_new_with_label (_("Opacity"));
+ auto b = Gtk::manage(new Gtk::CheckButton(_("Opacity")));
bool old = prefs->getBool(prefs_path + "pick_to_opacity", 0);
- gtk_toggle_button_set_active ((GtkToggleButton *) b, old);
- gtk_widget_set_tooltip_text (b, _("Each clone's opacity is determined by the picked value in that point"));
- clonetiler_table_attach (table, b, 0.0, 2, 2);
- g_signal_connect(G_OBJECT(b), "toggled",
- G_CALLBACK(clonetiler_pick_to), (gpointer) "pick_to_opacity");
+ b->set_active(old);
+ b->set_tooltip_text(_("Each clone's opacity is determined by the picked value in that point"));
+ table_attach (table, b, 0.0, 2, 2);
+ b->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this, &CloneTiler::pick_to), b, "pick_to_opacity"));
}
}
gtk_widget_set_sensitive (vvb, prefs->getBool(prefs_path + "dotrace"));
@@ -988,12 +933,8 @@ CloneTiler::CloneTiler () :
}
{
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, VB_MARGIN);
+ auto hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, VB_MARGIN);
gtk_box_set_homogeneous(GTK_BOX(hb), FALSE);
-#else
- GtkWidget *hb = gtk_hbox_new(FALSE, VB_MARGIN);
-#endif
gtk_box_pack_start (GTK_BOX (mainbox), hb, FALSE, FALSE, 0);
GtkWidget *l = gtk_label_new(_(""));
gtk_label_set_markup (GTK_LABEL(l), _("Apply to tiled clones:"));
@@ -1001,296 +942,211 @@ CloneTiler::CloneTiler () :
}
// Rows/columns, width/height
{
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *table = gtk_grid_new();
+ auto table = gtk_grid_new();
gtk_grid_set_row_spacing(GTK_GRID(table), 4);
gtk_grid_set_column_spacing(GTK_GRID(table), 6);
-#else
- GtkWidget *table = gtk_table_new (2, 2, FALSE);
- gtk_table_set_row_spacings (GTK_TABLE (table), 4);
- gtk_table_set_col_spacings (GTK_TABLE (table), 6);
-#endif
gtk_container_set_border_width (GTK_CONTAINER (table), VB_MARGIN);
gtk_box_pack_start (GTK_BOX (mainbox), table, FALSE, FALSE, 0);
{
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, VB_MARGIN);
- gtk_box_set_homogeneous(GTK_BOX(hb), FALSE);
-#else
- GtkWidget *hb = gtk_hbox_new(FALSE, VB_MARGIN);
-#endif
- g_object_set_data (G_OBJECT(dlg), "rowscols", (gpointer) hb);
+ _rowscols = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL, VB_MARGIN));
{
-#if WITH_GTKMM_3_0
- Glib::RefPtr<Gtk::Adjustment>a = Gtk::Adjustment::create(0.0, 1, 500, 1, 10, 0);
-#else
- Gtk::Adjustment *a = new Gtk::Adjustment (0.0, 1, 500, 1, 10, 0);
-#endif
+ auto a = Gtk::Adjustment::create(0.0, 1, 500, 1, 10, 0);
int value = prefs->getInt(prefs_path + "jmax", 2);
a->set_value (value);
-#if WITH_GTKMM_3_0
- Inkscape::UI::Widget::SpinButton *sb = new Inkscape::UI::Widget::SpinButton(a, 1.0, 0);
-#else
- Inkscape::UI::Widget::SpinButton *sb = new Inkscape::UI::Widget::SpinButton (*a, 1.0, 0);
-#endif
+ auto sb = new Inkscape::UI::Widget::SpinButton(a, 1.0, 0);
sb->set_tooltip_text (_("How many rows in the tiling"));
sb->set_width_chars (7);
- gtk_box_pack_start (GTK_BOX (hb), GTK_WIDGET(sb->gobj()), TRUE, TRUE, 0);
+ _rowscols->pack_start(*sb, true, true, 0);
- // TODO: C++ification
- g_signal_connect(G_OBJECT(a->gobj()), "value_changed",
- G_CALLBACK(clonetiler_xy_changed), (gpointer) "jmax");
+ a->signal_value_changed().connect(sigc::bind(sigc::mem_fun(*this, &CloneTiler::xy_changed), a, "jmax"));
}
{
- GtkWidget *l = gtk_label_new ("");
- gtk_label_set_markup (GTK_LABEL(l), "&#215;");
-#if GTK_CHECK_VERSION(3,0,0)
- gtk_widget_set_halign(l, GTK_ALIGN_END);
-#else
- gtk_misc_set_alignment (GTK_MISC (l), 1.0, 0.5);
-#endif
- gtk_box_pack_start (GTK_BOX (hb), l, TRUE, TRUE, 0);
+ auto l = Gtk::manage(new Gtk::Label(""));
+ l->set_markup("&#215;");
+ l->set_halign(Gtk::ALIGN_END);
+ _rowscols->pack_start(*l, true, true, 0);
}
{
-#if WITH_GTKMM_3_0
- Glib::RefPtr<Gtk::Adjustment> a = Gtk::Adjustment::create(0.0, 1, 500, 1, 10, 0);
-#else
- Gtk::Adjustment *a = new Gtk::Adjustment (0.0, 1, 500, 1, 10, 0);
-#endif
+ auto a = Gtk::Adjustment::create(0.0, 1, 500, 1, 10, 0);
int value = prefs->getInt(prefs_path + "imax", 2);
a->set_value (value);
-#if WITH_GTKMM_3_0
- Inkscape::UI::Widget::SpinButton *sb = new Inkscape::UI::Widget::SpinButton(a, 1.0, 0);
-#else
- Inkscape::UI::Widget::SpinButton *sb = new Inkscape::UI::Widget::SpinButton (*a, 1.0, 0);
-#endif
+ auto sb = new Inkscape::UI::Widget::SpinButton(a, 1.0, 0);
sb->set_tooltip_text (_("How many columns in the tiling"));
sb->set_width_chars (7);
- gtk_box_pack_start (GTK_BOX (hb), GTK_WIDGET(sb->gobj()), TRUE, TRUE, 0);
+ _rowscols->pack_start(*sb, true, true, 0);
- // TODO: C++ification
- g_signal_connect(G_OBJECT(a->gobj()), "value_changed",
- G_CALLBACK(clonetiler_xy_changed), (gpointer) "imax");
+ a->signal_value_changed().connect(sigc::bind(sigc::mem_fun(*this, &CloneTiler::xy_changed), a, "imax"));
}
- clonetiler_table_attach (table, hb, 0.0, 1, 2);
+ table_attach (table, GTK_WIDGET(_rowscols->gobj()), 0.0, 1, 2);
}
{
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, VB_MARGIN);
- gtk_box_set_homogeneous(GTK_BOX(hb), FALSE);
-#else
- GtkWidget *hb = gtk_hbox_new(FALSE, VB_MARGIN);
-#endif
- g_object_set_data (G_OBJECT(dlg), "widthheight", (gpointer) hb);
+ _widthheight = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL, VB_MARGIN));
// unitmenu
unit_menu = new Inkscape::UI::Widget::UnitMenu();
unit_menu->setUnitType(Inkscape::Util::UNIT_TYPE_LINEAR);
unit_menu->setUnit(SP_ACTIVE_DESKTOP->getNamedView()->display_units->abbr);
- unitChangedConn = unit_menu->signal_changed().connect(sigc::mem_fun(*this, &CloneTiler::clonetiler_unit_changed));
+ unitChangedConn = unit_menu->signal_changed().connect(sigc::mem_fun(*this, &CloneTiler::unit_changed));
{
// Width spinbutton
-#if WITH_GTKMM_3_0
fill_width = Gtk::Adjustment::create(0.0, -1e6, 1e6, 1.0, 10.0, 0);
-#else
- fill_width = new Gtk::Adjustment (0.0, -1e6, 1e6, 1.0, 10.0, 0);
-#endif
double value = prefs->getDouble(prefs_path + "fillwidth", 50.0);
Inkscape::Util::Unit const *unit = unit_menu->getUnit();
gdouble const units = Inkscape::Util::Quantity::convert(value, "px", unit);
fill_width->set_value (units);
-#if WITH_GTKMM_3_0
- Inkscape::UI::Widget::SpinButton *e = new Inkscape::UI::Widget::SpinButton(fill_width, 1.0, 2);
-#else
- Inkscape::UI::Widget::SpinButton *e = new Inkscape::UI::Widget::SpinButton (*fill_width, 1.0, 2);
-#endif
+ auto e = new Inkscape::UI::Widget::SpinButton(fill_width, 1.0, 2);
e->set_tooltip_text (_("Width of the rectangle to be filled"));
e->set_width_chars (7);
e->set_digits (4);
- gtk_box_pack_start (GTK_BOX (hb), GTK_WIDGET(e->gobj()), TRUE, TRUE, 0);
- // TODO: C++ification
- g_signal_connect(G_OBJECT(fill_width->gobj()), "value_changed",
- G_CALLBACK(clonetiler_fill_width_changed), unit_menu);
+ _widthheight->pack_start(*e, true, true, 0);
+ fill_width->signal_value_changed().connect(sigc::mem_fun(*this, &CloneTiler::fill_width_changed));
}
{
- GtkWidget *l = gtk_label_new ("");
- gtk_label_set_markup (GTK_LABEL(l), "&#215;");
-#if GTK_CHECK_VERSION(3,0,0)
- gtk_widget_set_halign(l, GTK_ALIGN_END);
-#else
- gtk_misc_set_alignment (GTK_MISC (l), 1.0, 0.5);
-#endif
- gtk_box_pack_start (GTK_BOX (hb), l, TRUE, TRUE, 0);
+ auto l = Gtk::manage(new Gtk::Label(""));
+ l->set_markup("&#215;");
+ l->set_halign(Gtk::ALIGN_END);
+ _widthheight->pack_start(*l, true, true, 0);
}
{
// Height spinbutton
-#if WITH_GTKMM_3_0
fill_height = Gtk::Adjustment::create(0.0, -1e6, 1e6, 1.0, 10.0, 0);
-#else
- fill_height = new Gtk::Adjustment (0.0, -1e6, 1e6, 1.0, 10.0, 0);
-#endif
double value = prefs->getDouble(prefs_path + "fillheight", 50.0);
Inkscape::Util::Unit const *unit = unit_menu->getUnit();
gdouble const units = Inkscape::Util::Quantity::convert(value, "px", unit);
fill_height->set_value (units);
-#if WITH_GTKMM_3_0
- Inkscape::UI::Widget::SpinButton *e = new Inkscape::UI::Widget::SpinButton(fill_height, 1.0, 2);
-#else
- Inkscape::UI::Widget::SpinButton *e = new Inkscape::UI::Widget::SpinButton (*fill_height, 1.0, 2);
-#endif
+ auto e = new Inkscape::UI::Widget::SpinButton(fill_height, 1.0, 2);
e->set_tooltip_text (_("Height of the rectangle to be filled"));
e->set_width_chars (7);
e->set_digits (4);
- gtk_box_pack_start (GTK_BOX (hb), GTK_WIDGET(e->gobj()), TRUE, TRUE, 0);
- // TODO: C++ification
- g_signal_connect(G_OBJECT(fill_height->gobj()), "value_changed",
- G_CALLBACK(clonetiler_fill_height_changed), unit_menu);
+ _widthheight->pack_start(*e, true, true, 0);
+ fill_height->signal_value_changed().connect(sigc::mem_fun(*this, &CloneTiler::fill_height_changed));
}
- gtk_box_pack_start (GTK_BOX (hb), (GtkWidget*) unit_menu->gobj(), TRUE, TRUE, 0);
- clonetiler_table_attach (table, hb, 0.0, 2, 2);
+ _widthheight->pack_start(*unit_menu, true, true, 0);
+ table_attach (table, GTK_WIDGET(_widthheight->gobj()), 0.0, 2, 2);
}
// Switch
- GtkWidget* radio;
+ Gtk::RadioButtonGroup rb_group;
{
- radio = gtk_radio_button_new_with_label (NULL, _("Rows, columns: "));
- gtk_widget_set_tooltip_text (radio, _("Create the specified number of rows and columns"));
- clonetiler_table_attach (table, radio, 0.0, 1, 1);
- g_signal_connect (G_OBJECT (radio), "toggled", G_CALLBACK (clonetiler_switch_to_create), (gpointer) dlg);
- }
- if (!prefs->getBool(prefs_path + "fillrect")) {
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), TRUE);
- gtk_toggle_button_toggled (GTK_TOGGLE_BUTTON (radio));
+ auto radio = Gtk::manage(new Gtk::RadioButton(rb_group, _("Rows, columns: ")));
+ radio->set_tooltip_text(_("Create the specified number of rows and columns"));
+ table_attach (table, GTK_WIDGET(radio->gobj()), 0.0, 1, 1);
+ radio->signal_toggled().connect(sigc::mem_fun(*this, &CloneTiler::switch_to_create));
+
+ if (!prefs->getBool(prefs_path + "fillrect")) {
+ radio->set_active(true);
+ }
}
{
- radio = gtk_radio_button_new_with_label (gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio)), _("Width, height: "));
- gtk_widget_set_tooltip_text (radio, _("Fill the specified width and height with the tiling"));
- clonetiler_table_attach (table, radio, 0.0, 2, 1);
- g_signal_connect (G_OBJECT (radio), "toggled", G_CALLBACK (clonetiler_switch_to_fill), (gpointer) dlg);
- }
- if (prefs->getBool(prefs_path + "fillrect")) {
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), TRUE);
- gtk_toggle_button_toggled (GTK_TOGGLE_BUTTON (radio));
+ auto radio = Gtk::manage(new Gtk::RadioButton(rb_group, _("Width, height: ")));
+ radio->set_tooltip_text(_("Fill the specified width and height with the tiling"));
+ table_attach (table, GTK_WIDGET(radio->gobj()), 0.0, 2, 1);
+ radio->signal_toggled().connect(sigc::mem_fun(*this, &CloneTiler::switch_to_fill));
+
+ if (prefs->getBool(prefs_path + "fillrect")) {
+ radio->set_active(true);
+ }
}
}
// Use saved pos
{
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, VB_MARGIN);
- gtk_box_set_homogeneous(GTK_BOX(hb), FALSE);
-#else
- GtkWidget *hb = gtk_hbox_new(FALSE, VB_MARGIN);
-#endif
- gtk_box_pack_start (GTK_BOX (mainbox), hb, FALSE, FALSE, 0);
-
- GtkWidget *b = gtk_check_button_new_with_label (_("Use saved size and position of the tile"));
- bool keepbbox = prefs->getBool(prefs_path + "keepbbox", true);
- gtk_toggle_button_set_active ((GtkToggleButton *) b, keepbbox);
- gtk_widget_set_tooltip_text (b, _("Pretend that the size and position of the tile are the same as the last time you tiled it (if any), instead of using the current size"));
- gtk_box_pack_start (GTK_BOX (hb), b, FALSE, FALSE, 0);
-
- g_signal_connect(G_OBJECT(b), "toggled",
- G_CALLBACK(clonetiler_keep_bbox_toggled), NULL);
+ auto hb = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL, VB_MARGIN));
+ gtk_box_pack_start (GTK_BOX (mainbox), GTK_WIDGET(hb->gobj()), FALSE, FALSE, 0);
+
+ _cb_keep_bbox = Gtk::manage(new Gtk::CheckButton(_("Use saved size and position of the tile")));
+ auto keepbbox = prefs->getBool(prefs_path + "keepbbox", true);
+ _cb_keep_bbox->set_active(keepbbox);
+ _cb_keep_bbox->set_tooltip_text(_("Pretend that the size and position of the tile are the same "
+ "as the last time you tiled it (if any), instead of using the "
+ "current size"));
+ hb->pack_start(*_cb_keep_bbox, false, false, 0);
+ _cb_keep_bbox->signal_toggled().connect(sigc::mem_fun(*this, &CloneTiler::keep_bbox_toggled));
}
// Statusbar
{
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, VB_MARGIN);
+ auto hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, VB_MARGIN);
gtk_box_set_homogeneous(GTK_BOX(hb), FALSE);
-#else
- GtkWidget *hb = gtk_hbox_new(FALSE, VB_MARGIN);
-#endif
gtk_box_pack_end (GTK_BOX (mainbox), hb, FALSE, FALSE, 0);
GtkWidget *l = gtk_label_new("");
- g_object_set_data (G_OBJECT(dlg), "status", (gpointer) l);
+ _status = l;
gtk_box_pack_start (GTK_BOX (hb), l, FALSE, FALSE, 0);
}
// Buttons
{
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, VB_MARGIN);
+ auto hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, VB_MARGIN);
gtk_box_set_homogeneous(GTK_BOX(hb), FALSE);
-#else
- GtkWidget *hb = gtk_hbox_new(FALSE, VB_MARGIN);
-#endif
gtk_box_pack_start (GTK_BOX (mainbox), hb, FALSE, FALSE, 0);
{
- GtkWidget *b = gtk_button_new ();
- GtkWidget *l = gtk_label_new ("");
- gtk_label_set_markup_with_mnemonic (GTK_LABEL(l), _(" <b>_Create</b> "));
- gtk_container_add (GTK_CONTAINER(b), l);
- gtk_widget_set_tooltip_text (b, _("Create and tile the clones of the selection"));
- g_signal_connect (G_OBJECT (b), "clicked", G_CALLBACK (clonetiler_apply), dlg);
- gtk_box_pack_end (GTK_BOX (hb), b, FALSE, FALSE, 0);
+ auto b = Gtk::manage(new Gtk::Button());
+ auto l = Gtk::manage(new Gtk::Label(""));
+ l->set_markup_with_mnemonic(_(" <b>_Create</b> "));
+ b->add(*l);
+ b->set_tooltip_text(_("Create and tile the clones of the selection"));
+ b->signal_clicked().connect(sigc::mem_fun(*this, &CloneTiler::apply));
+ gtk_box_pack_end (GTK_BOX (hb), GTK_WIDGET(b->gobj()), FALSE, FALSE, 0);
}
{ // buttons which are enabled only when there are tiled clones
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *sb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
+ auto sb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous(GTK_BOX(sb), FALSE);
-#else
- GtkWidget *sb = gtk_hbox_new(FALSE, 0);
-#endif
gtk_box_pack_end (GTK_BOX (hb), sb, FALSE, FALSE, 0);
- g_object_set_data (G_OBJECT(dlg), "buttons_on_tiles", (gpointer) sb);
+ _buttons_on_tiles = sb;
{
// TRANSLATORS: if a group of objects are "clumped" together, then they
// are unevenly spread in the given amount of space - as shown in the
// diagrams on the left in the following screenshot:
// http://www.inkscape.org/screenshots/gallery/inkscape-0.42-CVS-tiles-unclump.png
// So unclumping is the process of spreading a number of objects out more evenly.
- GtkWidget *b = gtk_button_new_with_mnemonic (_(" _Unclump "));
- gtk_widget_set_tooltip_text (b, _("Spread out clones to reduce clumping; can be applied repeatedly"));
- g_signal_connect (G_OBJECT (b), "clicked", G_CALLBACK (clonetiler_unclump), NULL);
- gtk_box_pack_end (GTK_BOX (sb), b, FALSE, FALSE, 0);
+ auto b = Gtk::manage(new Gtk::Button(_(" _Unclump "), true));
+ b->set_tooltip_text(_("Spread out clones to reduce clumping; can be applied repeatedly"));
+ b->signal_clicked().connect(sigc::mem_fun(*this, &CloneTiler::unclump));
+ gtk_box_pack_end (GTK_BOX (sb), GTK_WIDGET(b->gobj()), FALSE, FALSE, 0);
}
{
- GtkWidget *b = gtk_button_new_with_mnemonic (_(" Re_move "));
- gtk_widget_set_tooltip_text (b, _("Remove existing tiled clones of the selected object (siblings only)"));
- g_signal_connect (G_OBJECT (b), "clicked", G_CALLBACK (clonetiler_remove), gpointer(dlg));
- gtk_box_pack_end (GTK_BOX (sb), b, FALSE, FALSE, 0);
+ auto b = Gtk::manage(new Gtk::Button(_(" Re_move "), true));
+ b->set_tooltip_text(_("Remove existing tiled clones of the selected object (siblings only)"));
+ b->signal_clicked().connect(sigc::mem_fun(*this, &CloneTiler::on_remove_button_clicked));
+ gtk_box_pack_end (GTK_BOX (sb), GTK_WIDGET(b->gobj()), FALSE, FALSE, 0);
}
// connect to global selection changed signal (so we can change desktops) and
// external_change (so we're not fooled by undo)
- selectChangedConn = INKSCAPE.signal_selection_changed.connect(sigc::bind(sigc::ptr_fun(&CloneTiler::clonetiler_change_selection), dlg));
- externChangedConn = INKSCAPE.signal_external_change.connect (sigc::bind(sigc::ptr_fun(&CloneTiler::clonetiler_external_change), dlg));
-
- g_signal_connect(G_OBJECT(dlg), "destroy", G_CALLBACK(clonetiler_disconnect_gsignal), this);
+ selectChangedConn = INKSCAPE.signal_selection_changed.connect(sigc::mem_fun(*this, &CloneTiler::change_selection));
+ externChangedConn = INKSCAPE.signal_external_change.connect(sigc::mem_fun(*this, &CloneTiler::external_change));
// update now
- clonetiler_change_selection (SP_ACTIVE_DESKTOP->getSelection(), dlg);
+ change_selection(SP_ACTIVE_DESKTOP->getSelection());
}
{
- GtkWidget *b = gtk_button_new_with_mnemonic (_(" R_eset "));
+ auto b = Gtk::manage(new Gtk::Button(_(" R_eset "), true));
// TRANSLATORS: "change" is a noun here
- gtk_widget_set_tooltip_text (b, _("Reset all shifts, scales, rotates, opacity and color changes in the dialog to zero"));
- g_signal_connect (G_OBJECT (b), "clicked", G_CALLBACK (clonetiler_reset), dlg);
- gtk_box_pack_start (GTK_BOX (hb), b, FALSE, FALSE, 0);
+ b->set_tooltip_text(_("Reset all shifts, scales, rotates, opacity and color changes in the dialog to zero"));
+ b->signal_clicked().connect(sigc::mem_fun(*this, &CloneTiler::reset));
+ gtk_box_pack_start (GTK_BOX (hb), GTK_WIDGET(b->gobj()), FALSE, FALSE, 0);
}
}
@@ -1307,8 +1163,9 @@ CloneTiler::CloneTiler () :
CloneTiler::~CloneTiler (void)
{
//subselChangedConn.disconnect();
- //selectChangedConn.disconnect();
//selectModifiedConn.disconnect();
+ selectChangedConn.disconnect();
+ externChangedConn.disconnect();
desktopChangeConn.disconnect();
deskTrack.disconnect();
color_changed_connection.disconnect();
@@ -1323,17 +1180,7 @@ void CloneTiler::setDesktop(SPDesktop *desktop)
void CloneTiler::setTargetDesktop(SPDesktop *desktop)
{
if (this->desktop != desktop) {
- if (this->desktop) {
- //selectModifiedConn.disconnect();
- //subselChangedConn.disconnect();
- //selectChangedConn.disconnect();
- }
this->desktop = desktop;
- if (desktop && desktop->selection) {
- //selectChangedConn = desktop->selection->connectChanged(sigc::hide(sigc::mem_fun(*this, &CloneTiler::clonetiler_change_selection)));
- //subselChangedConn = desktop->connectToolSubselectionChanged(sigc::hide(sigc::mem_fun(*this, &CloneTiler::clonetiler_change_selection)));
- //selectModifiedConn = desktop->selection->connectModified(sigc::hide<0>(sigc::mem_fun(*this, &CloneTiler::clonetiler_change_selection)));
- }
}
}
@@ -1353,50 +1200,38 @@ void CloneTiler::on_picker_color_changed(guint rgba)
is_updating = false;
}
-void CloneTiler::clonetiler_change_selection(Inkscape::Selection *selection, GtkWidget *dlg)
+void CloneTiler::change_selection(Inkscape::Selection *selection)
{
- GtkWidget *buttons = GTK_WIDGET(g_object_get_data (G_OBJECT(dlg), "buttons_on_tiles"));
- GtkWidget *status = GTK_WIDGET(g_object_get_data (G_OBJECT(dlg), "status"));
-
if (selection->isEmpty()) {
- gtk_widget_set_sensitive (buttons, FALSE);
- gtk_label_set_markup (GTK_LABEL(status), _("<small>Nothing selected.</small>"));
+ gtk_widget_set_sensitive (_buttons_on_tiles, FALSE);
+ gtk_label_set_markup (GTK_LABEL(_status), _("<small>Nothing selected.</small>"));
return;
}
- if (selection->itemList().size() > 1) {
- gtk_widget_set_sensitive (buttons, FALSE);
- gtk_label_set_markup (GTK_LABEL(status), _("<small>More than one object selected.</small>"));
+ if (boost::distance(selection->items()) > 1) {
+ gtk_widget_set_sensitive (_buttons_on_tiles, FALSE);
+ gtk_label_set_markup (GTK_LABEL(_status), _("<small>More than one object selected.</small>"));
return;
}
- guint n = clonetiler_number_of_clones(selection->singleItem());
+ guint n = number_of_clones(selection->singleItem());
if (n > 0) {
- gtk_widget_set_sensitive (buttons, TRUE);
+ gtk_widget_set_sensitive (_buttons_on_tiles, TRUE);
gchar *sta = g_strdup_printf (_("<small>Object has <b>%d</b> tiled clones.</small>"), n);
- gtk_label_set_markup (GTK_LABEL(status), sta);
+ gtk_label_set_markup (GTK_LABEL(_status), sta);
g_free (sta);
} else {
- gtk_widget_set_sensitive (buttons, FALSE);
- gtk_label_set_markup (GTK_LABEL(status), _("<small>Object has no tiled clones.</small>"));
+ gtk_widget_set_sensitive (_buttons_on_tiles, FALSE);
+ gtk_label_set_markup (GTK_LABEL(_status), _("<small>Object has no tiled clones.</small>"));
}
}
-void CloneTiler::clonetiler_external_change(GtkWidget *dlg)
-{
- clonetiler_change_selection (SP_ACTIVE_DESKTOP->getSelection(), dlg);
-}
-
-void CloneTiler::clonetiler_disconnect_gsignal(GObject *, gpointer source)
+void CloneTiler::external_change()
{
- g_return_if_fail(source != NULL);
-
- CloneTiler* dlg = reinterpret_cast<CloneTiler*>(source);
- dlg->selectChangedConn.disconnect();
- dlg->externChangedConn.disconnect();
+ change_selection(SP_ACTIVE_DESKTOP->getSelection());
}
-Geom::Affine CloneTiler::clonetiler_get_transform(
+Geom::Affine CloneTiler::get_transform(
// symmetry group
int type,
@@ -1998,7 +1833,7 @@ Geom::Affine CloneTiler::clonetiler_get_transform(
return Geom::identity();
}
-bool CloneTiler::clonetiler_is_a_clone_of(SPObject *tile, SPObject *obj)
+bool CloneTiler::is_a_clone_of(SPObject *tile, SPObject *obj)
{
bool result = false;
char *id_href = NULL;
@@ -2025,21 +1860,21 @@ bool CloneTiler::clonetiler_is_a_clone_of(SPObject *tile, SPObject *obj)
return result;
}
-void CloneTiler::clonetiler_trace_hide_tiled_clones_recursively(SPObject *from)
+void CloneTiler::trace_hide_tiled_clones_recursively(SPObject *from)
{
if (!trace_drawing)
return;
- for (SPObject *o = from->firstChild(); o != NULL; o = o->next) {
- SPItem *item = dynamic_cast<SPItem *>(o);
- if (item && clonetiler_is_a_clone_of(o, NULL)) {
+ for (auto& o: from->children) {
+ SPItem *item = dynamic_cast<SPItem *>(&o);
+ if (item && is_a_clone_of(&o, NULL)) {
item->invoke_hide(trace_visionkey); // FIXME: hide each tiled clone's original too!
}
- clonetiler_trace_hide_tiled_clones_recursively (o);
+ trace_hide_tiled_clones_recursively (&o);
}
}
-void CloneTiler::clonetiler_trace_setup(SPDocument *doc, gdouble zoom, SPItem *original)
+void CloneTiler::trace_setup(SPDocument *doc, gdouble zoom, SPItem *original)
{
trace_drawing = new Inkscape::Drawing();
/* Create ArenaItem and set transform */
@@ -2049,7 +1884,7 @@ void CloneTiler::clonetiler_trace_setup(SPDocument *doc, gdouble zoom, SPItem *o
// hide the (current) original and any tiled clones, we only want to pick the background
original->invoke_hide(trace_visionkey);
- clonetiler_trace_hide_tiled_clones_recursively(trace_doc->getRoot());
+ trace_hide_tiled_clones_recursively(trace_doc->getRoot());
trace_doc->getRoot()->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
trace_doc->ensureUpToDate();
@@ -2057,7 +1892,7 @@ void CloneTiler::clonetiler_trace_setup(SPDocument *doc, gdouble zoom, SPItem *o
trace_zoom = zoom;
}
-guint32 CloneTiler::clonetiler_trace_pick(Geom::Rect box)
+guint32 CloneTiler::trace_pick(Geom::Rect box)
{
if (!trace_drawing) {
return 0;
@@ -2081,7 +1916,7 @@ guint32 CloneTiler::clonetiler_trace_pick(Geom::Rect box)
return SP_RGBA32_F_COMPOSE (R, G, B, A);
}
-void CloneTiler::clonetiler_trace_finish()
+void CloneTiler::trace_finish()
{
if (trace_doc) {
trace_doc->getRoot()->invoke_hide(trace_visionkey);
@@ -2091,48 +1926,48 @@ void CloneTiler::clonetiler_trace_finish()
}
}
-void CloneTiler::clonetiler_unclump(GtkWidget */*widget*/, void *)
+void CloneTiler::unclump()
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
+ auto desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL) {
return;
}
- Inkscape::Selection *selection = desktop->getSelection();
+ auto selection = desktop->getSelection();
// check if something is selected
- if (selection->isEmpty() || selection->itemList().size() > 1) {
+ if (selection->isEmpty() || boost::distance(selection->items()) > 1) {
desktop->getMessageStack()->flash(Inkscape::WARNING_MESSAGE, _("Select <b>one object</b> whose tiled clones to unclump."));
return;
}
- SPObject *obj = selection->singleItem();
- SPObject *parent = obj->parent;
+ auto obj = selection->singleItem();
+ auto parent = obj->parent;
std::vector<SPItem*> to_unclump; // not including the original
- for (SPObject *child = parent->firstChild(); child != NULL; child = child->next) {
- if (clonetiler_is_a_clone_of (child, obj)) {
- to_unclump.push_back((SPItem*)child);
+ for (auto& child: parent->children) {
+ if (is_a_clone_of (&child, obj)) {
+ to_unclump.push_back((SPItem*)&child);
}
}
desktop->getDocument()->ensureUpToDate();
reverse(to_unclump.begin(),to_unclump.end());
- unclump (to_unclump);
+ ::unclump (to_unclump);
DocumentUndo::done(desktop->getDocument(), SP_VERB_DIALOG_CLONETILER,
_("Unclump tiled clones"));
}
-guint CloneTiler::clonetiler_number_of_clones(SPObject *obj)
+guint CloneTiler::number_of_clones(SPObject *obj)
{
SPObject *parent = obj->parent;
guint n = 0;
- for (SPObject *child = parent->firstChild(); child != NULL; child = child->next) {
- if (clonetiler_is_a_clone_of (child, obj)) {
+ for (auto& child: parent->children) {
+ if (is_a_clone_of (&child, obj)) {
n ++;
}
}
@@ -2140,7 +1975,7 @@ guint CloneTiler::clonetiler_number_of_clones(SPObject *obj)
return n;
}
-void CloneTiler::clonetiler_remove(GtkWidget */*widget*/, GtkWidget *dlg, bool do_undo/* = true*/)
+void CloneTiler::remove(bool do_undo/* = true*/)
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL) {
@@ -2150,7 +1985,7 @@ void CloneTiler::clonetiler_remove(GtkWidget */*widget*/, GtkWidget *dlg, bool d
Inkscape::Selection *selection = desktop->getSelection();
// check if something is selected
- if (selection->isEmpty() || selection->itemList().size() > 1) {
+ if (selection->isEmpty() || boost::distance(selection->items()) > 1) {
desktop->getMessageStack()->flash(Inkscape::WARNING_MESSAGE, _("Select <b>one object</b> whose tiled clones to remove."));
return;
}
@@ -2160,9 +1995,9 @@ void CloneTiler::clonetiler_remove(GtkWidget */*widget*/, GtkWidget *dlg, bool d
// remove old tiling
GSList *to_delete = NULL;
- for (SPObject *child = parent->firstChild(); child != NULL; child = child->next) {
- if (clonetiler_is_a_clone_of (child, obj)) {
- to_delete = g_slist_prepend (to_delete, child);
+ for (auto& child: parent->children) {
+ if (is_a_clone_of (&child, obj)) {
+ to_delete = g_slist_prepend (to_delete, &child);
}
}
for (GSList *i = to_delete; i; i = i->next) {
@@ -2172,7 +2007,7 @@ void CloneTiler::clonetiler_remove(GtkWidget */*widget*/, GtkWidget *dlg, bool d
}
g_slist_free (to_delete);
- clonetiler_change_selection (selection, dlg);
+ change_selection (selection);
if (do_undo) {
DocumentUndo::done(desktop->getDocument(), SP_VERB_DIALOG_CLONETILER,
@@ -2212,7 +2047,7 @@ double CloneTiler::randomize01(double val, double rand)
}
-void CloneTiler::clonetiler_apply(GtkWidget */*widget*/, GtkWidget *dlg)
+void CloneTiler::apply()
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL) {
@@ -2228,7 +2063,7 @@ void CloneTiler::clonetiler_apply(GtkWidget */*widget*/, GtkWidget *dlg)
}
// Check if more than one object is selected.
- if (selection->itemList().size() > 1) {
+ if (boost::distance(selection->items()) > 1) {
desktop->getMessageStack()->flash(Inkscape::ERROR_MESSAGE, _("If you want to clone several objects, <b>group</b> them and <b>clone the group</b>."));
return;
}
@@ -2237,9 +2072,8 @@ void CloneTiler::clonetiler_apply(GtkWidget */*widget*/, GtkWidget *dlg)
desktop->setWaitingCursor();
// set statusbar text
- GtkWidget *status = GTK_WIDGET(g_object_get_data (G_OBJECT(dlg), "status"));
- gtk_label_set_markup (GTK_LABEL(status), _("<small>Creating tiled clones...</small>"));
- gtk_widget_queue_draw(GTK_WIDGET(status));
+ gtk_label_set_markup (GTK_LABEL(_status), _("<small>Creating tiled clones...</small>"));
+ gtk_widget_queue_draw(GTK_WIDGET(_status));
gdk_window_process_all_updates();
SPObject *obj = selection->singleItem();
@@ -2252,7 +2086,7 @@ void CloneTiler::clonetiler_apply(GtkWidget */*widget*/, GtkWidget *dlg)
const char *id_href = g_strdup_printf("#%s", obj_repr->attribute("id"));
SPObject *parent = obj->parent;
- clonetiler_remove (NULL, dlg, false);
+ remove(false);
Geom::Scale scale = desktop->getDocument()->getDocumentScale().inverse();
double scale_units = scale[Geom::X]; // Use just x direction....
@@ -2341,7 +2175,7 @@ void CloneTiler::clonetiler_apply(GtkWidget */*widget*/, GtkWidget *dlg)
SPItem *item = dynamic_cast<SPItem *>(obj);
if (dotrace) {
- clonetiler_trace_setup (desktop->getDocument(), 1.0, item);
+ trace_setup(desktop->getDocument(), 1.0, item);
}
Geom::Point center;
@@ -2413,7 +2247,7 @@ void CloneTiler::clonetiler_apply(GtkWidget */*widget*/, GtkWidget *dlg)
// Note: We create a clone at 0,0 too, right over the original, in case our clones are colored
// Get transform from symmetry, shift, scale, rotation
- Geom::Affine orig_t = clonetiler_get_transform (type, i, j, center[Geom::X], center[Geom::Y], w, h,
+ Geom::Affine orig_t = get_transform (type, i, j, center[Geom::X], center[Geom::Y], w, h,
shiftx_per_i, shifty_per_i,
shiftx_per_j, shifty_per_j,
shiftx_rand, shifty_rand,
@@ -2487,7 +2321,7 @@ void CloneTiler::clonetiler_apply(GtkWidget */*widget*/, GtkWidget *dlg)
if (dotrace) {
Geom::Rect bbox_t = transform_rect (bbox_original, t*Geom::Scale(1.0/scale_units));
- guint32 rgba = clonetiler_trace_pick (bbox_t);
+ guint32 rgba = trace_pick (bbox_t);
float r = SP_RGBA32_R_F(rgba);
float g = SP_RGBA32_G_F(rgba);
float b = SP_RGBA32_B_F(rgba);
@@ -2647,10 +2481,10 @@ void CloneTiler::clonetiler_apply(GtkWidget */*widget*/, GtkWidget *dlg)
}
if (dotrace) {
- clonetiler_trace_finish ();
+ trace_finish ();
}
- clonetiler_change_selection (selection, dlg);
+ change_selection(selection);
desktop->clearWaitingCursor();
@@ -2658,111 +2492,84 @@ void CloneTiler::clonetiler_apply(GtkWidget */*widget*/, GtkWidget *dlg)
_("Create tiled clones"));
}
-GtkWidget * CloneTiler::clonetiler_new_tab(GtkWidget *nb, const gchar *label)
+GtkWidget * CloneTiler::new_tab(GtkWidget *nb, const gchar *label)
{
GtkWidget *l = gtk_label_new_with_mnemonic (label);
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *vb = gtk_box_new(GTK_ORIENTATION_VERTICAL, VB_MARGIN);
+ auto vb = gtk_box_new(GTK_ORIENTATION_VERTICAL, VB_MARGIN);
gtk_box_set_homogeneous(GTK_BOX(vb), FALSE);
-#else
- GtkWidget *vb = gtk_vbox_new (FALSE, VB_MARGIN);
-#endif
gtk_container_set_border_width (GTK_CONTAINER (vb), VB_MARGIN);
gtk_notebook_append_page (GTK_NOTEBOOK (nb), vb, l);
return vb;
}
-void CloneTiler::clonetiler_checkbox_toggled(GtkToggleButton *tb, gpointer *data)
+void CloneTiler::checkbox_toggled(Gtk::ToggleButton *tb,
+ const Glib::ustring &attr)
{
- const gchar *attr = (const gchar *) data;
- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
- prefs->setBool(prefs_path + attr, gtk_toggle_button_get_active(tb));
+ auto prefs = Inkscape::Preferences::get();
+ prefs->setBool(prefs_path + attr, tb->get_active());
}
-GtkWidget * CloneTiler::clonetiler_checkbox(const char *tip, const char *attr)
+Gtk::Widget * CloneTiler::checkbox(const char *tip,
+ const Glib::ustring &attr)
{
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, VB_MARGIN);
- gtk_box_set_homogeneous(GTK_BOX(hb), FALSE);
-#else
- GtkWidget *hb = gtk_hbox_new(FALSE, VB_MARGIN);
-#endif
-
- GtkWidget *b = gtk_check_button_new ();
- gtk_widget_set_tooltip_text (b, tip);
+ auto hb = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL, VB_MARGIN));
+ auto b = Gtk::manage(new Gtk::CheckButton());
+ b->set_tooltip_text(tip);
- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
- bool value = prefs->getBool(prefs_path + attr);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(b), value);
+ auto const prefs = Inkscape::Preferences::get();
+ auto const value = prefs->getBool(prefs_path + attr);
+ b->set_active(value);
- gtk_box_pack_end (GTK_BOX (hb), b, FALSE, TRUE, 0);
- g_signal_connect ( G_OBJECT (b), "clicked",
- G_CALLBACK (clonetiler_checkbox_toggled), (gpointer) attr);
+ hb->pack_end(*b, false, true);
+ b->signal_clicked().connect(sigc::bind(sigc::mem_fun(*this, &CloneTiler::checkbox_toggled), b, attr));
- g_object_set_data (G_OBJECT(b), "uncheckable", GINT_TO_POINTER(TRUE));
+ b->set_data("uncheckable", GINT_TO_POINTER(true));
return hb;
}
-void CloneTiler::clonetiler_value_changed(GtkAdjustment *adj, gpointer data)
+void CloneTiler::value_changed(Glib::RefPtr<Gtk::Adjustment> &adj,
+ Glib::ustring const &pref)
{
- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
- const gchar *pref = (const gchar *) data;
- prefs->setDouble(prefs_path + pref, gtk_adjustment_get_value (adj));
+ auto prefs = Inkscape::Preferences::get();
+ prefs->setDouble(prefs_path + pref, adj->get_value());
}
-GtkWidget * CloneTiler::clonetiler_spinbox(const char *tip, const char *attr, double lower, double upper, const gchar *suffix, bool exponent/* = false*/)
+Gtk::Widget * CloneTiler::spinbox(const char *tip,
+ const Glib::ustring &attr,
+ double lower,
+ double upper,
+ const gchar *suffix,
+ bool exponent/* = false*/)
{
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
- gtk_box_set_homogeneous(GTK_BOX(hb), FALSE);
-#else
- GtkWidget *hb = gtk_hbox_new(FALSE, 0);
-#endif
+ auto hb = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL, 0));
{
-#if WITH_GTKMM_3_0
- Glib::RefPtr<Gtk::Adjustment> a;
- if (exponent) {
- a = Gtk::Adjustment::create(1.0, lower, upper, 0.01, 0.05, 0);
- } else {
- a = Gtk::Adjustment::create(0.0, lower, upper, 0.1, 0.5, 0);
- }
-#else
- Gtk::Adjustment *a;
- if (exponent) {
- a = new Gtk::Adjustment (1.0, lower, upper, 0.01, 0.05, 0);
- } else {
- a = new Gtk::Adjustment (0.0, lower, upper, 0.1, 0.5, 0);
- }
-#endif
+ // Parameters for adjustment
+ auto const initial_value = (exponent ? 1.0 : 0.0);
+ auto const step_increment = (exponent ? 0.01 : 0.1);
+ auto const page_increment = (exponent ? 0.05 : 0.4);
- Inkscape::UI::Widget::SpinButton *sb;
-#if WITH_GTKMM_3_0
- if (exponent) {
- sb = new Inkscape::UI::Widget::SpinButton(a, 0.01, 2);
- } else {
- sb = new Inkscape::UI::Widget::SpinButton(a, 0.1, 1);
- }
-#else
- if (exponent) {
- sb = new Inkscape::UI::Widget::SpinButton (*a, 0.01, 2);
- } else {
- sb = new Inkscape::UI::Widget::SpinButton (*a, 0.1, 1);
- }
-#endif
+ auto a = Gtk::Adjustment::create(initial_value,
+ lower,
+ upper,
+ step_increment,
+ page_increment);
+
+ auto const climb_rate = (exponent ? 0.01 : 0.1);
+ auto const digits = (exponent ? 2 : 1);
+
+ auto sb = new Inkscape::UI::Widget::SpinButton(a, climb_rate, digits);
sb->set_tooltip_text (tip);
sb->set_width_chars (5);
sb->set_digits(3);
- gtk_box_pack_start (GTK_BOX (hb), GTK_WIDGET(sb->gobj()), FALSE, FALSE, SB_MARGIN);
+ hb->pack_start(*sb, false, false, SB_MARGIN);
- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
- double value = prefs->getDoubleLimited(prefs_path + attr, exponent? 1.0 : 0.0, lower, upper);
+ auto prefs = Inkscape::Preferences::get();
+ auto value = prefs->getDoubleLimited(prefs_path + attr, exponent? 1.0 : 0.0, lower, upper);
a->set_value (value);
- // TODO: C++ification
- g_signal_connect(G_OBJECT(a->gobj()), "value_changed",
- G_CALLBACK(clonetiler_value_changed), (gpointer) attr);
+ a->signal_value_changed().connect(sigc::bind(sigc::mem_fun(*this, &CloneTiler::value_changed), a, attr));
if (exponent) {
sb->set_data ("oneable", GINT_TO_POINTER(TRUE));
@@ -2772,49 +2579,43 @@ GtkWidget * CloneTiler::clonetiler_spinbox(const char *tip, const char *attr, do
}
{
- GtkWidget *l = gtk_label_new ("");
- gtk_label_set_markup (GTK_LABEL(l), suffix);
-#if GTK_CHECK_VERSION(3,0,0)
- gtk_widget_set_halign(l, GTK_ALIGN_END);
- gtk_widget_set_valign(l, GTK_ALIGN_START);
-#else
- gtk_misc_set_alignment (GTK_MISC (l), 1.0, 0);
-#endif
- gtk_box_pack_start (GTK_BOX (hb), l, FALSE, FALSE, 0);
+ auto l = Gtk::manage(new Gtk::Label(""));
+ l->set_markup(suffix);
+ l->set_halign(Gtk::ALIGN_END);
+ l->set_valign(Gtk::ALIGN_START);
+ hb->pack_start(*l);
}
return hb;
}
-void CloneTiler::clonetiler_symgroup_changed(GtkComboBox *cb, gpointer /*data*/)
+void CloneTiler::symgroup_changed(Gtk::ComboBox *cb)
{
- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
- gint group_new = gtk_combo_box_get_active (cb);
+ auto prefs = Inkscape::Preferences::get();
+ auto group_new = cb->get_active_row_number();
prefs->setInt(prefs_path + "symmetrygroup", group_new);
}
-void CloneTiler::clonetiler_xy_changed(GtkAdjustment *adj, gpointer data)
+void CloneTiler::xy_changed(Glib::RefPtr<Gtk::Adjustment> &adj, Glib::ustring const &pref)
{
- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
- const gchar *pref = (const gchar *) data;
- prefs->setInt(prefs_path + pref, (int) floor(gtk_adjustment_get_value (adj) + 0.5));
+ auto prefs = Inkscape::Preferences::get();
+ prefs->setInt(prefs_path + pref, (int) floor(adj->get_value() + 0.5));
}
-void CloneTiler::clonetiler_keep_bbox_toggled(GtkToggleButton *tb, gpointer /*data*/)
+void CloneTiler::keep_bbox_toggled()
{
- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
- prefs->setBool(prefs_path + "keepbbox", gtk_toggle_button_get_active(tb));
+ auto prefs = Inkscape::Preferences::get();
+ prefs->setBool(prefs_path + "keepbbox", _cb_keep_bbox->get_active());
}
-void CloneTiler::clonetiler_pick_to(GtkToggleButton *tb, gpointer data)
+void CloneTiler::pick_to(Gtk::ToggleButton *tb, Glib::ustring const &pref)
{
- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
- const gchar *pref = (const gchar *) data;
- prefs->setBool(prefs_path + pref, gtk_toggle_button_get_active(tb));
+ auto prefs = Inkscape::Preferences::get();
+ prefs->setBool(prefs_path + pref, tb->get_active());
}
-void CloneTiler::clonetiler_reset_recursive(GtkWidget *w)
+void CloneTiler::reset_recursive(GtkWidget *w)
{
if (w && G_IS_OBJECT(w)) {
{
@@ -2842,51 +2643,40 @@ void CloneTiler::clonetiler_reset_recursive(GtkWidget *w)
if (GTK_IS_CONTAINER(w)) {
GList *ch = gtk_container_get_children (GTK_CONTAINER(w));
for (GList *i = ch; i != NULL; i = i->next) {
- clonetiler_reset_recursive (GTK_WIDGET(i->data));
+ reset_recursive (GTK_WIDGET(i->data));
}
g_list_free (ch);
}
}
-void CloneTiler::clonetiler_reset(GtkWidget */*widget*/, GtkWidget *dlg)
+void CloneTiler::reset()
{
- clonetiler_reset_recursive (dlg);
+ reset_recursive(GTK_WIDGET(this->gobj()));
}
-void CloneTiler::clonetiler_table_attach(GtkWidget *table, GtkWidget *widget, float align, int row, int col)
+void CloneTiler::table_attach(GtkWidget *table, Gtk::Widget *widget, float align, int row, int col)
+{
+ table_attach(table, GTK_WIDGET(widget->gobj()), align, row, col);
+}
+
+void CloneTiler::table_attach(GtkWidget *table, GtkWidget *widget, float align, int row, int col)
{
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_halign(widget, GTK_ALIGN_FILL);
gtk_widget_set_valign(widget, GTK_ALIGN_START);
gtk_grid_attach(GTK_GRID(table), widget, col, row, 1, 1);
-#else
- GtkWidget *a = gtk_alignment_new (align, 0, 0, 0);
- gtk_container_add(GTK_CONTAINER(a), widget);
- gtk_table_attach ( GTK_TABLE (table), a, col, col + 1, row, row + 1, GTK_FILL, (GtkAttachOptions)0, 0, 0 );
-#endif
}
-GtkWidget * CloneTiler::clonetiler_table_x_y_rand(int values)
+GtkWidget * CloneTiler::table_x_y_rand(int values)
{
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *table = gtk_grid_new();
+ auto table = gtk_grid_new();
gtk_grid_set_row_spacing(GTK_GRID(table), 6);
gtk_grid_set_column_spacing(GTK_GRID(table), 8);
-#else
- GtkWidget *table = gtk_table_new (values + 2, 5, FALSE);
- gtk_table_set_row_spacings (GTK_TABLE (table), 6);
- gtk_table_set_col_spacings (GTK_TABLE (table), 8);
-#endif
gtk_container_set_border_width (GTK_CONTAINER (table), VB_MARGIN);
{
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
+ auto hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous(GTK_BOX(hb), FALSE);
-#else
- GtkWidget *hb = gtk_hbox_new (FALSE, 0);
-#endif
GtkWidget *i = sp_icon_new (Inkscape::ICON_SIZE_DECORATION, INKSCAPE_ICON("object-rows"));
gtk_box_pack_start (GTK_BOX (hb), i, FALSE, FALSE, 2);
@@ -2895,16 +2685,12 @@ GtkWidget * CloneTiler::clonetiler_table_x_y_rand(int values)
gtk_label_set_markup (GTK_LABEL(l), _("<small>Per row:</small>"));
gtk_box_pack_start (GTK_BOX (hb), l, FALSE, FALSE, 2);
- clonetiler_table_attach (table, hb, 0, 1, 2);
+ table_attach (table, hb, 0, 1, 2);
}
{
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
+ auto hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous(GTK_BOX(hb), FALSE);
-#else
- GtkWidget *hb = gtk_hbox_new (FALSE, 0);
-#endif
GtkWidget *i = sp_icon_new (Inkscape::ICON_SIZE_DECORATION, INKSCAPE_ICON("object-columns"));
gtk_box_pack_start (GTK_BOX (hb), i, FALSE, FALSE, 2);
@@ -2913,83 +2699,72 @@ GtkWidget * CloneTiler::clonetiler_table_x_y_rand(int values)
gtk_label_set_markup (GTK_LABEL(l), _("<small>Per column:</small>"));
gtk_box_pack_start (GTK_BOX (hb), l, FALSE, FALSE, 2);
- clonetiler_table_attach (table, hb, 0, 1, 3);
+ table_attach (table, hb, 0, 1, 3);
}
{
GtkWidget *l = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL(l), _("<small>Randomize:</small>"));
- clonetiler_table_attach (table, l, 0, 1, 4);
+ table_attach (table, l, 0, 1, 4);
}
return table;
}
-void CloneTiler::clonetiler_pick_switched(GtkToggleButton */*tb*/, gpointer data)
+void CloneTiler::pick_switched(PickType v)
{
- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
- guint v = GPOINTER_TO_INT (data);
+ auto prefs = Inkscape::Preferences::get();
prefs->setInt(prefs_path + "pick", v);
}
-
-void CloneTiler::clonetiler_switch_to_create(GtkToggleButton * /*tb*/, GtkWidget *dlg)
+void CloneTiler::switch_to_create()
{
- GtkWidget *rowscols = GTK_WIDGET(g_object_get_data (G_OBJECT(dlg), "rowscols"));
- GtkWidget *widthheight = GTK_WIDGET(g_object_get_data (G_OBJECT(dlg), "widthheight"));
-
- if (rowscols) {
- gtk_widget_set_sensitive (rowscols, TRUE);
+ if (_rowscols) {
+ _rowscols->set_sensitive(true);
}
- if (widthheight) {
- gtk_widget_set_sensitive (widthheight, FALSE);
+ if (_widthheight) {
+ _widthheight->set_sensitive(false);
}
- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ auto prefs = Inkscape::Preferences::get();
prefs->setBool(prefs_path + "fillrect", false);
}
-void CloneTiler::clonetiler_switch_to_fill(GtkToggleButton * /*tb*/, GtkWidget *dlg)
+void CloneTiler::switch_to_fill()
{
- GtkWidget *rowscols = GTK_WIDGET(g_object_get_data (G_OBJECT(dlg), "rowscols"));
- GtkWidget *widthheight = GTK_WIDGET(g_object_get_data (G_OBJECT(dlg), "widthheight"));
-
- if (rowscols) {
- gtk_widget_set_sensitive (rowscols, FALSE);
+ if (_rowscols) {
+ _rowscols->set_sensitive(false);
}
- if (widthheight) {
- gtk_widget_set_sensitive (widthheight, TRUE);
+ if (_widthheight) {
+ _widthheight->set_sensitive(true);
}
- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ auto prefs = Inkscape::Preferences::get();
prefs->setBool(prefs_path + "fillrect", true);
}
-
-
-
-void CloneTiler::clonetiler_fill_width_changed(GtkAdjustment *adj, Inkscape::UI::Widget::UnitMenu *u)
+void CloneTiler::fill_width_changed()
{
- gdouble const raw_dist = gtk_adjustment_get_value (adj);
- Inkscape::Util::Unit const *unit = u->getUnit();
- gdouble const pixels = Inkscape::Util::Quantity::convert(raw_dist, unit, "px");
+ auto const raw_dist = fill_width->get_value();
+ auto const unit = unit_menu->getUnit();
+ auto const pixels = Inkscape::Util::Quantity::convert(raw_dist, unit, "px");
- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ auto prefs = Inkscape::Preferences::get();
prefs->setDouble(prefs_path + "fillwidth", pixels);
}
-void CloneTiler::clonetiler_fill_height_changed(GtkAdjustment *adj, Inkscape::UI::Widget::UnitMenu *u)
+void CloneTiler::fill_height_changed()
{
- gdouble const raw_dist = gtk_adjustment_get_value (adj);
- Inkscape::Util::Unit const *unit = u->getUnit();
- gdouble const pixels = Inkscape::Util::Quantity::convert(raw_dist, unit, "px");
+ auto const raw_dist = fill_height->get_value();
+ auto const unit = unit_menu->getUnit();
+ auto const pixels = Inkscape::Util::Quantity::convert(raw_dist, unit, "px");
- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ auto prefs = Inkscape::Preferences::get();
prefs->setDouble(prefs_path + "fillheight", pixels);
}
-void CloneTiler::clonetiler_unit_changed()
+void CloneTiler::unit_changed()
{
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
gdouble width_pixels = prefs->getDouble(prefs_path + "fillwidth");
@@ -3003,22 +2778,21 @@ void CloneTiler::clonetiler_unit_changed()
gtk_adjustment_set_value(fill_height->gobj(), height_value);
}
-void CloneTiler::clonetiler_do_pick_toggled(GtkToggleButton *tb, GtkWidget *dlg)
+void CloneTiler::do_pick_toggled()
{
- GtkWidget *vvb = GTK_WIDGET(g_object_get_data (G_OBJECT(dlg), "dotrace"));
-
- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
- prefs->setBool(prefs_path + "dotrace", gtk_toggle_button_get_active (tb));
+ auto prefs = Inkscape::Preferences::get();
+ auto active = _b->get_active();
+ prefs->setBool(prefs_path + "dotrace", active);
- if (vvb) {
- gtk_widget_set_sensitive (vvb, gtk_toggle_button_get_active (tb));
+ if (_dotrace) {
+ gtk_widget_set_sensitive (_dotrace, active);
}
}
void CloneTiler::show_page_trace()
{
gtk_notebook_set_current_page(GTK_NOTEBOOK(nb),6);
- gtk_toggle_button_set_active ((GtkToggleButton *) b, false);
+ _b->set_active(false);
}
diff --git a/src/ui/dialog/clonetiler.h b/src/ui/dialog/clonetiler.h
index a8f1df0a0..db3049ef1 100644
--- a/src/ui/dialog/clonetiler.h
+++ b/src/ui/dialog/clonetiler.h
@@ -16,6 +16,12 @@
#include "ui/widget/color-picker.h"
#include "sp-root.h"
+namespace Gtk {
+ class CheckButton;
+ class ComboBox;
+ class ToggleButton;
+}
+
namespace Inkscape {
namespace UI {
@@ -33,45 +39,66 @@ public:
static CloneTiler &getInstance() { return *new CloneTiler(); }
void show_page_trace();
protected:
-
- GtkWidget * clonetiler_new_tab(GtkWidget *nb, const gchar *label);
- GtkWidget * clonetiler_table_x_y_rand(int values);
- GtkWidget * clonetiler_spinbox(const char *tip, const char *attr, double lower, double upper, const gchar *suffix, bool exponent = false);
- GtkWidget * clonetiler_checkbox(const char *tip, const char *attr);
- void clonetiler_table_attach(GtkWidget *table, GtkWidget *widget, float align, int row, int col);
-
- static void clonetiler_symgroup_changed(GtkComboBox *cb, gpointer /*data*/);
- static void clonetiler_remove(GtkWidget */*widget*/, GtkWidget *dlg, bool do_undo = true);
- static void on_picker_color_changed(guint rgba);
- static void clonetiler_trace_hide_tiled_clones_recursively(SPObject *from);
- static void clonetiler_checkbox_toggled(GtkToggleButton *tb, gpointer *data);
- static void clonetiler_pick_switched(GtkToggleButton */*tb*/, gpointer data);
- static void clonetiler_do_pick_toggled(GtkToggleButton *tb, GtkWidget *dlg);
- static void clonetiler_pick_to(GtkToggleButton *tb, gpointer data);
- static void clonetiler_xy_changed(GtkAdjustment *adj, gpointer data);
- static void clonetiler_fill_width_changed(GtkAdjustment *adj, Inkscape::UI::Widget::UnitMenu *u);
- static void clonetiler_fill_height_changed(GtkAdjustment *adj, Inkscape::UI::Widget::UnitMenu *u);
- void clonetiler_unit_changed();
- static void clonetiler_switch_to_create(GtkToggleButton */*tb*/, GtkWidget *dlg);
- static void clonetiler_switch_to_fill(GtkToggleButton */*tb*/, GtkWidget *dlg);
- static void clonetiler_keep_bbox_toggled(GtkToggleButton *tb, gpointer /*data*/);
- static void clonetiler_apply(GtkWidget */*widget*/, GtkWidget *dlg);
- static void clonetiler_unclump(GtkWidget */*widget*/, void *);
- static void clonetiler_change_selection(Inkscape::Selection *selection, GtkWidget *dlg);
- static void clonetiler_external_change(GtkWidget *dlg);
- static void clonetiler_disconnect_gsignal(GObject *widget, gpointer source);
- static void clonetiler_reset(GtkWidget */*widget*/, GtkWidget *dlg);
- static guint clonetiler_number_of_clones(SPObject *obj);
- static void clonetiler_trace_setup(SPDocument *doc, gdouble zoom, SPItem *original);
- static guint32 clonetiler_trace_pick(Geom::Rect box);
- static void clonetiler_trace_finish();
- static bool clonetiler_is_a_clone_of(SPObject *tile, SPObject *obj);
- static Geom::Rect transform_rect(Geom::Rect const &r, Geom::Affine const &m);
- static double randomize01(double val, double rand);
- static void clonetiler_value_changed(GtkAdjustment *adj, gpointer data);
- static void clonetiler_reset_recursive(GtkWidget *w);
-
- static Geom::Affine clonetiler_get_transform( // symmetry group
+ enum PickType {
+ PICK_COLOR,
+ PICK_OPACITY,
+ PICK_R,
+ PICK_G,
+ PICK_B,
+ PICK_H,
+ PICK_S,
+ PICK_L
+ };
+
+ GtkWidget * new_tab(GtkWidget *nb, const gchar *label);
+ GtkWidget * table_x_y_rand(int values);
+ Gtk::Widget * spinbox(const char *tip,
+ const Glib::ustring &attr,
+ double lower,
+ double upper,
+ const gchar *suffix,
+ bool exponent = false);
+ Gtk::Widget * checkbox(const char *tip,
+ const Glib::ustring &attr);
+ void table_attach(GtkWidget *table, GtkWidget *widget, float align, int row, int col);
+ void table_attach(GtkWidget *table, Gtk::Widget *widget, float align, int row, int col);
+
+ void symgroup_changed(Gtk::ComboBox *cb);
+ void on_picker_color_changed(guint rgba);
+ void trace_hide_tiled_clones_recursively(SPObject *from);
+ guint number_of_clones(SPObject *obj);
+ void trace_setup(SPDocument *doc, gdouble zoom, SPItem *original);
+ guint32 trace_pick(Geom::Rect box);
+ void trace_finish();
+ bool is_a_clone_of(SPObject *tile, SPObject *obj);
+ Geom::Rect transform_rect(Geom::Rect const &r, Geom::Affine const &m);
+ double randomize01(double val, double rand);
+
+ void apply();
+ void change_selection(Inkscape::Selection *selection);
+ void checkbox_toggled(Gtk::ToggleButton *tb,
+ Glib::ustring const &attr);
+ void do_pick_toggled();
+ void external_change();
+ void fill_width_changed();
+ void fill_height_changed();
+ void keep_bbox_toggled();
+ void on_remove_button_clicked() {remove();}
+ void pick_switched(PickType);
+ void pick_to(Gtk::ToggleButton *tb,
+ Glib::ustring const &pref);
+ void remove(bool do_undo = true);
+ void reset();
+ void reset_recursive(GtkWidget *w);
+ void switch_to_create();
+ void switch_to_fill();
+ void unclump();
+ void unit_changed();
+ void value_changed(Glib::RefPtr<Gtk::Adjustment> &adj, Glib::ustring const &pref);
+ void xy_changed(Glib::RefPtr<Gtk::Adjustment> &adj, Glib::ustring const &pref);
+
+ Geom::Affine get_transform(
+ // symmetry group
int type,
// row, column
@@ -112,22 +139,17 @@ private:
CloneTiler(CloneTiler const &d);
CloneTiler& operator=(CloneTiler const &d);
- GtkWidget *dlg;
+ Gtk::CheckButton *_b;
+ Gtk::CheckButton *_cb_keep_bbox;
GtkWidget *nb;
- GtkWidget *b;
SPDesktop *desktop;
DesktopTracker deskTrack;
Inkscape::UI::Widget::ColorPicker *color_picker;
GtkSizeGroup* table_row_labels;
Inkscape::UI::Widget::UnitMenu *unit_menu;
-#if WITH_GTKMM_3_0
Glib::RefPtr<Gtk::Adjustment> fill_width;
Glib::RefPtr<Gtk::Adjustment> fill_height;
-#else
- Gtk::Adjustment *fill_width;
- Gtk::Adjustment *fill_height;
-#endif
sigc::connection desktopChangeConn;
sigc::connection selectChangedConn;
@@ -147,21 +169,17 @@ private:
*/
void setTargetDesktop(SPDesktop *desktop);
+ // Variables that used to be set using GObject
+ GtkWidget *_buttons_on_tiles;
+ GtkWidget *_dotrace;
+ GtkWidget *_status;
+ Gtk::Box *_rowscols;
+ Gtk::Box *_widthheight;
+
};
enum {
- PICK_COLOR,
- PICK_OPACITY,
- PICK_R,
- PICK_G,
- PICK_B,
- PICK_H,
- PICK_S,
- PICK_L
-};
-
-enum {
TILE_P1,
TILE_P2,
TILE_PM,
diff --git a/src/ui/dialog/debug.cpp b/src/ui/dialog/debug.cpp
index d5ce6a160..d062bf863 100644
--- a/src/ui/dialog/debug.cpp
+++ b/src/ui/dialog/debug.cpp
@@ -67,12 +67,7 @@ DebugDialogImpl::DebugDialogImpl()
{
set_title(_("Messages"));
set_size_request(300, 400);
-
-#if WITH_GTKMM_3_0
- Gtk::Box *mainVBox = get_content_area();
-#else
- Gtk::Box *mainVBox = get_vbox();
-#endif
+ auto mainVBox = get_content_area();
//## Add a menu for clear()
Gtk::MenuItem* item = Gtk::manage(new Gtk::MenuItem(_("_File"), true));
diff --git a/src/ui/dialog/document-metadata.cpp b/src/ui/dialog/document-metadata.cpp
index 40495456b..dc1958434 100644
--- a/src/ui/dialog/document-metadata.cpp
+++ b/src/ui/dialog/document-metadata.cpp
@@ -60,12 +60,7 @@ DocumentMetadata::getInstance()
DocumentMetadata::DocumentMetadata()
-#if WITH_GTKMM_3_0
: UI::Widget::Panel ("", "/dialogs/documentmetadata", SP_VERB_DIALOG_METADATA)
-#else
- : UI::Widget::Panel ("", "/dialogs/documentmetadata", SP_VERB_DIALOG_METADATA),
- _page_metadata1(1, 1), _page_metadata2(1, 1)
-#endif
{
hide();
_getContents()->set_spacing (4);
@@ -74,15 +69,10 @@ DocumentMetadata::DocumentMetadata()
_page_metadata1.set_border_width(2);
_page_metadata2.set_border_width(2);
-#if WITH_GTKMM_3_0
_page_metadata1.set_column_spacing(2);
_page_metadata2.set_column_spacing(2);
_page_metadata1.set_row_spacing(2);
_page_metadata2.set_row_spacing(2);
-#else
- _page_metadata1.set_spacings(2);
- _page_metadata2.set_spacings(2);
-#endif
_notebook.append_page(_page_metadata1, _("Metadata"));
_notebook.append_page(_page_metadata2, _("License"));
@@ -125,12 +115,8 @@ DocumentMetadata::build_metadata()
label->set_markup (_("<b>Dublin Core Entities</b>"));
label->set_alignment (0.0);
-#if WITH_GTKMM_3_0
label->set_valign(Gtk::ALIGN_CENTER);
_page_metadata1.attach(*label, 0, 0, 3, 1);
-#else
- _page_metadata1.attach(*label, 0,3,0,1, Gtk::FILL, (Gtk::AttachOptions)0,0,0);
-#endif
/* add generic metadata entry areas */
struct rdf_work_entity_t * entity;
@@ -142,7 +128,6 @@ DocumentMetadata::build_metadata()
Gtk::HBox *space = Gtk::manage (new Gtk::HBox);
space->set_size_request (SPACE_SIZE_X, SPACE_SIZE_Y);
-#if WITH_GTKMM_3_0
space->set_valign(Gtk::ALIGN_CENTER);
_page_metadata1.attach(*space, 0, row, 1, 1);
@@ -152,11 +137,6 @@ DocumentMetadata::build_metadata()
w->_packable->set_hexpand();
w->_packable->set_valign(Gtk::ALIGN_CENTER);
_page_metadata1.attach(*w->_packable, 2, row, 1, 1);
-#else
- _page_metadata1.attach(*space, 0,1, row, row+1, Gtk::FILL, (Gtk::AttachOptions)0,0,0);
- _page_metadata1.attach(w->_label, 1,2, row, row+1, Gtk::FILL, (Gtk::AttachOptions)0,0,0);
- _page_metadata1.attach(*w->_packable, 2,3, row, row+1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
-#endif
}
}
@@ -166,31 +146,20 @@ DocumentMetadata::build_metadata()
Gtk::Label *llabel = Gtk::manage (new Gtk::Label);
llabel->set_markup (_("<b>License</b>"));
llabel->set_alignment (0.0);
-
-#if WITH_GTKMM_3_0
llabel->set_valign(Gtk::ALIGN_CENTER);
_page_metadata2.attach(*llabel, 0, row, 3, 1);
-#else
- _page_metadata2.attach(*llabel, 0,3, row, row+1, Gtk::FILL, (Gtk::AttachOptions)0,0,0);
-#endif
/* add license selector pull-down and URI */
++row;
_licensor.init (_wr);
Gtk::HBox *space = Gtk::manage (new Gtk::HBox);
space->set_size_request (SPACE_SIZE_X, SPACE_SIZE_Y);
-
-#if WITH_GTKMM_3_0
space->set_valign(Gtk::ALIGN_CENTER);
_page_metadata2.attach(*space, 0, row, 1, 1);
_licensor.set_hexpand();
_licensor.set_valign(Gtk::ALIGN_CENTER);
_page_metadata2.attach(_licensor, 1, row, 2, 1);
-#else
- _page_metadata2.attach(*space, 0,1, row, row+1, Gtk::FILL, (Gtk::AttachOptions)0,0,0);
- _page_metadata2.attach(_licensor, 1,3, row, row+1, Gtk::EXPAND|Gtk::FILL, (Gtk::AttachOptions)0,0,0);
-#endif
}
/**
diff --git a/src/ui/dialog/document-metadata.h b/src/ui/dialog/document-metadata.h
index cde5d92fd..2c56e9317 100644
--- a/src/ui/dialog/document-metadata.h
+++ b/src/ui/dialog/document-metadata.h
@@ -21,12 +21,7 @@
#include <stddef.h>
#include "ui/widget/panel.h"
#include <gtkmm/notebook.h>
-
-#if WITH_GTKMM_3_0
-# include <gtkmm/grid.h>
-#else
-# include <gtkmm/table.h>
-#endif
+#include <gtkmm/grid.h>
#include "inkscape.h"
#include "ui/widget/licensor.h"
@@ -62,13 +57,8 @@ protected:
Gtk::Notebook _notebook;
-#if WITH_GTKMM_3_0
Gtk::Grid _page_metadata1;
Gtk::Grid _page_metadata2;
-#else
- Gtk::Table _page_metadata1;
- Gtk::Table _page_metadata2;
-#endif
//---------------------------------------------------------------
RDElist _rdflist;
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp
index 5b7887b35..053549b73 100644
--- a/src/ui/dialog/document-properties.cpp
+++ b/src/ui/dialog/document-properties.cpp
@@ -211,25 +211,16 @@ DocumentProperties::~DocumentProperties()
* widget in columns 2-3; (non-0, 0) means label in columns 1-3; and
* (non-0, non-0) means two widgets in columns 2 and 3.
*/
-#if WITH_GTKMM_3_0
inline void attach_all(Gtk::Grid &table, Gtk::Widget *const arr[], unsigned const n, int start = 0, int docum_prop_flag = 0)
-#else
-inline void attach_all(Gtk::Table &table, Gtk::Widget *const arr[], unsigned const n, int start = 0, int docum_prop_flag = 0)
-#endif
{
for (unsigned i = 0, r = start; i < n; i += 2) {
if (arr[i] && arr[i+1]) {
-#if WITH_GTKMM_3_0
arr[i]->set_hexpand();
arr[i+1]->set_hexpand();
arr[i]->set_valign(Gtk::ALIGN_CENTER);
arr[i+1]->set_valign(Gtk::ALIGN_CENTER);
table.attach(*arr[i], 1, r, 1, 1);
table.attach(*arr[i+1], 2, r, 1, 1);
-#else
- table.attach(*arr[i], 1, 2, r, r+1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
- table.attach(*arr[i+1], 2, 3, r, r+1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
-#endif
} else {
if (arr[i+1]) {
Gtk::AttachOptions yoptions = (Gtk::AttachOptions)0;
@@ -240,7 +231,6 @@ inline void attach_all(Gtk::Table &table, Gtk::Widget *const arr[], unsigned con
if (docum_prop_flag) {
// this sets the padding for subordinate widgets on the "Page" page
if( i==(n-8) || i==(n-10) ) {
-#if WITH_GTKMM_3_0
arr[i+1]->set_hexpand();
arr[i+1]->set_margin_left(20);
arr[i+1]->set_margin_right(20);
@@ -251,11 +241,7 @@ inline void attach_all(Gtk::Table &table, Gtk::Widget *const arr[], unsigned con
arr[i+1]->set_valign(Gtk::ALIGN_CENTER);
table.attach(*arr[i+1], 1, r, 2, 1);
-#else
- table.attach(*arr[i+1], 1, 3, r, r+1, Gtk::FILL|Gtk::EXPAND, yoptions, 20,0);
-#endif
} else {
-#if WITH_GTKMM_3_0
arr[i+1]->set_hexpand();
if (yoptions & Gtk::EXPAND)
@@ -264,12 +250,8 @@ inline void attach_all(Gtk::Table &table, Gtk::Widget *const arr[], unsigned con
arr[i+1]->set_valign(Gtk::ALIGN_CENTER);
table.attach(*arr[i+1], 1, r, 2, 1);
-#else
- table.attach(*arr[i+1], 1, 3, r, r+1, Gtk::FILL|Gtk::EXPAND, yoptions, 0,0);
-#endif
}
} else {
-#if WITH_GTKMM_3_0
arr[i+1]->set_hexpand();
if (yoptions & Gtk::EXPAND)
@@ -278,32 +260,21 @@ inline void attach_all(Gtk::Table &table, Gtk::Widget *const arr[], unsigned con
arr[i+1]->set_valign(Gtk::ALIGN_CENTER);
table.attach(*arr[i+1], 1, r, 2, 1);
-#else
- table.attach(*arr[i+1], 1, 3, r, r+1, Gtk::FILL|Gtk::EXPAND, yoptions, 0,0);
-#endif
}
} else if (arr[i]) {
Gtk::Label& label = reinterpret_cast<Gtk::Label&>(*arr[i]);
label.set_alignment (0.0);
-#if WITH_GTKMM_3_0
label.set_hexpand();
label.set_valign(Gtk::ALIGN_CENTER);
table.attach(label, 0, r, 3, 1);
-#else
- table.attach (label, 0, 3, r, r+1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
-#endif
} else {
Gtk::HBox *space = Gtk::manage (new Gtk::HBox);
space->set_size_request (SPACE_SIZE_X, SPACE_SIZE_Y);
-#if WITH_GTKMM_3_0
space->set_halign(Gtk::ALIGN_CENTER);
space->set_valign(Gtk::ALIGN_CENTER);
table.attach(*space, 0, r, 1, 1);
-#else
- table.attach (*space, 0, 1, r, r+1, (Gtk::AttachOptions)0, (Gtk::AttachOptions)0,0,0);
-#endif
}
}
++r;
@@ -673,52 +644,35 @@ void DocumentProperties::build_cms()
label_link->set_alignment(0.0);
-#if WITH_GTKMM_3_0
label_link->set_hexpand();
label_link->set_valign(Gtk::ALIGN_CENTER);
_page_cms->table().attach(*label_link, 0, row, 3, 1);
-#else
- _page_cms->table().attach(*label_link, 0, 3, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0);
-#endif
row++;
-#if WITH_GTKMM_3_0
_LinkedProfilesListScroller.set_hexpand();
_LinkedProfilesListScroller.set_valign(Gtk::ALIGN_CENTER);
_page_cms->table().attach(_LinkedProfilesListScroller, 0, row, 3, 1);
-#else
- _page_cms->table().attach(_LinkedProfilesListScroller, 0, 3, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0);
-#endif
row++;
Gtk::HBox* spacer = Gtk::manage(new Gtk::HBox());
spacer->set_size_request(SPACE_SIZE_X, SPACE_SIZE_Y);
-#if WITH_GTKMM_3_0
spacer->set_hexpand();
spacer->set_valign(Gtk::ALIGN_CENTER);
_page_cms->table().attach(*spacer, 0, row, 3, 1);
-#else
- _page_cms->table().attach(*spacer, 0, 3, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0);
-#endif
row++;
label_avail->set_alignment(0.0);
-#if WITH_GTKMM_3_0
label_avail->set_hexpand();
label_avail->set_valign(Gtk::ALIGN_CENTER);
_page_cms->table().attach(*label_avail, 0, row, 3, 1);
-#else
- _page_cms->table().attach(*label_avail, 0, 3, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0);
-#endif
row++;
-#if WITH_GTKMM_3_0
_AvailableProfilesList.set_hexpand();
_AvailableProfilesList.set_valign(Gtk::ALIGN_CENTER);
_page_cms->table().attach(_AvailableProfilesList, 0, row, 1, 1);
@@ -732,11 +686,6 @@ void DocumentProperties::build_cms()
_unlink_btn.set_halign(Gtk::ALIGN_CENTER);
_unlink_btn.set_valign(Gtk::ALIGN_CENTER);
_page_cms->table().attach(_unlink_btn, 2, row, 1, 1);
-#else
- _page_cms->table().attach(_AvailableProfilesList, 0, 1, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0);
- _page_cms->table().attach(_link_btn, 1, 2, row, row + 1, (Gtk::AttachOptions)0, (Gtk::AttachOptions)0, 2, 0);
- _page_cms->table().attach(_unlink_btn, 2, 3, row, row + 1, (Gtk::AttachOptions)0, (Gtk::AttachOptions)0, 0, 0);
-#endif
// Set up the Avialable Profiles combo box
_AvailableProfilesListStore = Gtk::ListStore::create(_AvailableProfilesListColumns);
@@ -803,41 +752,27 @@ void DocumentProperties::build_scripting()
gint row = 0;
label_external->set_alignment(0.0);
-
-#if WITH_GTKMM_3_0
label_external->set_hexpand();
label_external->set_valign(Gtk::ALIGN_CENTER);
_page_external_scripts->table().attach(*label_external, 0, row, 3, 1);
-#else
- _page_external_scripts->table().attach(*label_external, 0, 3, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0);
-#endif
row++;
-#if WITH_GTKMM_3_0
_ExternalScriptsListScroller.set_hexpand();
_ExternalScriptsListScroller.set_valign(Gtk::ALIGN_CENTER);
_page_external_scripts->table().attach(_ExternalScriptsListScroller, 0, row, 3, 1);
-#else
- _page_external_scripts->table().attach(_ExternalScriptsListScroller, 0, 3, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0);
-#endif
row++;
Gtk::HBox* spacer_external = Gtk::manage(new Gtk::HBox());
spacer_external->set_size_request(SPACE_SIZE_X, SPACE_SIZE_Y);
-#if WITH_GTKMM_3_0
spacer_external->set_hexpand();
spacer_external->set_valign(Gtk::ALIGN_CENTER);
_page_external_scripts->table().attach(*spacer_external, 0, row, 3, 1);
-#else
- _page_external_scripts->table().attach(*spacer_external, 0, 3, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0);
-#endif
row++;
-#if WITH_GTKMM_3_0
_script_entry.set_hexpand();
_script_entry.set_valign(Gtk::ALIGN_CENTER);
_page_external_scripts->table().attach(_script_entry, 0, row, 1, 1);
@@ -851,11 +786,6 @@ void DocumentProperties::build_scripting()
_external_remove_btn.set_halign(Gtk::ALIGN_CENTER);
_external_remove_btn.set_valign(Gtk::ALIGN_CENTER);
_page_external_scripts->table().attach(_external_remove_btn, 2, row, 1, 1);
-#else
- _page_external_scripts->table().attach(_script_entry, 0, 1, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0);
- _page_external_scripts->table().attach(_external_add_btn, 1, 2, row, row + 1, (Gtk::AttachOptions)0, (Gtk::AttachOptions)0, 2, 0);
- _page_external_scripts->table().attach(_external_remove_btn, 2, 3, row, row + 1, (Gtk::AttachOptions)0, (Gtk::AttachOptions)0, 0, 0);
-#endif
//# Set up the External Scripts box
_ExternalScriptsListStore = Gtk::ListStore::create(_ExternalScriptsListColumns);
@@ -876,12 +806,6 @@ void DocumentProperties::build_scripting()
_embed_remove_btn.set_tooltip_text(_("Remove"));
docprops_style_button(_embed_remove_btn, INKSCAPE_ICON("list-remove"));
-#if !WITH_GTKMM_3_0
- // TODO: This has been removed from Gtkmm 3.0. Check that
- // everything still looks OK!
- _embed_button_box.set_child_min_width( 16 );
- _embed_button_box.set_spacing( 4 );
-#endif
_embed_button_box.set_layout (Gtk::BUTTONBOX_START);
_embed_button_box.add(_embed_new_btn);
_embed_button_box.add(_embed_remove_btn);
@@ -890,47 +814,29 @@ void DocumentProperties::build_scripting()
row = 0;
label_embedded->set_alignment(0.0);
-
-#if WITH_GTKMM_3_0
label_embedded->set_hexpand();
label_embedded->set_valign(Gtk::ALIGN_CENTER);
_page_embedded_scripts->table().attach(*label_embedded, 0, row, 3, 1);
-#else
- _page_embedded_scripts->table().attach(*label_embedded, 0, 3, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0);
-#endif
row++;
-#if WITH_GTKMM_3_0
_EmbeddedScriptsListScroller.set_hexpand();
_EmbeddedScriptsListScroller.set_valign(Gtk::ALIGN_CENTER);
_page_embedded_scripts->table().attach(_EmbeddedScriptsListScroller, 0, row, 3, 1);
-#else
- _page_embedded_scripts->table().attach(_EmbeddedScriptsListScroller, 0, 3, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0);
-#endif
row++;
-#if WITH_GTKMM_3_0
_embed_button_box.set_hexpand();
_embed_button_box.set_valign(Gtk::ALIGN_CENTER);
_page_embedded_scripts->table().attach(_embed_button_box, 0, row, 1, 1);
-#else
- _page_embedded_scripts->table().attach(_embed_button_box, 0, 1, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0);
-#endif
row++;
Gtk::HBox* spacer_embedded = Gtk::manage(new Gtk::HBox());
spacer_embedded->set_size_request(SPACE_SIZE_X, SPACE_SIZE_Y);
-
-#if WITH_GTKMM_3_0
spacer_embedded->set_hexpand();
spacer_embedded->set_valign(Gtk::ALIGN_CENTER);
_page_embedded_scripts->table().attach(*spacer_embedded, 0, row, 3, 1);
-#else
- _page_embedded_scripts->table().attach(*spacer_embedded, 0, 3, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0);
-#endif
row++;
@@ -946,24 +852,15 @@ void DocumentProperties::build_scripting()
label_embedded_content->set_markup (_("<b>Content:</b>"));
label_embedded_content->set_alignment(0.0);
-
-#if WITH_GTKMM_3_0
label_embedded_content->set_hexpand();
label_embedded_content->set_valign(Gtk::ALIGN_CENTER);
_page_embedded_scripts->table().attach(*label_embedded_content, 0, row, 3, 1);
-#else
- _page_embedded_scripts->table().attach(*label_embedded_content, 0, 3, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0);
-#endif
row++;
-#if WITH_GTKMM_3_0
_EmbeddedContentScroller.set_hexpand();
_EmbeddedContentScroller.set_valign(Gtk::ALIGN_CENTER);
_page_embedded_scripts->table().attach(_EmbeddedContentScroller, 0, row, 3, 1);
-#else
- _page_embedded_scripts->table().attach(_EmbeddedContentScroller, 0, 3, row, row + 1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0, 0, 0);
-#endif
_EmbeddedContentScroller.add(_EmbeddedContent);
_EmbeddedContentScroller.set_shadow_type(Gtk::SHADOW_IN);
@@ -1025,12 +922,8 @@ void DocumentProperties::build_metadata()
label->set_markup (_("<b>Dublin Core Entities</b>"));
label->set_alignment (0.0);
-#if WITH_GTKMM_3_0
label->set_valign(Gtk::ALIGN_CENTER);
_page_metadata1->table().attach (*label, 0,0,3,1);
-#else
- _page_metadata1->table().attach (*label, 0,3,0,1, Gtk::FILL, (Gtk::AttachOptions)0,0,0);
-#endif
/* add generic metadata entry areas */
struct rdf_work_entity_t * entity;
@@ -1041,8 +934,6 @@ void DocumentProperties::build_metadata()
_rdflist.push_back (w);
Gtk::HBox *space = Gtk::manage (new Gtk::HBox);
space->set_size_request (SPACE_SIZE_X, SPACE_SIZE_Y);
-
-#if WITH_GTKMM_3_0
space->set_valign(Gtk::ALIGN_CENTER);
_page_metadata1->table().attach(*space, 0, row, 1, 1);
@@ -1052,11 +943,6 @@ void DocumentProperties::build_metadata()
w->_packable->set_hexpand();
w->_packable->set_valign(Gtk::ALIGN_CENTER);
_page_metadata1->table().attach(*w->_packable, 2, row, 1, 1);
-#else
- _page_metadata1->table().attach (*space, 0,1, row, row+1, Gtk::FILL, (Gtk::AttachOptions)0,0,0);
- _page_metadata1->table().attach (w->_label, 1,2, row, row+1, Gtk::FILL, (Gtk::AttachOptions)0,0,0);
- _page_metadata1->table().attach (*w->_packable, 2,3, row, row+1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
-#endif
}
}
@@ -1065,11 +951,7 @@ void DocumentProperties::build_metadata()
Gtk::Button *button_load = Gtk::manage (new Gtk::Button(_("Use _default"),1));
button_load->set_tooltip_text(_("Use the previously saved default metadata here"));
-#if WITH_GTKMM_3_0
- Gtk::ButtonBox *box_buttons = Gtk::manage (new Gtk::ButtonBox);
-#else
- Gtk::HButtonBox *box_buttons = Gtk::manage (new Gtk::HButtonBox);
-#endif
+ auto box_buttons = Gtk::manage (new Gtk::ButtonBox);
box_buttons->set_layout(Gtk::BUTTONBOX_END);
box_buttons->set_spacing(4);
@@ -1087,12 +969,8 @@ void DocumentProperties::build_metadata()
llabel->set_markup (_("<b>License</b>"));
llabel->set_alignment (0.0);
-#if WITH_GTKMM_3_0
llabel->set_valign(Gtk::ALIGN_CENTER);
_page_metadata2->table().attach(*llabel, 0, row, 3, 1);
-#else
- _page_metadata2->table().attach (*llabel, 0,3, row, row+1, Gtk::FILL, (Gtk::AttachOptions)0,0,0);
-#endif
/* add license selector pull-down and URI */
++row;
@@ -1100,17 +978,12 @@ void DocumentProperties::build_metadata()
Gtk::HBox *space = Gtk::manage (new Gtk::HBox);
space->set_size_request (SPACE_SIZE_X, SPACE_SIZE_Y);
-#if WITH_GTKMM_3_0
space->set_valign(Gtk::ALIGN_CENTER);
_page_metadata2->table().attach(*space, 0, row, 1, 1);
_licensor.set_hexpand();
_licensor.set_valign(Gtk::ALIGN_CENTER);
_page_metadata2->table().attach(_licensor, 1, row, 3, 1);
-#else
- _page_metadata2->table().attach (*space, 0,1, row, row+1, Gtk::FILL, (Gtk::AttachOptions)0,0,0);
- _page_metadata2->table().attach (_licensor, 1,3, row, row+1, Gtk::EXPAND|Gtk::FILL, (Gtk::AttachOptions)0,0,0);
-#endif
}
void DocumentProperties::addExternalScript(){
@@ -1303,12 +1176,7 @@ void DocumentProperties::changeEmbeddedScript(){
for (std::vector<SPObject *>::const_iterator it = current.begin(); it != current.end(); ++it) {
SPObject* obj = *it;
if (id == obj->getId()){
-
- int count=0;
- for ( SPObject *child = obj->children ; child; child = child->next )
- {
- count++;
- }
+ int count = (int) obj->children.size();
if (count>1)
g_warning("TODO: Found a script element with multiple (%d) child nodes! We must implement support for that!", count);
@@ -1352,8 +1220,11 @@ void DocumentProperties::editEmbeddedScript(){
//XML Tree being used directly here while it shouldn't be.
Inkscape::XML::Node *repr = obj->getRepr();
if (repr){
- SPObject *child;
- while (NULL != (child = obj->firstChild())) child->deleteObject();
+ auto tmp = obj->children | boost::adaptors::transformed([](SPObject& o) { return &o; });
+ std::vector<SPObject*> vec(tmp.begin(), tmp.end());
+ for (auto &child: vec) {
+ child->deleteObject();
+ }
obj->appendChildRepr(xml_doc->createTextNode(_EmbeddedContent.get_buffer()->get_text().c_str()));
//TODO repr->set_content(_EmbeddedContent.get_buffer()->get_text());
diff --git a/src/ui/dialog/document-properties.h b/src/ui/dialog/document-properties.h
index 7f91d9ea0..8d1c6b38a 100644
--- a/src/ui/dialog/document-properties.h
+++ b/src/ui/dialog/document-properties.h
@@ -173,11 +173,7 @@ protected:
Gtk::Button _external_remove_btn;
Gtk::Button _embed_new_btn;
Gtk::Button _embed_remove_btn;
-#if WITH_GTKMM_3_0
- Gtk::ButtonBox _embed_button_box;
-#else
- Gtk::HButtonBox _embed_button_box;
-#endif
+ Gtk::ButtonBox _embed_button_box;
class ExternalScriptsColumns : public Gtk::TreeModel::ColumnRecord
{
diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp
index 28acfdfb5..670e4c8b5 100644
--- a/src/ui/dialog/export.cpp
+++ b/src/ui/dialog/export.cpp
@@ -24,15 +24,10 @@
#include <gtkmm/buttonbox.h>
#include <gtkmm/dialog.h>
#include <gtkmm/entry.h>
+#include <gtkmm/grid.h>
#include <gtkmm/spinbutton.h>
#include <gtkmm/stock.h>
-#if WITH_GTKMM_3_0
-# include <gtkmm/grid.h>
-#else
-# include <gtkmm/table.h>
-#endif
-
#ifdef WITH_GNOME_VFS
# include <libgnomevfs/gnome-vfs-init.h> // gnome_vfs_initialized
#endif
@@ -63,12 +58,7 @@
#include "helper/png-write.h"
-#if WITH_EXT_GDL
#include <gdl/gdl-dock-item.h>
-#else
-#include "libgdl/gdl-dock-item.h"
-#endif
-
// required to set status message after export
#include "desktop.h"
@@ -205,15 +195,9 @@ Export::Export (void) :
selectiontype_buttons[i]->signal_clicked().connect(sigc::mem_fun(*this, &Export::onAreaToggled));
}
-#if WITH_GTKMM_3_0
- Gtk::Grid* t = new Gtk::Grid();
+ auto t = new Gtk::Grid();
t->set_row_spacing(4);
t->set_column_spacing(4);
-#else
- Gtk::Table* t = new Gtk::Table(3, 4, false);
- t->set_row_spacings (4);
- t->set_col_spacings (4);
-#endif
x0_adj = createSpinbutton ( "x0", 0.0, -1000000.0, 1000000.0, 0.1, 1.0,
t, 0, 0, _("_x0:"), "", EXPORT_COORD_PRECISION, 1,
@@ -255,15 +239,9 @@ Export::Export (void) :
bm_label->set_use_markup(true);
size_box.pack_start(*bm_label, false, false, 0);
-#if WITH_GTKMM_3_0
- Gtk::Grid *t = new Gtk::Grid();
+ auto t = new Gtk::Grid();
t->set_row_spacing(4);
t->set_column_spacing(4);
-#else
- Gtk::Table *t = new Gtk::Table(2, 5, false);
- t->set_row_spacings (4);
- t->set_col_spacings (4);
-#endif
size_box.pack_start(*t);
@@ -471,27 +449,14 @@ void Export::set_default_filename () {
}
}
-#if WITH_GTKMM_3_0
Glib::RefPtr<Gtk::Adjustment> Export::createSpinbutton( gchar const * /*key*/, float val, float min, float max,
float step, float page,
Gtk::Grid *t, int x, int y,
const Glib::ustring& ll, const Glib::ustring& lr,
int digits, unsigned int sensitive,
void (Export::*cb)() )
-#else
-Gtk::Adjustment * Export::createSpinbutton( gchar const * /*key*/, float val, float min, float max,
- float step, float page,
- Gtk::Table *t, int x, int y,
- const Glib::ustring& ll, const Glib::ustring& lr,
- int digits, unsigned int sensitive,
- void (Export::*cb)() )
-#endif
{
-#if WITH_GTKMM_3_0
- Glib::RefPtr<Gtk::Adjustment> adj = Gtk::Adjustment::create(val, min, max, step, page, 0);
-#else
- Gtk::Adjustment *adj = new Gtk::Adjustment ( val, min, max, step, page, 0 );
-#endif
+ auto adj = Gtk::Adjustment::create(val, min, max, step, page, 0);
int pos = 0;
Gtk::Label *l = NULL;
@@ -499,28 +464,17 @@ Gtk::Adjustment * Export::createSpinbutton( gchar const * /*key*/, float val, fl
if (!ll.empty()) {
l = new Gtk::Label(ll,true);
l->set_alignment (1.0, 0.5);
-
-#if WITH_GTKMM_3_0
l->set_hexpand();
l->set_vexpand();
t->attach(*l, x + pos, y, 1, 1);
-#else
- t->attach (*l, x + pos, x + pos + 1, y, y + 1, Gtk::EXPAND, Gtk::EXPAND, 0, 0 );
-#endif
-
l->set_sensitive(sensitive);
pos++;
}
-#if WITH_GTKMM_3_0
- Gtk::SpinButton *sb = new Gtk::SpinButton(adj, 1.0, digits);
+ auto sb = new Gtk::SpinButton(adj, 1.0, digits);
sb->set_hexpand();
sb->set_vexpand();
t->attach(*sb, x + pos, y, 1, 1);
-#else
- Gtk::SpinButton *sb = new Gtk::SpinButton(*adj, 1.0, digits);
- t->attach (*sb, x + pos, x + pos + 1, y, y + 1, Gtk::EXPAND, Gtk::EXPAND, 0, 0 );
-#endif
sb->set_width_chars(7);
sb->set_sensitive (sensitive);
@@ -533,15 +487,9 @@ Gtk::Adjustment * Export::createSpinbutton( gchar const * /*key*/, float val, fl
if (!lr.empty()) {
l = new Gtk::Label(lr,true);
l->set_alignment (0.0, 0.5);
-
-#if WITH_GTKMM_3_0
l->set_hexpand();
l->set_vexpand();
t->attach(*l, x + pos, y, 1, 1);
-#else
- t->attach (*l, x + pos, x + pos + 1, y, y + 1, Gtk::EXPAND, Gtk::EXPAND, 0, 0 );
-#endif
-
l->set_sensitive (sensitive);
pos++;
l->set_mnemonic_widget (*sb);
@@ -595,7 +543,7 @@ void Export::onBatchClicked ()
void Export::updateCheckbuttons ()
{
- gint num = SP_ACTIVE_DESKTOP->getSelection()->itemList().size();
+ gint num = (gint) boost::distance(SP_ACTIVE_DESKTOP->getSelection()->items());
if (num >= 2) {
batch_export.set_sensitive(true);
batch_export.set_label(g_strdup_printf (ngettext("B_atch export %d selected object","B_atch export %d selected objects",num), num));
@@ -801,14 +749,14 @@ void Export::onAreaToggled ()
case SELECTION_SELECTION:
if ((SP_ACTIVE_DESKTOP->getSelection())->isEmpty() == false) {
- sp_selection_get_export_hints (SP_ACTIVE_DESKTOP->getSelection(), filename, &xdpi, &ydpi);
+ sp_object_set_get_export_hints(SP_ACTIVE_DESKTOP->getSelection(), filename, &xdpi, &ydpi);
/* If we still don't have a filename -- let's build
one that's nice */
if (filename.empty()) {
const gchar * id = "object";
- const std::vector<XML::Node*> reprlst = SP_ACTIVE_DESKTOP->getSelection()->reprList();
- for(std::vector<XML::Node*>::const_iterator i=reprlst.begin(); reprlst.end() != i; ++i) {
+ auto reprlst = SP_ACTIVE_DESKTOP->getSelection()->xmlNodes();
+ for(auto i=reprlst.begin(); reprlst.end() != i; ++i) {
Inkscape::XML::Node * repr = *i;
if (repr->attribute("id")) {
id = repr->attribute("id");
@@ -919,11 +867,7 @@ Gtk::Dialog * Export::create_progress_dialog (Glib::ustring progress_text) {
Gtk::ProgressBar *prg = new Gtk::ProgressBar ();
prg->set_text(progress_text);
dlg->set_data ("progress", prg);
-#if GTK_CHECK_VERSION(3,0,0)
- Gtk::Box* CA = dlg->get_content_area();
-#else
- Gtk::Box* CA = dlg->get_vbox();
-#endif
+ auto CA = dlg->get_content_area();
CA->pack_start(*prg, FALSE, FALSE, 4);
Gtk::Button* btn = dlg->add_button (Gtk::Stock::CANCEL,Gtk::RESPONSE_CANCEL );
@@ -1002,7 +946,7 @@ void Export::onExport ()
if (batch_export.get_active ()) {
// Batch export of selected objects
- gint num = (desktop->getSelection()->itemList()).size();
+ gint num = (gint) boost::distance(desktop->getSelection()->items());
gint n = 0;
if (num < 1) {
@@ -1016,8 +960,8 @@ void Export::onExport ()
gint export_count = 0;
- std::vector<SPItem*> itemlist=desktop->getSelection()->itemList();
- for(std::vector<SPItem*>::const_iterator i = itemlist.begin();i!=itemlist.end() && !interrupted ;++i){
+ auto itemlist= desktop->getSelection()->items();
+ for(auto i = itemlist.begin();i!=itemlist.end() && !interrupted ;++i){
SPItem *item = *i;
prog_dlg->set_data("current", GINT_TO_POINTER(n));
@@ -1057,12 +1001,13 @@ void Export::onExport ()
MessageCleaner msgFlashCleanup(desktop->messageStack()->flashF(Inkscape::IMMEDIATE_MESSAGE,
_("Exporting file <b>%s</b>..."), safeFile), desktop);
std::vector<SPItem*> x;
+ std::vector<SPItem*> selected(desktop->getSelection()->items().begin(), desktop->getSelection()->items().end());
if (!sp_export_png_file (doc, path.c_str(),
*area, width, height, dpi, dpi,
nv->pagecolor,
onProgressCallback, (void*)prog_dlg,
TRUE, // overwrite without asking
- hide ? (desktop->getSelection()->itemList()) : x
+ hide ? selected : x
)) {
gchar * error = g_strdup_printf(_("Could not export to filename %s.\n"), safeFile);
@@ -1147,12 +1092,13 @@ void Export::onExport ()
/* Do export */
std::vector<SPItem*> x;
+ std::vector<SPItem*> selected(desktop->getSelection()->items().begin(), desktop->getSelection()->items().end());
ExportResult status = sp_export_png_file(desktop->getDocument(), path.c_str(),
Geom::Rect(Geom::Point(x0, y0), Geom::Point(x1, y1)), width, height, xdpi, ydpi,
nv->pagecolor,
onProgressCallback, (void*)prog_dlg,
FALSE,
- hide ? (desktop->getSelection()->itemList()) : x
+ hide ? selected : x
);
if (status == EXPORT_ERROR) {
gchar * safeFile = Inkscape::IO::sanitizeString(path.c_str());
@@ -1218,15 +1164,14 @@ void Export::onExport ()
break;
}
case SELECTION_SELECTION: {
- std::vector<XML::Node*> reprlst;
SPDocument * doc = SP_ACTIVE_DOCUMENT;
bool modified = false;
bool saved = DocumentUndo::getUndoSensitive(doc);
DocumentUndo::setUndoSensitive(doc, false);
- reprlst = desktop->getSelection()->reprList();
+ auto reprlst = desktop->getSelection()->xmlNodes();
- for(std::vector<Inkscape::XML::Node*>::const_iterator i=reprlst.begin(); reprlst.end() != i; ++i) {
+ for(auto i=reprlst.begin(); reprlst.end() != i; ++i) {
Inkscape::XML::Node * repr = *i;
const gchar * temp_string;
Glib::ustring dir = Glib::path_get_dirname(filename.c_str());
@@ -1344,11 +1289,7 @@ void Export::onBrowse ()
Glib::RefPtr<const Gdk::Window> parentWindow = desktop->getToplevel()->get_window();
g_assert(parentWindow->gobj() != NULL);
-#if WITH_GTKMM_3_0
opf.hwndOwner = (HWND)gdk_win32_window_get_handle((GdkWindow*)parentWindow->gobj());
-#else
- opf.hwndOwner = (HWND)gdk_win32_drawable_get_handle((GdkDrawable*)parentWindow->gobj());
-#endif
opf.lpstrFilter = filter_string;
opf.lpstrCustomFilter = 0;
opf.nMaxCustFilter = 0L;
@@ -1508,11 +1449,7 @@ void Export::detectSize() {
} /* sp_export_detect_size */
/// Called when area x0 value is changed
-#if WITH_GTKMM_3_0
void Export::areaXChange(Glib::RefPtr<Gtk::Adjustment>& adj)
-#else
-void Export::areaXChange (Gtk::Adjustment *adj)
-#endif
{
float x0, x1, xdpi, width;
@@ -1551,11 +1488,7 @@ void Export::areaXChange (Gtk::Adjustment *adj)
} // end of sp_export_area_x_value_changed()
/// Called when area y0 value is changed.
-#if WITH_GTKMM_3_0
void Export::areaYChange(Glib::RefPtr<Gtk::Adjustment>& adj)
-#else
-void Export::areaYChange (Gtk::Adjustment *adj)
-#endif
{
float y0, y1, ydpi, height;
@@ -1862,11 +1795,7 @@ void Export::setArea( double x0, double y0, double x1, double y1 )
* @param adj The adjustment widget
* @param val What value to set it to.
*/
-#if WITH_GTKMM_3_0
void Export::setValue(Glib::RefPtr<Gtk::Adjustment>& adj, double val )
-#else
-void Export::setValue( Gtk::Adjustment *adj, double val )
-#endif
{
if (adj) {
adj->set_value(val);
@@ -1884,11 +1813,7 @@ void Export::setValue( Gtk::Adjustment *adj, double val )
* @param adj The adjustment widget
* @param val What the value should be in points.
*/
-#if WITH_GTKMM_3_0
void Export::setValuePx(Glib::RefPtr<Gtk::Adjustment>& adj, double val)
-#else
-void Export::setValuePx( Gtk::Adjustment *adj, double val)
-#endif
{
Unit const *unit = unit_selector.getUnit();
@@ -1907,11 +1832,7 @@ void Export::setValuePx( Gtk::Adjustment *adj, double val)
*
* @return The value in the specified adjustment.
*/
-#if WITH_GTKMM_3_0
float Export::getValue(Glib::RefPtr<Gtk::Adjustment>& adj)
-#else
-float Export::getValue( Gtk::Adjustment *adj )
-#endif
{
if (!adj) {
g_message("sp_export_value_get : adj is NULL");
@@ -1933,11 +1854,7 @@ float Export::getValue( Gtk::Adjustment *adj )
*
* @return The value in the adjustment in points.
*/
-#if WITH_GTKMM_3_0
float Export::getValuePx(Glib::RefPtr<Gtk::Adjustment>& adj)
-#else
-float Export::getValuePx( Gtk::Adjustment *adj )
-#endif
{
float value = getValue( adj);
Unit const *unit = unit_selector.getUnit();
diff --git a/src/ui/dialog/export.h b/src/ui/dialog/export.h
index 23af0109b..a1c44714b 100644
--- a/src/ui/dialog/export.h
+++ b/src/ui/dialog/export.h
@@ -79,17 +79,10 @@ private:
/*
* Getter/setter style functions for the spinbuttons
*/
-#if WITH_GTKMM_3_0
void setValue(Glib::RefPtr<Gtk::Adjustment>& adj, double val);
void setValuePx(Glib::RefPtr<Gtk::Adjustment>& adj, double val);
float getValue(Glib::RefPtr<Gtk::Adjustment>& adj);
float getValuePx(Glib::RefPtr<Gtk::Adjustment>& adj);
-#else
- void setValue (Gtk::Adjustment *adj, double val);
- void setValuePx (Gtk::Adjustment *adj, double val);
- float getValue (Gtk::Adjustment *adj);
- float getValuePx (Gtk::Adjustment *adj);
-#endif
/**
* Helper function to create, style and pack spinbuttons for the export dialog.
@@ -112,21 +105,12 @@ private:
*
* No unit_selector is stored in the created spinbutton, relies on external unit management
*/
-#if WITH_GTKMM_3_0
Glib::RefPtr<Gtk::Adjustment> createSpinbutton( gchar const *key, float val, float min, float max,
float step, float page,
Gtk::Grid *t, int x, int y,
const Glib::ustring& ll, const Glib::ustring& lr,
int digits, unsigned int sensitive,
void (Export::*cb)() );
-#else
- Gtk::Adjustment * createSpinbutton( gchar const *key, float val, float min, float max,
- float step, float page,
- Gtk::Table *t, int x, int y,
- const Glib::ustring& ll, const Glib::ustring& lr,
- int digits, unsigned int sensitive,
- void (Export::*cb)() );
-#endif
/**
* One of the area select radio buttons was pressed
@@ -152,11 +136,7 @@ private:
void onAreaX1Change() {
areaXChange(x1_adj);
} ;
-#if WITH_GTKMM_3_0
void areaXChange(Glib::RefPtr<Gtk::Adjustment>& adj);
-#else
- void areaXChange ( Gtk::Adjustment *adj);
-#endif
/**
* Area Y value changed callback
@@ -167,11 +147,7 @@ private:
void onAreaY1Change() {
areaYChange(y1_adj);
} ;
-#if WITH_GTKMM_3_0
void areaYChange(Glib::RefPtr<Gtk::Adjustment>& adj);
-#else
- void areaYChange ( Gtk::Adjustment *adj);
-#endif
/**
* Unit changed callback
@@ -298,7 +274,6 @@ private:
Gtk::VBox area_box;
Gtk::VBox singleexport_box;
-#if WITH_GTKMM_3_0
/* Custom size widgets */
Glib::RefPtr<Gtk::Adjustment> x0_adj;
Glib::RefPtr<Gtk::Adjustment> x1_adj;
@@ -312,21 +287,6 @@ private:
Glib::RefPtr<Gtk::Adjustment> bmheight_adj;
Glib::RefPtr<Gtk::Adjustment> xdpi_adj;
Glib::RefPtr<Gtk::Adjustment> ydpi_adj;
-#else
- /* Custom size widgets */
- Gtk::Adjustment *x0_adj;
- Gtk::Adjustment *x1_adj;
- Gtk::Adjustment *y0_adj;
- Gtk::Adjustment *y1_adj;
- Gtk::Adjustment *width_adj;
- Gtk::Adjustment *height_adj;
-
- /* Bitmap size widgets */
- Gtk::Adjustment *bmwidth_adj;
- Gtk::Adjustment *bmheight_adj;
- Gtk::Adjustment *xdpi_adj;
- Gtk::Adjustment *ydpi_adj;
-#endif
Gtk::VBox size_box;
Gtk::Label* bm_label;
diff --git a/src/ui/dialog/filedialog.cpp b/src/ui/dialog/filedialog.cpp
index ee673aecf..df3c4a307 100644
--- a/src/ui/dialog/filedialog.cpp
+++ b/src/ui/dialog/filedialog.cpp
@@ -15,12 +15,18 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include "filedialogimpl-win32.h"
+#ifdef WIN32
+# include "filedialogimpl-win32.h"
+# include "preferences.h"
+#endif
+
#include "filedialogimpl-gtkmm.h"
#include "ui/dialog-events.h"
#include "extension/output.h"
+#include <glibmm/convert.h>
+
namespace Inkscape
{
namespace UI
diff --git a/src/ui/dialog/filedialogimpl-gtkmm.cpp b/src/ui/dialog/filedialogimpl-gtkmm.cpp
index 042637d22..e8c1bf723 100644
--- a/src/ui/dialog/filedialogimpl-gtkmm.cpp
+++ b/src/ui/dialog/filedialogimpl-gtkmm.cpp
@@ -754,16 +754,9 @@ FileOpenDialogImplGtk::~FileOpenDialogImplGtk()
void FileOpenDialogImplGtk::addFilterMenu(Glib::ustring name, Glib::ustring pattern)
{
-
-#if WITH_GTKMM_3_0
- Glib::RefPtr<Gtk::FileFilter> allFilter = Gtk::FileFilter::create();
+ auto allFilter = Gtk::FileFilter::create();
allFilter->set_name(_(name.c_str()));
allFilter->add_pattern(pattern);
-#else
- Gtk::FileFilter allFilter;
- allFilter.set_name(_(name.c_str()));
- allFilter.add_pattern(pattern);
-#endif
extensionMap[Glib::ustring(_("All Files"))] = NULL;
add_filter(allFilter);
}
@@ -775,51 +768,27 @@ void FileOpenDialogImplGtk::createFilterMenu()
}
if (_dialogType == EXE_TYPES) {
-#if WITH_GTKMM_3_0
- Glib::RefPtr<Gtk::FileFilter> allFilter = Gtk::FileFilter::create();
+ auto allFilter = Gtk::FileFilter::create();
allFilter->set_name(_("All Files"));
allFilter->add_pattern("*");
-#else
- Gtk::FileFilter allFilter;
- allFilter.set_name(_("All Files"));
- allFilter.add_pattern("*");
-#endif
extensionMap[Glib::ustring(_("All Files"))] = NULL;
add_filter(allFilter);
} else {
-#if WITH_GTKMM_3_0
- Glib::RefPtr<Gtk::FileFilter> allInkscapeFilter = Gtk::FileFilter::create();
+ auto allInkscapeFilter = Gtk::FileFilter::create();
allInkscapeFilter->set_name(_("All Inkscape Files"));
- Glib::RefPtr<Gtk::FileFilter> allFilter = Gtk::FileFilter::create();
+ auto allFilter = Gtk::FileFilter::create();
allFilter->set_name(_("All Files"));
allFilter->add_pattern("*");
- Glib::RefPtr<Gtk::FileFilter> allImageFilter = Gtk::FileFilter::create();
+ auto allImageFilter = Gtk::FileFilter::create();
allImageFilter->set_name(_("All Images"));
- Glib::RefPtr<Gtk::FileFilter> allVectorFilter = Gtk::FileFilter::create();
+ auto allVectorFilter = Gtk::FileFilter::create();
allVectorFilter->set_name(_("All Vectors"));
- Glib::RefPtr<Gtk::FileFilter> allBitmapFilter = Gtk::FileFilter::create();
+ auto allBitmapFilter = Gtk::FileFilter::create();
allBitmapFilter->set_name(_("All Bitmaps"));
-#else
- Gtk::FileFilter allInkscapeFilter;
- allInkscapeFilter.set_name(_("All Inkscape Files"));
-
- Gtk::FileFilter allFilter;
- allFilter.set_name(_("All Files"));
- allFilter.add_pattern("*");
-
- Gtk::FileFilter allImageFilter;
- allImageFilter.set_name(_("All Images"));
-
- Gtk::FileFilter allVectorFilter;
- allVectorFilter.set_name(_("All Vectors"));
-
- Gtk::FileFilter allBitmapFilter;
- allBitmapFilter.set_name(_("All Bitmaps"));
-#endif
extensionMap[Glib::ustring(_("All Inkscape Files"))] = NULL;
add_filter(allInkscapeFilter);
@@ -854,29 +823,16 @@ void FileOpenDialogImplGtk::createFilterMenu()
Glib::ustring uname(_(imod->get_filetypename()));
-#if WITH_GTKMM_3_0
- Glib::RefPtr<Gtk::FileFilter> filter = Gtk::FileFilter::create();
+ auto filter = Gtk::FileFilter::create();
filter->set_name(uname);
filter->add_pattern(upattern);
-#else
- Gtk::FileFilter filter;
- filter.set_name(uname);
- filter.add_pattern(upattern);
-#endif
-
add_filter(filter);
extensionMap[uname] = imod;
// g_message("ext %s:%s '%s'\n", ioext->name, ioext->mimetype, upattern.c_str());
-#if WITH_GTKMM_3_0
allInkscapeFilter->add_pattern(upattern);
if (strncmp("image", imod->get_mimetype(), 5) == 0)
allImageFilter->add_pattern(upattern);
-#else
- allInkscapeFilter.add_pattern(upattern);
- if (strncmp("image", imod->get_mimetype(), 5) == 0)
- allImageFilter.add_pattern(upattern);
-#endif
// uncomment this to find out all mime types supported by Inkscape import/open
// g_print ("%s\n", imod->get_mimetype());
@@ -896,17 +852,9 @@ void FileOpenDialogImplGtk::createFilterMenu()
strncmp("image/x-tga", imod->get_mimetype(), 11) == 0 ||
strncmp("image/x-pcx", imod->get_mimetype(), 11) == 0)
{
-#if WITH_GTKMM_3_0
allBitmapFilter->add_pattern(upattern);
-#else
- allBitmapFilter.add_pattern(upattern);
-#endif
} else {
-#if WITH_GTKMM_3_0
allVectorFilter->add_pattern(upattern);
-#else
- allVectorFilter.add_pattern(upattern);
-#endif
}
}
}
@@ -972,18 +920,13 @@ Glib::ustring FileOpenDialogImplGtk::getFilename(void)
*/
std::vector<Glib::ustring> FileOpenDialogImplGtk::getFilenames()
{
-#if WITH_GTKMM_3_0
- std::vector<std::string> result_tmp = get_filenames();
+ auto result_tmp = get_filenames();
// Copy filenames to a vector of type Glib::ustring
std::vector<Glib::ustring> result;
- for (std::vector<std::string>::iterator it = result_tmp.begin(); it != result_tmp.end(); ++it)
- result.push_back(*it);
-
-#else
- std::vector<Glib::ustring> result = get_filenames();
-#endif
+ for (auto it : result_tmp)
+ result.push_back(it);
#ifdef WITH_GNOME_VFS
if (result.empty() && gnome_vfs_initialized())
@@ -1170,13 +1113,8 @@ void FileSaveDialogImplGtk::fileTypeChangedCallback()
// g_message("selected: %s\n", type.name.c_str());
extension = type.extension;
-#if WITH_GTKMM_3_0
- Glib::RefPtr<Gtk::FileFilter> filter = Gtk::FileFilter::create();
+ auto filter = Gtk::FileFilter::create();
filter->add_pattern(type.pattern);
-#else
- Gtk::FileFilter filter;
- filter.add_pattern(type.pattern);
-#endif
set_filter(filter);
updateNameAndExtension();
diff --git a/src/ui/dialog/filedialogimpl-win32.cpp b/src/ui/dialog/filedialogimpl-win32.cpp
index cafc3be4f..02d77cba1 100644
--- a/src/ui/dialog/filedialogimpl-win32.cpp
+++ b/src/ui/dialog/filedialogimpl-win32.cpp
@@ -128,11 +128,7 @@ FileDialogBaseWin32::FileDialogBaseWin32(Gtk::Window &parent,
Glib::RefPtr<const Gdk::Window> parentWindow = parent.get_window();
g_assert(parentWindow->gobj() != NULL);
-#if WITH_GTKMM_3_0
_ownerHwnd = (HWND)gdk_win32_window_get_handle((GdkWindow*)parentWindow->gobj());
-#else
- _ownerHwnd = (HWND)gdk_win32_drawable_get_handle((GdkDrawable*)parentWindow->gobj());
-#endif
}
FileDialogBaseWin32::~FileDialogBaseWin32()
diff --git a/src/ui/dialog/fill-and-stroke.cpp b/src/ui/dialog/fill-and-stroke.cpp
index fa69851e4..0b3b468e9 100644
--- a/src/ui/dialog/fill-and-stroke.cpp
+++ b/src/ui/dialog/fill-and-stroke.cpp
@@ -107,11 +107,7 @@ void FillAndStroke::setTargetDesktop(SPDesktop *desktop)
}
}
-#if WITH_GTKMM_3_0
void FillAndStroke::_onSwitchPage(Gtk::Widget * /*page*/, guint pagenum)
-#else
-void FillAndStroke::_onSwitchPage(GtkNotebookPage * /*page*/, guint pagenum)
-#endif
{
_savePagePref(pagenum);
}
@@ -128,24 +124,14 @@ void
FillAndStroke::_layoutPageFill()
{
fillWdgt = Gtk::manage(sp_fill_style_widget_new());
-
-#if WITH_GTKMM_3_0
_page_fill->table().attach(*fillWdgt, 0, 0, 1, 1);
-#else
- _page_fill->table().attach(*fillWdgt, 0, 1, 0, 1);
-#endif
}
void
FillAndStroke::_layoutPageStrokePaint()
{
strokeWdgt = Gtk::manage(sp_stroke_style_paint_widget_new());
-
-#if WITH_GTKMM_3_0
_page_stroke_paint->table().attach(*strokeWdgt, 0, 0, 1, 1);
-#else
- _page_stroke_paint->table().attach(*strokeWdgt, 0, 1, 0, 1);
-#endif
}
void
@@ -154,12 +140,7 @@ FillAndStroke::_layoutPageStrokeStyle()
//Gtk::Widget *strokeStyleWdgt = manage(Glib::wrap(sp_stroke_style_line_widget_new()));
//Gtk::Widget *strokeStyleWdgt = static_cast<Gtk::Widget *>(sp_stroke_style_line_widget_new());
strokeStyleWdgt = sp_stroke_style_line_widget_new();
-
-#if WITH_GTKMM_3_0
_page_stroke_style->table().attach(*strokeStyleWdgt, 0, 0, 1, 1);
-#else
- _page_stroke_style->table().attach(*strokeStyleWdgt, 0, 1, 0, 1);
-#endif
}
void
diff --git a/src/ui/dialog/fill-and-stroke.h b/src/ui/dialog/fill-and-stroke.h
index f2a6bf39d..67e9d60ed 100644
--- a/src/ui/dialog/fill-and-stroke.h
+++ b/src/ui/dialog/fill-and-stroke.h
@@ -64,11 +64,7 @@ protected:
void _layoutPageStrokePaint();
void _layoutPageStrokeStyle();
void _savePagePref(guint page_num);
-#if WITH_GTKMM_3_0
void _onSwitchPage(Gtk::Widget *page, guint pagenum);
-#else
- void _onSwitchPage(GtkNotebookPage *page, guint pagenum);
-#endif
private:
FillAndStroke(FillAndStroke const &d);
diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp
index cbf6d3516..a0cd786dc 100644
--- a/src/ui/dialog/filter-effects-dialog.cpp
+++ b/src/ui/dialog/filter-effects-dialog.cpp
@@ -22,7 +22,10 @@
#include "dialog-manager.h"
#include <gtkmm/imagemenuitem.h>
-#if GTK_CHECK_VERSION(3,0,0)
+#include <gdkmm/display.h>
+#if GTK_CHECK_VERSION(3, 20, 0)
+# include <gdkmm/seat.h>
+#else
# include <gdkmm/devicemanager.h>
#endif
@@ -86,9 +89,7 @@ static int input_count(const SPFilterPrimitive* prim)
return 2;
else if(SP_IS_FEMERGE(prim)) {
// Return the number of feMergeNode connections plus an extra
- int count = 1;
- for(const SPObject* o = prim->firstChild(); o; o = o->next, ++count){};
- return count;
+ return (int) (prim->children.size() + 1);
}
else
return 1;
@@ -302,15 +303,9 @@ public:
set_tooltip_text(tip_text);
}
-#if WITH_GTKMM_3_0
Gdk::RGBA col;
col.set_rgba_u(65535, 65535, 65535);
set_rgba(col);
-#else
- Gdk::Color col;
- col.set_rgb(65535, 65535, 65535);
- set_color(col);
-#endif
}
// Returns the color in 'rgb(r,g,b)' form.
@@ -319,13 +314,8 @@ public:
// no doubles here, so we can use the standard string stream.
std::ostringstream os;
-#if WITH_GTKMM_3_0
- const Gdk::RGBA c = get_rgba();
- const int r = c.get_red_u() / 257, g = c.get_green_u() / 257, b = c.get_blue_u() / 257;//TO-DO: verify this. This sounds a lot strange! shouldn't it be 256?
-#else
- const Gdk::Color c = get_color();
- const int r = c.get_red() / 257, g = c.get_green() / 257, b = c.get_blue() / 257;//TO-DO: verify this. This sounds a lot strange! shouldn't it be 256?
-#endif
+ const auto c = get_rgba();
+ const int r = c.get_red_u() / 257, g = c.get_green_u() / 257, b = c.get_blue_u() / 257;//TO-DO: verify this. This sounds a lot strange! shouldn't it be 256?
os << "rgb(" << r << "," << g << "," << b << ")";
return os.str();
}
@@ -342,15 +332,9 @@ public:
}
const int r = SP_RGBA32_R_U(i), g = SP_RGBA32_G_U(i), b = SP_RGBA32_B_U(i);
-#if WITH_GTKMM_3_0
Gdk::RGBA col;
col.set_rgba_u(r * 256, g * 256, b * 256);
set_rgba(col);
-#else
- Gdk::Color col;
- col.set_rgb(r * 256, g * 256, b * 256);
- set_color(col);
-#endif
}
};
@@ -674,7 +658,7 @@ private:
void select_svg_element(){
Inkscape::Selection* sel = _desktop->getSelection();
if (sel->isEmpty()) return;
- Inkscape::XML::Node* node = sel->reprList()[0];
+ Inkscape::XML::Node* node = sel->xmlNodes().front();
if (!node || !node->matchAttributeName("id")) return;
std::ostringstream xlikhref;
@@ -1043,11 +1027,10 @@ public:
// FuncNode can be in any order so we must search to find correct one.
SPFeFuncNode* find_node(SPFeComponentTransfer* ct)
{
- SPObject* node = ct->children;
SPFeFuncNode* funcNode = NULL;
bool found = false;
- for(;node;node=node->next){
- funcNode = SP_FEFUNCNODE(node);
+ for(auto& node: ct->children) {
+ funcNode = SP_FEFUNCNODE(&node);
if( funcNode->channel == _channel ) {
found = true;
break;
@@ -1211,7 +1194,7 @@ protected:
_locked = true;
- SPObject* child = o->children;
+ SPObject* child = o->firstChild();
if(SP_IS_FEDISTANTLIGHT(child))
_light_source.set_active(0);
@@ -1236,7 +1219,7 @@ private:
if(prim) {
_locked = true;
- SPObject* child = prim->children;
+ SPObject* child = prim->firstChild();
const int ls = _light_source.get_active_row_number();
// Check if the light source type has changed
if(!(ls == -1 && !child) &&
@@ -1270,8 +1253,8 @@ private:
_light_box.show_all();
SPFilterPrimitive* prim = _dialog._primitive_list.get_selected();
- if(prim && prim->children)
- _settings.show_and_update(_light_source.get_active_data()->id, prim->children);
+ if(prim && prim->firstChild())
+ _settings.show_and_update(_light_source.get_active_data()->id, prim->firstChild());
}
FilterEffectsDialog& _dialog;
@@ -1457,8 +1440,8 @@ void FilterEffectsDialog::FilterModifier::update_selection(Selection *sel)
}
std::set<SPObject*> used;
- std::vector<SPItem*> itemlist=sel->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin(); itemlist.end() != i; ++i) {
+ auto itemlist= sel->items();
+ for(auto i=itemlist.begin(); itemlist.end() != i; ++i) {
SPObject *obj = *i;
SPStyle *style = obj->style;
if (!style || !SP_IS_ITEM(obj)) {
@@ -1538,8 +1521,8 @@ void FilterEffectsDialog::FilterModifier::on_selection_toggled(const Glib::ustri
if((*iter)[_columns.sel] == 1)
filter = 0;
- std::vector<SPItem*> itemlist=sel->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin(); itemlist.end() != i; ++i) {
+ auto itemlist= sel->items();
+ for(auto i=itemlist.begin(); itemlist.end() != i; ++i) {
SPItem * item = *i;
SPStyle *style = item->style;
g_assert(style != NULL);
@@ -1713,7 +1696,6 @@ Glib::PropertyProxy<void*> FilterEffectsDialog::CellRendererConnection::property
return _primitive.get_proxy();
}
-#if WITH_GTKMM_3_0
void FilterEffectsDialog::CellRendererConnection::get_preferred_width_vfunc(Gtk::Widget& widget,
int& minimum_width,
int& natural_width) const
@@ -1747,27 +1729,6 @@ void FilterEffectsDialog::CellRendererConnection::get_preferred_height_for_width
{
get_preferred_height(widget, minimum_height, natural_height);
}
-#else
-void FilterEffectsDialog::CellRendererConnection::get_size_vfunc(
- Gtk::Widget& widget, const Gdk::Rectangle* /*cell_area*/,
- int* x_offset, int* y_offset, int* width, int* height) const
-{
- PrimitiveList& primlist = dynamic_cast<PrimitiveList&>(widget);
-
- if(x_offset)
- (*x_offset) = 0;
- if(y_offset)
- (*y_offset) = 0;
- if(width)
- (*width) = size * primlist.primitive_count() + (primlist.get_input_type_width()) * 6;
- if(height) {
- // Scale the height depending on the number of inputs, unless it's
- // the first primitive, in which case there are no connections
- SPFilterPrimitive* prim = SP_FILTER_PRIMITIVE(_primitive.get_value());
- (*height) = size * input_count(prim);
- }
-}
-#endif
/*** PrimitiveList ***/
FilterEffectsDialog::PrimitiveList::PrimitiveList(FilterEffectsDialog& d)
@@ -1775,13 +1736,8 @@ FilterEffectsDialog::PrimitiveList::PrimitiveList(FilterEffectsDialog& d)
_in_drag(0),
_observer(new Inkscape::XML::SignalObserver)
{
-#if WITH_GTKMM_3_0
d.signal_draw().connect(sigc::mem_fun(*this, &PrimitiveList::on_draw_signal));
signal_draw().connect(sigc::mem_fun(*this, &PrimitiveList::on_draw_signal));
-#else
- d.signal_expose_event().connect(sigc::mem_fun(*this, &PrimitiveList::on_expose_signal));
- signal_expose_event().connect(sigc::mem_fun(*this, &PrimitiveList::on_expose_signal));
-#endif
add_events(Gdk::POINTER_MOTION_MASK | Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK);
@@ -1854,26 +1810,25 @@ void FilterEffectsDialog::PrimitiveList::update()
bool active_found = false;
_dialog._primitive_box->set_sensitive(true);
_dialog.update_filter_general_settings_view();
- for(SPObject *prim_obj = f->children;
- prim_obj && SP_IS_FILTER_PRIMITIVE(prim_obj);
- prim_obj = prim_obj->next) {
- SPFilterPrimitive *prim = SP_FILTER_PRIMITIVE(prim_obj);
- if(prim) {
- Gtk::TreeModel::Row row = *_model->append();
- row[_columns.primitive] = prim;
-
- //XML Tree being used directly here while it shouldn't be.
- row[_columns.type_id] = FPConverter.get_id_from_key(prim->getRepr()->name());
- row[_columns.type] = _(FPConverter.get_label(row[_columns.type_id]).c_str());
-
- if (prim->getId()) {
- row[_columns.id] = Glib::ustring(prim->getId());
- }
-
- if(prim == active_prim) {
- get_selection()->select(row);
- active_found = true;
- }
+ for(auto& prim_obj: f->children) {
+ SPFilterPrimitive *prim = SP_FILTER_PRIMITIVE(&prim_obj);
+ if(!prim) {
+ break;
+ }
+ Gtk::TreeModel::Row row = *_model->append();
+ row[_columns.primitive] = prim;
+
+ //XML Tree being used directly here while it shouldn't be.
+ row[_columns.type_id] = FPConverter.get_id_from_key(prim->getRepr()->name());
+ row[_columns.type] = _(FPConverter.get_label(row[_columns.type_id]).c_str());
+
+ if (prim->getId()) {
+ row[_columns.id] = Glib::ustring(prim->getId());
+ }
+
+ if(prim == active_prim) {
+ get_selection()->select(row);
+ active_found = true;
}
}
@@ -1944,25 +1899,9 @@ void FilterEffectsDialog::PrimitiveList::remove_selected()
}
}
-#if !WITH_GTKMM_3_0
-bool FilterEffectsDialog::PrimitiveList::on_expose_signal(GdkEventExpose * /*evt*/)
-{
- bool result = false;
-
- if (get_is_drawable())
- {
- Cairo::RefPtr<Cairo::Context> cr = get_bin_window()->create_cairo_context();
- result = on_draw_signal(cr);
- }
-
- return result;
-}
-#endif
-
bool FilterEffectsDialog::PrimitiveList::on_draw_signal(const Cairo::RefPtr<Cairo::Context> & cr)
{
cr->set_line_width(1.0);
-#if GTK_CHECK_VERSION(3,0,0)
// In GTK+ 3, the draw function receives the widget window, not the
// bin_window (i.e., just the area under the column headers). We
// therefore translate the origin of our coordinate system to account for this
@@ -1970,7 +1909,7 @@ bool FilterEffectsDialog::PrimitiveList::on_draw_signal(const Cairo::RefPtr<Cair
convert_bin_window_to_widget_coords(0,0,x_origin,y_origin);
cr->translate(x_origin, y_origin);
- GtkStyleContext *sc = gtk_widget_get_style_context(GTK_WIDGET(gobj()));
+ auto sc = gtk_widget_get_style_context(GTK_WIDGET(gobj()));
GdkRGBA bg_color, fg_color;
gtk_style_context_get_background_color(sc, GTK_STATE_FLAG_NORMAL, &bg_color);
gtk_style_context_get_color(sc, GTK_STATE_FLAG_NORMAL, &fg_color);
@@ -1988,9 +1927,6 @@ bool FilterEffectsDialog::PrimitiveList::on_draw_signal(const Cairo::RefPtr<Cair
(bg_color_active.green + fg_color_active.green)/2.0,
(bg_color_active.blue + fg_color_active.blue)/2.0,
(bg_color_active.alpha + fg_color_active.alpha)/2.0};
-#else
- GtkStyle *style = gtk_widget_get_style(GTK_WIDGET(gobj()));
-#endif
SPFilterPrimitive* prim = get_selected();
int row_count = get_model()->children().size();
@@ -2009,25 +1945,15 @@ bool FilterEffectsDialog::PrimitiveList::on_draw_signal(const Cairo::RefPtr<Cair
const int x = text_start_x + get_input_type_width() * i;
cr->save();
cr->rectangle(x, 0, get_input_type_width(), vis.get_height());
-#if GTK_CHECK_VERSION(3,0,0)
gdk_cairo_set_source_rgba(cr->cobj(), &bg_color);
cr->fill_preserve();
gdk_cairo_set_source_rgba(cr->cobj(), &fg_color);
-#else
- gdk_cairo_set_source_color(cr->cobj(), &(style->bg[GTK_STATE_NORMAL]));
- cr->fill_preserve();
- gdk_cairo_set_source_color(cr->cobj(), &(style->text[GTK_STATE_NORMAL]));
-#endif
cr->move_to(x+get_input_type_width(), 0);
cr->rotate_degrees(90);
_vertical_layout->show_in_cairo_context(cr);
-#if GTK_CHECK_VERSION(3,0,0)
gdk_cairo_set_source_rgba(cr->cobj(), &mid_color);
-#else
- gdk_cairo_set_source_color(cr->cobj(), &(style->dark[GTK_STATE_NORMAL]));
-#endif
cr->move_to(x, 0);
cr->line_to(x, vis.get_height());
cr->stroke();
@@ -2044,24 +1970,21 @@ bool FilterEffectsDialog::PrimitiveList::on_draw_signal(const Cairo::RefPtr<Cair
int mx, my;
Gdk::ModifierType mask;
-#if GTK_CHECK_VERSION(3,0,0)
- Glib::RefPtr<Gdk::Display> display = get_bin_window()->get_display();
- Glib::RefPtr<Gdk::DeviceManager> dm = display->get_device_manager();
- Glib::RefPtr<const Gdk::Device> device = dm->get_client_pointer();
- get_bin_window()->get_device_position(device, mx, my, mask);
+ auto display = get_bin_window()->get_display();
+#if GTK_CHECK_VERSION(3, 20, 0)
+ auto seat = display->get_default_seat();
+ auto device = seat->get_pointer();
#else
- get_bin_window()->get_pointer(mx, my, mask);
+ auto dm = display->get_device_manager();
+ auto device = dm->get_client_pointer();
#endif
+ get_bin_window()->get_device_position(device, mx, my, mask);
// Outline the bottom of the connection area
const int outline_x = x + fheight * (row_count - row_index);
cr->save();
-#if GTK_CHECK_VERSION(3,0,0)
gdk_cairo_set_source_rgba(cr->cobj(), &mid_color);
-#else
- gdk_cairo_set_source_color(cr->cobj(), &(style->dark[GTK_STATE_NORMAL]));
-#endif
cr->move_to(x, y + h);
cr->line_to(outline_x, y + h);
@@ -2084,17 +2007,10 @@ bool FilterEffectsDialog::PrimitiveList::on_draw_signal(const Cairo::RefPtr<Cair
cr->save();
-#if GTK_CHECK_VERSION(3,0,0)
gdk_cairo_set_source_rgba(cr->cobj(),
inside && mask & GDK_BUTTON1_MASK ?
&mid_color :
&mid_color_active);
-#else
- gdk_cairo_set_source_color(cr->cobj(),
- inside && mask & GDK_BUTTON1_MASK ?
- &(style->dark[GTK_STATE_NORMAL]) :
- &(style->dark[GTK_STATE_ACTIVE]));
-#endif
draw_connection_node(cr, con_poly, inside);
@@ -2120,17 +2036,10 @@ bool FilterEffectsDialog::PrimitiveList::on_draw_signal(const Cairo::RefPtr<Cair
cr->save();
-#if GTK_CHECK_VERSION(3,0,0)
gdk_cairo_set_source_rgba(cr->cobj(),
inside && mask & GDK_BUTTON1_MASK ?
&mid_color :
&mid_color_active);
-#else
- gdk_cairo_set_source_color(cr->cobj(),
- inside && mask & GDK_BUTTON1_MASK ?
- &(style->dark[GTK_STATE_NORMAL]) :
- &(style->dark[GTK_STATE_ACTIVE]));
-#endif
draw_connection_node(cr, con_poly, inside);
@@ -2153,17 +2062,10 @@ bool FilterEffectsDialog::PrimitiveList::on_draw_signal(const Cairo::RefPtr<Cair
cr->save();
-#if GTK_CHECK_VERSION(3,0,0)
gdk_cairo_set_source_rgba(cr->cobj(),
inside && mask & GDK_BUTTON1_MASK ?
&mid_color :
&mid_color_active);
-#else
- gdk_cairo_set_source_color(cr->cobj(),
- inside && mask & GDK_BUTTON1_MASK ?
- &(style->dark[GTK_STATE_NORMAL]) :
- &(style->dark[GTK_STATE_ACTIVE]));
-#endif
draw_connection_node(cr, con_poly, inside);
@@ -2199,8 +2101,7 @@ void FilterEffectsDialog::PrimitiveList::draw_connection(const Cairo::RefPtr<Cai
{
cr->save();
-#if GTK_CHECK_VERSION(3,0,0)
- GtkStyleContext *sc = gtk_widget_get_style_context(GTK_WIDGET(gobj()));
+ auto sc = gtk_widget_get_style_context(GTK_WIDGET(gobj()));
GdkRGBA bg_color, fg_color;
gtk_style_context_get_background_color(sc, GTK_STATE_FLAG_NORMAL, &bg_color);
@@ -2210,9 +2111,6 @@ void FilterEffectsDialog::PrimitiveList::draw_connection(const Cairo::RefPtr<Cai
(bg_color.green + fg_color.green)/2.0,
(bg_color.blue + fg_color.blue)/2.0,
(bg_color.alpha + fg_color.alpha)/2.0};
-#else
- GtkStyle *style = gtk_widget_get_style(GTK_WIDGET(gobj()));
-#endif
int src_id = 0;
Gtk::TreeIter res = find_result(input, attr, src_id);
@@ -2228,11 +2126,7 @@ void FilterEffectsDialog::PrimitiveList::draw_connection(const Cairo::RefPtr<Cai
gint end_x = text_start_x + tw * src_id + (int)(tw * 0.5f) + 1;
if(use_default && is_first)
-#if GTK_CHECK_VERSION(3,0,0)
gdk_cairo_set_source_rgba(cr->cobj(), &mid_color);
-#else
- gdk_cairo_set_source_color(cr->cobj(), &(style->dark[GTK_STATE_NORMAL]));
-#endif
else
cr->set_source_rgb(0.0, 0.0, 0.0);
@@ -2326,11 +2220,12 @@ const Gtk::TreeIter FilterEffectsDialog::PrimitiveList::find_result(const Gtk::T
if(SP_IS_FEMERGE(prim)) {
int c = 0;
bool found = false;
- for(const SPObject* o = prim->firstChild(); o; o = o->next, ++c) {
- if(c == attr && SP_IS_FEMERGENODE(o)) {
- image = SP_FEMERGENODE(o)->input;
+ for (auto& o: prim->children) {
+ if(c == attr && SP_IS_FEMERGENODE(&o)) {
+ image = SP_FEMERGENODE(&o)->input;
found = true;
}
+ ++c;
}
if(!found)
return target;
@@ -2517,21 +2412,23 @@ bool FilterEffectsDialog::PrimitiveList::on_button_release_event(GdkEventButton*
if(SP_IS_FEMERGE(prim)) {
int c = 1;
bool handled = false;
- for(SPObject* o = prim->firstChild(); o && !handled; o = o->next, ++c) {
- if(c == _in_drag && SP_IS_FEMERGENODE(o)) {
+ for (auto& o: prim->children) {
+ if(c == _in_drag && SP_IS_FEMERGENODE(&o)) {
// If input is null, delete it
if(!in_val) {
//XML Tree being used directly here while it shouldn't be.
- sp_repr_unparent(o->getRepr());
+ sp_repr_unparent(o.getRepr());
DocumentUndo::done(prim->document, SP_VERB_DIALOG_FILTER_EFFECTS,
_("Remove merge node"));
(*get_selection()->get_selected())[_columns.primitive] = prim;
+ } else {
+ _dialog.set_attr(&o, SP_ATTR_IN, in_val);
}
- else
- _dialog.set_attr(o, SP_ATTR_IN, in_val);
handled = true;
+ break;
}
+ ++c;
}
// Add new input?
if(!handled && c == _in_drag && in_val) {
@@ -2652,8 +2549,7 @@ void FilterEffectsDialog::PrimitiveList::on_drag_end(const Glib::RefPtr<Gdk::Dra
bool FilterEffectsDialog::PrimitiveList::on_scroll_timeout()
{
if(_autoscroll_y) {
-#if WITH_GTKMM_3_0
- Glib::RefPtr<Gtk::Adjustment> a = dynamic_cast<Gtk::ScrolledWindow*>(get_parent())->get_vadjustment();
+ auto a = dynamic_cast<Gtk::ScrolledWindow*>(get_parent())->get_vadjustment();
double v = a->get_value() + _autoscroll_y;
if(v < 0)
@@ -2662,25 +2558,13 @@ bool FilterEffectsDialog::PrimitiveList::on_scroll_timeout()
v = a->get_upper() - a->get_page_size();
a->set_value(v);
-#else
- Gtk::Adjustment& a = *dynamic_cast<Gtk::ScrolledWindow*>(get_parent())->get_vadjustment();
- double v = a.get_value() + _autoscroll_y;
-
- if(v < 0)
- v = 0;
- if(v > a.get_upper() - a.get_page_size())
- v = a.get_upper() - a.get_page_size();
-
- a.set_value(v);
-#endif
queue_draw();
}
if(_autoscroll_x) {
-#if WITH_GTKMM_3_0
- Glib::RefPtr<Gtk::Adjustment> a_h = dynamic_cast<Gtk::ScrolledWindow*>(get_parent())->get_hadjustment();
+ auto a_h = dynamic_cast<Gtk::ScrolledWindow*>(get_parent())->get_hadjustment();
double h = a_h->get_value() + _autoscroll_x;
if(h < 0)
@@ -2689,18 +2573,6 @@ bool FilterEffectsDialog::PrimitiveList::on_scroll_timeout()
h = a_h->get_upper() - a_h->get_page_size();
a_h->set_value(h);
-#else
- Gtk::Adjustment& a_h = *dynamic_cast<Gtk::ScrolledWindow*>(get_parent())->get_hadjustment();
- double h = a_h.get_value() + _autoscroll_x;
-
- if(h < 0)
- h = 0;
- if(h > a_h.get_upper() - a_h.get_page_size())
- h = a_h.get_upper() - a_h.get_page_size();
-
- a_h.set_value(h);
-
-#endif
queue_draw();
}
@@ -2742,13 +2614,8 @@ FilterEffectsDialog::FilterEffectsDialog()
_sizegroup->set_ignore_hidden();
// Initialize widget hierarchy
-#if WITH_GTKMM_3_0
- Gtk::Paned* hpaned = Gtk::manage(new Gtk::Paned);
+ auto hpaned = Gtk::manage(new Gtk::Paned);
_primitive_box = Gtk::manage(new Gtk::Paned);
-#else
- Gtk::HPaned* hpaned = Gtk::manage(new Gtk::HPaned);
- _primitive_box = Gtk::manage(new Gtk::VPaned);
-#endif
_sw_infobox = Gtk::manage(new Gtk::ScrolledWindow);
Gtk::ScrolledWindow* sw_prims = Gtk::manage(new Gtk::ScrolledWindow);
@@ -3080,7 +2947,7 @@ void FilterEffectsDialog::set_filternode_attr(const AttrWidget* input)
void FilterEffectsDialog::set_child_attr_direct(const AttrWidget* input)
{
- set_attr(_primitive_list.get_selected()->children, input->get_attribute(), input->get_as_attribute().c_str());
+ set_attr(_primitive_list.get_selected()->firstChild(), input->get_attribute(), input->get_as_attribute().c_str());
}
void FilterEffectsDialog::set_attr(SPObject* o, const SPAttributeEnum attr, const gchar* val)
diff --git a/src/ui/dialog/filter-effects-dialog.h b/src/ui/dialog/filter-effects-dialog.h
index 7c715327e..eae0fc317 100644
--- a/src/ui/dialog/filter-effects-dialog.h
+++ b/src/ui/dialog/filter-effects-dialog.h
@@ -163,7 +163,6 @@ private:
static const int size = 24;
protected:
-#if WITH_GTKMM_3_0
virtual void get_preferred_width_vfunc(Gtk::Widget& widget,
int& minimum_width,
int& natural_width) const;
@@ -181,10 +180,6 @@ private:
int width,
int& minimum_height,
int& natural_height) const;
-#else
- virtual void get_size_vfunc(Gtk::Widget& widget, const Gdk::Rectangle* cell_area,
- int* x_offset, int* y_offset, int* width, int* height) const;
-#endif
private:
// void* should be SPFilterPrimitive*, some weirdness with properties prevents this
Glib::Property<void*> _primitive;
@@ -211,9 +206,6 @@ private:
protected:
bool on_draw_signal(const Cairo::RefPtr<Cairo::Context> &cr);
-#if !WITH_GTKMM_3_0
- bool on_expose_signal(GdkEventExpose*);
-#endif
bool on_button_press_event(GdkEventButton*);
bool on_motion_notify_event(GdkEventMotion*);
@@ -283,11 +275,7 @@ private:
Gtk::ScrolledWindow* _sw_infobox;
// View/add primitives
-#if WITH_GTKMM_3_0
Gtk::Paned* _primitive_box;
-#else
- Gtk::VPaned* _primitive_box;
-#endif
UI::Widget::ComboBoxEnum<Inkscape::Filters::FilterPrimitiveType> _add_primitive_type;
Gtk::Button _add_primitive;
diff --git a/src/ui/dialog/find.cpp b/src/ui/dialog/find.cpp
index 8b6067e82..b4f7902f5 100644
--- a/src/ui/dialog/find.cpp
+++ b/src/ui/dialog/find.cpp
@@ -740,22 +740,22 @@ std::vector<SPItem*> &Find::all_items (SPObject *r, std::vector<SPItem*> &l, boo
return l; // we're not interested in metadata
}
- for (SPObject *child = r->firstChild(); child; child = child->getNext()) {
- SPItem *item = dynamic_cast<SPItem *>(child);
- if (item && !child->cloned && !desktop->isLayer(item)) {
+ for (auto& child: r->children) {
+ SPItem *item = dynamic_cast<SPItem *>(&child);
+ if (item && !child.cloned && !desktop->isLayer(item)) {
if ((hidden || !desktop->itemIsHidden(item)) && (locked || !item->isLocked())) {
- l.insert(l.begin(),(SPItem*)child);
+ l.insert(l.begin(),(SPItem*)&child);
}
}
- l = all_items (child, l, hidden, locked);
+ l = all_items (&child, l, hidden, locked);
}
return l;
}
std::vector<SPItem*> &Find::all_selection_items (Inkscape::Selection *s, std::vector<SPItem*> &l, SPObject *ancestor, bool hidden, bool locked)
{
- std::vector<SPItem*> itemlist=s->itemList();
- for(std::vector<SPItem*>::const_reverse_iterator i=itemlist.rbegin(); itemlist.rend() != i; ++i) {
+ auto itemlist= s->items();
+ for(auto i=boost::rbegin(itemlist); boost::rend(itemlist) != i; ++i) {
SPObject *obj = *i;
SPItem *item = dynamic_cast<SPItem *>(obj);
g_assert(item != NULL);
diff --git a/src/ui/dialog/find.h b/src/ui/dialog/find.h
index 4bcb900b6..94d635037 100644
--- a/src/ui/dialog/find.h
+++ b/src/ui/dialog/find.h
@@ -286,13 +286,7 @@ private:
Gtk::Label status;
UI::Widget::Button button_find;
UI::Widget::Button button_replace;
-
-#if WITH_GTKMM_3_0
Gtk::ButtonBox box_buttons;
-#else
- Gtk::HButtonBox box_buttons;
-#endif
-
Gtk::HBox hboxbutton_row;
/**
diff --git a/src/ui/dialog/floating-behavior.cpp b/src/ui/dialog/floating-behavior.cpp
index 5ac3a25ad..fa8e11dfd 100644
--- a/src/ui/dialog/floating-behavior.cpp
+++ b/src/ui/dialog/floating-behavior.cpp
@@ -138,11 +138,7 @@ FloatingBehavior::create(Dialog &dialog)
inline FloatingBehavior::operator Gtk::Widget &() { return *_d; }
inline GtkWidget *FloatingBehavior::gobj() { return GTK_WIDGET(_d->gobj()); }
inline Gtk::Box* FloatingBehavior::get_vbox() {
-#if WITH_GTKMM_3_0
return _d->get_content_area();
-#else
- return _d->get_vbox();
-#endif
}
inline void FloatingBehavior::present() { _d->present(); }
inline void FloatingBehavior::hide() { _d->hide(); }
@@ -153,12 +149,8 @@ inline void FloatingBehavior::move(int x, int y) { _d->
inline void FloatingBehavior::set_position(Gtk::WindowPosition position) { _d->set_position(position); }
inline void FloatingBehavior::set_size_request(int width, int height) { _d->set_size_request(width, height); }
inline void FloatingBehavior::size_request(Gtk::Requisition &requisition) {
-#if WITH_GTKMM_3_0
Gtk::Requisition requisition_natural;
_d->get_preferred_size(requisition, requisition_natural);
-#else
- requisition = _d->size_request();
-#endif
}
inline void FloatingBehavior::get_position(int &x, int &y) { _d->get_position(x, y); }
inline void FloatingBehavior::get_size(int &width, int &height) { _d->get_size(width, height); }
diff --git a/src/ui/dialog/font-substitution.cpp b/src/ui/dialog/font-substitution.cpp
index 0a88770b9..abae8ea70 100644
--- a/src/ui/dialog/font-substitution.cpp
+++ b/src/ui/dialog/font-substitution.cpp
@@ -101,11 +101,7 @@ FontSubstitution::show(Glib::ustring out, std::vector<SPItem*> &l)
cbWarning->set_label(_("Don't show this warning again"));
cbWarning->show();
-#if GTK_CHECK_VERSION(3,0,0)
- Gtk::Box * box = warning.get_content_area();
-#else
- Gtk::Box * box = warning.get_vbox();
-#endif
+ auto box = warning.get_content_area();
box->set_spacing(2);
box->pack_start(*scrollwindow, true, true, 4);
box->pack_start(*cbSelect, false, false, 0);
@@ -177,7 +173,7 @@ std::vector<SPItem*> FontSubstitution::getFontReplacedItems(SPDocument* doc, Gli
family = SP_TEXT(parent_text)->layout.getFontFamily(0);
// Add all the spans fonts to the set
gint ii = 0;
- for (SPObject *child = parent_text->firstChild() ; child ; child = child->getNext() ) {
+ for (auto& child: parent_text->children) {
family = SP_TEXT(parent_text)->layout.getFontFamily(ii);
setFontSpans.insert(family);
ii++;
diff --git a/src/ui/dialog/glyphs.cpp b/src/ui/dialog/glyphs.cpp
index 7ce3eabfc..9c1236ca9 100644
--- a/src/ui/dialog/glyphs.cpp
+++ b/src/ui/dialog/glyphs.cpp
@@ -14,16 +14,11 @@
#include <glibmm/i18n.h>
#include <gtkmm/alignment.h>
#include <gtkmm/comboboxtext.h>
+#include <gtkmm/grid.h>
#include <gtkmm/iconview.h>
#include <gtkmm/liststore.h>
#include <gtkmm/scrolledwindow.h>
-#if WITH_GTKMM_3_0
-# include <gtkmm/grid.h>
-#else
-# include <gtkmm/table.h>
-#endif
-
#include "desktop.h"
#include "document.h" // for SPDocumentUndo::done()
#include "document-undo.h"
@@ -337,12 +332,7 @@ GlyphsPanel::GlyphsPanel(gchar const *prefsPath) :
instanceConns(),
desktopConns()
{
-#if WITH_GTKMM_3_0
- Gtk::Grid *table = new Gtk::Grid();
-#else
- Gtk::Table *table = new Gtk::Table(3, 1, false);
-#endif
-
+ auto table = new Gtk::Grid();
_getContents()->pack_start(*Gtk::manage(table), Gtk::PACK_EXPAND_WIDGET);
guint row = 0;
@@ -355,29 +345,16 @@ GlyphsPanel::GlyphsPanel(gchar const *prefsPath) :
gtk_widget_set_size_request (fontsel, 0, 150);
g_signal_connect( G_OBJECT(fontsel), "font_set", G_CALLBACK(fontChangeCB), this );
-#if WITH_GTKMM_3_0
table->attach(*Gtk::manage(Glib::wrap(fontsel)), 0, row, 3, 1);
-#else
- table->attach(*Gtk::manage(Glib::wrap(fontsel)),
- 0, 3, row, row + 1,
- Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL);
-#endif
-
row++;
// -------------------------------
{
- Gtk::Label *label = new Gtk::Label(_("Script: "));
+ auto label = new Gtk::Label(_("Script: "));
-#if WITH_GTKMM_3_0
table->attach( *Gtk::manage(label), 0, row, 1, 1);
-#else
- table->attach( *Gtk::manage(label),
- 0, 1, row, row + 1,
- Gtk::SHRINK, Gtk::SHRINK);
-#endif
scriptCombo = new Gtk::ComboBoxText();
for (std::map<GUnicodeScript, Glib::ustring>::iterator it = getScriptToName().begin(); it != getScriptToName().end(); ++it)
@@ -391,14 +368,8 @@ GlyphsPanel::GlyphsPanel(gchar const *prefsPath) :
Gtk::Alignment *align = Gtk::manage(new Gtk::Alignment(Gtk::ALIGN_START, Gtk::ALIGN_START, 0.0, 0.0));
align->add(*Gtk::manage(scriptCombo));
-#if WITH_GTKMM_3_0
align->set_hexpand();
table->attach( *align, 1, row, 1, 1);
-#else
- table->attach( *align,
- 1, 2, row, row + 1,
- Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK);
-#endif
}
row++;
@@ -406,15 +377,8 @@ GlyphsPanel::GlyphsPanel(gchar const *prefsPath) :
// -------------------------------
{
- Gtk::Label *label = new Gtk::Label(_("Range: "));
-
-#if WITH_GTKMM_3_0
+ auto label = new Gtk::Label(_("Range: "));
table->attach( *Gtk::manage(label), 0, row, 1, 1);
-#else
- table->attach( *Gtk::manage(label),
- 0, 1, row, row + 1,
- Gtk::SHRINK, Gtk::SHRINK);
-#endif
rangeCombo = new Gtk::ComboBoxText();
for ( std::vector<NamedRange>::iterator it = getRanges().begin(); it != getRanges().end(); ++it ) {
@@ -426,15 +390,8 @@ GlyphsPanel::GlyphsPanel(gchar const *prefsPath) :
instanceConns.push_back(conn);
Gtk::Alignment *align = new Gtk::Alignment(Gtk::ALIGN_START, Gtk::ALIGN_START, 0.0, 0.0);
align->add(*Gtk::manage(rangeCombo));
-
-#if WITH_GTKMM_3_0
align->set_hexpand();
table->attach( *Gtk::manage(align), 1, row, 1, 1);
-#else
- table->attach( *Gtk::manage(align),
- 1, 2, row, row + 1,
- Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK);
-#endif
}
row++;
@@ -457,16 +414,9 @@ GlyphsPanel::GlyphsPanel(gchar const *prefsPath) :
Gtk::ScrolledWindow *scroller = new Gtk::ScrolledWindow();
scroller->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_ALWAYS);
scroller->add(*Gtk::manage(iconView));
-
-#if WITH_GTKMM_3_0
scroller->set_hexpand();
scroller->set_vexpand();
table->attach(*Gtk::manage(scroller), 0, row, 3, 1);
-#else
- table->attach(*Gtk::manage(scroller),
- 0, 3, row, row + 1,
- Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL);
-#endif
row++;
@@ -496,15 +446,8 @@ GlyphsPanel::GlyphsPanel(gchar const *prefsPath) :
insertBtn->set_sensitive(false);
box->pack_end(*Gtk::manage(insertBtn), Gtk::PACK_SHRINK);
-
-#if WITH_GTKMM_3_0
box->set_hexpand();
table->attach( *Gtk::manage(box), 0, row, 3, 1);
-#else
- table->attach( *Gtk::manage(box),
- 0, 3, row, row + 1,
- Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK);
-#endif
row++;
@@ -573,8 +516,8 @@ void GlyphsPanel::setTargetDesktop(SPDesktop *desktop)
void GlyphsPanel::insertText()
{
SPItem *textItem = 0;
- std::vector<SPItem*> itemlist=targetDesktop->selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin(); itemlist.end() != i; ++i) {
+ auto itemlist= targetDesktop->selection->items();
+ for(auto i=itemlist.begin(); itemlist.end() != i; ++i) {
if (SP_IS_TEXT(*i) || SP_IS_FLOWTEXT(*i)) {
textItem = *i;
break;
@@ -586,12 +529,7 @@ void GlyphsPanel::insertText()
if (entry->get_text_length() > 0) {
glyphs = entry->get_text();
} else {
-
-#if WITH_GTKMM_3_0
- std::vector<Gtk::TreePath> itemArray = iconView->get_selected_items();
-#else
- Gtk::IconView::ArrayHandle_TreePaths itemArray = iconView->get_selected_items();
-#endif
+ auto itemArray = iconView->get_selected_items();
if (!itemArray.empty()) {
Gtk::TreeModel::Path const & path = *itemArray.begin();
@@ -636,11 +574,7 @@ void GlyphsPanel::glyphActivated(Gtk::TreeModel::Path const & path)
void GlyphsPanel::glyphSelectionChanged()
{
-#if WITH_GTKMM_3_0
- std::vector<Gtk::TreePath> itemArray = iconView->get_selected_items();
-#else
- Gtk::IconView::ArrayHandle_TreePaths itemArray = iconView->get_selected_items();
-#endif
+ auto itemArray = iconView->get_selected_items();
if (itemArray.empty()) {
label->set_text(" ");
@@ -683,8 +617,8 @@ void GlyphsPanel::selectionModifiedCB(guint flags)
void GlyphsPanel::calcCanInsert()
{
int items = 0;
- std::vector<SPItem*> itemlist=targetDesktop->selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin(); itemlist.end() != i; ++i) {
+ auto itemlist= targetDesktop->selection->items();
+ for(auto i=itemlist.begin(); itemlist.end() != i; ++i) {
if (SP_IS_TEXT(*i) || SP_IS_FLOWTEXT(*i)) {
++items;
}
diff --git a/src/ui/dialog/grid-arrange-tab.cpp b/src/ui/dialog/grid-arrange-tab.cpp
index 8d83814b4..5872393ae 100644
--- a/src/ui/dialog/grid-arrange-tab.cpp
+++ b/src/ui/dialog/grid-arrange-tab.cpp
@@ -17,12 +17,9 @@
#include "ui/dialog/grid-arrange-tab.h"
#include <glibmm/i18n.h>
-#include <gtkmm/stock.h>
-#if WITH_GTKMM_3_0
-# include <gtkmm/grid.h>
-#else
-#endif
+#include <gtkmm/grid.h>
+#include <gtkmm/stock.h>
#include <2geom/transforms.h>
@@ -159,7 +156,11 @@ void GridArrangeTab::arrange()
desktop->getDocument()->ensureUpToDate();
Inkscape::Selection *selection = desktop->getSelection();
- const std::vector<SPItem*> items = selection ? selection->itemList() : std::vector<SPItem*>();
+ std::vector<SPItem*> items;
+ if (selection) {
+ items.insert(items.end(), selection->items().begin(), selection->items().end());
+ }
+
for(std::vector<SPItem*>::const_iterator i = items.begin();i!=items.end(); ++i){
SPItem *item = *i;
Geom::OptRect b = item->documentVisualBounds();
@@ -188,7 +189,7 @@ void GridArrangeTab::arrange()
// require the sorting done before we can calculate row heights etc.
g_return_if_fail(selection);
- std::vector<SPItem*> sorted(selection->itemList());
+ std::vector<SPItem*> sorted(selection->items().begin(), selection->items().end());
sort(sorted.begin(),sorted.end(),sp_compare_y_position);
sort(sorted.begin(),sorted.end(),sp_compare_x_position);
@@ -364,8 +365,7 @@ void GridArrangeTab::on_row_spinbutton_changed()
Inkscape::Selection *selection = desktop ? desktop->selection : 0;
g_return_if_fail( selection );
- std::vector<SPItem*> const items = selection->itemList();
- int selcount = items.size();
+ int selcount = (int) boost::distance(selection->items());
double PerCol = ceil(selcount / NoOfColsSpinner.get_value());
NoOfRowsSpinner.set_value(PerCol);
@@ -390,7 +390,7 @@ void GridArrangeTab::on_col_spinbutton_changed()
Inkscape::Selection *selection = desktop ? desktop->selection : 0;
g_return_if_fail(selection);
- int selcount = selection->itemList().size();
+ int selcount = (int) boost::distance(selection->items());
double PerRow = ceil(selcount / NoOfRowsSpinner.get_value());
NoOfColsSpinner.set_value(PerRow);
@@ -527,7 +527,10 @@ void GridArrangeTab::updateSelection()
updating = true;
SPDesktop *desktop = Parent->getDesktop();
Inkscape::Selection *selection = desktop ? desktop->selection : 0;
- std::vector<SPItem*> const items = selection ? selection->itemList() : std::vector<SPItem*>();
+ std::vector<SPItem*> items;
+ if (selection) {
+ items.insert(items.end(), selection->items().begin(), selection->items().end());
+ }
if (!items.empty()) {
int selcount = items.size();
@@ -566,11 +569,7 @@ GridArrangeTab::GridArrangeTab(ArrangeDialog *parent)
: Parent(parent),
XPadding(_("X:"), _("Horizontal spacing between columns."), UNIT_TYPE_LINEAR, "", "object-columns", &PaddingUnitMenu),
YPadding(_("Y:"), _("Vertical spacing between rows."), XPadding, "", "object-rows", &PaddingUnitMenu),
-#if WITH_GTKMM_3_0
PaddingTable(Gtk::manage(new Gtk::Grid()))
-#else
- PaddingTable(Gtk::manage(new Gtk::Table(2, 2, false)))
-#endif
{
// bool used by spin button callbacks to stop loops where they change each other.
updating = false;
@@ -598,7 +597,7 @@ GridArrangeTab::GridArrangeTab(ArrangeDialog *parent)
g_return_if_fail( selection );
int selcount = 1;
if (!selection->isEmpty()) {
- selcount = selection->itemList().size();
+ selcount = (int) boost::distance(selection->items());
}
@@ -732,20 +731,11 @@ GridArrangeTab::GridArrangeTab(ArrangeDialog *parent)
}
PaddingTable->set_border_width(MARGIN);
-
-#if WITH_GTKMM_3_0
PaddingTable->set_row_spacing(MARGIN);
PaddingTable->set_column_spacing(MARGIN);
PaddingTable->attach(XPadding, 0, 0, 1, 1);
PaddingTable->attach(PaddingUnitMenu, 1, 0, 1, 1);
PaddingTable->attach(YPadding, 0, 1, 1, 1);
-#else
- PaddingTable->set_row_spacings(MARGIN);
- PaddingTable->set_col_spacings(MARGIN);
- PaddingTable->attach(XPadding, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK);
- PaddingTable->attach(PaddingUnitMenu, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK);
- PaddingTable->attach(YPadding, 0, 1, 1, 2, Gtk::SHRINK, Gtk::SHRINK);
-#endif
TileBox.pack_start(*PaddingTable, false, false, MARGIN);
diff --git a/src/ui/dialog/grid-arrange-tab.h b/src/ui/dialog/grid-arrange-tab.h
index a137d1694..891849f1a 100644
--- a/src/ui/dialog/grid-arrange-tab.h
+++ b/src/ui/dialog/grid-arrange-tab.h
@@ -111,12 +111,7 @@ private:
Inkscape::UI::Widget::UnitMenu PaddingUnitMenu;
Inkscape::UI::Widget::ScalarUnit XPadding;
Inkscape::UI::Widget::ScalarUnit YPadding;
-
-#if WITH_GTKMM_3_0
Gtk::Grid *PaddingTable;
-#else
- Gtk::Table *PaddingTable;
-#endif
// BBox or manual spacing
Gtk::VBox SpacingVBox;
diff --git a/src/ui/dialog/guides.cpp b/src/ui/dialog/guides.cpp
index 469bd5155..8d6ca4143 100644
--- a/src/ui/dialog/guides.cpp
+++ b/src/ui/dialog/guides.cpp
@@ -120,13 +120,8 @@ void GuidelinePropertiesDialog::_onOK()
g_free((gpointer) name);
-#if WITH_GTKMM_3_0
- const Gdk::RGBA c = _color.get_rgba();
+ const auto c = _color.get_rgba();
unsigned r = c.get_red_u()/257, g = c.get_green_u()/257, b = c.get_blue_u()/257;
-#else
- const Gdk::Color c = _color.get_color();
- unsigned r = c.get_red()/257, g = c.get_green()/257, b = c.get_blue()/257;
-#endif
//TODO: why 257? verify this!
_guide->set_color(r, g, b, true);
@@ -167,15 +162,9 @@ void GuidelinePropertiesDialog::_setup() {
add_button(Gtk::Stock::DELETE, -12);
add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
-#if WITH_GTKMM_3_0
- Gtk::Box *mainVBox = get_content_area();
+ auto mainVBox = get_content_area();
_layout_table.set_row_spacing(4);
_layout_table.set_column_spacing(4);
-#else
- Gtk::Box *mainVBox = get_vbox();
- _layout_table.set_spacings(4);
- _layout_table.resize (3, 4);
-#endif
mainVBox->pack_start(_layout_table, false, false, 0);
@@ -185,7 +174,6 @@ void GuidelinePropertiesDialog::_setup() {
_label_descr.set_label("foo1");
_label_descr.set_alignment(0, 0.5);
-#if WITH_GTKMM_3_0
_label_name.set_halign(Gtk::ALIGN_FILL);
_label_name.set_valign(Gtk::ALIGN_FILL);
_layout_table.attach(_label_name, 0, 0, 3, 1);
@@ -203,19 +191,6 @@ void GuidelinePropertiesDialog::_setup() {
_color.set_valign(Gtk::ALIGN_FILL);
_color.set_hexpand();
_layout_table.attach(_color, 1, 3, 2, 1);
-#else
- _layout_table.attach(_label_name,
- 0, 3, 0, 1, Gtk::FILL, Gtk::FILL);
-
- _layout_table.attach(_label_descr,
- 0, 3, 1, 2, Gtk::FILL, Gtk::FILL);
-
- _layout_table.attach(_label_entry,
- 1, 3, 2, 3, Gtk::EXPAND | Gtk::FILL, Gtk::FILL);
-
- _layout_table.attach(_color,
- 1, 3, 3, 4, Gtk::EXPAND | Gtk::FILL, Gtk::FILL);
-#endif
// unitmenus
/* fixme: We should allow percents here too, as percents of the canvas size */
@@ -234,7 +209,6 @@ void GuidelinePropertiesDialog::_setup() {
_spin_button_y.setIncrements(1.0, 10.0);
_spin_button_y.setRange(-1e6, 1e6);
-#if WITH_GTKMM_3_0
_spin_button_x.set_halign(Gtk::ALIGN_FILL);
_spin_button_x.set_valign(Gtk::ALIGN_FILL);
_spin_button_x.set_hexpand();
@@ -248,22 +222,12 @@ void GuidelinePropertiesDialog::_setup() {
_unit_menu.set_halign(Gtk::ALIGN_FILL);
_unit_menu.set_valign(Gtk::ALIGN_FILL);
_layout_table.attach(_unit_menu, 2, 4, 1, 1);
-#else
- _layout_table.attach(_spin_button_x,
- 1, 2, 4, 5, Gtk::EXPAND | Gtk::FILL, Gtk::FILL);
- _layout_table.attach(_spin_button_y,
- 1, 2, 5, 6, Gtk::EXPAND | Gtk::FILL, Gtk::FILL);
-
- _layout_table.attach(_unit_menu,
- 2, 3, 4, 5, Gtk::FILL, Gtk::FILL);
-#endif
// angle spinbutton
_spin_angle.setDigits(3);
_spin_angle.setIncrements(1.0, 10.0);
_spin_angle.setRange(-3600., 3600.);
-#if WITH_GTKMM_3_0
_spin_angle.set_halign(Gtk::ALIGN_FILL);
_spin_angle.set_valign(Gtk::ALIGN_FILL);
_spin_angle.set_hexpand();
@@ -280,18 +244,6 @@ void GuidelinePropertiesDialog::_setup() {
_locked_toggle.set_valign(Gtk::ALIGN_FILL);
_locked_toggle.set_hexpand();
_layout_table.attach(_locked_toggle, 1, 8, 2, 1);
-#else
- _layout_table.attach(_spin_angle,
- 1, 3, 6, 7, Gtk::EXPAND | Gtk::FILL, Gtk::FILL);
-
- // mode radio button
- _layout_table.attach(_relative_toggle,
- 1, 3, 7, 8, Gtk::EXPAND | Gtk::FILL, Gtk::FILL);
-
- // locked radio button
- _layout_table.attach(_locked_toggle,
- 1, 3, 8, 9, Gtk::EXPAND | Gtk::FILL, Gtk::FILL);
-#endif
_relative_toggle.signal_toggled().connect(sigc::mem_fun(*this, &GuidelinePropertiesDialog::_modeChanged));
_relative_toggle.set_active(_relative_toggle_status);
@@ -344,15 +296,9 @@ void GuidelinePropertiesDialog::_setup() {
// init name entry
_label_entry.getEntry()->set_text(_guide->getLabel() ? _guide->getLabel() : "");
-#if WITH_GTKMM_3_0
Gdk::RGBA c;
c.set_rgba(((_guide->getColor()>>24)&0xff) / 255.0, ((_guide->getColor()>>16)&0xff) / 255.0, ((_guide->getColor()>>8)&0xff) / 255.0);
_color.set_rgba(c);
-#else
- Gdk::Color c;
- c.set_rgb_p(((_guide->getColor()>>24)&0xff) / 255.0, ((_guide->getColor()>>16)&0xff) / 255.0, ((_guide->getColor()>>8)&0xff) / 255.0);
- _color.set_color(c);
-#endif
_modeChanged(); // sets values of spinboxes.
diff --git a/src/ui/dialog/guides.h b/src/ui/dialog/guides.h
index 5dce0d6ed..25d32015c 100644
--- a/src/ui/dialog/guides.h
+++ b/src/ui/dialog/guides.h
@@ -16,12 +16,7 @@
#endif
#include <gtkmm/dialog.h>
-
-#if WITH_GTKMM_3_0
#include <gtkmm/grid.h>
-#else
-#include <gtkmm/table.h>
-#endif
#include <gtkmm/label.h>
#include <gtkmm/colorbutton.h>
@@ -71,12 +66,7 @@ private:
SPDesktop *_desktop;
SPGuide *_guide;
-#if WITH_GTKMM_3_0
- Gtk::Grid _layout_table;
-#else
- Gtk::Table _layout_table;
-#endif
-
+ Gtk::Grid _layout_table;
Gtk::Label _label_name;
Gtk::Label _label_descr;
Inkscape::UI::Widget::CheckButton _locked_toggle;
diff --git a/src/ui/dialog/icon-preview.cpp b/src/ui/dialog/icon-preview.cpp
index 8dd0ae489..a4fcc9947 100644
--- a/src/ui/dialog/icon-preview.cpp
+++ b/src/ui/dialog/icon-preview.cpp
@@ -359,8 +359,8 @@ void IconPreviewPanel::refreshPreview()
if ( sel ) {
//g_message("found a selection to play with");
- std::vector<SPItem*> const items = sel->itemList();
- for(std::vector<SPItem*>::const_iterator i=items.begin();!target && i!=items.end();++i){
+ auto items = sel->items();
+ for(auto i=items.begin();!target && i!=items.end();++i){
SPItem* item = *i;
gchar const *id = item->getId();
if ( id ) {
diff --git a/src/ui/dialog/icon-preview.h b/src/ui/dialog/icon-preview.h
index 8a6e19a25..caec7e3b5 100644
--- a/src/ui/dialog/icon-preview.h
+++ b/src/ui/dialog/icon-preview.h
@@ -66,13 +66,7 @@ private:
gdouble minDelay;
Gtk::VBox iconBox;
-
-#if WITH_GTKMM_3_0
Gtk::Paned splitter;
-#else
- Gtk::HPaned splitter;
-#endif
-
Glib::ustring targetId;
int hot;
int numEntries;
diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp
index 2f4ac8606..4574e93fe 100644
--- a/src/ui/dialog/inkscape-preferences.cpp
+++ b/src/ui/dialog/inkscape-preferences.cpp
@@ -78,12 +78,8 @@ InkscapePreferences::InkscapePreferences()
_getContents()->add(*sb);
show_all_children();
Gtk::Requisition sreq;
-#if WITH_GTKMM_3_0
Gtk::Requisition sreq_natural;
sb->get_preferred_size(sreq_natural, sreq);
-#else
- sreq = sb->size_request();
-#endif
_sb_width = sreq.width;
_getContents()->remove(*sb);
delete sb;
@@ -855,17 +851,10 @@ static void proofComboChanged( Gtk::ComboBoxText* combo )
}
static void gamutColorChanged( Gtk::ColorButton* btn ) {
-#if WITH_GTKMM_3_0
- Gdk::RGBA rgba = btn->get_rgba();
- gushort r = rgba.get_red_u();
- gushort g = rgba.get_green_u();
- gushort b = rgba.get_blue_u();
-#else
- Gdk::Color color = btn->get_color();
- gushort r = color.get_red();
- gushort g = color.get_green();
- gushort b = color.get_blue();
-#endif
+ auto rgba = btn->get_rgba();
+ auto r = rgba.get_red_u();
+ auto g = rgba.get_green_u();
+ auto b = rgba.get_blue_u();
gchar* tmp = g_strdup_printf("#%02x%02x%02x", (r >> 8), (g >> 8), (b >> 8) );
@@ -1035,13 +1024,8 @@ void InkscapePreferences::initPageIO()
Glib::ustring colorStr = prefs->getString("/options/softproof/gamutcolor");
-#if WITH_GTKMM_3_0
Gdk::RGBA tmpColor( colorStr.empty() ? "#00ff00" : colorStr);
_cms_gamutcolor.set_rgba( tmpColor );
-#else
- Gdk::Color tmpColor( colorStr.empty() ? "#00ff00" : colorStr);
- _cms_gamutcolor.set_color( tmpColor );
-#endif
_page_cms.add_line( true, _("Out of gamut warning color:"), _cms_gamutcolor, "",
_("Selects the color used for out of gamut warning"), false);
@@ -1586,31 +1570,19 @@ void InkscapePreferences::initKeyboardShortcuts(Gtk::TreeModel::iterator iter_ui
int row = 3;
-#if WITH_GTKMM_3_0
scroller->set_hexpand();
scroller->set_vexpand();
_page_keyshortcuts.attach(*scroller, 0, row, 2, 1);
-#else
- _page_keyshortcuts.attach(*scroller, 0, 2, row, row+1, Gtk::EXPAND | Gtk::FILL, Gtk::EXPAND | Gtk::FILL);
-#endif
row++;
-#if WITH_GTKMM_3_0
- Gtk::ButtonBox *box_buttons = Gtk::manage(new Gtk::ButtonBox);
-#else
- Gtk::HButtonBox *box_buttons = Gtk::manage (new Gtk::HButtonBox);
-#endif
+ auto box_buttons = Gtk::manage(new Gtk::ButtonBox);
box_buttons->set_layout(Gtk::BUTTONBOX_END);
box_buttons->set_spacing(4);
-#if WITH_GTKMM_3_0
box_buttons->set_hexpand();
_page_keyshortcuts.attach(*box_buttons, 0, row, 3, 1);
-#else
- _page_keyshortcuts.attach(*box_buttons, 0, 3, row, row+1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK);
-#endif
UI::Widget::Button *kb_reset = Gtk::manage(new UI::Widget::Button(_("Reset"), _("Remove all your customized keyboard shortcuts, and revert to the shortcuts in the shortcut file listed above")));
box_buttons->pack_start(*kb_reset, true, true, 6);
@@ -2043,12 +2015,8 @@ bool InkscapePreferences::SetMaxDialogSize(const Gtk::TreeModel::iterator& iter)
_page_frame.add(*page);
this->show_all_children();
Gtk::Requisition sreq;
-#if WITH_GTKMM_3_0
Gtk::Requisition sreq_natural;
this->get_preferred_size(sreq_natural, sreq);
-#else
- sreq = this->size_request();
-#endif
_max_dialog_width=std::max(_max_dialog_width, sreq.width);
_max_dialog_height=std::max(_max_dialog_height, sreq.height);
_page_frame.remove();
diff --git a/src/ui/dialog/inkscape-preferences.h b/src/ui/dialog/inkscape-preferences.h
index d1abcfc58..781b5e48e 100644
--- a/src/ui/dialog/inkscape-preferences.h
+++ b/src/ui/dialog/inkscape-preferences.h
@@ -97,11 +97,7 @@ enum {
};
namespace Gtk {
-#if WITH_GTKMM_3_0
class Scale;
-#else
-class HScale;
-#endif
}
namespace Inkscape {
@@ -206,11 +202,7 @@ protected:
UI::Widget::PrefCheckButton _scroll_space;
UI::Widget::PrefCheckButton _wheel_zoom;
-#if WITH_GTKMM_3_0
Gtk::Scale *_slider_snapping_delay;
-#else
- Gtk::HScale *_slider_snapping_delay;
-#endif
UI::Widget::PrefCheckButton _snap_indicator;
UI::Widget::PrefCheckButton _snap_closest_only;
diff --git a/src/ui/dialog/input.cpp b/src/ui/dialog/input.cpp
index 1bfb59ae5..9fd2288e7 100644
--- a/src/ui/dialog/input.cpp
+++ b/src/ui/dialog/input.cpp
@@ -21,19 +21,13 @@
#include <gtkmm/cellrenderercombo.h>
#include <gtkmm/checkbutton.h>
#include <gtkmm/comboboxtext.h>
+#include <gtkmm/grid.h>
#include <gtkmm/liststore.h>
#include <gtkmm/menubar.h>
#include <gtkmm/notebook.h>
#include <gtkmm/paned.h>
#include <gtkmm/progressbar.h>
#include <gtkmm/scrolledwindow.h>
-
-#if WITH_GTKMM_3_0
-# include <gtkmm/grid.h>
-#else
-# include <gtkmm/table.h>
-#endif
-
#include <gtkmm/treestore.h>
#include "device-manager.h"
@@ -422,13 +416,7 @@ private:
Blink watcher;
Gtk::CheckButton useExt;
Gtk::Button save;
-
-#if WITH_GTKMM_3_0
Gtk::Paned pane;
-#else
- Gtk::HPaned pane;
-#endif
-
Gtk::VBox detailsBox;
Gtk::HBox titleFrame;
Gtk::Label titleLabel;
@@ -489,27 +477,14 @@ private:
Inkscape::UI::Widget::Frame axisFrame;
Gtk::ScrolledWindow treeScroller;
Gtk::ScrolledWindow detailScroller;
-
-#if WITH_GTKMM_3_0
Gtk::Paned splitter;
Gtk::Paned split2;
-#else
- Gtk::HPaned splitter;
- Gtk::VPaned split2;
-#endif
-
Gtk::Label devName;
Gtk::Label devKeyCount;
Gtk::Label devAxesCount;
Gtk::ComboBoxText axesCombo;
Gtk::ProgressBar axesValues[6];
-
-#if WITH_GTKMM_3_0
Gtk::Grid axisTable;
-#else
- Gtk::Table axisTable;
-#endif
-
Gtk::ComboBoxText buttonCombo;
Gtk::ComboBoxText linkCombo;
sigc::connection linkConnection;
@@ -519,13 +494,7 @@ private:
Gtk::Image testThumb;
Gtk::Image testButtons[24];
Gtk::Image testAxes[8];
-
-#if WITH_GTKMM_3_0
Gtk::Grid imageTable;
-#else
- Gtk::Table imageTable;
-#endif
-
Gtk::EventBox testDetector;
ConfPanel cfgPanel;
@@ -611,20 +580,11 @@ InputDialogImpl::InputDialogImpl() :
treeScroller(),
detailScroller(),
splitter(),
-#if WITH_GTKMM_3_0
split2(Gtk::ORIENTATION_VERTICAL),
axisTable(),
-#else
- split2(),
- axisTable(11, 2),
-#endif
linkCombo(),
topHolder(),
-#if WITH_GTKMM_3_0
imageTable(),
-#else
- imageTable(8, 7),
-#endif
testDetector(),
cfgPanel()
{
@@ -646,27 +606,16 @@ InputDialogImpl::InputDialogImpl() :
testFrame.add(testDetector);
testThumb.set(getPix(PIX_TABLET));
testThumb.set_padding(24, 24);
-
-#if WITH_GTKMM_3_0
testThumb.set_hexpand();
testThumb.set_vexpand();
imageTable.attach(testThumb, 0, 0, 8, 1);
-#else
- imageTable.attach(testThumb, 0, 8, 0, 1, ::Gtk::EXPAND, ::Gtk::EXPAND);
-#endif
{
guint col = 0;
guint row = 1;
for ( guint num = 0; num < G_N_ELEMENTS(testButtons); num++ ) {
testButtons[num].set(getPix(PIX_BUTTONS_NONE));
-
-#if WITH_GTKMM_3_0
imageTable.attach(testButtons[num], col, row, 1, 1);
-#else
- imageTable.attach(testButtons[num], col, col + 1, row, row + 1, ::Gtk::FILL, ::Gtk::FILL);
-#endif
-
col++;
if (col > 7) {
col = 0;
@@ -677,13 +626,7 @@ InputDialogImpl::InputDialogImpl() :
col = 0;
for ( guint num = 0; num < G_N_ELEMENTS(testAxes); num++ ) {
testAxes[num].set(getPix(PIX_AXIS_NONE));
-
-#if WITH_GTKMM_3_0
imageTable.attach(testAxes[num], col * 2, row, 2, 1);
-#else
- imageTable.attach(testAxes[num], col * 2, (col + 1) * 2, row, row + 1, ::Gtk::FILL, ::Gtk::FILL);
-#endif
-
col++;
if (col > 3) {
col = 0;
@@ -721,45 +664,17 @@ InputDialogImpl::InputDialogImpl() :
axisFrame.add(axisTable);
Gtk::Label *lbl = Gtk::manage(new Gtk::Label(_("Link:")));
-
-#if WITH_GTKMM_3_0
axisTable.attach(*lbl, 0, rowNum, 1, 1);
-#else
- axisTable.attach(*lbl, 0, 1, rowNum, rowNum+ 1,
- ::Gtk::FILL,
- ::Gtk::SHRINK);
-#endif
-
linkCombo.append(_("None"));
linkCombo.set_active_text(_("None"));
linkCombo.set_sensitive(false);
linkConnection = linkCombo.signal_changed().connect(sigc::mem_fun(*this, &InputDialogImpl::linkComboChanged));
-
-#if WITH_GTKMM_3_0
axisTable.attach(linkCombo, 1, rowNum, 1, 1);
-#else
- axisTable.attach(linkCombo, 1, 2, rowNum, rowNum + 1,
- ::Gtk::FILL,
- ::Gtk::SHRINK);
-#endif
-
rowNum++;
-
lbl = Gtk::manage(new Gtk::Label(_("Axes count:")));
-
-#if WITH_GTKMM_3_0
axisTable.attach(*lbl, 0, rowNum, 1, 1);
axisTable.attach(devAxesCount, 1, rowNum, 1, 1);
-#else
- axisTable.attach(*lbl, 0, 1, rowNum, rowNum+ 1,
- ::Gtk::FILL,
- ::Gtk::SHRINK);
- axisTable.attach(devAxesCount, 1, 2, rowNum, rowNum + 1,
- ::Gtk::SHRINK,
- ::Gtk::SHRINK);
-#endif
-
rowNum++;
@@ -777,22 +692,11 @@ InputDialogImpl::InputDialogImpl() :
for ( guint barNum = 0; barNum < static_cast<guint>(G_N_ELEMENTS(axesValues)); barNum++ ) {
lbl = Gtk::manage(new Gtk::Label(_("axis:")));
-
-#if WITH_GTKMM_3_0
lbl->set_hexpand();
axisTable.attach(*lbl, 0, rowNum, 1, 1);
axesValues[barNum].set_hexpand();
axisTable.attach(axesValues[barNum], 1, rowNum, 1, 1);
-#else
- axisTable.attach(*lbl, 0, 1, rowNum, rowNum+ 1,
- ::Gtk::EXPAND,
- ::Gtk::SHRINK);
- axisTable.attach(axesValues[barNum], 1, 2, rowNum, rowNum + 1,
- ::Gtk::EXPAND,
- ::Gtk::SHRINK);
-#endif
-
axesValues[barNum].set_sensitive(false);
rowNum++;
@@ -802,17 +706,8 @@ InputDialogImpl::InputDialogImpl() :
lbl = Gtk::manage(new Gtk::Label(_("Button count:")));
-#if WITH_GTKMM_3_0
axisTable.attach(*lbl, 0, rowNum, 1, 1);
axisTable.attach(devKeyCount, 1, rowNum, 1, 1);
-#else
- axisTable.attach(*lbl, 0, 1, rowNum, rowNum+ 1,
- ::Gtk::FILL,
- ::Gtk::SHRINK);
- axisTable.attach(devKeyCount, 1, 2, rowNum, rowNum + 1,
- ::Gtk::SHRINK,
- ::Gtk::SHRINK);
-#endif
rowNum++;
@@ -828,13 +723,7 @@ InputDialogImpl::InputDialogImpl() :
rowNum++;
*/
-#if WITH_GTKMM_3_0
axisTable.attach(keyVal, 0, rowNum, 2, 1);
-#else
- axisTable.attach(keyVal, 0, 2, rowNum, rowNum + 1,
- ::Gtk::FILL,
- ::Gtk::SHRINK);
-#endif
rowNum++;
@@ -848,18 +737,9 @@ InputDialogImpl::InputDialogImpl() :
// TODO: Extension event stuff has been removed from public API in GTK+ 3
// Need to check that this hasn't broken anything
-#if !GTK_CHECK_VERSION(3,0,0)
- gtk_widget_set_extension_events( GTK_WIDGET(testDetector.gobj()), GDK_EXTENSION_EVENTS_ALL );
-#endif
testDetector.add_events(Gdk::POINTER_MOTION_MASK|Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK |Gdk::PROXIMITY_IN_MASK|Gdk::PROXIMITY_OUT_MASK|Gdk::SCROLL_MASK);
-#if WITH_GTKMM_3_0
axisTable.attach(keyEntry, 0, rowNum, 2, 1);
-#else
- axisTable.attach(keyEntry, 0, 2, rowNum, rowNum + 1,
- ::Gtk::FILL,
- ::Gtk::SHRINK);
-#endif
rowNum++;
@@ -1141,12 +1021,7 @@ InputDialogImpl::ConfPanel::ConfPanel() :
useExt.set_active(Preferences::get()->getBool("/options/useextinput/value"));
useExt.signal_toggled().connect(sigc::mem_fun(*this, &InputDialogImpl::ConfPanel::useExtToggled));
-#if WITH_GTKMM_3_0
- Gtk::ButtonBox *buttonBox = Gtk::manage(new Gtk::ButtonBox);
-#else
- Gtk::HButtonBox *buttonBox = Gtk::manage (new Gtk::HButtonBox);
-#endif
-
+ auto buttonBox = Gtk::manage(new Gtk::ButtonBox);
buttonBox->set_layout (Gtk::BUTTONBOX_END);
//Gtk::Alignment *align = new Gtk::Alignment(Gtk::ALIGN_END, Gtk::ALIGN_START, 0, 0);
buttonBox->add(save);
@@ -1930,7 +1805,6 @@ bool InputDialogImpl::eventSnoop(GdkEvent* event)
testThumb.set(getPix(PIX_ERASER));
break;
}
-#if WITH_GTKMM_3_0
/// \fixme GTK3 added new GDK_SOURCEs that should be handled here!
case GDK_SOURCE_KEYBOARD:
case GDK_SOURCE_TOUCHSCREEN:
@@ -1938,7 +1812,6 @@ bool InputDialogImpl::eventSnoop(GdkEvent* event)
g_warning("InputDialogImpl::eventSnoop : unhandled GDK_SOURCE type!");
break;
}
-#endif
}
updateTestButtons(key, hotButton);
diff --git a/src/ui/dialog/layer-properties.cpp b/src/ui/dialog/layer-properties.cpp
index 9cfc21e18..4aa86cc48 100644
--- a/src/ui/dialog/layer-properties.cpp
+++ b/src/ui/dialog/layer-properties.cpp
@@ -38,22 +38,15 @@ namespace Dialogs {
LayerPropertiesDialog::LayerPropertiesDialog()
: _strategy(NULL), _desktop(NULL), _layer(NULL), _position_visible(false)
{
-#if WITH_GTKMM_3_0
- Gtk::Box *mainVBox = get_content_area();
+ auto mainVBox = get_content_area();
_layout_table.set_row_spacing(4);
_layout_table.set_column_spacing(4);
-#else
- Gtk::Box *mainVBox = get_vbox();
- _layout_table.set_spacings(4);
- _layout_table.resize (1, 2);
-#endif
// Layer name widgets
_layer_name_entry.set_activates_default(true);
_layer_name_label.set_label(_("Layer name:"));
_layer_name_label.set_alignment(1.0, 0.5);
-#if WITH_GTKMM_3_0
_layer_name_label.set_halign(Gtk::ALIGN_FILL);
_layer_name_label.set_valign(Gtk::ALIGN_FILL);
_layout_table.attach(_layer_name_label, 0, 0, 1, 1);
@@ -62,12 +55,6 @@ LayerPropertiesDialog::LayerPropertiesDialog()
_layer_name_entry.set_valign(Gtk::ALIGN_FILL);
_layer_name_entry.set_hexpand();
_layout_table.attach(_layer_name_entry, 1, 0, 1, 1);
-#else
- _layout_table.attach(_layer_name_label,
- 0, 1, 0, 1, Gtk::FILL, Gtk::FILL);
- _layout_table.attach(_layer_name_entry,
- 1, 2, 0, 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL);
-#endif
mainVBox->pack_start(_layout_table, true, true, 4);
@@ -164,10 +151,6 @@ LayerPropertiesDialog::_setup_position_controls() {
_layer_position_combo.set_cell_data_func(_label_renderer,
sigc::mem_fun(*this, &LayerPropertiesDialog::_prepareLabelRenderer));
-#if !WITH_GTKMM_3_0
- _layout_table.resize (2, 2);
-#endif
-
Gtk::ListStore::iterator row;
row = _dropdown_list->append();
row->set_value(_dropdown_columns.position, LPOS_ABOVE);
@@ -183,7 +166,6 @@ LayerPropertiesDialog::_setup_position_controls() {
_layer_position_label.set_label(_("Position:"));
_layer_position_label.set_alignment(1.0, 0.5);
-#if WITH_GTKMM_3_0
_layer_position_combo.set_halign(Gtk::ALIGN_FILL);
_layer_position_combo.set_valign(Gtk::ALIGN_FILL);
_layer_position_combo.set_hexpand();
@@ -192,12 +174,6 @@ LayerPropertiesDialog::_setup_position_controls() {
_layer_position_label.set_halign(Gtk::ALIGN_FILL);
_layer_position_label.set_valign(Gtk::ALIGN_FILL);
_layout_table.attach(_layer_position_label, 0, 1, 1, 1);
-#else
- _layout_table.attach(_layer_position_combo,
- 1, 2, 1, 2, Gtk::FILL | Gtk::EXPAND, Gtk::FILL);
- _layout_table.attach(_layer_position_label,
- 0, 1, 1, 2, Gtk::FILL, Gtk::FILL);
-#endif
show_all_children();
}
@@ -252,16 +228,11 @@ LayerPropertiesDialog::_setup_layers_controls() {
_layout_table.remove(_layer_name_entry);
_layout_table.remove(_layer_name_label);
-#if WITH_GTKMM_3_0
_scroller.set_halign(Gtk::ALIGN_FILL);
_scroller.set_valign(Gtk::ALIGN_FILL);
_scroller.set_hexpand();
_scroller.set_vexpand();
_layout_table.attach(_scroller, 0, 1, 2, 1);
-#else
- _layout_table.attach(_scroller,
- 0, 2, 1, 2, Gtk::FILL | Gtk::EXPAND, Gtk::FILL | Gtk::EXPAND);
-#endif
show_all_children();
}
diff --git a/src/ui/dialog/layer-properties.h b/src/ui/dialog/layer-properties.h
index c75a7f190..f62f22782 100644
--- a/src/ui/dialog/layer-properties.h
+++ b/src/ui/dialog/layer-properties.h
@@ -19,12 +19,7 @@
#include <gtkmm/dialog.h>
#include <gtkmm/entry.h>
#include <gtkmm/label.h>
-
-#if WITH_GTKMM_3_0
#include <gtkmm/grid.h>
-#else
-#include <gtkmm/table.h>
-#endif
#include <gtkmm/combobox.h>
#include <gtkmm/liststore.h>
@@ -102,12 +97,7 @@ protected:
Gtk::Entry _layer_name_entry;
Gtk::Label _layer_position_label;
Gtk::ComboBox _layer_position_combo;
-
-#if WITH_GTKMM_3_0
Gtk::Grid _layout_table;
-#else
- Gtk::Table _layout_table;
-#endif
bool _position_visible;
diff --git a/src/ui/dialog/layers.cpp b/src/ui/dialog/layers.cpp
index c75c631d7..dd9d7ec25 100644
--- a/src/ui/dialog/layers.cpp
+++ b/src/ui/dialog/layers.cpp
@@ -858,12 +858,8 @@ LayersPanel::LayersPanel() :
_scroller.set_policy( Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC );
_scroller.set_shadow_type(Gtk::SHADOW_IN);
Gtk::Requisition sreq;
-#if WITH_GTKMM_3_0
Gtk::Requisition sreq_natural;
_scroller.get_preferred_size(sreq_natural, sreq);
-#else
- sreq = _scroller.size_request();
-#endif
int minHeight = 70;
if (sreq.height < minHeight) {
// Set a min height to see the layers when used with Ubuntu liboverlay-scrollbar
diff --git a/src/ui/dialog/layers.h b/src/ui/dialog/layers.h
index 9cd2c3b92..893b31557 100644
--- a/src/ui/dialog/layers.h
+++ b/src/ui/dialog/layers.h
@@ -124,15 +124,9 @@ private:
Gtk::TreeView _tree;
Gtk::CellRendererText *_text_renderer;
Gtk::TreeView::Column *_name_column;
-#if WITH_GTKMM_3_0
Gtk::Box _buttonsRow;
Gtk::Box _buttonsPrimary;
Gtk::Box _buttonsSecondary;
-#else
- Gtk::HBox _buttonsRow;
- Gtk::HBox _buttonsPrimary;
- Gtk::HBox _buttonsSecondary;
-#endif
Gtk::ScrolledWindow _scroller;
Gtk::Menu _popupMenu;
Inkscape::UI::Widget::SpinButton _spinBtn;
diff --git a/src/ui/dialog/livepatheffect-add.cpp b/src/ui/dialog/livepatheffect-add.cpp
index 3602b04df..917e48ac6 100644
--- a/src/ui/dialog/livepatheffect-add.cpp
+++ b/src/ui/dialog/livepatheffect-add.cpp
@@ -73,11 +73,7 @@ LivePathEffectAdd::LivePathEffectAdd() :
add_button.set_use_underline(true);
add_button.set_can_default();
-#if WITH_GTKMM_3_0
- Gtk::Box *mainVBox = get_content_area();
-#else
- Gtk::Box *mainVBox = get_vbox();
-#endif
+ auto mainVBox = get_content_area();
mainVBox->pack_start(scrolled_window, true, true);
add_action_widget(close_button, Gtk::RESPONSE_CLOSE);
diff --git a/src/ui/dialog/livepatheffect-editor.cpp b/src/ui/dialog/livepatheffect-editor.cpp
index ac64143f1..459d8d4ee 100644
--- a/src/ui/dialog/livepatheffect-editor.cpp
+++ b/src/ui/dialog/livepatheffect-editor.cpp
@@ -125,13 +125,6 @@ LivePathEffectEditor::LivePathEffectEditor()
// Add toolbar items to toolbar
toolbar_hbox.set_layout (Gtk::BUTTONBOX_END);
-
-#if !WITH_GTKMM_3_0
- // TODO: This has been removed from Gtkmm 3.0. Check that
- // everything still looks OK!
- toolbar_hbox.set_child_min_width( 16 );
-#endif
-
toolbar_hbox.add( button_add );
toolbar_hbox.set_child_secondary( button_add , true);
toolbar_hbox.add( button_remove );
diff --git a/src/ui/dialog/livepatheffect-editor.h b/src/ui/dialog/livepatheffect-editor.h
index 4aac25eaa..b69ee007a 100644
--- a/src/ui/dialog/livepatheffect-editor.h
+++ b/src/ui/dialog/livepatheffect-editor.h
@@ -112,11 +112,7 @@ private:
void on_visibility_toggled( Glib::ustring const& str );
-#if WITH_GTKMM_3_0
Gtk::ButtonBox toolbar_hbox;
-#else
- Gtk::HButtonBox toolbar_hbox;
-#endif
Gtk::Button button_add;
Gtk::Button button_remove;
Gtk::Button button_up;
diff --git a/src/ui/dialog/new-from-template.cpp b/src/ui/dialog/new-from-template.cpp
index 96fa72791..2b33fd54d 100644
--- a/src/ui/dialog/new-from-template.cpp
+++ b/src/ui/dialog/new-from-template.cpp
@@ -30,20 +30,12 @@ NewFromTemplate::NewFromTemplate()
_main_widget = new TemplateLoadTab(this);
-#if WITH_GTKMM_3_0
get_content_area()->pack_start(*_main_widget);
-#else
- get_vbox()->pack_start(*_main_widget);
-#endif
Gtk::Alignment *align;
align = Gtk::manage(new Gtk::Alignment(Gtk::ALIGN_END, Gtk::ALIGN_CENTER, 0.0, 0.0));
-#if WITH_GTKMM_3_0
get_content_area()->pack_end(*align, Gtk::PACK_SHRINK);
-#else
- get_vbox()->pack_end(*align, Gtk::PACK_SHRINK);
-#endif
align->set_padding(0, 0, 0, 15);
align->add(_create_template_button);
diff --git a/src/ui/dialog/object-properties.cpp b/src/ui/dialog/object-properties.cpp
index 545c240fc..191216eea 100644
--- a/src/ui/dialog/object-properties.cpp
+++ b/src/ui/dialog/object-properties.cpp
@@ -37,12 +37,7 @@
#include "sp-image.h"
#include <glibmm/i18n.h>
-#if WITH_GTKMM_3_0
-# include <gtkmm/grid.h>
-#else
-# include <gtkmm/table.h>
-#endif
-
+#include <gtkmm/grid.h>
namespace Inkscape {
namespace UI {
@@ -103,16 +98,9 @@ void ObjectProperties::_init()
Gtk::Box *contents = _getContents();
contents->set_spacing(0);
-#if WITH_GTKMM_3_0
- Gtk::Grid *grid_top = Gtk::manage(new Gtk::Grid());
+ auto grid_top = Gtk::manage(new Gtk::Grid());
grid_top->set_row_spacing(4);
grid_top->set_column_spacing(0);
-#else
- Gtk::Table *grid_top = Gtk::manage(new Gtk::Table(4, 4));
- grid_top->set_row_spacings(4);
- grid_top->set_col_spacings(0);
-#endif
-
grid_top->set_border_width(4);
contents->pack_start(*grid_top, false, false, 0);
@@ -121,29 +109,14 @@ void ObjectProperties::_init()
/* Create the label for the object id */
_label_id.set_label(_label_id.get_label() + " ");
_label_id.set_alignment(1, 0.5);
-
-#if WITH_GTKMM_3_0
_label_id.set_valign(Gtk::ALIGN_CENTER);
grid_top->attach(_label_id, 0, 0, 1, 1);
-#else
- grid_top->attach(_label_id, 0, 1, 0, 1,
- Gtk::SHRINK | Gtk::FILL,
- Gtk::AttachOptions(), 0, 0 );
-#endif
-
/* Create the entry box for the object id */
_entry_id.set_tooltip_text(_("The id= attribute (only letters, digits, and the characters .-_: allowed)"));
_entry_id.set_max_length(64);
-
-#if WITH_GTKMM_3_0
_entry_id.set_valign(Gtk::ALIGN_CENTER);
grid_top->attach(_entry_id, 1, 0, 1, 1);
-#else
- grid_top->attach(_entry_id, 1, 2, 0, 1,
- Gtk::EXPAND | Gtk::FILL,
- Gtk::AttachOptions(), 0, 0 );
-#endif
_label_id.set_mnemonic_widget(_entry_id);
@@ -157,29 +130,16 @@ void ObjectProperties::_init()
_label_label.set_label(_label_label.get_label() + " ");
_label_label.set_alignment(1, 0.5);
-#if WITH_GTKMM_3_0
_label_label.set_valign(Gtk::ALIGN_CENTER);
grid_top->attach(_label_label, 0, 1, 1, 1);
-#else
- grid_top->attach(_label_label, 0, 1, 1, 2,
- Gtk::SHRINK | Gtk::FILL,
- Gtk::AttachOptions(), 0, 0 );
-#endif
-
/* Create the entry box for the object label */
_entry_label.set_tooltip_text(_("A freeform label for the object"));
_entry_label.set_max_length(256);
-#if WITH_GTKMM_3_0
_entry_label.set_hexpand();
_entry_label.set_valign(Gtk::ALIGN_CENTER);
grid_top->attach(_entry_label, 1, 1, 1, 1);
-#else
- grid_top->attach(_entry_label, 1, 2, 1, 2,
- Gtk::EXPAND | Gtk::FILL,
- Gtk::AttachOptions(), 0, 0 );
-#endif
_label_label.set_mnemonic_widget(_entry_label);
@@ -191,28 +151,16 @@ void ObjectProperties::_init()
_label_title.set_label(_label_title.get_label() + " ");
_label_title.set_alignment (1, 0.5);
-#if WITH_GTKMM_3_0
_label_title.set_valign(Gtk::ALIGN_CENTER);
grid_top->attach(_label_title, 0, 2, 1, 1);
-#else
- grid_top->attach(_label_title, 0, 1, 2, 3,
- Gtk::SHRINK | Gtk::FILL,
- Gtk::AttachOptions(), 0, 0 );
-#endif
/* Create the entry box for the object title */
_entry_title.set_sensitive (FALSE);
_entry_title.set_max_length (256);
-#if WITH_GTKMM_3_0
_entry_title.set_hexpand();
_entry_title.set_valign(Gtk::ALIGN_CENTER);
grid_top->attach(_entry_title, 1, 2, 1, 1);
-#else
- grid_top->attach(_entry_title, 1, 2, 2, 3,
- Gtk::EXPAND | Gtk::FILL,
- Gtk::AttachOptions(), 0, 0 );
-#endif
_label_title.set_mnemonic_widget(_entry_title);
// pressing enter in the label field is the same as clicking Set:
@@ -241,14 +189,8 @@ void ObjectProperties::_init()
_label_image_rendering.set_label(_label_image_rendering.get_label() + " ");
_label_image_rendering.set_alignment(1, 0.5);
-#if WITH_GTKMM_3_0
_label_image_rendering.set_valign(Gtk::ALIGN_CENTER);
grid_top->attach(_label_image_rendering, 0, 3, 1, 1);
-#else
- grid_top->attach(_label_image_rendering, 0, 1, 3, 4,
- Gtk::SHRINK | Gtk::FILL,
- Gtk::AttachOptions(), 0, 0 );
-#endif
/* Create the combo box text for the 'image-rendering' property */
_combo_image_rendering.append( "auto" );
@@ -256,14 +198,8 @@ void ObjectProperties::_init()
_combo_image_rendering.append( "optimizeSpeed" );
_combo_image_rendering.set_tooltip_text(_("The 'image-rendering' property can influence how a bitmap is up-scaled:\n\t'auto' no preference;\n\t'optimizeQuality' smooth;\n\t'optimizeSpeed' blocky.\nNote that this behaviour is not defined in the SVG 1.1 specification and not all browsers follow this interpretation."));
-#if WITH_GTKMM_3_0
_combo_image_rendering.set_valign(Gtk::ALIGN_CENTER);
grid_top->attach(_combo_image_rendering, 1, 3, 1, 1);
-#else
- grid_top->attach(_combo_image_rendering, 1, 2, 3, 4,
- Gtk::EXPAND | Gtk::FILL,
- Gtk::AttachOptions(), 0, 0 );
-#endif
_label_image_rendering.set_mnemonic_widget(_combo_image_rendering);
@@ -275,60 +211,36 @@ void ObjectProperties::_init()
Gtk::HBox *hb_checkboxes = Gtk::manage(new Gtk::HBox());
contents->pack_start(*hb_checkboxes, FALSE, FALSE, 0);
-#if WITH_GTKMM_3_0
- Gtk::Grid *grid_cb = Gtk::manage(new Gtk::Grid());
+ auto grid_cb = Gtk::manage(new Gtk::Grid());
grid_cb->set_row_homogeneous();
grid_cb->set_column_homogeneous(true);
-#else
- Gtk::Table *grid_cb = Gtk::manage(new Gtk::Table(1, 2, true));
-#endif
grid_cb->set_border_width(4);
hb_checkboxes->pack_start(*grid_cb, true, true, 0);
/* Hide */
_cb_hide.set_tooltip_text (_("Check to make the object invisible"));
-
-#if WITH_GTKMM_3_0
_cb_hide.set_hexpand();
_cb_hide.set_valign(Gtk::ALIGN_CENTER);
grid_cb->attach(_cb_hide, 0, 0, 1, 1);
-#else
- grid_cb->attach(_cb_hide, 0, 1, 0, 1,
- Gtk::EXPAND | Gtk::FILL,
- Gtk::AttachOptions(), 0, 0 );
-#endif
_cb_hide.signal_toggled().connect(sigc::mem_fun(this, &ObjectProperties::_hiddenToggled));
/* Lock */
// TRANSLATORS: "Lock" is a verb here
_cb_lock.set_tooltip_text(_("Check to make the object insensitive (not selectable by mouse)"));
-
-#if WITH_GTKMM_3_0
_cb_lock.set_hexpand();
_cb_lock.set_valign(Gtk::ALIGN_CENTER);
grid_cb->attach(_cb_lock, 1, 0, 1, 1);
-#else
- grid_cb->attach(_cb_lock, 1, 2, 0, 1,
- Gtk::EXPAND | Gtk::FILL,
- Gtk::AttachOptions(), 0, 0 );
-#endif
_cb_lock.signal_toggled().connect(sigc::mem_fun(this, &ObjectProperties::_sensitivityToggled));
/* Button for setting the object's id, label, title and description. */
Gtk::Button *btn_set = Gtk::manage(new Gtk::Button(_("_Set"), 1));
-#if WITH_GTKMM_3_0
btn_set->set_hexpand();
btn_set->set_valign(Gtk::ALIGN_CENTER);
grid_cb->attach(*btn_set, 2, 0, 1, 1);
-#else
- grid_cb->attach(*btn_set, 2, 3, 0, 1,
- Gtk::EXPAND | Gtk::FILL,
- Gtk::AttachOptions(), 0, 0 );
-#endif
btn_set->signal_clicked().connect(sigc::mem_fun(this, &ObjectProperties::_labelChanged));
diff --git a/src/ui/dialog/object-properties.h b/src/ui/dialog/object-properties.h
index dc28c0bad..8551d5fca 100644
--- a/src/ui/dialog/object-properties.h
+++ b/src/ui/dialog/object-properties.h
@@ -50,11 +50,7 @@ class SPDesktop;
class SPItem;
namespace Gtk {
-#if WITH_GTKMM_3_0
class Grid;
-#else
-class Table;
-#endif
}
namespace Inkscape {
diff --git a/src/ui/dialog/objects.cpp b/src/ui/dialog/objects.cpp
index 43aa663e2..09ffc9c4c 100644
--- a/src/ui/dialog/objects.cpp
+++ b/src/ui/dialog/objects.cpp
@@ -330,12 +330,11 @@ void ObjectsPanel::_objectsChanged(SPObject */*obj*/)
void ObjectsPanel::_addObject(SPObject* obj, Gtk::TreeModel::Row* parentRow)
{
if ( _desktop && obj ) {
- for ( SPObject *child = obj->children; child != NULL; child = child->next) {
-
- if (SP_IS_ITEM(child))
+ for(auto& child: obj->children) {
+ if (SP_IS_ITEM(&child))
{
- SPItem * item = SP_ITEM(child);
- SPGroup * group = SP_IS_GROUP(child) ? SP_GROUP(child) : 0;
+ SPItem * item = SP_ITEM(&child);
+ SPGroup * group = SP_IS_GROUP(&child) ? SP_GROUP(&child) : 0;
//Add the item to the tree and set the column information
Gtk::TreeModel::iterator iter = parentRow ? _store->prepend(parentRow->children()) : _store->prepend();
@@ -362,14 +361,14 @@ void ObjectsPanel::_addObject(SPObject* obj, Gtk::TreeModel::Row* parentRow)
}
//Add an object watcher to the item
- ObjectsPanel::ObjectWatcher *w = new ObjectsPanel::ObjectWatcher(this, child);
- child->getRepr()->addObserver(*w);
+ ObjectsPanel::ObjectWatcher *w = new ObjectsPanel::ObjectWatcher(this, &child);
+ child.getRepr()->addObserver(*w);
_objectWatchers.push_back(w);
//If the item is a group, recursively add its children
if (group)
{
- _addObject( child, &row );
+ _addObject( &child, &row );
}
}
}
@@ -389,9 +388,8 @@ void ObjectsPanel::_updateObject( SPObject *obj, bool recurse ) {
//end mark
if (recurse)
{
- for (SPObject * iter = obj->children; iter != NULL; iter = iter->next)
- {
- _updateObject(iter, recurse);
+ for (auto& iter: obj->children) {
+ _updateObject(&iter, recurse);
}
}
}
@@ -468,8 +466,8 @@ void ObjectsPanel::_objectsSelected( Selection *sel ) {
_selectedConnection.block();
_tree.get_selection()->unselect_all();
SPItem *item = NULL;
- std::vector<SPItem*> const items = sel->itemList();
- for(std::vector<SPItem*>::const_iterator i=items.begin(); i!=items.end(); ++i){
+ auto items = sel->items();
+ for(auto i=items.begin(); i!=items.end(); ++i){
item = *i;
if (setOpacity)
{
@@ -501,28 +499,27 @@ void ObjectsPanel::_setCompositingValues(SPItem *item)
_blurConnection.block();
//Set the opacity
-#if WITH_GTKMM_3_0
_opacity_adjustment->set_value((item->style->opacity.set ? SP_SCALE24_TO_FLOAT(item->style->opacity.value) : 1) * _opacity_adjustment->get_upper());
-#else
- _opacity_adjustment.set_value((item->style->opacity.set ? SP_SCALE24_TO_FLOAT(item->style->opacity.value) : 1) * _opacity_adjustment.get_upper());
-#endif
SPFeBlend *spblend = NULL;
SPGaussianBlur *spblur = NULL;
if (item->style->getFilter())
{
- for(SPObject *primitive_obj = item->style->getFilter()->children; primitive_obj && SP_IS_FILTER_PRIMITIVE(primitive_obj); primitive_obj = primitive_obj->next) {
- if(SP_IS_FEBLEND(primitive_obj) && !spblend) {
- //Get the blend mode
- spblend = SP_FEBLEND(primitive_obj);
- }
-
- if(SP_IS_GAUSSIANBLUR(primitive_obj) && !spblur) {
- //Get the blur value
- spblur = SP_GAUSSIANBLUR(primitive_obj);
- }
+ for (auto& primitive_obj: item->style->getFilter()->children) {
+ if (!SP_IS_FILTER_PRIMITIVE(&primitive_obj)) {
+ break;
+ }
+ if(SP_IS_FEBLEND(&primitive_obj) && !spblend) {
+ //Get the blend mode
+ spblend = SP_FEBLEND(&primitive_obj);
}
+
+ if(SP_IS_GAUSSIANBLUR(&primitive_obj) && !spblur) {
+ //Get the blur value
+ spblur = SP_GAUSSIANBLUR(&primitive_obj);
+ }
+ }
}
-
+
//Set the blend mode
_fe_cb.set_blend_mode(spblend ? spblend->blend_mode : Inkscape::Filters::BLEND_NORMAL);
@@ -1282,9 +1279,9 @@ bool ObjectsPanel::_executeAction()
break;
case BUTTON_COLLAPSE_ALL:
{
- for (SPObject* obj = _document->getRoot()->firstChild(); obj != NULL; obj = obj->next) {
- if (SP_IS_GROUP(obj)) {
- _setCollapsed(SP_GROUP(obj));
+ for (auto& obj: _document->getRoot()->children) {
+ if (SP_IS_GROUP(&obj)) {
+ _setCollapsed(SP_GROUP(&obj));
}
}
_objectsChanged(_document->getRoot());
@@ -1394,9 +1391,10 @@ void ObjectsPanel::_setCollapsed(SPGroup * group)
{
group->setExpanded(false);
group->updateRepr(SP_OBJECT_WRITE_NO_CHILDREN | SP_OBJECT_WRITE_EXT);
- for (SPObject *iter = group->children; iter != NULL; iter = iter->next)
- {
- if (SP_IS_GROUP(iter)) _setCollapsed(SP_GROUP(iter));
+ for (auto& iter: group->children) {
+ if (SP_IS_GROUP(&iter)) {
+ _setCollapsed(SP_GROUP(&iter));
+ }
}
}
@@ -1471,11 +1469,7 @@ void ObjectsPanel::_opacityChangedIter(const Gtk::TreeIter& iter)
if (item)
{
item->style->opacity.set = TRUE;
-#if WITH_GTKMM_3_0
item->style->opacity.value = SP_SCALE24_FROM_FLOAT(_opacity_adjustment->get_value() / _opacity_adjustment->get_upper());
-#else
- item->style->opacity.value = SP_SCALE24_FROM_FLOAT(_opacity_adjustment.get_value() / _opacity_adjustment.get_upper());
-#endif
item->updateRepr(SP_OBJECT_WRITE_NO_CHILDREN | SP_OBJECT_WRITE_EXT);
}
}
@@ -1511,11 +1505,14 @@ void ObjectsPanel::_blendChangedIter(const Gtk::TreeIter& iter, Glib::ustring bl
if (blendmode != "normal") {
gdouble radius = 0;
if (item->style->getFilter()) {
- for (SPObject *primitive = item->style->getFilter()->children; primitive && SP_IS_FILTER_PRIMITIVE(primitive); primitive = primitive->next) {
- if (SP_IS_GAUSSIANBLUR(primitive)) {
+ for (auto& primitive: item->style->getFilter()->children) {
+ if (!SP_IS_FILTER_PRIMITIVE(&primitive)) {
+ break;
+ }
+ if (SP_IS_GAUSSIANBLUR(&primitive)) {
Geom::OptRect bbox = item->bounds(SPItem::GEOMETRIC_BBOX);
if (bbox) {
- radius = SP_GAUSSIANBLUR(primitive)->stdDeviation.getNumber();
+ radius = SP_GAUSSIANBLUR(&primitive)->stdDeviation.getNumber();
}
}
}
@@ -1523,13 +1520,16 @@ void ObjectsPanel::_blendChangedIter(const Gtk::TreeIter& iter, Glib::ustring bl
SPFilter *filter = new_filter_simple_from_item(_document, item, blendmode.c_str(), radius);
sp_style_set_property_url(item, "filter", filter, false);
} else {
- for (SPObject *primitive = item->style->getFilter()->children; primitive && SP_IS_FILTER_PRIMITIVE(primitive); primitive = primitive->next) {
- if (SP_IS_FEBLEND(primitive)) {
- primitive->deleteObject();
+ for (auto& primitive: item->style->getFilter()->children) {
+ if (!SP_IS_FILTER_PRIMITIVE(&primitive)) {
+ break;
+ }
+ if (SP_IS_FEBLEND(&primitive)) {
+ primitive.deleteObject();
break;
}
}
- if (!item->style->getFilter()->children) {
+ if (!item->style->getFilter()->firstChild()) {
remove_filter(item, false);
}
}
@@ -1580,13 +1580,16 @@ void ObjectsPanel::_blurChangedIter(const Gtk::TreeIter& iter, double blur)
SPFilter *filter = modify_filter_gaussian_blur_from_item(_document, item, radius);
sp_style_set_property_url(item, "filter", filter, false);
} else if (item->style->filter.set && item->style->getFilter()) {
- for (SPObject *primitive = item->style->getFilter()->children; primitive && SP_IS_FILTER_PRIMITIVE(primitive); primitive = primitive->next) {
- if (SP_IS_GAUSSIANBLUR(primitive)) {
- primitive->deleteObject();
+ for (auto& primitive: item->style->getFilter()->children) {
+ if (!SP_IS_FILTER_PRIMITIVE(&primitive)) {
+ break;
+ }
+ if (SP_IS_GAUSSIANBLUR(&primitive)) {
+ primitive.deleteObject();
break;
}
}
- if (!item->style->getFilter()->children) {
+ if (!item->style->getFilter()->firstChild()) {
remove_filter(item, false);
}
}
@@ -1618,11 +1621,7 @@ ObjectsPanel::ObjectsPanel() :
_opacity_vbox(false, 0),
_opacity_label(_("Opacity:")),
_opacity_label_unit(_("%")),
-#if WITH_GTKMM_3_0
_opacity_adjustment(Gtk::Adjustment::create(100.0, 0.0, 100.0, 1.0, 1.0, 0.0)),
-#else
- _opacity_adjustment(100.0, 0.0, 100.0, 1.0, 1.0, 0.0),
-#endif
_opacity_hscale(_opacity_adjustment),
_opacity_spin_button(_opacity_adjustment, 0.01, 1),
_fe_cb(UI::Widget::SimpleFilterModifier::BLEND),
@@ -1752,12 +1751,8 @@ ObjectsPanel::ObjectsPanel() :
_scroller.set_policy( Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC );
_scroller.set_shadow_type(Gtk::SHADOW_IN);
Gtk::Requisition sreq;
-#if WITH_GTKMM_3_0
Gtk::Requisition sreq_natural;
_scroller.get_preferred_size(sreq_natural, sreq);
-#else
- sreq = _scroller.size_request();
-#endif
int minHeight = 70;
if (sreq.height < minHeight) {
// Set a min height to see the layers when used with Ubuntu liboverlay-scrollbar
@@ -1790,13 +1785,8 @@ ObjectsPanel::ObjectsPanel() :
_opacity_hbox.pack_start(_opacity_spin_button, false, false, 0);
_opacity_hbox.pack_start(_opacity_label_unit, false, false, 3);
_opacity_hscale.set_draw_value(false);
-#if WITH_GTKMM_3_0
_opacityConnection = _opacity_adjustment->signal_value_changed().connect(sigc::mem_fun(*this, &ObjectsPanel::_opacityValueChanged));
_opacity_label.set_mnemonic_widget(_opacity_hscale);
-#else
- _opacityConnection = _opacity_adjustment.signal_value_changed().connect(sigc::mem_fun(*this, &ObjectsPanel::_opacityValueChanged));
- _opacity_label.set_mnemonic_widget(_opacity_hscale);
-#endif
//Keep the labels aligned
GtkSizeGroup *labels = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
diff --git a/src/ui/dialog/objects.h b/src/ui/dialog/objects.h
index 9b9a6025a..018f9191f 100644
--- a/src/ui/dialog/objects.h
+++ b/src/ui/dialog/objects.h
@@ -134,15 +134,9 @@ private:
Gtk::TreeView _tree;
Gtk::CellRendererText *_text_renderer;
Gtk::TreeView::Column *_name_column;
-#if WITH_GTKMM_3_0
Gtk::Box _buttonsRow;
Gtk::Box _buttonsPrimary;
Gtk::Box _buttonsSecondary;
-#else
- Gtk::HBox _buttonsRow;
- Gtk::HBox _buttonsPrimary;
- Gtk::HBox _buttonsSecondary;
-#endif
Gtk::ScrolledWindow _scroller;
Gtk::Menu _popupMenu;
Inkscape::UI::Widget::SpinButton _spinBtn;
@@ -161,11 +155,7 @@ private:
Gtk::HBox _opacity_hbox;
Gtk::Label _opacity_label;
Gtk::Label _opacity_label_unit;
-#if WITH_GTKMM_3_0
Glib::RefPtr<Gtk::Adjustment> _opacity_adjustment;
-#else
- Gtk::Adjustment _opacity_adjustment;
-#endif
Gtk::HScale _opacity_hscale;
Inkscape::UI::Widget::SpinButton _opacity_spin_button;
diff --git a/src/ui/dialog/ocaldialogs.cpp b/src/ui/dialog/ocaldialogs.cpp
index 3353d2878..878b68d55 100644
--- a/src/ui/dialog/ocaldialogs.cpp
+++ b/src/ui/dialog/ocaldialogs.cpp
@@ -311,27 +311,10 @@ LoadingBox::LoadingBox() : Gtk::EventBox()
draw_spinner = false;
spinner_step = 0;
-#if WITH_GTKMM_3_0
signal_draw().connect(sigc::mem_fun(*this, &LoadingBox::_on_draw), false);
-#else
- signal_expose_event().connect(sigc::mem_fun(*this, &LoadingBox::_on_expose_event), false);
-#endif
-}
-
-#if !WITH_GTKMM_3_0
-bool LoadingBox::_on_expose_event(GdkEventExpose* /*event*/)
-{
- Cairo::RefPtr<Cairo::Context> cr = get_window()->create_cairo_context();
-
- return _on_draw(cr);
}
-#endif
-bool LoadingBox::_on_draw(const Cairo::RefPtr<Cairo::Context> &
-#if WITH_GTKMM_3_0
-cr
-#endif
-)
+bool LoadingBox::_on_draw(const Cairo::RefPtr<Cairo::Context> &cr)
{
// Draw shadow
int x = get_allocation().get_x();
@@ -339,27 +322,14 @@ cr
int width = get_allocation().get_width();
int height = get_allocation().get_height();
-#if WITH_GTKMM_3_0
get_style_context()->render_frame(cr, x, y, width, height);
-#else
- get_style()->paint_shadow(get_window(), get_state(), Gtk::SHADOW_IN,
- Gdk::Rectangle(x, y, width, height),
- *this, Glib::ustring("viewport"), x, y, width, height);
-#endif
if (draw_spinner) {
int spinner_size = 16;
int spinner_x = x + (width - spinner_size) / 2;
int spinner_y = y + (height - spinner_size) / 2;
-#if WITH_GTKMM_3_0
get_style_context()->render_activity(cr, spinner_x, spinner_y, spinner_size, spinner_size);
-#else
- gtk_paint_spinner(gtk_widget_get_style(GTK_WIDGET(gobj())),
- gtk_widget_get_window(GTK_WIDGET(gobj())),
- gtk_widget_get_state(GTK_WIDGET(gobj())), NULL, GTK_WIDGET(gobj()),
- NULL, spinner_step, spinner_x, spinner_y, spinner_size, spinner_size);
-#endif
}
return false;
@@ -429,11 +399,7 @@ PreviewWidget::PreviewWidget() : Gtk::VBox(false, 12)
box_loading->set_size_request(90, 90);
set_border_width(12);
-#if WITH_GTKMM_3_0
signal_draw().connect(sigc::mem_fun(*this, &PreviewWidget::_on_draw), false);
-#else
- signal_expose_event().connect(sigc::mem_fun(*this, &PreviewWidget::_on_expose_event), false);
-#endif
clear();
}
@@ -477,15 +443,6 @@ void PreviewWidget::clear()
image->hide();
}
-#if !WITH_GTKMM_3_0
-bool PreviewWidget::_on_expose_event(GdkEventExpose* /*event*/)
-{
- Cairo::RefPtr<Cairo::Context> cr = get_window()->create_cairo_context();
-
- return _on_draw(cr);
-}
-#endif
-
bool PreviewWidget::_on_draw(const Cairo::RefPtr<Cairo::Context>& cr)
{
// Draw background
@@ -494,16 +451,10 @@ bool PreviewWidget::_on_draw(const Cairo::RefPtr<Cairo::Context>& cr)
int width = get_allocation().get_width();
int height = get_allocation().get_height();
-#if WITH_GTKMM_3_0
Gdk::RGBA background_fill;
get_style_context()->lookup_color("base_color", background_fill);
cr->rectangle(x, y, width, height);
Gdk::Cairo::set_source_rgba(cr, background_fill);
-#else
- Gdk::Color background_fill = get_style()->get_base(get_state());
- cr->rectangle(x, y, width, height);
- Gdk::Cairo::set_source_color(cr, background_fill);
-#endif
cr->fill();
@@ -568,57 +519,12 @@ void StatusWidget::end_process()
clear();
}
-#if !GTK_CHECK_VERSION(3,0,0)
-SearchEntry::SearchEntry() : Gtk::Entry()
-{
- signal_changed().connect(sigc::mem_fun(*this, &SearchEntry::_on_changed));
- signal_icon_press().connect(sigc::mem_fun(*this, &SearchEntry::_on_icon_pressed));
-
- set_icon_from_icon_name(INKSCAPE_ICON("edit-find"), Gtk::ENTRY_ICON_PRIMARY);
- gtk_entry_set_icon_from_icon_name(gobj(), GTK_ENTRY_ICON_SECONDARY, NULL);
-}
-
-void SearchEntry::_on_icon_pressed(Gtk::EntryIconPosition icon_position, const GdkEventButton* /*event*/)
-{
- if (icon_position == Gtk::ENTRY_ICON_SECONDARY) {
- grab_focus();
- delete_text(0, -1);
- } else if (icon_position == Gtk::ENTRY_ICON_PRIMARY) {
- select_region(0, -1);
- grab_focus();
- }
-}
-
-void SearchEntry::_on_changed()
-{
- if (get_text().empty()) {
- gtk_entry_set_icon_from_icon_name(gobj(), GTK_ENTRY_ICON_SECONDARY, NULL);
- } else {
- set_icon_from_icon_name(INKSCAPE_ICON("edit-clear"), Gtk::ENTRY_ICON_SECONDARY);
- }
-}
-#endif
-
-
BaseBox::BaseBox() : Gtk::EventBox()
{
-#if WITH_GTKMM_3_0
signal_draw().connect(sigc::mem_fun(*this, &BaseBox::_on_draw), false);
-#else
- signal_expose_event().connect(sigc::mem_fun(*this, &BaseBox::_on_expose_event), false);
-#endif
set_visible_window(false);
}
-#if !WITH_GTKMM_3_0
-bool BaseBox::_on_expose_event(GdkEventExpose* /*event*/)
-{
- Cairo::RefPtr<Cairo::Context> cr = get_window()->create_cairo_context();
-
- return _on_draw(cr);
-}
-#endif
-
bool BaseBox::_on_draw(const Cairo::RefPtr<Cairo::Context>& cr)
{
// Draw background and shadow
@@ -627,23 +533,12 @@ bool BaseBox::_on_draw(const Cairo::RefPtr<Cairo::Context>& cr)
int width = get_allocation().get_width();
int height = get_allocation().get_height();
-#if WITH_GTKMM_3_0
Gdk::RGBA background_fill;
get_style_context()->lookup_color("base_color", background_fill);
cr->rectangle(x, y, width, height);
Gdk::Cairo::set_source_rgba(cr, background_fill);
cr->fill();
get_style_context()->render_frame(cr, x, y, width, height);
-#else
- Gdk::Color background_fill = get_style()->get_base(get_state());
- cr->rectangle(x, y, width, height);
- Gdk::Cairo::set_source_color(cr, background_fill);
- cr->fill();
-
- get_style()->paint_shadow(get_window(), get_state(), Gtk::SHADOW_IN,
- Gdk::Rectangle(x, y, width, height),
- *this, Glib::ustring("viewport"), x, y, width, height);
-#endif
return false;
}
@@ -660,23 +555,10 @@ LogoArea::LogoArea() : Gtk::EventBox()
draw_logo = false;
}
-#if WITH_GTKMM_3_0
signal_draw().connect(sigc::mem_fun(*this, &LogoArea::_on_draw));
-#else
- signal_expose_event().connect(sigc::mem_fun(*this, &LogoArea::_on_expose_event));
-#endif
set_visible_window(false);
}
-#if !WITH_GTKMM_3_0
-bool LogoArea::_on_expose_event(GdkEventExpose* /*event*/)
-{
- Cairo::RefPtr<Cairo::Context> cr = get_window()->create_cairo_context();
-
- return _on_draw(cr);
-}
-#endif
-
bool LogoArea::_on_draw(const Cairo::RefPtr<Cairo::Context>& cr)
{
if (draw_logo) {
@@ -687,16 +569,9 @@ bool LogoArea::_on_draw(const Cairo::RefPtr<Cairo::Context>& cr)
int x_logo = x + (width - 220) / 2;
int y_logo = y + (height - 76) / 2;
- // Draw logo, we mask [read fill] it with the mid colour from the
- // user's GTK theme
-#if WITH_GTKMM_3_0
- // For GTK+ 3, use grey
+ // Draw logo, we mask [read fill] it with grey
Gdk::RGBA logo_fill("grey");
Gdk::Cairo::set_source_rgba(cr, logo_fill);
-#else
- Gdk::Color logo_fill = get_style()->get_mid(get_state());
- Gdk::Cairo::set_source_color(cr, logo_fill);
-#endif
cr->mask(logo_mask, x_logo, y_logo);
}
@@ -1174,16 +1049,9 @@ void ImportDialog::update_label_no_search_results()
Glib::ustring msg_two = _("Please make sure all keywords are spelled correctly,"
" or try again with different keywords.");
-#if WITH_GTKMM_3_0
- Glib::ustring markup = Glib::ustring::compose(
+ auto markup = Glib::ustring::compose(
"<span size=\"large\">%1</span>\n<span>%2</span>",
msg_one, msg_two);
-#else
- Gdk::Color grey = entry_search->get_style()->get_text_aa(entry_search->get_state());
- Glib::ustring markup = Glib::ustring::compose(
- "<span size=\"large\">%1</span>\n<span color=\"%2\">%3</span>",
- msg_one, grey.to_string(), msg_two);
-#endif
label_not_found->set_markup(markup);
}
@@ -1203,33 +1071,17 @@ ImportDialog::ImportDialog(Gtk::Window& parent_window, FileDialogType file_types
dialogType = file_types;
// Creation
- Gtk::VBox *vbox = new Gtk::VBox(false, 0);
-
-#if WITH_GTKMM_3_0
- Gtk::ButtonBox *hbuttonbox_bottom = new Gtk::ButtonBox();
-#else
- Gtk::HButtonBox *hbuttonbox_bottom = new Gtk::HButtonBox();
-#endif
-
- Gtk::HBox *hbox_bottom = new Gtk::HBox(false, 12);
+ auto vbox = new Gtk::VBox(false, 0);
+ auto hbuttonbox_bottom = new Gtk::ButtonBox();
+ auto hbox_bottom = new Gtk::HBox(false, 12);
BaseBox *basebox_logo = new BaseBox();
BaseBox *basebox_no_search_results = new BaseBox();
label_not_found = new Gtk::Label();
label_description = new Gtk::Label();
-
-#if GTK_CHECK_VERSION(3,0,0)
entry_search = new Gtk::SearchEntry();
-#else
- entry_search = new SearchEntry();
-#endif
-
button_search = new Gtk::Button(_("Search"));
-#if WITH_GTKMM_3_0
- Gtk::ButtonBox* hbuttonbox_search = new Gtk::ButtonBox();
-#else
- Gtk::HButtonBox* hbuttonbox_search = new Gtk::HButtonBox();
-#endif
+ auto hbuttonbox_search = new Gtk::ButtonBox();
Gtk::ScrolledWindow* scrolledwindow_preview = new Gtk::ScrolledWindow();
preview_files = new PreviewWidget();
diff --git a/src/ui/dialog/ocaldialogs.h b/src/ui/dialog/ocaldialogs.h
index 9de24d821..db3c60786 100644
--- a/src/ui/dialog/ocaldialogs.h
+++ b/src/ui/dialog/ocaldialogs.h
@@ -17,19 +17,16 @@
# include <config.h>
#endif
-//Gtk includes
+// Gtkmm includes
#include <gtkmm/box.h>
#include <gtkmm/eventbox.h>
#include <gtkmm/listviewtext.h>
#include <gtkmm/scrolledwindow.h>
+#include <gtkmm/searchentry.h>
#include <gtkmm/window.h>
#include <cairomm/refptr.h>
-#if GTK_CHECK_VERSION(3,0,0)
-# include <gtkmm/searchentry.h>
-#endif
-
#include <giomm/file.h>
//Inkscape includes
@@ -283,10 +280,6 @@ private:
sigc::connection timeout;
bool draw_spinner;
-#if !WITH_GTKMM_3_0
- bool _on_expose_event(GdkEventExpose* event);
-#endif
-
bool _on_draw(const Cairo::RefPtr<Cairo::Context>& cr);
bool on_timeout();
};
@@ -310,10 +303,6 @@ private:
WrapLabel* label_description;
WrapLabel* label_time;
-#if !WITH_GTKMM_3_0
- bool _on_expose_event(GdkEventExpose* event);
-#endif
-
bool _on_draw(const Cairo::RefPtr<Cairo::Context>& cr);
};
@@ -336,21 +325,6 @@ public:
Gtk::Label* label;
};
-#if !GTK_CHECK_VERSION(3,0,0)
-/**
- * A Gtk::Entry with search & clear icons
- */
-class SearchEntry : public Gtk::Entry
-{
-public:
- SearchEntry();
-
-private:
- void _on_icon_pressed(Gtk::EntryIconPosition icon_position, const GdkEventButton* event);
- void _on_changed();
-};
-#endif
-
/**
* A box which paints an overlay of the OCAL logo
*/
@@ -359,9 +333,6 @@ class LogoArea : public Gtk::EventBox
public:
LogoArea();
private:
-#if !WITH_GTKMM_3_0
- bool _on_expose_event(GdkEventExpose* event);
-#endif
bool _on_draw(const Cairo::RefPtr<Cairo::Context>& cr);
bool draw_logo;
Cairo::RefPtr<Cairo::ImageSurface> logo_mask;
@@ -375,9 +346,6 @@ class BaseBox : public Gtk::EventBox
public:
BaseBox();
private:
-#if !WITH_GTKMM_3_0
- bool _on_expose_event(GdkEventExpose* event);
-#endif
bool _on_draw(const Cairo::RefPtr<Cairo::Context>& cr);
};
@@ -459,12 +427,7 @@ protected:
private:
Glib::ustring filename_image;
Glib::ustring filename_thumbnail;
-
-#if GTK_CHECK_VERSION(3,0,0)
Gtk::SearchEntry *entry_search;
-#else
- SearchEntry *entry_search;
-#endif
LogoArea *drawingarea_logo;
SearchResultList *list_results;
diff --git a/src/ui/dialog/pixelartdialog.cpp b/src/ui/dialog/pixelartdialog.cpp
index 62e6bf591..b838b0842 100644
--- a/src/ui/dialog/pixelartdialog.cpp
+++ b/src/ui/dialog/pixelartdialog.cpp
@@ -366,8 +366,8 @@ void PixelArtDialogImpl::vectorize()
return;
}
- std::vector<SPItem*> const items = desktop->selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=items.begin(); i!=items.end();++i){
+ auto items = desktop->selection->items();
+ for(auto i=items.begin(); i!=items.end();++i){
if ( !SP_IS_IMAGE(*i) )
continue;
diff --git a/src/ui/dialog/polar-arrange-tab.cpp b/src/ui/dialog/polar-arrange-tab.cpp
index da914dcd4..c51881a96 100644
--- a/src/ui/dialog/polar-arrange-tab.cpp
+++ b/src/ui/dialog/polar-arrange-tab.cpp
@@ -31,11 +31,7 @@ namespace Dialog {
PolarArrangeTab::PolarArrangeTab(ArrangeDialog *parent_)
: parent(parent_),
-#if WITH_GTKMM_3_0
parametersTable(),
-#else
- parametersTable(3, 3, false),
-#endif
centerY("", C_("Polar arrange tab", "Y coordinate of the center"), UNIT_TYPE_LINEAR),
centerX("", C_("Polar arrange tab", "X coordinate of the center"), centerY),
radiusY("", C_("Polar arrange tab", "Y coordinate of the radius"), UNIT_TYPE_LINEAR),
@@ -79,11 +75,7 @@ PolarArrangeTab::PolarArrangeTab(ArrangeDialog *parent_)
pack_start(arrangeOnParametersRadio, false, false);
centerLabel.set_text(C_("Polar arrange tab", "Center X/Y:"));
-#if WITH_GTKMM_3_0
parametersTable.attach(centerLabel, 0, 0, 1, 1);
-#else
- parametersTable.attach(centerLabel, 0, 1, 0, 1, Gtk::FILL);
-#endif
centerX.setDigits(2);
centerX.setIncrements(0.2, 0);
centerX.setRange(-10000, 10000);
@@ -92,20 +84,11 @@ PolarArrangeTab::PolarArrangeTab(ArrangeDialog *parent_)
centerY.setIncrements(0.2, 0);
centerY.setRange(-10000, 10000);
centerY.setValue(0, "px");
-#if WITH_GTKMM_3_0
parametersTable.attach(centerX, 1, 0, 1, 1);
parametersTable.attach(centerY, 2, 0, 1, 1);
-#else
- parametersTable.attach(centerX, 1, 2, 0, 1, Gtk::FILL);
- parametersTable.attach(centerY, 2, 3, 0, 1, Gtk::FILL);
-#endif
radiusLabel.set_text(C_("Polar arrange tab", "Radius X/Y:"));
-#if WITH_GTKMM_3_0
parametersTable.attach(radiusLabel, 0, 1, 1, 1);
-#else
- parametersTable.attach(radiusLabel, 0, 1, 1, 2, Gtk::FILL);
-#endif
radiusX.setDigits(2);
radiusX.setIncrements(0.2, 0);
radiusX.setRange(0.001, 10000);
@@ -114,20 +97,11 @@ PolarArrangeTab::PolarArrangeTab(ArrangeDialog *parent_)
radiusY.setIncrements(0.2, 0);
radiusY.setRange(0.001, 10000);
radiusY.setValue(100, "px");
-#if WITH_GTKMM_3_0
parametersTable.attach(radiusX, 1, 1, 1, 1);
parametersTable.attach(radiusY, 2, 1, 1, 1);
-#else
- parametersTable.attach(radiusX, 1, 2, 1, 2, Gtk::FILL);
- parametersTable.attach(radiusY, 2, 3, 1, 2, Gtk::FILL);
-#endif
angleLabel.set_text(_("Angle X/Y:"));
-#if WITH_GTKMM_3_0
parametersTable.attach(angleLabel, 0, 2, 1, 1);
-#else
- parametersTable.attach(angleLabel, 0, 1, 2, 3, Gtk::FILL);
-#endif
angleX.setDigits(2);
angleX.setIncrements(0.2, 0);
angleX.setRange(-10000, 10000);
@@ -136,13 +110,8 @@ PolarArrangeTab::PolarArrangeTab(ArrangeDialog *parent_)
angleY.setIncrements(0.2, 0);
angleY.setRange(-10000, 10000);
angleY.setValue(180, "°");
-#if WITH_GTKMM_3_0
parametersTable.attach(angleX, 1, 2, 1, 1);
parametersTable.attach(angleY, 2, 2, 1, 1);
-#else
- parametersTable.attach(angleX, 1, 2, 2, 3, Gtk::FILL);
- parametersTable.attach(angleY, 2, 3, 2, 3, Gtk::FILL);
-#endif
pack_start(parametersTable, false, false);
rotateObjectsCheckBox.set_label(_("Rotate objects"));
@@ -295,7 +264,7 @@ static void moveToPoint(int anchor, SPItem *item, Geom::Point p)
void PolarArrangeTab::arrange()
{
Inkscape::Selection *selection = parent->getDesktop()->getSelection();
- const std::vector<SPItem*> tmp(selection->itemList());
+ const std::vector<SPItem*> tmp(selection->items().begin(), selection->items().end());
SPGenericEllipse *referenceEllipse = NULL; // Last ellipse in selection
bool arrangeOnEllipse = !arrangeOnParametersRadio.get_active();
diff --git a/src/ui/dialog/polar-arrange-tab.h b/src/ui/dialog/polar-arrange-tab.h
index f7d7bf11f..1a4e04eda 100644
--- a/src/ui/dialog/polar-arrange-tab.h
+++ b/src/ui/dialog/polar-arrange-tab.h
@@ -20,12 +20,7 @@
#include <gtkmm/radiobutton.h>
#include <gtkmm/radiobuttongroup.h>
-
-#if WITH_GTKMM_3_0
- #include <gtkmm/grid.h>
-#else
- #include <gtkmm/table.h>
-#endif
+#include <gtkmm/grid.h>
namespace Inkscape {
namespace UI {
@@ -75,11 +70,7 @@ private:
Gtk::RadioButton arrangeOnLastCircleRadio;
Gtk::RadioButton arrangeOnParametersRadio;
-#if WITH_GTKMM_3_0
Gtk::Grid parametersTable;
-#else
- Gtk::Table parametersTable;
-#endif
Gtk::Label centerLabel;
Inkscape::UI::Widget::ScalarUnit centerY;
diff --git a/src/ui/dialog/spellcheck.cpp b/src/ui/dialog/spellcheck.cpp
index 61fa4c22b..045ce3459 100644
--- a/src/ui/dialog/spellcheck.cpp
+++ b/src/ui/dialog/spellcheck.cpp
@@ -227,14 +227,14 @@ GSList *SpellCheck::allTextItems (SPObject *r, GSList *l, bool hidden, bool lock
return l; // we're not interested in metadata
}
- for (SPObject *child = r->firstChild(); child; child = child->next) {
- if (SP_IS_ITEM (child) && !child->cloned && !desktop->isLayer(SP_ITEM(child))) {
- if ((hidden || !desktop->itemIsHidden(SP_ITEM(child))) && (locked || !SP_ITEM(child)->isLocked())) {
- if (SP_IS_TEXT(child) || SP_IS_FLOWTEXT(child))
- l = g_slist_prepend (l, child);
+ for (auto& child: r->children) {
+ if (SP_IS_ITEM (&child) && !child.cloned && !desktop->isLayer(SP_ITEM(&child))) {
+ if ((hidden || !desktop->itemIsHidden(SP_ITEM(&child))) && (locked || !SP_ITEM(&child)->isLocked())) {
+ if (SP_IS_TEXT(&child) || SP_IS_FLOWTEXT(&child))
+ l = g_slist_prepend (l, &child);
}
}
- l = allTextItems (child, l, hidden, locked);
+ l = allTextItems (&child, l, hidden, locked);
}
return l;
}
diff --git a/src/ui/dialog/spellcheck.h b/src/ui/dialog/spellcheck.h
index e98a9d80e..834f23c24 100644
--- a/src/ui/dialog/spellcheck.h
+++ b/src/ui/dialog/spellcheck.h
@@ -225,11 +225,7 @@ private:
* Dialogs widgets
*/
Gtk::Label banner_label;
-#if WITH_GTKMM_3_0
Gtk::ButtonBox banner_hbox;
-#else
- Gtk::HButtonBox banner_hbox;
-#endif
Gtk::ScrolledWindow scrolled_window;
Gtk::TreeView tree_view;
Glib::RefPtr<Gtk::ListStore> model;
@@ -243,21 +239,10 @@ private:
Gtk::Button add_button;
GtkWidget * dictionary_combo;
Gtk::HBox dictionary_hbox;
-
-#if WITH_GTKMM_3_0
Gtk::Separator action_sep;
-#else
- Gtk::HSeparator action_sep;
-#endif
-
Gtk::Button stop_button;
Gtk::Button start_button;
-
-#if WITH_GTKMM_3_0
Gtk::ButtonBox actionbutton_hbox;
-#else
- Gtk::HButtonBox actionbutton_hbox;
-#endif
SPDesktop * desktop;
DesktopTracker deskTrack;
diff --git a/src/ui/dialog/svg-fonts-dialog.cpp b/src/ui/dialog/svg-fonts-dialog.cpp
index 9dd2342f8..6a87f3714 100644
--- a/src/ui/dialog/svg-fonts-dialog.cpp
+++ b/src/ui/dialog/svg-fonts-dialog.cpp
@@ -113,11 +113,11 @@ void SvgFontsDialog::AttrEntry::set_text(char* t){
void SvgFontsDialog::AttrEntry::on_attr_changed(){
SPObject* o = NULL;
- for(SPObject* node = this->dialog->get_selected_spfont()->children; node; node=node->next){
+ for (auto& node: dialog->get_selected_spfont()->children) {
switch(this->attr){
case SP_PROP_FONT_FAMILY:
- if (SP_IS_FONTFACE(node)){
- o = node;
+ if (SP_IS_FONTFACE(&node)){
+ o = &node;
continue;
}
break;
@@ -168,9 +168,9 @@ void GlyphComboBox::update(SPFont* spfont){
this->append(""); //Gtk is refusing to clear the combobox when I comment out this line
this->remove_all();
- for(SPObject* node = spfont->children; node; node=node->next){
- if (SP_IS_GLYPH(node)){
- this->append((static_cast<SPGlyph*>(node))->unicode);
+ for (auto& node: spfont->children) {
+ if (SP_IS_GLYPH(&node)){
+ this->append((static_cast<SPGlyph*>(&node))->unicode);
}
}
}
@@ -306,10 +306,9 @@ void SvgFontsDialog::update_global_settings_tab(){
SPFont* font = get_selected_spfont();
if (!font) return;
- SPObject* obj;
- for (obj=font->children; obj; obj=obj->next){
- if (SP_IS_FONTFACE(obj)){
- _familyname_entry->set_text((SP_FONTFACE(obj))->font_family);
+ for (auto& obj: font->children) {
+ if (SP_IS_FONTFACE(&obj)){
+ _familyname_entry->set_text((SP_FONTFACE(&obj))->font_family);
}
}
}
@@ -412,12 +411,12 @@ SvgFontsDialog::populate_glyphs_box()
SPFont* spfont = this->get_selected_spfont();
_glyphs_observer.set(spfont);
- for(SPObject* node = spfont->children; node; node=node->next){
- if (SP_IS_GLYPH(node)){
+ for (auto& node: spfont->children) {
+ if (SP_IS_GLYPH(&node)){
Gtk::TreeModel::Row row = *(_GlyphsListStore->append());
- row[_GlyphsListColumns.glyph_node] = static_cast<SPGlyph*>(node);
- row[_GlyphsListColumns.glyph_name] = (static_cast<SPGlyph*>(node))->glyph_name;
- row[_GlyphsListColumns.unicode] = (static_cast<SPGlyph*>(node))->unicode;
+ row[_GlyphsListColumns.glyph_node] = static_cast<SPGlyph*>(&node);
+ row[_GlyphsListColumns.glyph_name] = (static_cast<SPGlyph*>(&node))->glyph_name;
+ row[_GlyphsListColumns.unicode] = (static_cast<SPGlyph*>(&node))->unicode;
}
}
}
@@ -430,13 +429,13 @@ SvgFontsDialog::populate_kerning_pairs_box()
SPFont* spfont = this->get_selected_spfont();
- for(SPObject* node = spfont->children; node; node=node->next){
- if (SP_IS_HKERN(node)){
+ for (auto& node: spfont->children) {
+ if (SP_IS_HKERN(&node)){
Gtk::TreeModel::Row row = *(_KerningPairsListStore->append());
- row[_KerningPairsListColumns.first_glyph] = (static_cast<SPGlyphKerning*>(node))->u1->attribute_string().c_str();
- row[_KerningPairsListColumns.second_glyph] = (static_cast<SPGlyphKerning*>(node))->u2->attribute_string().c_str();
- row[_KerningPairsListColumns.kerning_value] = (static_cast<SPGlyphKerning*>(node))->k;
- row[_KerningPairsListColumns.spnode] = static_cast<SPGlyphKerning*>(node);
+ row[_KerningPairsListColumns.first_glyph] = (static_cast<SPGlyphKerning*>(&node))->u1->attribute_string().c_str();
+ row[_KerningPairsListColumns.second_glyph] = (static_cast<SPGlyphKerning*>(&node))->u2->attribute_string().c_str();
+ row[_KerningPairsListColumns.kerning_value] = (static_cast<SPGlyphKerning*>(&node))->k;
+ row[_KerningPairsListColumns.spnode] = static_cast<SPGlyphKerning*>(&node);
}
}
}
@@ -491,11 +490,10 @@ void SvgFontsDialog::add_glyph(){
Geom::PathVector
SvgFontsDialog::flip_coordinate_system(Geom::PathVector pathv){
double units_per_em = 1000;
- SPObject* obj;
- for (obj = get_selected_spfont()->children; obj; obj=obj->next){
- if (SP_IS_FONTFACE(obj)){
+ for (auto& obj: get_selected_spfont()->children) {
+ if (SP_IS_FONTFACE(&obj)){
//XML Tree being directly used here while it shouldn't be.
- sp_repr_get_double(obj->getRepr(), "units-per-em", &units_per_em);
+ sp_repr_get_double(obj.getRepr(), "units-per-em", &units_per_em);
}
}
@@ -522,7 +520,7 @@ void SvgFontsDialog::set_glyph_description_from_selected_path(){
return;
}
- Inkscape::XML::Node* node = sel->reprList().front();
+ Inkscape::XML::Node* node = sel->xmlNodes().front();
if (!node) return;//TODO: should this be an assert?
if (!node->matchAttributeName("d") || !node->attribute("d")){
char *msg = _("The selected object does not have a <b>path</b> description.");
@@ -564,7 +562,7 @@ void SvgFontsDialog::missing_glyph_description_from_selected_path(){
return;
}
- Inkscape::XML::Node* node = sel->reprList().front();
+ Inkscape::XML::Node* node = sel->xmlNodes().front();
if (!node) return;//TODO: should this be an assert?
if (!node->matchAttributeName("d") || !node->attribute("d")){
char *msg = _("The selected object does not have a <b>path</b> description.");
@@ -574,13 +572,12 @@ void SvgFontsDialog::missing_glyph_description_from_selected_path(){
Geom::PathVector pathv = sp_svg_read_pathv(node->attribute("d"));
- SPObject* obj;
- for (obj = get_selected_spfont()->children; obj; obj=obj->next){
- if (SP_IS_MISSING_GLYPH(obj)){
+ for (auto& obj: get_selected_spfont()->children) {
+ if (SP_IS_MISSING_GLYPH(&obj)){
//XML Tree being directly used here while it shouldn't be.
gchar *str = sp_svg_write_path (flip_coordinate_system(pathv));
- obj->getRepr()->setAttribute("d", str);
+ obj.getRepr()->setAttribute("d", str);
g_free(str);
DocumentUndo::done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Set glyph curves"));
}
@@ -597,11 +594,10 @@ void SvgFontsDialog::reset_missing_glyph_description(){
}
SPDocument* doc = desktop->getDocument();
- SPObject* obj;
- for (obj = get_selected_spfont()->children; obj; obj=obj->next){
- if (SP_IS_MISSING_GLYPH(obj)){
+ for (auto& obj: get_selected_spfont()->children) {
+ if (SP_IS_MISSING_GLYPH(&obj)){
//XML Tree being directly used here while it shouldn't be.
- obj->getRepr()->setAttribute("d", (char*) "M0,0h1000v1024h-1000z");
+ obj.getRepr()->setAttribute("d", (char*) "M0,0h1000v1024h-1000z");
DocumentUndo::done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Reset missing-glyph"));
}
}
@@ -736,12 +732,12 @@ void SvgFontsDialog::add_kerning_pair(){
//look for this kerning pair on the currently selected font
this->kerning_pair = NULL;
- for(SPObject* node = this->get_selected_spfont()->children; node; node=node->next){
+ for (auto& node: get_selected_spfont()->children) {
//TODO: It is not really correct to get only the first byte of each string.
//TODO: We should also support vertical kerning
- if (SP_IS_HKERN(node) && (static_cast<SPGlyphKerning*>(node))->u1->contains((gchar) first_glyph.get_active_text().c_str()[0])
- && (static_cast<SPGlyphKerning*>(node))->u2->contains((gchar) second_glyph.get_active_text().c_str()[0]) ){
- this->kerning_pair = static_cast<SPGlyphKerning*>(node);
+ if (SP_IS_HKERN(&node) && (static_cast<SPGlyphKerning*>(&node))->u1->contains((gchar) first_glyph.get_active_text().c_str()[0])
+ && (static_cast<SPGlyphKerning*>(&node))->u2->contains((gchar) second_glyph.get_active_text().c_str()[0]) ){
+ this->kerning_pair = static_cast<SPGlyphKerning*>(&node);
continue;
}
}
@@ -850,11 +846,10 @@ SPFont *new_font(SPDocument *document)
void set_font_family(SPFont* font, char* str){
if (!font) return;
- SPObject* obj;
- for (obj=font->children; obj; obj=obj->next){
- if (SP_IS_FONTFACE(obj)){
+ for (auto& obj: font->children) {
+ if (SP_IS_FONTFACE(&obj)){
//XML Tree being directly used here while it shouldn't be.
- obj->getRepr()->setAttribute("font-family", str);
+ obj.getRepr()->setAttribute("font-family", str);
}
}
@@ -871,11 +866,10 @@ void SvgFontsDialog::add_font(){
font->setLabel(os.str().c_str());
os2 << "SVGFont " << count;
- SPObject* obj;
- for (obj=font->children; obj; obj=obj->next){
- if (SP_IS_FONTFACE(obj)){
+ for (auto& obj: font->children) {
+ if (SP_IS_FONTFACE(&obj)){
//XML Tree being directly used here while it shouldn't be.
- obj->getRepr()->setAttribute("font-family", os2.str().c_str());
+ obj.getRepr()->setAttribute("font-family", os2.str().c_str());
}
}
@@ -888,12 +882,7 @@ void SvgFontsDialog::add_font(){
SvgFontsDialog::SvgFontsDialog()
: UI::Widget::Panel("", "/dialogs/svgfonts", SP_VERB_DIALOG_SVG_FONTS), _add(Gtk::Stock::NEW)
{
-#if WITH_GTKMM_3_0
kerning_slider = Gtk::manage(new Gtk::Scale(Gtk::ORIENTATION_HORIZONTAL));
-#else
- kerning_slider = Gtk::manage(new Gtk::HScale);
-#endif
-
_add.signal_clicked().connect(sigc::mem_fun(*this, &SvgFontsDialog::add_font));
Gtk::HBox* hbox = Gtk::manage(new Gtk::HBox());
diff --git a/src/ui/dialog/svg-fonts-dialog.h b/src/ui/dialog/svg-fonts-dialog.h
index e80bbfd39..1588c0fc2 100644
--- a/src/ui/dialog/svg-fonts-dialog.h
+++ b/src/ui/dialog/svg-fonts-dialog.h
@@ -27,11 +27,7 @@
#include "xml/helper-observer.h"
namespace Gtk {
-#if WITH_GTKMM_3_0
class Scale;
-#else
-class HScale;
-#endif
}
class SPGlyph;
@@ -216,12 +212,7 @@ private:
GlyphComboBox first_glyph, second_glyph;
SPGlyphKerning* kerning_pair;
Inkscape::UI::Widget::SpinButton setwidth_spin;
-
-#if WITH_GTKMM_3_0
Gtk::Scale* kerning_slider;
-#else
- Gtk::HScale* kerning_slider;
-#endif
class EntryWidget : public Gtk::HBox
{
diff --git a/src/ui/dialog/swatches.cpp b/src/ui/dialog/swatches.cpp
index e7bf96e8b..3012c5c26 100644
--- a/src/ui/dialog/swatches.cpp
+++ b/src/ui/dialog/swatches.cpp
@@ -114,7 +114,7 @@ static void editGradientImpl( SPDesktop* desktop, SPGradient* gr )
bool shown = false;
if ( desktop && desktop->doc() ) {
Inkscape::Selection *selection = desktop->getSelection();
- std::vector<SPItem*> const items = selection->itemList();
+ std::vector<SPItem*> const items(selection->items().begin(), selection->items().end());
if (!items.empty()) {
SPStyle query( desktop->doc() );
int result = objects_query_fillstroke((items), &query, true);
@@ -649,12 +649,8 @@ SwatchesPanel::SwatchesPanel(gchar const* prefsPath) :
if (Glib::ustring(prefsPath) == "/dialogs/swatches") {
Gtk::Requisition sreq;
-#if WITH_GTKMM_3_0
Gtk::Requisition sreq_natural;
get_preferred_size(sreq_natural, sreq);
-#else
- sreq = size_request();
-#endif
int minHeight = 60;
if (sreq.height < minHeight) {
set_size_request(70, minHeight);
diff --git a/src/ui/dialog/symbols.cpp b/src/ui/dialog/symbols.cpp
index 92bb5c605..4840b897b 100644
--- a/src/ui/dialog/symbols.cpp
+++ b/src/ui/dialog/symbols.cpp
@@ -19,14 +19,8 @@
#include <gtkmm/buttonbox.h>
#include <gtkmm/label.h>
-
-#if WITH_GTKMM_3_0
-# include <gtkmm/togglebutton.h>
-# include <gtkmm/grid.h>
-#else
-# include <gtkmm/table.h>
-#endif
-
+#include <gtkmm/togglebutton.h>
+#include <gtkmm/grid.h>
#include <gtkmm/scrolledwindow.h>
#include <gtkmm/comboboxtext.h>
#include <gtkmm/iconview.h>
@@ -116,11 +110,7 @@ SymbolsDialog::SymbolsDialog( gchar const* prefsPath ) :
{
/******************** Table *************************/
-#if WITH_GTKMM_3_0
- Gtk::Grid *table = new Gtk::Grid();
-#else
- Gtk::Table *table = new Gtk::Table(2, 4, false);
-#endif
+ auto table = new Gtk::Grid();
// panel is a cloked Gtk::VBox
_getContents()->pack_start(*Gtk::manage(table), Gtk::PACK_EXPAND_WIDGET);
@@ -128,24 +118,12 @@ SymbolsDialog::SymbolsDialog( gchar const* prefsPath ) :
/******************** Symbol Sets *************************/
Gtk::Label* labelSet = new Gtk::Label(_("Symbol set: "));
-
-#if WITH_GTKMM_3_0
table->attach(*Gtk::manage(labelSet),0,row,1,1);
-#else
- table->attach(*Gtk::manage(labelSet),0,1,row,row+1,Gtk::SHRINK,Gtk::SHRINK);
-#endif
-
symbolSet = new Gtk::ComboBoxText(); // Fill in later
symbolSet->append(_("Current Document"));
symbolSet->set_active_text(_("Current Document"));
-
-#if WITH_GTKMM_3_0
symbolSet->set_hexpand();
table->attach(*Gtk::manage(symbolSet),1,row,1,1);
-#else
- table->attach(*Gtk::manage(symbolSet),1,2,row,row+1,Gtk::FILL|Gtk::EXPAND,Gtk::SHRINK);
-#endif
-
sigc::connection connSet = symbolSet->signal_changed().connect(
sigc::mem_fun(*this, &SymbolsDialog::rebuild));
instanceConns.push_back(connSet);
@@ -178,14 +156,9 @@ SymbolsDialog::SymbolsDialog( gchar const* prefsPath ) :
Gtk::ScrolledWindow *scroller = new Gtk::ScrolledWindow();
scroller->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_ALWAYS);
scroller->add(*Gtk::manage(iconView));
-
-#if WITH_GTKMM_3_0
scroller->set_hexpand();
scroller->set_vexpand();
table->attach(*Gtk::manage(scroller),0,row,2,1);
-#else
- table->attach(*Gtk::manage(scroller),0,2,row,row+1,Gtk::EXPAND|Gtk::FILL,Gtk::EXPAND|Gtk::FILL);
-#endif
++row;
@@ -194,12 +167,8 @@ SymbolsDialog::SymbolsDialog( gchar const* prefsPath ) :
Gtk::HBox* tools = new Gtk::HBox();
//tools->set_layout( Gtk::BUTTONBOX_END );
-#if WITH_GTKMM_3_0
scroller->set_hexpand();
table->attach(*Gtk::manage(tools),0,row,2,1);
-#else
- table->attach(*Gtk::manage(tools),0,2,row,row+1,Gtk::EXPAND|Gtk::FILL,Gtk::FILL);
-#endif
addSymbol = Gtk::manage(new Gtk::Button());
addSymbol->add(*Gtk::manage(Glib::wrap(
@@ -393,11 +362,7 @@ void SymbolsDialog::revertSymbol() {
void SymbolsDialog::iconDragDataGet(const Glib::RefPtr<Gdk::DragContext>& /*context*/, Gtk::SelectionData& data, guint /*info*/, guint /*time*/)
{
-#if WITH_GTKMM_3_0
- std::vector<Gtk::TreePath> iconArray = iconView->get_selected_items();
-#else
- Gtk::IconView::ArrayHandle_TreePaths iconArray = iconView->get_selected_items();
-#endif
+ auto iconArray = iconView->get_selected_items();
if( iconArray.empty() ) {
//std::cout << " iconArray empty: huh? " << std::endl;
@@ -450,11 +415,7 @@ SPDocument* SymbolsDialog::selectedSymbols() {
Glib::ustring SymbolsDialog::selectedSymbolId() {
-#if WITH_GTKMM_3_0
- std::vector<Gtk::TreePath> iconArray = iconView->get_selected_items();
-#else
- Gtk::IconView::ArrayHandle_TreePaths iconArray = iconView->get_selected_items();
-#endif
+ auto iconArray = iconView->get_selected_items();
if( !iconArray.empty() ) {
Gtk::TreeModel::Path const & path = *iconArray.begin();
@@ -471,11 +432,6 @@ void SymbolsDialog::iconChanged() {
SPObject* symbol = symbolDocument->getObjectById(symbol_id);
if( symbol ) {
- if( symbolDocument == currentDocument ) {
- // Select the symbol on the canvas so it can be manipulated
- currentDesktop->selection->set( symbol, false );
- }
-
// Find style for use in <use>
// First look for default style stored in <symbol>
gchar const* style = symbol->getAttribute("inkscape:symbol-style");
@@ -658,8 +614,8 @@ GSList* SymbolsDialog::symbols_in_doc_recursive (SPObject *r, GSList *l)
l = g_slist_prepend (l, r);
}
- for (SPObject *child = r->firstChild(); child; child = child->getNext()) {
- l = symbols_in_doc_recursive( child, l );
+ for (auto& child: r->children) {
+ l = symbols_in_doc_recursive( &child, l );
}
return l;
@@ -680,8 +636,8 @@ GSList* SymbolsDialog::use_in_doc_recursive (SPObject *r, GSList *l)
l = g_slist_prepend (l, r);
}
- for (SPObject *child = r->firstChild(); child; child = child->getNext()) {
- l = use_in_doc_recursive( child, l );
+ for (auto& child: r->children) {
+ l = use_in_doc_recursive( &child, l );
}
return l;
diff --git a/src/ui/dialog/tags.cpp b/src/ui/dialog/tags.cpp
index 2ec710501..dfe71bddb 100644
--- a/src/ui/dialog/tags.cpp
+++ b/src/ui/dialog/tags.cpp
@@ -335,8 +335,8 @@ void TagsPanel::_objectsSelected( Selection *sel ) {
_selectedConnection.block();
_tree.get_selection()->unselect_all();
- std::vector<SPObject*> tmp=sel->list();
- for(std::vector<SPObject*>::const_iterator i=tmp.begin();i!=tmp.end();++i)
+ auto tmp = sel->objects();
+ for(auto i = tmp.begin(); i != tmp.end(); ++i)
{
SPObject *obj = *i;
_store->foreach(sigc::bind<SPObject *>( sigc::mem_fun(*this, &TagsPanel::_checkForSelected), obj));
@@ -386,26 +386,26 @@ void TagsPanel::_objectsChanged(SPObject* root)
void TagsPanel::_addObject( SPDocument* doc, SPObject* obj, Gtk::TreeModel::Row* parentRow )
{
if ( _desktop && obj ) {
- for ( SPObject *child = obj->children; child != NULL; child = child->next) {
- if (SP_IS_TAG(child))
+ for (auto& child: obj->children) {
+ if (SP_IS_TAG(&child))
{
Gtk::TreeModel::iterator iter = parentRow ? _store->prepend(parentRow->children()) : _store->prepend();
Gtk::TreeModel::Row row = *iter;
- row[_model->_colObject] = child;
+ row[_model->_colObject] = &child;
row[_model->_colParentObject] = NULL;
- row[_model->_colLabel] = child->label() ? child->label() : child->getId();
+ row[_model->_colLabel] = child.label() ? child.label() : child.getId();
row[_model->_colAddRemove] = true;
row[_model->_colAllowAddRemove] = true;
_tree.expand_to_path( _store->get_path(iter) );
- TagsPanel::ObjectWatcher *w = new TagsPanel::ObjectWatcher(this, child);
- child->getRepr()->addObserver(*w);
+ TagsPanel::ObjectWatcher *w = new TagsPanel::ObjectWatcher(this, &child);
+ child.getRepr()->addObserver(*w);
_objectWatchers.push_back(w);
- _addObject( doc, child, &row );
+ _addObject( doc, &child, &row );
}
}
- if (SP_IS_TAG(obj) && obj->children)
+ if (SP_IS_TAG(obj) && obj->firstChild())
{
Gtk::TreeModel::iterator iteritems = parentRow ? _store->append(parentRow->children()) : _store->prepend();
Gtk::TreeModel::Row rowitems = *iteritems;
@@ -416,16 +416,16 @@ void TagsPanel::_addObject( SPDocument* doc, SPObject* obj, Gtk::TreeModel::Row*
rowitems[_model->_colAllowAddRemove] = false;
_tree.expand_to_path( _store->get_path(iteritems) );
-
- for ( SPObject *child = obj->children; child != NULL; child = child->next) {
- if (SP_IS_TAG_USE(child))
+
+ for (auto& child: obj->children) {
+ if (SP_IS_TAG_USE(&child))
{
- SPItem *item = SP_TAG_USE(child)->ref->getObject();
+ SPItem *item = SP_TAG_USE(&child)->ref->getObject();
Gtk::TreeModel::iterator iter = _store->prepend(rowitems->children());
Gtk::TreeModel::Row row = *iter;
- row[_model->_colObject] = child;
+ row[_model->_colObject] = &child;
row[_model->_colParentObject] = NULL;
- row[_model->_colLabel] = item ? (item->label() ? item->label() : item->getId()) : SP_TAG_USE(child)->href;
+ row[_model->_colLabel] = item ? (item->label() ? item->label() : item->getId()) : SP_TAG_USE(&child)->href;
row[_model->_colAddRemove] = false;
row[_model->_colAllowAddRemove] = true;
@@ -434,7 +434,7 @@ void TagsPanel::_addObject( SPDocument* doc, SPObject* obj, Gtk::TreeModel::Row*
}
if (item) {
- TagsPanel::ObjectWatcher *w = new TagsPanel::ObjectWatcher(this, child, item->getRepr());
+ TagsPanel::ObjectWatcher *w = new TagsPanel::ObjectWatcher(this, &child, item->getRepr());
item->getRepr()->addObserver(*w);
_objectWatchers.push_back(w);
}
@@ -446,12 +446,11 @@ void TagsPanel::_addObject( SPDocument* doc, SPObject* obj, Gtk::TreeModel::Row*
void TagsPanel::_select_tag( SPTag * tag )
{
- for (SPObject * child = tag->children; child != NULL; child = child->next)
- {
- if (SP_IS_TAG(child)) {
- _select_tag(SP_TAG(child));
- } else if (SP_IS_TAG_USE(child)) {
- SPObject * obj = SP_TAG_USE(child)->ref->getObject();
+ for (auto& child: tag->children) {
+ if (SP_IS_TAG(&child)) {
+ _select_tag(SP_TAG(&child));
+ } else if (SP_IS_TAG_USE(&child)) {
+ SPObject * obj = SP_TAG_USE(&child)->ref->getObject();
if (obj) {
if (_desktop->selection->isEmpty()) _desktop->setCurrentLayer(obj->parent);
_desktop->selection->add(obj);
@@ -633,12 +632,12 @@ bool TagsPanel::_handleButtonEvent(GdkEventButton* event)
if (col == _tree.get_column(COL_ADD - 1) && down_at_add) {
if (SP_IS_TAG(obj)) {
bool wasadded = false;
- std::vector<SPItem*> items=_desktop->selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end();++i){
+ auto items= _desktop->selection->items();
+ for(auto i=items.begin();i!=items.end();++i){
SPObject *newobj = *i;
bool addchild = true;
- for ( SPObject *child = obj->children; child != NULL; child = child->next) {
- if (SP_IS_TAG_USE(child) && SP_TAG_USE(child)->ref->getObject() == newobj) {
+ for (auto& child: obj->children) {
+ if (SP_IS_TAG_USE(&child) && SP_TAG_USE(&child)->ref->getObject() == newobj) {
addchild = false;
}
}
@@ -967,12 +966,8 @@ TagsPanel::TagsPanel() :
_scroller.set_policy( Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC );
_scroller.set_shadow_type(Gtk::SHADOW_IN);
Gtk::Requisition sreq;
-#if WITH_GTKMM_3_0
Gtk::Requisition sreq_natural;
_scroller.get_preferred_size(sreq_natural, sreq);
-#else
- sreq = _scroller.size_request();
-#endif
int minHeight = 70;
if (sreq.height < minHeight) {
// Set a min height to see the layers when used with Ubuntu liboverlay-scrollbar
diff --git a/src/ui/dialog/tags.h b/src/ui/dialog/tags.h
index 3576bd111..bdda22dd4 100644
--- a/src/ui/dialog/tags.h
+++ b/src/ui/dialog/tags.h
@@ -141,15 +141,9 @@ private:
Gtk::TreeView _tree;
Gtk::CellRendererText *_text_renderer;
Gtk::TreeView::Column *_name_column;
-#if WITH_GTKMM_3_0
Gtk::Box _buttonsRow;
Gtk::Box _buttonsPrimary;
Gtk::Box _buttonsSecondary;
-#else
- Gtk::HBox _buttonsRow;
- Gtk::HBox _buttonsPrimary;
- Gtk::HBox _buttonsSecondary;
-#endif
Gtk::ScrolledWindow _scroller;
Gtk::Menu _popupMenu;
Inkscape::UI::Widget::SpinButton _spinBtn;
diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp
index 6ce377419..50c6c1553 100644
--- a/src/ui/dialog/text-edit.cpp
+++ b/src/ui/dialog/text-edit.cpp
@@ -92,9 +92,7 @@ TextEdit::TextEdit()
styleButton(&align_right, _("Align right"), INKSCAPE_ICON("format-justify-right"), &align_left);
styleButton(&align_justify, _("Justify (only flowed text)"), INKSCAPE_ICON("format-justify-fill"), &align_left);
-#if WITH_GTKMM_3_0
align_sep.set_orientation(Gtk::ORIENTATION_VERTICAL);
-#endif
layout_hbox.pack_start(align_sep, false, false, 10);
@@ -102,9 +100,7 @@ TextEdit::TextEdit()
styleButton(&text_horizontal, _("Horizontal text"), INKSCAPE_ICON("format-text-direction-horizontal"), NULL);
styleButton(&text_vertical, _("Vertical text"), INKSCAPE_ICON("format-text-direction-vertical"), &text_horizontal);
-#if WITH_GTKMM_3_0
text_sep.set_orientation(Gtk::ORIENTATION_VERTICAL);
-#endif
layout_hbox.pack_start(text_sep, false, false, 10);
@@ -139,12 +135,8 @@ TextEdit::TextEdit()
gtk_widget_set_tooltip_text(startOffset, _("Text path offset"));
-#if WITH_GTKMM_3_0
- Gtk::Separator *sep = Gtk::manage(new Gtk::Separator());
+ auto sep = Gtk::manage(new Gtk::Separator());
sep->set_orientation(Gtk::ORIENTATION_VERTICAL);
-#else
- Gtk::VSeparator *sep = Gtk::manage(new Gtk::VSeparator);
-#endif
layout_hbox.pack_start(*sep, false, false, 10);
layout_hbox.pack_start(*Gtk::manage(Glib::wrap(startOffset)), false, false);
@@ -168,7 +160,6 @@ TextEdit::TextEdit()
gtk_text_view_set_wrap_mode ((GtkTextView *) text_view, GTK_WRAP_WORD);
#ifdef WITH_GTKSPELL
-#ifdef WITH_GTKMM_3_0
/*
TODO: Use computed xml:lang attribute of relevant element, if present, to specify the
language (either as 2nd arg of gtkspell_new_attach, or with explicit
@@ -180,20 +171,6 @@ TextEdit::TextEdit()
if (! gtk_spell_checker_attach(speller, GTK_TEXT_VIEW(text_view))) {
g_print("gtkspell error:\n");
}
-#else
- GError *error = NULL;
-
-/*
- TODO: Use computed xml:lang attribute of relevant element, if present, to specify the
- language (either as 2nd arg of gtkspell_new_attach, or with explicit
- gtkspell_set_language call in; see advanced.c example in gtkspell docs).
- onReadSelection looks like a suitable place.
-*/
- if (gtkspell_new_attach(GTK_TEXT_VIEW(text_view), NULL, &error) == NULL) {
- g_print("gtkspell error: %s\n", error->message);
- g_error_free(error);
- }
-#endif
#endif
gtk_widget_set_size_request (text_view, -1, 64);
@@ -436,8 +413,8 @@ SPItem *TextEdit::getSelectedTextItem (void)
if (!SP_ACTIVE_DESKTOP)
return NULL;
- std::vector<SPItem*> tmp=SP_ACTIVE_DESKTOP->getSelection()->itemList();
- for(std::vector<SPItem*>::const_iterator i=tmp.begin();i!=tmp.end();++i)
+ auto tmp= SP_ACTIVE_DESKTOP->getSelection()->items();
+ for(auto i=tmp.begin();i!=tmp.end();++i)
{
if (SP_IS_TEXT(*i) || SP_IS_FLOWTEXT(*i))
return *i;
@@ -454,8 +431,8 @@ unsigned TextEdit::getSelectedTextCount (void)
unsigned int items = 0;
- std::vector<SPItem*> tmp=SP_ACTIVE_DESKTOP->getSelection()->itemList();
- for(std::vector<SPItem*>::const_iterator i=tmp.begin();i!=tmp.end();++i)
+ auto tmp= SP_ACTIVE_DESKTOP->getSelection()->items();
+ for(auto i=tmp.begin();i!=tmp.end();++i)
{
if (SP_IS_TEXT(*i) || SP_IS_FLOWTEXT(*i))
++items;
@@ -561,11 +538,11 @@ void TextEdit::onApply()
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
unsigned items = 0;
- const std::vector<SPItem*> item_list = desktop->getSelection()->itemList();
+ auto item_list = desktop->getSelection()->items();
SPCSSAttr *css = fillTextStyle ();
sp_desktop_set_style(desktop, css, true);
- for(std::vector<SPItem*>::const_iterator i=item_list.begin();i!=item_list.end();++i){
+ for(auto i=item_list.begin();i!=item_list.end();++i){
// apply style to the reprs of all text objects in the selection
if (SP_IS_TEXT (*i)) {
diff --git a/src/ui/dialog/text-edit.h b/src/ui/dialog/text-edit.h
index cfe612268..e974874d2 100644
--- a/src/ui/dialog/text-edit.h
+++ b/src/ui/dialog/text-edit.h
@@ -198,21 +198,10 @@ private:
Gtk::RadioButton align_center;
Gtk::RadioButton align_right;
Gtk::RadioButton align_justify;
-
-#if WITH_GTKMM_3_0
Gtk::Separator align_sep;
-#else
- Gtk::VSeparator align_sep;
-#endif
-
Gtk::RadioButton text_vertical;
Gtk::RadioButton text_horizontal;
-
-#if WITH_GTKMM_3_0
Gtk::Separator text_sep;
-#else
- Gtk::VSeparator text_sep;
-#endif
GtkWidget *spacing_combo;
diff --git a/src/ui/dialog/tile.h b/src/ui/dialog/tile.h
index de1d3028b..2c29f85b8 100644
--- a/src/ui/dialog/tile.h
+++ b/src/ui/dialog/tile.h
@@ -29,12 +29,7 @@
namespace Gtk {
class Button;
-
-#if WITH_GTKMM_3_0
class Grid;
-#else
-class Table;
-#endif
}
namespace Inkscape {
diff --git a/src/ui/dialog/transformation.cpp b/src/ui/dialog/transformation.cpp
index 031bc5ae1..7f1492cd7 100644
--- a/src/ui/dialog/transformation.cpp
+++ b/src/ui/dialog/transformation.cpp
@@ -212,38 +212,20 @@ void Transformation::layoutPageMove()
//_scalar_move_vertical.set_label_image( INKSCAPE_STOCK_ARROWS_HOR );
-#if WITH_GTKMM_3_0
_page_move.table().attach(_scalar_move_horizontal, 0, 0, 2, 1);
_page_move.table().attach(_units_move, 2, 0, 1, 1);
-#else
- _page_move.table()
- .attach(_scalar_move_horizontal, 0, 2, 0, 1, Gtk::FILL, Gtk::SHRINK);
-
- _page_move.table()
- .attach(_units_move, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK);
-#endif
_scalar_move_horizontal.signal_value_changed()
.connect(sigc::mem_fun(*this, &Transformation::onMoveValueChanged));
//_scalar_move_vertical.set_label_image( INKSCAPE_STOCK_ARROWS_VER );
-#if WITH_GTKMM_3_0
_page_move.table().attach(_scalar_move_vertical, 0, 1, 2, 1);
-#else
- _page_move.table()
- .attach(_scalar_move_vertical, 0, 2, 1, 2, Gtk::FILL, Gtk::SHRINK);
-#endif
_scalar_move_vertical.signal_value_changed()
.connect(sigc::mem_fun(*this, &Transformation::onMoveValueChanged));
// Relative moves
-#if WITH_GTKMM_3_0
_page_move.table().attach(_check_move_relative, 0, 2, 2, 1);
-#else
- _page_move.table()
- .attach(_check_move_relative, 0, 2, 2, 3, Gtk::FILL, Gtk::SHRINK);
-#endif
_check_move_relative.set_active(true);
_check_move_relative.signal_toggled()
@@ -269,36 +251,18 @@ void Transformation::layoutPageScale()
_scalar_scale_vertical.setAbsoluteIsIncrement(true);
_scalar_scale_vertical.setPercentageIsIncrement(true);
-#if WITH_GTKMM_3_0
_page_scale.table().attach(_scalar_scale_horizontal, 0, 0, 2, 1);
-#else
- _page_scale.table()
- .attach(_scalar_scale_horizontal, 0, 2, 0, 1, Gtk::FILL, Gtk::SHRINK);
-#endif
_scalar_scale_horizontal.signal_value_changed()
.connect(sigc::mem_fun(*this, &Transformation::onScaleXValueChanged));
-#if WITH_GTKMM_3_0
_page_scale.table().attach(_units_scale, 2, 0, 1, 1);
_page_scale.table().attach(_scalar_scale_vertical, 0, 1, 2, 1);
-#else
- _page_scale.table()
- .attach(_units_scale, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK);
-
- _page_scale.table()
- .attach(_scalar_scale_vertical, 0, 2, 1, 2, Gtk::FILL, Gtk::SHRINK);
-#endif
_scalar_scale_vertical.signal_value_changed()
.connect(sigc::mem_fun(*this, &Transformation::onScaleYValueChanged));
-#if WITH_GTKMM_3_0
_page_scale.table().attach(_check_scale_proportional, 0, 2, 2, 1);
-#else
- _page_scale.table()
- .attach(_check_scale_proportional, 0, 2, 2, 3, Gtk::FILL, Gtk::SHRINK);
-#endif
_check_scale_proportional.set_active(false);
_check_scale_proportional.signal_toggled()
@@ -330,24 +294,10 @@ void Transformation::layoutPageRotate()
Gtk::RadioButton::Group group = _counterclockwise_rotate.get_group();
_clockwise_rotate.set_group(group);
-#if WITH_GTKMM_3_0
_page_rotate.table().attach(_scalar_rotate, 0, 0, 2, 1);
_page_rotate.table().attach(_units_rotate, 2, 0, 1, 1);
_page_rotate.table().attach(_counterclockwise_rotate, 3, 0, 1, 1);
_page_rotate.table().attach(_clockwise_rotate, 4, 0, 1, 1);
-#else
- _page_rotate.table()
- .attach(_scalar_rotate, 0, 2, 0, 1, Gtk::FILL, Gtk::SHRINK);
-
- _page_rotate.table()
- .attach(_units_rotate, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK);
-
- _page_rotate.table()
- .attach(_counterclockwise_rotate, 3, 4, 0, 1, Gtk::SHRINK, Gtk::SHRINK);
-
- _page_rotate.table()
- .attach(_clockwise_rotate, 4, 5, 0, 1, Gtk::SHRINK, Gtk::SHRINK);
-#endif
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
if (prefs->getBool("/dialogs/transformation/rotateCounterClockwise", TRUE)) {
@@ -381,26 +331,13 @@ void Transformation::layoutPageSkew()
_scalar_skew_vertical.setDigits(3);
_scalar_skew_vertical.setIncrements(0.1, 1.0);
-#if WITH_GTKMM_3_0
_page_skew.table().attach(_scalar_skew_horizontal, 0, 0, 2, 1);
-#else
- _page_skew.table()
- .attach(_scalar_skew_horizontal, 0, 2, 0, 1, Gtk::FILL, Gtk::SHRINK);
-#endif
_scalar_skew_horizontal.signal_value_changed()
.connect(sigc::mem_fun(*this, &Transformation::onSkewValueChanged));
-#if WITH_GTKMM_3_0
_page_skew.table().attach(_units_skew, 2, 0, 1, 1);
_page_skew.table().attach(_scalar_skew_vertical, 0, 1, 2, 1);
-#else
- _page_skew.table()
- .attach(_units_skew, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK);
-
- _page_skew.table()
- .attach(_scalar_skew_vertical, 0, 2, 1, 2, Gtk::FILL, Gtk::SHRINK);
-#endif
_scalar_skew_vertical.signal_value_changed()
.connect(sigc::mem_fun(*this, &Transformation::onSkewValueChanged));
@@ -418,12 +355,7 @@ void Transformation::layoutPageTransform()
_scalar_transform_a.setIncrements(0.1, 1.0);
_scalar_transform_a.setValue(1.0);
-#if WITH_GTKMM_3_0
_page_transform.table().attach(_scalar_transform_a, 0, 0, 1, 1);
-#else
- _page_transform.table()
- .attach(_scalar_transform_a, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK);
-#endif
_scalar_transform_a.signal_value_changed()
.connect(sigc::mem_fun(*this, &Transformation::onTransformValueChanged));
@@ -434,12 +366,7 @@ void Transformation::layoutPageTransform()
_scalar_transform_b.setIncrements(0.1, 1.0);
_scalar_transform_b.setValue(0.0);
-#if WITH_GTKMM_3_0
_page_transform.table().attach(_scalar_transform_b, 0, 1, 1, 1);
-#else
- _page_transform.table()
- .attach(_scalar_transform_b, 0, 1, 1, 2, Gtk::SHRINK, Gtk::SHRINK);
-#endif
_scalar_transform_b.signal_value_changed()
.connect(sigc::mem_fun(*this, &Transformation::onTransformValueChanged));
@@ -450,12 +377,7 @@ void Transformation::layoutPageTransform()
_scalar_transform_c.setIncrements(0.1, 1.0);
_scalar_transform_c.setValue(0.0);
-#if WITH_GTKMM_3_0
_page_transform.table().attach(_scalar_transform_c, 1, 0, 1, 1);
-#else
- _page_transform.table()
- .attach(_scalar_transform_c, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK);
-#endif
_scalar_transform_c.signal_value_changed()
.connect(sigc::mem_fun(*this, &Transformation::onTransformValueChanged));
@@ -467,12 +389,7 @@ void Transformation::layoutPageTransform()
_scalar_transform_d.setIncrements(0.1, 1.0);
_scalar_transform_d.setValue(1.0);
-#if WITH_GTKMM_3_0
_page_transform.table().attach(_scalar_transform_d, 1, 1, 1, 1);
-#else
- _page_transform.table()
- .attach(_scalar_transform_d, 1, 2, 1, 2, Gtk::SHRINK, Gtk::SHRINK);
-#endif
_scalar_transform_d.signal_value_changed()
.connect(sigc::mem_fun(*this, &Transformation::onTransformValueChanged));
@@ -484,12 +401,7 @@ void Transformation::layoutPageTransform()
_scalar_transform_e.setIncrements(0.1, 1.0);
_scalar_transform_e.setValue(0.0);
-#if WITH_GTKMM_3_0
_page_transform.table().attach(_scalar_transform_e, 2, 0, 1, 1);
-#else
- _page_transform.table()
- .attach(_scalar_transform_e, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK);
-#endif
_scalar_transform_e.signal_value_changed()
.connect(sigc::mem_fun(*this, &Transformation::onTransformValueChanged));
@@ -501,23 +413,13 @@ void Transformation::layoutPageTransform()
_scalar_transform_f.setIncrements(0.1, 1.0);
_scalar_transform_f.setValue(0.0);
-#if WITH_GTKMM_3_0
_page_transform.table().attach(_scalar_transform_f, 2, 1, 1, 1);
-#else
- _page_transform.table()
- .attach(_scalar_transform_f, 2, 3, 1, 2, Gtk::SHRINK, Gtk::SHRINK);
-#endif
_scalar_transform_f.signal_value_changed()
.connect(sigc::mem_fun(*this, &Transformation::onTransformValueChanged));
// Edit existing matrix
-#if WITH_GTKMM_3_0
_page_transform.table().attach(_check_replace_matrix, 0, 2, 2, 1);
-#else
- _page_transform.table()
- .attach(_check_replace_matrix, 0, 2, 2, 3, Gtk::FILL, Gtk::SHRINK);
-#endif
_check_replace_matrix.set_active(false);
_check_replace_matrix.signal_toggled()
@@ -564,11 +466,7 @@ void Transformation::updateSelection(PageType page, Inkscape::Selection *selecti
selection && !selection->isEmpty());
}
-#if WITH_GTKMM_3_0
void Transformation::onSwitchPage(Gtk::Widget * /*page*/, guint pagenum)
-#else
-void Transformation::onSwitchPage(GtkNotebookPage * /*page*/, guint pagenum)
-#endif
{
updateSelection((PageType)pagenum, getDesktop()->getSelection());
}
@@ -646,7 +544,7 @@ void Transformation::updatePageTransform(Inkscape::Selection *selection)
{
if (selection && !selection->isEmpty()) {
if (_check_replace_matrix.get_active()) {
- Geom::Affine current (selection->itemList()[0]->transform); // take from the first item in selection
+ Geom::Affine current (selection->items().front()->transform); // take from the first item in selection
Geom::Affine new_displayed = current;
@@ -719,19 +617,19 @@ void Transformation::applyPageMove(Inkscape::Selection *selection)
if (!prefs->getBool("/dialogs/transformation/applyseparately")) {
// move selection as a whole
if (_check_move_relative.get_active()) {
- sp_selection_move_relative(selection, x, y);
+ sp_object_set_move_relative(selection, x, y);
} else {
Geom::OptRect bbox = selection->preferredBounds();
if (bbox) {
- sp_selection_move_relative(selection,
- x - bbox->min()[Geom::X], y - bbox->min()[Geom::Y]);
+ sp_object_set_move_relative(selection,
+ x - bbox->min()[Geom::X], y - bbox->min()[Geom::Y]);
}
}
} else {
if (_check_move_relative.get_active()) {
// shift each object relatively to the previous one
- std::vector<SPItem*> selected(selection->itemList());
+ std::vector<SPItem*> selected(selection->items().begin(), selection->items().end());
if (selected.empty()) return;
if (fabs(x) > 1e-6) {
@@ -787,8 +685,8 @@ void Transformation::applyPageMove(Inkscape::Selection *selection)
} else {
Geom::OptRect bbox = selection->preferredBounds();
if (bbox) {
- sp_selection_move_relative(selection,
- x - bbox->min()[Geom::X], y - bbox->min()[Geom::Y]);
+ sp_object_set_move_relative(selection,
+ x - bbox->min()[Geom::X], y - bbox->min()[Geom::Y]);
}
}
}
@@ -806,8 +704,8 @@ void Transformation::applyPageScale(Inkscape::Selection *selection)
bool transform_stroke = prefs->getBool("/options/transform/stroke", true);
bool preserve = prefs->getBool("/options/preservetransform/value", false);
if (prefs->getBool("/dialogs/transformation/applyseparately")) {
- std::vector<SPItem*> tmp=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=tmp.begin();i!=tmp.end();++i){
+ auto tmp= selection->items();
+ for(auto i=tmp.begin();i!=tmp.end();++i){
SPItem *item = *i;
Geom::OptRect bbox_pref = item->desktopPreferredBounds();
Geom::OptRect bbox_geom = item->desktopGeometricBounds();
@@ -852,7 +750,7 @@ void Transformation::applyPageScale(Inkscape::Selection *selection)
double y1 = bbox_pref->midpoint()[Geom::Y] + new_height/2;
Geom::Affine scaler = get_scale_transform_for_variable_stroke (*bbox_pref, *bbox_geom, transform_stroke, preserve, x0, y0, x1, y1);
- sp_selection_apply_affine(selection, scaler);
+ sp_object_set_apply_affine(selection, scaler);
}
}
@@ -870,15 +768,15 @@ void Transformation::applyPageRotate(Inkscape::Selection *selection)
}
if (prefs->getBool("/dialogs/transformation/applyseparately")) {
- std::vector<SPItem*> tmp=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=tmp.begin();i!=tmp.end();++i){
+ auto tmp= selection->items();
+ for(auto i=tmp.begin();i!=tmp.end();++i){
SPItem *item = *i;
sp_item_rotate_rel(item, Geom::Rotate (angle*M_PI/180.0));
}
} else {
boost::optional<Geom::Point> center = selection->center();
if (center) {
- sp_selection_rotate_relative(selection, *center, angle);
+ sp_object_set_rotate_relative(selection, *center, angle);
}
}
@@ -890,8 +788,8 @@ void Transformation::applyPageSkew(Inkscape::Selection *selection)
{
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
if (prefs->getBool("/dialogs/transformation/applyseparately")) {
- std::vector<SPItem*> items=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i = items.begin();i!=items.end();++i){
+ auto items = selection->items();
+ for(auto i = items.begin();i!=items.end();++i){
SPItem *item = *i;
if (!_units_skew.isAbsolute()) { // percentage
@@ -945,7 +843,7 @@ void Transformation::applyPageSkew(Inkscape::Selection *selection)
getDesktop()->getMessageStack()->flash(Inkscape::WARNING_MESSAGE, _("Transform matrix is singular, <b>not used</b>."));
return;
}
- sp_selection_skew_relative(selection, *center, 0.01*skewX, 0.01*skewY);
+ sp_object_set_skew_relative(selection, *center, 0.01 * skewX, 0.01 * skewY);
} else if (_units_skew.isRadial()) { //deg or rad
double angleX = _scalar_skew_horizontal.getValue("rad");
double angleY = _scalar_skew_vertical.getValue("rad");
@@ -958,7 +856,7 @@ void Transformation::applyPageSkew(Inkscape::Selection *selection)
}
double skewX = tan(-angleX);
double skewY = tan(angleY);
- sp_selection_skew_relative(selection, *center, skewX, skewY);
+ sp_object_set_skew_relative(selection, *center, skewX, skewY);
} else { // absolute displacement
double skewX = _scalar_skew_horizontal.getValue("px");
double skewY = _scalar_skew_vertical.getValue("px");
@@ -966,7 +864,7 @@ void Transformation::applyPageSkew(Inkscape::Selection *selection)
getDesktop()->getMessageStack()->flash(Inkscape::WARNING_MESSAGE, _("Transform matrix is singular, <b>not used</b>."));
return;
}
- sp_selection_skew_relative(selection, *center, skewX/height, skewY/width);
+ sp_object_set_skew_relative(selection, *center, skewX / height, skewY / width);
}
}
}
@@ -992,14 +890,14 @@ void Transformation::applyPageTransform(Inkscape::Selection *selection)
}
if (_check_replace_matrix.get_active()) {
- std::vector<SPItem*> tmp=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=tmp.begin();i!=tmp.end();++i){
+ auto tmp = selection->items();
+ for(auto i=tmp.begin();i!=tmp.end();++i){
SPItem *item = *i;
item->set_item_transform(displayed);
item->updateRepr();
}
} else {
- sp_selection_apply_affine(selection, displayed); // post-multiply each object's transform
+ sp_object_set_apply_affine(selection, displayed); // post-multiply each object's transform
}
DocumentUndo::done(selection->desktop()->getDocument(), SP_VERB_DIALOG_TRANSFORM,
@@ -1145,7 +1043,7 @@ void Transformation::onReplaceMatrixToggled()
double f = _scalar_transform_f.getValue();
Geom::Affine displayed (a, b, c, d, e, f);
- Geom::Affine current = selection->itemList()[0]->transform; // take from the first item in selection
+ Geom::Affine current = selection->items().front()->transform; // take from the first item in selection
Geom::Affine new_displayed;
if (_check_replace_matrix.get_active()) {
diff --git a/src/ui/dialog/transformation.h b/src/ui/dialog/transformation.h
index 89aa95d90..9595e87bc 100644
--- a/src/ui/dialog/transformation.h
+++ b/src/ui/dialog/transformation.h
@@ -169,11 +169,7 @@ protected:
virtual void _apply();
void presentPage(PageType page);
-#if WITH_GTKMM_3_0
void onSwitchPage(Gtk::Widget *page, guint pagenum);
-#else
- void onSwitchPage(GtkNotebookPage *page, guint pagenum);
-#endif
/**
* Callbacks for when a user changes values on the panels
diff --git a/src/ui/dialog/undo-history.cpp b/src/ui/dialog/undo-history.cpp
index 38fab8f07..53aa7e6ff 100644
--- a/src/ui/dialog/undo-history.cpp
+++ b/src/ui/dialog/undo-history.cpp
@@ -31,20 +31,11 @@ namespace UI {
namespace Dialog {
/* Rendering functions for custom cell renderers */
-#if WITH_GTKMM_3_0
void CellRendererSPIcon::render_vfunc(const Cairo::RefPtr<Cairo::Context>& cr,
Gtk::Widget& widget,
const Gdk::Rectangle& background_area,
const Gdk::Rectangle& cell_area,
Gtk::CellRendererState flags)
-#else
-void CellRendererSPIcon::render_vfunc(const Glib::RefPtr<Gdk::Drawable>& window,
- Gtk::Widget& widget,
- const Gdk::Rectangle& background_area,
- const Gdk::Rectangle& cell_area,
- const Gdk::Rectangle& expose_area,
- Gtk::CellRendererState flags)
-#endif
{
// if this event type doesn't have an icon...
if ( !Inkscape::Verb::get(_property_event_type)->get_image() ) return;
@@ -63,13 +54,8 @@ void CellRendererSPIcon::render_vfunc(const Glib::RefPtr<Gdk::Drawable>& window,
sp_icon_fetch_pixbuf(sp_icon);
_property_icon = Glib::wrap(sp_icon->pb, true);
} else if ( GTK_IS_IMAGE(icon->gobj()) ) {
-#if WITH_GTKMM_3_0
_property_icon = Gtk::Invisible().render_icon_pixbuf(Gtk::StockID(image),
Gtk::ICON_SIZE_MENU);
-#else
- _property_icon = Gtk::Invisible().render_icon(Gtk::StockID(image),
- Gtk::ICON_SIZE_MENU);
-#endif
} else {
delete icon;
return;
@@ -83,42 +69,23 @@ void CellRendererSPIcon::render_vfunc(const Glib::RefPtr<Gdk::Drawable>& window,
property_pixbuf() = _icon_cache[_property_event_type];
}
-#if WITH_GTKMM_3_0
Gtk::CellRendererPixbuf::render_vfunc(cr, widget, background_area,
cell_area, flags);
-#else
- Gtk::CellRendererPixbuf::render_vfunc(window, widget, background_area,
- cell_area, expose_area, flags);
-#endif
}
-#if WITH_GTKMM_3_0
void CellRendererInt::render_vfunc(const Cairo::RefPtr<Cairo::Context>& cr,
Gtk::Widget& widget,
const Gdk::Rectangle& background_area,
const Gdk::Rectangle& cell_area,
Gtk::CellRendererState flags)
-#else
-void CellRendererInt::render_vfunc(const Glib::RefPtr<Gdk::Drawable>& window,
- Gtk::Widget& widget,
- const Gdk::Rectangle& background_area,
- const Gdk::Rectangle& cell_area,
- const Gdk::Rectangle& expose_area,
- Gtk::CellRendererState flags)
-#endif
{
if( _filter(_property_number) ) {
std::ostringstream s;
s << _property_number << std::flush;
property_text() = s.str();
-#if WITH_GTKMM_3_0
Gtk::CellRendererText::render_vfunc(cr, widget, background_area,
cell_area, flags);
-#else
- Gtk::CellRendererText::render_vfunc(window, widget, background_area,
- cell_area, expose_area, flags);
-#endif
}
}
diff --git a/src/ui/dialog/undo-history.h b/src/ui/dialog/undo-history.h
index b0cc283cf..48929a0d0 100644
--- a/src/ui/dialog/undo-history.h
+++ b/src/ui/dialog/undo-history.h
@@ -50,20 +50,11 @@ public:
property_event_type() { return _property_event_type.get_proxy(); }
protected:
-#if WITH_GTKMM_3_0
virtual void render_vfunc(const Cairo::RefPtr<Cairo::Context>& cr,
Gtk::Widget& widget,
const Gdk::Rectangle& background_area,
const Gdk::Rectangle& cell_area,
Gtk::CellRendererState flags);
-#else
- virtual void render_vfunc(const Glib::RefPtr<Gdk::Drawable>& window,
- Gtk::Widget& widget,
- const Gdk::Rectangle& background_area,
- const Gdk::Rectangle& cell_area,
- const Gdk::Rectangle& expose_area,
- Gtk::CellRendererState flags);
-#endif
private:
Glib::Property<Glib::RefPtr<Gdk::Pixbuf> > _property_icon;
@@ -95,20 +86,11 @@ public:
static const Filter& no_filter;
protected:
-#if WITH_GTKMM_3_0
virtual void render_vfunc(const Cairo::RefPtr<Cairo::Context>& cr,
Gtk::Widget& widget,
const Gdk::Rectangle& background_area,
const Gdk::Rectangle& cell_area,
Gtk::CellRendererState flags);
-#else
- virtual void render_vfunc(const Glib::RefPtr<Gdk::Drawable>& window,
- Gtk::Widget& widget,
- const Gdk::Rectangle& background_area,
- const Gdk::Rectangle& cell_area,
- const Gdk::Rectangle& expose_area,
- Gtk::CellRendererState flags);
-#endif
private:
diff --git a/src/ui/dialog/xml-tree.cpp b/src/ui/dialog/xml-tree.cpp
index c2711bb02..eae33ff83 100644
--- a/src/ui/dialog/xml-tree.cpp
+++ b/src/ui/dialog/xml-tree.cpp
@@ -74,11 +74,7 @@ XmlTree::XmlTree (void) :
xml_attribute_delete_button (_("Delete attribute")),
text_container (),
attr_container (),
-#if WITH_GTKMM_3_0
attr_subpaned_container(Gtk::ORIENTATION_VERTICAL),
-#else
- attr_subpaned_container(),
-#endif
set_attr (_("Set")),
new_window(NULL)
{
@@ -95,9 +91,7 @@ XmlTree::XmlTree (void) :
status.set_alignment( 0.0, 0.5);
status.set_size_request(1, -1);
status.set_markup("");
-#if WITH_GTKMM_3_0
status.set_line_wrap(true);
-#endif
status_box.pack_start( status, TRUE, TRUE, 0);
contents->pack_end(status_box, false, false, 2);
@@ -876,31 +870,19 @@ void XmlTree::cmd_new_element_node()
g_signal_connect(G_OBJECT(new_window), "destroy", gtk_main_quit, NULL);
g_signal_connect(G_OBJECT(new_window), "key-press-event", G_CALLBACK(quit_on_esc), new_window);
-#if GTK_CHECK_VERSION(3,0,0)
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4);
gtk_box_set_homogeneous(GTK_BOX(vbox), FALSE);
-#else
- vbox = gtk_vbox_new(FALSE, 4);
-#endif
gtk_container_add(GTK_CONTAINER(new_window), vbox);
name_entry = new Gtk::Entry();
gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(name_entry->gobj()), FALSE, TRUE, 0);
-#if GTK_CHECK_VERSION(3,0,0)
sep = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
-#else
- sep = gtk_hseparator_new();
-#endif
gtk_box_pack_start(GTK_BOX(vbox), sep, FALSE, TRUE, 0);
-#if GTK_CHECK_VERSION(3,0,0)
bbox = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
-#else
- bbox = gtk_hbutton_box_new();
-#endif
gtk_container_set_border_width(GTK_CONTAINER(bbox), 4);
gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END);
diff --git a/src/ui/dialog/xml-tree.h b/src/ui/dialog/xml-tree.h
index 58ef3aef8..a4c3fffcb 100644
--- a/src/ui/dialog/xml-tree.h
+++ b/src/ui/dialog/xml-tree.h
@@ -218,13 +218,7 @@ private:
Gtk::Button *create_button;
Gtk::Entry *name_entry;
-
-#if WITH_GTKMM_3_0
Gtk::Paned paned;
-#else
- Gtk::HPaned paned;
-#endif
-
Gtk::VBox left_box;
Gtk::VBox right_box;
Gtk::HBox status_box;
@@ -248,12 +242,7 @@ private:
Gtk::ScrolledWindow text_container;
Gtk::HBox attr_hbox;
Gtk::VBox attr_container;
-
-#if WITH_GTKMM_3_0
Gtk::Paned attr_subpaned_container;
-#else
- Gtk::VPaned attr_subpaned_container;
-#endif
Gtk::Button set_attr;
diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp
index a7048c402..b47e66451 100644
--- a/src/ui/interface.cpp
+++ b/src/ui/interface.cpp
@@ -73,9 +73,7 @@
#include "message-stack.h"
#include "ui/dialog/layer-properties.h"
-#if GTK_CHECK_VERSION(3,0,0)
- #include "widgets/image-menu-item.h"
-#endif
+#include "widgets/image-menu-item.h"
using Inkscape::DocumentUndo;
@@ -407,11 +405,7 @@ sp_ui_menuitem_add_icon( GtkWidget *item, gchar *icon_name )
icon = sp_icon_new( Inkscape::ICON_SIZE_MENU, icon_name );
gtk_widget_show(icon);
-#if GTK_CHECK_VERSION(3,0,0)
image_menu_item_set_image((ImageMenuItem *) item, icon);
-#else
- gtk_image_menu_item_set_image((GtkImageMenuItem *) item, icon);
-#endif
} // end of sp_ui_menu_add_icon
void
@@ -465,11 +459,7 @@ static GtkWidget *sp_ui_menu_append_item_from_verb(GtkMenu *menu, Inkscape::Verb
if (radio) {
item = gtk_radio_menu_item_new_with_mnemonic(group, action->name);
} else {
-#if GTK_CHECK_VERSION(3,0,0)
item = image_menu_item_new_with_mnemonic(action->name);
-#else
- item = gtk_image_menu_item_new_with_mnemonic(action->name);
-#endif
}
gtk_label_set_markup_with_mnemonic( GTK_LABEL(gtk_bin_get_child(GTK_BIN (item))), action->name);
@@ -560,11 +550,7 @@ static bool getViewStateFromPref(Inkscape::UI::View::View *view, gchar const *pr
return prefs->getBool(pref_path, true);
}
-#if GTK_CHECK_VERSION(3,0,0)
static gboolean checkitem_update(GtkWidget *widget, cairo_t * /*cr*/, gpointer user_data)
-#else
-static gboolean checkitem_update(GtkWidget *widget, GdkEventExpose * /*event*/, gpointer user_data)
-#endif
{
GtkCheckMenuItem *menuitem=GTK_CHECK_MENU_ITEM(widget);
@@ -621,11 +607,7 @@ static void taskToggled(GtkCheckMenuItem *menuitem, gpointer userData)
/**
* Callback function to update the status of the radio buttons in the View -> Display mode menu (Normal, No Filters, Outline) and Color display mode.
*/
-#if GTK_CHECK_VERSION(3,0,0)
static gboolean update_view_menu(GtkWidget *widget, cairo_t * /*cr*/, gpointer user_data)
-#else
-static gboolean update_view_menu(GtkWidget *widget, GdkEventExpose * /*event*/, gpointer user_data)
-#endif
{
SPAction *action = (SPAction *) user_data;
g_assert(action->id != NULL);
@@ -669,11 +651,7 @@ static gboolean update_view_menu(GtkWidget *widget, GdkEventExpose * /*event*/,
static void
sp_ui_menu_append_check_item_from_verb(GtkMenu *menu, Inkscape::UI::View::View *view, gchar const *label, gchar const *tip, gchar const *pref,
void (*callback_toggle)(GtkCheckMenuItem *, gpointer user_data),
-#if GTK_CHECK_VERSION(3,0,0)
gboolean (*callback_update)(GtkWidget *widget, cairo_t *cr, gpointer user_data),
-#else
- gboolean (*callback_update)(GtkWidget *widget, GdkEventExpose *event, gpointer user_data),
-#endif
Inkscape::Verb *verb)
{
unsigned int shortcut = (verb) ? sp_shortcut_get_primary(verb) : 0;
@@ -697,11 +675,7 @@ sp_ui_menu_append_check_item_from_verb(GtkMenu *menu, Inkscape::UI::View::View *
g_signal_connect( G_OBJECT(item), "toggled", (GCallback) callback_toggle, (void *) pref);
-#if GTK_CHECK_VERSION(3,0,0)
g_signal_connect( G_OBJECT(item), "draw", (GCallback) callback_update, (void *) pref);
-#else
- g_signal_connect( G_OBJECT(item), "expose_event", (GCallback) callback_update, (void *) pref);
-#endif
(*callback_update)(item, NULL, (void *)pref);
@@ -844,11 +818,7 @@ static void sp_ui_build_dyn_menus(Inkscape::XML::Node *menus, GtkWidget *menu, I
}
if (verb->get_code() != SP_VERB_NONE) {
SPAction *action = verb->get_action(Inkscape::ActionContext(view));
-#if GTK_CHECK_VERSION(3,0,0)
g_signal_connect( G_OBJECT(item), "draw", (GCallback) update_view_menu, (void *) action);
-#else
- g_signal_connect( G_OBJECT(item), "expose_event", (GCallback) update_view_menu, (void *) action);
-#endif
}
} else if (menu_pntr->attribute("check") != NULL) {
if (verb->get_code() != SP_VERB_NONE) {
@@ -1240,7 +1210,7 @@ sp_ui_drag_data_received(GtkWidget *widget,
Geom::OptRect sel_bbox = selection->visualBounds();
if (sel_bbox) {
Geom::Point m( desktop->point() - sel_bbox->midpoint() );
- sp_selection_move_relative(selection, m, false);
+ sp_object_set_move_relative(selection, m, false);
}
}
@@ -2086,8 +2056,8 @@ void ContextMenu::ImageEdit(void)
}
#endif
- std::vector<SPItem*> itemlist=_desktop->selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
+ auto itemlist= _desktop->selection->items();
+ for(auto i=itemlist.begin();i!=itemlist.end();++i){
Inkscape::XML::Node *ir = (*i)->getRepr();
const gchar *href = ir->attribute("xlink:href");
diff --git a/src/ui/previewholder.cpp b/src/ui/previewholder.cpp
index ac1369ced..ef11daa3b 100644
--- a/src/ui/previewholder.cpp
+++ b/src/ui/previewholder.cpp
@@ -17,12 +17,7 @@
#include <gtkmm/sizegroup.h>
#include <gtkmm/scrollbar.h>
#include <gtkmm/adjustment.h>
-
-#if WITH_GTKMM_3_0
-# include <gtkmm/grid.h>
-#else
-# include <gtkmm/table.h>
-#endif
+#include <gtkmm/grid.h>
#define COLUMNS_FOR_SMALL 16
#define COLUMNS_FOR_LARGE 8
@@ -54,7 +49,6 @@ PreviewHolder::PreviewHolder() :
((Gtk::ScrolledWindow *)_scroller)->set_policy(Gtk::POLICY_AUTOMATIC,
Gtk::POLICY_AUTOMATIC);
-#if WITH_GTKMM_3_0
_insides = Gtk::manage(new Gtk::Grid());
_insides->set_name( "PreviewHolderGrid" );
_insides->set_column_spacing(8);
@@ -65,21 +59,9 @@ PreviewHolder::PreviewHolder() :
_scroller->set_hexpand();
_scroller->set_vexpand();
-#else
- _insides = Gtk::manage(new Gtk::Table( 1, 2 ));
- _insides->set_col_spacings( 8 );
-
- // Add a container with the scroller and a spacer
- Gtk::Table* spaceHolder = Gtk::manage( new Gtk::Table(1, 2) );
-#endif
-
_scroller->add( *_insides );
-#if WITH_GTKMM_3_0
spaceHolder->attach( *_scroller, 0, 0, 1, 1);
-#else
- spaceHolder->attach( *_scroller, 0, 1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND );
-#endif
pack_start(*spaceHolder, Gtk::PACK_EXPAND_WIDGET);
}
@@ -92,11 +74,7 @@ PreviewHolder::~PreviewHolder()
bool PreviewHolder::on_scroll_event(GdkEventScroll *event)
{
// Scroll horizontally by page on mouse wheel
-#if WITH_GTKMM_3_0
- Glib::RefPtr<Gtk::Adjustment> adj = dynamic_cast<Gtk::ScrolledWindow*>(_scroller)->get_hadjustment();
-#else
- Gtk::Adjustment *adj = dynamic_cast<Gtk::ScrolledWindow*>(_scroller)->get_hadjustment();
-#endif
+ auto adj = dynamic_cast<Gtk::ScrolledWindow*>(_scroller)->get_hadjustment();
if (!adj) {
return FALSE;
@@ -140,7 +118,6 @@ void PreviewHolder::addPreview( Previewable* preview )
Gtk::Widget* label = Gtk::manage(preview->getPreview(PREVIEW_STYLE_BLURB, VIEW_TYPE_LIST, _baseSize, _ratio, _border));
Gtk::Widget* thing = Gtk::manage(preview->getPreview(PREVIEW_STYLE_PREVIEW, VIEW_TYPE_LIST, _baseSize, _ratio, _border));
-#if WITH_GTKMM_3_0
thing->set_hexpand();
thing->set_vexpand();
_insides->attach(*thing, 0, i, 1, 1);
@@ -148,10 +125,6 @@ void PreviewHolder::addPreview( Previewable* preview )
label->set_hexpand();
label->set_valign(Gtk::ALIGN_CENTER);
_insides->attach(*label, 1, i, 1, 1);
-#else
- _insides->attach( *thing, 0, 1, i, i+1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND );
- _insides->attach( *label, 1, 2, i, i+1, Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK );
-#endif
}
break;
@@ -167,44 +140,25 @@ void PreviewHolder::addPreview( Previewable* preview )
int col = i % width;
int row = i / width;
-#if !WITH_GTKMM_3_0
- // If the existing grid isn't wide enough, we need to resize
- // it and re-pack the existing widgets
- if ( _insides && width > (int)_insides->property_n_columns() ) {
- _insides->resize( height, width );
-#endif
- std::vector<Gtk::Widget*>kids = _insides->get_children();
- int childCount = (int)kids.size();
- // g_message(" %3d resize from %d to %d (r:%d, c:%d) with %d children", i, oldWidth, width, row, col, childCount );
-
- // Loop through the existing widgets and move them to new location
- for ( int j = 1; j < childCount; j++ ) {
- Gtk::Widget* target = kids[childCount - (j + 1)];
- int col2 = j % width;
- int row2 = j / width;
- Glib::RefPtr<Gtk::Widget> handle(target);
- _insides->remove( *target );
-
-#if WITH_GTKMM_3_0
- target->set_hexpand();
- target->set_vexpand();
- _insides->attach( *target, col2, row2, 1, 1);
-#else
- _insides->attach( *target, col2, col2+1, row2, row2+1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND );
-#endif
- }
-#if WITH_GTKMM_3_0
- thing->set_hexpand();
- thing->set_vexpand();
- _insides->attach(*thing, col, row, 1, 1);
-#else
- } else if ( col == 0 ) {
- // we just started a new row
- _insides->resize( row + 1, width );
- }
-
- _insides->attach( *thing, col, col+1, row, row+1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND );
-#endif
+ auto kids = _insides->get_children();
+ int childCount = (int)kids.size();
+ // g_message(" %3d resize from %d to %d (r:%d, c:%d) with %d children", i, oldWidth, width, row, col, childCount );
+
+ // Loop through the existing widgets and move them to new location
+ for ( int j = 1; j < childCount; j++ ) {
+ auto target = kids[childCount - (j + 1)];
+ int col2 = j % width;
+ int row2 = j / width;
+ Glib::RefPtr<Gtk::Widget> handle(target);
+ _insides->remove( *target );
+
+ target->set_hexpand();
+ target->set_vexpand();
+ _insides->attach( *target, col2, row2, 1, 1);
+ }
+ thing->set_hexpand();
+ thing->set_vexpand();
+ _insides->attach(*thing, col, row, 1, 1);
}
}
@@ -304,12 +258,8 @@ void PreviewHolder::on_size_allocate( Gtk::Allocation& allocation )
if ( _insides && !_wrap && (_view != VIEW_TYPE_LIST) && (_anchor == SP_ANCHOR_NORTH || _anchor == SP_ANCHOR_SOUTH) ) {
Gtk::Requisition req;
-#if GTK_CHECK_VERSION(3,0,0)
Gtk::Requisition req_natural;
_insides->get_preferred_size(req, req_natural);
-#else
- req = _insides->size_request();
-#endif
gint delta = allocation.get_width() - req.width;
if ( (delta > 4) && req.height < allocation.get_height() ) {
@@ -351,43 +301,27 @@ void PreviewHolder::calcGridSize( const Gtk::Widget* thing, int itemCount, int&
if ( _anchor == SP_ANCHOR_SOUTH || _anchor == SP_ANCHOR_NORTH ) {
Gtk::Requisition req;
-#if GTK_CHECK_VERSION(3,0,0)
Gtk::Requisition req_natural;
_scroller->get_preferred_size(req, req_natural);
-#else
- req = _scroller->size_request();
-#endif
int currW = _scroller->get_width();
if ( currW > req.width ) {
req.width = currW;
}
-#if GTK_CHECK_VERSION(3,0,0)
- Gtk::Scrollbar* hs = dynamic_cast<Gtk::ScrolledWindow*>(_scroller)->get_hscrollbar();
-#else
- Gtk::HScrollbar* hs = dynamic_cast<Gtk::ScrolledWindow*>(_scroller)->get_hscrollbar();
-#endif
+ auto hs = dynamic_cast<Gtk::ScrolledWindow*>(_scroller)->get_hscrollbar();
if ( hs ) {
Gtk::Requisition scrollReq;
-#if GTK_CHECK_VERSION(3,0,0)
Gtk::Requisition scrollReq_natural;
hs->get_preferred_size(scrollReq, scrollReq_natural);
-#else
- scrollReq = hs->size_request();
-#endif
// the +8 is a temporary hack
req.height -= scrollReq.height + 8;
}
Gtk::Requisition req2;
-#if GTK_CHECK_VERSION(3,0,0)
Gtk::Requisition req2_natural;
const_cast<Gtk::Widget*>(thing)->get_preferred_size(req2, req2_natural);
-#else
- req2 = const_cast<Gtk::Widget*>(thing)->size_request();
-#endif
int h2 = ((req2.height > 0) && (req.height > req2.height)) ? (req.height / req2.height) : 1;
int w2 = ((req2.width > 0) && (req.width > req2.width)) ? (req.width / req2.width) : 1;
@@ -415,21 +349,11 @@ void PreviewHolder::rebuildUI()
switch(_view) {
case VIEW_TYPE_LIST:
{
-
-#if WITH_GTKMM_3_0
_insides = Gtk::manage(new Gtk::Grid());
_insides->set_column_spacing(8);
-#else
- _insides = Gtk::manage(new Gtk::Table( 1, 2 ));
- _insides->set_col_spacings( 8 );
-#endif
if (_border == BORDER_WIDE) {
-#if WITH_GTKMM_3_0
_insides->set_row_spacing(1);
-#else
- _insides->set_row_spacings( 1 );
-#endif
}
for ( unsigned int i = 0; i < items.size(); i++ ) {
@@ -438,7 +362,6 @@ void PreviewHolder::rebuildUI()
Gtk::Widget* thing = Gtk::manage(items[i]->getPreview(PREVIEW_STYLE_PREVIEW, _view, _baseSize, _ratio, _border));
-#if WITH_GTKMM_3_0
thing->set_hexpand();
thing->set_vexpand();
_insides->attach(*thing, 0, i, 1, 1);
@@ -446,10 +369,6 @@ void PreviewHolder::rebuildUI()
label->set_hexpand();
label->set_valign(Gtk::ALIGN_CENTER);
_insides->attach(*label, 1, i, 1, 1);
-#else
- _insides->attach( *thing, 0, 1, i, i+1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND );
- _insides->attach( *label, 1, 2, i, i+1, Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK );
-#endif
}
_scroller->add( *_insides );
@@ -472,28 +391,16 @@ void PreviewHolder::rebuildUI()
if ( !_insides ) {
calcGridSize( thing, items.size(), width, height );
-#if WITH_GTKMM_3_0
_insides = Gtk::manage(new Gtk::Grid());
if (_border == BORDER_WIDE) {
_insides->set_column_spacing(1);
_insides->set_row_spacing(1);
}
-#else
- _insides = Gtk::manage(new Gtk::Table( height, width ));
- if (_border == BORDER_WIDE) {
- _insides->set_col_spacings( 1 );
- _insides->set_row_spacings( 1 );
- }
-#endif
}
-#if WITH_GTKMM_3_0
thing->set_hexpand();
thing->set_vexpand();
_insides->attach( *thing, col, row, 1, 1);
-#else
- _insides->attach( *thing, col, col+1, row, row+1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND );
-#endif
if ( ++col >= width ) {
col = 0;
@@ -501,11 +408,7 @@ void PreviewHolder::rebuildUI()
}
}
if ( !_insides ) {
-#if WITH_GTKMM_3_0
_insides = Gtk::manage(new Gtk::Grid());
-#else
- _insides = Gtk::manage(new Gtk::Table( 1, 2 ));
-#endif
}
_scroller->add( *_insides );
diff --git a/src/ui/previewholder.h b/src/ui/previewholder.h
index 28c0fd865..d370e8fc8 100644
--- a/src/ui/previewholder.h
+++ b/src/ui/previewholder.h
@@ -21,11 +21,7 @@
#include <gtkmm/bin.h>
namespace Gtk {
-#if WITH_GTKMM_3_0
class Grid;
-#else
-class Table;
-#endif
}
#include "previewfillable.h"
@@ -68,12 +64,7 @@ private:
std::vector<Previewable*> items;
Gtk::Bin *_scroller;
-
-#if WITH_GTKMM_3_0
Gtk::Grid *_insides;
-#else
- Gtk::Table *_insides;
-#endif
int _prefCols;
bool _updatesFrozen;
diff --git a/src/ui/tool/Makefile_insert b/src/ui/tool/Makefile_insert
deleted file mode 100644
index f46f48b72..000000000
--- a/src/ui/tool/Makefile_insert
+++ /dev/null
@@ -1,30 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-ink_common_sources += \
- ui/tool/control-point.cpp \
- ui/tool/control-point.h \
- ui/tool/control-point-selection.cpp \
- ui/tool/control-point-selection.h \
- ui/tool/commit-events.h \
- ui/tool/curve-drag-point.cpp \
- ui/tool/curve-drag-point.h \
- ui/tool/event-utils.cpp \
- ui/tool/event-utils.h \
- ui/tool/manipulator.cpp \
- ui/tool/manipulator.h \
- ui/tool/modifier-tracker.cpp \
- ui/tool/modifier-tracker.h \
- ui/tool/multi-path-manipulator.cpp \
- ui/tool/multi-path-manipulator.h \
- ui/tool/node.cpp \
- ui/tool/node.h \
- ui/tool/node-types.h \
- ui/tool/path-manipulator.cpp \
- ui/tool/path-manipulator.h \
- ui/tool/selectable-control-point.cpp \
- ui/tool/selectable-control-point.h \
- ui/tool/selector.cpp \
- ui/tool/selector.h \
- ui/tool/shape-record.h \
- ui/tool/transform-handle-set.cpp \
- ui/tool/transform-handle-set.h
diff --git a/src/ui/tools/Makefile_insert b/src/ui/tools/Makefile_insert
deleted file mode 100644
index 686dfedd8..000000000
--- a/src/ui/tools/Makefile_insert
+++ /dev/null
@@ -1,34 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-ink_common_sources += \
- ui/tools/arc-tool.cpp ui/tools/arc-tool.h \
- ui/tools/box3d-tool.cpp ui/tools/box3d-tool.h \
- ui/tools/calligraphic-tool.cpp ui/tools/calligraphic-tool.h \
- ui/tools/connector-tool.cpp ui/tools/connector-tool.h \
- ui/tools/dropper-tool.cpp ui/tools/dropper-tool.h \
- ui/tools/dynamic-base.cpp ui/tools/dynamic-base.h \
- ui/tools/eraser-tool.cpp ui/tools/eraser-tool.h \
- ui/tools/freehand-base.cpp ui/tools/freehand-base.h \
- ui/tools/gradient-tool.cpp ui/tools/gradient-tool.h \
- ui/tools/lpe-tool.cpp ui/tools/lpe-tool.h \
- ui/tools/measure-tool.cpp ui/tools/measure-tool.h \
- ui/tools/mesh-tool.cpp ui/tools/mesh-tool.h \
- ui/tools/node-tool.cpp ui/tools/node-tool.h \
- ui/tools/pen-tool.cpp ui/tools/pen-tool.h \
- ui/tools/pencil-tool.cpp ui/tools/pencil-tool.h \
- ui/tools/rect-tool.cpp ui/tools/rect-tool.h \
- ui/tools/select-tool.cpp ui/tools/select-tool.h \
- ui/tools/spiral-tool.cpp ui/tools/spiral-tool.h \
- ui/tools/spray-tool.cpp ui/tools/spray-tool.h \
- ui/tools/star-tool.cpp ui/tools/star-tool.h \
- ui/tools/text-tool.cpp ui/tools/text-tool.h \
- ui/tools/tool-base.cpp ui/tools/tool-base.h \
- ui/tools/tweak-tool.cpp ui/tools/tweak-tool.h \
- ui/tools/zoom-tool.cpp ui/tools/zoom-tool.h
-
-if HAVE_POTRACE
-
-ink_common_sources += \
- ui/tools/flood-tool.cpp ui/tools/flood-tool.h
-
-endif
diff --git a/src/ui/tools/box3d-tool.cpp b/src/ui/tools/box3d-tool.cpp
index 9b5b264bc..94488a700 100644
--- a/src/ui/tools/box3d-tool.cpp
+++ b/src/ui/tools/box3d-tool.cpp
@@ -109,8 +109,8 @@ static void sp_box3d_context_ensure_persp_in_defs(SPDocument *document) {
SPDefs *defs = document->getDefs();
bool has_persp = false;
- for ( SPObject *child = defs->firstChild(); child; child = child->getNext() ) {
- if (SP_IS_PERSP3D(child)) {
+ for (auto& child: defs->children) {
+ if (SP_IS_PERSP3D(&child)) {
has_persp = true;
break;
}
diff --git a/src/ui/tools/calligraphic-tool.cpp b/src/ui/tools/calligraphic-tool.cpp
index 84c4adc89..d623035d9 100644
--- a/src/ui/tools/calligraphic-tool.cpp
+++ b/src/ui/tools/calligraphic-tool.cpp
@@ -921,10 +921,10 @@ void CalligraphicTool::set_to_accumulated(bool unionize, bool subtract) {
if (unionize) {
desktop->getSelection()->add(this->repr);
- sp_selected_path_union_skip_undo(desktop->getSelection(), desktop);
+ sp_selected_path_union_skip_undo(desktop->getSelection());
} else if (subtract) {
desktop->getSelection()->add(this->repr);
- sp_selected_path_diff_skip_undo(desktop->getSelection(), desktop);
+ sp_selected_path_diff_skip_undo(desktop->getSelection());
} else {
if (this->keep_selected) {
desktop->getSelection()->set(this->repr);
diff --git a/src/ui/tools/connector-tool.cpp b/src/ui/tools/connector-tool.cpp
index 605b573d7..84f7f318c 100644
--- a/src/ui/tools/connector-tool.cpp
+++ b/src/ui/tools/connector-tool.cpp
@@ -1107,9 +1107,9 @@ void ConnectorTool::_setActiveShape(SPItem *item) {
// The idea here is to try and add a group's children to solidify
// connection handling. We react to path objects with only one node.
- for (SPObject *child = item->firstChild() ; child ; child = child->getNext() ) {
- if (SP_IS_PATH(child) && SP_PATH(child)->nodesInPath() == 1) {
- this->_activeShapeAddKnot((SPItem *) child);
+ for (auto& child: item->children) {
+ if (SP_IS_PATH(&child) && SP_PATH(&child)->nodesInPath() == 1) {
+ this->_activeShapeAddKnot((SPItem *) &child);
}
}
this->_activeShapeAddKnot(item);
@@ -1299,8 +1299,8 @@ void cc_selection_set_avoid(bool const set_avoid)
int changes = 0;
- std::vector<SPItem*> l = selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=l.begin();i!=l.end(); ++i) {
+ auto l = selection->items();
+ for(auto i=l.begin();i!=l.end(); ++i) {
SPItem *item = *i;
char const *value = (set_avoid) ? "true" : NULL;
diff --git a/src/ui/tools/dropper-tool.cpp b/src/ui/tools/dropper-tool.cpp
index 4db720686..99177dc75 100644
--- a/src/ui/tools/dropper-tool.cpp
+++ b/src/ui/tools/dropper-tool.cpp
@@ -118,20 +118,12 @@ void DropperTool::finish() {
}
if (cursor_dropper_fill) {
-#if GTK_CHECK_VERSION(3,0,0)
g_object_unref(cursor_dropper_fill);
-#else
- gdk_cursor_unref (cursor_dropper_fill);
-#endif
cursor_dropper_fill = NULL;
}
if (cursor_dropper_stroke) {
-#if GTK_CHECK_VERSION(3,0,0)
g_object_unref(cursor_dropper_stroke);
-#else
- gdk_cursor_unref (cursor_dropper_stroke);
-#endif
cursor_dropper_fill = NULL;
}
diff --git a/src/ui/tools/eraser-tool.cpp b/src/ui/tools/eraser-tool.cpp
index 838522b34..d18db8266 100644
--- a/src/ui/tools/eraser-tool.cpp
+++ b/src/ui/tools/eraser-tool.cpp
@@ -681,7 +681,7 @@ void EraserTool::set_to_accumulated() {
}
}
} else {
- toWorkOn = selection->itemList();
+ toWorkOn.insert(toWorkOn.end(), selection->items().begin(), selection->items().end());
}
wasSelection = true;
}
@@ -697,7 +697,6 @@ void EraserTool::set_to_accumulated() {
item->deleteObject(true);
sp_object_unref(item);
workDone = true;
- workDone = true;
} else if (SP_IS_GROUP(item) || use ) {
/*Do nothing*/
} else {
@@ -708,7 +707,7 @@ void EraserTool::set_to_accumulated() {
Inkscape::GC::release(dup); // parent takes over
selection->set(dup);
if (!this->nowidth) {
- sp_selected_path_union_skip_undo(selection, desktop);
+ sp_selected_path_union_skip_undo(selection);
}
selection->add(item);
if(item->style->fill_rule.value == SP_WIND_RULE_EVENODD){
@@ -719,9 +718,9 @@ void EraserTool::set_to_accumulated() {
css = 0;
}
if (this->nowidth) {
- sp_selected_path_cut_skip_undo(selection, desktop);
+ sp_selected_path_cut_skip_undo(selection);
} else {
- sp_selected_path_diff_skip_undo(selection, desktop);
+ sp_selected_path_diff_skip_undo(selection);
}
workDone = true; // TODO set this only if something was cut.
bool break_apart = prefs->getBool("/tools/eraser/break_apart", false);
@@ -734,7 +733,7 @@ void EraserTool::set_to_accumulated() {
}
if ( !selection->isEmpty() ) {
// If the item was not completely erased, track the new remainder.
- std::vector<SPItem*> nowSel(selection->itemList());
+ std::vector<SPItem*> nowSel(selection->items().begin(), selection->items().end());
for (std::vector<SPItem*>::const_iterator i2 = nowSel.begin();i2!=nowSel.end();++i2) {
remainingItems.push_back(*i2);
}
diff --git a/src/ui/tools/flood-tool.cpp b/src/ui/tools/flood-tool.cpp
index 2f125e6ed..0b893a7ba 100644
--- a/src/ui/tools/flood-tool.cpp
+++ b/src/ui/tools/flood-tool.cpp
@@ -446,7 +446,7 @@ static void do_trace(bitmap_coords_info bci, guchar *trace_px, SPDesktop *deskto
ngettext("Area filled, path with <b>%d</b> node created and unioned with selection.","Area filled, path with <b>%d</b> nodes created and unioned with selection.",
SP_PATH(reprobj)->nodesInPath()), SP_PATH(reprobj)->nodesInPath() );
selection->add(reprobj);
- sp_selected_path_union_skip_undo(desktop->getSelection(), desktop);
+ sp_selected_path_union_skip_undo(desktop->getSelection());
} else {
desktop->messageStack()->flashF( Inkscape::WARNING_MESSAGE,
ngettext("Area filled, path with <b>%d</b> node created.","Area filled, path with <b>%d</b> nodes created.",
diff --git a/src/ui/tools/gradient-tool.cpp b/src/ui/tools/gradient-tool.cpp
index e4814c3de..a084a8fd9 100644
--- a/src/ui/tools/gradient-tool.cpp
+++ b/src/ui/tools/gradient-tool.cpp
@@ -99,7 +99,7 @@ void GradientTool::selection_changed(Inkscape::Selection*) {
if (selection == NULL) {
return;
}
- guint n_obj = selection->itemList().size();
+ guint n_obj = (guint) boost::distance(selection->items());
if (!drag->isNonEmpty() || selection->isEmpty())
return;
@@ -485,10 +485,10 @@ bool GradientTool::root_handler(GdkEvent* event) {
if (over_line) {
// we take the first item in selection, because with doubleclick, the first click
// always resets selection to the single object under cursor
- sp_gradient_context_add_stop_near_point(this, SP_ITEM(selection->itemList().front()), this->mousepoint_doc, event->button.time);
+ sp_gradient_context_add_stop_near_point(this, SP_ITEM(selection->items().front()), this->mousepoint_doc, event->button.time);
} else {
- std::vector<SPItem*> items=selection->itemList();
- for (std::vector<SPItem*>::const_iterator i = items.begin();i!=items.end();++i) {
+ auto items= selection->items();
+ for (auto i = items.begin();i!=items.end();++i) {
SPItem *item = *i;
SPGradientType new_type = (SPGradientType) prefs->getInt("/tools/gradient/newgradient", SP_GRADIENT_TYPE_LINEAR);
Inkscape::PaintTarget fsmode = (prefs->getInt("/tools/gradient/newfillorstroke", 1) != 0) ? Inkscape::FOR_FILL : Inkscape::FOR_STROKE;
@@ -890,7 +890,7 @@ static void sp_gradient_drag(GradientTool &rc, Geom::Point const pt, guint /*sta
} else {
// Starting from empty space:
// Sort items so that the topmost comes last
- std::vector<SPItem*> items(selection->itemList());
+ std::vector<SPItem*> items(selection->items().begin(), selection->items().end());
sort(items.begin(),items.end(),sp_item_repr_compare_position);
// take topmost
vector = sp_gradient_vector_for_object(document, desktop, SP_ITEM(items.back()), fill_or_stroke);
@@ -900,8 +900,8 @@ static void sp_gradient_drag(GradientTool &rc, Geom::Point const pt, guint /*sta
SPCSSAttr *css = sp_repr_css_attr_new();
sp_repr_css_set_property(css, "fill-opacity", "1.0");
- std::vector<SPItem*> itemlist = selection->itemList();
- for (std::vector<SPItem*>::const_iterator i = itemlist.begin();i!=itemlist.end();++i) {
+ auto itemlist = selection->items();
+ for (auto i = itemlist.begin();i!=itemlist.end();++i) {
//FIXME: see above
sp_repr_css_change_recursive((*i)->getRepr(), css, "style");
@@ -924,7 +924,7 @@ static void sp_gradient_drag(GradientTool &rc, Geom::Point const pt, guint /*sta
ec->_grdrag->local_change = true;
// give the grab out-of-bounds values of xp/yp because we're already dragging
// and therefore are already out of tolerance
- ec->_grdrag->grabKnot (selection->itemList()[0],
+ ec->_grdrag->grabKnot (selection->items().front(),
type == SP_GRADIENT_TYPE_LINEAR? POINT_LG_END : POINT_RG_R1,
-1, // ignore number (though it is always 1)
fill_or_stroke, 99999, 99999, etime);
@@ -933,7 +933,7 @@ static void sp_gradient_drag(GradientTool &rc, Geom::Point const pt, guint /*sta
// status text; we do not track coords because this branch is run once, not all the time
// during drag
- int n_objects = selection->itemList().size();
+ int n_objects = (int) boost::distance(selection->items());
rc.message_context->setF(Inkscape::NORMAL_MESSAGE,
ngettext("<b>Gradient</b> for %d object; with <b>Ctrl</b> to snap angle",
"<b>Gradient</b> for %d objects; with <b>Ctrl</b> to snap angle", n_objects),
diff --git a/src/ui/tools/lpe-tool.cpp b/src/ui/tools/lpe-tool.cpp
index ee85dd28c..29e4c9e74 100644
--- a/src/ui/tools/lpe-tool.cpp
+++ b/src/ui/tools/lpe-tool.cpp
@@ -393,8 +393,8 @@ lpetool_create_measuring_items(LpeTool *lc, Inkscape::Selection *selection)
SPCanvasGroup *tmpgrp = lc->desktop->getTempGroup();
gchar *arc_length;
double lengthval;
- std::vector<SPItem*> items=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end();++i){
+ auto items= selection->items();
+ for(auto i=items.begin();i!=items.end();++i){
if (SP_IS_PATH(*i)) {
path = SP_PATH(*i);
curve = path->getCurve();
diff --git a/src/ui/tools/mesh-tool.cpp b/src/ui/tools/mesh-tool.cpp
index 32e70bc19..f2cf8c4a2 100644
--- a/src/ui/tools/mesh-tool.cpp
+++ b/src/ui/tools/mesh-tool.cpp
@@ -102,7 +102,7 @@ void MeshTool::selection_changed(Inkscape::Selection* /*sel*/) {
return;
}
- guint n_obj = selection->itemList().size();
+ guint n_obj = (guint) boost::distance(selection->items());
if (!drag->isNonEmpty() || selection->isEmpty()) {
return;
@@ -466,11 +466,11 @@ bool MeshTool::root_handler(GdkEvent* event) {
if (over_line) {
// We take the first item in selection, because with doubleclick, the first click
// always resets selection to the single object under cursor
- sp_mesh_context_split_near_point(this, selection->itemList()[0], this->mousepoint_doc, event->button.time);
+ sp_mesh_context_split_near_point(this, selection->items().front(), this->mousepoint_doc, event->button.time);
} else {
// Create a new gradient with default coordinates.
- std::vector<SPItem*> items=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end();++i){
+ auto items= selection->items();
+ for(auto i=items.begin();i!=items.end();++i){
SPItem *item = *i;
SPGradientType new_type = SP_GRADIENT_TYPE_MESH;
Inkscape::PaintTarget fsmode = (prefs->getInt("/tools/gradient/newfillorstroke", 1) != 0) ? Inkscape::FOR_FILL : Inkscape::FOR_STROKE;
@@ -944,7 +944,7 @@ static void sp_mesh_end_drag(MeshTool &rc) {
} else {
// Starting from empty space:
// Sort items so that the topmost comes last
- std::vector<SPItem*> items(selection->itemList());
+ std::vector<SPItem*> items(selection->items().begin(), selection->items().end());
sort(items.begin(),items.end(),sp_item_repr_compare_position);
// take topmost
vector = sp_gradient_vector_for_object(document, desktop, SP_ITEM(items.back()), fill_or_stroke);
@@ -954,8 +954,8 @@ static void sp_mesh_end_drag(MeshTool &rc) {
SPCSSAttr *css = sp_repr_css_attr_new();
sp_repr_css_set_property(css, "fill-opacity", "1.0");
- std::vector<SPItem*> items=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end();++i){
+ auto items= selection->items();
+ for(auto i=items.begin();i!=items.end();++i){
//FIXME: see above
sp_repr_css_change_recursive((*i)->getRepr(), css, "style");
@@ -971,7 +971,7 @@ static void sp_mesh_end_drag(MeshTool &rc) {
// status text; we do not track coords because this branch is run once, not all the time
// during drag
- int n_objects = selection->itemList().size();
+ int n_objects = (int) boost::distance(selection->items());
rc.message_context->setF(Inkscape::NORMAL_MESSAGE,
ngettext("<b>Gradient</b> for %d object; with <b>Ctrl</b> to snap angle",
"<b>Gradient</b> for %d objects; with <b>Ctrl</b> to snap angle", n_objects),
diff --git a/src/ui/tools/node-tool.cpp b/src/ui/tools/node-tool.cpp
index bf18d4a2e..f7f09610c 100644
--- a/src/ui/tools/node-tool.cpp
+++ b/src/ui/tools/node-tool.cpp
@@ -372,8 +372,8 @@ void gather_items(NodeTool *nt, SPItem *base, SPObject *obj, Inkscape::UI::Shape
r.role = role;
s.insert(r);
} else if (role != SHAPE_ROLE_NORMAL && (SP_IS_GROUP(obj) || SP_IS_OBJECTGROUP(obj))) {
- for (SPObject *c = obj->children; c; c = c->next) {
- gather_items(nt, base, c, role, s);
+ for (auto& c: obj->children) {
+ gather_items(nt, base, &c, role, s);
}
} else if (SP_IS_ITEM(obj)) {
SPItem *item = static_cast<SPItem*>(obj);
@@ -401,8 +401,8 @@ void NodeTool::selection_changed(Inkscape::Selection *sel) {
std::set<ShapeRecord> shapes;
- std::vector<SPItem*> items=sel->itemList();
- for(std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end();++i){
+ auto items= sel->items();
+ for(auto i=items.begin();i!=items.end();++i){
SPObject *obj = *i;
if (SP_IS_ITEM(obj)) {
@@ -437,8 +437,9 @@ void NodeTool::selection_changed(Inkscape::Selection *sel) {
}
}
+ std::vector<SPItem *> vec(sel->items().begin(), sel->items().end());
_previous_selection = _current_selection;
- _current_selection = sel->itemList();
+ _current_selection = vec;
this->_multipath->setItems(shapes);
this->update_tip(NULL);
diff --git a/src/ui/tools/select-tool.cpp b/src/ui/tools/select-tool.cpp
index 5d802d4da..86a2dbed3 100644
--- a/src/ui/tools/select-tool.cpp
+++ b/src/ui/tools/select-tool.cpp
@@ -126,20 +126,12 @@ SelectTool::~SelectTool() {
this->_describer = NULL;
if (CursorSelectDragging) {
-#if GTK_CHECK_VERSION(3,0,0)
g_object_unref(CursorSelectDragging);
-#else
- gdk_cursor_unref (CursorSelectDragging);
-#endif
CursorSelectDragging = NULL;
}
if (CursorSelectMouseover) {
-#if GTK_CHECK_VERSION(3,0,0)
g_object_unref(CursorSelectMouseover);
-#else
- gdk_cursor_unref (CursorSelectMouseover);
-#endif
CursorSelectMouseover = NULL;
}
}
@@ -475,7 +467,7 @@ bool SelectTool::root_handler(GdkEvent* event) {
case GDK_2BUTTON_PRESS:
if (event->button.button == 1) {
if (!selection->isEmpty()) {
- SPItem *clicked_item = selection->itemList()[0];
+ SPItem *clicked_item = selection->items().front();
if (dynamic_cast<SPGroup *>(clicked_item) && !dynamic_cast<SPBox3D *>(clicked_item)) { // enter group if it's not a 3D box
desktop->setCurrentLayer(clicked_item);
diff --git a/src/ui/tools/spray-tool.cpp b/src/ui/tools/spray-tool.cpp
index 3fafac2a7..3649008ff 100644
--- a/src/ui/tools/spray-tool.cpp
+++ b/src/ui/tools/spray-tool.cpp
@@ -13,6 +13,7 @@
* Jon A. Cruz <jon@joncruz.org>
* Abhishek Sharma
* Jabiertxo Arraiza <jabier.arraiza@marker.es>
+ * Adrian Boguszewski
*
* Copyright (C) 2009 authors
*
@@ -182,6 +183,7 @@ SprayTool::SprayTool()
}
SprayTool::~SprayTool() {
+ object_set.clear();
this->enableGrDrag(false);
this->style_set_connection.disconnect();
@@ -196,7 +198,7 @@ void SprayTool::update_cursor(bool /*with_shift*/) {
gchar *sel_message = NULL;
if (!desktop->selection->isEmpty()) {
- num = desktop->selection->itemList().size();
+ num = (guint) boost::distance(desktop->selection->items());
sel_message = g_strdup_printf(ngettext("<b>%i</b> object selected","<b>%i</b> objects selected",num), num);
} else {
sel_message = g_strdup_printf("%s", _("<b>Nothing</b> selected"));
@@ -577,7 +579,7 @@ static bool fit_item(SPDesktop *desktop,
if (selection->isEmpty()) {
return false;
}
- std::vector<SPItem*> const items_selected(selection->itemList());
+ std::vector<SPItem*> const items_selected(selection->items().begin(), selection->items().end());
std::vector<SPItem*> items_down_erased;
for (std::vector<SPItem*>::const_iterator i=items_down.begin(); i!=items_down.end(); ++i) {
SPItem *item_down = *i;
@@ -848,7 +850,7 @@ static bool fit_item(SPDesktop *desktop,
}
static bool sp_spray_recursive(SPDesktop *desktop,
- Inkscape::Selection *selection,
+ Inkscape::ObjectSet *set,
SPItem *item,
Geom::Point p,
Geom::Point /*vector*/,
@@ -893,7 +895,7 @@ static bool sp_spray_recursive(SPDesktop *desktop,
if (box) {
// convert 3D boxes to ordinary groups before spraying their shapes
item = box3d_convert_to_group(box);
- selection->add(item);
+ set->add(item);
}
}
@@ -982,23 +984,11 @@ static bool sp_spray_recursive(SPDesktop *desktop,
}
#ifdef ENABLE_SPRAY_MODE_SINGLE_PATH
} else if (mode == SPRAY_MODE_SINGLE_PATH) {
+ long setSize = boost::distance(set->items());
+ SPItem *parent_item = setSize > 0 ? set->items().front() : nullptr; // Initial object
+ SPItem *unionResult = setSize > 1 ? *(++set->items().begin()) : nullptr; // Previous union
+ SPItem *item_copied = nullptr; // Projected object
- SPItem *parent_item = NULL; // Initial object
- SPItem *item_copied = NULL; // Projected object
- SPItem *unionResult = NULL; // Previous union
-
- int i=1;
- std::vector<SPItem*> items=selection->itemList();
- for(std::vector<SPItem*>::const_iterator it=items.begin();it!=items.end(); ++it){
- SPItem *item1 = *it;
- if (i == 1) {
- parent_item = item1;
- }
- if (i == 2) {
- unionResult = item1;
- }
- i++;
- }
if (parent_item) {
SPDocument *doc = parent_item->document;
Inkscape::XML::Document* xml_doc = doc->getReprDoc();
@@ -1031,13 +1021,13 @@ static bool sp_spray_recursive(SPDesktop *desktop,
sp_item_move_rel(item_copied, Geom::Translate(move[Geom::X], -move[Geom::Y]));
// Union and duplication
- selection->clear();
- selection->add(item_copied);
+ set->clear();
+ set->add(item_copied);
if (unionResult) { // No need to add the very first item (initialized with NULL).
- selection->add(unionResult);
+ set->add(unionResult);
}
- sp_selected_path_union_skip_undo(selection, selection->desktop());
- selection->add(parent_item);
+ sp_selected_path_union_skip_undo(set);
+ set->add(parent_item);
Inkscape::GC::release(copy);
did = true;
}
@@ -1132,9 +1122,8 @@ static bool sp_spray_recursive(SPDesktop *desktop,
static bool sp_spray_dilate(SprayTool *tc, Geom::Point /*event_p*/, Geom::Point p, Geom::Point vector, bool reverse)
{
SPDesktop *desktop = tc->desktop;
- Inkscape::Selection *selection = desktop->getSelection();
-
- if (selection->isEmpty()) {
+ Inkscape::ObjectSet *set = tc->objectSet();
+ if (set->isEmpty()) {
return false;
}
@@ -1156,7 +1145,7 @@ static bool sp_spray_dilate(SprayTool *tc, Geom::Point /*event_p*/, Geom::Point
double move_standard_deviation = get_move_standard_deviation(tc);
{
- std::vector<SPItem*> const items(selection->itemList());
+ std::vector<SPItem*> const items(set->items().begin(), set->items().end());
for(std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end(); ++i){
SPItem *item = *i;
@@ -1168,7 +1157,7 @@ static bool sp_spray_dilate(SprayTool *tc, Geom::Point /*event_p*/, Geom::Point
SPItem *item = *i;
g_assert(item != NULL);
if (sp_spray_recursive(desktop
- , selection
+ , set
, item
, p, vector
, tc->mode
@@ -1262,6 +1251,11 @@ bool SprayTool::root_handler(GdkEvent* event) {
this->is_dilating = true;
this->has_dilated = false;
+ object_set = *desktop->getSelection();
+ if (mode == SPRAY_MODE_SINGLE_PATH) {
+ desktop->getSelection()->clear();
+ }
+
if(this->is_dilating && event->button.button == 1 && !this->space_panning) {
sp_spray_dilate(this, motion_w, desktop->dt2doc(motion_dt), Geom::Point(0,0), MOD__SHIFT(event));
}
@@ -1285,7 +1279,7 @@ bool SprayTool::root_handler(GdkEvent* event) {
guint num = 0;
if (!desktop->selection->isEmpty()) {
- num = desktop->selection->itemList().size();
+ num = (guint) boost::distance(desktop->selection->items());
}
if (num == 0) {
this->message_context->flash(Inkscape::ERROR_MESSAGE, _("<b>Nothing selected!</b> Select objects to spray."));
@@ -1370,6 +1364,8 @@ bool SprayTool::root_handler(GdkEvent* event) {
SP_VERB_CONTEXT_SPRAY, _("Spray with clones"));
break;
case SPRAY_MODE_SINGLE_PATH:
+ sp_selected_path_union_skip_undo(objectSet());
+ desktop->getSelection()->add(object_set.objects().begin(), object_set.objects().end());
DocumentUndo::done(this->desktop->getDocument(),
SP_VERB_CONTEXT_SPRAY, _("Spray in single path"));
break;
diff --git a/src/ui/tools/spray-tool.h b/src/ui/tools/spray-tool.h
index c81110b37..d5504d565 100644
--- a/src/ui/tools/spray-tool.h
+++ b/src/ui/tools/spray-tool.h
@@ -13,6 +13,7 @@
* Vincent MONTAGNE
* Pierre BARBRY-BLOT
* Jabiertxo ARRAIZA
+ * Adrian Boguszewski
*
* Copyright (C) 2009 authors
*
@@ -120,8 +121,14 @@ public:
virtual const std::string& getPrefsPath();
-
void update_cursor(bool /*with_shift*/);
+
+ ObjectSet* objectSet() {
+ return &object_set;
+ }
+
+private:
+ ObjectSet object_set;
};
}
diff --git a/src/ui/tools/tool-base.cpp b/src/ui/tools/tool-base.cpp
index 735f5bd42..8a35882b9 100644
--- a/src/ui/tools/tool-base.cpp
+++ b/src/ui/tools/tool-base.cpp
@@ -110,11 +110,7 @@ ToolBase::~ToolBase() {
}
if (this->cursor != NULL) {
-#if GTK_CHECK_VERSION(3,0,0)
g_object_unref(this->cursor);
-#else
- gdk_cursor_unref(this->cursor);
-#endif
this->cursor = NULL;
}
@@ -141,16 +137,10 @@ void ToolBase::sp_event_context_set_cursor(GdkCursorType cursor_type) {
GdkDisplay *display = gdk_display_get_default();
GdkCursor *cursor = gdk_cursor_new_for_display(display, cursor_type);
-#if WITH_GTKMM_3_0
if (cursor) {
gdk_window_set_cursor (gtk_widget_get_window (w), cursor);
g_object_unref (cursor);
}
-#else
- gdk_window_set_cursor (gtk_widget_get_window (w), cursor);
- gdk_cursor_unref (cursor);
-#endif
-
}
/**
@@ -180,11 +170,7 @@ void ToolBase::sp_event_context_update_cursor() {
);
if (pixbuf != NULL) {
if (this->cursor) {
-#if GTK_CHECK_VERSION(3,0,0)
g_object_unref(this->cursor);
-#else
- gdk_cursor_unref(this->cursor);
-#endif
}
this->cursor = gdk_cursor_new_from_pixbuf(display, pixbuf, this->hot_x, this->hot_y);
g_object_unref(pixbuf);
@@ -194,11 +180,7 @@ void ToolBase::sp_event_context_update_cursor() {
if (pixbuf) {
if (this->cursor) {
-#if GTK_CHECK_VERSION(3,0,0)
g_object_unref(this->cursor);
-#else
- gdk_cursor_unref(this->cursor);
-#endif
}
this->cursor = gdk_cursor_new_from_pixbuf(display,
pixbuf, this->hot_x, this->hot_y);
@@ -769,11 +751,9 @@ bool ToolBase::root_handler(GdkEvent* event) {
int const wheel_scroll = prefs->getIntLimited(
"/options/wheelscroll/value", 40, 0, 1000);
-#if GTK_CHECK_VERSION(3,0,0)
// Size of smooth-scrolls (only used in GTK+ 3)
gdouble delta_x = 0;
gdouble delta_y = 0;
-#endif
/* shift + wheel, pan left--right */
if (event->scroll.state & GDK_SHIFT_MASK) {
@@ -834,12 +814,10 @@ bool ToolBase::root_handler(GdkEvent* event) {
desktop->scroll_world(-wheel_scroll, 0);
break;
-#if GTK_CHECK_VERSION(3,0,0)
case GDK_SCROLL_SMOOTH:
gdk_event_get_scroll_deltas(event, &delta_x, &delta_y);
desktop->scroll_world(delta_x, delta_y);
break;
-#endif
}
}
break;
@@ -1073,9 +1051,8 @@ void sp_event_root_menu_popup(SPDesktop *desktop, SPItem *item, GdkEvent *event)
item = sp_event_context_find_item (desktop,
Geom::Point(event->button.x, event->button.y), FALSE, FALSE);
- /* fixme: This is not what I want but works for now (Lauris) */
- if (event->type == GDK_KEY_PRESS) {
- item = desktop->getSelection()->itemList().front();
+ if (event->type == GDK_KEY_PRESS && !desktop->getSelection()->isEmpty()) {
+ item = desktop->getSelection()->items().front();
}
ContextMenu* CM = new ContextMenu(desktop, item);
@@ -1149,8 +1126,9 @@ SPItem *sp_event_context_find_item(SPDesktop *desktop, Geom::Point const &p,
SPItem *item = 0;
if (select_under) {
- SPItem *selected_at_point = desktop->getItemFromListAtPointBottom(
- desktop->selection->itemList(), p);
+ auto tmp = desktop->selection->items();
+ std::vector<SPItem *> vec(tmp.begin(), tmp.end());
+ SPItem *selected_at_point = desktop->getItemFromListAtPointBottom(vec, p);
item = desktop->getItemAtPoint(p, into_groups, selected_at_point);
if (item == NULL) { // we may have reached bottom, flip over to the top
item = desktop->getItemAtPoint(p, into_groups, NULL);
diff --git a/src/ui/tools/tweak-tool.cpp b/src/ui/tools/tweak-tool.cpp
index fbf1b2a0b..a0394ecd4 100644
--- a/src/ui/tools/tweak-tool.cpp
+++ b/src/ui/tools/tweak-tool.cpp
@@ -141,7 +141,7 @@ void TweakTool::update_cursor (bool with_shift) {
gchar *sel_message = NULL;
if (!desktop->selection->isEmpty()) {
- num = desktop->selection->itemList().size();
+ num = (guint) boost::distance(desktop->selection->items());
sel_message = g_strdup_printf(ngettext("<b>%i</b> object selected","<b>%i</b> objects selected",num), num);
} else {
sel_message = g_strdup_printf("%s", _("<b>Nothing</b> selected"));
@@ -373,9 +373,9 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, Geom::P
if (dynamic_cast<SPGroup *>(item) && !dynamic_cast<SPBox3D *>(item)) {
GSList *children = NULL;
- for (SPObject *child = item->firstChild() ; child; child = child->getNext() ) {
- if (dynamic_cast<SPItem *>(static_cast<SPObject *>(child))) {
- children = g_slist_prepend(children, child);
+ for (auto& child: item->children) {
+ if (dynamic_cast<SPItem *>(static_cast<SPObject *>(&child))) {
+ children = g_slist_prepend(children, &child);
}
}
@@ -820,8 +820,8 @@ static void tweak_colors_in_gradient(SPItem *item, Inkscape::PaintTarget fill_or
double offset_l = 0;
double offset_h = 0;
SPObject *child_prev = NULL;
- for (SPObject *child = vector->firstChild(); child; child = child->getNext()) {
- SPStop *stop = dynamic_cast<SPStop *>(child);
+ for (auto& child: vector->children) {
+ SPStop *stop = dynamic_cast<SPStop *>(&child);
if (!stop) {
continue;
}
@@ -866,7 +866,7 @@ static void tweak_colors_in_gradient(SPItem *item, Inkscape::PaintTarget fill_or
}
offset_l = offset_h;
- child_prev = child;
+ child_prev = &child;
}
}
@@ -882,8 +882,8 @@ sp_tweak_color_recursive (guint mode, SPItem *item, SPItem *item_at_point,
bool did = false;
if (dynamic_cast<SPGroup *>(item)) {
- for (SPObject *child = item->firstChild() ; child; child = child->getNext() ) {
- SPItem *childItem = dynamic_cast<SPItem *>(child);
+ for (auto& child: item->children) {
+ SPItem *childItem = dynamic_cast<SPItem *>(&child);
if (childItem) {
if (sp_tweak_color_recursive (mode, childItem, item_at_point,
fill_goal, do_fill,
@@ -939,9 +939,8 @@ sp_tweak_color_recursive (guint mode, SPItem *item, SPItem *item_at_point,
Geom::Affine i2dt = item->i2dt_affine ();
if (style->filter.set && style->getFilter()) {
//cycle through filter primitives
- SPObject *primitive_obj = style->getFilter()->children;
- while (primitive_obj) {
- SPFilterPrimitive *primitive = dynamic_cast<SPFilterPrimitive *>(primitive_obj);
+ for (auto& primitive_obj: style->getFilter()->children) {
+ SPFilterPrimitive *primitive = dynamic_cast<SPFilterPrimitive *>(&primitive_obj);
if (primitive) {
//if primitive is gaussianblur
SPGaussianBlur * spblur = dynamic_cast<SPGaussianBlur *>(primitive);
@@ -950,7 +949,6 @@ sp_tweak_color_recursive (guint mode, SPItem *item, SPItem *item_at_point,
blur_now += num * i2dt.descrim(); // sum all blurs in the filter
}
}
- primitive_obj = primitive_obj->next;
}
}
double perimeter = bbox->dimensions()[Geom::X] + bbox->dimensions()[Geom::Y];
@@ -1064,8 +1062,8 @@ sp_tweak_dilate (TweakTool *tc, Geom::Point event_p, Geom::Point p, Geom::Point
double move_force = get_move_force(tc);
double color_force = MIN(sqrt(path_force)/20.0, 1);
- std::vector<SPItem*> items=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end(); ++i){
+ auto items= selection->items();
+ for(auto i=items.begin();i!=items.end(); ++i){
SPItem *item = *i;
if (is_color_mode (tc->mode)) {
@@ -1173,7 +1171,7 @@ bool TweakTool::root_handler(GdkEvent* event) {
guint num = 0;
if (!desktop->selection->isEmpty()) {
- num = desktop->selection->itemList().size();
+ num = (guint) boost::distance(desktop->selection->items());
}
if (num == 0) {
this->message_context->flash(Inkscape::ERROR_MESSAGE, _("<b>Nothing selected!</b> Select objects to tweak."));
diff --git a/src/ui/view/Makefile_insert b/src/ui/view/Makefile_insert
deleted file mode 100644
index b3ab598d4..000000000
--- a/src/ui/view/Makefile_insert
+++ /dev/null
@@ -1,9 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-ink_common_sources += \
- ui/view/edit-widget-interface.h \
- ui/view/view.h \
- ui/view/view.cpp \
- ui/view/view-widget.cpp \
- ui/view/view-widget.h
-
diff --git a/src/ui/widget/Makefile_insert b/src/ui/widget/Makefile_insert
deleted file mode 100644
index eb98e6872..000000000
--- a/src/ui/widget/Makefile_insert
+++ /dev/null
@@ -1,110 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-ink_common_sources += \
- ui/widget/anchor-selector.h \
- ui/widget/anchor-selector.cpp \
- ui/widget/attr-widget.h \
- ui/widget/button.h \
- ui/widget/button.cpp \
- ui/widget/color-entry.cpp \
- ui/widget/color-entry.h \
- ui/widget/color-icc-selector.cpp \
- ui/widget/color-icc-selector.h \
- ui/widget/color-notebook.cpp \
- ui/widget/color-notebook.h \
- ui/widget/color-wheel-selector.cpp \
- ui/widget/color-wheel-selector.h \
- ui/widget/color-picker.cpp \
- ui/widget/color-picker.h \
- ui/widget/color-preview.cpp \
- ui/widget/color-preview.h \
- ui/widget/color-slider.cpp \
- ui/widget/color-slider.h \
- ui/widget/color-scales.cpp \
- ui/widget/color-scales.h \
- ui/widget/combo-enums.h \
- ui/widget/dock.h \
- ui/widget/dock.cpp \
- ui/widget/dock-item.h \
- ui/widget/dock-item.cpp \
- ui/widget/entity-entry.cpp \
- ui/widget/entity-entry.h \
- ui/widget/entry.cpp \
- ui/widget/entry.h \
- ui/widget/filter-effect-chooser.h \
- ui/widget/filter-effect-chooser.cpp \
- ui/widget/font-variants.h \
- ui/widget/font-variants.cpp \
- ui/widget/gimpspinscale.c \
- ui/widget/gimpspinscale.h \
- ui/widget/gimpcolorwheel.c \
- ui/widget/gimpcolorwheel.h \
- ui/widget/frame.cpp \
- ui/widget/frame.h \
- ui/widget/imageicon.cpp \
- ui/widget/imageicon.h \
- ui/widget/imagetoggler.cpp \
- ui/widget/imagetoggler.h \
- ui/widget/labelled.cpp \
- ui/widget/labelled.h \
- ui/widget/layer-selector.cpp \
- ui/widget/layer-selector.h \
- ui/widget/licensor.cpp \
- ui/widget/licensor.h \
- ui/widget/notebook-page.cpp \
- ui/widget/notebook-page.h \
- ui/widget/object-composite-settings.cpp \
- ui/widget/object-composite-settings.h \
- ui/widget/page-sizer.cpp \
- ui/widget/page-sizer.h \
- ui/widget/panel.cpp \
- ui/widget/panel.h \
- ui/widget/point.cpp \
- ui/widget/point.h \
- ui/widget/preferences-widget.cpp \
- ui/widget/preferences-widget.h \
- ui/widget/random.cpp \
- ui/widget/random.h \
- ui/widget/registered-widget.cpp \
- ui/widget/registered-widget.h \
- ui/widget/registered-enums.h \
- ui/widget/registry.cpp \
- ui/widget/registry.h \
- ui/widget/rendering-options.cpp \
- ui/widget/rendering-options.h \
- ui/widget/rotateable.h \
- ui/widget/rotateable.cpp \
- ui/widget/scalar-unit.cpp \
- ui/widget/scalar-unit.h \
- ui/widget/scalar.cpp \
- ui/widget/scalar.h \
- ui/widget/selected-style.h \
- ui/widget/selected-style.cpp \
- ui/widget/spinbutton.h \
- ui/widget/spinbutton.cpp \
- ui/widget/spin-scale.h \
- ui/widget/spin-scale.cpp \
- ui/widget/spin-slider.h \
- ui/widget/spin-slider.cpp \
- ui/widget/style-subject.h \
- ui/widget/style-subject.cpp \
- ui/widget/style-swatch.h \
- ui/widget/style-swatch.cpp \
- ui/widget/text.cpp \
- ui/widget/text.h \
- ui/widget/tolerance-slider.cpp \
- ui/widget/tolerance-slider.h \
- ui/widget/unit-menu.cpp \
- ui/widget/unit-menu.h \
- ui/widget/unit-tracker.h \
- ui/widget/unit-tracker.cpp \
- ui/widget/clipmaskicon.cpp \
- ui/widget/clipmaskicon.h \
- ui/widget/highlight-picker.cpp \
- ui/widget/highlight-picker.h \
- ui/widget/layertypeicon.cpp \
- ui/widget/layertypeicon.h \
- ui/widget/insertordericon.cpp \
- ui/widget/insertordericon.h \
- ui/widget/addtoicon.cpp \
- ui/widget/addtoicon.h
diff --git a/src/ui/widget/addtoicon.cpp b/src/ui/widget/addtoicon.cpp
index 465423fc2..70516ed00 100644
--- a/src/ui/widget/addtoicon.cpp
+++ b/src/ui/widget/addtoicon.cpp
@@ -49,8 +49,6 @@ AddToIcon::AddToIcon() :
set_pixbuf();
}
-
-#if WITH_GTKMM_3_0
void AddToIcon::get_preferred_height_vfunc(Gtk::Widget& widget,
int& min_h,
int& nat_h) const
@@ -80,47 +78,16 @@ void AddToIcon::get_preferred_width_vfunc(Gtk::Widget& widget,
nat_w += (nat_w) >> 1;
}
}
-#else
-void AddToIcon::get_size_vfunc(Gtk::Widget& widget,
- const Gdk::Rectangle* cell_area,
- int* x_offset,
- int* y_offset,
- int* width,
- int* height ) const
-{
- Gtk::CellRendererPixbuf::get_size_vfunc( widget, cell_area, x_offset, y_offset, width, height );
-
- if ( width ) {
- *width = phys;//+= (*width) >> 1;
- }
- if ( height ) {
- *height =phys;//+= (*height) >> 1;
- }
-}
-#endif
-#if WITH_GTKMM_3_0
void AddToIcon::render_vfunc( const Cairo::RefPtr<Cairo::Context>& cr,
Gtk::Widget& widget,
const Gdk::Rectangle& background_area,
const Gdk::Rectangle& cell_area,
Gtk::CellRendererState flags )
-#else
-void AddToIcon::render_vfunc( const Glib::RefPtr<Gdk::Drawable>& window,
- Gtk::Widget& widget,
- const Gdk::Rectangle& background_area,
- const Gdk::Rectangle& cell_area,
- const Gdk::Rectangle& expose_area,
- Gtk::CellRendererState flags )
-#endif
{
set_pixbuf();
-#if WITH_GTKMM_3_0
Gtk::CellRendererPixbuf::render_vfunc( cr, widget, background_area, cell_area, flags );
-#else
- Gtk::CellRendererPixbuf::render_vfunc( window, widget, background_area, cell_area, expose_area, flags );
-#endif
}
bool AddToIcon::activate_vfunc(GdkEvent* /*event*/,
diff --git a/src/ui/widget/addtoicon.h b/src/ui/widget/addtoicon.h
index a8d900d1f..3b2228754 100644
--- a/src/ui/widget/addtoicon.h
+++ b/src/ui/widget/addtoicon.h
@@ -31,8 +31,6 @@ public:
Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > property_pixbuf_off();
protected:
-
-#if WITH_GTKMM_3_0
virtual void render_vfunc( const Cairo::RefPtr<Cairo::Context>& cr,
Gtk::Widget& widget,
const Gdk::Rectangle& background_area,
@@ -46,18 +44,6 @@ protected:
virtual void get_preferred_height_vfunc(Gtk::Widget& widget,
int& min_h,
int& nat_h) const;
-#else
- virtual void render_vfunc( const Glib::RefPtr<Gdk::Drawable>& window,
- Gtk::Widget& widget,
- const Gdk::Rectangle& background_area,
- const Gdk::Rectangle& cell_area,
- const Gdk::Rectangle& expose_area,
- Gtk::CellRendererState flags );
-
- virtual void get_size_vfunc( Gtk::Widget &widget,
- Gdk::Rectangle const *cell_area,
- int *x_offset, int *y_offset, int *width, int *height ) const;
-#endif
virtual bool activate_vfunc(GdkEvent *event,
Gtk::Widget &widget,
diff --git a/src/ui/widget/anchor-selector.cpp b/src/ui/widget/anchor-selector.cpp
index acf8aff79..087e7375e 100644
--- a/src/ui/widget/anchor-selector.cpp
+++ b/src/ui/widget/anchor-selector.cpp
@@ -27,11 +27,7 @@ void AnchorSelector::setupButton(const Glib::ustring& icon, Gtk::ToggleButton& b
AnchorSelector::AnchorSelector()
: Gtk::Alignment(0.5, 0, 0, 0),
-#if WITH_GTKMM_3_0
_container()
-#else
- _container(3, 3, true)
-#endif
{
setupButton(INKSCAPE_ICON("boundingbox_top_left"), _buttons[0]);
setupButton(INKSCAPE_ICON("boundingbox_top"), _buttons[1]);
@@ -43,20 +39,14 @@ AnchorSelector::AnchorSelector()
setupButton(INKSCAPE_ICON("boundingbox_bottom"), _buttons[7]);
setupButton(INKSCAPE_ICON("boundingbox_bottom_right"), _buttons[8]);
-#if WITH_GTKMM_3_0
_container.set_row_homogeneous();
_container.set_column_homogeneous(true);
-#endif
for(int i = 0; i < 9; ++i) {
_buttons[i].signal_clicked().connect(
sigc::bind(sigc::mem_fun(*this, &AnchorSelector::btn_activated), i));
-#if WITH_GTKMM_3_0
_container.attach(_buttons[i], i % 3, i / 3, 1, 1);
-#else
- _container.attach(_buttons[i], i % 3, i % 3+1, i / 3, i / 3+1, Gtk::FILL, Gtk::FILL);
-#endif
}
_selection = 4;
_buttons[4].set_active();
diff --git a/src/ui/widget/anchor-selector.h b/src/ui/widget/anchor-selector.h
index 0a702d296..96331fae3 100644
--- a/src/ui/widget/anchor-selector.h
+++ b/src/ui/widget/anchor-selector.h
@@ -16,12 +16,7 @@
#include <gtkmm/alignment.h>
#include <gtkmm/togglebutton.h>
-
-#if WITH_GTKMM_3_0
- #include <gtkmm/grid.h>
-#else
- #include <gtkmm/table.h>
-#endif
+#include <gtkmm/grid.h>
namespace Inkscape {
namespace UI {
@@ -32,12 +27,7 @@ class AnchorSelector : public Gtk::Alignment
private:
Gtk::ToggleButton _buttons[9];
int _selection;
-
-#if WITH_GTKMM_3_0
Gtk::Grid _container;
-#else
- Gtk::Table _container;
-#endif
sigc::signal<void> _selectionChanged;
diff --git a/src/ui/widget/clipmaskicon.cpp b/src/ui/widget/clipmaskicon.cpp
index 8715fdede..4f791042a 100644
--- a/src/ui/widget/clipmaskicon.cpp
+++ b/src/ui/widget/clipmaskicon.cpp
@@ -63,8 +63,6 @@ ClipMaskIcon::ClipMaskIcon() :
property_pixbuf() = Glib::RefPtr<Gdk::Pixbuf>(0);
}
-
-#if WITH_GTKMM_3_0
void ClipMaskIcon::get_preferred_height_vfunc(Gtk::Widget& widget,
int& min_h,
int& nat_h) const
@@ -94,39 +92,12 @@ void ClipMaskIcon::get_preferred_width_vfunc(Gtk::Widget& widget,
nat_w += (nat_w) >> 1;
}
}
-#else
-void ClipMaskIcon::get_size_vfunc(Gtk::Widget& widget,
- const Gdk::Rectangle* cell_area,
- int* x_offset,
- int* y_offset,
- int* width,
- int* height ) const
-{
- Gtk::CellRendererPixbuf::get_size_vfunc( widget, cell_area, x_offset, y_offset, width, height );
-
- if ( width ) {
- *width = phys;//+= (*width) >> 1;
- }
- if ( height ) {
- *height =phys;//+= (*height) >> 1;
- }
-}
-#endif
-#if WITH_GTKMM_3_0
void ClipMaskIcon::render_vfunc( const Cairo::RefPtr<Cairo::Context>& cr,
Gtk::Widget& widget,
const Gdk::Rectangle& background_area,
const Gdk::Rectangle& cell_area,
Gtk::CellRendererState flags )
-#else
-void ClipMaskIcon::render_vfunc( const Glib::RefPtr<Gdk::Drawable>& window,
- Gtk::Widget& widget,
- const Gdk::Rectangle& background_area,
- const Gdk::Rectangle& cell_area,
- const Gdk::Rectangle& expose_area,
- Gtk::CellRendererState flags )
-#endif
{
switch (_property_active.get_value())
{
@@ -143,11 +114,7 @@ void ClipMaskIcon::render_vfunc( const Glib::RefPtr<Gdk::Drawable>& window,
property_pixbuf() = Glib::RefPtr<Gdk::Pixbuf>(0);
break;
}
-#if WITH_GTKMM_3_0
Gtk::CellRendererPixbuf::render_vfunc( cr, widget, background_area, cell_area, flags );
-#else
- Gtk::CellRendererPixbuf::render_vfunc( window, widget, background_area, cell_area, expose_area, flags );
-#endif
}
bool ClipMaskIcon::activate_vfunc(GdkEvent* /*event*/,
diff --git a/src/ui/widget/clipmaskicon.h b/src/ui/widget/clipmaskicon.h
index eca852a83..0d149edb8 100644
--- a/src/ui/widget/clipmaskicon.h
+++ b/src/ui/widget/clipmaskicon.h
@@ -32,7 +32,6 @@ public:
protected:
-#if WITH_GTKMM_3_0
virtual void render_vfunc( const Cairo::RefPtr<Cairo::Context>& cr,
Gtk::Widget& widget,
const Gdk::Rectangle& background_area,
@@ -46,18 +45,6 @@ protected:
virtual void get_preferred_height_vfunc(Gtk::Widget& widget,
int& min_h,
int& nat_h) const;
-#else
- virtual void render_vfunc( const Glib::RefPtr<Gdk::Drawable>& window,
- Gtk::Widget& widget,
- const Gdk::Rectangle& background_area,
- const Gdk::Rectangle& cell_area,
- const Gdk::Rectangle& expose_area,
- Gtk::CellRendererState flags );
-
- virtual void get_size_vfunc( Gtk::Widget &widget,
- Gdk::Rectangle const *cell_area,
- int *x_offset, int *y_offset, int *width, int *height ) const;
-#endif
virtual bool activate_vfunc(GdkEvent *event,
Gtk::Widget &widget,
diff --git a/src/ui/widget/color-icc-selector.cpp b/src/ui/widget/color-icc-selector.cpp
index 52c6ed2e3..616e9afa8 100644
--- a/src/ui/widget/color-icc-selector.cpp
+++ b/src/ui/widget/color-icc-selector.cpp
@@ -5,7 +5,6 @@
#include <gtkmm/adjustment.h>
#include <glibmm/i18n.h>
-#include <gtk/gtk.h>
#include <set>
#include "ui/dialog-events.h"
@@ -84,7 +83,6 @@ GtkAttachOptions operator|(GtkAttachOptions lhs, GtkAttachOptions rhs)
void attachToGridOrTable(GtkWidget *parent, GtkWidget *child, guint left, guint top, guint width, guint height,
bool hexpand = false, bool centered = false, guint xpadding = XPAD, guint ypadding = YPAD)
{
-#if GTK_CHECK_VERSION(3, 0, 0)
#if GTK_CHECK_VERSION(3, 12, 0)
gtk_widget_set_margin_start(child, xpadding);
gtk_widget_set_margin_end(child, xpadding);
@@ -103,14 +101,6 @@ void attachToGridOrTable(GtkWidget *parent, GtkWidget *child, guint left, guint
gtk_widget_set_valign(child, GTK_ALIGN_CENTER);
}
gtk_grid_attach(GTK_GRID(parent), child, left, top, width, height);
-#else
- GtkAttachOptions xoptions =
- centered ? static_cast<GtkAttachOptions>(0) : hexpand ? (GTK_EXPAND | GTK_FILL) : GTK_FILL;
- GtkAttachOptions yoptions = centered ? static_cast<GtkAttachOptions>(0) : GTK_FILL;
-
- gtk_table_attach(GTK_TABLE(parent), child, left, left + width, top, top + height, xoptions, yoptions, xpadding,
- ypadding);
-#endif
}
} // namespace
@@ -428,12 +418,7 @@ void ColorICCSelector::init()
_impl->_compUI[i]._label = gtk_label_new_with_mnemonic(labelStr.c_str());
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_halign(_impl->_compUI[i]._label, GTK_ALIGN_END);
-#else
- gtk_misc_set_alignment(GTK_MISC(_impl->_compUI[i]._label), 1.0, 0.5);
-#endif
-
gtk_widget_show(_impl->_compUI[i]._label);
gtk_widget_set_no_show_all(_impl->_compUI[i]._label, TRUE);
@@ -492,12 +477,7 @@ void ColorICCSelector::init()
// Label
_impl->_label = gtk_label_new_with_mnemonic(_("_A:"));
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_halign(_impl->_label, GTK_ALIGN_END);
-#else
- gtk_misc_set_alignment(GTK_MISC(_impl->_label), 1.0, 0.5);
-#endif
-
gtk_widget_show(_impl->_label);
attachToGridOrTable(t, _impl->_label, 0, row, 1, 1);
@@ -724,11 +704,7 @@ void ColorICCSelectorImpl::_profilesChanged(std::string const & /*name*/) {}
void ColorICCSelector::on_show()
{
-#if GTK_CHECK_VERSION(3, 0, 0)
Gtk::Grid::on_show();
-#else
- Gtk::Table::on_show();
-#endif
_colorChanged();
}
diff --git a/src/ui/widget/color-icc-selector.h b/src/ui/widget/color-icc-selector.h
index 1bcb0a540..aaa8372b8 100644
--- a/src/ui/widget/color-icc-selector.h
+++ b/src/ui/widget/color-icc-selector.h
@@ -6,11 +6,7 @@
#endif
#include <gtkmm/widget.h>
-#if WITH_GTKMM_3_0
#include <gtkmm/grid.h>
-#else
-#include <gtkmm/table.h>
-#endif
#include "ui/selected-color.h"
@@ -24,11 +20,7 @@ namespace Widget {
class ColorICCSelectorImpl;
class ColorICCSelector
-#if GTK_CHECK_VERSION(3, 0, 0)
: public Gtk::Grid
-#else
- : public Gtk::Table
-#endif
{
public:
static const gchar *MODE_NAME;
diff --git a/src/ui/widget/color-notebook.cpp b/src/ui/widget/color-notebook.cpp
index 6634d8dad..33e22b59d 100644
--- a/src/ui/widget/color-notebook.cpp
+++ b/src/ui/widget/color-notebook.cpp
@@ -52,13 +52,8 @@ namespace Widget {
ColorNotebook::ColorNotebook(SelectedColor &color)
-#if GTK_CHECK_VERSION(3, 0, 0)
: Gtk::Grid()
-#else
- : Gtk::Table(2, 3, false)
-#endif
, _selected_color(color)
-
{
Page *page;
@@ -106,12 +101,8 @@ void ColorNotebook::_initUI()
notebook->set_show_tabs(false);
_book = GTK_WIDGET(notebook->gobj());
-#if GTK_CHECK_VERSION(3, 0, 0)
_buttonbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
gtk_box_set_homogeneous(GTK_BOX(_buttonbox), TRUE);
-#else
- _buttonbox = gtk_hbox_new(TRUE, 2);
-#endif
gtk_widget_show(_buttonbox);
_buttons = new GtkWidget *[_available_pages.size()];
@@ -122,7 +113,6 @@ void ColorNotebook::_initUI()
sp_set_font_size_smaller(_buttonbox);
-#if GTK_CHECK_VERSION(3, 0, 0)
#if GTK_CHECK_VERSION(3, 12, 0)
gtk_widget_set_margin_start(_buttonbox, XPAD);
gtk_widget_set_margin_end(_buttonbox, XPAD);
@@ -135,14 +125,9 @@ void ColorNotebook::_initUI()
gtk_widget_set_hexpand(_buttonbox, TRUE);
gtk_widget_set_valign(_buttonbox, GTK_ALIGN_CENTER);
attach(*Glib::wrap(_buttonbox), 0, row, 2, 1);
-#else
- attach(*Glib::wrap(_buttonbox), 0, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, static_cast<Gtk::AttachOptions>(0),
- XPAD, YPAD);
-#endif
row++;
-#if GTK_CHECK_VERSION(3, 0, 0)
#if GTK_CHECK_VERSION(3, 12, 0)
gtk_widget_set_margin_start(_book, XPAD * 2);
gtk_widget_set_margin_end(_book, XPAD * 2);
@@ -155,20 +140,13 @@ void ColorNotebook::_initUI()
gtk_widget_set_hexpand(_book, TRUE);
gtk_widget_set_vexpand(_book, TRUE);
attach(*notebook, 0, row, 2, 1);
-#else
- attach(*notebook, 0, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::EXPAND | Gtk::FILL, XPAD * 2, YPAD);
-#endif
// restore the last active page
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
_setCurrentPage(prefs->getInt("/colorselector/page", 0));
row++;
-#if GTK_CHECK_VERSION(3, 0, 0)
GtkWidget *rgbabox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
-#else
- GtkWidget *rgbabox = gtk_hbox_new(FALSE, 0);
-#endif
#if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
/* Create color management icons */
@@ -206,11 +184,7 @@ void ColorNotebook::_initUI()
/* Create RGBA entry and color preview */
_rgbal = gtk_label_new_with_mnemonic(_("RGBA_:"));
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_halign(_rgbal, GTK_ALIGN_END);
-#else
- gtk_misc_set_alignment(GTK_MISC(_rgbal), 1.0, 0.5);
-#endif
gtk_box_pack_start(GTK_BOX(rgbabox), _rgbal, TRUE, TRUE, 2);
ColorEntry *rgba_entry = Gtk::manage(new ColorEntry(_selected_color));
@@ -226,7 +200,6 @@ void ColorNotebook::_initUI()
gtk_widget_hide(GTK_WIDGET(_box_toomuchink));
#endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
-#if GTK_CHECK_VERSION(3, 0, 0)
#if GTK_CHECK_VERSION(3, 12, 0)
gtk_widget_set_margin_start(rgbabox, XPAD);
gtk_widget_set_margin_end(rgbabox, XPAD);
@@ -237,9 +210,6 @@ void ColorNotebook::_initUI()
gtk_widget_set_margin_top(rgbabox, YPAD);
gtk_widget_set_margin_bottom(rgbabox, YPAD);
attach(*Glib::wrap(rgbabox), 0, row, 2, 1);
-#else
- attach(*Glib::wrap(rgbabox), 0, 2, row, row + 1, Gtk::FILL, Gtk::SHRINK, XPAD, YPAD);
-#endif
#ifdef SPCS_PREVIEW
_p = sp_color_preview_new(0xffffffff);
diff --git a/src/ui/widget/color-notebook.h b/src/ui/widget/color-notebook.h
index d28028c72..0948e3d46 100644
--- a/src/ui/widget/color-notebook.h
+++ b/src/ui/widget/color-notebook.h
@@ -19,12 +19,7 @@
#endif
#include <boost/ptr_container/ptr_vector.hpp>
-#if WITH_GTKMM_3_0
#include <gtkmm/grid.h>
-#else
-#include <gtkmm/table.h>
-#endif
-#include <gtk/gtk.h>
#include <glib.h>
#include "color.h"
@@ -35,11 +30,7 @@ namespace UI {
namespace Widget {
class ColorNotebook
-#if GTK_CHECK_VERSION(3, 0, 0)
: public Gtk::Grid
-#else
- : public Gtk::Table
-#endif
{
public:
ColorNotebook(SelectedColor &color);
diff --git a/src/ui/widget/color-picker.cpp b/src/ui/widget/color-picker.cpp
index a66fbfc9c..5a62c3c98 100644
--- a/src/ui/widget/color-picker.cpp
+++ b/src/ui/widget/color-picker.cpp
@@ -59,13 +59,8 @@ void ColorPicker::setupDialog(const Glib::ustring &title)
_color_selector = Gtk::manage(new ColorNotebook(_selected_color));
-#if WITH_GTKMM_3_0
_colorSelectorDialog.get_content_area()->pack_start (
*_color_selector, true, true, 0);
-#else
- _colorSelectorDialog.get_vbox()->pack_start (
- *_color_selector, true, true, 0);
-#endif
_color_selector->show();
}
diff --git a/src/ui/widget/color-preview.cpp b/src/ui/widget/color-preview.cpp
index 62c7cca1d..c9b6e56d2 100644
--- a/src/ui/widget/color-preview.cpp
+++ b/src/ui/widget/color-preview.cpp
@@ -34,7 +34,6 @@ ColorPreview::on_size_allocate (Gtk::Allocation &all)
queue_draw();
}
-#if WITH_GTKMM_3_0
void
ColorPreview::get_preferred_height_vfunc(int& minimum_height, int& natural_height) const
{
@@ -58,31 +57,6 @@ ColorPreview::get_preferred_width_for_height_vfunc(int /* height */, int& minimu
{
minimum_width = natural_width = SPCP_DEFAULT_WIDTH;
}
-#else
-void
-ColorPreview::on_size_request (Gtk::Requisition *req)
-{
- req->width = SPCP_DEFAULT_WIDTH;
- req->height = SPCP_DEFAULT_HEIGHT;
-}
-
-bool
-ColorPreview::on_expose_event (GdkEventExpose *event)
-{
- bool result = true;
-
- if (get_is_drawable())
- {
- Cairo::RefPtr<Cairo::Context> cr = get_window()->create_cairo_context();
- cr->rectangle(event->area.x, event->area.y,
- event->area.width, event->area.height);
- cr->clip();
- result = on_draw(cr);
- }
-
- return result;
-}
-#endif
void
ColorPreview::setRgba32 (guint32 rgba)
diff --git a/src/ui/widget/color-preview.h b/src/ui/widget/color-preview.h
index caddfb9a2..1276cf42b 100644
--- a/src/ui/widget/color-preview.h
+++ b/src/ui/widget/color-preview.h
@@ -33,16 +33,10 @@ public:
protected:
virtual void on_size_allocate (Gtk::Allocation &all);
-#if WITH_GTKMM_3_0
virtual void get_preferred_height_vfunc(int& minimum_height, int& natural_height) const;
virtual void get_preferred_height_for_width_vfunc(int width, int& minimum_height, int& natural_height) const;
virtual void get_preferred_width_vfunc(int& minimum_width, int& natural_width) const;
virtual void get_preferred_width_for_height_vfunc(int height, int& minimum_width, int& natural_width) const;
-#else
- virtual void on_size_request (Gtk::Requisition *req);
- virtual bool on_expose_event(GdkEventExpose *event);
-#endif
-
virtual bool on_draw(const Cairo::RefPtr<Cairo::Context>& cr);
guint32 _rgba;
diff --git a/src/ui/widget/color-scales.cpp b/src/ui/widget/color-scales.cpp
index 832bc3a62..89913b01b 100644
--- a/src/ui/widget/color-scales.cpp
+++ b/src/ui/widget/color-scales.cpp
@@ -8,7 +8,6 @@
#include <gtkmm/adjustment.h>
#include <glibmm/i18n.h>
-#include <gtk/gtk.h>
#include "ui/dialog-events.h"
#include "ui/widget/color-scales.h"
@@ -44,11 +43,7 @@ static const gchar *sp_color_scales_hue_map();
const gchar *ColorScales::SUBMODE_NAMES[] = { N_("None"), N_("RGB"), N_("HSL"), N_("CMYK") };
ColorScales::ColorScales(SelectedColor &color, SPColorScalesMode mode)
-#if GTK_CHECK_VERSION(3, 0, 0)
: Gtk::Grid()
-#else
- : Gtk::Table(5, 3, false)
-#endif
, _color(color)
, _rangeLimit(255.0)
, _updating(FALSE)
@@ -91,15 +86,9 @@ void ColorScales::_initUI(SPColorScalesMode mode)
/* Label */
_l[i] = gtk_label_new("");
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_halign(_l[i], GTK_ALIGN_END);
-#else
- gtk_misc_set_alignment(GTK_MISC(_l[i]), 1.0, 0.5);
-#endif
-
gtk_widget_show(_l[i]);
-#if GTK_CHECK_VERSION(3, 0, 0)
#if GTK_CHECK_VERSION(3, 12, 0)
gtk_widget_set_margin_start(_l[i], XPAD);
gtk_widget_set_margin_end(_l[i], XPAD);
@@ -110,9 +99,6 @@ void ColorScales::_initUI(SPColorScalesMode mode)
gtk_widget_set_margin_top(_l[i], YPAD);
gtk_widget_set_margin_bottom(_l[i], YPAD);
gtk_grid_attach(GTK_GRID(t), _l[i], 0, i, 1, 1);
-#else
- gtk_table_attach(GTK_TABLE(t), _l[i], 0, 1, i, i + 1, GTK_FILL, GTK_FILL, XPAD, YPAD);
-#endif
/* Adjustment */
_a[i] = GTK_ADJUSTMENT(gtk_adjustment_new(0.0, 0.0, _rangeLimit, 1.0, 10.0, 10.0));
@@ -120,7 +106,6 @@ void ColorScales::_initUI(SPColorScalesMode mode)
_s[i] = Gtk::manage(new Inkscape::UI::Widget::ColorSlider(Glib::wrap(_a[i], true)));
_s[i]->show();
-#if GTK_CHECK_VERSION(3, 0, 0)
#if GTK_CHECK_VERSION(3, 12, 0)
_s[i]->set_margin_start(XPAD);
_s[i]->set_margin_end(XPAD);
@@ -132,10 +117,6 @@ void ColorScales::_initUI(SPColorScalesMode mode)
_s[i]->set_margin_bottom(YPAD);
_s[i]->set_hexpand(true);
gtk_grid_attach(GTK_GRID(t), _s[i]->gobj(), 1, i, 1, 1);
-#else
- gtk_table_attach(GTK_TABLE(t), _s[i]->gobj(), 1, 2, i, i + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
- GTK_FILL, XPAD, YPAD);
-#endif
/* Spinbutton */
_b[i] = gtk_spin_button_new(GTK_ADJUSTMENT(_a[i]), 1.0, 0);
@@ -143,7 +124,6 @@ void ColorScales::_initUI(SPColorScalesMode mode)
gtk_label_set_mnemonic_widget(GTK_LABEL(_l[i]), _b[i]);
gtk_widget_show(_b[i]);
-#if GTK_CHECK_VERSION(3, 0, 0)
#if GTK_CHECK_VERSION(3, 12, 0)
gtk_widget_set_margin_start(_b[i], XPAD);
gtk_widget_set_margin_end(_b[i], XPAD);
@@ -156,9 +136,6 @@ void ColorScales::_initUI(SPColorScalesMode mode)
gtk_widget_set_halign(_b[i], GTK_ALIGN_CENTER);
gtk_widget_set_valign(_b[i], GTK_ALIGN_CENTER);
gtk_grid_attach(GTK_GRID(t), _b[i], 2, i, 1, 1);
-#else
- gtk_table_attach(GTK_TABLE(t), _b[i], 2, 3, i, i + 1, (GtkAttachOptions)0, (GtkAttachOptions)0, XPAD, YPAD);
-#endif
/* Attach channel value to adjustment */
g_object_set_data(G_OBJECT(_a[i]), "channel", GINT_TO_POINTER(i));
@@ -270,7 +247,6 @@ void ColorScales::_setRangeLimit(gdouble upper)
_rangeLimit = upper;
for (gint i = 0; i < static_cast<gint>(G_N_ELEMENTS(_a)); i++) {
gtk_adjustment_set_upper(_a[i], upper);
- gtk_adjustment_changed(_a[i]);
}
}
@@ -284,11 +260,7 @@ void ColorScales::_onColorChanged()
void ColorScales::on_show()
{
-#if GTK_CHECK_VERSION(3, 0, 0)
Gtk::Grid::on_show();
-#else
- Gtk::Table::on_show();
-#endif
_updateDisplay();
}
diff --git a/src/ui/widget/color-scales.h b/src/ui/widget/color-scales.h
index aeacfbcc1..1e86d762d 100644
--- a/src/ui/widget/color-scales.h
+++ b/src/ui/widget/color-scales.h
@@ -5,11 +5,7 @@
#include <config.h>
#endif
-#if WITH_GTKMM_3_0
#include <gtkmm/grid.h>
-#else
-#include <gtkmm/table.h>
-#endif
#include "ui/selected-color.h"
@@ -27,11 +23,7 @@ typedef enum {
} SPColorScalesMode;
class ColorScales
-#if GTK_CHECK_VERSION(3, 0, 0)
: public Gtk::Grid
-#else
- : public Gtk::Table
-#endif
{
public:
static const gchar *SUBMODE_NAMES[];
diff --git a/src/ui/widget/color-slider.cpp b/src/ui/widget/color-slider.cpp
index bf2156628..2e665dbec 100644
--- a/src/ui/widget/color-slider.cpp
+++ b/src/ui/widget/color-slider.cpp
@@ -18,12 +18,7 @@
#include <gdkmm/cursor.h>
#include <gdkmm/general.h>
#include <gtkmm/adjustment.h>
-#if WITH_GTKMM_3_0
#include <gtkmm/stylecontext.h>
-#else
-#include <gtkmm/style.h>
-#endif
-#include <gtk/gtk.h>
#include "ui/widget/color-scales.h"
#include "ui/widget/color-slider.h"
@@ -42,14 +37,8 @@ namespace Inkscape {
namespace UI {
namespace Widget {
-#if GTK_CHECK_VERSION(3, 0, 0)
ColorSlider::ColorSlider(Glib::RefPtr<Gtk::Adjustment> adjustment)
: _dragging(false)
-#else
-ColorSlider::ColorSlider(Gtk::Adjustment *adjustment)
- : _dragging(false)
- , _adjustment(NULL)
-#endif
, _value(0.0)
, _oldvalue(0.0)
, _mapsize(0)
@@ -82,12 +71,7 @@ ColorSlider::~ColorSlider()
if (_adjustment) {
_adjustment_changed_connection.disconnect();
_adjustment_value_changed_connection.disconnect();
-#if GTK_CHECK_VERSION(3, 0, 0)
_adjustment.reset();
-#else
- _adjustment->unreference();
- _adjustment = NULL;
-#endif
}
}
@@ -108,26 +92,15 @@ void ColorSlider::on_realize()
attributes.window_type = GDK_WINDOW_CHILD;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gdk_screen_get_system_visual(gdk_screen_get_default());
-#if !GTK_CHECK_VERSION(3, 0, 0)
- attributes.colormap = gdk_screen_get_system_colormap(gdk_screen_get_default());
-#endif
attributes.event_mask = get_events();
attributes.event_mask |= (Gdk::EXPOSURE_MASK | Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK |
Gdk::POINTER_MOTION_MASK | Gdk::ENTER_NOTIFY_MASK | Gdk::LEAVE_NOTIFY_MASK);
-#if GTK_CHECK_VERSION(3, 0, 0)
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
-#else
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
-#endif
_gdk_window = Gdk::Window::create(get_parent_window(), &attributes, attributes_mask);
set_window(_gdk_window);
_gdk_window->set_user_data(gobj());
-
-#if !GTK_CHECK_VERSION(3, 0, 0)
- style_attach();
-#endif
}
}
@@ -148,8 +121,6 @@ void ColorSlider::on_size_allocate(Gtk::Allocation &allocation)
}
}
-#if GTK_CHECK_VERSION(3, 0, 0)
-
void ColorSlider::get_preferred_width_vfunc(int &minimum_width, int &natural_width) const
{
Glib::RefPtr<Gtk::StyleContext> style_context = get_style_context();
@@ -176,38 +147,12 @@ void ColorSlider::get_preferred_height_for_width_vfunc(int /*width*/, int &minim
get_preferred_height(minimum_height, natural_height);
}
-#else
-
-void ColorSlider::on_size_request(Gtk::Requisition *requisition)
-{
- GtkStyle *style = gtk_widget_get_style(gobj());
- requisition->width = SLIDER_WIDTH + style->xthickness * 2;
- requisition->height = SLIDER_HEIGHT + style->ythickness * 2;
-}
-
-bool ColorSlider::on_expose_event(GdkEventExpose *event)
-{
- bool result = false;
-
- if (get_is_drawable()) {
- Cairo::RefPtr<Cairo::Context> cr = _gdk_window->create_cairo_context();
- result = on_draw(cr);
- }
- return result;
-}
-
-#endif
-
bool ColorSlider::on_button_press_event(GdkEventButton *event)
{
if (event->button == 1) {
Gtk::Allocation allocation = get_allocation();
gint cx, cw;
-#if GTK_CHECK_VERSION(3, 0, 0)
cx = get_style_context()->get_padding(get_state_flags()).get_left();
-#else
- cx = get_style()->get_xthickness();
-#endif
cw = allocation.get_width() - 2 * cx;
signal_grabbed.emit();
_dragging = true;
@@ -215,15 +160,9 @@ bool ColorSlider::on_button_press_event(GdkEventButton *event)
ColorScales::setScaled(_adjustment->gobj(), CLAMP((gfloat)(event->x - cx) / cw, 0.0, 1.0));
signal_dragged.emit();
-#if GTK_CHECK_VERSION(3, 0, 0)
gdk_device_grab(
gdk_event_get_device(reinterpret_cast<GdkEvent *>(event)), _gdk_window->gobj(), GDK_OWNERSHIP_NONE, FALSE,
static_cast<GdkEventMask>(GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK), NULL, event->time);
-#else
- gdk_pointer_grab(get_window()->gobj(), FALSE,
- static_cast<GdkEventMask>(GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK), NULL, NULL,
- event->time);
-#endif
}
return false;
@@ -232,13 +171,8 @@ bool ColorSlider::on_button_press_event(GdkEventButton *event)
bool ColorSlider::on_button_release_event(GdkEventButton *event)
{
if (event->button == 1) {
-
-#if GTK_CHECK_VERSION(3, 0, 0)
gdk_device_ungrab(gdk_event_get_device(reinterpret_cast<GdkEvent *>(event)),
gdk_event_get_time(reinterpret_cast<GdkEvent *>(event)));
-#else
- get_window()->pointer_ungrab(event->time);
-#endif
_dragging = false;
signal_released.emit();
@@ -255,11 +189,7 @@ bool ColorSlider::on_motion_notify_event(GdkEventMotion *event)
if (_dragging) {
gint cx, cw;
Gtk::Allocation allocation = get_allocation();
-#if GTK_CHECK_VERSION(3, 0, 0)
cx = get_style_context()->get_padding(get_state_flags()).get_left();
-#else
- cx = get_style()->get_xthickness();
-#endif
cw = allocation.get_width() - 2 * cx;
ColorScales::setScaled(_adjustment->gobj(), CLAMP((gfloat)(event->x - cx) / cw, 0.0, 1.0));
signal_dragged.emit();
@@ -268,19 +198,10 @@ bool ColorSlider::on_motion_notify_event(GdkEventMotion *event)
return false;
}
-#if GTK_CHECK_VERSION(3, 0, 0)
void ColorSlider::setAdjustment(Glib::RefPtr<Gtk::Adjustment> adjustment)
{
-#else
-void ColorSlider::setAdjustment(Gtk::Adjustment *adjustment)
-{
-#endif
if (!adjustment) {
-#if GTK_CHECK_VERSION(3, 0, 0)
_adjustment = Gtk::Adjustment::create(0.0, 0.0, 1.0, 0.01, 0.0, 0.0);
-#else
- _adjustment = Gtk::manage(new Gtk::Adjustment(0.0, 0.0, 1.0, 0.01, 0.0, 0.0));
-#endif
}
else {
adjustment->set_page_increment(0.0);
@@ -291,9 +212,6 @@ void ColorSlider::setAdjustment(Gtk::Adjustment *adjustment)
if (_adjustment) {
_adjustment_changed_connection.disconnect();
_adjustment_value_changed_connection.disconnect();
-#if !GTK_CHECK_VERSION(3, 0, 0)
- _adjustment->unreference();
-#endif
}
_adjustment = adjustment;
@@ -314,18 +232,11 @@ void ColorSlider::_onAdjustmentValueChanged()
{
if (_value != ColorScales::getScaled(_adjustment->gobj())) {
gint cx, cy, cw, ch;
-#if GTK_CHECK_VERSION(3, 0, 0)
- Glib::RefPtr<Gtk::StyleContext> style_context = get_style_context();
- Gtk::Allocation allocation = get_allocation();
- Gtk::Border padding = style_context->get_padding(get_state_flags());
+ auto style_context = get_style_context();
+ auto allocation = get_allocation();
+ auto padding = style_context->get_padding(get_state_flags());
cx = padding.get_left();
cy = padding.get_top();
-#else
- Glib::RefPtr<Gtk::Style> style = get_style();
- Gtk::Allocation allocation = get_allocation();
- cx = style->get_xthickness();
- cy = style->get_ythickness();
-#endif
cw = allocation.get_width() - 2 * cx;
ch = allocation.get_height() - 2 * cy;
if ((gint)(ColorScales::getScaled(_adjustment->gobj()) * cw) != (gint)(_value * cw)) {
@@ -389,40 +300,22 @@ bool ColorSlider::on_draw(const Cairo::RefPtr<Cairo::Context> &cr)
{
gboolean colorsOnTop = Inkscape::Preferences::get()->getBool("/options/workarounds/colorsontop", false);
- Gtk::Allocation allocation = get_allocation();
-
-#if GTK_CHECK_VERSION(3, 0, 0)
- Glib::RefPtr<Gtk::StyleContext> style_context = get_style_context();
-#else
- Glib::RefPtr<Gdk::Window> window = get_window();
- Glib::RefPtr<Gtk::Style> style = get_style();
-#endif
+ auto allocation = get_allocation();
+ auto style_context = get_style_context();
// Draw shadow
if (colorsOnTop) {
-#if GTK_CHECK_VERSION(3, 0, 0)
style_context->render_frame(cr, 0, 0, allocation.get_width(), allocation.get_height());
-#else
- gtk_paint_shadow(style->gobj(), window->gobj(), gtk_widget_get_state(gobj()), GTK_SHADOW_IN, NULL, gobj(),
- "colorslider", 0, 0, allocation.get_width(), allocation.get_height());
-#endif
}
/* Paintable part of color gradient area */
Gdk::Rectangle carea;
-
-#if GTK_CHECK_VERSION(3, 0, 0)
Gtk::Border padding;
padding = style_context->get_padding(get_state_flags());
carea.set_x(padding.get_left());
carea.set_y(padding.get_top());
- ;
-#else
- carea.set_x(style->get_xthickness());
- carea.set_y(style->get_ythickness());
-#endif
carea.set_width(allocation.get_width() - 2 * carea.get_x());
carea.set_height(allocation.get_height() - 2 * carea.get_y());
@@ -490,12 +383,7 @@ bool ColorSlider::on_draw(const Cairo::RefPtr<Cairo::Context> &cr)
/* Draw shadow */
if (!colorsOnTop) {
-#if GTK_CHECK_VERSION(3, 0, 0)
style_context->render_frame(cr, 0, 0, allocation.get_width(), allocation.get_height());
-#else
- gtk_paint_shadow(style->gobj(), window->gobj(), gtk_widget_get_state(gobj()), GTK_SHADOW_IN, NULL, gobj(),
- "colorslider", 0, 0, allocation.get_width(), allocation.get_height());
-#endif
}
/* Draw arrow */
diff --git a/src/ui/widget/color-slider.h b/src/ui/widget/color-slider.h
index 253f3123c..9be6c356a 100644
--- a/src/ui/widget/color-slider.h
+++ b/src/ui/widget/color-slider.h
@@ -24,18 +24,10 @@ namespace Widget {
*/
class ColorSlider : public Gtk::Widget {
public:
-#if GTK_CHECK_VERSION(3, 0, 0)
ColorSlider(Glib::RefPtr<Gtk::Adjustment> adjustment);
-#else
- ColorSlider(Gtk::Adjustment *adjustment);
-#endif
~ColorSlider();
-#if GTK_CHECK_VERSION(3, 0, 0)
void setAdjustment(Glib::RefPtr<Gtk::Adjustment> adjustment);
-#else
- void setAdjustment(Gtk::Adjustment *adjustment);
-#endif
void setColors(guint32 start, guint32 mid, guint32 end);
@@ -56,16 +48,10 @@ protected:
bool on_button_release_event(GdkEventButton *event);
bool on_motion_notify_event(GdkEventMotion *event);
bool on_draw(const Cairo::RefPtr<Cairo::Context> &cr);
-
-#if GTK_CHECK_VERSION(3, 0, 0)
void get_preferred_width_vfunc(int &minimum_width, int &natural_width) const;
void get_preferred_width_for_height_vfunc(int height, int &minimum_width, int &natural_width) const;
void get_preferred_height_vfunc(int &minimum_height, int &natural_height) const;
void get_preferred_height_for_width_vfunc(int width, int &minimum_height, int &natural_height) const;
-#else
- void on_size_request(Gtk::Requisition *requisition);
- bool on_expose_event(GdkEventExpose *event);
-#endif
private:
void _onAdjustmentChanged();
@@ -73,11 +59,7 @@ private:
bool _dragging;
-#if GTK_CHECK_VERSION(3, 0, 0)
Glib::RefPtr<Gtk::Adjustment> _adjustment;
-#else
- Gtk::Adjustment *_adjustment;
-#endif
sigc::connection _adjustment_changed_connection;
sigc::connection _adjustment_value_changed_connection;
diff --git a/src/ui/widget/color-wheel-selector.cpp b/src/ui/widget/color-wheel-selector.cpp
index decb02b4f..4f011c6c3 100644
--- a/src/ui/widget/color-wheel-selector.cpp
+++ b/src/ui/widget/color-wheel-selector.cpp
@@ -11,7 +11,7 @@
#include "ui/dialog-events.h"
#include "ui/widget/color-scales.h"
#include "ui/widget/color-slider.h"
-#include "ui/widget/gimpcolorwheel.h"
+#include "widgets/gimp/gimpcolorwheel.h"
namespace Inkscape {
namespace UI {
@@ -25,16 +25,9 @@ namespace Widget {
const gchar *ColorWheelSelector::MODE_NAME = N_("Wheel");
ColorWheelSelector::ColorWheelSelector(SelectedColor &color)
-#if GTK_CHECK_VERSION(3, 0, 0)
: Gtk::Grid()
-#else
- : Gtk::Table(5, 3, false)
-#endif
, _color(color)
, _updating(false)
-#if !GTK_CHECK_VERSION(3, 0, 0)
- , _alpha_adjustment(NULL)
-#endif
, _wheel(0)
, _slider(0)
{
@@ -46,9 +39,6 @@ ColorWheelSelector::ColorWheelSelector(SelectedColor &color)
ColorWheelSelector::~ColorWheelSelector()
{
_wheel = 0;
-#if !GTK_CHECK_VERSION(3, 0, 0)
- delete _alpha_adjustment;
-#endif
_color_changed_connection.disconnect();
_color_dragged_connection.disconnect();
@@ -62,16 +52,11 @@ void ColorWheelSelector::_initUI()
_wheel = gimp_color_wheel_new();
gtk_widget_show(_wheel);
-#if GTK_CHECK_VERSION(3, 0, 0)
gtk_widget_set_halign(_wheel, GTK_ALIGN_FILL);
gtk_widget_set_valign(_wheel, GTK_ALIGN_FILL);
gtk_widget_set_hexpand(_wheel, TRUE);
gtk_widget_set_vexpand(_wheel, TRUE);
gtk_grid_attach(GTK_GRID(gobj()), _wheel, 0, row, 3, 1);
-#else
- gtk_table_attach(GTK_TABLE(gobj()), _wheel, 0, 3, row, row + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0);
-#endif
row++;
@@ -80,7 +65,6 @@ void ColorWheelSelector::_initUI()
label->set_alignment(1.0, 0.5);
label->show();
-#if GTK_CHECK_VERSION(3, 0, 0)
#if GTK_CHECK_VERSION(3, 12, 0)
label->set_margin_start(XPAD);
label->set_margin_end(XPAD);
@@ -93,22 +77,15 @@ void ColorWheelSelector::_initUI()
label->set_halign(Gtk::ALIGN_FILL);
label->set_valign(Gtk::ALIGN_FILL);
attach(*label, 0, row, 1, 1);
-#else
- attach(*label, 0, 1, row, row + 1, Gtk::FILL, Gtk::FILL, XPAD, YPAD);
-#endif
-/* Adjustment */
-#if GTK_CHECK_VERSION(3, 0, 0)
+ /* Adjustment */
_alpha_adjustment = Gtk::Adjustment::create(0.0, 0.0, 255.0, 1.0, 10.0, 10.0);
-#else
- _alpha_adjustment = new Gtk::Adjustment(0.0, 0.0, 255.0, 1.0, 10.0, 10.0);
-#endif
+
/* Slider */
_slider = Gtk::manage(new Inkscape::UI::Widget::ColorSlider(_alpha_adjustment));
_slider->set_tooltip_text(_("Alpha (opacity)"));
_slider->show();
-#if GTK_CHECK_VERSION(3, 0, 0)
#if GTK_CHECK_VERSION(3, 12, 0)
_slider->set_margin_start(XPAD);
_slider->set_margin_end(XPAD);
@@ -122,25 +99,17 @@ void ColorWheelSelector::_initUI()
_slider->set_halign(Gtk::ALIGN_FILL);
_slider->set_valign(Gtk::ALIGN_FILL);
attach(*_slider, 1, row, 1, 1);
-#else
- attach(*_slider, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::FILL, XPAD, YPAD);
-#endif
_slider->setColors(SP_RGBA32_F_COMPOSE(1.0, 1.0, 1.0, 0.0), SP_RGBA32_F_COMPOSE(1.0, 1.0, 1.0, 0.5),
SP_RGBA32_F_COMPOSE(1.0, 1.0, 1.0, 1.0));
-/* Spinbutton */
-#if GTK_CHECK_VERSION(3, 0, 0)
- Gtk::SpinButton *spin_button = Gtk::manage(new Gtk::SpinButton(_alpha_adjustment, 1.0, 0));
-#else
- Gtk::SpinButton *spin_button = Gtk::manage(new Gtk::SpinButton(*_alpha_adjustment, 1.0, 0));
-#endif
+ /* Spinbutton */
+ auto spin_button = Gtk::manage(new Gtk::SpinButton(_alpha_adjustment, 1.0, 0));
spin_button->set_tooltip_text(_("Alpha (opacity)"));
sp_dialog_defocus_on_enter(GTK_WIDGET(spin_button->gobj()));
label->set_mnemonic_widget(*spin_button);
spin_button->show();
-#if GTK_CHECK_VERSION(3, 0, 0)
#if GTK_CHECK_VERSION(3, 12, 0)
spin_button->set_margin_start(XPAD);
spin_button->set_margin_end(XPAD);
@@ -153,9 +122,6 @@ void ColorWheelSelector::_initUI()
spin_button->set_halign(Gtk::ALIGN_CENTER);
spin_button->set_valign(Gtk::ALIGN_CENTER);
attach(*spin_button, 2, row, 1, 1);
-#else
- attach(*spin_button, 2, 3, row, row + 1, (Gtk::AttachOptions)0, (Gtk::AttachOptions)0, XPAD, YPAD);
-#endif
/* Signals */
_alpha_adjustment->signal_value_changed().connect(sigc::mem_fun(this, &ColorWheelSelector::_adjustmentChanged));
@@ -168,11 +134,7 @@ void ColorWheelSelector::_initUI()
void ColorWheelSelector::on_show()
{
-#if GTK_CHECK_VERSION(3, 0, 0)
Gtk::Grid::on_show();
-#else
- Gtk::Table::on_show();
-#endif
_updateDisplay();
}
diff --git a/src/ui/widget/color-wheel-selector.h b/src/ui/widget/color-wheel-selector.h
index 5711d417c..ee7bd9b83 100644
--- a/src/ui/widget/color-wheel-selector.h
+++ b/src/ui/widget/color-wheel-selector.h
@@ -16,11 +16,7 @@
#include <config.h>
#endif
-#if WITH_GTKMM_3_0
#include <gtkmm/grid.h>
-#else
-#include <gtkmm/table.h>
-#endif
#include "ui/selected-color.h"
@@ -33,11 +29,7 @@ namespace Widget {
class ColorSlider;
class ColorWheelSelector
-#if GTK_CHECK_VERSION(3, 0, 0)
: public Gtk::Grid
-#else
- : public Gtk::Table
-#endif
{
public:
static const gchar *MODE_NAME;
@@ -61,11 +53,7 @@ protected:
SelectedColor &_color;
bool _updating;
-#if GTK_CHECK_VERSION(3, 0, 0)
Glib::RefPtr<Gtk::Adjustment> _alpha_adjustment;
-#else
- Gtk::Adjustment *_alpha_adjustment;
-#endif
GtkWidget *_wheel;
Inkscape::UI::Widget::ColorSlider *_slider;
diff --git a/src/ui/widget/dock-item.cpp b/src/ui/widget/dock-item.cpp
index 1b3490ffe..979c09d2f 100644
--- a/src/ui/widget/dock-item.cpp
+++ b/src/ui/widget/dock-item.cpp
@@ -57,11 +57,7 @@ DockItem::DockItem(Dock& dock, const Glib::ustring& name, const Glib::ustring& l
Gtk::StockItem item;
Gtk::StockID stockId(icon_name);
if ( Gtk::StockItem::lookup(stockId, item) ) {
-#if WITH_GTKMM_3_0
_icon_pixbuf = _dock.getWidget().render_icon_pixbuf( stockId, Gtk::ICON_SIZE_MENU );
-#else
- _icon_pixbuf = _dock.getWidget().render_icon( stockId, Gtk::ICON_SIZE_MENU );
-#endif
}
}
}
@@ -173,12 +169,8 @@ DockItem::set_size_request(int width, int height)
void DockItem::size_request(Gtk::Requisition& requisition)
{
-#if WITH_GTKMM_3_0
Gtk::Requisition req_natural;
getWidget().get_preferred_size(req_natural, requisition);
-#else
- requisition = getWidget().size_request();
-#endif
}
void
diff --git a/src/ui/widget/dock-item.h b/src/ui/widget/dock-item.h
index 25a69d94c..2df45b207 100644
--- a/src/ui/widget/dock-item.h
+++ b/src/ui/widget/dock-item.h
@@ -19,11 +19,7 @@
#include <gtkmm/frame.h>
#include <gtkmm/window.h>
-#if WITH_EXT_GDL
#include <gdl/gdl.h>
-#else
-#include "libgdl/gdl.h"
-#endif
namespace Gtk {
class HButtonBox;
diff --git a/src/ui/widget/dock.cpp b/src/ui/widget/dock.cpp
index fda647182..7744cb695 100644
--- a/src/ui/widget/dock.cpp
+++ b/src/ui/widget/dock.cpp
@@ -65,7 +65,6 @@ Dock::Dock(Gtk::Orientation orientation)
static_cast<GtkOrientation>(orientation));
#endif
-#if WITH_GTKMM_3_0
switch(orientation) {
case Gtk::ORIENTATION_VERTICAL:
_dock_box = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL));
@@ -75,17 +74,6 @@ Dock::Dock(Gtk::Orientation orientation)
}
_paned = Gtk::manage(new Gtk::Paned(orientation));
-#else
- switch (orientation) {
- case Gtk::ORIENTATION_VERTICAL:
- _dock_box = Gtk::manage(new Gtk::HBox());
- _paned = Gtk::manage(new Gtk::VPaned());
- break;
- case Gtk::ORIENTATION_HORIZONTAL:
- _dock_box = Gtk::manage(new Gtk::VBox());
- _paned = Gtk::manage(new Gtk::HPaned());
- }
-#endif
_scrolled_window->add(*_dock_box);
_scrolled_window->set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
diff --git a/src/ui/widget/highlight-picker.cpp b/src/ui/widget/highlight-picker.cpp
index c1068c9b2..561c1332a 100644
--- a/src/ui/widget/highlight-picker.cpp
+++ b/src/ui/widget/highlight-picker.cpp
@@ -32,8 +32,6 @@ HighlightPicker::~HighlightPicker()
{
}
-
-#if WITH_GTKMM_3_0
void HighlightPicker::get_preferred_height_vfunc(Gtk::Widget& widget,
int& min_h,
int& nat_h) const
@@ -63,39 +61,12 @@ void HighlightPicker::get_preferred_width_vfunc(Gtk::Widget& widget,
nat_w += (nat_w) >> 1;
}
}
-#else
-void HighlightPicker::get_size_vfunc(Gtk::Widget& widget,
- const Gdk::Rectangle* cell_area,
- int* x_offset,
- int* y_offset,
- int* width,
- int* height ) const
-{
- Gtk::CellRendererPixbuf::get_size_vfunc( widget, cell_area, x_offset, y_offset, width, height );
-
- if ( width ) {
- *width = 10;//+= (*width) >> 1;
- }
- if ( height ) {
- *height = 20; //cell_area ? cell_area->get_height() / 2 : 50; //+= (*height) >> 1;
- }
-}
-#endif
-#if WITH_GTKMM_3_0
void HighlightPicker::render_vfunc( const Cairo::RefPtr<Cairo::Context>& cr,
Gtk::Widget& widget,
const Gdk::Rectangle& background_area,
const Gdk::Rectangle& cell_area,
Gtk::CellRendererState flags )
-#else
-void HighlightPicker::render_vfunc( const Glib::RefPtr<Gdk::Drawable>& window,
- Gtk::Widget& widget,
- const Gdk::Rectangle& background_area,
- const Gdk::Rectangle& cell_area,
- const Gdk::Rectangle& expose_area,
- Gtk::CellRendererState flags )
-#endif
{
GdkRectangle carea;
@@ -137,11 +108,7 @@ void HighlightPicker::render_vfunc( const Glib::RefPtr<Gdk::Drawable>& window,
convert_pixbuf_argb32_to_normal(pixbuf);
property_pixbuf() = Glib::wrap(pixbuf);
-#if WITH_GTKMM_3_0
Gtk::CellRendererPixbuf::render_vfunc( cr, widget, background_area, cell_area, flags );
-#else
- Gtk::CellRendererPixbuf::render_vfunc( window, widget, background_area, cell_area, expose_area, flags );
-#endif
}
bool HighlightPicker::activate_vfunc(GdkEvent* /*event*/,
diff --git a/src/ui/widget/highlight-picker.h b/src/ui/widget/highlight-picker.h
index c5fe4c02c..c459b0dcd 100644
--- a/src/ui/widget/highlight-picker.h
+++ b/src/ui/widget/highlight-picker.h
@@ -29,8 +29,6 @@ public:
Glib::PropertyProxy<guint32> property_active() { return _property_active.get_proxy(); }
protected:
-
-#if WITH_GTKMM_3_0
virtual void render_vfunc( const Cairo::RefPtr<Cairo::Context>& cr,
Gtk::Widget& widget,
const Gdk::Rectangle& background_area,
@@ -44,18 +42,6 @@ protected:
virtual void get_preferred_height_vfunc(Gtk::Widget& widget,
int& min_h,
int& nat_h) const;
-#else
- virtual void render_vfunc( const Glib::RefPtr<Gdk::Drawable>& window,
- Gtk::Widget& widget,
- const Gdk::Rectangle& background_area,
- const Gdk::Rectangle& cell_area,
- const Gdk::Rectangle& expose_area,
- Gtk::CellRendererState flags );
-
- virtual void get_size_vfunc( Gtk::Widget &widget,
- Gdk::Rectangle const *cell_area,
- int *x_offset, int *y_offset, int *width, int *height ) const;
-#endif
virtual bool activate_vfunc(GdkEvent *event,
Gtk::Widget &widget,
diff --git a/src/ui/widget/imagetoggler.cpp b/src/ui/widget/imagetoggler.cpp
index 29907f4c9..987cc67bb 100644
--- a/src/ui/widget/imagetoggler.cpp
+++ b/src/ui/widget/imagetoggler.cpp
@@ -53,8 +53,6 @@ ImageToggler::ImageToggler( char const* on, char const* off) :
property_pixbuf() = _property_pixbuf_off.get_value();
}
-
-#if WITH_GTKMM_3_0
void ImageToggler::get_preferred_height_vfunc(Gtk::Widget& widget,
int& min_h,
int& nat_h) const
@@ -84,46 +82,15 @@ void ImageToggler::get_preferred_width_vfunc(Gtk::Widget& widget,
nat_w += (nat_w) >> 1;
}
}
-#else
-void ImageToggler::get_size_vfunc(Gtk::Widget& widget,
- const Gdk::Rectangle* cell_area,
- int* x_offset,
- int* y_offset,
- int* width,
- int* height ) const
-{
- Gtk::CellRendererPixbuf::get_size_vfunc( widget, cell_area, x_offset, y_offset, width, height );
-
- if ( width ) {
- *width += (*width) >> 1;
- }
- if ( height ) {
- *height += (*height) >> 1;
- }
-}
-#endif
-#if WITH_GTKMM_3_0
void ImageToggler::render_vfunc( const Cairo::RefPtr<Cairo::Context>& cr,
Gtk::Widget& widget,
const Gdk::Rectangle& background_area,
const Gdk::Rectangle& cell_area,
Gtk::CellRendererState flags )
-#else
-void ImageToggler::render_vfunc( const Glib::RefPtr<Gdk::Drawable>& window,
- Gtk::Widget& widget,
- const Gdk::Rectangle& background_area,
- const Gdk::Rectangle& cell_area,
- const Gdk::Rectangle& expose_area,
- Gtk::CellRendererState flags )
-#endif
{
property_pixbuf() = _property_active.get_value() ? _property_pixbuf_on : _property_pixbuf_off;
-#if WITH_GTKMM_3_0
Gtk::CellRendererPixbuf::render_vfunc( cr, widget, background_area, cell_area, flags );
-#else
- Gtk::CellRendererPixbuf::render_vfunc( window, widget, background_area, cell_area, expose_area, flags );
-#endif
}
bool
diff --git a/src/ui/widget/imagetoggler.h b/src/ui/widget/imagetoggler.h
index 7b02fa4dc..d4f27cf11 100644
--- a/src/ui/widget/imagetoggler.h
+++ b/src/ui/widget/imagetoggler.h
@@ -36,8 +36,6 @@ public:
Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > property_pixbuf_off();
protected:
-
-#if WITH_GTKMM_3_0
virtual void render_vfunc( const Cairo::RefPtr<Cairo::Context>& cr,
Gtk::Widget& widget,
const Gdk::Rectangle& background_area,
@@ -51,18 +49,6 @@ protected:
virtual void get_preferred_height_vfunc(Gtk::Widget& widget,
int& min_h,
int& nat_h) const;
-#else
- virtual void render_vfunc( const Glib::RefPtr<Gdk::Drawable>& window,
- Gtk::Widget& widget,
- const Gdk::Rectangle& background_area,
- const Gdk::Rectangle& cell_area,
- const Gdk::Rectangle& expose_area,
- Gtk::CellRendererState flags );
-
- virtual void get_size_vfunc( Gtk::Widget &widget,
- Gdk::Rectangle const *cell_area,
- int *x_offset, int *y_offset, int *width, int *height ) const;
-#endif
virtual bool activate_vfunc(GdkEvent *event,
Gtk::Widget &widget,
diff --git a/src/ui/widget/insertordericon.cpp b/src/ui/widget/insertordericon.cpp
index 9aec7d135..7ed1ed2e2 100644
--- a/src/ui/widget/insertordericon.cpp
+++ b/src/ui/widget/insertordericon.cpp
@@ -52,7 +52,6 @@ InsertOrderIcon::InsertOrderIcon() :
}
-#if WITH_GTKMM_3_0
void InsertOrderIcon::get_preferred_height_vfunc(Gtk::Widget& widget,
int& min_h,
int& nat_h) const
@@ -82,39 +81,12 @@ void InsertOrderIcon::get_preferred_width_vfunc(Gtk::Widget& widget,
nat_w += (nat_w) >> 1;
}
}
-#else
-void InsertOrderIcon::get_size_vfunc(Gtk::Widget& widget,
- const Gdk::Rectangle* cell_area,
- int* x_offset,
- int* y_offset,
- int* width,
- int* height ) const
-{
- Gtk::CellRendererPixbuf::get_size_vfunc( widget, cell_area, x_offset, y_offset, width, height );
-
- if ( width ) {
- *width = phys;//+= (*width) >> 1;
- }
- if ( height ) {
- *height =phys;//+= (*height) >> 1;
- }
-}
-#endif
-#if WITH_GTKMM_3_0
void InsertOrderIcon::render_vfunc( const Cairo::RefPtr<Cairo::Context>& cr,
Gtk::Widget& widget,
const Gdk::Rectangle& background_area,
const Gdk::Rectangle& cell_area,
Gtk::CellRendererState flags )
-#else
-void InsertOrderIcon::render_vfunc( const Glib::RefPtr<Gdk::Drawable>& window,
- Gtk::Widget& widget,
- const Gdk::Rectangle& background_area,
- const Gdk::Rectangle& cell_area,
- const Gdk::Rectangle& expose_area,
- Gtk::CellRendererState flags )
-#endif
{
switch (_property_active.get_value())
{
@@ -128,11 +100,7 @@ void InsertOrderIcon::render_vfunc( const Glib::RefPtr<Gdk::Drawable>& window,
property_pixbuf() = Glib::RefPtr<Gdk::Pixbuf>(0);
break;
}
-#if WITH_GTKMM_3_0
Gtk::CellRendererPixbuf::render_vfunc( cr, widget, background_area, cell_area, flags );
-#else
- Gtk::CellRendererPixbuf::render_vfunc( window, widget, background_area, cell_area, expose_area, flags );
-#endif
}
bool InsertOrderIcon::activate_vfunc(GdkEvent* /*event*/,
diff --git a/src/ui/widget/insertordericon.h b/src/ui/widget/insertordericon.h
index bf8ac4fa7..43188fa5b 100644
--- a/src/ui/widget/insertordericon.h
+++ b/src/ui/widget/insertordericon.h
@@ -33,7 +33,6 @@ public:
protected:
-#if WITH_GTKMM_3_0
virtual void render_vfunc( const Cairo::RefPtr<Cairo::Context>& cr,
Gtk::Widget& widget,
const Gdk::Rectangle& background_area,
@@ -47,18 +46,6 @@ protected:
virtual void get_preferred_height_vfunc(Gtk::Widget& widget,
int& min_h,
int& nat_h) const;
-#else
- virtual void render_vfunc( const Glib::RefPtr<Gdk::Drawable>& window,
- Gtk::Widget& widget,
- const Gdk::Rectangle& background_area,
- const Gdk::Rectangle& cell_area,
- const Gdk::Rectangle& expose_area,
- Gtk::CellRendererState flags );
-
- virtual void get_size_vfunc( Gtk::Widget &widget,
- Gdk::Rectangle const *cell_area,
- int *x_offset, int *y_offset, int *width, int *height ) const;
-#endif
virtual bool activate_vfunc(GdkEvent *event,
Gtk::Widget &widget,
diff --git a/src/ui/widget/layer-selector.cpp b/src/ui/widget/layer-selector.cpp
index 7ee34f3b3..4432a6e09 100644
--- a/src/ui/widget/layer-selector.cpp
+++ b/src/ui/widget/layer-selector.cpp
@@ -19,6 +19,8 @@
#include "ui/dialog/layer-properties.h"
#include <glibmm/i18n.h>
+#include <boost/range/adaptor/filtered.hpp>
+#include <boost/range/adaptor/reversed.hpp>
#include "desktop.h"
@@ -346,27 +348,17 @@ void LayerSelector::_buildSiblingEntries(
unsigned depth, SPObject &parent,
Inkscape::Util::List<SPObject &> hierarchy
) {
- using Inkscape::Util::List;
using Inkscape::Util::rest;
- using Inkscape::Util::reverse_list_in_place;
- using Inkscape::Util::filter_list;
- Inkscape::Util::List<SPObject &> siblings(
- reverse_list_in_place(
- filter_list<SPObject::SiblingIterator>(
- is_layer(_desktop), parent.firstChild(), NULL
- )
- )
- );
+ auto siblings = parent.children | boost::adaptors::filtered(is_layer(_desktop)) | boost::adaptors::reversed;
SPObject *layer( hierarchy ? &*hierarchy : NULL );
- while (siblings) {
- _buildEntry(depth, *siblings);
- if ( &*siblings == layer ) {
+ for (auto& sib: siblings) {
+ _buildEntry(depth, sib);
+ if ( &sib == layer ) {
_buildSiblingEntries(depth+1, *layer, rest(hierarchy));
}
- ++siblings;
}
}
diff --git a/src/ui/widget/layertypeicon.cpp b/src/ui/widget/layertypeicon.cpp
index e281d982a..df85f271a 100644
--- a/src/ui/widget/layertypeicon.cpp
+++ b/src/ui/widget/layertypeicon.cpp
@@ -63,8 +63,6 @@ LayerTypeIcon::LayerTypeIcon() :
property_pixbuf() = _property_pixbuf_path.get_value();
}
-
-#if WITH_GTKMM_3_0
void LayerTypeIcon::get_preferred_height_vfunc(Gtk::Widget& widget,
int& min_h,
int& nat_h) const
@@ -94,46 +92,15 @@ void LayerTypeIcon::get_preferred_width_vfunc(Gtk::Widget& widget,
nat_w += (nat_w) >> 1;
}
}
-#else
-void LayerTypeIcon::get_size_vfunc(Gtk::Widget& widget,
- const Gdk::Rectangle* cell_area,
- int* x_offset,
- int* y_offset,
- int* width,
- int* height ) const
-{
- Gtk::CellRendererPixbuf::get_size_vfunc( widget, cell_area, x_offset, y_offset, width, height );
-
- if ( width ) {
- *width += (*width) >> 1;
- }
- if ( height ) {
- *height += (*height) >> 1;
- }
-}
-#endif
-#if WITH_GTKMM_3_0
void LayerTypeIcon::render_vfunc( const Cairo::RefPtr<Cairo::Context>& cr,
Gtk::Widget& widget,
const Gdk::Rectangle& background_area,
const Gdk::Rectangle& cell_area,
Gtk::CellRendererState flags )
-#else
-void LayerTypeIcon::render_vfunc( const Glib::RefPtr<Gdk::Drawable>& window,
- Gtk::Widget& widget,
- const Gdk::Rectangle& background_area,
- const Gdk::Rectangle& cell_area,
- const Gdk::Rectangle& expose_area,
- Gtk::CellRendererState flags )
-#endif
{
property_pixbuf() = _property_active.get_value() == 1 ? _property_pixbuf_group : (_property_active.get_value() == 2 ? _property_pixbuf_layer : _property_pixbuf_path);
-#if WITH_GTKMM_3_0
Gtk::CellRendererPixbuf::render_vfunc( cr, widget, background_area, cell_area, flags );
-#else
- Gtk::CellRendererPixbuf::render_vfunc( window, widget, background_area, cell_area, expose_area, flags );
-#endif
}
bool
diff --git a/src/ui/widget/layertypeicon.h b/src/ui/widget/layertypeicon.h
index 6c71ce361..f12029c12 100644
--- a/src/ui/widget/layertypeicon.h
+++ b/src/ui/widget/layertypeicon.h
@@ -35,8 +35,6 @@ public:
Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > property_pixbuf_off();
protected:
-
-#if WITH_GTKMM_3_0
virtual void render_vfunc( const Cairo::RefPtr<Cairo::Context>& cr,
Gtk::Widget& widget,
const Gdk::Rectangle& background_area,
@@ -50,18 +48,6 @@ protected:
virtual void get_preferred_height_vfunc(Gtk::Widget& widget,
int& min_h,
int& nat_h) const;
-#else
- virtual void render_vfunc( const Glib::RefPtr<Gdk::Drawable>& window,
- Gtk::Widget& widget,
- const Gdk::Rectangle& background_area,
- const Gdk::Rectangle& cell_area,
- const Gdk::Rectangle& expose_area,
- Gtk::CellRendererState flags );
-
- virtual void get_size_vfunc( Gtk::Widget &widget,
- Gdk::Rectangle const *cell_area,
- int *x_offset, int *y_offset, int *width, int *height ) const;
-#endif
virtual bool activate_vfunc(GdkEvent *event,
Gtk::Widget &widget,
diff --git a/src/ui/widget/licensor.cpp b/src/ui/widget/licensor.cpp
index 09f3fac8d..1e9ee361d 100644
--- a/src/ui/widget/licensor.cpp
+++ b/src/ui/widget/licensor.cpp
@@ -134,18 +134,10 @@ void Licensor::update (SPDocument *doc)
for (i=0; rdf_licenses[i].name; i++)
if (license == &rdf_licenses[i])
break;
-#if WITH_GTKMM_3_0
static_cast<LicenseItem*>(get_children()[i+1])->set_active();
-#else
- static_cast<LicenseItem*>(children()[i+1].get_widget())->set_active();
-#endif
}
else {
-#if WITH_GTKMM_3_0
static_cast<LicenseItem*>(get_children()[0])->set_active();
-#else
- static_cast<LicenseItem*>(children()[0].get_widget())->set_active();
-#endif
}
/* update the URI */
diff --git a/src/ui/widget/notebook-page.cpp b/src/ui/widget/notebook-page.cpp
index 2f03ed23b..6d8ff1d75 100644
--- a/src/ui/widget/notebook-page.cpp
+++ b/src/ui/widget/notebook-page.cpp
@@ -11,31 +11,19 @@
#include "notebook-page.h"
-#if WITH_GTKMM_3_0
# include <gtkmm/grid.h>
-#else
-# include <gtkmm/table.h>
-#endif
namespace Inkscape {
namespace UI {
namespace Widget {
NotebookPage::NotebookPage(int n_rows, int n_columns, bool expand, bool fill, guint padding)
-#if WITH_GTKMM_3_0
:_table(Gtk::manage(new Gtk::Grid()))
-#else
- :_table(Gtk::manage(new Gtk::Table(n_rows, n_columns)))
-#endif
{
set_border_width(2);
-#if WITH_GTKMM_3_0
_table->set_row_spacing(2);
_table->set_column_spacing(2);
-#else
- _table->set_spacings(2);
-#endif
pack_start(*_table, expand, fill, padding);
}
diff --git a/src/ui/widget/notebook-page.h b/src/ui/widget/notebook-page.h
index c11de1b5b..6eb23907c 100644
--- a/src/ui/widget/notebook-page.h
+++ b/src/ui/widget/notebook-page.h
@@ -17,11 +17,7 @@
#include <gtkmm/box.h>
namespace Gtk {
-#if WITH_GTKMM_3_0
class Grid;
-#else
-class Table;
-#endif
}
namespace Inkscape {
@@ -42,19 +38,10 @@ public:
*/
NotebookPage(int n_rows, int n_columns, bool expand=false, bool fill=false, guint padding=0);
-#if WITH_GTKMM_3_0
Gtk::Grid& table() { return *_table; }
-#else
- Gtk::Table& table() { return *_table; }
-#endif
protected:
-
-#if WITH_GTKMM_3_0
Gtk::Grid *_table;
-#else
- Gtk::Table *_table;
-#endif
};
} // namespace Widget
diff --git a/src/ui/widget/object-composite-settings.cpp b/src/ui/widget/object-composite-settings.cpp
index c8ac20c54..1727660c8 100644
--- a/src/ui/widget/object-composite-settings.cpp
+++ b/src/ui/widget/object-composite-settings.cpp
@@ -118,7 +118,7 @@ ObjectCompositeSettings::_blendBlurValueChanged()
const Glib::ustring blendmode = _fe_cb.get_blend_mode();
//apply created filter to every selected item
- std::vector<SPObject*> sel=_subject->list();
+ std::vector<SPObject*> sel = _subject->list();
for (std::vector<SPObject*>::const_iterator i = sel.begin() ; i != sel.end() ; ++i ) {
if (!SP_IS_ITEM(*i)) {
continue;
diff --git a/src/ui/widget/page-sizer.cpp b/src/ui/widget/page-sizer.cpp
index 4a1fe9ac6..578b6855a 100644
--- a/src/ui/widget/page-sizer.cpp
+++ b/src/ui/widget/page-sizer.cpp
@@ -336,7 +336,6 @@ PageSizer::PageSizer(Registry & _wr)
_customDimTable.set_border_width(4);
-#if WITH_GTKMM_3_0
_customDimTable.set_row_spacing(4);
_customDimTable.set_column_spacing(4);
@@ -355,15 +354,6 @@ PageSizer::PageSizer(Registry & _wr)
_fitPageMarginExpander.set_hexpand();
_fitPageMarginExpander.set_vexpand();
_customDimTable.attach(_fitPageMarginExpander, 0, 2, 2, 1);
-#else
- _customDimTable.resize(3, 2);
- _customDimTable.set_row_spacings(4);
- _customDimTable.set_col_spacings(4);
- _customDimTable.attach(_dimensionWidth, 0,1, 0,1);
- _customDimTable.attach(_dimensionUnits, 1,2, 0,1);
- _customDimTable.attach(_dimensionHeight, 0,1, 1,2);
- _customDimTable.attach(_fitPageMarginExpander, 0,2, 2,3);
-#endif
_dimTabOrderGList = NULL;
_dimTabOrderGList = g_list_append(_dimTabOrderGList, _dimensionWidth.gobj());
@@ -381,7 +371,6 @@ PageSizer::PageSizer(Registry & _wr)
//## Set up margin settings
_marginTable.set_border_width(4);
-#if WITH_GTKMM_3_0
_marginTable.set_row_spacing(4);
_marginTable.set_column_spacing(4);
@@ -404,16 +393,6 @@ PageSizer::PageSizer(Registry & _wr)
_fitPageButtonAlign.set_hexpand();
_fitPageButtonAlign.set_vexpand();
_marginTable.attach(_fitPageButtonAlign, 0, 3, 2, 1);
-#else
- _marginTable.set_border_width(4);
- _marginTable.set_row_spacings(4);
- _marginTable.set_col_spacings(4);
- _marginTable.attach(_marginTopAlign, 0,2, 0,1);
- _marginTable.attach(_marginLeftAlign, 0,1, 1,2);
- _marginTable.attach(_marginRightAlign, 1,2, 1,2);
- _marginTable.attach(_marginBottomAlign, 0,2, 2,3);
- _marginTable.attach(_fitPageButtonAlign, 0,2, 3,4);
-#endif
_marginTopAlign.set(0.5, 0.5, 0.0, 1.0);
_marginTopAlign.add(_marginTop);
@@ -436,7 +415,6 @@ PageSizer::PageSizer(Registry & _wr)
_scaleTable.set_border_width(4);
-#if WITH_GTKMM_3_0
_scaleTable.set_row_spacing(4);
_scaleTable.set_column_spacing(4);
@@ -448,16 +426,6 @@ PageSizer::PageSizer(Registry & _wr)
_viewboxExpander.set_hexpand();
_viewboxExpander.set_vexpand();
_scaleTable.attach(_viewboxExpander, 0, 2, 2, 1);
-#else
- _scaleTable.resize(3, 2);
- _scaleTable.set_row_spacings(4);
- _scaleTable.set_col_spacings(4);
- _scaleTable.attach(_scaleX, 0,1, 0,1);
- _scaleTable.attach(_scaleY, 1,2, 0,1);
- _scaleTable.attach(_scaleLabel, 2,3, 0,1);
- _scaleTable.attach(_scaleWarning, 0,3, 1,2, Gtk::FILL);
- _scaleTable.attach(_viewboxExpander, 0,3, 2,3);
-#endif
_scaleWarning.set_label(_("While SVG allows non-uniform scaling it is recommended to use only uniform scaling in Inkscape. To set a non-uniform scaling, set the 'viewBox' directly."));
_scaleWarning.set_line_wrap( true );
@@ -466,7 +434,6 @@ PageSizer::PageSizer(Registry & _wr)
_viewboxExpander.set_label(_("_Viewbox..."));
_viewboxExpander.add(_viewboxTable);
-#if WITH_GTKMM_3_0
_viewboxTable.set_row_spacing(2);
_viewboxTable.set_column_spacing(2);
@@ -486,16 +453,6 @@ PageSizer::PageSizer(Registry & _wr)
_viewboxH.set_vexpand();
_viewboxTable.attach(_viewboxH, 1, 1, 1, 1);
-#else
- _viewboxTable.set_border_width(4);
- _viewboxTable.set_row_spacings(2);
- _viewboxTable.set_col_spacings(2);
- _viewboxTable.attach(_viewboxX, 0,1, 0,1);
- _viewboxTable.attach(_viewboxY, 1,2, 0,1);
- _viewboxTable.attach(_viewboxW, 0,1, 1,2);
- _viewboxTable.attach(_viewboxH, 1,2, 1,2);
-#endif
-
_wr.setUpdating (true);
updateScaleUI();
_wr.setUpdating (false);
diff --git a/src/ui/widget/page-sizer.h b/src/ui/widget/page-sizer.h
index 0eea28e61..f1966f848 100644
--- a/src/ui/widget/page-sizer.h
+++ b/src/ui/widget/page-sizer.h
@@ -23,15 +23,9 @@
#include <gtkmm/alignment.h>
#include <gtkmm/expander.h>
#include <gtkmm/frame.h>
+#include <gtkmm/grid.h>
#include <gtkmm/liststore.h>
#include <gtkmm/scrolledwindow.h>
-
-#if WITH_GTKMM_3_0
-# include <gtkmm/grid.h>
-#else
-# include <gtkmm/table.h>
-#endif
-
#include <gtkmm/radiobutton.h>
namespace Inkscape {
@@ -222,12 +216,7 @@ protected:
//### Custom size frame
Gtk::Frame _customFrame;
-
-#if WITH_GTKMM_3_0
Gtk::Grid _customDimTable;
-#else
- Gtk::Table _customDimTable;
-#endif
RegisteredUnitMenu _dimensionUnits;
RegisteredScalarUnit _dimensionWidth;
@@ -237,12 +226,7 @@ protected:
//### Fit Page options
Gtk::Expander _fitPageMarginExpander;
-#if WITH_GTKMM_3_0
Gtk::Grid _marginTable;
-#else
- Gtk::Table _marginTable;
-#endif
-
Gtk::Alignment _marginTopAlign;
Gtk::Alignment _marginLeftAlign;
Gtk::Alignment _marginRightAlign;
@@ -257,11 +241,7 @@ protected:
// Document scale
Gtk::Frame _scaleFrame;
-#if WITH_GTKMM_3_0
Gtk::Grid _scaleTable;
-#else
- Gtk::Table _scaleTable;
-#endif
Gtk::Label _scaleLabel;
Gtk::Label _scaleWarning;
@@ -271,11 +251,7 @@ protected:
// Viewbox
Gtk::Expander _viewboxExpander;
-#if WITH_GTKMM_3_0
Gtk::Grid _viewboxTable;
-#else
- Gtk::Table _viewboxTable;
-#endif
RegisteredScalar _viewboxX;
RegisteredScalar _viewboxY;
diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp
index 98d9d41f3..6e6e6c527 100644
--- a/src/ui/widget/panel.cpp
+++ b/src/ui/widget/panel.cpp
@@ -72,9 +72,7 @@ Panel::Panel(Glib::ustring const &label, gchar const *prefs_path,
_fillable(0)
{
set_name( "InkscapePanel" );
-#if WITH_GTKMM_3_0
set_orientation( Gtk::ORIENTATION_VERTICAL );
-#endif
_init();
}
@@ -596,13 +594,9 @@ void Panel::_addResponseButton(Gtk::Button *button, int response_id, bool pack_s
{
// Create a button box for the response buttons if it's the first button to be added
if (!_action_area) {
-#if WITH_GTKMM_3_0
_action_area = new Gtk::ButtonBox();
_action_area->set_layout(Gtk::BUTTONBOX_END);
_action_area->set_spacing(6);
-#else
- _action_area = new Gtk::HButtonBox(Gtk::BUTTONBOX_END, 6);
-#endif
_action_area->set_border_width(4);
pack_end(*_action_area, Gtk::PACK_SHRINK, 0);
}
diff --git a/src/ui/widget/panel.h b/src/ui/widget/panel.h
index 7b2836fe8..370779586 100644
--- a/src/ui/widget/panel.h
+++ b/src/ui/widget/panel.h
@@ -31,13 +31,7 @@ class SPDocument;
namespace Gtk {
class CheckMenuItem;
-
-#if WITH_GTKMM_3_0
class ButtonBox;
-#else
- class HButtonBox;
-#endif
-
class MenuItem;
}
@@ -64,12 +58,7 @@ namespace Widget {
* @see UI::Dialog::DesktopTracker to handle desktop change, selection change and selected object modifications.
* @see UI::Dialog::DialogManager manages the dialogs within inkscape.
*/
-#if WITH_GTKMM_3_0
class Panel : public Gtk::Box {
-#else
-class Panel : public Gtk::VBox {
-#endif
-
public:
static void prep();
@@ -172,12 +161,7 @@ private:
Gtk::EventBox _menu_popper;
Gtk::Button _close_button;
Gtk::Menu *_menu;
-
-#if WITH_GTKMM_3_0
- Gtk::ButtonBox *_action_area; //< stores response buttons
-#else
- Gtk::HButtonBox *_action_area; //< stores response buttons
-#endif
+ Gtk::ButtonBox *_action_area; //< stores response buttons
std::vector<Gtk::Widget *> _non_horizontal;
std::vector<Gtk::Widget *> _non_vertical;
diff --git a/src/ui/widget/point.cpp b/src/ui/widget/point.cpp
index 2c2eb5e8a..6b31b1856 100644
--- a/src/ui/widget/point.cpp
+++ b/src/ui/widget/point.cpp
@@ -50,11 +50,7 @@ Point::Point(Glib::ustring const &label, Glib::ustring const &tooltip,
}
Point::Point(Glib::ustring const &label, Glib::ustring const &tooltip,
-#if WITH_GTKMM_3_0
Glib::RefPtr<Gtk::Adjustment> &adjust,
-#else
- Gtk::Adjustment &adjust,
-#endif
unsigned digits,
Glib::ustring const &suffix,
Glib::ustring const &icon,
diff --git a/src/ui/widget/point.h b/src/ui/widget/point.h
index 17078df8f..71bfd8473 100644
--- a/src/ui/widget/point.h
+++ b/src/ui/widget/point.h
@@ -82,11 +82,7 @@ public:
*/
Point( Glib::ustring const &label,
Glib::ustring const &tooltip,
-#if WITH_GTKMM_3_0
Glib::RefPtr<Gtk::Adjustment> &adjust,
-#else
- Gtk::Adjustment &adjust,
-#endif
unsigned digits = 0,
Glib::ustring const &suffix = "",
Glib::ustring const &icon = "",
diff --git a/src/ui/widget/preferences-widget.cpp b/src/ui/widget/preferences-widget.cpp
index e0eba3934..1205cd012 100644
--- a/src/ui/widget/preferences-widget.cpp
+++ b/src/ui/widget/preferences-widget.cpp
@@ -51,14 +51,9 @@ DialogPage::DialogPage()
{
set_border_width(12);
-#if WITH_GTKMM_3_0
set_orientation(Gtk::ORIENTATION_VERTICAL);
set_column_spacing(12);
set_row_spacing(6);
-#else
- set_col_spacings(12);
- set_row_spacings(6);
-#endif
}
/**
@@ -97,12 +92,7 @@ void DialogPage::add_line(bool indent,
// be indented if desired
Gtk::Alignment* w_alignment = Gtk::manage(new Gtk::Alignment());
w_alignment->add(*hb);
-
-#if WITH_GTKMM_3_0
w_alignment->set_valign(Gtk::ALIGN_CENTER);
-#else
- guint row = property_n_rows();
-#endif
// Add a label in the first column if provided
if (label != "")
@@ -118,17 +108,12 @@ void DialogPage::add_line(bool indent,
if (indent)
label_alignment->set_padding(0, 0, 12, 0);
-#if WITH_GTKMM_3_0
label_alignment->set_valign(Gtk::ALIGN_CENTER);
add(*label_alignment);
attach_next_to(*w_alignment, *label_alignment, Gtk::POS_RIGHT, 1, 1);
-#else
- attach(*label_alignment, 0, 1, row, row + 1, Gtk::FILL, Gtk::AttachOptions(), 0, 0);
-#endif
}
// Now add the widget to the bottom of the dialog
-#if WITH_GTKMM_3_0
if (label == "")
{
if (indent)
@@ -141,17 +126,6 @@ void DialogPage::add_line(bool indent,
g_value_set_int(&width, 2);
gtk_container_child_set_property(GTK_CONTAINER(gobj()), GTK_WIDGET(w_alignment->gobj()), "width", &width);
}
-#else
- // The widget should span two columns if there is no label
- int w_col_span = 1;
- if (label == "")
- w_col_span = 2;
-
- attach(*w_alignment, 2 - w_col_span, 2, row, row + 1,
- Gtk::FILL | Gtk::EXPAND,
- Gtk::AttachOptions(),
- 0, 0);
-#endif
// Add a label on the right of the widget if desired
if (suffix != "")
@@ -170,18 +144,8 @@ void DialogPage::add_group_header(Glib::ustring name)
Glib::ustring("</b>"/*</span>"*/) , Gtk::ALIGN_START , Gtk::ALIGN_CENTER, true));
label_widget->set_use_markup(true);
-
-#if WITH_GTKMM_3_0
label_widget->set_valign(Gtk::ALIGN_CENTER);
add(*label_widget);
-// if (row != 1)
- // set_row_spacing(row - 1, 18);
-#else
- int row = property_n_rows();
- attach(*label_widget , 0, 4, row, row + 1, Gtk::FILL, Gtk::AttachOptions(), 0, 0);
- if (row != 1)
- set_row_spacing(row - 1, 18);
-#endif
}
}
@@ -423,24 +387,6 @@ ZoomCorrRuler::draw_marks(Cairo::RefPtr<Cairo::Context> cr, double dist, int maj
}
}
-#if !WITH_GTKMM_3_0
-bool
-ZoomCorrRuler::on_expose_event(GdkEventExpose *event) {
- bool result = false;
-
- if(get_is_drawable())
- {
- Cairo::RefPtr<Cairo::Context> cr = get_window()->create_cairo_context();
- cr->rectangle(event->area.x, event->area.y,
- event->area.width, event->area.height);
- cr->clip();
- result = on_draw(cr);
- }
-
- return result;
-}
-#endif
-
bool
ZoomCorrRuler::on_draw(const Cairo::RefPtr<Cairo::Context>& cr) {
Glib::RefPtr<Gdk::Window> window = get_window();
@@ -544,11 +490,7 @@ ZoomCorrRulerSlider::init(int ruler_width, int ruler_height, double lower, doubl
_ruler.set_size(ruler_width, ruler_height);
-#if WITH_GTKMM_3_0
_slider = Gtk::manage(new Gtk::Scale(Gtk::ORIENTATION_HORIZONTAL));
-#else
- _slider = Gtk::manage(new Gtk::HScale());
-#endif
_slider->set_size_request(_ruler.width(), -1);
_slider->set_range (lower, upper);
@@ -575,21 +517,13 @@ ZoomCorrRulerSlider::init(int ruler_width, int ruler_height, double lower, doubl
alignment1->add(_sb);
alignment2->add(_unit);
-#if WITH_GTKMM_3_0
- Gtk::Grid *table = Gtk::manage(new Gtk::Grid());
+ auto table = Gtk::manage(new Gtk::Grid());
table->attach(*_slider, 0, 0, 1, 1);
alignment1->set_halign(Gtk::ALIGN_CENTER);
table->attach(*alignment1, 1, 0, 1, 1);
table->attach(_ruler, 0, 1, 1, 1);
alignment2->set_halign(Gtk::ALIGN_CENTER);
table->attach(*alignment2, 1, 1, 1, 1);
-#else
- Gtk::Table *table = Gtk::manage(new Gtk::Table());
- table->attach(*_slider, 0, 1, 0, 1);
- table->attach(*alignment1, 1, 2, 0, 1, static_cast<Gtk::AttachOptions>(0));
- table->attach(_ruler, 0, 1, 1, 2);
- table->attach(*alignment2, 1, 2, 1, 2, static_cast<Gtk::AttachOptions>(0));
-#endif
pack_start(*table, Gtk::PACK_SHRINK);
}
@@ -636,11 +570,7 @@ PrefSlider::init(Glib::ustring const &prefs_path,
freeze = false;
-#if WITH_GTKMM_3_0
_slider = Gtk::manage(new Gtk::Scale(Gtk::ORIENTATION_HORIZONTAL));
-#else
- _slider = Gtk::manage(new Gtk::HScale());
-#endif
_slider->set_range (lower, upper);
_slider->set_increments (step_increment, page_increment);
@@ -657,17 +587,11 @@ PrefSlider::init(Glib::ustring const &prefs_path,
Gtk::Alignment *alignment1 = Gtk::manage(new Gtk::Alignment(0.5,1,0,0));
alignment1->add(_sb);
-#if WITH_GTKMM_3_0
- Gtk::Grid *table = Gtk::manage(new Gtk::Grid());
+ auto table = Gtk::manage(new Gtk::Grid());
_slider->set_hexpand();
table->attach(*_slider, 0, 0, 1, 1);
alignment1->set_halign(Gtk::ALIGN_CENTER);
table->attach(*alignment1, 1, 0, 1, 1);
-#else
- Gtk::Table *table = Gtk::manage(new Gtk::Table());
- table->attach(*_slider, 0, 1, 0, 1);
- table->attach(*alignment1, 1, 2, 0, 1, static_cast<Gtk::AttachOptions>(0));
-#endif
this->pack_start(*table, Gtk::PACK_EXPAND_WIDGET);
}
diff --git a/src/ui/widget/preferences-widget.h b/src/ui/widget/preferences-widget.h
index 1d2d77699..142793509 100644
--- a/src/ui/widget/preferences-widget.h
+++ b/src/ui/widget/preferences-widget.h
@@ -30,12 +30,7 @@
#include <gtkmm/radiobutton.h>
#include <gtkmm/comboboxtext.h>
#include <gtkmm/drawingarea.h>
-
-#if WITH_GTKMM_3_0
#include <gtkmm/grid.h>
-#else
-#include <gtkmm/table.h>
-#endif
#include "ui/widget/color-picker.h"
#include "ui/widget/unit-menu.h"
@@ -43,11 +38,7 @@
#include "ui/widget/scalar-unit.h"
namespace Gtk {
-#if WITH_GTKMM_3_0
class Scale;
-#else
-class HScale;
-#endif
}
namespace Inkscape {
@@ -126,10 +117,6 @@ public:
static const double textpadding;
private:
-#if !WITH_GTKMM_3_0
- bool on_expose_event(GdkEventExpose *event);
-#endif
-
bool on_draw(const Cairo::RefPtr<Cairo::Context>& cr);
void draw_marks(Cairo::RefPtr<Cairo::Context> cr, double dist, int major_interval);
@@ -155,11 +142,7 @@ private:
Inkscape::UI::Widget::SpinButton _sb;
UnitMenu _unit;
-#if WITH_GTKMM_3_0
Gtk::Scale* _slider;
-#else
- Gtk::HScale* _slider;
-#endif
ZoomCorrRuler _ruler;
bool freeze; // used to block recursive updates of slider and spinbutton
};
@@ -178,11 +161,7 @@ private:
Glib::ustring _prefs_path;
Inkscape::UI::Widget::SpinButton _sb;
-#if WITH_GTKMM_3_0
Gtk::Scale* _slider;
-#else
- Gtk::HScale* _slider;
-#endif
bool freeze; // used to block recursive updates of slider and spinbutton
};
@@ -279,11 +258,7 @@ protected:
void on_changed();
};
-#if WITH_GTKMM_3_0
class DialogPage : public Gtk::Grid
-#else
-class DialogPage : public Gtk::Table
-#endif
{
public:
DialogPage();
diff --git a/src/ui/widget/random.cpp b/src/ui/widget/random.cpp
index b6ea16b89..ba3b025ba 100644
--- a/src/ui/widget/random.cpp
+++ b/src/ui/widget/random.cpp
@@ -47,11 +47,7 @@ Random::Random(Glib::ustring const &label, Glib::ustring const &tooltip,
}
Random::Random(Glib::ustring const &label, Glib::ustring const &tooltip,
-#if WITH_GTKMM_3_0
Glib::RefPtr<Gtk::Adjustment> &adjust,
-#else
- Gtk::Adjustment &adjust,
-#endif
unsigned digits,
Glib::ustring const &suffix,
Glib::ustring const &icon,
diff --git a/src/ui/widget/random.h b/src/ui/widget/random.h
index dc2b457c2..d86ab6246 100644
--- a/src/ui/widget/random.h
+++ b/src/ui/widget/random.h
@@ -75,11 +75,7 @@ public:
*/
Random(Glib::ustring const &label,
Glib::ustring const &tooltip,
-#if WITH_GTKMM_3_0
Glib::RefPtr<Gtk::Adjustment> &adjust,
-#else
- Gtk::Adjustment &adjust,
-#endif
unsigned digits = 0,
Glib::ustring const &suffix = "",
Glib::ustring const &icon = "",
diff --git a/src/ui/widget/scalar.cpp b/src/ui/widget/scalar.cpp
index fca8a7974..434c2c0bb 100644
--- a/src/ui/widget/scalar.cpp
+++ b/src/ui/widget/scalar.cpp
@@ -43,11 +43,7 @@ Scalar::Scalar(Glib::ustring const &label, Glib::ustring const &tooltip,
}
Scalar::Scalar(Glib::ustring const &label, Glib::ustring const &tooltip,
-#if WITH_GTKMM_3_0
Glib::RefPtr<Gtk::Adjustment> &adjust,
-#else
- Gtk::Adjustment &adjust,
-#endif
unsigned digits,
Glib::ustring const &suffix,
Glib::ustring const &icon,
@@ -141,11 +137,7 @@ void Scalar::update()
void Scalar::addSlider()
{
-#if WITH_GTKMM_3_0
- Gtk::Scale *scale = new Gtk::Scale(static_cast<SpinButton*>(_widget)->get_adjustment());
-#else
- Gtk::HScale *scale = new Gtk::HScale( * static_cast<SpinButton*>(_widget)->get_adjustment() );
-#endif
+ auto scale = new Gtk::Scale(static_cast<SpinButton*>(_widget)->get_adjustment());
scale->set_draw_value(false);
add (*manage (scale));
}
diff --git a/src/ui/widget/scalar.h b/src/ui/widget/scalar.h
index 86d7aee28..847790b96 100644
--- a/src/ui/widget/scalar.h
+++ b/src/ui/widget/scalar.h
@@ -73,11 +73,7 @@ public:
*/
Scalar(Glib::ustring const &label,
Glib::ustring const &tooltip,
-#if WITH_GTKMM_3_0
Glib::RefPtr<Gtk::Adjustment> &adjust,
-#else
- Gtk::Adjustment &adjust,
-#endif
unsigned digits = 0,
Glib::ustring const &suffix = "",
Glib::ustring const &icon = "",
diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp
index 7bbfa08db..fd83a62c9 100644
--- a/src/ui/widget/selected-style.cpp
+++ b/src/ui/widget/selected-style.cpp
@@ -118,11 +118,7 @@ SelectedStyle::SelectedStyle(bool /*layout*/)
current_stroke_width(0),
_desktop (NULL),
-#if WITH_GTKMM_3_0
_table(),
-#else
- _table(2, 6),
-#endif
_fill_label (_("Fill:")),
_stroke_label (_("Stroke:")),
_opacity_label (_("O:")),
@@ -134,11 +130,7 @@ SelectedStyle::SelectedStyle(bool /*layout*/)
_stroke_flag_place (),
_opacity_place (),
-#if WITH_GTKMM_3_0
_opacity_adjustment(Gtk::Adjustment::create(100, 0.0, 100, 1.0, 10.0)),
-#else
- _opacity_adjustment (100, 0.0, 100, 1.0, 10.0),
-#endif
_opacity_sb (0.02, 0),
_stroke (),
@@ -161,13 +153,8 @@ SelectedStyle::SelectedStyle(bool /*layout*/)
_opacity_label.set_alignment(0.0, 0.5);
_opacity_label.set_padding(0, 0);
-#if WITH_GTKMM_3_0
_table.set_column_spacing(2);
_table.set_row_spacing(0);
-#else
- _table.set_col_spacings (2);
- _table.set_row_spacings (0);
-#endif
for (int i = SS_FILL; i <= SS_STROKE; i++) {
@@ -374,7 +361,6 @@ SelectedStyle::SelectedStyle(bool /*layout*/)
_opacity_sb.set_size_request (SELECTED_STYLE_SB_WIDTH, -1);
_opacity_sb.set_sensitive (false);
-#if WITH_GTKMM_3_0
_table.attach(_fill_label, 0, 0, 1, 1);
_table.attach(_stroke_label, 0, 1, 1, 1);
@@ -383,26 +369,11 @@ SelectedStyle::SelectedStyle(bool /*layout*/)
_table.attach(_fill_place, 2, 0, 1, 1);
_table.attach(_stroke, 2, 1, 1, 1);
-#else
- _table.attach(_fill_label, 0,1, 0,1, Gtk::FILL, Gtk::SHRINK);
- _table.attach(_stroke_label, 0,1, 1,2, Gtk::FILL, Gtk::SHRINK);
-
- _table.attach(_fill_flag_place, 1,2, 0,1, Gtk::SHRINK, Gtk::SHRINK);
- _table.attach(_stroke_flag_place, 1,2, 1,2, Gtk::SHRINK, Gtk::SHRINK);
-
- _table.attach(_fill_place, 2,3, 0,1);
- _table.attach(_stroke, 2,3, 1,2);
-#endif
_opacity_place.add(_opacity_label);
-#if WITH_GTKMM_3_0
_table.attach(_opacity_place, 4, 0, 1, 2);
_table.attach(_opacity_sb, 5, 0, 1, 2);
-#else
- _table.attach(_opacity_place, 4,5, 0,2, Gtk::SHRINK, Gtk::SHRINK);
- _table.attach(_opacity_sb, 5,6, 0,2, Gtk::SHRINK, Gtk::SHRINK);
-#endif
pack_start(_table, true, true, 2);
@@ -1115,11 +1086,7 @@ SelectedStyle::update()
if (_opacity_blocked) break;
_opacity_blocked = true;
_opacity_sb.set_sensitive(true);
-#if WITH_GTKMM_3_0
_opacity_adjustment->set_value(SP_SCALE24_TO_FLOAT(query.opacity.value) * 100);
-#else
- _opacity_adjustment.set_value(SP_SCALE24_TO_FLOAT(query.opacity.value) * 100);
-#endif
_opacity_blocked = false;
break;
}
@@ -1219,11 +1186,7 @@ void SelectedStyle::on_opacity_changed ()
_opacity_blocked = true;
SPCSSAttr *css = sp_repr_css_attr_new ();
Inkscape::CSSOStringStream os;
-#if WITH_GTKMM_3_0
os << CLAMP ((_opacity_adjustment->get_value() / 100), 0.0, 1.0);
-#else
- os << CLAMP ((_opacity_adjustment.get_value() / 100), 0.0, 1.0);
-#endif
sp_repr_css_set_property (css, "opacity", os.str().c_str());
// FIXME: workaround for GTK breakage: display interruptibility sometimes results in GTK
// sending multiple value-changed events. As if when Inkscape interrupts redraw for main loop
@@ -1352,11 +1315,7 @@ RotateableSwatch::do_motion(double by, guint modifier) {
g_object_unref(pixbuf);
gdk_window_set_cursor(gtk_widget_get_window(w), cr);
-#if GTK_CHECK_VERSION(3,0,0)
g_object_unref(cr);
-#else
- gdk_cursor_unref(cr);
-#endif
cr = NULL;
cr_set = true;
}
@@ -1420,11 +1379,7 @@ RotateableSwatch::do_release(double by, guint modifier) {
GtkWidget *w = GTK_WIDGET(gobj());
gdk_window_set_cursor(gtk_widget_get_window(w), NULL);
if (cr) {
-#if GTK_CHECK_VERSION(3,0,0)
g_object_unref(cr);
-#else
- gdk_cursor_unref (cr);
-#endif
cr = NULL;
}
cr_set = false;
diff --git a/src/ui/widget/selected-style.h b/src/ui/widget/selected-style.h
index 804a6fef6..efac29f73 100644
--- a/src/ui/widget/selected-style.h
+++ b/src/ui/widget/selected-style.h
@@ -16,12 +16,7 @@
#endif
#include <gtkmm/box.h>
-
-#if WITH_GTKMM_3_0
-# include <gtkmm/grid.h>
-#else
-# include <gtkmm/table.h>
-#endif
+#include <gtkmm/grid.h>
#include <gtkmm/label.h>
#include <gtkmm/eventbox.h>
@@ -140,11 +135,7 @@ public:
protected:
SPDesktop *_desktop;
-#if WITH_GTKMM_3_0
Gtk::Grid _table;
-#else
- Gtk::Table _table;
-#endif
Gtk::Label _fill_label;
Gtk::Label _stroke_label;
@@ -157,11 +148,7 @@ protected:
Gtk::EventBox _stroke_flag_place;
Gtk::EventBox _opacity_place;
-#if WITH_GTKMM_3_0
Glib::RefPtr<Gtk::Adjustment> _opacity_adjustment;
-#else
- Gtk::Adjustment _opacity_adjustment;
-#endif
Inkscape::UI::Widget::SpinButton _opacity_sb;
Gtk::Label _na[2];
diff --git a/src/ui/widget/spin-scale.cpp b/src/ui/widget/spin-scale.cpp
index d6b34a5b4..f74626d9b 100644
--- a/src/ui/widget/spin-scale.cpp
+++ b/src/ui/widget/spin-scale.cpp
@@ -11,7 +11,7 @@
#include <glibmm/i18n.h>
#include <glibmm/stringutils.h>
-#include "ui/widget/gimpspinscale.h"
+#include "widgets/gimp/gimpspinscale.h"
namespace Inkscape {
namespace UI {
@@ -21,13 +21,8 @@ SpinScale::SpinScale(const char* label, double value, double lower, double upper
double /*climb_rate*/, int digits, const SPAttributeEnum a, const char* tip_text)
: AttrWidget(a, value)
{
-#if WITH_GTKMM_3_0
_adjustment = Gtk::Adjustment::create(value, lower, upper, step_inc);
_spinscale = gimp_spin_scale_new (_adjustment->gobj(), label, digits);
-#else
- _adjustment = new Gtk::Adjustment(value, lower, upper, step_inc);
- _spinscale = gimp_spin_scale_new (_adjustment->gobj(), label, digits);
-#endif
signal_value_changed().connect(signal_attr_changed().make_slot());
@@ -41,12 +36,10 @@ SpinScale::SpinScale(const char* label, double value, double lower, double upper
}
SpinScale::SpinScale(const char* label,
-#if WITH_GTKMM_3_0
- Glib::RefPtr<Gtk::Adjustment> adj,
-#else
- Gtk::Adjustment *adj,
-#endif
- int digits, const SPAttributeEnum a, const char* tip_text)
+ Glib::RefPtr<Gtk::Adjustment> adj,
+ int digits,
+ const SPAttributeEnum a,
+ const char* tip_text)
: AttrWidget(a, 0.0),
_adjustment(adj)
@@ -110,19 +103,12 @@ void SpinScale::set_appearance(const gchar* appearance)
gimp_spin_scale_set_appearance(_spinscale, appearance);
}
-#if WITH_GTKMM_3_0
-const Glib::RefPtr<Gtk::Adjustment> SpinScale::get_adjustment() const
-#else
-const Gtk::Adjustment *SpinScale::get_adjustment() const
-#endif
+const decltype(SpinScale::_adjustment) SpinScale::get_adjustment() const
{
return _adjustment;
}
-#if WITH_GTKMM_3_0
-Glib::RefPtr<Gtk::Adjustment> SpinScale::get_adjustment()
-#else
-Gtk::Adjustment *SpinScale::get_adjustment()
-#endif
+
+decltype(SpinScale::_adjustment) SpinScale::get_adjustment()
{
return _adjustment;
}
diff --git a/src/ui/widget/spin-scale.h b/src/ui/widget/spin-scale.h
index 50e4fc953..d7030bed3 100644
--- a/src/ui/widget/spin-scale.h
+++ b/src/ui/widget/spin-scale.h
@@ -36,12 +36,8 @@ public:
int digits, const SPAttributeEnum a = SP_ATTR_INVALID, const char* tip_text = NULL);
SpinScale(const char* label,
-#if WITH_GTKMM_3_0
- Glib::RefPtr<Gtk::Adjustment> adj,
-#else
- Gtk::Adjustment *adj,
-#endif
- int digits, const SPAttributeEnum a = SP_ATTR_INVALID, const char* tip_text = NULL);
+ Glib::RefPtr<Gtk::Adjustment> adj,
+ int digits, const SPAttributeEnum a = SP_ATTR_INVALID, const char* tip_text = NULL);
virtual Glib::ustring get_as_attribute() const;
virtual void set_from_attribute(SPObject*);
@@ -52,23 +48,14 @@ public:
void set_value(const double);
void set_focuswidget(GtkWidget *widget);
void set_appearance(const gchar* appearance);
-
-#if WITH_GTKMM_3_0
- const Glib::RefPtr<Gtk::Adjustment> get_adjustment() const;
- Glib::RefPtr<Gtk::Adjustment> get_adjustment();
-#else
- const Gtk::Adjustment *get_adjustment() const;
- Gtk::Adjustment *get_adjustment();
-#endif
private:
-#if WITH_GTKMM_3_0
Glib::RefPtr<Gtk::Adjustment> _adjustment;
-#else
- Gtk::Adjustment *_adjustment;
-#endif
-
GtkWidget *_spinscale;
+
+public:
+ const decltype(_adjustment) get_adjustment() const;
+ decltype(_adjustment) get_adjustment();
};
diff --git a/src/ui/widget/spin-slider.cpp b/src/ui/widget/spin-slider.cpp
index 9b361ae78..f17b9b26c 100644
--- a/src/ui/widget/spin-slider.cpp
+++ b/src/ui/widget/spin-slider.cpp
@@ -20,11 +20,7 @@ namespace Widget {
SpinSlider::SpinSlider(double value, double lower, double upper, double step_inc,
double climb_rate, int digits, const SPAttributeEnum a, const char* tip_text)
: AttrWidget(a, value),
-#if WITH_GTKMM_3_0
_adjustment(Gtk::Adjustment::create(value, lower, upper, step_inc)),
-#else
- _adjustment(value, lower, upper, step_inc),
-#endif
_scale(_adjustment), _spin(_adjustment, climb_rate, digits)
{
signal_value_changed().connect(signal_attr_changed().make_slot());
@@ -43,11 +39,7 @@ SpinSlider::SpinSlider(double value, double lower, double upper, double step_inc
Glib::ustring SpinSlider::get_as_attribute() const
{
-#if WITH_GTKMM_3_0
- const double val = _adjustment->get_value();
-#else
- const double val = _adjustment.get_value();
-#endif
+ const auto val = _adjustment->get_value();
if(_spin.get_digits() == 0)
return Glib::Ascii::dtostr((int)val);
@@ -58,77 +50,43 @@ Glib::ustring SpinSlider::get_as_attribute() const
void SpinSlider::set_from_attribute(SPObject* o)
{
const gchar* val = attribute_value(o);
-#if WITH_GTKMM_3_0
if(val)
_adjustment->set_value(Glib::Ascii::strtod(val));
else
_adjustment->set_value(get_default()->as_double());
-#else
- if(val)
- _adjustment.set_value(Glib::Ascii::strtod(val));
- else
- _adjustment.set_value(get_default()->as_double());
-#endif
}
Glib::SignalProxy0<void> SpinSlider::signal_value_changed()
{
-#if WITH_GTKMM_3_0
return _adjustment->signal_value_changed();
-#else
- return _adjustment.signal_value_changed();
-#endif
}
double SpinSlider::get_value() const
{
-#if WITH_GTKMM_3_0
return _adjustment->get_value();
-#else
- return _adjustment.get_value();
-#endif
}
void SpinSlider::set_value(const double val)
{
-#if WITH_GTKMM_3_0
_adjustment->set_value(val);
-#else
- _adjustment.set_value(val);
-#endif
}
-#if WITH_GTKMM_3_0
-const Glib::RefPtr<Gtk::Adjustment> SpinSlider::get_adjustment() const
-#else
-const Gtk::Adjustment& SpinSlider::get_adjustment() const
-#endif
+const decltype(SpinSlider::_adjustment) SpinSlider::get_adjustment() const
{
return _adjustment;
}
-#if WITH_GTKMM_3_0
-Glib::RefPtr<Gtk::Adjustment> SpinSlider::get_adjustment()
-#else
-Gtk::Adjustment& SpinSlider::get_adjustment()
-#endif
+
+decltype(SpinSlider::_adjustment) SpinSlider::get_adjustment()
{
return _adjustment;
}
-#if WITH_GTKMM_3_0
const Gtk::Scale& SpinSlider::get_scale() const
-#else
-const Gtk::HScale& SpinSlider::get_scale() const
-#endif
{
return _scale;
}
-#if WITH_GTKMM_3_0
Gtk::Scale& SpinSlider::get_scale()
-#else
-Gtk::HScale& SpinSlider::get_scale()
-#endif
{
return _scale;
}
@@ -157,15 +115,9 @@ DualSpinSlider::DualSpinSlider(double value, double lower, double upper, double
{
signal_value_changed().connect(signal_attr_changed().make_slot());
-#if WITH_GTKMM_3_0
_s1.get_adjustment()->signal_value_changed().connect(_signal_value_changed.make_slot());
_s2.get_adjustment()->signal_value_changed().connect(_signal_value_changed.make_slot());
_s1.get_adjustment()->signal_value_changed().connect(sigc::mem_fun(*this, &DualSpinSlider::update_linked));
-#else
- _s1.get_adjustment().signal_value_changed().connect(_signal_value_changed.make_slot());
- _s2.get_adjustment().signal_value_changed().connect(_signal_value_changed.make_slot());
- _s1.get_adjustment().signal_value_changed().connect(sigc::mem_fun(*this, &DualSpinSlider::update_linked));
-#endif
_link.signal_toggled().connect(sigc::mem_fun(*this, &DualSpinSlider::link_toggled));
Gtk::VBox* vb = Gtk::manage(new Gtk::VBox);
@@ -202,13 +154,8 @@ void DualSpinSlider::set_from_attribute(SPObject* o)
_link.set_active(toks[1] == 0);
-#if WITH_GTKMM_3_0
_s1.get_adjustment()->set_value(v1);
_s2.get_adjustment()->set_value(v2);
-#else
- _s1.get_adjustment().set_value(v1);
- _s2.get_adjustment().set_value(v2);
-#endif
g_strfreev(toks);
}
diff --git a/src/ui/widget/spin-slider.h b/src/ui/widget/spin-slider.h
index a5999f14f..5a29c1b67 100644
--- a/src/ui/widget/spin-slider.h
+++ b/src/ui/widget/spin-slider.h
@@ -42,17 +42,8 @@ public:
double get_value() const;
void set_value(const double);
-#if WITH_GTKMM_3_0
- const Glib::RefPtr<Gtk::Adjustment> get_adjustment() const;
- Glib::RefPtr<Gtk::Adjustment> get_adjustment();
const Gtk::Scale& get_scale() const;
Gtk::Scale& get_scale();
-#else
- const Gtk::Adjustment& get_adjustment() const;
- Gtk::Adjustment& get_adjustment();
- const Gtk::HScale& get_scale() const;
- Gtk::HScale& get_scale();
-#endif
const Inkscape::UI::Widget::SpinButton& get_spin_button() const;
Inkscape::UI::Widget::SpinButton& get_spin_button();
@@ -60,14 +51,13 @@ public:
// Change the SpinSlider into a SpinButton with AttrWidget support)
void remove_scale();
private:
-#if WITH_GTKMM_3_0
Glib::RefPtr<Gtk::Adjustment> _adjustment;
Gtk::Scale _scale;
-#else
- Gtk::Adjustment _adjustment;
- Gtk::HScale _scale;
-#endif
Inkscape::UI::Widget::SpinButton _spin;
+
+public:
+ const decltype(_adjustment) get_adjustment() const;
+ decltype(_adjustment) get_adjustment();
};
/**
diff --git a/src/ui/widget/spinbutton.h b/src/ui/widget/spinbutton.h
index 30ffc7d77..ae571994b 100644
--- a/src/ui/widget/spinbutton.h
+++ b/src/ui/widget/spinbutton.h
@@ -36,11 +36,7 @@ public:
{
connect_signals();
};
-#if GTK_CHECK_VERSION(3,0,0)
explicit SpinButton(Glib::RefPtr<Gtk::Adjustment>& adjustment, double climb_rate = 0.0, guint digits = 0)
-#else
- explicit SpinButton(Gtk::Adjustment& adjustment, double climb_rate = 0.0, guint digits = 0)
-#endif
: Gtk::SpinButton(adjustment, climb_rate, digits),
_unit_menu(NULL),
_unit_tracker(NULL),
diff --git a/src/ui/widget/style-subject.cpp b/src/ui/widget/style-subject.cpp
index 811ed2221..a779e6feb 100644
--- a/src/ui/widget/style-subject.cpp
+++ b/src/ui/widget/style-subject.cpp
@@ -54,11 +54,13 @@ Inkscape::Selection *StyleSubject::Selection::_getSelection() const {
}
}
-std::vector<SPObject*> StyleSubject::Selection::list(){
+std::vector<SPObject*> StyleSubject::Selection::list() {
Inkscape::Selection *selection = _getSelection();
- if(selection)
- return selection->list();
- else return std::vector<SPObject*>();
+ if(selection) {
+ return std::vector<SPObject *>(selection->objects().begin(), selection->objects().end());
+ }
+
+ return std::vector<SPObject*>();
}
Geom::OptRect StyleSubject::Selection::getBounds(SPItem::BBoxType type) {
diff --git a/src/ui/widget/style-swatch.cpp b/src/ui/widget/style-swatch.cpp
index 2952a3f97..f8eac1c78 100644
--- a/src/ui/widget/style-swatch.cpp
+++ b/src/ui/widget/style-swatch.cpp
@@ -28,11 +28,7 @@
#include "verbs.h"
#include <glibmm/i18n.h>
-#if WITH_GTKMM_3_0
-# include <gtkmm/grid.h>
-#else
-# include <gtkmm/table.h>
-#endif
+#include <gtkmm/grid.h>
enum {
SS_FILL,
@@ -111,11 +107,7 @@ StyleSwatch::StyleSwatch(SPCSSAttr *css, gchar const *main_tip)
_css(NULL),
_tool_obs(NULL),
_style_obs(NULL),
-#if WITH_GTKMM_3_0
_table(Gtk::manage(new Gtk::Grid())),
-#else
- _table(Gtk::manage(new Gtk::Table(2, 6))),
-#endif
_sw_unit(NULL)
{
set_name("StyleSwatch");
@@ -133,13 +125,8 @@ StyleSwatch::StyleSwatch(SPCSSAttr *css, gchar const *main_tip)
_opacity_value.set_alignment(0.0, 0.5);
_opacity_value.set_padding(0, 0);
-#if WITH_GTKMM_3_0
_table->set_column_spacing(2);
_table->set_row_spacing(0);
-#else
- _table->set_col_spacings(2);
- _table->set_row_spacings(0);
-#endif
_stroke.pack_start(_place[SS_STROKE]);
_stroke_width_place.add(_stroke_width);
@@ -147,19 +134,11 @@ StyleSwatch::StyleSwatch(SPCSSAttr *css, gchar const *main_tip)
_opacity_place.add(_opacity_value);
-#if WITH_GTKMM_3_0
_table->attach(_label[SS_FILL], 0, 0, 1, 1);
_table->attach(_label[SS_STROKE], 0, 1, 1, 1);
_table->attach(_place[SS_FILL], 1, 0, 1, 1);
_table->attach(_stroke, 1, 1, 1, 1);
_table->attach(_opacity_place, 2, 0, 1, 2);
-#else
- _table->attach(_label[SS_FILL], 0,1, 0,1, Gtk::FILL, Gtk::SHRINK);
- _table->attach(_label[SS_STROKE], 0,1, 1,2, Gtk::FILL, Gtk::SHRINK);
- _table->attach(_place[SS_FILL], 1,2, 0,1);
- _table->attach(_stroke, 1,2, 1,2);
- _table->attach(_opacity_place, 2,3, 0,2, Gtk::SHRINK, Gtk::SHRINK);
-#endif
_swatch.add(*_table);
pack_start(_swatch, true, true, 0);
diff --git a/src/ui/widget/style-swatch.h b/src/ui/widget/style-swatch.h
index 0016e0256..81a907d16 100644
--- a/src/ui/widget/style-swatch.h
+++ b/src/ui/widget/style-swatch.h
@@ -29,11 +29,7 @@ class SPStyle;
class SPCSSAttr;
namespace Gtk {
-#if WITH_GTKMM_3_0
class Grid;
-#else
-class Table;
-#endif
}
namespace Inkscape {
@@ -75,11 +71,7 @@ private:
Gtk::EventBox _swatch;
-#if WITH_GTKMM_3_0
Gtk::Grid *_table;
-#else
- Gtk::Table *_table;
-#endif
Gtk::Label _label[2];
Gtk::EventBox _place[2];
diff --git a/src/ui/widget/tolerance-slider.cpp b/src/ui/widget/tolerance-slider.cpp
index e904666cc..dea14585d 100644
--- a/src/ui/widget/tolerance-slider.cpp
+++ b/src/ui/widget/tolerance-slider.cpp
@@ -76,12 +76,8 @@ void ToleranceSlider::init (const Glib::ustring& label1, const Glib::ustring& la
// align the label with the checkbox text above by indenting 22 px.
_hbox->pack_start(*theLabel1, Gtk::PACK_EXPAND_WIDGET, 22);
-#if WITH_GTKMM_3_0
_hscale = Gtk::manage(new Gtk::Scale(Gtk::ORIENTATION_HORIZONTAL));
_hscale->set_range(1.0, 51.0);
-#else
- _hscale = Gtk::manage (new Gtk::HScale (1.0, 51, 1.0));
-#endif
theLabel1->set_mnemonic_widget (*_hscale);
_hscale->set_draw_value (true);
@@ -121,11 +117,7 @@ void ToleranceSlider::init (const Glib::ustring& label1, const Glib::ustring& la
void ToleranceSlider::setValue (double val)
{
-#if WITH_GTKMM_3_0
- Glib::RefPtr<Gtk::Adjustment> adj = _hscale->get_adjustment();
-#else
- Gtk::Adjustment *adj = _hscale->get_adjustment();
-#endif
+ auto adj = _hscale->get_adjustment();
adj->set_lower (1.0);
adj->set_upper (51.0);
diff --git a/src/ui/widget/tolerance-slider.h b/src/ui/widget/tolerance-slider.h
index 7ae8e4712..3d2548ebe 100644
--- a/src/ui/widget/tolerance-slider.h
+++ b/src/ui/widget/tolerance-slider.h
@@ -14,11 +14,7 @@
namespace Gtk {
class RadioButton;
-#if WITH_GTKMM_3_0
class Scale;
-#else
-class HScale;
-#endif
}
namespace Inkscape {
@@ -60,13 +56,7 @@ protected:
void on_toggled();
void update (double val);
Gtk::HBox *_hbox;
-
-#if WITH_GTKMM_3_0
Gtk::Scale *_hscale;
-#else
- Gtk::HScale *_hscale;
-#endif
-
Gtk::RadioButtonGroup _radio_button_group;
Gtk::RadioButton *_button1;
Gtk::RadioButton *_button2;
diff --git a/src/uri-references.cpp b/src/uri-references.cpp
index d626d0e41..07f2d168b 100644
--- a/src/uri-references.cpp
+++ b/src/uri-references.cpp
@@ -74,10 +74,11 @@ bool URIReference::_acceptObject(SPObject *obj) const
std::vector<int> positions;
while (owner->cloned) {
int position = 0;
- SPObject *c = owner->parent->firstChild();
- while (c != owner && dynamic_cast<SPObject *>(c)) {
+ for (auto &child: owner->parent->children) {
+ if(&child == owner) {
+ break;
+ }
position++;
- c = c->next;
}
positions.push_back(position);
owner = owner->parent;
@@ -90,7 +91,7 @@ bool URIReference::_acceptObject(SPObject *obj) const
g_warning("cloned object with no known type\n");
return false;
}
- for (int i = positions.size() - 2; i >= 0; i--)
+ for (int i = (int) (positions.size() - 2); i >= 0; i--)
owner = owner->childList(false)[positions[i]];
}
// once we have the "original" object (hopefully) we look at who is referencing it
diff --git a/src/util/Makefile_insert b/src/util/Makefile_insert
deleted file mode 100644
index 2a778e660..000000000
--- a/src/util/Makefile_insert
+++ /dev/null
@@ -1,49 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-util/all: util/libutil.a
-
-util/clean:
- rm -f util/libutil.a $(util_libutil_a_OBJECTS)
-
-util_libutil_a_SOURCES = \
- util/ziptool.h \
- util/ziptool.cpp \
- util/accumulators.h \
- util/compose.hpp \
- util/copy.h \
- util/enums.h \
- util/ege-appear-time-tracker.cpp \
- util/ege-appear-time-tracker.h \
- util/ege-tags.h \
- util/ege-tags.cpp \
- util/expression-evaluator.h \
- util/expression-evaluator.cpp \
- util/filter-list.h \
- util/find-if-before.h \
- util/find-last-if.h \
- util/fixed_point.h \
- util/format.h \
- util/forward-pointer-iterator.h \
- util/function.h \
- util/list.h \
- util/list-container.h \
- util/list-copy.h \
- util/longest-common-suffix.h \
- util/map-list.h \
- util/reference.h \
- util/reverse-list.h \
- util/share.h \
- util/share.cpp \
- util/signal-blocker.h \
- util/tuple.h \
- util/ucompose.hpp \
- util/units.cpp \
- util/units.h \
- util/unordered-containers.h
-
-# ######################
-# ### CxxTest stuff ####
-# ######################
-
-CXXTEST_TESTSUITES += \
- $(srcdir)/util/list-container-test.h
diff --git a/src/util/unordered-containers.h b/src/util/unordered-containers.h
index b92f2e7ea..0bda8191f 100644
--- a/src/util/unordered-containers.h
+++ b/src/util/unordered-containers.h
@@ -20,12 +20,11 @@
#ifndef DOXYGEN_SHOULD_SKIP_THIS
-#if defined(HAVE_NATIVE_UNORDERED_SET)
-# include <unordered_set>
-# include <unordered_map>
-# define INK_UNORDERED_SET std::unordered_set
-# define INK_UNORDERED_MAP std::unordered_map
-# define INK_HASH std::hash
+#include <unordered_set>
+#include <unordered_map>
+#define INK_UNORDERED_SET std::unordered_set
+#define INK_UNORDERED_MAP std::unordered_map
+#define INK_HASH std::hash
namespace std {
template <>
@@ -36,41 +35,6 @@ struct hash<Glib::ustring> : public std::unary_function<Glib::ustring, std::size
};
} // namespace std
-#elif defined(HAVE_TR1_UNORDERED_SET)
-# include <tr1/unordered_set>
-# include <tr1/unordered_map>
-# define INK_UNORDERED_SET std::tr1::unordered_set
-# define INK_UNORDERED_MAP std::tr1::unordered_map
-# define INK_HASH std::tr1::hash
-
-namespace std {
-namespace tr1 {
-template <>
-struct hash<Glib::ustring> : public std::unary_function<Glib::ustring, std::size_t> {
- std::size_t operator()(Glib::ustring const &s) const {
- return hash<std::string>()(s.raw());
- }
-};
-} // namespace tr1
-} // namespace std
-
-#elif defined(HAVE_BOOST_UNORDERED_SET)
-# include <boost/unordered_set.hpp>
-# include <boost/unordered_map.hpp>
-# define INK_UNORDERED_SET boost::unordered_set
-# define INK_UNORDERED_MAP boost::unordered_map
-# define INK_HASH boost::hash
-
-namespace boost {
-template <>
-struct hash<Glib::ustring> : public std::unary_function<Glib::ustring, std::size_t> {
- std::size_t operator()(Glib::ustring const &s) const {
- return hash<std::string>()(s.raw());
- }
-};
-} // namespace boost
-#endif
-
#else
/// Name (with namespace) of the unordered set template.
#define INK_UNORDERED_SET
diff --git a/src/vanishing-point.cpp b/src/vanishing-point.cpp
index 987211edc..d849b35d9 100644
--- a/src/vanishing-point.cpp
+++ b/src/vanishing-point.cpp
@@ -256,8 +256,8 @@ VanishingPoint::set_pos(Proj::Pt2 const &pt) {
std::list<SPBox3D *>
VanishingPoint::selectedBoxes(Inkscape::Selection *sel) {
std::list<SPBox3D *> sel_boxes;
- std::vector<SPItem*> itemlist=sel->itemList();
- for (std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i) {
+ auto itemlist= sel->items();
+ for (auto i=itemlist.begin();i!=itemlist.end();++i) {
SPItem *item = *i;
SPBox3D *box = dynamic_cast<SPBox3D *>(item);
if (box && this->hasBox(box)) {
@@ -395,8 +395,8 @@ VPDragger::VPsOfSelectedBoxes() {
VanishingPoint *vp;
// FIXME: Should we take the selection from the parent VPDrag? I guess it shouldn't make a difference.
Inkscape::Selection *sel = SP_ACTIVE_DESKTOP->getSelection();
- std::vector<SPItem*> itemlist=sel->itemList();
- for (std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i) {
+ auto itemlist= sel->items();
+ for (auto i=itemlist.begin();i!=itemlist.end();++i) {
SPItem *item = *i;
SPBox3D *box = dynamic_cast<SPBox3D *>(item);
if (box) {
@@ -573,8 +573,8 @@ VPDrag::updateDraggers ()
g_return_if_fail (this->selection != NULL);
- std::vector<SPItem*> itemlist=this->selection->itemList();
- for (std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i) {
+ auto itemlist= this->selection->items();
+ for (auto i=itemlist.begin();i!=itemlist.end();++i) {
SPItem *item = *i;
SPBox3D *box = dynamic_cast<SPBox3D *>(item);
if (box) {
@@ -605,8 +605,8 @@ VPDrag::updateLines ()
g_return_if_fail (this->selection != NULL);
- std::vector<SPItem*> itemlist=this->selection->itemList();
- for (std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i) {
+ auto itemlist= this->selection->items();
+ for (auto i=itemlist.begin();i!=itemlist.end();++i) {
SPItem *item = *i;
SPBox3D *box = dynamic_cast<SPBox3D *>(item);
if (box) {
@@ -623,11 +623,11 @@ VPDrag::updateBoxHandles ()
// FIXME: Is there a way to update the knots without accessing the
// (previously) statically linked function KnotHolder::update_knots?
- std::vector<SPItem*> sel = selection->itemList();
+ auto sel = selection->items();
if (sel.empty())
return; // no selection
- if (sel.size() > 1) {
+ if (boost::distance(sel) > 1) {
// Currently we only show handles if a single box is selected
return;
}
diff --git a/src/verbs.cpp b/src/verbs.cpp
index 65aad1d78..f80281870 100644
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
@@ -1517,7 +1517,7 @@ void ObjectVerb::perform( SPAction *action, void *data)
sp_selection_rotate_90(dt, true);
break;
case SP_VERB_OBJECT_FLATTEN:
- sp_selection_remove_transform(dt);
+ sp_object_set_remove_transform(dt);
break;
case SP_VERB_OBJECT_FLOW_TEXT:
text_flow_into_shape();
@@ -1529,12 +1529,12 @@ void ObjectVerb::perform( SPAction *action, void *data)
flowtext_to_text();
break;
case SP_VERB_OBJECT_FLIP_HORIZONTAL:
- sp_selection_scale_relative(sel, center, Geom::Scale(-1.0, 1.0));
+ sp_object_set_scale_relative(sel, center, Geom::Scale(-1.0, 1.0));
DocumentUndo::done(dt->getDocument(), SP_VERB_OBJECT_FLIP_HORIZONTAL,
_("Flip horizontally"));
break;
case SP_VERB_OBJECT_FLIP_VERTICAL:
- sp_selection_scale_relative(sel, center, Geom::Scale(1.0, -1.0));
+ sp_object_set_scale_relative(sel, center, Geom::Scale(1.0, -1.0));
DocumentUndo::done(dt->getDocument(), SP_VERB_OBJECT_FLIP_VERTICAL,
_("Flip vertically"));
break;
diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt
index 225afe317..b2071af4e 100644
--- a/src/widgets/CMakeLists.txt
+++ b/src/widgets/CMakeLists.txt
@@ -1,24 +1,25 @@
+add_subdirectory(gimp)
set(widgets_SRC
button.cpp
- arc-toolbar.cpp
- box3d-toolbar.cpp
- calligraphy-toolbar.cpp
- connector-toolbar.cpp
- dropper-toolbar.cpp
- eraser-toolbar.cpp
- lpe-toolbar.cpp
- measure-toolbar.cpp
- mesh-toolbar.cpp
- node-toolbar.cpp
- pencil-toolbar.cpp
- rect-toolbar.cpp
- spiral-toolbar.cpp
- spray-toolbar.cpp
- star-toolbar.cpp
- text-toolbar.cpp
- tweak-toolbar.cpp
- zoom-toolbar.cpp
+ arc-toolbar.cpp
+ box3d-toolbar.cpp
+ calligraphy-toolbar.cpp
+ connector-toolbar.cpp
+ dropper-toolbar.cpp
+ eraser-toolbar.cpp
+ lpe-toolbar.cpp
+ measure-toolbar.cpp
+ mesh-toolbar.cpp
+ node-toolbar.cpp
+ pencil-toolbar.cpp
+ rect-toolbar.cpp
+ spiral-toolbar.cpp
+ spray-toolbar.cpp
+ star-toolbar.cpp
+ text-toolbar.cpp
+ tweak-toolbar.cpp
+ zoom-toolbar.cpp
dash-selector.cpp
desktop-widget.cpp
eek-preview.cpp
@@ -33,10 +34,13 @@ set(widgets_SRC
gradient-toolbar.cpp
gradient-vector.cpp
icon.cpp
+ image-menu-item.c
ink-action.cpp
ink-comboboxentry-action.cpp
+ ink-radio-action.cpp
+ ink-toggle-action.cpp
+ ink-tool-menu-action.cpp
paint-selector.cpp
- ruler.cpp
select-toolbar.cpp
sp-attribute-widget.cpp
sp-color-selector.cpp
@@ -55,24 +59,24 @@ set(widgets_SRC
# -------
# Headers
button.h
- arc-toolbar.h
- box3d-toolbar.h
- calligraphy-toolbar.h
- connector-toolbar.h
- dropper-toolbar.h
- eraser-toolbar.h
- lpe-toolbar.h
- measure-toolbar.h
- mesh-toolbar.h
- node-toolbar.h
- pencil-toolbar.h
- rect-toolbar.h
- spiral-toolbar.h
- spray-toolbar.h
- star-toolbar.h
- text-toolbar.h
- tweak-toolbar.h
- zoom-toolbar.h
+ arc-toolbar.h
+ box3d-toolbar.h
+ calligraphy-toolbar.h
+ connector-toolbar.h
+ dropper-toolbar.h
+ eraser-toolbar.h
+ lpe-toolbar.h
+ measure-toolbar.h
+ mesh-toolbar.h
+ node-toolbar.h
+ pencil-toolbar.h
+ rect-toolbar.h
+ spiral-toolbar.h
+ spray-toolbar.h
+ star-toolbar.h
+ text-toolbar.h
+ tweak-toolbar.h
+ zoom-toolbar.h
dash-selector.h
desktop-widget.h
eek-preview.h
@@ -88,10 +92,13 @@ set(widgets_SRC
gradient-toolbar.h
gradient-vector.h
icon.h
+ image-menu-item.h
ink-action.h
ink-comboboxentry-action.h
+ ink-radio-action.h
+ ink-toggle-action.h
+ ink-tool-menu-action.h
paint-selector.h
- ruler.h
select-toolbar.h
sp-attribute-widget.h
sp-color-selector.h
@@ -108,11 +115,6 @@ set(widgets_SRC
widget-sizes.h
)
-if(${WITH_GTK3_EXPERIMENTAL})
- set(image_menu_item_SRC image-menu-item.h image-menu-item.c)
- add_inkscape_source("${image_menu_item_SRC}")
-endif()
-
# add_inkscape_lib(widgets_LIB "${widgets_SRC}")
add_inkscape_source("${widgets_SRC}")
diff --git a/src/widgets/Makefile_insert b/src/widgets/Makefile_insert
deleted file mode 100644
index c9f04de14..000000000
--- a/src/widgets/Makefile_insert
+++ /dev/null
@@ -1,123 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-if WITH_GTKMM_3_0
-ink_common_sources += \
- widgets/image-menu-item.c \
- widgets/image-menu-item.h
-endif
-
-ink_common_sources += \
- widgets/arc-toolbar.cpp \
- widgets/arc-toolbar.h \
- widgets/box3d-toolbar.cpp \
- widgets/box3d-toolbar.h \
- widgets/button.cpp \
- widgets/button.h \
- widgets/calligraphy-toolbar.cpp \
- widgets/calligraphy-toolbar.h \
- widgets/connector-toolbar.cpp \
- widgets/connector-toolbar.h \
- widgets/dash-selector.cpp \
- widgets/dash-selector.h \
- widgets/desktop-widget.cpp \
- widgets/desktop-widget.h \
- widgets/dropper-toolbar.cpp \
- widgets/dropper-toolbar.h \
- widgets/eek-preview.cpp \
- widgets/eek-preview.h \
- widgets/ege-adjustment-action.cpp \
- widgets/ege-adjustment-action.h \
- widgets/ege-paint-def.cpp \
- widgets/ege-paint-def.h \
- widgets/ege-output-action.cpp \
- widgets/ege-output-action.h \
- widgets/ege-select-one-action.cpp \
- widgets/ege-select-one-action.h \
- widgets/eraser-toolbar.cpp \
- widgets/eraser-toolbar.h \
- widgets/fill-style.cpp \
- widgets/fill-style.h \
- widgets/fill-n-stroke-factory.h \
- widgets/font-selector.cpp \
- widgets/font-selector.h \
- widgets/gradient-image.cpp \
- widgets/gradient-image.h \
- widgets/gradient-selector.cpp \
- widgets/gradient-selector.h \
- widgets/gradient-toolbar.cpp \
- widgets/gradient-toolbar.h \
- widgets/gradient-vector.cpp \
- widgets/gradient-vector.h \
- widgets/icon.cpp \
- widgets/icon.h \
- widgets/ink-action.cpp \
- widgets/ink-action.h \
- widgets/ink-comboboxentry-action.cpp \
- widgets/ink-comboboxentry-action.h \
- widgets/lpe-toolbar.cpp \
- widgets/lpe-toolbar.h \
- widgets/measure-toolbar.cpp \
- widgets/measure-toolbar.h \
- widgets/mesh-toolbar.cpp \
- widgets/mesh-toolbar.h \
- widgets/node-toolbar.cpp \
- widgets/node-toolbar.h \
- widgets/paint-selector.cpp \
- widgets/paint-selector.h \
- widgets/pencil-toolbar.cpp \
- widgets/pencil-toolbar.h \
- widgets/rect-toolbar.cpp \
- widgets/rect-toolbar.h \
- widgets/ruler.cpp \
- widgets/ruler.h \
- widgets/select-toolbar.cpp \
- widgets/select-toolbar.h \
- widgets/spray-toolbar.cpp \
- widgets/spray-toolbar.h \
- widgets/spiral-toolbar.cpp \
- widgets/spiral-toolbar.h \
- widgets/sp-attribute-widget.cpp \
- widgets/sp-attribute-widget.h \
- widgets/sp-color-selector.cpp \
- widgets/sp-color-selector.h \
- widgets/spinbutton-events.cpp \
- widgets/spinbutton-events.h \
- widgets/sp-widget.cpp \
- widgets/sp-widget.h \
- widgets/spw-utilities.cpp \
- widgets/spw-utilities.h \
- widgets/sp-xmlview-attr-list.cpp \
- widgets/sp-xmlview-attr-list.h \
- widgets/sp-xmlview-content.cpp \
- widgets/sp-xmlview-content.h \
- widgets/sp-xmlview-tree.cpp \
- widgets/sp-xmlview-tree.h \
- widgets/star-toolbar.cpp \
- widgets/star-toolbar.h \
- widgets/stroke-marker-selector.cpp \
- widgets/stroke-marker-selector.h \
- widgets/stroke-style.cpp \
- widgets/stroke-style.h \
- widgets/swatch-selector.cpp \
- widgets/swatch-selector.h \
- widgets/text-toolbar.cpp \
- widgets/text-toolbar.h \
- widgets/toolbox.cpp \
- widgets/toolbox.h \
- widgets/tweak-toolbar.cpp \
- widgets/tweak-toolbar.h \
- widgets/widget-sizes.h \
- widgets/zoom-toolbar.cpp \
- widgets/zoom-toolbar.h \
- widgets/widget-sizes.h
-
-if HAVE_POTRACE
-
-ink_common_sources += \
- widgets/paintbucket-toolbar.cpp \
- widgets/paintbucket-toolbar.h
-
-endif
-
-widgets/button.$(OBJEXT): helper/sp-marshal.h
-widgets/menu.$(OBJEXT): helper/sp-marshal.h
diff --git a/src/widgets/arc-toolbar.cpp b/src/widgets/arc-toolbar.cpp
index 35c8c0308..9b408a7b2 100644
--- a/src/widgets/arc-toolbar.cpp
+++ b/src/widgets/arc-toolbar.cpp
@@ -37,7 +37,8 @@
#include "widgets/ege-adjustment-action.h"
#include "widgets/ege-output-action.h"
#include "widgets/ege-select-one-action.h"
-#include "widgets/ink-action.h"
+#include "ink-action.h"
+#include "ink-radio-action.h"
#include "mod360.h"
#include "selection.h"
#include "sp-ellipse.h"
@@ -95,8 +96,8 @@ sp_arctb_startend_value_changed(GtkAdjustment *adj, GObject *tbl, gchar const *v
gchar* namespaced_name = g_strconcat("sodipodi:", value_name, NULL);
bool modmade = false;
- std::vector<SPItem*> itemlist=desktop->getSelection()->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
+ auto itemlist= desktop->getSelection()->items();
+ for(auto i=itemlist.begin();i!=itemlist.end();++i){
SPItem *item = *i;
if (SP_IS_GENERICELLIPSE(item)) {
@@ -161,8 +162,8 @@ static void sp_arctb_open_state_changed( EgeSelectOneAction *act, GObject *tbl )
bool modmade = false;
if ( ege_select_one_action_get_active(act) != 0 ) {
- std::vector<SPItem*> itemlist=desktop->getSelection()->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
+ auto itemlist= desktop->getSelection()->items();
+ for(auto i=itemlist.begin();i!=itemlist.end();++i){
SPItem *item = *i;
if (SP_IS_GENERICELLIPSE(item)) {
Inkscape::XML::Node *repr = item->getRepr();
@@ -172,8 +173,8 @@ static void sp_arctb_open_state_changed( EgeSelectOneAction *act, GObject *tbl )
}
}
} else {
- std::vector<SPItem*> itemlist=desktop->getSelection()->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
+ auto itemlist= desktop->getSelection()->items();
+ for(auto i=itemlist.begin();i!=itemlist.end();++i){
SPItem *item = *i;
if (SP_IS_GENERICELLIPSE(item)) {
Inkscape::XML::Node *repr = item->getRepr();
@@ -262,8 +263,8 @@ static void sp_arc_toolbox_selection_changed(Inkscape::Selection *selection, GOb
purge_repr_listener( tbl, tbl );
- std::vector<SPItem*> itemlist=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
+ auto itemlist= selection->items();
+ for(auto i=itemlist.begin();i!=itemlist.end();++i){
SPItem *item = *i;
if (SP_IS_GENERICELLIPSE(item)) {
n_selected++;
diff --git a/src/widgets/box3d-toolbar.cpp b/src/widgets/box3d-toolbar.cpp
index b8c67ee76..95de28cf2 100644
--- a/src/widgets/box3d-toolbar.cpp
+++ b/src/widgets/box3d-toolbar.cpp
@@ -37,7 +37,7 @@
#include "document-undo.h"
#include "document.h"
#include "widgets/ege-adjustment-action.h"
-#include "widgets/ink-action.h"
+#include "widgets/ink-toggle-action.h"
#include "inkscape.h"
#include "persp3d.h"
#include "toolbox.h"
diff --git a/src/widgets/button.cpp b/src/widgets/button.cpp
index bc59d1a39..3f4f1207a 100644
--- a/src/widgets/button.cpp
+++ b/src/widgets/button.cpp
@@ -21,15 +21,8 @@
#include "helper/action.h"
static void sp_button_dispose(GObject *object);
-
-#if GTK_CHECK_VERSION(3, 0, 0)
static void sp_button_get_preferred_width(GtkWidget *widget, gint *minimal_width, gint *natural_width);
-
static void sp_button_get_preferred_height(GtkWidget *widget, gint *minimal_height, gint *natural_height);
-#else
-static void sp_button_size_request(GtkWidget *widget, GtkRequisition *requisition);
-#endif
-
static void sp_button_clicked(GtkButton *button);
static void sp_button_perform_action(SPButton *button, gpointer data);
static gint sp_button_process_event(SPButton *button, GdkEvent *event);
@@ -48,12 +41,8 @@ static void sp_button_class_init(SPButtonClass *klass)
GtkButtonClass *button_class = GTK_BUTTON_CLASS(klass);
object_class->dispose = sp_button_dispose;
-#if GTK_CHECK_VERSION(3, 0, 0)
widget_class->get_preferred_width = sp_button_get_preferred_width;
widget_class->get_preferred_height = sp_button_get_preferred_height;
-#else
- widget_class->size_request = sp_button_size_request;
-#endif
button_class->clicked = sp_button_clicked;
}
@@ -90,7 +79,6 @@ static void sp_button_dispose(GObject *object)
(G_OBJECT_CLASS(sp_button_parent_class))->dispose(object);
}
-#if GTK_CHECK_VERSION(3, 0, 0)
static void sp_button_get_preferred_width(GtkWidget *widget, gint *minimal_width, gint *natural_width)
{
GtkWidget *child = gtk_bin_get_child(GTK_BIN(widget));
@@ -134,23 +122,6 @@ static void sp_button_get_preferred_height(GtkWidget *widget, gint *minimal_heig
*minimal_height += MAX(2, padding.top + padding.bottom + border.top + border.bottom);
*natural_height += MAX(2, padding.top + padding.bottom + border.top + border.bottom);
}
-#else
-static void sp_button_size_request(GtkWidget *widget, GtkRequisition *requisition)
-{
- GtkWidget *child = gtk_bin_get_child(GTK_BIN(widget));
- GtkStyle *style = gtk_widget_get_style(widget);
-
- if (child) {
- gtk_widget_size_request(GTK_WIDGET(child), requisition);
- } else {
- requisition->width = 0;
- requisition->height = 0;
- }
-
- requisition->width += 2 + 2 * MAX(2, style->xthickness);
- requisition->height += 2 + 2 * MAX(2, style->ythickness);
-}
-#endif
static void sp_button_clicked(GtkButton *button)
{
diff --git a/src/widgets/calligraphy-toolbar.cpp b/src/widgets/calligraphy-toolbar.cpp
index ba51499aa..031295ccd 100644
--- a/src/widgets/calligraphy-toolbar.cpp
+++ b/src/widgets/calligraphy-toolbar.cpp
@@ -37,6 +37,7 @@
#include "widgets/ege-adjustment-action.h"
#include "widgets/ege-select-one-action.h"
#include "widgets/ink-action.h"
+#include "widgets/ink-toggle-action.h"
#include "toolbox.h"
#include "ui/icon-names.h"
#include "ui/uxmanager.h"
diff --git a/src/widgets/connector-toolbar.cpp b/src/widgets/connector-toolbar.cpp
index f80f49db7..a078ecec4 100644
--- a/src/widgets/connector-toolbar.cpp
+++ b/src/widgets/connector-toolbar.cpp
@@ -38,7 +38,8 @@
#include "widgets/ege-adjustment-action.h"
#include "enums.h"
#include "graphlayout.h"
-#include "widgets/ink-action.h"
+#include "ink-action.h"
+#include "ink-toggle-action.h"
#include "inkscape.h"
#include "sp-namedview.h"
#include "toolbox.h"
@@ -93,8 +94,8 @@ static void sp_connector_orthogonal_toggled( GtkToggleAction* act, GObject *tbl
gchar *value = is_orthog ? orthog_str : polyline_str ;
bool modmade = false;
- std::vector<SPItem*> itemlist=desktop->getSelection()->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
+ auto itemlist= desktop->getSelection()->items();
+ for(auto i=itemlist.begin();i!=itemlist.end();++i){
SPItem *item = *i;
if (Inkscape::UI::Tools::cc_item_is_connector(item)) {
@@ -140,8 +141,8 @@ static void connector_curvature_changed(GtkAdjustment *adj, GObject* tbl)
g_ascii_dtostr(value, G_ASCII_DTOSTR_BUF_SIZE, newValue);
bool modmade = false;
- std::vector<SPItem*> itemlist=desktop->getSelection()->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
+ auto itemlist= desktop->getSelection()->items();
+ for(auto i=itemlist.begin();i!=itemlist.end();++i){
SPItem *item = *i;
if (Inkscape::UI::Tools::cc_item_is_connector(item)) {
@@ -223,7 +224,9 @@ static void sp_connector_graph_layout(void)
int saved_compensation = prefs->getInt("/options/clonecompensation/value", SP_CLONE_COMPENSATION_UNMOVED);
prefs->setInt("/options/clonecompensation/value", SP_CLONE_COMPENSATION_UNMOVED);
- graphlayout(SP_ACTIVE_DESKTOP->getSelection()->itemList());
+ auto tmp = SP_ACTIVE_DESKTOP->getSelection()->items();
+ std::vector<SPItem *> vec(tmp.begin(), tmp.end());
+ graphlayout(vec);
prefs->setInt("/options/clonecompensation/value", saved_compensation);
diff --git a/src/widgets/dash-selector.cpp b/src/widgets/dash-selector.cpp
index e1cb563a7..522705cec 100644
--- a/src/widgets/dash-selector.cpp
+++ b/src/widgets/dash-selector.cpp
@@ -59,18 +59,9 @@ SPDashSelector::SPDashSelector()
dash_combo.signal_changed().connect( sigc::mem_fun(*this, &SPDashSelector::on_selection) );
this->pack_start(dash_combo, false, false, 0);
-
-#if WITH_GTKMM_3_0
offset = Gtk::Adjustment::create(0.0, 0.0, 10.0, 0.1, 1.0, 0.0);
-#else
- offset = new Gtk::Adjustment(0.0, 0.0, 10.0, 0.1, 1.0, 0.0);
-#endif
offset->signal_value_changed().connect(sigc::mem_fun(*this, &SPDashSelector::offset_value_changed));
-#if WITH_GTKMM_3_0
- Inkscape::UI::Widget::SpinButton *sb = new Inkscape::UI::Widget::SpinButton(offset, 0.1, 2);
-#else
- Inkscape::UI::Widget::SpinButton *sb = new Inkscape::UI::Widget::SpinButton(*offset, 0.1, 2);
-#endif
+ auto sb = new Inkscape::UI::Widget::SpinButton(offset, 0.1, 2);
sb->set_tooltip_text(_("Pattern offset"));
sp_dialog_defocus_on_enter_cpp(sb);
sb->show();
@@ -97,9 +88,6 @@ SPDashSelector::SPDashSelector()
SPDashSelector::~SPDashSelector() {
// FIXME: for some reason this doesn't get called; does the call to manage() in
// sp_stroke_style_line_widget_new() not processed correctly?
-#if !WITH_GTKMM_3_0
- delete offset;
-#endif
}
void SPDashSelector::prepareImageRenderer( Gtk::TreeModel::const_iterator const &row ) {
diff --git a/src/widgets/dash-selector.h b/src/widgets/dash-selector.h
index ec5a1cbd5..f176acf04 100644
--- a/src/widgets/dash-selector.h
+++ b/src/widgets/dash-selector.h
@@ -85,12 +85,7 @@ private:
Glib::RefPtr<Gtk::ListStore> dash_store;
Gtk::ComboBox dash_combo;
Gtk::CellRendererPixbuf image_renderer;
-
-#if WITH_GTKMM_3_0
Glib::RefPtr<Gtk::Adjustment> offset;
-#else
- Gtk::Adjustment *offset;
-#endif
static gchar const *const _prefs_path;
int preview_width;
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp
index ec155ce4c..bd72560c6 100644
--- a/src/widgets/desktop-widget.cpp
+++ b/src/widgets/desktop-widget.cpp
@@ -57,16 +57,14 @@
// We're in the "widgets" directory, so no need to explicitly prefix these:
#include "button.h"
-#include "ruler.h"
+#include "gimp/ruler.h"
#include "spinbutton-events.h"
#include "spw-utilities.h"
#include "toolbox.h"
#include "widget-sizes.h"
#include "verbs.h"
-#if GTK_CHECK_VERSION(3,0,0)
-# include <gtkmm/cssprovider.h>
-#endif
+#include <gtkmm/cssprovider.h>
#include <gtkmm/paned.h>
#include <gtkmm/messagedialog.h>
@@ -248,16 +246,11 @@ Geom::Point
SPDesktopWidget::window_get_pointer()
{
gint x,y;
- GdkWindow *window = gtk_widget_get_window(GTK_WIDGET(canvas));
-
-#if GTK_CHECK_VERSION(3,0,0)
- GdkDisplay *display = gdk_window_get_display(window);
- GdkDeviceManager *dm = gdk_display_get_device_manager(display);
- GdkDevice *device = gdk_device_manager_get_client_pointer(dm);
+ auto window = gtk_widget_get_window(GTK_WIDGET(canvas));
+ auto display = gdk_window_get_display(window);
+ auto dm = gdk_display_get_device_manager(display);
+ auto device = gdk_device_manager_get_client_pointer(dm);
gdk_window_get_device_position(window, device, &x, &y, NULL);
-#else
- gdk_window_get_pointer(window, &x, &y, NULL);
-#endif
return Geom::Point(x,y);
}
@@ -336,21 +329,11 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
dtw->_interaction_disabled_counter = 0;
/* Main table */
-#if GTK_CHECK_VERSION(3,0,0)
dtw->vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_set_name(dtw->vbox, "DesktopMainTable");
-#else
- dtw->vbox = gtk_vbox_new (FALSE, 0);
-#endif
gtk_container_add( GTK_CONTAINER(dtw), GTK_WIDGET(dtw->vbox) );
-
-#if GTK_CHECK_VERSION(3,0,0)
dtw->statusbar = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_set_name(dtw->statusbar, "DesktopStatusBar");
-#else
- dtw->statusbar = gtk_hbox_new (FALSE, 0);
-#endif
- //gtk_widget_set_usize (dtw->statusbar, -1, BOTTOM_BAR_HEIGHT);
gtk_box_pack_end (GTK_BOX (dtw->vbox), dtw->statusbar, FALSE, TRUE, 0);
{
@@ -358,19 +341,12 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
dtw->panels = new SwatchesPanel("/embedded/swatches" /*false*/);
dtw->panels->setOrientation(SP_ANCHOR_SOUTH);
-#if GTK_CHECK_VERSION(3,0,0)
dtw->panels->set_vexpand(false);
-#endif
-
gtk_box_pack_end( GTK_BOX( dtw->vbox ), GTK_WIDGET(dtw->panels->gobj()), FALSE, TRUE, 0 );
}
-#if GTK_CHECK_VERSION(3,0,0)
dtw->hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_set_name(dtw->hbox, "DesktopHbox");
-#else
- dtw->hbox = gtk_hbox_new(FALSE, 0);
-#endif
gtk_box_pack_end( GTK_BOX (dtw->vbox), dtw->hbox, TRUE, TRUE, 0 );
gtk_widget_show(dtw->hbox);
@@ -394,14 +370,12 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
NULL,
INKSCAPE_ICON("object-locked"),
_("Toggle lock of all guides in the document"));
-#if GTK_CHECK_VERSION(3,0,0)
- Glib::RefPtr<Gtk::CssProvider> guides_lock_style_provider = Gtk::CssProvider::create();
+ auto guides_lock_style_provider = Gtk::CssProvider::create();
guides_lock_style_provider->load_from_data("GtkWidget { padding-left: 0; padding-right: 0; padding-top: 0; padding-bottom: 0; }");
- Gtk::Widget * wnd = Glib::wrap(dtw->guides_lock);
+ auto wnd = Glib::wrap(dtw->guides_lock);
wnd->set_name("LockGuides");
- Glib::RefPtr<Gtk::StyleContext> context = wnd->get_style_context();
+ auto context = wnd->get_style_context();
context->add_provider(guides_lock_style_provider, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
-#endif
/* Horizontal ruler */
GtkWidget *eventbox = gtk_event_box_new ();
@@ -416,29 +390,13 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
g_signal_connect (G_OBJECT (eventbox), "button_release_event", G_CALLBACK (sp_dt_hruler_event), dtw);
g_signal_connect (G_OBJECT (eventbox), "motion_notify_event", G_CALLBACK (sp_dt_hruler_event), dtw);
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *tbl_wrapper = gtk_grid_new(); // Is this widget really needed?
+ auto tbl_wrapper = gtk_grid_new(); // Is this widget really needed?
gtk_widget_set_name(tbl_wrapper, "CanvasTableWrapper");
dtw->canvas_tbl = gtk_grid_new();
gtk_widget_set_name(dtw->canvas_tbl, "CanvasTable");
gtk_grid_attach(GTK_GRID(dtw->canvas_tbl), dtw->guides_lock, 0, 0, 1, 1);
gtk_grid_attach(GTK_GRID(dtw->canvas_tbl), eventbox, 1, 0, 1, 1);
-#else
- GtkWidget *tbl_wrapper = gtk_table_new(2, 3, FALSE);
- dtw->canvas_tbl = gtk_table_new(3, 3, FALSE);
-
- gtk_table_attach(GTK_TABLE(dtw->canvas_tbl),
- dtw->guides_lock,
- 0, 1, 0, 1,
- GTK_FILL, GTK_FILL,
- 0, 0);
- gtk_table_attach(GTK_TABLE(dtw->canvas_tbl),
- eventbox,
- 1, 2, 0, 1,
- GTK_FILL, GTK_FILL,
- 0, 0);
-#endif
g_signal_connect (G_OBJECT (dtw->guides_lock), "toggled", G_CALLBACK (sp_update_guides_lock), dtw);
gtk_box_pack_start( GTK_BOX(dtw->hbox), tbl_wrapper, TRUE, TRUE, 1 );
@@ -452,16 +410,7 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
sp_ruler_set_unit (SP_RULER (dtw->vruler), pt);
gtk_widget_set_tooltip_text (dtw->vruler_box, gettext(pt->name_plural.c_str()));
gtk_container_add (GTK_CONTAINER (eventbox), GTK_WIDGET (dtw->vruler));
-
-#if GTK_CHECK_VERSION(3,0,0)
gtk_grid_attach(GTK_GRID(dtw->canvas_tbl), eventbox, 0, 1, 1, 1);
-#else
- gtk_table_attach(GTK_TABLE (dtw->canvas_tbl),
- eventbox,
- 0, 1, 1, 2,
- GTK_FILL, GTK_FILL,
- 0, 0);
-#endif
g_signal_connect (G_OBJECT (eventbox), "button_press_event", G_CALLBACK (sp_dt_vruler_event), dtw);
g_signal_connect (G_OBJECT (eventbox), "button_release_event", G_CALLBACK (sp_dt_vruler_event), dtw);
@@ -469,19 +418,10 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
// Horizontal scrollbar
dtw->hadj = GTK_ADJUSTMENT(gtk_adjustment_new(0.0, -4000.0, 4000.0, 10.0, 100.0, 4.0));
-
-#if GTK_CHECK_VERSION(3,0,0)
dtw->hscrollbar = gtk_scrollbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_ADJUSTMENT (dtw->hadj));
gtk_widget_set_name(dtw->hscrollbar, "HorizontalScrollbar");
gtk_grid_attach(GTK_GRID(dtw->canvas_tbl), dtw->hscrollbar, 1, 2, 1, 1);
dtw->vscrollbar_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
-#else
- dtw->hscrollbar = gtk_hscrollbar_new (GTK_ADJUSTMENT (dtw->hadj));
- gtk_table_attach(GTK_TABLE (dtw->canvas_tbl), dtw->hscrollbar, 1, 2, 2, 3,
- GTK_FILL, GTK_SHRINK,
- 0, 0);
- dtw->vscrollbar_box = gtk_vbox_new (FALSE, 0);
-#endif
// Sticky zoom button
dtw->sticky_zoom = sp_button_new_from_data ( Inkscape::ICON_SIZE_DECORATION,
@@ -496,23 +436,10 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
// Vertical scrollbar
dtw->vadj = GTK_ADJUSTMENT(gtk_adjustment_new(0.0, -4000.0, 4000.0, 10.0, 100.0, 4.0));
-
-#if GTK_CHECK_VERSION(3,0,0)
dtw->vscrollbar = gtk_scrollbar_new(GTK_ORIENTATION_VERTICAL, GTK_ADJUSTMENT(dtw->vadj));
gtk_widget_set_name(dtw->vscrollbar, "VerticalScrollbar");
-#else
- dtw->vscrollbar = gtk_vscrollbar_new (GTK_ADJUSTMENT (dtw->vadj));
-#endif
-
gtk_box_pack_start (GTK_BOX (dtw->vscrollbar_box), dtw->vscrollbar, TRUE, TRUE, 0);
-
-#if GTK_CHECK_VERSION(3,0,0)
gtk_grid_attach(GTK_GRID(dtw->canvas_tbl), dtw->vscrollbar_box, 2, 0, 1, 2);
-#else
- gtk_table_attach(GTK_TABLE(dtw->canvas_tbl), dtw->vscrollbar_box, 2, 3, 0, 2,
- GTK_SHRINK, GTK_FILL,
- 0, 0);
-#endif
gchar const* tip = "";
Inkscape::Verb* verb = Inkscape::Verb::get( SP_VERB_VIEW_CMS_TOGGLE );
@@ -546,15 +473,7 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
cms_adjust_set_sensitive(dtw, FALSE);
#endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
-#if GTK_CHECK_VERSION(3,0,0)
gtk_grid_attach( GTK_GRID(dtw->canvas_tbl), dtw->cms_adjust, 2, 2, 1, 1);
-#else
- gtk_table_attach( GTK_TABLE(dtw->canvas_tbl), dtw->cms_adjust, 2, 3, 2, 3,
- (GtkAttachOptions)(GTK_SHRINK),
- (GtkAttachOptions)(GTK_SHRINK),
- 0, 0);
-#endif
-
{
if (!watcher) {
watcher = new CMSPrefWatcher();
@@ -571,10 +490,8 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
sp_ruler_add_track_widget (SP_RULER(dtw->hruler), GTK_WIDGET(dtw->canvas));
sp_ruler_add_track_widget (SP_RULER(dtw->vruler), GTK_WIDGET(dtw->canvas));
-
-#if GTK_CHECK_VERSION(3,0,0)
- GtkCssProvider *css_provider = gtk_css_provider_new();
- GtkStyleContext *style_context = gtk_widget_get_style_context(GTK_WIDGET(dtw->canvas));
+ auto css_provider = gtk_css_provider_new();
+ auto style_context = gtk_widget_get_style_context(GTK_WIDGET(dtw->canvas));
gtk_css_provider_load_from_data(css_provider,
"SPCanvas {\n"
@@ -585,21 +502,11 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
gtk_style_context_add_provider(style_context,
GTK_STYLE_PROVIDER(css_provider),
GTK_STYLE_PROVIDER_PRIORITY_USER);
-#else
- GtkStyle *style = gtk_style_copy(gtk_widget_get_style(GTK_WIDGET(dtw->canvas)));
- style->bg[GTK_STATE_NORMAL] = style->white;
- gtk_widget_set_style (GTK_WIDGET (dtw->canvas), style);
-#endif
-
g_signal_connect (G_OBJECT (dtw->canvas), "event", G_CALLBACK (sp_desktop_widget_event), dtw);
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_hexpand(GTK_WIDGET(dtw->canvas), TRUE);
gtk_widget_set_vexpand(GTK_WIDGET(dtw->canvas), TRUE);
gtk_grid_attach(GTK_GRID(dtw->canvas_tbl), GTK_WIDGET(dtw->canvas), 1, 1, 1, 1);
-#else
- gtk_table_attach (GTK_TABLE (dtw->canvas_tbl), GTK_WIDGET(dtw->canvas), 1, 2, 1, 2, (GtkAttachOptions)(GTK_FILL | GTK_EXPAND), (GtkAttachOptions)(GTK_FILL | GTK_EXPAND), 0, 0);
-#endif
/* Dock */
bool create_dock =
@@ -608,12 +515,8 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
if (create_dock) {
dtw->dock = new Inkscape::UI::Widget::Dock();
-#if WITH_GTKMM_3_0
- Gtk::Paned *paned = new Gtk::Paned();
+ auto paned = new Gtk::Paned();
paned->set_name("Canvas_and_Dock");
-#else
- Gtk::HPaned *paned = new Gtk::HPaned();
-#endif
paned->pack1(*Glib::wrap(dtw->canvas_tbl));
paned->pack2(dtw->dock->getWidget(), Gtk::FILL);
@@ -624,24 +527,13 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
paned_class->cycle_handle_focus = NULL;
}
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_hexpand(GTK_WIDGET(paned->gobj()), TRUE);
gtk_widget_set_vexpand(GTK_WIDGET(paned->gobj()), TRUE);
gtk_grid_attach(GTK_GRID(tbl_wrapper), GTK_WIDGET (paned->gobj()), 1, 1, 1, 1);
-#else
- gtk_table_attach (GTK_TABLE (tbl_wrapper), GTK_WIDGET (paned->gobj()), 1, 2, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0);
-#endif
-
} else {
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_hexpand(GTK_WIDGET(dtw->canvas_tbl), TRUE);
gtk_widget_set_vexpand(GTK_WIDGET(dtw->canvas_tbl), TRUE);
gtk_grid_attach(GTK_GRID(tbl_wrapper), GTK_WIDGET (dtw->canvas_tbl), 1, 1, 1, 1);
-#else
- gtk_table_attach (GTK_TABLE (tbl_wrapper), GTK_WIDGET (dtw->canvas_tbl), 1, 2, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0);
-#endif
}
// connect scrollbar signals
@@ -658,11 +550,7 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
// Separator
gtk_box_pack_start(GTK_BOX(dtw->statusbar),
-#if GTK_CHECK_VERSION(3,0,0)
gtk_separator_new(GTK_ORIENTATION_VERTICAL),
-#else
- gtk_vseparator_new(),
-#endif
FALSE, FALSE, 0);
// Layer Selector
@@ -681,12 +569,7 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
gtk_label_set_lines (GTK_LABEL(dtw->select_status), 2);
#endif
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_halign(dtw->select_status, GTK_ALIGN_START);
-#else
- gtk_misc_set_alignment (GTK_MISC (dtw->select_status), 0.0, 0.5);
-#endif
-
gtk_widget_set_size_request (dtw->select_status, 1, -1);
// Display the initial welcome message in the statusbar
@@ -712,65 +595,36 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
dtw->zoom_update = g_signal_connect (G_OBJECT (dtw->zoom_status), "populate_popup", G_CALLBACK (sp_dtw_zoom_populate_popup), dtw);
// Cursor coordinates
-#if GTK_CHECK_VERSION(3,0,0)
dtw->coord_status = gtk_grid_new();
gtk_widget_set_name(dtw->coord_status, "CoordinateAndZStatus");
gtk_grid_set_row_spacing(GTK_GRID(dtw->coord_status), 0);
gtk_grid_set_column_spacing(GTK_GRID(dtw->coord_status), 2);
- GtkWidget* sep = gtk_separator_new(GTK_ORIENTATION_VERTICAL);
+ auto sep = gtk_separator_new(GTK_ORIENTATION_VERTICAL);
gtk_widget_set_name(sep, "CoordinateSeparator");
gtk_grid_attach(GTK_GRID(dtw->coord_status),
GTK_WIDGET(sep),
0, 0, 1, 2);
-#else
- dtw->coord_status = gtk_table_new(5, 2, FALSE);
- gtk_table_set_row_spacings(GTK_TABLE(dtw->coord_status), 0);
- gtk_table_set_col_spacings(GTK_TABLE(dtw->coord_status), 2);
- gtk_table_attach(GTK_TABLE(dtw->coord_status),
- gtk_vseparator_new(),
- 0, 1, 0, 2,
- GTK_FILL, GTK_FILL, 0, 0);
-#endif
gtk_widget_set_tooltip_text (dtw->coord_status, _("Cursor coordinates"));
- GtkWidget *label_x = gtk_label_new(_("X:"));
- GtkWidget *label_y = gtk_label_new(_("Y:"));
-
-#if GTK_CHECK_VERSION(3,0,0)
+ auto label_x = gtk_label_new(_("X:"));
+ auto label_y = gtk_label_new(_("Y:"));
gtk_widget_set_halign(label_x, GTK_ALIGN_START);
gtk_widget_set_halign(label_y, GTK_ALIGN_START);
gtk_grid_attach(GTK_GRID(dtw->coord_status), label_x, 1, 0, 1, 1);
gtk_grid_attach(GTK_GRID(dtw->coord_status), label_y, 1, 1, 1, 1);
-#else
- gtk_misc_set_alignment (GTK_MISC(label_x), 0.0, 0.5);
- gtk_misc_set_alignment (GTK_MISC(label_y), 0.0, 0.5);
- gtk_table_attach(GTK_TABLE(dtw->coord_status), label_x, 1,2, 0,1, GTK_FILL, GTK_FILL, 0, 0);
- gtk_table_attach(GTK_TABLE(dtw->coord_status), label_y, 1,2, 1,2, GTK_FILL, GTK_FILL, 0, 0);
-#endif
-
dtw->coord_status_x = gtk_label_new(NULL);
dtw->coord_status_y = gtk_label_new(NULL);
gtk_label_set_markup( GTK_LABEL(dtw->coord_status_x), "<tt> 0.00 </tt>" );
gtk_label_set_markup( GTK_LABEL(dtw->coord_status_y), "<tt> 0.00 </tt>" );
- GtkWidget* label_z = gtk_label_new(_("Z:"));
+ auto label_z = gtk_label_new(_("Z:"));
gtk_widget_set_name(label_z, "ZLabel");
-
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_halign(dtw->coord_status_x, GTK_ALIGN_END);
gtk_widget_set_halign(dtw->coord_status_y, GTK_ALIGN_END);
gtk_grid_attach(GTK_GRID(dtw->coord_status), dtw->coord_status_x, 2, 0, 1, 1);
gtk_grid_attach(GTK_GRID(dtw->coord_status), dtw->coord_status_y, 2, 1, 1, 1);
gtk_grid_attach(GTK_GRID(dtw->coord_status), label_z, 3, 0, 1, 2);
gtk_grid_attach(GTK_GRID(dtw->coord_status), dtw->zoom_status, 4, 0, 1, 2);
-#else
- gtk_misc_set_alignment (GTK_MISC(dtw->coord_status_x), 1.0, 0.5);
- gtk_misc_set_alignment (GTK_MISC(dtw->coord_status_y), 1.0, 0.5);
- gtk_table_attach(GTK_TABLE(dtw->coord_status), dtw->coord_status_x, 2,3, 0,1, GTK_FILL, GTK_FILL, 0, 0);
- gtk_table_attach(GTK_TABLE(dtw->coord_status), dtw->coord_status_y, 2,3, 1,2, GTK_FILL, GTK_FILL, 0, 0);
- gtk_table_attach(GTK_TABLE(dtw->coord_status), label_z, 3,4, 0,2, GTK_FILL, GTK_FILL, 0, 0);
- gtk_table_attach(GTK_TABLE(dtw->coord_status), dtw->zoom_status, 4,5, 0,2, GTK_FILL, GTK_FILL, 0, 0);
-#endif
sp_set_font_size_smaller (dtw->coord_status);
@@ -2203,7 +2057,6 @@ set_adjustment (GtkAdjustment *adj, double l, double u, double ps, double si, do
gtk_adjustment_set_page_size(adj, ps);
gtk_adjustment_set_step_increment(adj, si);
gtk_adjustment_set_page_increment(adj, pi);
- gtk_adjustment_changed (adj);
}
}
diff --git a/src/widgets/dropper-toolbar.cpp b/src/widgets/dropper-toolbar.cpp
index f60955da5..4e26a99a0 100644
--- a/src/widgets/dropper-toolbar.cpp
+++ b/src/widgets/dropper-toolbar.cpp
@@ -33,7 +33,7 @@
#include "dropper-toolbar.h"
#include "document-undo.h"
#include "widgets/ege-output-action.h"
-#include "widgets/ink-action.h"
+#include "ink-toggle-action.h"
#include "preferences.h"
#include "widgets/spinbutton-events.h"
diff --git a/src/widgets/eek-preview.cpp b/src/widgets/eek-preview.cpp
index 9951a8957..5f1997672 100644
--- a/src/widgets/eek-preview.cpp
+++ b/src/widgets/eek-preview.cpp
@@ -194,7 +194,6 @@ static void eek_preview_size_request( GtkWidget* widget, GtkRequisition* req )
req->height = height;
}
-#if GTK_CHECK_VERSION(3,0,0)
static void eek_preview_get_preferred_width(GtkWidget *widget, gint *minimal_width, gint *natural_width)
{
GtkRequisition requisition;
@@ -208,7 +207,6 @@ static void eek_preview_get_preferred_height(GtkWidget *widget, gint *minimal_he
eek_preview_size_request(widget, &requisition);
*minimal_height = *natural_height = requisition.height;
}
-#endif
enum {
CLICKED_SIGNAL,
@@ -219,22 +217,6 @@ enum {
static guint eek_preview_signals[LAST_SIGNAL] = { 0 };
-#if !GTK_CHECK_VERSION(3,0,0)
-static gboolean eek_preview_expose_event( GtkWidget* widget, GdkEventExpose* /* event */ )
-{
- gboolean result = FALSE;
-
- if (gtk_widget_is_drawable(widget)) {
- GdkWindow* window = gtk_widget_get_window(widget);
- cairo_t* cr = gdk_cairo_create(window);
- result = eek_preview_draw(widget, cr);
- cairo_destroy(cr);
- }
-
- return result;
-}
-#endif
-
static
gboolean eek_preview_draw(GtkWidget *widget,
cairo_t *cr)
@@ -246,14 +228,6 @@ gboolean eek_preview_draw(GtkWidget *widget,
GtkAllocation allocation;
gtk_widget_get_allocation(widget, &allocation);
-#if !GTK_CHECK_VERSION(3,0,0)
- GdkColor fg = { 0,
- static_cast<guint16>(priv->r),
- static_cast<guint16>(priv->g),
- static_cast<guint16>(priv->b)
- };
-#endif
-
gint insetTop = 0, insetBottom = 0;
gint insetLeft = 0, insetRight = 0;
@@ -270,9 +244,7 @@ gboolean eek_preview_draw(GtkWidget *widget,
insetLeft = insetRight = 1;
}
-
-#if GTK_CHECK_VERSION(3,0,0)
- GtkStyleContext *context = gtk_widget_get_style_context(widget);
+ auto context = gtk_widget_get_style_context(widget);
gtk_render_frame(context,
cr,
@@ -283,22 +255,6 @@ gboolean eek_preview_draw(GtkWidget *widget,
cr,
0, 0,
allocation.width, allocation.height);
-#else
- GtkStyle *style = gtk_widget_get_style(widget);
- GdkWindow *window = gtk_widget_get_window(widget);
-
- gtk_paint_flat_box( style,
- window,
- (GtkStateType)gtk_widget_get_state(widget),
- GTK_SHADOW_NONE,
- NULL,
- widget,
- NULL,
- 0, 0,
- allocation.width, allocation.height);
-
- gdk_colormap_alloc_color( gdk_colormap_get_system(), &fg, FALSE, TRUE );
-#endif
// Border
if (priv->border != BORDER_NONE) {
@@ -377,27 +333,12 @@ gboolean eek_preview_draw(GtkWidget *widget,
if (priv->linked & PREVIEW_LINK_IN)
{
-#if GTK_CHECK_VERSION(3,0,0)
gtk_render_arrow(context,
cr,
G_PI, // Down-pointing arrow
area.x, area.y,
min(area.width, area.height)
);
-#else
- gtk_paint_arrow( style,
- window,
- gtk_widget_get_state (widget),
- GTK_SHADOW_ETCHED_IN,
- NULL, /* clip area. &area, */
- widget, /* may be NULL */
- NULL, /* detail */
- GTK_ARROW_DOWN,
- FALSE,
- area.x, area.y,
- area.width, area.height
- );
-#endif
}
if (priv->linked & PREVIEW_LINK_OUT)
@@ -407,27 +348,12 @@ gboolean eek_preview_draw(GtkWidget *widget,
otherArea.y = possible.y + (possible.height - otherArea.height);
}
-#if GTK_CHECK_VERSION(3,0,0)
gtk_render_arrow(context,
cr,
G_PI, // Down-pointing arrow
otherArea.x, otherArea.y,
min(otherArea.width, otherArea.height)
);
-#else
- gtk_paint_arrow( style,
- window,
- gtk_widget_get_state (widget),
- GTK_SHADOW_ETCHED_OUT,
- NULL, /* clip area. &area, */
- widget, /* may be NULL */
- NULL, /* detail */
- GTK_ARROW_DOWN,
- FALSE,
- otherArea.x, otherArea.y,
- otherArea.width, otherArea.height
- );
-#endif
}
if (priv->linked & PREVIEW_LINK_OTHER)
@@ -437,27 +363,12 @@ gboolean eek_preview_draw(GtkWidget *widget,
otherArea.y = possible.y + (possible.height - otherArea.height) / 2;
}
-#if GTK_CHECK_VERSION(3,0,0)
gtk_render_arrow(context,
cr,
1.5*G_PI, // Left-pointing arrow
otherArea.x, otherArea.y,
min(otherArea.width, otherArea.height)
);
-#else
- gtk_paint_arrow( style,
- window,
- gtk_widget_get_state (widget),
- GTK_SHADOW_ETCHED_OUT,
- NULL, /* clip area. &area, */
- widget, /* may be NULL */
- NULL, /* detail */
- GTK_ARROW_LEFT,
- FALSE,
- otherArea.x, otherArea.y,
- otherArea.width, otherArea.height
- );
-#endif
}
@@ -469,22 +380,10 @@ gboolean eek_preview_draw(GtkWidget *widget,
if ( otherArea.height < possible.height ) {
otherArea.y = possible.y + (possible.height - otherArea.height) / 2;
}
-#if GTK_CHECK_VERSION(3,0,0)
gtk_render_check(context,
cr,
otherArea.x, otherArea.y,
otherArea.width, otherArea.height );
-#else
- gtk_paint_check( style,
- window,
- gtk_widget_get_state (widget),
- GTK_SHADOW_ETCHED_OUT,
- NULL,
- widget,
- NULL,
- otherArea.x, otherArea.y,
- otherArea.width, otherArea.height );
-#endif
}
if (priv->linked & PREVIEW_STROKE)
@@ -495,23 +394,11 @@ gboolean eek_preview_draw(GtkWidget *widget,
if ( otherArea.height < possible.height ) {
otherArea.y = possible.y + (possible.height - otherArea.height) / 2;
}
-#if GTK_CHECK_VERSION(3,0,0)
// This should be a diamond too?
gtk_render_check(context,
cr,
otherArea.x, otherArea.y,
otherArea.width, otherArea.height );
-#else
- gtk_paint_diamond( style,
- window,
- gtk_widget_get_state (widget),
- GTK_SHADOW_ETCHED_OUT,
- NULL,
- widget,
- NULL,
- otherArea.x, otherArea.y,
- otherArea.width, otherArea.height );
-#endif
}
}
@@ -519,21 +406,10 @@ gboolean eek_preview_draw(GtkWidget *widget,
if ( gtk_widget_has_focus(widget) ) {
gtk_widget_get_allocation (widget, &allocation);
-#if GTK_CHECK_VERSION(3,0,0)
gtk_render_focus(context,
cr,
0 + 1, 0 + 1,
allocation.width - 2, allocation.height - 2 );
-#else
- gtk_paint_focus( style,
- window,
- GTK_STATE_NORMAL,
- NULL, /* GdkRectangle *area, */
- widget,
- NULL,
- 0 + 1, 0 + 1,
- allocation.width - 2, allocation.height - 2 );
-#endif
}
return FALSE;
@@ -547,11 +423,7 @@ static gboolean eek_preview_enter_cb( GtkWidget* widget, GdkEventCrossing* event
EekPreviewPrivate *priv = EEK_PREVIEW_GET_PRIVATE(preview);
priv->within = TRUE;
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_state_flags( widget, priv->hot ? GTK_STATE_FLAG_ACTIVE : GTK_STATE_FLAG_PRELIGHT, false );
-#else
- gtk_widget_set_state( widget, priv->hot ? GTK_STATE_ACTIVE : GTK_STATE_PRELIGHT );
-#endif
}
return FALSE;
@@ -564,11 +436,7 @@ static gboolean eek_preview_leave_cb( GtkWidget* widget, GdkEventCrossing* event
EekPreviewPrivate *priv = EEK_PREVIEW_GET_PRIVATE(preview);
priv->within = FALSE;
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_state_flags( widget, GTK_STATE_FLAG_NORMAL, false );
-#else
- gtk_widget_set_state( widget, GTK_STATE_NORMAL );
-#endif
}
return FALSE;
@@ -593,11 +461,7 @@ static gboolean eek_preview_button_press_cb( GtkWidget* widget, GdkEventButton*
if ( priv->within )
{
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_state_flags( widget, GTK_STATE_FLAG_ACTIVE, false );
-#else
- gtk_widget_set_state( widget, GTK_STATE_ACTIVE );
-#endif
}
}
}
@@ -612,11 +476,7 @@ static gboolean eek_preview_button_release_cb( GtkWidget* widget, GdkEventButton
EekPreviewPrivate *priv = EEK_PREVIEW_GET_PRIVATE(preview);
priv->hot = FALSE;
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_state_flags( widget, GTK_STATE_FLAG_NORMAL, false );
-#else
- gtk_widget_set_state( widget, GTK_STATE_NORMAL );
-#endif
if ( priv->within &&
(event->button == PRIME_BUTTON_MAGIC_NUMBER ||
@@ -697,15 +557,9 @@ static void eek_preview_class_init( EekPreviewClass *klass )
parent_class = (GtkWidgetClass*)g_type_class_peek_parent( klass );
-#if GTK_CHECK_VERSION(3,0,0)
widgetClass->get_preferred_width = eek_preview_get_preferred_width;
widgetClass->get_preferred_height = eek_preview_get_preferred_height;
widgetClass->draw = eek_preview_draw;
-#else
- widgetClass->size_request = eek_preview_size_request;
- widgetClass->expose_event = eek_preview_expose_event;
-#endif
-
widgetClass->button_press_event = eek_preview_button_press_cb;
widgetClass->button_release_event = eek_preview_button_release_cb;
widgetClass->enter_notify_event = eek_preview_enter_cb;
diff --git a/src/widgets/ege-adjustment-action.cpp b/src/widgets/ege-adjustment-action.cpp
index 272217aa4..6678d1e5a 100644
--- a/src/widgets/ege-adjustment-action.cpp
+++ b/src/widgets/ege-adjustment-action.cpp
@@ -47,7 +47,7 @@
#include "icon-size.h"
#include "widgets/ege-adjustment-action.h"
-#include "ui/widget/gimpspinscale.h"
+#include "gimp/gimpspinscale.h"
#include "ui/icon-names.h"
@@ -813,12 +813,8 @@ static GtkWidget* create_tool_item( GtkAction* action )
if ( IS_EGE_ADJUSTMENT_ACTION(action) ) {
EgeAdjustmentAction* act = EGE_ADJUSTMENT_ACTION( action );
GtkWidget* spinbutton = 0;
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget* hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
+ auto hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
gtk_box_set_homogeneous(GTK_BOX(hb), FALSE);
-#else
- GtkWidget* hb = gtk_hbox_new( FALSE, 5 );
-#endif
GValue value;
memset( &value, 0, sizeof(value) );
g_value_init( &value, G_TYPE_STRING );
@@ -865,13 +861,7 @@ static GtkWidget* create_tool_item( GtkAction* action )
gtk_box_pack_start( GTK_BOX(hb), icon, FALSE, FALSE, 0 );
} else {
GtkWidget* lbl = gtk_label_new( g_value_get_string( &value ) ? g_value_get_string( &value ) : "wwww" );
-
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_halign(lbl, GTK_ALIGN_END);
-#else
- gtk_misc_set_alignment( GTK_MISC(lbl), 1.0, 0.5 );
-#endif
-
gtk_box_pack_start( GTK_BOX(hb), lbl, FALSE, FALSE, 0 );
}
}
diff --git a/src/widgets/ege-output-action.cpp b/src/widgets/ege-output-action.cpp
index 5dece8e91..da29524a5 100644
--- a/src/widgets/ege-output-action.cpp
+++ b/src/widgets/ege-output-action.cpp
@@ -166,12 +166,8 @@ GtkWidget* create_tool_item( GtkAction* action )
if ( IS_EGE_OUTPUT_ACTION(action) )
{
GValue value;
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget* hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
+ auto hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
gtk_box_set_homogeneous(GTK_BOX(hb), FALSE);
-#else
- GtkWidget* hb = gtk_hbox_new( FALSE, 5 );
-#endif
GtkWidget* lbl = 0;
memset( &value, 0, sizeof(value) );
diff --git a/src/widgets/ege-select-one-action.cpp b/src/widgets/ege-select-one-action.cpp
index 2e106154e..5555663e4 100644
--- a/src/widgets/ege-select-one-action.cpp
+++ b/src/widgets/ege-select-one-action.cpp
@@ -632,12 +632,8 @@ GtkWidget* create_tool_item( GtkAction* action )
item = GTK_WIDGET( gtk_tool_item_new() );
if ( act->private_data->appearanceMode == APPEARANCE_FULL ) {
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget* holder = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
+ auto holder = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous(GTK_BOX(holder), FALSE);
-#else
- GtkWidget* holder = gtk_hbox_new( FALSE, 0 );
-#endif
GtkRadioAction* ract = 0;
GSList* group = 0;
@@ -744,12 +740,8 @@ GtkWidget* create_tool_item( GtkAction* action )
gtk_container_add( GTK_CONTAINER(item), holder );
} else {
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget* holder = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4);
+ auto holder = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4);
gtk_box_set_homogeneous(GTK_BOX(holder), FALSE);
-#else
- GtkWidget *holder = gtk_hbox_new( FALSE, 4 );
-#endif
GtkEntry *entry = 0;
GtkWidget *normal;
@@ -818,14 +810,8 @@ GtkWidget* create_tool_item( GtkAction* action )
gtk_box_pack_start( GTK_BOX(holder), normal, FALSE, FALSE, 0 );
{
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_halign(holder, GTK_ALIGN_START);
gtk_container_add(GTK_CONTAINER(item), holder);
-#else
- GtkWidget *align = gtk_alignment_new(0, 0.5, 0, 0);
- gtk_container_add( GTK_CONTAINER(align), holder);
- gtk_container_add( GTK_CONTAINER(item), align );
-#endif
}
}
@@ -861,13 +847,6 @@ void resync_active( EgeSelectOneAction* act, gint active, gboolean override )
if ( children && children->data ) {
gpointer combodata = g_object_get_data( G_OBJECT(children->data), "ege-combo-box" );
-#if !GTK_CHECK_VERSION(3,0,0)
- if (!combodata && GTK_IS_ALIGNMENT(children->data)) {
- GList *other = gtk_container_get_children( GTK_CONTAINER(children->data) );
- combodata = g_object_get_data( G_OBJECT(other->data), "ege-combo-box" );
- }
-#endif
-
if ( GTK_IS_COMBO_BOX(combodata) ) {
GtkComboBox* combo = GTK_COMBO_BOX(combodata);
if ((active == -1) && (gtk_combo_box_get_has_entry(combo))) {
@@ -925,13 +904,6 @@ void resync_sensitive( EgeSelectOneAction* act )
if ( children && children->data ) {
gpointer combodata = g_object_get_data( G_OBJECT(children->data), "ege-combo-box" );
-#if !GTK_CHECK_VERSION(3,0,0)
- if (!combodata && GTK_IS_ALIGNMENT(children->data)) {
- GList *other = gtk_container_get_children( GTK_CONTAINER(children->data) );
- combodata = g_object_get_data( G_OBJECT(other->data), "ege-combo-box" );
- }
-#endif
-
if ( GTK_IS_COMBO_BOX(combodata) ) {
/* Not implemented */
} else if ( GTK_IS_BOX(children->data) ) {
diff --git a/src/widgets/eraser-toolbar.cpp b/src/widgets/eraser-toolbar.cpp
index b30d542a6..7f710a777 100644
--- a/src/widgets/eraser-toolbar.cpp
+++ b/src/widgets/eraser-toolbar.cpp
@@ -37,7 +37,9 @@
#include "document-undo.h"
#include "widgets/ege-adjustment-action.h"
#include "widgets/ege-select-one-action.h"
-#include "widgets/ink-action.h"
+#include "ink-action.h"
+#include "ink-radio-action.h"
+#include "ink-toggle-action.h"
#include "toolbox.h"
#include "ui/icon-names.h"
diff --git a/src/widgets/fill-style.cpp b/src/widgets/fill-style.cpp
index aff88aca5..c35519b68 100644
--- a/src/widgets/fill-style.cpp
+++ b/src/widgets/fill-style.cpp
@@ -472,7 +472,7 @@ void FillNStroke::updateFromPaint()
SPDocument *document = desktop->getDocument();
Inkscape::Selection *selection = desktop->getSelection();
- std::vector<SPItem*> const items = selection->itemList();
+ std::vector<SPItem*> const items(selection->items().begin(), selection->items().end());
switch (psel->mode) {
case SPPaintSelector::MODE_EMPTY:
diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp
index 2ed6705d7..4822020be 100644
--- a/src/widgets/font-selector.cpp
+++ b/src/widgets/font-selector.cpp
@@ -31,11 +31,7 @@
struct SPFontSelector
{
-#if GTK_CHECK_VERSION(3,0,0)
GtkBox hbox;
-#else
- GtkHBox hbox;
-#endif
unsigned int block_emit : 1;
@@ -56,11 +52,7 @@ struct SPFontSelector
struct SPFontSelectorClass
{
-#if GTK_CHECK_VERSION(3,0,0)
GtkBoxClass parent_class;
-#else
- GtkHBoxClass parent_class;
-#endif
void (* font_set) (SPFontSelector *fsel, gchar *fontspec);
};
@@ -86,11 +78,7 @@ static void sp_font_selector_set_sizes( SPFontSelector *fsel );
static guint fs_signals[LAST_SIGNAL] = { 0 };
-#if GTK_CHECK_VERSION(3,0,0)
G_DEFINE_TYPE(SPFontSelector, sp_font_selector, GTK_TYPE_BOX);
-#else
-G_DEFINE_TYPE(SPFontSelector, sp_font_selector, GTK_TYPE_HBOX);
-#endif
static void sp_font_selector_class_init(SPFontSelectorClass *c)
{
@@ -155,8 +143,7 @@ static void sp_font_selector_init(SPFontSelector *fsel)
/* Muck with style, see text-toolbar.cpp */
gtk_widget_set_name( GTK_WIDGET(fsel->family_treeview), "font_selector_family" );
-#if GTK_CHECK_VERSION(3,0,0)
- GtkCssProvider *css_provider = gtk_css_provider_new();
+ auto css_provider = gtk_css_provider_new();
gtk_css_provider_load_from_data(css_provider,
"#font_selector_family {\n"
" -GtkWidget-wide-separators: true;\n"
@@ -164,14 +151,10 @@ static void sp_font_selector_init(SPFontSelector *fsel)
"}\n",
-1, NULL);
- GdkScreen *screen = gdk_screen_get_default();
+ auto screen = gdk_screen_get_default();
gtk_style_context_add_provider_for_screen(screen,
GTK_STYLE_PROVIDER(css_provider),
GTK_STYLE_PROVIDER_PRIORITY_USER);
-#else
- gtk_rc_parse_string (
- "widget \"*font_selector_family\" style \"fontfamily-separator-style\"");
-#endif
Inkscape::FontLister* fontlister = Inkscape::FontLister::get_instance();
Glib::RefPtr<Gtk::ListStore> store = fontlister->get_font_list();
@@ -190,12 +173,8 @@ static void sp_font_selector_init(SPFontSelector *fsel)
gtk_widget_show(f);
gtk_box_pack_start(GTK_BOX (fsel), f, TRUE, TRUE, 0);
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *vb = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4);
+ auto vb = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4);
gtk_box_set_homogeneous(GTK_BOX(vb), FALSE);
-#else
- GtkWidget *vb = gtk_vbox_new(FALSE, 4);
-#endif
gtk_widget_show(vb);
gtk_container_set_border_width(GTK_CONTAINER (vb), 4);
gtk_container_add(GTK_CONTAINER(f), vb);
@@ -230,12 +209,8 @@ static void sp_font_selector_init(SPFontSelector *fsel)
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(fsel->style_treeview));
g_signal_connect (G_OBJECT(selection), "changed", G_CALLBACK (sp_font_selector_style_select_row), fsel);
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4);
+ auto hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4);
gtk_box_set_homogeneous(GTK_BOX(hb), FALSE);
-#else
- GtkWidget *hb = gtk_hbox_new(FALSE, 4);
-#endif
gtk_widget_show(hb);
gtk_box_pack_start(GTK_BOX(vb), hb, FALSE, FALSE, 0);
diff --git a/src/widgets/gimp/CMakeLists.txt b/src/widgets/gimp/CMakeLists.txt
new file mode 100644
index 000000000..7b3e834e3
--- /dev/null
+++ b/src/widgets/gimp/CMakeLists.txt
@@ -0,0 +1,13 @@
+set(gimpwidgets_SRC
+ gimpcolorwheel.c
+ gimpspinscale.c
+ ruler.cpp
+
+ # -------
+ # Headers
+ gimpcolorwheel.h
+ gimpspinscale.h
+ ruler.h
+)
+
+add_inkscape_source("${gimpwidgets_SRC}")
diff --git a/src/ui/widget/gimpcolorwheel.c b/src/widgets/gimp/gimpcolorwheel.c
index d54486505..212391497 100644
--- a/src/ui/widget/gimpcolorwheel.c
+++ b/src/widgets/gimp/gimpcolorwheel.c
@@ -110,7 +110,6 @@ static gboolean gimp_color_wheel_button_release (GtkWidget *widget,
GdkEventButton *event);
static gboolean gimp_color_wheel_motion (GtkWidget *widget,
GdkEventMotion *event);
-#if GTK_CHECK_VERSION(3,0,0)
static gboolean gimp_color_wheel_draw (GtkWidget *widget,
cairo_t *cr);
static void gimp_color_wheel_get_preferred_width (GtkWidget *widget,
@@ -119,13 +118,6 @@ static void gimp_color_wheel_get_preferred_width (GtkWidget *widget,
static void gimp_color_wheel_get_preferred_height (GtkWidget *widget,
gint *minimum_height,
gint *natural_height);
-#else
-static gboolean gimp_color_wheel_expose (GtkWidget *widget,
- GdkEventExpose *event);
-static void gimp_color_wheel_size_request (GtkWidget *widget,
- GtkRequisition *requisition);
-#endif
-
static gboolean gimp_color_wheel_grab_broken (GtkWidget *widget,
GdkEventGrabBroken *event);
static gboolean gimp_color_wheel_focus (GtkWidget *widget,
@@ -157,16 +149,9 @@ gimp_color_wheel_class_init (GimpColorWheelClass *class)
widget_class->button_press_event = gimp_color_wheel_button_press;
widget_class->button_release_event = gimp_color_wheel_button_release;
widget_class->motion_notify_event = gimp_color_wheel_motion;
-
-#if GTK_CHECK_VERSION(3,0,0)
widget_class->get_preferred_width = gimp_color_wheel_get_preferred_width;
widget_class->get_preferred_height = gimp_color_wheel_get_preferred_height;
widget_class->draw = gimp_color_wheel_draw;
-#else
- widget_class->size_request = gimp_color_wheel_size_request;
- widget_class->expose_event = gimp_color_wheel_expose;
-#endif
-
widget_class->focus = gimp_color_wheel_focus;
widget_class->grab_broken_event = gimp_color_wheel_grab_broken;
@@ -302,10 +287,6 @@ gimp_color_wheel_realize (GtkWidget *widget)
priv->window = gdk_window_new (parent_window, &attr, attr_mask);
gdk_window_set_user_data (priv->window, wheel);
-
-#if !GTK_CHECK_VERSION(3,0,0)
- gtk_widget_style_attach (widget);
-#endif
}
static void
@@ -321,7 +302,6 @@ gimp_color_wheel_unrealize (GtkWidget *widget)
GTK_WIDGET_CLASS (parent_class)->unrealize (widget);
}
-#if GTK_CHECK_VERSION(3,0,0)
static void
gimp_color_wheel_get_preferred_width (GtkWidget *widget,
gint *minimum_width,
@@ -353,23 +333,6 @@ gimp_color_wheel_get_preferred_height (GtkWidget *widget,
*minimum_height = *natural_height = DEFAULT_SIZE + 2 * (focus_width + focus_pad);
}
-#else
-static void
-gimp_color_wheel_size_request (GtkWidget *widget,
- GtkRequisition *requisition)
-{
- gint focus_width;
- gint focus_pad;
-
- gtk_widget_style_get (widget,
- "focus-line-width", &focus_width,
- "focus-padding", &focus_pad,
- NULL);
-
- requisition->width = DEFAULT_SIZE + 2 * (focus_width + focus_pad);
- requisition->height = DEFAULT_SIZE + 2 * (focus_width + focus_pad);
-}
-#endif
static void
gimp_color_wheel_size_allocate (GtkWidget *widget,
@@ -688,7 +651,6 @@ set_cross_grab (GimpColorWheel *wheel,
gdk_cursor_new_for_display (gtk_widget_get_display (GTK_WIDGET (wheel)),
GDK_CROSSHAIR);
-#if GTK_CHECK_VERSION(3,0,0)
gdk_device_grab (gtk_get_current_event_device(),
priv->window,
GDK_OWNERSHIP_NONE,
@@ -698,14 +660,6 @@ set_cross_grab (GimpColorWheel *wheel,
GDK_BUTTON_RELEASE_MASK,
cursor, time);
g_object_unref (cursor);
-#else
- gdk_pointer_grab (priv->window, FALSE,
- GDK_POINTER_MOTION_MASK |
- GDK_POINTER_MOTION_HINT_MASK |
- GDK_BUTTON_RELEASE_MASK,
- NULL, cursor, time);
- gdk_cursor_unref (cursor);
-#endif
}
static gboolean gimp_color_wheel_grab_broken(GtkWidget *widget, GdkEventGrabBroken *event)
@@ -805,13 +759,8 @@ gimp_color_wheel_button_release (GtkWidget *widget,
else
g_assert_not_reached ();
-#if GTK_CHECK_VERSION(3,0,0)
gdk_device_ungrab (gtk_get_current_event_device(),
event->time);
-#else
- gdk_display_pointer_ungrab (gdk_window_get_display (event->window),
- event->time);
-#endif
return TRUE;
}
@@ -859,11 +808,7 @@ static void
paint_ring (GimpColorWheel *wheel,
cairo_t *cr)
{
-#if GTK_CHECK_VERSION(3,0,0)
GtkWidget *widget = GTK_WIDGET (wheel);
-#else
- GtkAllocation allocation;
-#endif
GimpColorWheelPrivate *priv = wheel->priv;
gint width, height;
gint xx, yy;
@@ -879,14 +824,8 @@ paint_ring (GimpColorWheel *wheel,
cairo_t *source_cr;
gint stride;
-#if GTK_CHECK_VERSION(3,0,0)
width = gtk_widget_get_allocated_width (widget);
height = gtk_widget_get_allocated_height (widget);
-#else
- gtk_widget_get_allocation (GTK_WIDGET (wheel), &allocation);
- width = allocation.width;
- height = allocation.height;
-#endif
center_x = width / 2.0;
center_y = height / 2.0;
@@ -1027,19 +966,10 @@ paint_triangle (GimpColorWheel *wheel,
gdouble r, g, b;
gint stride;
gint width, height;
-#if GTK_CHECK_VERSION(3,0,0)
GtkStyleContext *context;
width = gtk_widget_get_allocated_width (widget);
height = gtk_widget_get_allocated_height (widget);
-#else
- gchar *detail;
-
- GtkAllocation allocation;
- gtk_widget_get_allocation (widget, &allocation);
- width = allocation.width;
- height = allocation.height;
-#endif
/* Compute triangle's vertices */
@@ -1180,28 +1110,18 @@ paint_triangle (GimpColorWheel *wheel,
b = priv->v;
hsv_to_rgb (&r, &g, &b);
-#if GTK_CHECK_VERSION(3,0,0)
context = gtk_widget_get_style_context (widget);
gtk_style_context_save (context);
-#endif
if (INTENSITY (r, g, b) > 0.5)
{
-#if GTK_CHECK_VERSION(3,0,0)
gtk_style_context_add_class (context, "light-area-focus");
-#else
- detail = "colorwheel_light";
-#endif
cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
}
else
{
-#if GTK_CHECK_VERSION(3,0,0)
gtk_style_context_add_class (context, "dark-area-focus");
-#else
- detail = "colorwheel_dark";
-#endif
cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
}
@@ -1224,31 +1144,16 @@ paint_triangle (GimpColorWheel *wheel,
"focus-padding", &focus_pad,
NULL);
-#if GTK_CHECK_VERSION(3,0,0)
gtk_render_focus (context, cr,
xx - FOCUS_RADIUS - focus_width - focus_pad,
yy - FOCUS_RADIUS - focus_width - focus_pad,
2 * (FOCUS_RADIUS + focus_width + focus_pad),
2 * (FOCUS_RADIUS + focus_width + focus_pad));
-#else
- gtk_widget_get_allocation (widget, &allocation);
- gtk_paint_focus (gtk_widget_get_style (widget),
- gtk_widget_get_window (widget),
- gtk_widget_get_state (widget),
- NULL, widget, detail,
- allocation.x + xx - FOCUS_RADIUS - focus_width - focus_pad,
- allocation.y + yy - FOCUS_RADIUS - focus_width - focus_pad,
- 2 * (FOCUS_RADIUS + focus_width + focus_pad),
- 2 * (FOCUS_RADIUS + focus_width + focus_pad));
-#endif
}
-#if GTK_CHECK_VERSION(3,0,0)
gtk_style_context_restore (context);
-#endif
}
-#if GTK_CHECK_VERSION(3,0,0)
static gboolean
gimp_color_wheel_draw (GtkWidget *widget,
cairo_t *cr)
@@ -1273,48 +1178,6 @@ gimp_color_wheel_draw (GtkWidget *widget,
return FALSE;
}
-#else
-static gint
-gimp_color_wheel_expose (GtkWidget *widget,
- GdkEventExpose *event)
-{
- cairo_t *cr = gdk_cairo_create (gtk_widget_get_window (widget));
-
- GimpColorWheel *wheel = GIMP_COLOR_WHEEL (widget);
- GimpColorWheelPrivate *priv = wheel->priv;
- gboolean draw_focus;
- GtkAllocation allocation;
-
- if (! (event->window == gtk_widget_get_window (widget) &&
- gtk_widget_is_drawable (widget)))
- return FALSE;
-
- gdk_cairo_region (cr, event->region);
- cairo_clip (cr);
-
- gtk_widget_get_allocation (widget, &allocation);
- cairo_translate (cr, allocation.x, allocation.y);
-
- draw_focus = gtk_widget_has_focus (widget);
-
- paint_ring (wheel, cr);
- paint_triangle (wheel, cr, draw_focus);
-
- cairo_destroy (cr);
-
- if (draw_focus && priv->focus_on_ring)
- gtk_paint_focus (gtk_widget_get_style (widget),
- gtk_widget_get_window (widget),
- gtk_widget_get_state (widget),
- &event->area, widget, NULL,
- allocation.x,
- allocation.y,
- allocation.width,
- allocation.height);
-
- return FALSE;
-}
-#endif
static gboolean
gimp_color_wheel_focus (GtkWidget *widget,
diff --git a/src/ui/widget/gimpcolorwheel.h b/src/widgets/gimp/gimpcolorwheel.h
index 016fb593f..016fb593f 100644
--- a/src/ui/widget/gimpcolorwheel.h
+++ b/src/widgets/gimp/gimpcolorwheel.h
diff --git a/src/ui/widget/gimpspinscale.c b/src/widgets/gimp/gimpspinscale.c
index d99646a64..8d8c6c935 100644
--- a/src/ui/widget/gimpspinscale.c
+++ b/src/widgets/gimp/gimpspinscale.c
@@ -41,10 +41,8 @@ typedef enum
{
TARGET_NUMBER,
TARGET_UPPER,
- TARGET_LOWER
-#if WITH_GTKMM_3_0
- ,TARGET_NONE
-#endif
+ TARGET_LOWER,
+ TARGET_NONE
} SpinScaleTarget;
typedef enum
@@ -94,7 +92,6 @@ static void gimp_spin_scale_get_property (GObject *object,
static void gimp_spin_scale_style_set (GtkWidget *widget,
GtkStyle *prev_style);
-#if WITH_GTKMM_3_0
static void gimp_spin_scale_get_preferred_width (GtkWidget *widget,
gint *minimum_width,
gint *natural_width);
@@ -103,13 +100,6 @@ static void gimp_spin_scale_get_preferred_height (GtkWidget *widget
gint *natural_width);
static gboolean gimp_spin_scale_draw (GtkWidget *widget,
cairo_t *cr);
-#else
-static void gimp_spin_scale_size_request (GtkWidget *widget,
- GtkRequisition *requisition);
-
-static gboolean gimp_spin_scale_expose (GtkWidget *widget,
- GdkEventExpose *event);
-#endif
static gboolean gimp_spin_scale_button_press (GtkWidget *widget,
GdkEventButton *event);
@@ -145,14 +135,9 @@ gimp_spin_scale_class_init (GimpSpinScaleClass *klass)
object_class->get_property = gimp_spin_scale_get_property;
widget_class->style_set = gimp_spin_scale_style_set;
-#if WITH_GTKMM_3_0
widget_class->get_preferred_width = gimp_spin_scale_get_preferred_width;
widget_class->get_preferred_height = gimp_spin_scale_get_preferred_height;
widget_class->draw = gimp_spin_scale_draw;
-#else
- widget_class->size_request = gimp_spin_scale_size_request;
- widget_class->expose_event = gimp_spin_scale_expose;
-#endif
widget_class->button_press_event = gimp_spin_scale_button_press;
widget_class->button_release_event = gimp_spin_scale_button_release;
widget_class->motion_notify_event = gimp_spin_scale_motion_notify;
@@ -294,7 +279,6 @@ gimp_spin_scale_set_appearance( GtkWidget *widget, const gchar *appearance)
}
}
-#if GTK_CHECK_VERSION(3,0,0)
static void
gimp_spin_scale_get_preferred_width (GtkWidget *widget,
gint *minimum_width,
@@ -355,48 +339,6 @@ gimp_spin_scale_get_preferred_height (GtkWidget *widget,
pango_font_metrics_unref (metrics);
}
-#else
-static void
-gimp_spin_scale_size_request (GtkWidget *widget,
- GtkRequisition *requisition)
-{
- GimpSpinScalePrivate *private = GET_PRIVATE (widget);
- GtkStyle *style = gtk_widget_get_style (widget);
- PangoContext *context = gtk_widget_get_pango_context (widget);
- PangoFontMetrics *metrics;
- gint height;
-
- GTK_WIDGET_CLASS (parent_class)->size_request (widget, requisition);
-
- metrics = pango_context_get_metrics (context, style->font_desc,
- pango_context_get_language (context));
-
- height = PANGO_PIXELS (pango_font_metrics_get_ascent (metrics) +
- pango_font_metrics_get_descent (metrics));
-
- if (private->appearanceMode == APPEARANCE_COMPACT) {
- requisition->height += 1;
- } else {
- requisition->height += height;
- }
-
- if (private->label)
- {
- gint char_width;
- gint digit_width;
- gint char_pixels;
-
- char_width = pango_font_metrics_get_approximate_char_width (metrics);
- digit_width = pango_font_metrics_get_approximate_digit_width (metrics);
- char_pixels = PANGO_PIXELS (MAX (char_width, digit_width));
-
- /* ~3 chars for the ellipses */
- requisition->width += char_pixels * 3;
- }
-
- pango_font_metrics_unref (metrics);
-}
-#endif
static void
gimp_spin_scale_style_set (GtkWidget *widget,
@@ -415,16 +357,10 @@ gimp_spin_scale_style_set (GtkWidget *widget,
static gboolean
-#if GTK_CHECK_VERSION(3,0,0)
gimp_spin_scale_draw (GtkWidget *widget,
cairo_t *cr)
-#else
- gimp_spin_scale_expose (GtkWidget *widget,
- GdkEventExpose *event)
-#endif
{
GimpSpinScalePrivate *private = GET_PRIVATE (widget);
-#if GTK_CHECK_VERSION(3,0,0)
GtkStyleContext *style = gtk_widget_get_style_context(widget);
GtkAllocation allocation;
GdkRGBA color;
@@ -434,66 +370,31 @@ static gboolean
cairo_restore (cr);
gtk_widget_get_allocation (widget, &allocation);
-#else
- GtkStyle *style = gtk_widget_get_style (widget);
- cairo_t *cr;
- gint w;
-
- GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
-
- cr = gdk_cairo_create (event->window);
- gdk_cairo_region (cr, event->region);
- cairo_clip (cr);
-
- w = gdk_window_get_width (event->window);
-#endif
cairo_set_line_width (cr, 1.0);
-#if GTK_CHECK_VERSION(3,0,0)
if (private->label)
{
GdkRectangle text_area;
gint minimum_width;
gint natural_width;
-#else
- if (private->label &&
- gtk_widget_is_drawable (widget) &&
- event->window == gtk_entry_get_text_window (GTK_ENTRY (widget)))
- {
- GtkRequisition requisition;
- GtkAllocation allocation;
-#endif
PangoRectangle logical;
gint layout_offset_x;
gint layout_offset_y;
-#if GTK_CHECK_VERSION(3,0,0)
GtkStateFlags state;
GdkRGBA text_color;
GdkRGBA bar_text_color;
-#else
- GtkStateType state;
- GdkColor text_color;
- GdkColor bar_text_color;
- gint window_width;
- gint window_height;
-#endif
gdouble progress_fraction;
gint progress_x;
gint progress_y;
gint progress_width;
gint progress_height;
-#if GTK_CHECK_VERSION(3,0,0)
gtk_entry_get_text_area (GTK_ENTRY (widget), &text_area);
GTK_WIDGET_CLASS (parent_class)->get_preferred_width (widget,
&minimum_width,
&natural_width);
-#else
- GTK_WIDGET_CLASS (parent_class)->size_request (widget, &requisition);
- gtk_widget_get_allocation (widget, &allocation);
-#endif
if (! private->layout)
{
@@ -504,27 +405,18 @@ static gboolean
pango_layout_set_width (private->layout,
PANGO_SCALE *
-#if GTK_CHECK_VERSION(3,0,0)
(allocation.width - minimum_width));
-#else
- (allocation.width - requisition.width));
-#endif
pango_layout_get_pixel_extents (private->layout, NULL, &logical);
gtk_entry_get_layout_offsets (GTK_ENTRY (widget), NULL, &layout_offset_y);
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
-#if GTK_CHECK_VERSION(3,0,0)
layout_offset_x = text_area.x + text_area.width - logical.width - 4;
-#else
- layout_offset_x = w - logical.width - 4;
-#endif
else
layout_offset_x = 4;
layout_offset_x -= logical.x;
-#if GTK_CHECK_VERSION(3,0,0)
state = gtk_widget_get_state_flags (widget);
gtk_style_context_get_color (style, state, &text_color);
@@ -533,16 +425,6 @@ static gboolean
gtk_style_context_add_class (style, GTK_STYLE_CLASS_PROGRESSBAR);
gtk_style_context_get_color (style, state, &bar_text_color);
gtk_style_context_restore (style);
-#else
- state = GTK_STATE_SELECTED;
- if (! gtk_widget_get_sensitive (widget))
- state = GTK_STATE_INSENSITIVE;
- text_color = style->text[gtk_widget_get_state (widget)];
- bar_text_color = style->fg[state];
-
- window_width = gdk_window_get_width (event->window);
- window_height = gdk_window_get_height (event->window);
-#endif
progress_fraction = gtk_entry_get_progress_fraction (GTK_ENTRY (widget));
@@ -550,53 +432,30 @@ static gboolean
{
progress_fraction = 1.0 - progress_fraction;
-#if GTK_CHECK_VERSION(3,0,0)
progress_x = text_area.width * progress_fraction;
-#else
- progress_x = window_width * progress_fraction;
-#endif
progress_y = 0;
-#if GTK_CHECK_VERSION(3,0,0)
progress_width = text_area.width - progress_x;
progress_height = text_area.height;
-#else
- progress_width = window_width - progress_x;
- progress_height = window_height;
-#endif
}
else
{
progress_x = 0;
progress_y = 0;
-#if GTK_CHECK_VERSION(3,0,0)
progress_width = text_area.width * progress_fraction;
progress_height = text_area.height;
-#else
- progress_width = window_width * progress_fraction;
- progress_height = window_height;
-#endif
}
cairo_save (cr);
cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD);
-#if GTK_CHECK_VERSION(3,0,0)
cairo_rectangle (cr, 0, 0, text_area.width, text_area.height);
-#else
- cairo_rectangle (cr, 0, 0, window_width, window_height);
-#endif
cairo_rectangle (cr, progress_x, progress_y,
progress_width, progress_height);
cairo_clip (cr);
cairo_set_fill_rule (cr, CAIRO_FILL_RULE_WINDING);
-#if GTK_CHECK_VERSION(3,0,0)
cairo_move_to (cr, layout_offset_x, text_area.y + layout_offset_y-3);
gdk_cairo_set_source_rgba (cr, &text_color);
-#else
- cairo_move_to (cr, layout_offset_x, layout_offset_y-3);
- gdk_cairo_set_source_color (cr, &text_color);
-#endif
pango_cairo_show_layout (cr, private->layout);
cairo_restore (cr);
@@ -604,24 +463,14 @@ static gboolean
progress_width, progress_height);
cairo_clip (cr);
-#if GTK_CHECK_VERSION(3,0,0)
cairo_move_to (cr, layout_offset_x, text_area.y + layout_offset_y-3);
gdk_cairo_set_source_rgba (cr, &bar_text_color);
-#else
- cairo_move_to (cr, layout_offset_x, layout_offset_y-3);
- gdk_cairo_set_source_color (cr, &bar_text_color);
-#endif
pango_cairo_show_layout (cr, private->layout);
}
-#if !GTK_CHECK_VERSION(3,0,0)
- cairo_destroy (cr);
-#endif
-
return FALSE;
}
-#if WITH_GTKMM_3_0
/* Returns TRUE if a translation should be done */
static gboolean
gtk_widget_get_translation_to_window (GtkWidget *widget,
@@ -685,7 +534,6 @@ gimp_spin_scale_event_to_widget_coords (GtkWidget *widget,
*widget_x = event_x;
*widget_y = event_y;
}
-#endif
static SpinScaleTarget
gimp_spin_scale_get_target (GtkWidget *widget,
@@ -702,7 +550,6 @@ gimp_spin_scale_get_target (GtkWidget *widget,
pango_layout_get_pixel_extents (gtk_entry_get_layout (GTK_ENTRY (widget)),
NULL, &logical);
-#if WITH_GTKMM_3_0
GdkRectangle text_area;
gtk_entry_get_text_area (GTK_ENTRY (widget), &text_area);
@@ -726,19 +573,6 @@ gimp_spin_scale_get_target (GtkWidget *widget,
}
return TARGET_NONE;
-#else
- if (x > layout_x && x < layout_x + logical.width &&
- y > layout_y && y < layout_y + logical.height)
- {
- return TARGET_NUMBER;
- }
-
- else if (y > allocation.height / 2)
- {
- return TARGET_LOWER;
- }
- return TARGET_UPPER;
-#endif
}
static void
@@ -773,49 +607,21 @@ gimp_spin_scale_change_value (GtkWidget *widget,
gdouble lower;
gdouble upper;
gdouble value;
-#if WITH_GTKMM_3_0
-#else
-#endif
-#if WITH_GTKMM_3_0
GdkRectangle text_area;
gtk_entry_get_text_area (GTK_ENTRY (widget), &text_area);
gimp_spin_scale_get_limits (GIMP_SPIN_SCALE (widget), &lower, &upper);
-#else
- GdkWindow *text_window = gtk_entry_get_text_window (GTK_ENTRY (widget));
- gint width;
-
- gimp_spin_scale_get_limits (GIMP_SPIN_SCALE (widget), &lower, &upper);
-
- width = gdk_window_get_width (text_window);
-#endif
-
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
-#if WITH_GTKMM_3_0
x = text_area.width - x;
-#else
- x = width - x;
-#endif
-
if (private->relative_change)
{
gdouble diff;
gdouble step;
-
-#if WITH_GTKMM_3_0
step = (upper - lower) / text_area.width / 10.0;
-#else
- step = (upper - lower) / width / 10.0;
-#endif
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
-
-#if WITH_GTKMM_3_0
diff = x - (text_area.width - private->start_x);
-#else
- diff = x - (width - private->start_x);
-#endif
else
diff = x - private->start_x;
@@ -825,12 +631,7 @@ gimp_spin_scale_change_value (GtkWidget *widget,
{
gdouble fraction;
-
-#if WITH_GTKMM_3_0
fraction = x / (gdouble) text_area.width;
-#else
- fraction = x / (gdouble) width;
-#endif
if (fraction > 0.0)
fraction = pow (fraction, private->gamma);
@@ -849,7 +650,6 @@ gimp_spin_scale_button_press (GtkWidget *widget,
private->changing_value = FALSE;
private->relative_change = FALSE;
-#if WITH_GTKMM_3_0
gint x, y;
gimp_spin_scale_event_to_widget_coords (widget, event->window,
event->x, event->y,
@@ -879,36 +679,6 @@ gimp_spin_scale_button_press (GtkWidget *widget,
default:
break;
}
-#else
- if (event->window == gtk_entry_get_text_window (GTK_ENTRY (widget)))
- {
- switch (gimp_spin_scale_get_target (widget, event->x, event->y))
- {
- case TARGET_UPPER:
- private->changing_value = TRUE;
-
- gtk_widget_grab_focus (widget);
-
- gimp_spin_scale_change_value (widget, event->x);
-
- return TRUE;
-
- case TARGET_LOWER:
- private->changing_value = TRUE;
-
- gtk_widget_grab_focus (widget);
-
- private->relative_change = TRUE;
- private->start_x = event->x;
- private->start_value = gtk_adjustment_get_value (gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (widget)));
-
- return TRUE;
-
- default:
- break;
- }
- }
-#endif
return GTK_WIDGET_CLASS (parent_class)->button_press_event (widget, event);
}
@@ -918,22 +688,16 @@ gimp_spin_scale_button_release (GtkWidget *widget,
GdkEventButton *event)
{
GimpSpinScalePrivate *private = GET_PRIVATE (widget);
-#if WITH_GTKMM_3_0
gint x, y;
gimp_spin_scale_event_to_widget_coords (widget, event->window,
event->x, event->y,
&x, &y);
-#endif
if (private->changing_value)
{
private->changing_value = FALSE;
-#if WITH_GTKMM_3_0
gimp_spin_scale_change_value (widget, x);
-#else
- gimp_spin_scale_change_value (widget, event->x);
-#endif
return TRUE;
}
@@ -948,21 +712,15 @@ gimp_spin_scale_motion_notify (GtkWidget *widget,
gdk_event_request_motions (event);
-#if WITH_GTKMM_3_0
gint x, y;
gimp_spin_scale_event_to_widget_coords (widget, event->window,
event->x, event->y,
&x, &y);
-#endif
if (private->changing_value)
{
-#if WITH_GTKMM_3_0
gimp_spin_scale_change_value (widget, x);
-#else
- gimp_spin_scale_change_value (widget, event->x);
-#endif
return TRUE;
}
@@ -971,20 +729,12 @@ gimp_spin_scale_motion_notify (GtkWidget *widget,
if (! (event->state &
(GDK_BUTTON1_MASK | GDK_BUTTON2_MASK | GDK_BUTTON3_MASK))
-#if WITH_GTKMM_3_0
-#else
- && event->window == gtk_entry_get_text_window (GTK_ENTRY (widget))
-#endif
)
{
GdkDisplay *display = gtk_widget_get_display (widget);
GdkCursor *cursor = NULL;
-#if WITH_GTKMM_3_0
switch (gimp_spin_scale_get_target (widget, x, y))
-#else
- switch (gimp_spin_scale_get_target (widget, event->x, event->y))
-#endif
{
case TARGET_NUMBER:
cursor = gdk_cursor_new_for_display (display, GDK_XTERM);
@@ -1002,17 +752,11 @@ gimp_spin_scale_motion_notify (GtkWidget *widget,
break;
}
-
-#if WITH_GTKMM_3_0
if (cursor)
{
gdk_window_set_cursor (event->window, cursor);
g_object_unref (cursor);
}
-#else
- gdk_window_set_cursor (event->window, cursor);
- gdk_cursor_unref (cursor);
-#endif
}
return FALSE;
diff --git a/src/ui/widget/gimpspinscale.h b/src/widgets/gimp/gimpspinscale.h
index b42a0faf8..b42a0faf8 100644
--- a/src/ui/widget/gimpspinscale.h
+++ b/src/widgets/gimp/gimpspinscale.h
diff --git a/src/widgets/ruler.cpp b/src/widgets/gimp/ruler.cpp
index 1f6e4396c..bfb9c9071 100644
--- a/src/widgets/ruler.cpp
+++ b/src/widgets/gimp/ruler.cpp
@@ -119,7 +119,6 @@ static void sp_ruler_unmap (GtkWidget *widget);
static void sp_ruler_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
-#if GTK_CHECK_VERSION(3,0,0)
static void sp_ruler_get_preferred_width (GtkWidget *widget,
gint *minimum_width,
gint *natural_width);
@@ -128,21 +127,11 @@ static void sp_ruler_get_preferred_height (GtkWidget *widget,
gint *minimum_height,
gint *natural_height);
static void sp_ruler_style_updated (GtkWidget *widget);
-#else
-static void sp_ruler_size_request (GtkWidget *widget,
- GtkRequisition *requisition);
-static void sp_ruler_style_set (GtkWidget *widget,
- GtkStyle *prev_style);
-#endif
static gboolean sp_ruler_motion_notify (GtkWidget *widget,
GdkEventMotion *event);
static gboolean sp_ruler_draw (GtkWidget *widget,
cairo_t *cr);
-#if !GTK_CHECK_VERSION(3,0,0)
-static gboolean sp_ruler_expose (GtkWidget *widget,
- GdkEventExpose *event);
-#endif
static void sp_ruler_draw_ticks (SPRuler *ruler);
static GdkRectangle sp_ruler_get_pos_rect (SPRuler *ruler,
gdouble position);
@@ -180,16 +169,10 @@ sp_ruler_class_init (SPRulerClass *klass)
widget_class->map = sp_ruler_map;
widget_class->unmap = sp_ruler_unmap;
widget_class->size_allocate = sp_ruler_size_allocate;
-#if GTK_CHECK_VERSION(3,0,0)
widget_class->get_preferred_width = sp_ruler_get_preferred_width;
widget_class->get_preferred_height = sp_ruler_get_preferred_height;
widget_class->style_updated = sp_ruler_style_updated;
widget_class->draw = sp_ruler_draw;
-#else
- widget_class->size_request = sp_ruler_size_request;
- widget_class->style_set = sp_ruler_style_set;
- widget_class->expose_event = sp_ruler_expose;
-#endif
widget_class->motion_notify_event = sp_ruler_motion_notify;
g_type_class_add_private (object_class, sizeof (SPRulerPrivate));
@@ -486,16 +469,10 @@ sp_ruler_realize (GtkWidget *widget)
attributes.width = allocation.width;
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_ONLY;
-#if GTK_CHECK_VERSION(3,0,0)
attributes.event_mask = (gtk_widget_get_events (widget) |
GDK_EXPOSURE_MASK |
GDK_POINTER_MOTION_MASK |
GDK_POINTER_MOTION_HINT_MASK);
-#else
- attributes.event_mask = (gtk_widget_get_events (widget) |
- GDK_EXPOSURE_MASK |
- GDK_POINTER_MOTION_MASK);
-#endif
attributes_mask = GDK_WA_X | GDK_WA_Y;
@@ -598,7 +575,6 @@ sp_ruler_size_request (GtkWidget *widget,
size = 2 + ink_rect.height * 1.7;
-#if GTK_CHECK_VERSION(3,0,0)
GtkStyleContext *context = gtk_widget_get_style_context (widget);
GtkBorder border;
@@ -606,47 +582,25 @@ sp_ruler_size_request (GtkWidget *widget,
requisition->width = border.left + border.right;
requisition->height = border.top + border.bottom;
-#else
- GtkStyle *style = gtk_widget_get_style(widget);
-#endif
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
{
-#if GTK_CHECK_VERSION(3,0,0)
requisition->width += 1;
requisition->height += size;
-#else
- requisition->width = style->xthickness * 2 + 1;
- requisition->height = style->ythickness * 2 + size;
-#endif
}
else
{
-#if GTK_CHECK_VERSION(3,0,0)
requisition->width += size;
requisition->height += 1;
-#else
- requisition->width = style->xthickness * 2 + size;
- requisition->height = style->ythickness * 2 + 1;
-#endif
}
}
static void
-#if GTK_CHECK_VERSION(3,0,0)
sp_ruler_style_updated (GtkWidget *widget)
-#else
-sp_ruler_style_set (GtkWidget *widget,
- GtkStyle *prev_style)
-#endif
{
SPRulerPrivate *priv = SP_RULER_GET_PRIVATE (widget);
-#if GTK_CHECK_VERSION(3,0,0)
GTK_WIDGET_CLASS (sp_ruler_parent_class)->style_updated (widget);
-#else
- GTK_WIDGET_CLASS (sp_ruler_parent_class)->style_set (widget, prev_style);
-#endif
gtk_widget_style_get (widget,
"font-scale", &priv->font_scale,
@@ -659,7 +613,6 @@ sp_ruler_style_set (GtkWidget *widget,
}
}
-#if GTK_CHECK_VERSION(3,0,0)
static void
sp_ruler_get_preferred_width (GtkWidget *widget,
gint *minimum_width,
@@ -683,33 +636,19 @@ sp_ruler_get_preferred_height (GtkWidget *widget,
*minimum_height = *natural_height = requisition.height;
}
-#else
-static gboolean
-sp_ruler_expose (GtkWidget *widget,
- GdkEventExpose *event)
-{
- cairo_t *cr = gdk_cairo_create(gtk_widget_get_window(widget));
- GtkAllocation allocation;
-
- gdk_cairo_region (cr, event->region);
- cairo_clip (cr);
-
- gtk_widget_get_allocation (widget, &allocation);
-
- gboolean result = sp_ruler_draw (widget, cr);
-
- cairo_destroy (cr);
-
- return result;
-}
-#endif
static gboolean
sp_ruler_draw (GtkWidget *widget,
cairo_t *cr)
{
- SPRuler *ruler = SP_RULER (widget);
- SPRulerPrivate *priv = SP_RULER_GET_PRIVATE (ruler);
+ SPRuler *ruler = SP_RULER (widget);
+ SPRulerPrivate *priv = SP_RULER_GET_PRIVATE (ruler);
+ GtkStyleContext *context = gtk_widget_get_style_context (widget);
+ GtkAllocation allocation;
+
+ gtk_widget_get_allocation (widget, &allocation);
+ gtk_render_background (context, cr, 0, 0, allocation.width, allocation.height);
+ gtk_render_frame (context, cr, 0, 0, allocation.width, allocation.height);
sp_ruler_draw_ticks (ruler);
@@ -735,7 +674,7 @@ sp_ruler_make_pixmap (SPRuler *ruler)
priv->backing_store =
gdk_window_create_similar_surface (gtk_widget_get_window (widget),
- CAIRO_CONTENT_COLOR,
+ CAIRO_CONTENT_COLOR_ALPHA,
allocation.width,
allocation.height);
@@ -748,13 +687,8 @@ sp_ruler_draw_pos (SPRuler *ruler,
{
GtkWidget *widget = GTK_WIDGET (ruler);
-#if GTK_CHECK_VERSION(3,0,0)
GtkStyleContext *context = gtk_widget_get_style_context (widget);
GdkRGBA color;
-#else
- GtkStyle *style = gtk_widget_get_style (widget);
- GtkStateType state = gtk_widget_get_state (widget);
-#endif
SPRulerPrivate *priv = SP_RULER_GET_PRIVATE (ruler);
GdkRectangle pos_rect;
@@ -766,13 +700,9 @@ sp_ruler_draw_pos (SPRuler *ruler,
if ((pos_rect.width > 0) && (pos_rect.height > 0))
{
-#if GTK_CHECK_VERSION(3,0,0)
gtk_style_context_get_color (context, gtk_widget_get_state_flags (widget),
&color);
gdk_cairo_set_source_rgba (cr, &color);
-#else
- gdk_cairo_set_source_color (cr, &style->fg[state]);
-#endif
cairo_move_to (cr, pos_rect.x, pos_rect.y);
@@ -1111,16 +1041,9 @@ sp_ruler_draw_ticks (SPRuler *ruler)
{
GtkWidget *widget = GTK_WIDGET (ruler);
-#if GTK_CHECK_VERSION(3,0,0)
GtkStyleContext *context = gtk_widget_get_style_context (widget);
GtkBorder border;
GdkRGBA color;
-#else
- GtkStyle *style = gtk_widget_get_style (widget);
- GtkStateType state = gtk_widget_get_state (widget);
- gint xthickness;
- gint ythickness;
-#endif
SPRulerPrivate *priv = SP_RULER_GET_PRIVATE (ruler);
GtkAllocation allocation;
@@ -1149,12 +1072,7 @@ sp_ruler_draw_ticks (SPRuler *ruler)
gtk_widget_get_allocation (widget, &allocation);
-#if GTK_CHECK_VERSION(3,0,0)
gtk_style_context_get_border (context, static_cast<GtkStateFlags>(0), &border);
-#else
- xthickness = style->xthickness;
- ythickness = style->ythickness;
-#endif
layout = sp_ruler_get_layout (widget, "0123456789");
pango_layout_get_extents (layout, &ink_rect, &logical_rect);
@@ -1165,28 +1083,20 @@ sp_ruler_draw_ticks (SPRuler *ruler)
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
{
width = allocation.width;
-#if GTK_CHECK_VERSION(3,0,0)
height = allocation.height - (border.top + border.bottom);
-#else
- height = allocation.height - ythickness * 2;
-#endif
}
else
{
width = allocation.height;
-#if GTK_CHECK_VERSION(3,0,0)
height = allocation.width - (border.top + border.bottom);
-#else
- height = allocation.width - ythickness * 2;
-#endif
}
cr = cairo_create (priv->backing_store);
-#if GTK_CHECK_VERSION(3,0,0)
- gtk_render_background (context, cr, 0, 0, allocation.width, allocation.height);
- gtk_render_frame (context, cr, 0, 0, allocation.width, allocation.height);
-
+ cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
+ cairo_paint (cr);
+ cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
+
gtk_style_context_get_color (context, gtk_widget_get_state_flags (widget),
&color);
gdk_cairo_set_source_rgba (cr, &color);
@@ -1207,30 +1117,6 @@ sp_ruler_draw_ticks (SPRuler *ruler)
1,
allocation.height - (border.top + border.bottom));
}
-#else
- gdk_cairo_set_source_color (cr, &style->bg[state]);
-
- cairo_paint (cr);
-
- gdk_cairo_set_source_color(cr, &style->fg[state]);
-
- if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
- {
- cairo_rectangle (cr,
- xthickness,
- height + ythickness,
- allocation.width - 2 * xthickness,
- 1);
- }
- else
- {
- cairo_rectangle (cr,
- height + xthickness,
- ythickness,
- 1,
- allocation.height - 2 * ythickness);
- }
-#endif
sp_ruler_get_range (ruler, &lower, &upper, &max_size);
@@ -1311,7 +1197,6 @@ sp_ruler_draw_ticks (SPRuler *ruler)
// by a pixel, and jump back on the next redraw). This is suppressed by adding 1e-9 (that's only one nanopixel ;-))
pos = gint(Inkscape::round((cur - lower) * increment + 1e-12));
-#if GTK_CHECK_VERSION(3,0,0)
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
{
cairo_rectangle (cr,
@@ -1324,20 +1209,6 @@ sp_ruler_draw_ticks (SPRuler *ruler)
height + border.left - length, pos,
length, 1);
}
-#else
- if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
- {
- cairo_rectangle (cr,
- pos, height + ythickness - length,
- 1, length);
- }
- else
- {
- cairo_rectangle (cr,
- height + xthickness - length, pos,
- length, 1);
- }
-#endif
/* draw label */
double label_spacing_px = fabs(increment*(double)ruler_metric.ruler_scale[scale]/ruler_metric.subdivide[i]);
@@ -1355,15 +1226,9 @@ sp_ruler_draw_ticks (SPRuler *ruler)
pango_layout_set_text (layout, unit_str, -1);
pango_layout_get_extents (layout, &logical_rect, NULL);
-#if GTK_CHECK_VERSION(3,0,0)
cairo_move_to (cr,
pos + 2,
border.top + PANGO_PIXELS (logical_rect.y - digit_offset));
-#else
- cairo_move_to (cr,
- pos + 2,
- ythickness + PANGO_PIXELS (logical_rect.y - digit_offset));
-#endif
pango_cairo_show_layout(cr, layout);
}
@@ -1377,15 +1242,9 @@ sp_ruler_draw_ticks (SPRuler *ruler)
pango_layout_set_text (layout, digit_str, 1);
pango_layout_get_extents (layout, NULL, &logical_rect);
-#if GTK_CHECK_VERSION(3,0,0)
cairo_move_to (cr,
border.left + 1,
pos + digit_height * j + 2 + PANGO_PIXELS (logical_rect.y - digit_offset));
-#else
- cairo_move_to (cr,
- xthickness + 1,
- pos + digit_height * j + 2 + PANGO_PIXELS (logical_rect.y - digit_offset));
-#endif
pango_cairo_show_layout (cr, layout);
}
}
@@ -1422,7 +1281,6 @@ sp_ruler_get_pos_rect (SPRuler *ruler,
gtk_widget_get_allocation (widget, &allocation);
-#if GTK_CHECK_VERSION(3,0,0)
GtkStyleContext *context = gtk_widget_get_style_context (widget);
GtkBorder padding;
@@ -1430,11 +1288,6 @@ sp_ruler_get_pos_rect (SPRuler *ruler,
xthickness = padding.left + padding.right;
ythickness = padding.top + padding.bottom;
-#else
- GtkStyle *style = gtk_widget_get_style (widget);
- xthickness = style->xthickness;
- ythickness = style->ythickness;
-#endif
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
{
@@ -1472,9 +1325,6 @@ sp_ruler_get_pos_rect (SPRuler *ruler,
rect.y = ROUND ((position - lower) * increment) + (ythickness - rect.height) / 2 - 1;
}
- rect.x += allocation.x;
- rect.y += allocation.y;
-
return rect;
}
@@ -1497,18 +1347,21 @@ sp_ruler_queue_pos_redraw (SPRuler *ruler)
{
SPRulerPrivate *priv = SP_RULER_GET_PRIVATE (ruler);
const GdkRectangle rect = sp_ruler_get_pos_rect (ruler, priv->position);
+ GtkAllocation allocation;
+
+ gtk_widget_get_allocation (GTK_WIDGET(ruler), &allocation);
gtk_widget_queue_draw_area (GTK_WIDGET(ruler),
- rect.x,
- rect.y,
+ rect.x + allocation.x,
+ rect.y + allocation.y,
rect.width,
rect.height);
if (priv->last_pos_rect.width != 0 || priv->last_pos_rect.height != 0)
{
gtk_widget_queue_draw_area (GTK_WIDGET(ruler),
- priv->last_pos_rect.x,
- priv->last_pos_rect.y,
+ priv->last_pos_rect.x + allocation.x,
+ priv->last_pos_rect.y + allocation.y,
priv->last_pos_rect.width,
priv->last_pos_rect.height);
diff --git a/src/widgets/ruler.h b/src/widgets/gimp/ruler.h
index ed529d082..ed529d082 100644
--- a/src/widgets/ruler.h
+++ b/src/widgets/gimp/ruler.h
diff --git a/src/widgets/gradient-image.cpp b/src/widgets/gradient-image.cpp
index 6901b8549..dff564feb 100644
--- a/src/widgets/gradient-image.cpp
+++ b/src/widgets/gradient-image.cpp
@@ -21,7 +21,6 @@
static void sp_gradient_image_size_request (GtkWidget *widget, GtkRequisition *requisition);
-#if GTK_CHECK_VERSION(3,0,0)
static void sp_gradient_image_destroy(GtkWidget *object);
static void sp_gradient_image_get_preferred_width(GtkWidget *widget,
gint *minimal_width,
@@ -30,11 +29,6 @@ static void sp_gradient_image_get_preferred_width(GtkWidget *widget,
static void sp_gradient_image_get_preferred_height(GtkWidget *widget,
gint *minimal_height,
gint *natural_height);
-#else
-static void sp_gradient_image_destroy(GtkObject *object);
-static gboolean sp_gradient_image_expose(GtkWidget *widget, GdkEventExpose *event);
-#endif
-
static gboolean sp_gradient_image_draw(GtkWidget *widget, cairo_t *cr);
static void sp_gradient_image_gradient_release (SPObject *, SPGradientImage *im);
static void sp_gradient_image_gradient_modified (SPObject *, guint flags, SPGradientImage *im);
@@ -46,18 +40,10 @@ static void sp_gradient_image_class_init(SPGradientImageClass *klass)
{
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
-#if GTK_CHECK_VERSION(3,0,0)
widget_class->get_preferred_width = sp_gradient_image_get_preferred_width;
widget_class->get_preferred_height = sp_gradient_image_get_preferred_height;
widget_class->draw = sp_gradient_image_draw;
widget_class->destroy = sp_gradient_image_destroy;
-#else
- GtkObjectClass *object_class = GTK_OBJECT_CLASS(klass);
-
- object_class->destroy = sp_gradient_image_destroy;
- widget_class->size_request = sp_gradient_image_size_request;
- widget_class->expose_event = sp_gradient_image_expose;
-#endif
}
static void
@@ -71,11 +57,7 @@ sp_gradient_image_init (SPGradientImage *image)
new (&image->modified_connection) sigc::connection();
}
-#if GTK_CHECK_VERSION(3,0,0)
static void sp_gradient_image_destroy(GtkWidget *object)
-#else
-static void sp_gradient_image_destroy(GtkObject *object)
-#endif
{
SPGradientImage *image = SP_GRADIENT_IMAGE (object);
@@ -88,13 +70,8 @@ static void sp_gradient_image_destroy(GtkObject *object)
image->release_connection.~connection();
image->modified_connection.~connection();
-#if GTK_CHECK_VERSION(3,0,0)
if (GTK_WIDGET_CLASS(sp_gradient_image_parent_class)->destroy)
GTK_WIDGET_CLASS(sp_gradient_image_parent_class)->destroy(object);
-#else
- if (GTK_OBJECT_CLASS(sp_gradient_image_parent_class)->destroy)
- GTK_OBJECT_CLASS(sp_gradient_image_parent_class)->destroy(object);
-#endif
}
static void sp_gradient_image_size_request(GtkWidget * /*widget*/, GtkRequisition *requisition)
@@ -103,7 +80,6 @@ static void sp_gradient_image_size_request(GtkWidget * /*widget*/, GtkRequisitio
requisition->height = 12;
}
-#if GTK_CHECK_VERSION(3,0,0)
static void sp_gradient_image_get_preferred_width(GtkWidget *widget, gint *minimal_width, gint *natural_width)
{
GtkRequisition requisition;
@@ -117,27 +93,6 @@ static void sp_gradient_image_get_preferred_height(GtkWidget *widget, gint *mini
sp_gradient_image_size_request(widget, &requisition);
*minimal_height = *natural_height = requisition.height;
}
-#endif
-
-#if !GTK_CHECK_VERSION(3,0,0)
-static gboolean sp_gradient_image_expose(GtkWidget *widget, GdkEventExpose *event)
-{
- gboolean result = TRUE;
- if(gtk_widget_is_drawable(widget)) {
- cairo_t *ct = gdk_cairo_create(gtk_widget_get_window (widget));
- cairo_rectangle(ct, event->area.x, event->area.y,
- event->area.width, event->area.height);
- cairo_clip(ct);
- GtkAllocation allocation;
- gtk_widget_get_allocation(widget, &allocation);
- cairo_translate(ct, allocation.x, allocation.y);
- result = sp_gradient_image_draw(widget, ct);
- cairo_destroy(ct);
- }
-
- return result;
-}
-#endif
static gboolean sp_gradient_image_draw(GtkWidget *widget, cairo_t *ct)
{
diff --git a/src/widgets/gradient-selector.cpp b/src/widgets/gradient-selector.cpp
index 425eb9cbc..569f66c2b 100644
--- a/src/widgets/gradient-selector.cpp
+++ b/src/widgets/gradient-selector.cpp
@@ -57,11 +57,7 @@ static void sp_gradient_selector_delete_vector_clicked (GtkWidget *w, SPGradient
static guint signals[LAST_SIGNAL] = {0};
-#if GTK_CHECK_VERSION(3,0,0)
G_DEFINE_TYPE(SPGradientSelector, sp_gradient_selector, GTK_TYPE_BOX);
-#else
-G_DEFINE_TYPE(SPGradientSelector, sp_gradient_selector, GTK_TYPE_VBOX);
-#endif
static void sp_gradient_selector_class_init(SPGradientSelectorClass *klass)
{
@@ -113,9 +109,7 @@ static void sp_gradient_selector_init(SPGradientSelector *sel)
sel->safelyInit = true;
sel->blocked = false;
-#if GTK_CHECK_VERSION(3,0,0)
gtk_orientable_set_orientation(GTK_ORIENTABLE(sel), GTK_ORIENTATION_VERTICAL);
-#endif
new (&sel->nonsolid) std::vector<GtkWidget*>();
new (&sel->swatch_widgets) std::vector<GtkWidget*>();
@@ -177,13 +171,8 @@ static void sp_gradient_selector_init(SPGradientSelector *sel)
/* Create box for buttons */
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
+ auto hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous(GTK_BOX(hb), FALSE);
-#else
- GtkWidget *hb = gtk_hbox_new( FALSE, 2 );
-#endif
- //sel->nonsolid.push_back(hb);
gtk_box_pack_start( GTK_BOX(sel), hb, FALSE, FALSE, 0 );
sel->add = gtk_button_new();
diff --git a/src/widgets/gradient-selector.h b/src/widgets/gradient-selector.h
index e090d7cbd..6b5d4ca60 100644
--- a/src/widgets/gradient-selector.h
+++ b/src/widgets/gradient-selector.h
@@ -45,11 +45,7 @@ class TreeView;
struct SPGradientSelector {
-#if GTK_CHECK_VERSION(3,0,0)
GtkBox vbox;
-#else
- GtkVBox vbox;
-#endif
enum SelectorMode {
MODE_LINEAR,
@@ -131,11 +127,7 @@ struct SPGradientSelector {
};
struct SPGradientSelectorClass {
-#if GTK_CHECK_VERSION(3,0,0)
GtkBoxClass parent_class;
-#else
- GtkVBoxClass parent_class;
-#endif
void (* grabbed) (SPGradientSelector *sel);
void (* dragged) (SPGradientSelector *sel);
diff --git a/src/widgets/gradient-toolbar.cpp b/src/widgets/gradient-toolbar.cpp
index 7e9223770..8474327ca 100644
--- a/src/widgets/gradient-toolbar.cpp
+++ b/src/widgets/gradient-toolbar.cpp
@@ -27,7 +27,9 @@
#include "gradient-chemistry.h"
#include "gradient-drag.h"
#include "gradient-toolbar.h"
-#include "widgets/ink-action.h"
+#include "ink-action.h"
+#include "ink-radio-action.h"
+#include "ink-toggle-action.h"
#include "macros.h"
#include "selection.h"
#include "sp-defs.h"
@@ -115,8 +117,8 @@ void gr_apply_gradient(Inkscape::Selection *selection, GrDrag *drag, SPGradient
}
// If no drag or no dragger selected, act on selection
- std::vector<SPItem*> itemlist=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
+ auto itemlist= selection->items();
+ for(auto i=itemlist.begin();i!=itemlist.end();++i){
gr_apply_gradient_to_item(*i, gr, initialType, initialMode, initialMode);
}
}
@@ -215,8 +217,8 @@ void gr_get_dt_selected_gradient(Inkscape::Selection *selection, SPGradient *&gr
{
SPGradient *gradient = 0;
- std::vector<SPItem*> itemlist=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
+ auto itemlist= selection->items();
+ for(auto i=itemlist.begin();i!=itemlist.end();++i){
SPItem *item = *i;// get the items gradient, not the getVector() version
SPStyle *style = item->style;
SPPaintServer *server = 0;
@@ -283,8 +285,8 @@ void gr_read_selection( Inkscape::Selection *selection,
}
// If no selected dragger, read desktop selection
- std::vector<SPItem*> itemlist=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
+ auto itemlist= selection->items();
+ for(auto i=itemlist.begin();i!=itemlist.end();++i){
SPItem *item = *i;
SPStyle *style = item->style;
@@ -719,9 +721,9 @@ static void select_stop_by_drag(GtkWidget *combo_box, SPGradient *gradient, Tool
static void select_stop_in_list( GtkWidget *combo_box, SPGradient *gradient, SPStop *new_stop, GtkWidget *data, gboolean block)
{
int i = 0;
- for ( SPObject *ochild = gradient->firstChild() ; ochild ; ochild = ochild->getNext() ) {
- if (SP_IS_STOP(ochild)) {
- if (ochild == new_stop) {
+ for (auto& ochild: gradient->children) {
+ if (SP_IS_STOP(&ochild)) {
+ if (&ochild == new_stop) {
blocked = block;
gtk_combo_box_set_active(GTK_COMBO_BOX(combo_box) , i);
gr_stop_set_offset(GTK_COMBO_BOX(combo_box), data);
@@ -764,9 +766,9 @@ static gboolean update_stop_list( GtkWidget *stop_combo, SPGradient *gradient, S
/* Populate the combobox store */
std::vector<SPObject *> sl;
if ( gradient->hasStops() ) {
- for ( SPObject *ochild = gradient->firstChild() ; ochild ; ochild = ochild->getNext() ) {
- if (SP_IS_STOP(ochild)) {
- sl.push_back(ochild);
+ for (auto& ochild: gradient->children) {
+ if (SP_IS_STOP(&ochild)) {
+ sl.push_back(&ochild);
}
}
}
diff --git a/src/widgets/gradient-vector.cpp b/src/widgets/gradient-vector.cpp
index 6e7c8cdf8..0c5f3cf47 100644
--- a/src/widgets/gradient-vector.cpp
+++ b/src/widgets/gradient-vector.cpp
@@ -63,11 +63,7 @@ enum {
LAST_SIGNAL
};
-#if GTK_CHECK_VERSION(3,0,0)
static void sp_gradient_vector_selector_destroy(GtkWidget *object);
-#else
-static void sp_gradient_vector_selector_destroy(GtkObject *object);
-#endif
static void sp_gvs_gradient_release(SPObject *obj, SPGradientVectorSelector *gvs);
static void sp_gvs_defs_release(SPObject *defs, SPGradientVectorSelector *gvs);
@@ -86,11 +82,7 @@ static win_data wd;
static gint x = -1000, y = -1000, w = 0, h = 0; // impossible original values to make sure they are read from prefs
static Glib::ustring const prefs_path = "/dialogs/gradienteditor/";
-#if GTK_CHECK_VERSION(3,0,0)
G_DEFINE_TYPE(SPGradientVectorSelector, sp_gradient_vector_selector, GTK_TYPE_BOX);
-#else
-G_DEFINE_TYPE(SPGradientVectorSelector, sp_gradient_vector_selector, GTK_TYPE_VBOX);
-#endif
static void sp_gradient_vector_selector_class_init(SPGradientVectorSelectorClass *klass)
{
@@ -105,20 +97,13 @@ static void sp_gradient_vector_selector_class_init(SPGradientVectorSelectorClass
G_TYPE_NONE, 1,
G_TYPE_POINTER);
-#if GTK_CHECK_VERSION(3,0,0)
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
widget_class->destroy = sp_gradient_vector_selector_destroy;
-#else
- GtkObjectClass *object_class = GTK_OBJECT_CLASS(klass);
- object_class->destroy = sp_gradient_vector_selector_destroy;
-#endif
}
static void sp_gradient_vector_selector_init(SPGradientVectorSelector *gvs)
{
-#if GTK_CHECK_VERSION(3,0,0)
gtk_orientable_set_orientation(GTK_ORIENTABLE(gvs), GTK_ORIENTATION_VERTICAL);
-#endif
gvs->idlabel = TRUE;
@@ -137,11 +122,7 @@ static void sp_gradient_vector_selector_init(SPGradientVectorSelector *gvs)
}
-#if GTK_CHECK_VERSION(3,0,0)
static void sp_gradient_vector_selector_destroy(GtkWidget *object)
-#else
-static void sp_gradient_vector_selector_destroy(GtkObject *object)
-#endif
{
SPGradientVectorSelector *gvs = SP_GRADIENT_VECTOR_SELECTOR(object);
@@ -162,15 +143,9 @@ static void sp_gradient_vector_selector_destroy(GtkObject *object)
gvs->defs_modified_connection.~connection();
gvs->tree_select_connection.~connection();
-#if GTK_CHECK_VERSION(3,0,0)
if ((GTK_WIDGET_CLASS(sp_gradient_vector_selector_parent_class))->destroy) {
(GTK_WIDGET_CLASS(sp_gradient_vector_selector_parent_class))->destroy(object);
}
-#else
- if ((GTK_OBJECT_CLASS(sp_gradient_vector_selector_parent_class))->destroy) {
- (GTK_OBJECT_CLASS(sp_gradient_vector_selector_parent_class))->destroy(object);
- }
-#endif
}
GtkWidget *sp_gradient_vector_selector_new(SPDocument *doc, SPGradient *gr)
@@ -360,13 +335,13 @@ unsigned long sp_gradient_to_hhssll(SPGradient *gr)
static GSList *get_all_doc_items(GSList *list, SPObject *from, bool onlyvisible, bool onlysensitive, bool ingroups, GSList const *exclude)
{
- for ( SPObject *child = from->firstChild() ; child; child = child->getNext() ) {
- if (SP_IS_ITEM(child)) {
- list = g_slist_prepend(list, SP_ITEM(child));
+ for (auto& child: from->children) {
+ if (SP_IS_ITEM(&child)) {
+ list = g_slist_prepend(list, SP_ITEM(&child));
}
- if (ingroups || SP_IS_ITEM(child)) {
- list = get_all_doc_items(list, child, onlyvisible, onlysensitive, ingroups, exclude);
+ if (ingroups || SP_IS_ITEM(&child)) {
+ list = get_all_doc_items(list, &child, onlyvisible, onlysensitive, ingroups, exclude);
}
}
@@ -480,15 +455,8 @@ static GtkWidget *sp_gradient_vector_widget_new(SPGradient *gradient, SPStop *st
static void sp_gradient_vector_widget_load_gradient(GtkWidget *widget, SPGradient *gradient);
static gint sp_gradient_vector_dialog_delete(GtkWidget *widget, GdkEvent *event, GtkWidget *dialog);
-
-#if GTK_CHECK_VERSION(3,0,0)
static void sp_gradient_vector_dialog_destroy(GtkWidget *object, gpointer data);
static void sp_gradient_vector_widget_destroy(GtkWidget *object, gpointer data);
-#else
-static void sp_gradient_vector_dialog_destroy(GtkObject *object, gpointer data);
-static void sp_gradient_vector_widget_destroy(GtkObject *object, gpointer data);
-#endif
-
static void sp_gradient_vector_gradient_release(SPObject *obj, GtkWidget *widget);
static void sp_gradient_vector_gradient_modified(SPObject *obj, guint flags, GtkWidget *widget);
static void sp_gradient_vector_color_dragged(Inkscape::UI::SelectedColor *selected_color, GObject *object);
@@ -521,10 +489,10 @@ static void verify_grad(SPGradient *gradient)
int i = 0;
SPStop *stop = NULL;
/* count stops */
- for ( SPObject *ochild = gradient->firstChild() ; ochild ; ochild = ochild->getNext() ) {
- if (SP_IS_STOP(ochild)) {
+ for (auto& ochild: gradient->children) {
+ if (SP_IS_STOP(&ochild)) {
i++;
- stop = SP_STOP(ochild);
+ stop = SP_STOP(&ochild);
}
}
@@ -564,9 +532,9 @@ static void select_stop_in_list( GtkWidget *vb, SPGradient *gradient, SPStop *ne
GtkWidget *combo_box = static_cast<GtkWidget *>(g_object_get_data(G_OBJECT(vb), "combo_box"));
int i = 0;
- for ( SPObject *ochild = gradient->firstChild() ; ochild ; ochild = ochild->getNext() ) {
- if (SP_IS_STOP(ochild)) {
- if (ochild == new_stop) {
+ for (auto& ochild: gradient->children) {
+ if (SP_IS_STOP(&ochild)) {
+ if (&ochild == new_stop) {
gtk_combo_box_set_active (GTK_COMBO_BOX(combo_box) , i);
break;
}
@@ -599,9 +567,9 @@ static void update_stop_list( GtkWidget *vb, SPGradient *gradient, SPStop *new_s
/* Populate the combobox store */
GSList *sl = NULL;
if ( gradient->hasStops() ) {
- for ( SPObject *ochild = gradient->firstChild() ; ochild ; ochild = ochild->getNext() ) {
- if (SP_IS_STOP(ochild)) {
- sl = g_slist_append(sl, ochild);
+ for (auto& ochild: gradient->children) {
+ if (SP_IS_STOP(&ochild)) {
+ sl = g_slist_append(sl, &ochild);
}
}
}
@@ -841,12 +809,8 @@ static GtkWidget * sp_gradient_vector_widget_new(SPGradient *gradient, SPStop *s
g_return_val_if_fail(gradient != NULL, NULL);
g_return_val_if_fail(SP_IS_GRADIENT(gradient), NULL);
-#if GTK_CHECK_VERSION(3,0,0)
vb = gtk_box_new(GTK_ORIENTATION_VERTICAL, PAD);
gtk_box_set_homogeneous(GTK_BOX(vb), FALSE);
-#else
- vb = gtk_vbox_new(FALSE, PAD);
-#endif
g_signal_connect(G_OBJECT(vb), "destroy", G_CALLBACK(sp_gradient_vector_widget_destroy), NULL);
w = sp_gradient_image_new(gradient);
@@ -879,12 +843,8 @@ static GtkWidget * sp_gradient_vector_widget_new(SPGradient *gradient, SPStop *s
g_signal_connect(G_OBJECT(combo_box), "changed", G_CALLBACK(sp_grad_edit_combo_box_changed), vb);
/* Add and Remove buttons */
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 1);
+ auto hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 1);
gtk_box_set_homogeneous(GTK_BOX(hb), FALSE);
-#else
- GtkWidget *hb = gtk_hbox_new(FALSE, 1);
-#endif
// TRANSLATORS: "Stop" means: a "phase" of a gradient
GtkWidget *b = gtk_button_new_with_label(_("Add stop"));
gtk_widget_show(b);
@@ -901,21 +861,12 @@ static GtkWidget * sp_gradient_vector_widget_new(SPGradient *gradient, SPStop *s
gtk_box_pack_start(GTK_BOX(vb),hb, FALSE, FALSE, AUX_BETWEEN_BUTTON_GROUPS);
/* Offset Slider and stuff */
-#if GTK_CHECK_VERSION(3,0,0)
hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous(GTK_BOX(hb), FALSE);
-#else
- hb = gtk_hbox_new(FALSE, 0);
-#endif
/* Label */
GtkWidget *l = gtk_label_new(C_("Gradient","Offset:"));
-
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_halign(l, GTK_ALIGN_END);
-#else
- gtk_misc_set_alignment(GTK_MISC(l), 1.0, 0.5);
-#endif
gtk_box_pack_start(GTK_BOX(hb),l, FALSE, FALSE, AUX_BETWEEN_BUTTON_GROUPS);
gtk_widget_show(l);
@@ -933,11 +884,7 @@ static GtkWidget * sp_gradient_vector_widget_new(SPGradient *gradient, SPStop *s
gtk_adjustment_set_value(Offset_adj, stop->offset);
/* Slider */
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *slider = gtk_scale_new(GTK_ORIENTATION_HORIZONTAL, Offset_adj);
-#else
- GtkWidget *slider = gtk_hscale_new(Offset_adj);
-#endif
+ auto slider = gtk_scale_new(GTK_ORIENTATION_HORIZONTAL, Offset_adj);
gtk_scale_set_draw_value( GTK_SCALE(slider), FALSE );
gtk_widget_show(slider);
gtk_box_pack_start(GTK_BOX(hb),slider, TRUE, TRUE, AUX_BETWEEN_BUTTON_GROUPS);
@@ -1175,11 +1122,7 @@ static void sp_gradient_vector_widget_load_gradient(GtkWidget *widget, SPGradien
blocked = FALSE;
}
-#if GTK_CHECK_VERSION(3,0,0)
static void sp_gradient_vector_dialog_destroy(GtkWidget * /*object*/, gpointer /*data*/)
-#else
-static void sp_gradient_vector_dialog_destroy(GtkObject * /*object*/, gpointer /*data*/)
-#endif
{
GObject *obj = G_OBJECT(dlg);
assert(obj != NULL);
@@ -1230,11 +1173,7 @@ static gboolean sp_gradient_vector_dialog_delete(GtkWidget */*widget*/, GdkEvent
}
/* Widget destroy handler */
-#if GTK_CHECK_VERSION(3,0,0)
static void sp_gradient_vector_widget_destroy(GtkWidget *object, gpointer /*data*/)
-#else
-static void sp_gradient_vector_widget_destroy(GtkObject *object, gpointer /*data*/)
-#endif
{
SPObject *gradient = SP_OBJECT(g_object_get_data(G_OBJECT(object), "gradient"));
diff --git a/src/widgets/gradient-vector.h b/src/widgets/gradient-vector.h
index 5ae90b28f..b51b276b9 100644
--- a/src/widgets/gradient-vector.h
+++ b/src/widgets/gradient-vector.h
@@ -35,11 +35,7 @@ class SPGradient;
class SPStop;
struct SPGradientVectorSelector {
-#if GTK_CHECK_VERSION(3,0,0)
GtkBox vbox;
-#else
- GtkVBox vbox;
-#endif
guint idlabel : 1;
@@ -61,11 +57,7 @@ struct SPGradientVectorSelector {
};
struct SPGradientVectorSelectorClass {
-#if GTK_CHECK_VERSION(3,0,0)
GtkBoxClass parent_class;
-#else
- GtkVBoxClass parent_class;
-#endif
void (* vector_set) (SPGradientVectorSelector *gvs, SPGradient *gr);
};
diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp
index 515deb565..1efa8f06b 100644
--- a/src/widgets/icon.cpp
+++ b/src/widgets/icon.cpp
@@ -61,10 +61,6 @@ struct IconImpl {
static void sizeAllocate(GtkWidget *widget, GtkAllocation *allocation);
static gboolean draw(GtkWidget *widget, cairo_t *cr);
-#if !GTK_CHECK_VERSION(3,0,0)
- static gboolean expose(GtkWidget *widget, GdkEventExpose *event);
-#endif
-
static void screenChanged( GtkWidget *widget, GdkScreen *previous_screen );
static void styleSet( GtkWidget *widget, GtkStyle *previous_style );
static void themeChanged( SPIcon *icon );
@@ -146,14 +142,9 @@ sp_icon_class_init(SPIconClass *klass)
object_class->dispose = IconImpl::dispose;
-#if GTK_CHECK_VERSION(3,0,0)
widget_class->get_preferred_width = IconImpl::getPreferredWidth;
widget_class->get_preferred_height = IconImpl::getPreferredHeight;
widget_class->draw = IconImpl::draw;
-#else
- widget_class->size_request = IconImpl::sizeRequest;
- widget_class->expose_event = IconImpl::expose;
-#endif
widget_class->size_allocate = IconImpl::sizeAllocate;
widget_class->screen_changed = IconImpl::screenChanged;
widget_class->style_set = IconImpl::styleSet;
@@ -241,37 +232,15 @@ gboolean IconImpl::draw(GtkWidget *widget, cairo_t* cr)
bool unref_image = false;
/* copied from the expose function of GtkImage */
-#if GTK_CHECK_VERSION(3,0,0)
if (gtk_widget_get_state_flags (GTK_WIDGET(icon)) != GTK_STATE_FLAG_NORMAL && image) {
-#else
- if (gtk_widget_get_state (GTK_WIDGET(icon)) != GTK_STATE_NORMAL && image) {
- std::cerr << "IconImpl::draw: Ooops! It is called in GTK2" << std::endl;
-#endif
std::cerr << "IconImpl::draw: No image, creating fallback" << std::endl;
-#if GTK_CHECK_VERSION(3,0,0)
- // image = gtk_render_icon_pixbuf(gtk_widget_get_style_context(widget),
- // source,
- // (GtkIconSize)-1);
-
- // gtk_render_icon_pixbuf deprecated, replaced by:
GtkIconTheme *icon_theme = gtk_icon_theme_get_default();
image = gtk_icon_theme_load_icon (icon_theme,
"gtk-image",
32,
(GtkIconLookupFlags)0,
NULL);
-#else
- GtkIconSource *source = gtk_icon_source_new();
- gtk_icon_source_set_pixbuf(source, icon->pb);
- gtk_icon_source_set_size(source, GTK_ICON_SIZE_SMALL_TOOLBAR); // note: this is boilerplate and not used
- gtk_icon_source_set_size_wildcarded(source, FALSE);
- image = gtk_style_render_icon(gtk_widget_get_style(widget), source,
- gtk_widget_get_direction(widget),
- (GtkStateType) gtk_widget_get_state(widget),
- (GtkIconSize)-1, widget, "gtk-image");
- gtk_icon_source_free(source);
-#endif
unref_image = true;
}
@@ -280,12 +249,7 @@ gboolean IconImpl::draw(GtkWidget *widget, cairo_t* cr)
GtkAllocation allocation;
GtkRequisition requisition;
gtk_widget_get_allocation(widget, &allocation);
-
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_get_preferred_size(widget, &requisition, NULL);
-#else
- gtk_widget_get_requisition(widget, &requisition);
-#endif
int x = floor(allocation.x + ((allocation.width - requisition.width) * 0.5));
int y = floor(allocation.y + ((allocation.height - requisition.height) * 0.5));
@@ -305,21 +269,6 @@ gboolean IconImpl::draw(GtkWidget *widget, cairo_t* cr)
return TRUE;
}
-#if !GTK_CHECK_VERSION(3,0,0)
-gboolean IconImpl::expose(GtkWidget *widget, GdkEventExpose * /*event*/)
-{
- gboolean result = TRUE;
-
- if (gtk_widget_is_drawable(widget)) {
- cairo_t * cr = gdk_cairo_create(gtk_widget_get_window(widget));
- result = draw(widget, cr);
- cairo_destroy(cr);
- }
-
- return result;
-}
-#endif
-
// PUBLIC CALL:
void sp_icon_fetch_pixbuf( SPIcon *icon )
{
diff --git a/src/widgets/ink-action.cpp b/src/widgets/ink-action.cpp
index c0797b236..2f1bf94e4 100644
--- a/src/widgets/ink-action.cpp
+++ b/src/widgets/ink-action.cpp
@@ -1,14 +1,9 @@
+#include "ink-action.h"
#include "widgets/icon.h"
-#include "widgets/ink-action.h"
+#include "widgets/image-menu-item.h"
-#include "widgets/button.h"
-
-#if GTK_CHECK_VERSION(3,0,0)
- // Fork of gtk-imagemenuitem to continue support
- #include "widgets/image-menu-item.h"
-
-#endif
+#include <gtk/gtk.h>
static void ink_action_finalize( GObject* obj );
static void ink_action_get_property( GObject* obj, guint propId, GValue* value, GParamSpec * pspec );
@@ -160,12 +155,7 @@ static GtkWidget* ink_action_create_menu_item( GtkAction* action )
if ( act->private_data->iconId ) {
gchar* label = 0;
g_object_get( G_OBJECT(act), "label", &label, NULL );
-
-#if GTK_CHECK_VERSION(3,0,0)
item = image_menu_item_new_with_mnemonic( label );
-#else
- item = gtk_image_menu_item_new_with_mnemonic( label );
-#endif
GtkWidget* child = sp_icon_new( Inkscape::ICON_SIZE_MENU, act->private_data->iconId );
// TODO this work-around is until SPIcon will live properly inside of a popup menu
@@ -180,12 +170,7 @@ static GtkWidget* ink_action_create_menu_item( GtkAction* action )
}
}
gtk_widget_show_all( child );
-
-#if GTK_CHECK_VERSION(3,0,0)
image_menu_item_set_image( IMAGE_MENU_ITEM(item), child );
-#else
- gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM(item), child );
-#endif
g_free( label );
label = 0;
@@ -220,454 +205,13 @@ static GtkWidget* ink_action_create_tool_item( GtkAction* action )
return item;
}
-
-
-/* --------------------------------------------------------------- */
-/* --------------------------------------------------------------- */
-/* --------------------------------------------------------------- */
-/* --------------------------------------------------------------- */
-
-
-static void ink_toggle_action_finalize( GObject* obj );
-static void ink_toggle_action_get_property( GObject* obj, guint propId, GValue* value, GParamSpec * pspec );
-static void ink_toggle_action_set_property( GObject* obj, guint propId, const GValue *value, GParamSpec* pspec );
-
-static GtkWidget* ink_toggle_action_create_menu_item( GtkAction* action );
-static GtkWidget* ink_toggle_action_create_tool_item( GtkAction* action );
-
-static void ink_toggle_action_update_icon( InkToggleAction* action );
-
-struct _InkToggleActionPrivate
-{
- gchar* iconId;
- Inkscape::IconSize iconSize;
-};
-
-#define INK_TOGGLE_ACTION_GET_PRIVATE( o ) ( G_TYPE_INSTANCE_GET_PRIVATE( (o), INK_TOGGLE_ACTION_TYPE, InkToggleActionPrivate ) )
-
-G_DEFINE_TYPE(InkToggleAction, ink_toggle_action, GTK_TYPE_TOGGLE_ACTION);
-
-static void ink_toggle_action_class_init( InkToggleActionClass* klass )
-{
- if ( klass ) {
- GObjectClass * objClass = G_OBJECT_CLASS( klass );
-
- objClass->finalize = ink_toggle_action_finalize;
- objClass->get_property = ink_toggle_action_get_property;
- objClass->set_property = ink_toggle_action_set_property;
-
- klass->parent_class.parent_class.create_menu_item = ink_toggle_action_create_menu_item;
- klass->parent_class.parent_class.create_tool_item = ink_toggle_action_create_tool_item;
- /*klass->parent_class.connect_proxy = connect_proxy;*/
- /*klass->parent_class.disconnect_proxy = disconnect_proxy;*/
-
- g_object_class_install_property( objClass,
- PROP_INK_ID,
- g_param_spec_string( "iconId",
- "Icon ID",
- "The id for the icon",
- "",
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT) ) );
-
- g_object_class_install_property( objClass,
- PROP_INK_SIZE,
- g_param_spec_int( "iconSize",
- "Icon Size",
- "The size the icon",
- (int)Inkscape::ICON_SIZE_MENU,
- (int)99,
- (int)Inkscape::ICON_SIZE_SMALL_TOOLBAR,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT) ) );
-
- g_type_class_add_private( klass, sizeof(InkToggleActionClass) );
- }
-}
-
-static void ink_toggle_action_init( InkToggleAction* action )
-{
- action->private_data = INK_TOGGLE_ACTION_GET_PRIVATE( action );
- action->private_data->iconId = 0;
- action->private_data->iconSize = Inkscape::ICON_SIZE_SMALL_TOOLBAR;
-}
-
-static void ink_toggle_action_finalize( GObject* obj )
-{
- InkToggleAction* action = INK_TOGGLE_ACTION( obj );
-
- g_free( action->private_data->iconId );
- g_free( action->private_data );
-
-}
-
-InkToggleAction* ink_toggle_action_new( const gchar *name,
- const gchar *label,
- const gchar *tooltip,
- const gchar *inkId,
- Inkscape::IconSize size,
- SPAttributeEnum attr)
-{
- GObject* obj = (GObject*)g_object_new( INK_TOGGLE_ACTION_TYPE,
- "name", name,
- "label", label,
- "tooltip", tooltip,
- "iconId", inkId,
- "iconSize", Inkscape::getRegisteredIconSize(size),
- //"SP_ATTR_INKSCAPE", attr, // Why doesn't this work and do I need to use g_object_set_data below?
- NULL );
-
- g_object_set_data(obj, "SP_ATTR_INKSCAPE", GINT_TO_POINTER(attr));
- InkToggleAction* action = INK_TOGGLE_ACTION( obj );
-
- return action;
-}
-
-static void ink_toggle_action_get_property( GObject* obj, guint propId, GValue* value, GParamSpec * pspec )
-{
- InkToggleAction* action = INK_TOGGLE_ACTION( obj );
- (void)action;
- switch ( propId ) {
- case PROP_INK_ID:
- {
- g_value_set_string( value, action->private_data->iconId );
- }
- break;
-
- case PROP_INK_SIZE:
- {
- g_value_set_int( value, action->private_data->iconSize );
- }
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID( obj, propId, pspec );
- }
-}
-
-void ink_toggle_action_set_property( GObject* obj, guint propId, const GValue *value, GParamSpec* pspec )
-{
- InkToggleAction* action = INK_TOGGLE_ACTION( obj );
- (void)action;
- switch ( propId ) {
- case PROP_INK_ID:
- {
- gchar* tmp = action->private_data->iconId;
- action->private_data->iconId = g_value_dup_string( value );
- g_free( tmp );
-
- ink_toggle_action_update_icon( action );
- }
- break;
-
- case PROP_INK_SIZE:
- {
- action->private_data->iconSize = (Inkscape::IconSize)g_value_get_int( value );
- }
- break;
-
- default:
- {
- G_OBJECT_WARN_INVALID_PROPERTY_ID( obj, propId, pspec );
- }
- }
-}
-
-static GtkWidget* ink_toggle_action_create_menu_item( GtkAction* action )
-{
- GtkWidget* item = GTK_TOGGLE_ACTION_CLASS(ink_toggle_action_parent_class)->parent_class.create_menu_item(action);
-
- return item;
-}
-
-static GtkWidget* ink_toggle_action_create_tool_item( GtkAction* action )
-{
- InkToggleAction* act = INK_TOGGLE_ACTION( action );
-
- GtkWidget* item = GTK_TOGGLE_ACTION_CLASS(ink_toggle_action_parent_class)->parent_class.create_tool_item(action);
- if ( GTK_IS_TOOL_BUTTON(item) ) {
- GtkToolButton* button = GTK_TOOL_BUTTON(item);
- if ( act->private_data->iconId ) {
- GtkWidget* child = sp_icon_new( act->private_data->iconSize, act->private_data->iconId );
-
-#if GTK_CHECK_VERSION(3,0,0)
- gtk_widget_set_hexpand(child, FALSE);
- gtk_widget_set_vexpand(child, FALSE);
- gtk_tool_button_set_icon_widget(button, child);
-#else
- GtkWidget* align = gtk_alignment_new( 0.5, 0.5, 0.0, 0.0 );
- gtk_container_add( GTK_CONTAINER(align), child );
- gtk_tool_button_set_icon_widget( button, align );
-#endif
- } else {
- gchar *label = 0;
- g_object_get( G_OBJECT(action), "short_label", &label, NULL );
- gtk_tool_button_set_label( button, label );
- g_free( label );
- label = 0;
- }
- } else {
- // For now trigger a warning but don't do anything else
- GtkToolButton* button = GTK_TOOL_BUTTON(item);
- (void)button;
- }
- gtk_widget_show_all( item );
-
- return item;
-}
-
-
-static void ink_toggle_action_update_icon( InkToggleAction* action )
-{
- if ( action ) {
- GSList* proxies = gtk_action_get_proxies( GTK_ACTION(action) );
- while ( proxies ) {
- if ( GTK_IS_TOOL_ITEM(proxies->data) ) {
- if ( GTK_IS_TOOL_BUTTON(proxies->data) ) {
- GtkToolButton* button = GTK_TOOL_BUTTON(proxies->data);
-
- GtkWidget* child = sp_icon_new( action->private_data->iconSize, action->private_data->iconId );
-
-#if GTK_CHECK_VERSION(3,0,0)
- gtk_widget_set_hexpand(child, FALSE);
- gtk_widget_set_vexpand(child, FALSE);
- gtk_widget_show_all(child);
- gtk_tool_button_set_icon_widget(button, child);
-#else
- GtkWidget* align = gtk_alignment_new( 0.5, 0.5, 0.0, 0.0 );
- gtk_container_add( GTK_CONTAINER(align), child );
- gtk_widget_show_all( align );
- gtk_tool_button_set_icon_widget( button, align );
-#endif
- }
- }
-
- proxies = g_slist_next( proxies );
- }
- }
-}
-
-
-/* --------------------------------------------------------------- */
-/* --------------------------------------------------------------- */
-/* --------------------------------------------------------------- */
-/* --------------------------------------------------------------- */
-
-
-static void ink_radio_action_finalize( GObject* obj );
-static void ink_radio_action_get_property( GObject* obj, guint propId, GValue* value, GParamSpec * pspec );
-static void ink_radio_action_set_property( GObject* obj, guint propId, const GValue *value, GParamSpec* pspec );
-
-static GtkWidget* ink_radio_action_create_menu_item( GtkAction* action );
-static GtkWidget* ink_radio_action_create_tool_item( GtkAction* action );
-
-struct _InkRadioActionPrivate
-{
- gchar* iconId;
- Inkscape::IconSize iconSize;
-};
-
-#define INK_RADIO_ACTION_GET_PRIVATE( o ) ( G_TYPE_INSTANCE_GET_PRIVATE( (o), INK_RADIO_ACTION_TYPE, InkRadioActionPrivate ) )
-
-G_DEFINE_TYPE(InkRadioAction, ink_radio_action, GTK_TYPE_RADIO_ACTION);
-
-static void ink_radio_action_class_init( InkRadioActionClass* klass )
-{
- if ( klass ) {
- GObjectClass * objClass = G_OBJECT_CLASS( klass );
-
- objClass->finalize = ink_radio_action_finalize;
- objClass->get_property = ink_radio_action_get_property;
- objClass->set_property = ink_radio_action_set_property;
-
- klass->parent_class.parent_class.parent_class.create_menu_item = ink_radio_action_create_menu_item;
- klass->parent_class.parent_class.parent_class.create_tool_item = ink_radio_action_create_tool_item;
- /*klass->parent_class.connect_proxy = connect_proxy;*/
- /*klass->parent_class.disconnect_proxy = disconnect_proxy;*/
-
- g_object_class_install_property( objClass,
- PROP_INK_ID,
- g_param_spec_string( "iconId",
- "Icon ID",
- "The id for the icon",
- "",
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT) ) );
-
- g_object_class_install_property( objClass,
- PROP_INK_SIZE,
- g_param_spec_int( "iconSize",
- "Icon Size",
- "The size the icon",
- (int)Inkscape::ICON_SIZE_MENU,
- (int)Inkscape::ICON_SIZE_DECORATION,
- (int)Inkscape::ICON_SIZE_SMALL_TOOLBAR,
- (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT) ) );
-
- g_type_class_add_private( klass, sizeof(InkRadioActionClass) );
- }
-}
-
-static void ink_radio_action_init( InkRadioAction* action )
-{
- action->private_data = INK_RADIO_ACTION_GET_PRIVATE( action );
- action->private_data->iconId = 0;
- action->private_data->iconSize = Inkscape::ICON_SIZE_SMALL_TOOLBAR;
-}
-
-static void ink_radio_action_finalize( GObject* obj )
-{
- InkRadioAction* action = INK_RADIO_ACTION( obj );
-
- g_free( action->private_data->iconId );
- g_free( action->private_data );
-
-}
-
-InkRadioAction* ink_radio_action_new( const gchar *name,
- const gchar *label,
- const gchar *tooltip,
- const gchar *inkId,
- Inkscape::IconSize size )
-{
- GObject* obj = (GObject*)g_object_new( INK_RADIO_ACTION_TYPE,
- "name", name,
- "label", label,
- "tooltip", tooltip,
- "iconId", inkId,
- "iconSize", Inkscape::getRegisteredIconSize(size),
- NULL );
-
- InkRadioAction* action = INK_RADIO_ACTION( obj );
-
- return action;
-}
-
-static void ink_radio_action_get_property( GObject* obj, guint propId, GValue* value, GParamSpec * pspec )
-{
- InkRadioAction* action = INK_RADIO_ACTION( obj );
- (void)action;
- switch ( propId ) {
- case PROP_INK_ID:
- {
- g_value_set_string( value, action->private_data->iconId );
- }
- break;
-
- case PROP_INK_SIZE:
- {
- g_value_set_int( value, action->private_data->iconSize );
- }
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID( obj, propId, pspec );
- }
-}
-
-void ink_radio_action_set_property( GObject* obj, guint propId, const GValue *value, GParamSpec* pspec )
-{
- InkRadioAction* action = INK_RADIO_ACTION( obj );
- (void)action;
- switch ( propId ) {
- case PROP_INK_ID:
- {
- gchar* tmp = action->private_data->iconId;
- action->private_data->iconId = g_value_dup_string( value );
- g_free( tmp );
- }
- break;
-
- case PROP_INK_SIZE:
- {
- action->private_data->iconSize = (Inkscape::IconSize)g_value_get_int( value );
- }
- break;
-
- default:
- {
- G_OBJECT_WARN_INVALID_PROPERTY_ID( obj, propId, pspec );
- }
- }
-}
-
-static GtkWidget* ink_radio_action_create_menu_item( GtkAction* action )
-{
- GtkWidget* item = GTK_RADIO_ACTION_CLASS(ink_radio_action_parent_class)->parent_class.parent_class.create_menu_item(action);
-
- return item;
-}
-
-static GtkWidget* ink_radio_action_create_tool_item( GtkAction* action )
-{
- InkRadioAction* act = INK_RADIO_ACTION( action );
- GtkWidget* item = GTK_RADIO_ACTION_CLASS(ink_radio_action_parent_class)->parent_class.parent_class.create_tool_item(action);
-
- if ( act->private_data->iconId ) {
- if ( GTK_IS_TOOL_BUTTON(item) ) {
- GtkToolButton* button = GTK_TOOL_BUTTON(item);
-
- GtkWidget* child = sp_icon_new( act->private_data->iconSize, act->private_data->iconId );
-
-#if GTK_CHECK_VERSION(3,0,0)
- gtk_widget_set_hexpand(child, FALSE);
- gtk_widget_set_vexpand(child, FALSE);
- gtk_tool_button_set_icon_widget(button, child);
-#else
- GtkWidget* align = gtk_alignment_new( 0.5, 0.5, 0.0, 0.0 );
- gtk_container_add( GTK_CONTAINER(align), child );
- gtk_tool_button_set_icon_widget( button, align );
-#endif
- } else {
- // For now trigger a warning but don't do anything else
- GtkToolButton* button = GTK_TOOL_BUTTON(item);
- (void)button;
- }
- }
-
- // TODO investigate if needed
- gtk_widget_show_all( item );
-
- return item;
-}
-
-
-/* --------------------------------------------------------------- */
-/* --------------------------------------------------------------- */
-/* --------------------------------------------------------------- */
-/* --------------------------------------------------------------- */
-
-// ToolMenu Action is happily derived from http://www.gtkforums.com/viewtopic.php?t=4215
-
-G_DEFINE_TYPE(InkToolMenuAction, ink_tool_menu_action, INK_ACTION_TYPE);
-
-static void
-ink_tool_menu_action_class_init (InkToolMenuActionClass *klass)
-{
- GtkActionClass *action_class = GTK_ACTION_CLASS (klass);
- action_class->toolbar_item_type = GTK_TYPE_MENU_TOOL_BUTTON;
-}
-
-static void
-ink_tool_menu_action_init (InkToolMenuAction* /*tma*/)
-{
-}
-
-InkToolMenuAction *
-ink_tool_menu_action_new (const gchar *name,
- const gchar *label,
- const gchar *tooltip,
- const gchar *inkId,
- Inkscape::IconSize size )
-{
- g_return_val_if_fail (name != NULL, NULL);
-
- GObject* obj = (GObject*)g_object_new( INK_TOOL_MENU_ACTION_TYPE,
- "name", name,
- "label", label,
- "tooltip", tooltip,
- "iconId", inkId,
- "iconSize", size,
- NULL );
-
- InkToolMenuAction* action = INK_TOOL_MENU_ACTION( obj );
-
- return action;
-}
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
diff --git a/src/widgets/ink-action.h b/src/widgets/ink-action.h
index ac5cb9873..738212c61 100644
--- a/src/widgets/ink-action.h
+++ b/src/widgets/ink-action.h
@@ -1,7 +1,6 @@
#ifndef SEEN_INK_ACTION
#define SEEN_INK_ACTION
-
#include <gtk/gtk.h>
#include "icon-size.h"
#include "attributes.h"
@@ -41,119 +40,16 @@ InkAction* ink_action_new( const gchar *name,
Inkscape::IconSize size );
-/* --------------------------------------------------------------- */
-/* --------------------------------------------------------------- */
-/* --------------------------------------------------------------- */
-/* --------------------------------------------------------------- */
-
-
-#define INK_TOGGLE_ACTION_TYPE ( ink_toggle_action_get_type() )
-#define INK_TOGGLE_ACTION( obj ) ( G_TYPE_CHECK_INSTANCE_CAST( (obj), INK_TOGGLE_ACTION_TYPE, InkToggleAction) )
-#define INK_TOGGLE_ACTION_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( (klass), INK_TOGGLE_ACTION_TYPE, InkToggleActionClass) )
-#define IS_INK_TOGGLE_ACTION( obj ) ( G_TYPE_CHECK_INSTANCE_TYPE( (obj), INK_TOGGLE_ACTION_TYPE) )
-#define IS_INK_TOGGLE_ACTION_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE( (klass), INK_TOGGLE_ACTION_TYPE) )
-#define INK_TOGGLE_ACTION_GET_CLASS( obj ) ( G_TYPE_INSTANCE_GET_CLASS( (obj), INK_TOGGLE_ACTION_TYPE, InkToggleActionClass) )
-
-typedef struct _InkToggleAction InkToggleAction;
-typedef struct _InkToggleActionClass InkToggleActionClass;
-typedef struct _InkToggleActionPrivate InkToggleActionPrivate;
-
-struct _InkToggleAction
-{
- GtkToggleAction action;
- InkToggleActionPrivate *private_data;
-};
-
-struct _InkToggleActionClass
-{
- GtkToggleActionClass parent_class;
-};
-
-GType ink_toggle_action_get_type( void );
-
-InkToggleAction* ink_toggle_action_new( const gchar *name,
- const gchar *label,
- const gchar *tooltip,
- const gchar *inkId,
- Inkscape::IconSize size,
- SPAttributeEnum attr = SP_ATTR_INVALID);
-
-
-/* --------------------------------------------------------------- */
-/* --------------------------------------------------------------- */
-/* --------------------------------------------------------------- */
-/* --------------------------------------------------------------- */
-
-
-#define INK_RADIO_ACTION_TYPE ( ink_radio_action_get_type() )
-#define INK_RADIO_ACTION( obj ) ( G_TYPE_CHECK_INSTANCE_CAST( (obj), INK_RADIO_ACTION_TYPE, InkRadioAction) )
-#define INK_RADIO_ACTION_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( (klass), INK_RADIO_ACTION_TYPE, InkRadioActionClass) )
-#define IS_INK_RADIO_ACTION( obj ) ( G_TYPE_CHECK_INSTANCE_TYPE( (obj), INK_RADIO_ACTION_TYPE) )
-#define IS_INK_RADIO_ACTION_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE( (klass), INK_RADIO_ACTION_TYPE) )
-#define INK_RADIO_ACTION_GET_CLASS( obj ) ( G_TYPE_INSTANCE_GET_CLASS( (obj), INK_RADIO_ACTION_TYPE, InkRadioActionClass) )
-
-typedef struct _InkRadioAction InkRadioAction;
-typedef struct _InkRadioActionClass InkRadioActionClass;
-typedef struct _InkRadioActionPrivate InkRadioActionPrivate;
-
-struct _InkRadioAction
-{
- GtkRadioAction action;
- InkRadioActionPrivate *private_data;
-};
-
-struct _InkRadioActionClass
-{
- GtkRadioActionClass parent_class;
-};
-
-GType ink_radio_action_get_type( void );
-
-InkRadioAction* ink_radio_action_new( const gchar *name,
- const gchar *label,
- const gchar *tooltip,
- const gchar *inkId,
- Inkscape::IconSize size );
-
-
-/* --------------------------------------------------------------- */
-/* --------------------------------------------------------------- */
-/* --------------------------------------------------------------- */
-/* --------------------------------------------------------------- */
-
-// ToolMenu Action is happily derived from http://www.gtkforums.com/viewtopic.php?t=4215
-
-#define INK_TOOL_MENU_ACTION_TYPE ( ink_tool_menu_action_get_type() )
-#define INK_TOOL_MENU_ACTION( obj ) ( G_TYPE_CHECK_INSTANCE_CAST( (obj), INK_TOOL_MENU_ACTION_TYPE, InkToolMenuAction) )
-#define INK_TOOL_MENU_ACTION_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( (klass), INK_TOOL_MENU_ACTION_TYPE, InkToolMenuActionClass) )
-#define IS_INK_TOOL_MENU_ACTION( obj ) ( G_TYPE_CHECK_INSTANCE_TYPE( (obj), INK_TOOL_MENU_ACTION_TYPE) )
-#define IS_INK_TOOL_MENU_ACTION_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE( (klass), INK_TOOL_MENU_ACTION_TYPE) )
-#define INK_TOOL_MENU_ACTION_GET_CLASS( obj ) ( G_TYPE_INSTANCE_GET_CLASS( (obj), INK_TOOL_MENU_ACTION_TYPE, InkToolMenuActionClass) )
-
-typedef struct _InkToolMenuAction InkToolMenuAction;
-typedef struct _InkToolMenuActionClass InkToolMenuActionClass;
-typedef struct _InkToolMenuActionPrivate InkToolMenuActionPrivate;
-
-struct _InkToolMenuAction
-{
- InkAction action;
-};
-
-struct _InkToolMenuActionClass
-{
- InkActionClass parent_class;
-};
-
-GType ink_tool_menu_action_get_type( void );
-
-InkToolMenuAction* ink_tool_menu_action_new( const gchar *name,
- const gchar *label,
- const gchar *tooltip,
- const gchar *inkId,
- Inkscape::IconSize size );
-
-
-
G_END_DECLS
#endif /* SEEN_INK_ACTION */
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
diff --git a/src/widgets/ink-comboboxentry-action.cpp b/src/widgets/ink-comboboxentry-action.cpp
index ec5e26cf5..2fecb06a4 100644
--- a/src/widgets/ink-comboboxentry-action.cpp
+++ b/src/widgets/ink-comboboxentry-action.cpp
@@ -371,16 +371,10 @@ GtkWidget* create_tool_item( GtkAction* action )
g_free( combobox_name );
{
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_halign(comboBoxEntry, GTK_ALIGN_START);
gtk_widget_set_hexpand(comboBoxEntry, FALSE);
gtk_widget_set_vexpand(comboBoxEntry, FALSE);
gtk_container_add(GTK_CONTAINER(item), comboBoxEntry);
-#else
- GtkWidget *align = gtk_alignment_new(0, 0.5, 0, 0);
- gtk_container_add( GTK_CONTAINER(align), comboBoxEntry );
- gtk_container_add( GTK_CONTAINER(item), align );
-#endif
}
ink_comboboxentry_action->combobox = GTK_COMBO_BOX (comboBoxEntry);
@@ -414,11 +408,7 @@ GtkWidget* create_tool_item( GtkAction* action )
// Optionally widen the combobox width... which widens the drop-down list in list mode.
if( ink_comboboxentry_action->extra_width > 0 ) {
GtkRequisition req;
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_get_preferred_size(GTK_WIDGET(ink_comboboxentry_action->combobox), &req, NULL);
-#else
- gtk_widget_size_request( GTK_WIDGET( ink_comboboxentry_action->combobox ), &req );
-#endif
gtk_widget_set_size_request( GTK_WIDGET( ink_comboboxentry_action->combobox ),
req.width + ink_comboboxentry_action->extra_width, -1 );
}
@@ -635,11 +625,7 @@ void ink_comboboxentry_action_set_extra_width( Ink_ComboBoxEntry_Action* action,
// Widget may not have been created....
if( action->combobox ) {
GtkRequisition req;
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_get_preferred_size(GTK_WIDGET(action->combobox), &req, NULL);
-#else
- gtk_widget_size_request( GTK_WIDGET( action->combobox ), &req );
-#endif
gtk_widget_set_size_request( GTK_WIDGET( action->combobox ), req.width + action->extra_width, -1 );
}
}
diff --git a/src/widgets/ink-radio-action.cpp b/src/widgets/ink-radio-action.cpp
new file mode 100644
index 000000000..2113819c3
--- /dev/null
+++ b/src/widgets/ink-radio-action.cpp
@@ -0,0 +1,185 @@
+#include "ink-radio-action.h"
+
+static void ink_radio_action_finalize( GObject* obj );
+static void ink_radio_action_get_property( GObject* obj, guint propId, GValue* value, GParamSpec * pspec );
+static void ink_radio_action_set_property( GObject* obj, guint propId, const GValue *value, GParamSpec* pspec );
+
+static GtkWidget* ink_radio_action_create_menu_item( GtkAction* action );
+static GtkWidget* ink_radio_action_create_tool_item( GtkAction* action );
+
+struct _InkRadioActionPrivate
+{
+ gchar* iconId;
+ Inkscape::IconSize iconSize;
+};
+
+#define INK_RADIO_ACTION_GET_PRIVATE( o ) ( G_TYPE_INSTANCE_GET_PRIVATE( (o), INK_RADIO_ACTION_TYPE, InkRadioActionPrivate ) )
+
+G_DEFINE_TYPE(InkRadioAction, ink_radio_action, GTK_TYPE_RADIO_ACTION);
+
+enum {
+ PROP_INK_ID = 1,
+ PROP_INK_SIZE
+};
+
+static void ink_radio_action_class_init( InkRadioActionClass* klass )
+{
+ if ( klass ) {
+ GObjectClass * objClass = G_OBJECT_CLASS( klass );
+
+ objClass->finalize = ink_radio_action_finalize;
+ objClass->get_property = ink_radio_action_get_property;
+ objClass->set_property = ink_radio_action_set_property;
+
+ klass->parent_class.parent_class.parent_class.create_menu_item = ink_radio_action_create_menu_item;
+ klass->parent_class.parent_class.parent_class.create_tool_item = ink_radio_action_create_tool_item;
+ /*klass->parent_class.connect_proxy = connect_proxy;*/
+ /*klass->parent_class.disconnect_proxy = disconnect_proxy;*/
+
+ g_object_class_install_property( objClass,
+ PROP_INK_ID,
+ g_param_spec_string( "iconId",
+ "Icon ID",
+ "The id for the icon",
+ "",
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT) ) );
+
+ g_object_class_install_property( objClass,
+ PROP_INK_SIZE,
+ g_param_spec_int( "iconSize",
+ "Icon Size",
+ "The size the icon",
+ (int)Inkscape::ICON_SIZE_MENU,
+ (int)Inkscape::ICON_SIZE_DECORATION,
+ (int)Inkscape::ICON_SIZE_SMALL_TOOLBAR,
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT) ) );
+
+ g_type_class_add_private( klass, sizeof(InkRadioActionClass) );
+ }
+}
+
+static void ink_radio_action_init( InkRadioAction* action )
+{
+ action->private_data = INK_RADIO_ACTION_GET_PRIVATE( action );
+ action->private_data->iconId = 0;
+ action->private_data->iconSize = Inkscape::ICON_SIZE_SMALL_TOOLBAR;
+}
+
+static void ink_radio_action_finalize( GObject* obj )
+{
+ InkRadioAction* action = INK_RADIO_ACTION( obj );
+
+ g_free( action->private_data->iconId );
+ g_free( action->private_data );
+
+}
+
+InkRadioAction* ink_radio_action_new( const gchar *name,
+ const gchar *label,
+ const gchar *tooltip,
+ const gchar *inkId,
+ Inkscape::IconSize size )
+{
+ GObject* obj = (GObject*)g_object_new( INK_RADIO_ACTION_TYPE,
+ "name", name,
+ "label", label,
+ "tooltip", tooltip,
+ "iconId", inkId,
+ "iconSize", Inkscape::getRegisteredIconSize(size),
+ NULL );
+
+ InkRadioAction* action = INK_RADIO_ACTION( obj );
+
+ return action;
+}
+
+static void ink_radio_action_get_property( GObject* obj, guint propId, GValue* value, GParamSpec * pspec )
+{
+ InkRadioAction* action = INK_RADIO_ACTION( obj );
+ (void)action;
+ switch ( propId ) {
+ case PROP_INK_ID:
+ {
+ g_value_set_string( value, action->private_data->iconId );
+ }
+ break;
+
+ case PROP_INK_SIZE:
+ {
+ g_value_set_int( value, action->private_data->iconSize );
+ }
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID( obj, propId, pspec );
+ }
+}
+
+void ink_radio_action_set_property( GObject* obj, guint propId, const GValue *value, GParamSpec* pspec )
+{
+ InkRadioAction* action = INK_RADIO_ACTION( obj );
+ (void)action;
+ switch ( propId ) {
+ case PROP_INK_ID:
+ {
+ gchar* tmp = action->private_data->iconId;
+ action->private_data->iconId = g_value_dup_string( value );
+ g_free( tmp );
+ }
+ break;
+
+ case PROP_INK_SIZE:
+ {
+ action->private_data->iconSize = (Inkscape::IconSize)g_value_get_int( value );
+ }
+ break;
+
+ default:
+ {
+ G_OBJECT_WARN_INVALID_PROPERTY_ID( obj, propId, pspec );
+ }
+ }
+}
+
+static GtkWidget* ink_radio_action_create_menu_item( GtkAction* action )
+{
+ GtkWidget* item = GTK_RADIO_ACTION_CLASS(ink_radio_action_parent_class)->parent_class.parent_class.create_menu_item(action);
+
+ return item;
+}
+
+static GtkWidget* ink_radio_action_create_tool_item( GtkAction* action )
+{
+ InkRadioAction* act = INK_RADIO_ACTION( action );
+ GtkWidget* item = GTK_RADIO_ACTION_CLASS(ink_radio_action_parent_class)->parent_class.parent_class.create_tool_item(action);
+
+ if ( act->private_data->iconId ) {
+ if ( GTK_IS_TOOL_BUTTON(item) ) {
+ GtkToolButton* button = GTK_TOOL_BUTTON(item);
+
+ GtkWidget* child = sp_icon_new( act->private_data->iconSize, act->private_data->iconId );
+ gtk_widget_set_hexpand(child, FALSE);
+ gtk_widget_set_vexpand(child, FALSE);
+ gtk_tool_button_set_icon_widget(button, child);
+ } else {
+ // For now trigger a warning but don't do anything else
+ GtkToolButton* button = GTK_TOOL_BUTTON(item);
+ (void)button;
+ }
+ }
+
+ // TODO investigate if needed
+ gtk_widget_show_all( item );
+
+ return item;
+}
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
diff --git a/src/widgets/ink-radio-action.h b/src/widgets/ink-radio-action.h
new file mode 100644
index 000000000..c1f059c4f
--- /dev/null
+++ b/src/widgets/ink-radio-action.h
@@ -0,0 +1,52 @@
+#ifndef INK_RADIO_ACTION_H
+#define INK_RADIO_ACTION_H
+
+#include <gtk/gtk.h>
+
+#include "icon.h"
+
+G_BEGIN_DECLS
+
+#define INK_RADIO_ACTION_TYPE ( ink_radio_action_get_type() )
+#define INK_RADIO_ACTION( obj ) ( G_TYPE_CHECK_INSTANCE_CAST( (obj), INK_RADIO_ACTION_TYPE, InkRadioAction) )
+#define INK_RADIO_ACTION_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( (klass), INK_RADIO_ACTION_TYPE, InkRadioActionClass) )
+#define IS_INK_RADIO_ACTION( obj ) ( G_TYPE_CHECK_INSTANCE_TYPE( (obj), INK_RADIO_ACTION_TYPE) )
+#define IS_INK_RADIO_ACTION_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE( (klass), INK_RADIO_ACTION_TYPE) )
+#define INK_RADIO_ACTION_GET_CLASS( obj ) ( G_TYPE_INSTANCE_GET_CLASS( (obj), INK_RADIO_ACTION_TYPE, InkRadioActionClass) )
+
+typedef struct _InkRadioAction InkRadioAction;
+typedef struct _InkRadioActionClass InkRadioActionClass;
+typedef struct _InkRadioActionPrivate InkRadioActionPrivate;
+
+struct _InkRadioAction
+{
+ GtkRadioAction action;
+ InkRadioActionPrivate *private_data;
+};
+
+struct _InkRadioActionClass
+{
+ GtkRadioActionClass parent_class;
+};
+
+GType ink_radio_action_get_type( void );
+
+InkRadioAction* ink_radio_action_new( const gchar *name,
+ const gchar *label,
+ const gchar *tooltip,
+ const gchar *inkId,
+ Inkscape::IconSize size );
+
+G_END_DECLS
+
+#endif // INK_RADIO_ACTION_H
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
diff --git a/src/widgets/ink-toggle-action.cpp b/src/widgets/ink-toggle-action.cpp
new file mode 100644
index 000000000..3eed974dc
--- /dev/null
+++ b/src/widgets/ink-toggle-action.cpp
@@ -0,0 +1,221 @@
+#include "ink-toggle-action.h"
+#include "icon.h"
+
+static void ink_toggle_action_finalize( GObject* obj );
+static void ink_toggle_action_get_property( GObject* obj, guint propId, GValue* value, GParamSpec * pspec );
+static void ink_toggle_action_set_property( GObject* obj, guint propId, const GValue *value, GParamSpec* pspec );
+
+static GtkWidget* ink_toggle_action_create_menu_item( GtkAction* action );
+static GtkWidget* ink_toggle_action_create_tool_item( GtkAction* action );
+
+static void ink_toggle_action_update_icon( InkToggleAction* action );
+
+struct _InkToggleActionPrivate
+{
+ gchar* iconId;
+ Inkscape::IconSize iconSize;
+};
+
+#define INK_TOGGLE_ACTION_GET_PRIVATE( o ) ( G_TYPE_INSTANCE_GET_PRIVATE( (o), INK_TOGGLE_ACTION_TYPE, InkToggleActionPrivate ) )
+
+G_DEFINE_TYPE(InkToggleAction, ink_toggle_action, GTK_TYPE_TOGGLE_ACTION);
+
+enum {
+ PROP_INK_ID = 1,
+ PROP_INK_SIZE
+};
+
+static void ink_toggle_action_class_init( InkToggleActionClass* klass )
+{
+ if ( klass ) {
+ GObjectClass * objClass = G_OBJECT_CLASS( klass );
+
+ objClass->finalize = ink_toggle_action_finalize;
+ objClass->get_property = ink_toggle_action_get_property;
+ objClass->set_property = ink_toggle_action_set_property;
+
+ klass->parent_class.parent_class.create_menu_item = ink_toggle_action_create_menu_item;
+ klass->parent_class.parent_class.create_tool_item = ink_toggle_action_create_tool_item;
+ /*klass->parent_class.connect_proxy = connect_proxy;*/
+ /*klass->parent_class.disconnect_proxy = disconnect_proxy;*/
+
+ g_object_class_install_property( objClass,
+ PROP_INK_ID,
+ g_param_spec_string( "iconId",
+ "Icon ID",
+ "The id for the icon",
+ "",
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT) ) );
+
+ g_object_class_install_property( objClass,
+ PROP_INK_SIZE,
+ g_param_spec_int( "iconSize",
+ "Icon Size",
+ "The size the icon",
+ (int)Inkscape::ICON_SIZE_MENU,
+ (int)99,
+ (int)Inkscape::ICON_SIZE_SMALL_TOOLBAR,
+ (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT) ) );
+
+ g_type_class_add_private( klass, sizeof(InkToggleActionClass) );
+ }
+}
+
+static void ink_toggle_action_init( InkToggleAction* action )
+{
+ action->private_data = INK_TOGGLE_ACTION_GET_PRIVATE( action );
+ action->private_data->iconId = 0;
+ action->private_data->iconSize = Inkscape::ICON_SIZE_SMALL_TOOLBAR;
+}
+
+static void ink_toggle_action_finalize( GObject* obj )
+{
+ InkToggleAction* action = INK_TOGGLE_ACTION( obj );
+
+ g_free( action->private_data->iconId );
+ g_free( action->private_data );
+
+}
+
+InkToggleAction* ink_toggle_action_new( const gchar *name,
+ const gchar *label,
+ const gchar *tooltip,
+ const gchar *inkId,
+ Inkscape::IconSize size,
+ SPAttributeEnum attr)
+{
+ GObject* obj = (GObject*)g_object_new( INK_TOGGLE_ACTION_TYPE,
+ "name", name,
+ "label", label,
+ "tooltip", tooltip,
+ "iconId", inkId,
+ "iconSize", Inkscape::getRegisteredIconSize(size),
+ //"SP_ATTR_INKSCAPE", attr, // Why doesn't this work and do I need to use g_object_set_data below?
+ NULL );
+
+ g_object_set_data(obj, "SP_ATTR_INKSCAPE", GINT_TO_POINTER(attr));
+ InkToggleAction* action = INK_TOGGLE_ACTION( obj );
+
+ return action;
+}
+
+static void ink_toggle_action_get_property( GObject* obj, guint propId, GValue* value, GParamSpec * pspec )
+{
+ InkToggleAction* action = INK_TOGGLE_ACTION( obj );
+ (void)action;
+ switch ( propId ) {
+ case PROP_INK_ID:
+ {
+ g_value_set_string( value, action->private_data->iconId );
+ }
+ break;
+
+ case PROP_INK_SIZE:
+ {
+ g_value_set_int( value, action->private_data->iconSize );
+ }
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID( obj, propId, pspec );
+ }
+}
+
+void ink_toggle_action_set_property( GObject* obj, guint propId, const GValue *value, GParamSpec* pspec )
+{
+ InkToggleAction* action = INK_TOGGLE_ACTION( obj );
+ (void)action;
+ switch ( propId ) {
+ case PROP_INK_ID:
+ {
+ gchar* tmp = action->private_data->iconId;
+ action->private_data->iconId = g_value_dup_string( value );
+ g_free( tmp );
+
+ ink_toggle_action_update_icon( action );
+ }
+ break;
+
+ case PROP_INK_SIZE:
+ {
+ action->private_data->iconSize = (Inkscape::IconSize)g_value_get_int( value );
+ }
+ break;
+
+ default:
+ {
+ G_OBJECT_WARN_INVALID_PROPERTY_ID( obj, propId, pspec );
+ }
+ }
+}
+
+static GtkWidget* ink_toggle_action_create_menu_item( GtkAction* action )
+{
+ GtkWidget* item = GTK_TOGGLE_ACTION_CLASS(ink_toggle_action_parent_class)->parent_class.create_menu_item(action);
+
+ return item;
+}
+
+static GtkWidget* ink_toggle_action_create_tool_item( GtkAction* action )
+{
+ InkToggleAction* act = INK_TOGGLE_ACTION( action );
+
+ GtkWidget* item = GTK_TOGGLE_ACTION_CLASS(ink_toggle_action_parent_class)->parent_class.create_tool_item(action);
+ if ( GTK_IS_TOOL_BUTTON(item) ) {
+ GtkToolButton* button = GTK_TOOL_BUTTON(item);
+ if ( act->private_data->iconId ) {
+ GtkWidget* child = sp_icon_new( act->private_data->iconSize, act->private_data->iconId );
+
+ gtk_widget_set_hexpand(child, FALSE);
+ gtk_widget_set_vexpand(child, FALSE);
+ gtk_tool_button_set_icon_widget(button, child);
+ } else {
+ gchar *label = 0;
+ g_object_get( G_OBJECT(action), "short_label", &label, NULL );
+ gtk_tool_button_set_label( button, label );
+ g_free( label );
+ label = 0;
+ }
+ } else {
+ // For now trigger a warning but don't do anything else
+ GtkToolButton* button = GTK_TOOL_BUTTON(item);
+ (void)button;
+ }
+ gtk_widget_show_all( item );
+
+ return item;
+}
+
+
+static void ink_toggle_action_update_icon( InkToggleAction* action )
+{
+ if ( action ) {
+ GSList* proxies = gtk_action_get_proxies( GTK_ACTION(action) );
+ while ( proxies ) {
+ if ( GTK_IS_TOOL_ITEM(proxies->data) ) {
+ if ( GTK_IS_TOOL_BUTTON(proxies->data) ) {
+ GtkToolButton* button = GTK_TOOL_BUTTON(proxies->data);
+
+ GtkWidget* child = sp_icon_new( action->private_data->iconSize, action->private_data->iconId );
+ gtk_widget_set_hexpand(child, FALSE);
+ gtk_widget_set_vexpand(child, FALSE);
+ gtk_widget_show_all(child);
+ gtk_tool_button_set_icon_widget(button, child);
+ }
+ }
+
+ proxies = g_slist_next( proxies );
+ }
+ }
+}
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
diff --git a/src/widgets/ink-toggle-action.h b/src/widgets/ink-toggle-action.h
new file mode 100644
index 000000000..8e9d5e257
--- /dev/null
+++ b/src/widgets/ink-toggle-action.h
@@ -0,0 +1,53 @@
+#ifndef INK_TOGGLE_ACTION_H
+#define INK_TOGGLE_ACTION_H
+
+#include <gtk/gtk.h>
+
+#include "attributes.h"
+#include "icon-size.h"
+
+G_BEGIN_DECLS
+#define INK_TOGGLE_ACTION_TYPE ( ink_toggle_action_get_type() )
+#define INK_TOGGLE_ACTION( obj ) ( G_TYPE_CHECK_INSTANCE_CAST( (obj), INK_TOGGLE_ACTION_TYPE, InkToggleAction) )
+#define INK_TOGGLE_ACTION_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( (klass), INK_TOGGLE_ACTION_TYPE, InkToggleActionClass) )
+#define IS_INK_TOGGLE_ACTION( obj ) ( G_TYPE_CHECK_INSTANCE_TYPE( (obj), INK_TOGGLE_ACTION_TYPE) )
+#define IS_INK_TOGGLE_ACTION_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE( (klass), INK_TOGGLE_ACTION_TYPE) )
+#define INK_TOGGLE_ACTION_GET_CLASS( obj ) ( G_TYPE_INSTANCE_GET_CLASS( (obj), INK_TOGGLE_ACTION_TYPE, InkToggleActionClass) )
+
+typedef struct _InkToggleAction InkToggleAction;
+typedef struct _InkToggleActionClass InkToggleActionClass;
+typedef struct _InkToggleActionPrivate InkToggleActionPrivate;
+
+struct _InkToggleAction
+{
+ GtkToggleAction action;
+ InkToggleActionPrivate *private_data;
+};
+
+struct _InkToggleActionClass
+{
+ GtkToggleActionClass parent_class;
+};
+
+GType ink_toggle_action_get_type( void );
+
+InkToggleAction* ink_toggle_action_new( const gchar *name,
+ const gchar *label,
+ const gchar *tooltip,
+ const gchar *inkId,
+ Inkscape::IconSize size,
+ SPAttributeEnum attr = SP_ATTR_INVALID);
+
+G_END_DECLS
+
+#endif // INK_TOGGLE_ACTION_H
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
diff --git a/src/widgets/ink-tool-menu-action.cpp b/src/widgets/ink-tool-menu-action.cpp
new file mode 100644
index 000000000..29d8dc92f
--- /dev/null
+++ b/src/widgets/ink-tool-menu-action.cpp
@@ -0,0 +1,49 @@
+#include "ink-tool-menu-action.h"
+
+// ToolMenu Action is happily derived from http://www.gtkforums.com/viewtopic.php?t=4215
+
+G_DEFINE_TYPE(InkToolMenuAction, ink_tool_menu_action, INK_ACTION_TYPE);
+
+static void
+ink_tool_menu_action_class_init (InkToolMenuActionClass *klass)
+{
+ GtkActionClass *action_class = GTK_ACTION_CLASS (klass);
+ action_class->toolbar_item_type = GTK_TYPE_MENU_TOOL_BUTTON;
+}
+
+static void
+ink_tool_menu_action_init (InkToolMenuAction* /*tma*/)
+{
+}
+
+InkToolMenuAction *
+ink_tool_menu_action_new (const gchar *name,
+ const gchar *label,
+ const gchar *tooltip,
+ const gchar *inkId,
+ Inkscape::IconSize size )
+{
+ g_return_val_if_fail (name != NULL, NULL);
+
+ GObject* obj = (GObject*)g_object_new( INK_TOOL_MENU_ACTION_TYPE,
+ "name", name,
+ "label", label,
+ "tooltip", tooltip,
+ "iconId", inkId,
+ "iconSize", size,
+ NULL );
+
+ InkToolMenuAction* action = INK_TOOL_MENU_ACTION( obj );
+
+ return action;
+}
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
diff --git a/src/widgets/ink-tool-menu-action.h b/src/widgets/ink-tool-menu-action.h
new file mode 100644
index 000000000..be04489d3
--- /dev/null
+++ b/src/widgets/ink-tool-menu-action.h
@@ -0,0 +1,52 @@
+#ifndef INK_TOOL_MENU_ACTION_H
+#define INK_TOOL_MENU_ACTION_H
+
+#include "ink-action.h"
+
+// ToolMenu Action is happily derived from http://www.gtkforums.com/viewtopic.php?t=4215
+
+G_BEGIN_DECLS
+
+#define INK_TOOL_MENU_ACTION_TYPE ( ink_tool_menu_action_get_type() )
+#define INK_TOOL_MENU_ACTION( obj ) ( G_TYPE_CHECK_INSTANCE_CAST( (obj), INK_TOOL_MENU_ACTION_TYPE, InkToolMenuAction) )
+#define INK_TOOL_MENU_ACTION_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( (klass), INK_TOOL_MENU_ACTION_TYPE, InkToolMenuActionClass) )
+#define IS_INK_TOOL_MENU_ACTION( obj ) ( G_TYPE_CHECK_INSTANCE_TYPE( (obj), INK_TOOL_MENU_ACTION_TYPE) )
+#define IS_INK_TOOL_MENU_ACTION_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE( (klass), INK_TOOL_MENU_ACTION_TYPE) )
+#define INK_TOOL_MENU_ACTION_GET_CLASS( obj ) ( G_TYPE_INSTANCE_GET_CLASS( (obj), INK_TOOL_MENU_ACTION_TYPE, InkToolMenuActionClass) )
+
+typedef struct _InkToolMenuAction InkToolMenuAction;
+typedef struct _InkToolMenuActionClass InkToolMenuActionClass;
+typedef struct _InkToolMenuActionPrivate InkToolMenuActionPrivate;
+
+struct _InkToolMenuAction
+{
+ InkAction action;
+};
+
+struct _InkToolMenuActionClass
+{
+ InkActionClass parent_class;
+};
+
+GType ink_tool_menu_action_get_type( void );
+
+InkToolMenuAction* ink_tool_menu_action_new( const gchar *name,
+ const gchar *label,
+ const gchar *tooltip,
+ const gchar *inkId,
+ Inkscape::IconSize size );
+
+G_END_DECLS
+
+#endif // INK_TOOL_MENU_ACTION_H
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
diff --git a/src/widgets/lpe-toolbar.cpp b/src/widgets/lpe-toolbar.cpp
index d44983a15..5df5fde70 100644
--- a/src/widgets/lpe-toolbar.cpp
+++ b/src/widgets/lpe-toolbar.cpp
@@ -34,7 +34,8 @@
#include "widgets/ege-select-one-action.h"
#include "helper/action-context.h"
#include "helper/action.h"
-#include "widgets/ink-action.h"
+#include "ink-radio-action.h"
+#include "ink-toggle-action.h"
#include "ui/tools-switch.h"
#include "ui/tools/lpe-tool.h"
#include "ui/widget/unit-tracker.h"
diff --git a/src/widgets/measure-toolbar.cpp b/src/widgets/measure-toolbar.cpp
index 53790cfac..a8c974bbc 100644
--- a/src/widgets/measure-toolbar.cpp
+++ b/src/widgets/measure-toolbar.cpp
@@ -39,7 +39,8 @@
#include "widgets/ege-adjustment-action.h"
#include "widgets/ege-output-action.h"
#include "toolbox.h"
-#include "widgets/ink-action.h"
+#include "ink-action.h"
+#include "ink-toggle-action.h"
#include "ui/icon-names.h"
#include "ui/tools/measure-tool.h"
#include "ui/widget/unit-tracker.h"
diff --git a/src/widgets/mesh-toolbar.cpp b/src/widgets/mesh-toolbar.cpp
index 1e5c12d41..fb540b5f5 100644
--- a/src/widgets/mesh-toolbar.cpp
+++ b/src/widgets/mesh-toolbar.cpp
@@ -47,7 +47,9 @@
#include "widgets/ege-adjustment-action.h"
#include "widgets/ege-select-one-action.h"
-#include "widgets/ink-action.h"
+#include "ink-action.h"
+#include "ink-radio-action.h"
+#include "ink-toggle-action.h"
#include "sp-stop.h"
#include "svg/css-ostringstream.h"
@@ -78,8 +80,8 @@ void ms_read_selection( Inkscape::Selection *selection,
bool first = true;
ms_type = SP_MESH_TYPE_COONS;
- std::vector<SPItem*> itemlist=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
+ auto itemlist= selection->items();
+ for(auto i=itemlist.begin();i!=itemlist.end();++i){
SPItem *item = *i;
SPStyle *style = item->style;
@@ -205,8 +207,8 @@ void ms_get_dt_selected_gradient(Inkscape::Selection *selection, SPMesh *&ms_sel
{
SPMesh *gradient = 0;
- std::vector<SPItem*> itemlist=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
+ auto itemlist= selection->items();
+ for(auto i=itemlist.begin();i!=itemlist.end();++i){
SPItem *item = *i;// get the items gradient, not the getVector() version
SPStyle *style = item->style;
SPPaintServer *server = 0;
diff --git a/src/widgets/node-toolbar.cpp b/src/widgets/node-toolbar.cpp
index ed3e33acc..31efaa0b4 100644
--- a/src/widgets/node-toolbar.cpp
+++ b/src/widgets/node-toolbar.cpp
@@ -35,7 +35,8 @@
#include "desktop.h"
#include "document-undo.h"
#include "widgets/ege-adjustment-action.h"
-#include "widgets/ink-action.h"
+#include "ink-toggle-action.h"
+#include "ink-tool-menu-action.h"
#include "inkscape.h"
#include "selection-chemistry.h"
#include "sp-namedview.h"
diff --git a/src/widgets/paint-selector.cpp b/src/widgets/paint-selector.cpp
index a421ea7d3..01118f337 100644
--- a/src/widgets/paint-selector.cpp
+++ b/src/widgets/paint-selector.cpp
@@ -131,11 +131,7 @@ static SPGradientSelector *getGradientFromData(SPPaintSelector const *psel)
return grad;
}
-#if GTK_CHECK_VERSION(3,0,0)
G_DEFINE_TYPE(SPPaintSelector, sp_paint_selector, GTK_TYPE_BOX);
-#else
-G_DEFINE_TYPE(SPPaintSelector, sp_paint_selector, GTK_TYPE_VBOX);
-#endif
static void
sp_paint_selector_class_init(SPPaintSelectorClass *klass)
@@ -194,19 +190,13 @@ sp_paint_selector_class_init(SPPaintSelectorClass *klass)
static void
sp_paint_selector_init(SPPaintSelector *psel)
{
-#if GTK_CHECK_VERSION(3,0,0)
gtk_orientable_set_orientation(GTK_ORIENTABLE(psel), GTK_ORIENTATION_VERTICAL);
-#endif
psel->mode = static_cast<SPPaintSelector::Mode>(-1); // huh? do you mean 0xff? -- I think this means "not in the enum"
/* Paint style button box */
-#if GTK_CHECK_VERSION(3,0,0)
psel->style = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous(GTK_BOX(psel->style), FALSE);
-#else
- psel->style = gtk_hbox_new(FALSE, 0);
-#endif
gtk_widget_show(psel->style);
gtk_container_set_border_width(GTK_CONTAINER(psel->style), 4);
gtk_box_pack_start(GTK_BOX(psel), psel->style, FALSE, FALSE, 0);
@@ -233,12 +223,8 @@ sp_paint_selector_init(SPPaintSelector *psel)
/* Fillrule */
{
-#if GTK_CHECK_VERSION(3,0,0)
- psel->fillrulebox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
- gtk_box_set_homogeneous(GTK_BOX(psel->fillrulebox), FALSE);
-#else
- psel->fillrulebox = gtk_hbox_new(FALSE, 0);
-#endif
+ psel->fillrulebox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
+ gtk_box_set_homogeneous(GTK_BOX(psel->fillrulebox), FALSE);
gtk_box_pack_end(GTK_BOX(psel->style), psel->fillrulebox, FALSE, FALSE, 0);
GtkWidget *w;
@@ -267,22 +253,14 @@ sp_paint_selector_init(SPPaintSelector *psel)
/* Frame */
psel->label = gtk_label_new("");
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *lbbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4);
+ auto lbbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4);
gtk_box_set_homogeneous(GTK_BOX(lbbox), FALSE);
-#else
- GtkWidget *lbbox = gtk_hbox_new(FALSE, 4);
-#endif
gtk_widget_show(psel->label);
gtk_box_pack_start(GTK_BOX(lbbox), psel->label, false, false, 4);
gtk_box_pack_start(GTK_BOX(psel), lbbox, false, false, 4);
-#if GTK_CHECK_VERSION(3,0,0)
psel->frame = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4);
gtk_box_set_homogeneous(GTK_BOX(psel->frame), FALSE);
-#else
- psel->frame = gtk_vbox_new(FALSE, 4);
-#endif
gtk_widget_show(psel->frame);
//gtk_container_set_border_width(GTK_CONTAINER(psel->frame), 0);
gtk_box_pack_start(GTK_BOX(psel), psel->frame, TRUE, TRUE, 0);
@@ -697,12 +675,8 @@ static void sp_paint_selector_set_mode_color(SPPaintSelector *psel, SPPaintSelec
sp_paint_selector_clear_frame(psel);
/* Create new color selector */
/* Create vbox */
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *vb = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4);
- gtk_box_set_homogeneous(GTK_BOX(vb), FALSE);
-#else
- GtkWidget *vb = gtk_vbox_new(FALSE, 4);
-#endif
+ auto vb = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4);
+ gtk_box_set_homogeneous(GTK_BOX(vb), FALSE);
gtk_widget_show(vb);
/* Color selector */
@@ -1043,21 +1017,13 @@ static void sp_paint_selector_set_mode_pattern(SPPaintSelector *psel, SPPaintSel
sp_paint_selector_clear_frame(psel);
/* Create vbox */
-#if GTK_CHECK_VERSION(3,0,0)
tbl = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4);
gtk_box_set_homogeneous(GTK_BOX(tbl), FALSE);
-#else
- tbl = gtk_vbox_new(FALSE, 4);
-#endif
gtk_widget_show(tbl);
{
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 1);
+ auto hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 1);
gtk_box_set_homogeneous(GTK_BOX(hb), FALSE);
-#else
- GtkWidget *hb = gtk_hbox_new(FALSE, 1);
-#endif
/**
* Create a combo_box and store with 4 columns,
@@ -1085,13 +1051,9 @@ static void sp_paint_selector_set_mode_pattern(SPPaintSelector *psel, SPPaintSel
}
{
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
+ auto hb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous(GTK_BOX(hb), FALSE);
-#else
- GtkWidget *hb = gtk_hbox_new(FALSE, 0);
-#endif
- GtkWidget *l = gtk_label_new(NULL);
+ auto l = gtk_label_new(NULL);
gtk_label_set_markup(GTK_LABEL(l), _("Use the <b>Node tool</b> to adjust position, scale, and rotation of the pattern on canvas. Use <b>Object &gt; Pattern &gt; Objects to Pattern</b> to create a new pattern from selection."));
gtk_label_set_line_wrap(GTK_LABEL(l), true);
gtk_widget_set_size_request(l, 180, -1);
diff --git a/src/widgets/paint-selector.h b/src/widgets/paint-selector.h
index 23c2dd456..dde14b6a6 100644
--- a/src/widgets/paint-selector.h
+++ b/src/widgets/paint-selector.h
@@ -40,11 +40,7 @@ class SPStyle;
* Generic paint selector widget.
*/
struct SPPaintSelector {
-#if GTK_CHECK_VERSION(3,0,0)
GtkBox vbox;
-#else
- GtkVBox vbox;
-#endif
enum Mode {
MODE_EMPTY,
@@ -130,11 +126,7 @@ enum {COMBO_COL_LABEL=0, COMBO_COL_STOCK=1, COMBO_COL_PATTERN=2, COMBO_COL_SEP=3
/// The SPPaintSelector vtable
struct SPPaintSelectorClass {
-#if GTK_CHECK_VERSION(3,0,0)
GtkBoxClass parent_class;
-#else
- GtkVBoxClass parent_class;
-#endif
void (* mode_changed) (SPPaintSelector *psel, SPPaintSelector::Mode mode);
diff --git a/src/widgets/pencil-toolbar.cpp b/src/widgets/pencil-toolbar.cpp
index d402cc714..582fb66ba 100644
--- a/src/widgets/pencil-toolbar.cpp
+++ b/src/widgets/pencil-toolbar.cpp
@@ -35,7 +35,9 @@
#include "desktop.h"
#include "widgets/ege-adjustment-action.h"
#include "widgets/ege-select-one-action.h"
-#include "widgets/ink-action.h"
+#include "ink-action.h"
+#include "ink-radio-action.h"
+#include "ink-toggle-action.h"
#include "toolbox.h"
#include "ui/tools-switch.h"
#include "ui/icon-names.h"
@@ -235,8 +237,8 @@ static void sp_pencil_tb_defaults(GtkWidget * /*widget*/, GObject *obj)
static void sp_simplify_flatten(GtkWidget * /*widget*/, GObject *obj)
{
SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data(obj, "desktop"));
- std::vector<SPItem *> selected = desktop->getSelection()->itemList();
- for (std::vector<SPItem *>::iterator it(selected.begin()); it != selected.end(); ++it){
+ auto selected = desktop->getSelection()->items();
+ for (auto it(selected.begin()); it != selected.end(); ++it){
SPLPEItem* lpeitem = dynamic_cast<SPLPEItem*>(*it);
if (lpeitem && lpeitem->hasPathEffect()){
PathEffectList lpelist = lpeitem->getEffectList();
@@ -280,8 +282,8 @@ static void sp_pencil_tb_tolerance_value_changed(GtkAdjustment *adj, GObject *tb
gtk_adjustment_get_value(adj));
g_object_set_data( tbl, "freeze", GINT_TO_POINTER(FALSE) );
SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data(tbl, "desktop"));
- std::vector<SPItem *> selected = desktop->getSelection()->itemList();
- for (std::vector<SPItem *>::iterator it(selected.begin()); it != selected.end(); ++it){
+ auto selected = desktop->getSelection()->items();
+ for (auto it(selected.begin()); it != selected.end(); ++it){
SPLPEItem* lpeitem = dynamic_cast<SPLPEItem*>(*it);
if (lpeitem && lpeitem->hasPathEffect()){
Inkscape::LivePathEffect::Effect* simplify = lpeitem->getPathEffectOfType(Inkscape::LivePathEffect::SIMPLIFY);
diff --git a/src/widgets/rect-toolbar.cpp b/src/widgets/rect-toolbar.cpp
index c9b75294b..67947c1fd 100644
--- a/src/widgets/rect-toolbar.cpp
+++ b/src/widgets/rect-toolbar.cpp
@@ -102,8 +102,8 @@ static void sp_rtb_value_changed(GtkAdjustment *adj, GObject *tbl, gchar const *
bool modmade = false;
Inkscape::Selection *selection = desktop->getSelection();
- std::vector<SPItem*> itemlist=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
+ auto itemlist= selection->items();
+ for(auto i=itemlist.begin();i!=itemlist.end();++i){
if (SP_IS_RECT(*i)) {
if (gtk_adjustment_get_value(adj) != 0) {
(SP_RECT(*i)->*setter)(Quantity::convert(gtk_adjustment_get_value(adj), unit, "px"));
@@ -239,8 +239,8 @@ static void sp_rect_toolbox_selection_changed(Inkscape::Selection *selection, GO
}
purge_repr_listener( tbl, tbl );
- std::vector<SPItem*> itemlist=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
+ auto itemlist= selection->items();
+ for(auto i=itemlist.begin();i!=itemlist.end();++i){
if (SP_IS_RECT(*i)) {
n_selected++;
item = *i;
diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp
index 9a48b9a07..e551c28c3 100644
--- a/src/widgets/select-toolbar.cpp
+++ b/src/widgets/select-toolbar.cpp
@@ -29,7 +29,8 @@
#include "widgets/ege-adjustment-action.h"
#include "helper/action-context.h"
#include "helper/action.h"
-#include "widgets/ink-action.h"
+#include "ink-action.h"
+#include "ink-toggle-action.h"
#include "inkscape.h"
#include "message-stack.h"
#include "selection-chemistry.h"
@@ -253,7 +254,7 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, GObject *tbl)
scaler = get_scale_transform_for_uniform_stroke (*bbox_geom, 0, 0, false, false, x0, y0, x1, y1);
}
- sp_selection_apply_affine(selection, scaler);
+ sp_object_set_apply_affine(selection, scaler);
DocumentUndo::maybeDone(document, actionkey, SP_VERB_CONTEXT_SELECT,
_("Transform by toolbar"));
@@ -411,12 +412,8 @@ void sp_select_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb
g_object_set_data(G_OBJECT(spw), "dtw", desktop->getCanvas());
// The vb frame holds all other widgets and is used to set sensitivity depending on selection state.
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *vb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
+ auto vb = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous(GTK_BOX(vb), FALSE);
-#else
- GtkWidget *vb = gtk_hbox_new(FALSE, 0);
-#endif
gtk_widget_show(vb);
gtk_container_add(GTK_CONTAINER(spw), vb);
diff --git a/src/widgets/sp-attribute-widget.cpp b/src/widgets/sp-attribute-widget.cpp
index de44cdbb4..cbff62b23 100644
--- a/src/widgets/sp-attribute-widget.cpp
+++ b/src/widgets/sp-attribute-widget.cpp
@@ -16,12 +16,7 @@
#include <glibmm/i18n.h>
#include <gtkmm/entry.h>
-
-#if WITH_GTKMM_3_0
-# include <gtkmm/grid.h>
-#else
-# include <gtkmm/table.h>
-#endif
+#include <gtkmm/grid.h>
#include "sp-object.h"
#include "xml/repr.h"
@@ -152,11 +147,7 @@ void SPAttributeTable::set_object(SPObject *object,
release_connection = object->connectRelease (sigc::bind<1>(sigc::ptr_fun(&sp_attribute_table_object_release), this));
// Create table
-#if WITH_GTKMM_3_0
table = new Gtk::Grid();
-#else
- table = new Gtk::Table(attributes.size(), 2, false);
-#endif
if (!(parent == NULL))
gtk_container_add(GTK_CONTAINER(parent), (GtkWidget*)table->gobj());
@@ -167,27 +158,17 @@ void SPAttributeTable::set_object(SPObject *object,
Gtk::Label *ll = new Gtk::Label (_(labels[i].c_str()));
ll->show();
ll->set_alignment (1.0, 0.5);
-
-#if WITH_GTKMM_3_0
ll->set_vexpand();
ll->set_margin_left(XPAD);
ll->set_margin_right(XPAD);
ll->set_margin_top(XPAD);
ll->set_margin_bottom(XPAD);
table->attach(*ll, 0, i, 1, 1);
-#else
- table->attach (*ll, 0, 1, i, i + 1,
- Gtk::FILL,
- (Gtk::EXPAND | Gtk::FILL),
- XPAD, YPAD );
-#endif
Gtk::Entry *ee = new Gtk::Entry();
ee->show();
const gchar *val = object->getRepr()->attribute(attributes[i].c_str());
ee->set_text (val ? val : (const gchar *) "");
-
-#if WITH_GTKMM_3_0
ee->set_hexpand();
ee->set_vexpand();
ee->set_margin_left(XPAD);
@@ -195,12 +176,6 @@ void SPAttributeTable::set_object(SPObject *object,
ee->set_margin_top(XPAD);
ee->set_margin_bottom(XPAD);
table->attach(*ee, 1, i, 1, 1);
-#else
- table->attach (*ee, 1, 2, i, i + 1,
- (Gtk::EXPAND | Gtk::FILL),
- (Gtk::EXPAND | Gtk::FILL),
- XPAD, YPAD );
-#endif
_entries.push_back(ee);
g_signal_connect ( ee->gobj(), "changed",
diff --git a/src/widgets/sp-attribute-widget.h b/src/widgets/sp-attribute-widget.h
index d9b972201..161bb706a 100644
--- a/src/widgets/sp-attribute-widget.h
+++ b/src/widgets/sp-attribute-widget.h
@@ -25,12 +25,7 @@
namespace Gtk {
class Entry;
-
-#if WITH_GTKMM_3_0
class Grid;
-#else
-class Table;
-#endif
}
namespace Inkscape {
@@ -138,11 +133,7 @@ private:
/**
* Container widget for the dynamically created child widgets (labels and entry boxes).
*/
-#if WITH_GTKMM_3_0
Gtk::Grid *table;
-#else
- Gtk::Table *table;
-#endif
/**
* List of attributes.
diff --git a/src/widgets/sp-color-selector.cpp b/src/widgets/sp-color-selector.cpp
index 932f074d2..159350012 100644
--- a/src/widgets/sp-color-selector.cpp
+++ b/src/widgets/sp-color-selector.cpp
@@ -32,11 +32,7 @@ static guint csel_signals[LAST_SIGNAL] = {0};
double ColorSelector::_epsilon = 1e-4;
-#if GTK_CHECK_VERSION(3,0,0)
G_DEFINE_TYPE(SPColorSelector, sp_color_selector, GTK_TYPE_BOX);
-#else
-G_DEFINE_TYPE(SPColorSelector, sp_color_selector, GTK_TYPE_VBOX);
-#endif
void sp_color_selector_class_init( SPColorSelectorClass *klass )
{
@@ -86,9 +82,7 @@ void sp_color_selector_class_init( SPColorSelectorClass *klass )
void sp_color_selector_init( SPColorSelector *csel )
{
-#if GTK_CHECK_VERSION(3,0,0)
gtk_orientable_set_orientation(GTK_ORIENTABLE(csel), GTK_ORIENTATION_VERTICAL);
-#endif
if ( csel->base )
{
diff --git a/src/widgets/sp-color-selector.h b/src/widgets/sp-color-selector.h
index 75cb79b00..14a9fccdf 100644
--- a/src/widgets/sp-color-selector.h
+++ b/src/widgets/sp-color-selector.h
@@ -64,21 +64,12 @@ private:
#define SP_COLOR_SELECTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SP_TYPE_COLOR_SELECTOR, SPColorSelectorClass))
struct SPColorSelector {
-#if GTK_CHECK_VERSION(3,0,0)
GtkBox vbox;
-#else
- GtkVBox vbox;
-#endif
-
ColorSelector* base;
};
struct SPColorSelectorClass {
-#if GTK_CHECK_VERSION(3,0,0)
GtkBoxClass parent_class;
-#else
- GtkVBoxClass parent_class;
-#endif
const gchar **name;
guint submode_count;
diff --git a/src/widgets/sp-widget.cpp b/src/widgets/sp-widget.cpp
index 180704f59..707e62c12 100644
--- a/src/widgets/sp-widget.cpp
+++ b/src/widgets/sp-widget.cpp
@@ -40,7 +40,6 @@ public:
static void show(GtkWidget *widget);
static void hide(GtkWidget *widget);
-#if GTK_CHECK_VERSION(3,0,0)
static void getPreferredWidth(GtkWidget *widget,
gint *minimal_width,
gint *natural_width);
@@ -49,10 +48,6 @@ public:
gint *minimal_height,
gint *natural_height);
static gboolean draw(GtkWidget *widget, cairo_t *cr);
-#else
- static void sizeRequest(GtkWidget *widget, GtkRequisition *requisition);
- static gboolean expose(GtkWidget *widget, GdkEventExpose *event);
-#endif
static void sizeAllocate(GtkWidget *widget, GtkAllocation *allocation);
static void modifySelectionCB(Selection *selection, guint flags, SPWidget *spw);
@@ -119,14 +114,9 @@ sp_widget_class_init(SPWidgetClass *klass)
widget_class->show = SPWidgetImpl::show;
widget_class->hide = SPWidgetImpl::hide;
-#if GTK_CHECK_VERSION(3,0,0)
widget_class->get_preferred_width = SPWidgetImpl::getPreferredWidth;
widget_class->get_preferred_height = SPWidgetImpl::getPreferredHeight;
widget_class->draw = SPWidgetImpl::draw;
-#else
- widget_class->size_request = SPWidgetImpl::sizeRequest;
- widget_class->expose_event = SPWidgetImpl::expose;
-#endif
widget_class->size_allocate = SPWidgetImpl::sizeAllocate;
}
@@ -206,27 +196,18 @@ void SPWidgetImpl::hide(GtkWidget *widget)
}
}
-#if GTK_CHECK_VERSION(3,0,0)
gboolean SPWidgetImpl::draw(GtkWidget *widget, cairo_t *cr)
-#else
-gboolean SPWidgetImpl::expose(GtkWidget *widget, GdkEventExpose *event)
-#endif
{
GtkBin *bin = GTK_BIN(widget);
GtkWidget *child = gtk_bin_get_child(bin);
if (child) {
-#if GTK_CHECK_VERSION(3,0,0)
gtk_container_propagate_draw(GTK_CONTAINER(widget), child, cr);
-#else
- gtk_container_propagate_expose(GTK_CONTAINER(widget), child, event);
-#endif
}
return FALSE;
}
-#if GTK_CHECK_VERSION(3,0,0)
void SPWidgetImpl::getPreferredWidth(GtkWidget *widget, gint *minimal_width, gint *natural_width)
{
GtkBin *bin = GTK_BIN(widget);
@@ -246,17 +227,6 @@ void SPWidgetImpl::getPreferredHeight(GtkWidget *widget, gint *minimal_height, g
gtk_widget_get_preferred_height(child, minimal_height, natural_height);
}
}
-#else
-void SPWidgetImpl::sizeRequest(GtkWidget *widget, GtkRequisition *requisition)
-{
- GtkBin *bin = GTK_BIN(widget);
- GtkWidget *child = gtk_bin_get_child(bin);
-
- if (child) {
- gtk_widget_size_request(child, requisition);
- }
-}
-#endif
void SPWidgetImpl::sizeAllocate(GtkWidget *widget, GtkAllocation *allocation)
{
diff --git a/src/widgets/sp-xmlview-attr-list.cpp b/src/widgets/sp-xmlview-attr-list.cpp
index 45dbae52a..e99605b97 100644
--- a/src/widgets/sp-xmlview-attr-list.cpp
+++ b/src/widgets/sp-xmlview-attr-list.cpp
@@ -20,11 +20,7 @@
#include "../xml/node-event-vector.h"
#include "sp-xmlview-attr-list.h"
-#if GTK_CHECK_VERSION(3,0,0)
static void sp_xmlview_attr_list_destroy(GtkWidget * object);
-#else
-static void sp_xmlview_attr_list_destroy(GtkObject * object);
-#endif
static void event_attr_changed (Inkscape::XML::Node * repr, const gchar * name, const gchar * old_value, const gchar * new_value, bool is_interactive, gpointer data);
@@ -87,13 +83,8 @@ G_DEFINE_TYPE(SPXMLViewAttrList, sp_xmlview_attr_list, GTK_TYPE_TREE_VIEW);
void sp_xmlview_attr_list_class_init (SPXMLViewAttrListClass * klass)
{
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidgetClass * widget_class = GTK_WIDGET_CLASS(klass);
+ auto widget_class = GTK_WIDGET_CLASS(klass);
widget_class->destroy = sp_xmlview_attr_list_destroy;
-#else
- GtkObjectClass * object_class = GTK_OBJECT_CLASS(klass);
- object_class->destroy = sp_xmlview_attr_list_destroy;
-#endif
g_signal_new("row-value-changed",
G_TYPE_FROM_CLASS(klass),
@@ -112,11 +103,7 @@ sp_xmlview_attr_list_init (SPXMLViewAttrList * list)
list->repr = NULL;
}
-#if GTK_CHECK_VERSION(3,0,0)
void sp_xmlview_attr_list_destroy(GtkWidget * object)
-#else
-void sp_xmlview_attr_list_destroy(GtkObject * object)
-#endif
{
SPXMLViewAttrList * list;
@@ -125,11 +112,7 @@ void sp_xmlview_attr_list_destroy(GtkObject * object)
g_object_unref(list->store);
sp_xmlview_attr_list_set_repr (list, NULL);
-#if GTK_CHECK_VERSION(3,0,0)
GTK_WIDGET_CLASS(sp_xmlview_attr_list_parent_class)->destroy (object);
-#else
- GTK_OBJECT_CLASS(sp_xmlview_attr_list_parent_class)->destroy (object);
-#endif
}
void sp_xmlview_attr_list_select_row_by_key(SPXMLViewAttrList * list, const gchar *name)
diff --git a/src/widgets/sp-xmlview-content.cpp b/src/widgets/sp-xmlview-content.cpp
index a1d8475ba..6e59ba3cd 100644
--- a/src/widgets/sp-xmlview-content.cpp
+++ b/src/widgets/sp-xmlview-content.cpp
@@ -23,11 +23,7 @@
using Inkscape::DocumentUndo;
-#if GTK_CHECK_VERSION(3,0,0)
static void sp_xmlview_content_destroy(GtkWidget * object);
-#else
-static void sp_xmlview_content_destroy(GtkObject * object);
-#endif
void sp_xmlview_content_changed (GtkTextBuffer *tb, SPXMLViewContent *text);
@@ -80,13 +76,8 @@ G_DEFINE_TYPE(SPXMLViewContent, sp_xmlview_content, GTK_TYPE_TEXT_VIEW);
void sp_xmlview_content_class_init(SPXMLViewContentClass * klass)
{
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidgetClass * widget_class = GTK_WIDGET_CLASS(klass);
+ auto widget_class = GTK_WIDGET_CLASS(klass);
widget_class->destroy = sp_xmlview_content_destroy;
-#else
- GtkObjectClass * object_class = GTK_OBJECT_CLASS(klass);
- object_class->destroy = sp_xmlview_content_destroy;
-#endif
}
void
@@ -96,21 +87,13 @@ sp_xmlview_content_init (SPXMLViewContent *text)
text->blocked = FALSE;
}
-#if GTK_CHECK_VERSION(3,0,0)
void sp_xmlview_content_destroy(GtkWidget * object)
-#else
-void sp_xmlview_content_destroy(GtkObject * object)
-#endif
{
SPXMLViewContent * text = SP_XMLVIEW_CONTENT (object);
sp_xmlview_content_set_repr (text, NULL);
-#if GTK_CHECK_VERSION(3,0,0)
GTK_WIDGET_CLASS (sp_xmlview_content_parent_class)->destroy (object);
-#else
- GTK_OBJECT_CLASS (sp_xmlview_content_parent_class)->destroy (object);
-#endif
}
void
diff --git a/src/widgets/sp-xmlview-tree.cpp b/src/widgets/sp-xmlview-tree.cpp
index 5af7c243d..3f8cc6063 100644
--- a/src/widgets/sp-xmlview-tree.cpp
+++ b/src/widgets/sp-xmlview-tree.cpp
@@ -22,11 +22,7 @@ struct NodeData {
enum { STORE_TEXT_COL = 0, STORE_DATA_COL, STORE_REPR_COL, STORE_N_COLS };
-#if GTK_CHECK_VERSION(3,0,0)
static void sp_xmlview_tree_destroy(GtkWidget * object);
-#else
-static void sp_xmlview_tree_destroy(GtkObject * object);
-#endif
static NodeData * node_data_new (SPXMLViewTree * tree, GtkTreeIter * node, GtkTreeRowReference *rowref, Inkscape::XML::Node * repr);
@@ -120,13 +116,8 @@ G_DEFINE_TYPE(SPXMLViewTree, sp_xmlview_tree, GTK_TYPE_TREE_VIEW);
void sp_xmlview_tree_class_init(SPXMLViewTreeClass * klass)
{
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidgetClass * widget_class = GTK_WIDGET_CLASS(klass);
+ auto widget_class = GTK_WIDGET_CLASS(klass);
widget_class->destroy = sp_xmlview_tree_destroy;
-#else
- GtkObjectClass * object_class = GTK_OBJECT_CLASS(klass);
- object_class->destroy = sp_xmlview_tree_destroy;
-#endif
// Signal for when a tree drag and drop has completed
g_signal_new ( "tree_move",
@@ -147,22 +138,13 @@ sp_xmlview_tree_init (SPXMLViewTree * tree)
tree->dndactive = FALSE;
}
-
-#if GTK_CHECK_VERSION(3,0,0)
void sp_xmlview_tree_destroy(GtkWidget * object)
-#else
-void sp_xmlview_tree_destroy(GtkObject * object)
-#endif
{
SPXMLViewTree * tree = SP_XMLVIEW_TREE (object);
sp_xmlview_tree_set_repr (tree, NULL);
-#if GTK_CHECK_VERSION(3,0,0)
GTK_WIDGET_CLASS(sp_xmlview_tree_parent_class)->destroy (object);
-#else
- GTK_OBJECT_CLASS(sp_xmlview_tree_parent_class)->destroy (object);
-#endif
}
/*
diff --git a/src/widgets/spiral-toolbar.cpp b/src/widgets/spiral-toolbar.cpp
index 7406be255..98d21c84d 100644
--- a/src/widgets/spiral-toolbar.cpp
+++ b/src/widgets/spiral-toolbar.cpp
@@ -76,8 +76,8 @@ static void sp_spl_tb_value_changed(GtkAdjustment *adj, GObject *tbl, Glib::ustr
gchar* namespaced_name = g_strconcat("sodipodi:", value_name.data(), NULL);
bool modmade = false;
- std::vector<SPItem*> itemlist=desktop->getSelection()->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end(); ++i){
+ auto itemlist= desktop->getSelection()->items();
+ for(auto i=itemlist.begin();i!=itemlist.end(); ++i){
SPItem *item = *i;
if (SP_IS_SPIRAL(item)) {
Inkscape::XML::Node *repr = item->getRepr();
@@ -192,8 +192,8 @@ static void sp_spiral_toolbox_selection_changed(Inkscape::Selection *selection,
purge_repr_listener( tbl, tbl );
- std::vector<SPItem*> itemlist=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end(); ++i){
+ auto itemlist= selection->items();
+ for(auto i=itemlist.begin();i!=itemlist.end(); ++i){
SPItem *item = *i;
if (SP_IS_SPIRAL(item)) {
n_selected++;
diff --git a/src/widgets/spray-toolbar.cpp b/src/widgets/spray-toolbar.cpp
index 43d00c53e..a724637e3 100644
--- a/src/widgets/spray-toolbar.cpp
+++ b/src/widgets/spray-toolbar.cpp
@@ -36,7 +36,8 @@
#include "inkscape.h"
#include "widgets/ege-adjustment-action.h"
#include "widgets/ege-select-one-action.h"
-#include "widgets/ink-action.h"
+#include "ink-radio-action.h"
+#include "ink-toggle-action.h"
#include "toolbox.h"
#include "ui/dialog/clonetiler.h"
#include "ui/dialog/dialog-manager.h"
diff --git a/src/widgets/spw-utilities.cpp b/src/widgets/spw-utilities.cpp
index 8bc472601..88a76b1ed 100644
--- a/src/widgets/spw-utilities.cpp
+++ b/src/widgets/spw-utilities.cpp
@@ -19,12 +19,7 @@
#include <gtkmm/box.h>
#include <gtkmm/label.h>
-
-#if GTK_CHECK_VERSION(3,0,0)
#include <gtkmm/grid.h>
-#else
-#include <gtkmm/table.h>
-#endif
#include "selection.h"
@@ -34,11 +29,7 @@
* Creates a label widget with the given text, at the given col, row
* position in the table.
*/
-#if GTK_CHECK_VERSION(3,0,0)
Gtk::Label * spw_label(Gtk::Grid *table, const gchar *label_text, int col, int row, Gtk::Widget* target)
-#else
-Gtk::Label * spw_label(Gtk::Table *table, const gchar *label_text, int col, int row, Gtk::Widget* target)
-#endif
{
Gtk::Label *label_widget = new Gtk::Label();
g_assert(label_widget != NULL);
@@ -54,7 +45,6 @@ Gtk::Label * spw_label(Gtk::Table *table, const gchar *label_text, int col, int
label_widget->set_alignment(1.0, 0.5);
label_widget->show();
-#if GTK_CHECK_VERSION(3,0,0)
label_widget->set_hexpand();
label_widget->set_halign(Gtk::ALIGN_FILL);
label_widget->set_valign(Gtk::ALIGN_CENTER);
@@ -68,9 +58,6 @@ Gtk::Label * spw_label(Gtk::Table *table, const gchar *label_text, int col, int
#endif
table->attach(*label_widget, col, row, 1, 1);
-#else
- table->attach(*label_widget, col, col+1, row, row+1, (Gtk::EXPAND | Gtk::FILL), static_cast<Gtk::AttachOptions>(0), 4, 0);
-#endif
return label_widget;
}
@@ -82,16 +69,9 @@ spw_label_old(GtkWidget *table, const gchar *label_text, int col, int row)
label_widget = gtk_label_new (label_text);
g_assert(label_widget != NULL);
-
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_halign(label_widget, GTK_ALIGN_END);
-#else
- gtk_misc_set_alignment (GTK_MISC (label_widget), 1.0, 0.5);
-#endif
-
gtk_widget_show (label_widget);
-#if GTK_CHECK_VERSION(3,0,0)
#if GTK_CHECK_VERSION(3,12,0)
gtk_widget_set_margin_start(label_widget, 4);
gtk_widget_set_margin_end(label_widget, 4);
@@ -103,10 +83,6 @@ spw_label_old(GtkWidget *table, const gchar *label_text, int col, int row)
gtk_widget_set_halign(label_widget, GTK_ALIGN_FILL);
gtk_widget_set_valign(label_widget, GTK_ALIGN_CENTER);
gtk_grid_attach(GTK_GRID(table), label_widget, col, row, 1, 1);
-#else
- gtk_table_attach(GTK_TABLE (table), label_widget, col, col+1, row, row+1,
- (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)0, 4, 0);
-#endif
return label_widget;
}
@@ -115,25 +91,16 @@ spw_label_old(GtkWidget *table, const gchar *label_text, int col, int row)
* Creates a horizontal layout manager with 4-pixel spacing between children
* and space for 'width' columns.
*/
-#if GTK_CHECK_VERSION(3,0,0)
Gtk::HBox * spw_hbox(Gtk::Grid * table, int width, int col, int row)
-#else
-Gtk::HBox * spw_hbox(Gtk::Table * table, int width, int col, int row)
-#endif
{
/* Create a new hbox with a 4-pixel spacing between children */
Gtk::HBox *hb = new Gtk::HBox(false, 4);
g_assert(hb != NULL);
hb->show();
-
-#if GTK_CHECK_VERSION(3,0,0)
hb->set_hexpand();
hb->set_halign(Gtk::ALIGN_FILL);
hb->set_valign(Gtk::ALIGN_CENTER);
table->attach(*hb, col, row, width, 1);
-#else
- table->attach(*hb, col, col+width, row, row+1, (Gtk::EXPAND | Gtk::FILL), static_cast<Gtk::AttachOptions>(0), 0, 0);
-#endif
return hb;
}
@@ -175,37 +142,21 @@ spw_checkbutton(GtkWidget * dialog, GtkWidget * table,
g_assert(table != NULL);
GtkWidget *l = gtk_label_new (label);
-
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_halign(l, GTK_ALIGN_END);
-#else
- gtk_misc_set_alignment (GTK_MISC (l), 1.0, 0.5);
-#endif
-
gtk_widget_show (l);
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_halign(l, GTK_ALIGN_FILL);
gtk_widget_set_hexpand(l, TRUE);
gtk_widget_set_valign(l, GTK_ALIGN_CENTER);
gtk_grid_attach(GTK_GRID(table), l, 0, row, 1, 1);
-#else
- gtk_table_attach (GTK_TABLE (table), l, 0, 1, row, row+1,
- (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)0, 0, 0);
-#endif
b = gtk_check_button_new ();
gtk_widget_show (b);
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_halign(b, GTK_ALIGN_FILL);
gtk_widget_set_hexpand(b, TRUE);
gtk_widget_set_valign(b, GTK_ALIGN_CENTER);
gtk_grid_attach(GTK_GRID(table), b, 1, row, 1, 1);
-#else
- gtk_table_attach (GTK_TABLE (table), b, 1, 2, row, row+1,
- (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)0, 0, 0);
-#endif
g_object_set_data (G_OBJECT (b), "key", key);
g_object_set_data (G_OBJECT (dialog), key, b);
@@ -233,16 +184,10 @@ spw_dropdown(GtkWidget * dialog, GtkWidget * table,
spw_label_old(table, label_text, 0, row);
gtk_widget_show (selector);
-
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_halign(selector, GTK_ALIGN_FILL);
gtk_widget_set_hexpand(selector, TRUE);
gtk_widget_set_valign(selector, GTK_ALIGN_CENTER);
gtk_grid_attach(GTK_GRID(table), selector, 1, row, 1, 1);
-#else
- gtk_table_attach (GTK_TABLE (table), selector, 1, 2, row, row+1,
- (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)0, 0, 0);
-#endif
g_object_set_data (G_OBJECT (dialog), key, selector);
return selector;
@@ -253,8 +198,7 @@ sp_set_font_size_recursive (GtkWidget *w, gpointer font)
{
guint size = GPOINTER_TO_UINT (font);
-#if GTK_CHECK_VERSION(3,0,0)
- GtkCssProvider *css_provider = gtk_css_provider_new();
+ auto css_provider = gtk_css_provider_new();
const double pt_size = size / static_cast<double>(PANGO_SCALE);
std::ostringstream css_data;
@@ -266,25 +210,16 @@ sp_set_font_size_recursive (GtkWidget *w, gpointer font)
css_data.str().c_str(),
-1, NULL);
- GtkStyleContext *style_context = gtk_widget_get_style_context(w);
+ auto style_context = gtk_widget_get_style_context(w);
gtk_style_context_add_provider(style_context,
GTK_STYLE_PROVIDER(css_provider),
GTK_STYLE_PROVIDER_PRIORITY_USER);
-#else
- PangoFontDescription* pan = pango_font_description_new ();
- pango_font_description_set_size (pan, size);
- gtk_widget_modify_font (w, pan);
-#endif
if (GTK_IS_CONTAINER(w)) {
gtk_container_foreach (GTK_CONTAINER(w), (GtkCallback) sp_set_font_size_recursive, font);
}
-#if GTK_CHECK_VERSION(3,0,0)
g_object_unref(css_provider);
-#else
- pango_font_description_free (pan);
-#endif
}
void
diff --git a/src/widgets/spw-utilities.h b/src/widgets/spw-utilities.h
index 31f29e026..71b451631 100644
--- a/src/widgets/spw-utilities.h
+++ b/src/widgets/spw-utilities.h
@@ -20,25 +20,13 @@
namespace Gtk {
class Label;
-
-#if GTK_CHECK_VERSION(3,0,0)
class Grid;
-#else
- class Table;
-#endif
-
class HBox;
class Widget;
}
-#if GTK_CHECK_VERSION(3,0,0)
Gtk::Label * spw_label(Gtk::Grid *table, gchar const *label_text, int col, int row, Gtk::Widget *target);
Gtk::HBox * spw_hbox(Gtk::Grid *table, int width, int col, int row);
-#else
-Gtk::Label * spw_label(Gtk::Table *table, gchar const *label_text, int col, int row, Gtk::Widget *target);
-Gtk::HBox * spw_hbox(Gtk::Table *table, int width, int col, int row);
-#endif
-
GtkWidget * spw_label_old(GtkWidget *table, gchar const *label_text, int col, int row);
GtkWidget *
diff --git a/src/widgets/star-toolbar.cpp b/src/widgets/star-toolbar.cpp
index 7f4293b62..8f667a656 100644
--- a/src/widgets/star-toolbar.cpp
+++ b/src/widgets/star-toolbar.cpp
@@ -37,7 +37,8 @@
#include "widgets/ege-adjustment-action.h"
#include "widgets/ege-output-action.h"
#include "widgets/ege-select-one-action.h"
-#include "widgets/ink-action.h"
+#include "ink-action.h"
+#include "ink-radio-action.h"
#include "selection.h"
#include "sp-star.h"
#include "toolbox.h"
@@ -80,8 +81,8 @@ static void sp_stb_magnitude_value_changed( GtkAdjustment *adj, GObject *dataKlu
bool modmade = false;
Inkscape::Selection *selection = desktop->getSelection();
- std::vector<SPItem*> itemlist=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
+ auto itemlist= selection->items();
+ for(auto i=itemlist.begin();i!=itemlist.end();++i){
SPItem *item = *i;
if (SP_IS_STAR(item)) {
Inkscape::XML::Node *repr = item->getRepr();
@@ -125,8 +126,8 @@ static void sp_stb_proportion_value_changed( GtkAdjustment *adj, GObject *dataKl
bool modmade = false;
Inkscape::Selection *selection = desktop->getSelection();
- std::vector<SPItem*> itemlist=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
+ auto itemlist= selection->items();
+ for(auto i=itemlist.begin();i!=itemlist.end();++i){
SPItem *item = *i;
if (SP_IS_STAR(item)) {
Inkscape::XML::Node *repr = item->getRepr();
@@ -182,8 +183,8 @@ static void sp_stb_sides_flat_state_changed( EgeSelectOneAction *act, GObject *d
gtk_action_set_visible( prop_action, !flat );
}
- std::vector<SPItem*> itemlist=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
+ auto itemlist= selection->items();
+ for(auto i=itemlist.begin();i!=itemlist.end();++i){
SPItem *item = *i;
if (SP_IS_STAR(item)) {
Inkscape::XML::Node *repr = item->getRepr();
@@ -221,8 +222,8 @@ static void sp_stb_rounded_value_changed( GtkAdjustment *adj, GObject *dataKludg
bool modmade = false;
Inkscape::Selection *selection = desktop->getSelection();
- std::vector<SPItem*> itemlist=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
+ auto itemlist= selection->items();
+ for(auto i=itemlist.begin();i!=itemlist.end();++i){
SPItem *item = *i;
if (SP_IS_STAR(item)) {
Inkscape::XML::Node *repr = item->getRepr();
@@ -261,8 +262,8 @@ static void sp_stb_randomized_value_changed( GtkAdjustment *adj, GObject *dataKl
bool modmade = false;
Inkscape::Selection *selection = desktop->getSelection();
- std::vector<SPItem*> itemlist=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
+ auto itemlist= selection->items();
+ for(auto i=itemlist.begin();i!=itemlist.end();++i){
SPItem *item = *i;
if (SP_IS_STAR(item)) {
Inkscape::XML::Node *repr = item->getRepr();
@@ -364,8 +365,8 @@ sp_star_toolbox_selection_changed(Inkscape::Selection *selection, GObject *tbl)
purge_repr_listener( tbl, tbl );
- std::vector<SPItem*> itemlist=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
+ auto itemlist= selection->items();
+ for(auto i=itemlist.begin();i!=itemlist.end();++i){
SPItem *item = *i;
if (SP_IS_STAR(item)) {
n_selected++;
diff --git a/src/widgets/stroke-marker-selector.cpp b/src/widgets/stroke-marker-selector.cpp
index 2a0a10efa..b0c23a88c 100644
--- a/src/widgets/stroke-marker-selector.cpp
+++ b/src/widgets/stroke-marker-selector.cpp
@@ -329,10 +329,10 @@ GSList *MarkerComboBox::get_marker_list (SPDocument *source)
return NULL;
}
- for ( SPObject *child = defs->firstChild(); child; child = child->getNext() )
+ for (auto& child: defs->children)
{
- if (SP_IS_MARKER(child)) {
- ml = g_slist_prepend (ml, child);
+ if (SP_IS_MARKER(&child)) {
+ ml = g_slist_prepend (ml, &child);
}
}
return ml;
diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp
index b66d97c1d..4a658c5dc 100644
--- a/src/widgets/stroke-style.cpp
+++ b/src/widgets/stroke-style.cpp
@@ -152,17 +152,9 @@ StrokeStyle::StrokeStyle() :
Gtk::HBox *f = new Gtk::HBox(false, 0);
f->show();
add(*f);
-
-#if WITH_GTKMM_3_0
table = new Gtk::Grid();
table->set_border_width(4);
table->set_row_spacing(4);
-#else
- table = new Gtk::Table(3, 6, false);
- table->set_border_width(4);
- table->set_row_spacings(4);
-#endif
-
table->show();
f->add(*table);
@@ -178,13 +170,7 @@ StrokeStyle::StrokeStyle() :
// stroke_width_set_unit will be removed (because ScalarUnit takes care of conversions itself), and
// with it, the two remaining calls of stroke_average_width, allowing us to get rid of that
// function in desktop-style.
-
-#if WITH_GTKMM_3_0
widthAdj = new Glib::RefPtr<Gtk::Adjustment>(Gtk::Adjustment::create(1.0, 0.0, 1000.0, 0.1, 10.0, 0.0));
-#else
- widthAdj = new Gtk::Adjustment(1.0, 0.0, 1000.0, 0.1, 10.0, 0.0);
-#endif
-
widthSpin = new Inkscape::UI::Widget::SpinButton(*widthAdj, 0.1, 3);
widthSpin->set_tooltip_text(_("Stroke width"));
widthSpin->show();
@@ -210,12 +196,7 @@ StrokeStyle::StrokeStyle() :
us->show();
hb->pack_start(*us, FALSE, FALSE, 0);
-
-#if WITH_GTKMM_3_0
(*widthAdj)->signal_value_changed().connect(sigc::mem_fun(*this, &StrokeStyle::widthChangedCB));
-#else
- widthAdj->signal_value_changed().connect(sigc::mem_fun(*this, &StrokeStyle::widthChangedCB));
-#endif
i++;
/* Dash */
@@ -227,16 +208,10 @@ StrokeStyle::StrokeStyle() :
dashSelector = Gtk::manage(new SPDashSelector);
dashSelector->show();
-
-#if WITH_GTKMM_3_0
dashSelector->set_hexpand();
dashSelector->set_halign(Gtk::ALIGN_FILL);
dashSelector->set_valign(Gtk::ALIGN_CENTER);
table->attach(*dashSelector, 1, i, 3, 1);
-#else
- table->attach(*dashSelector, 1, 4, i, i+1, (Gtk::EXPAND | Gtk::FILL), static_cast<Gtk::AttachOptions>(0), 0, 0);
-#endif
-
dashSelector->changed_signal.connect(sigc::mem_fun(*this, &StrokeStyle::lineDashChangedCB));
i++;
@@ -320,28 +295,14 @@ StrokeStyle::StrokeStyle() :
// miter limit is to cut off such spikes (i.e. convert them into bevels)
// when they become too long.
//spw_label(t, _("Miter _limit:"), 0, i);
-
-#if WITH_GTKMM_3_0
miterLimitAdj = new Glib::RefPtr<Gtk::Adjustment>(Gtk::Adjustment::create(4.0, 0.0, 100.0, 0.1, 10.0, 0.0));
miterLimitSpin = new Inkscape::UI::Widget::SpinButton(*miterLimitAdj, 0.1, 2);
-#else
- miterLimitAdj = new Gtk::Adjustment(4.0, 0.0, 100.0, 0.1, 10.0, 0.0);
- miterLimitSpin = new Inkscape::UI::Widget::SpinButton(*miterLimitAdj, 0.1, 2);
-#endif
-
miterLimitSpin->set_tooltip_text(_("Maximum length of the miter (in units of stroke width)"));
miterLimitSpin->show();
sp_dialog_defocus_on_enter_cpp(miterLimitSpin);
hb->pack_start(*miterLimitSpin, false, false, 0);
-
-#if WITH_GTKMM_3_0
(*miterLimitAdj)->signal_value_changed().connect(sigc::mem_fun(*this, &StrokeStyle::miterLimitChangedCB));
-
-#else
- miterLimitAdj->signal_value_changed().connect(sigc::mem_fun(*this, &StrokeStyle::miterLimitChangedCB));
-#endif
-
i++;
/* Cap type */
@@ -512,8 +473,8 @@ void StrokeStyle::markerSelectCB(MarkerComboBox *marker_combo, StrokeStyle *spw,
//spw->updateMarkerHist(which);
Inkscape::Selection *selection = spw->desktop->getSelection();
- std::vector<SPItem*> itemlist=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
+ auto itemlist= selection->items();
+ for(auto i=itemlist.begin();i!=itemlist.end();++i){
SPItem *item = *i;
if (!SP_IS_SHAPE(item) || SP_IS_RECT(item)) { // can't set marker to rect, until it's converted to using <path>
continue;
@@ -924,17 +885,9 @@ StrokeStyle::updateLine()
if (unit->type == Inkscape::Util::UNIT_TYPE_LINEAR) {
double avgwidth = Inkscape::Util::Quantity::convert(query.stroke_width.computed, "px", unit);
-#if WITH_GTKMM_3_0
(*widthAdj)->set_value(avgwidth);
-#else
- widthAdj->set_value(avgwidth);
-#endif
} else {
-#if WITH_GTKMM_3_0
(*widthAdj)->set_value(100);
-#else
- widthAdj->set_value(100);
-#endif
}
// if none of the selected objects has a stroke, than quite some controls should be disabled
@@ -955,11 +908,7 @@ StrokeStyle::updateLine()
}
if (result_ml != QUERY_STYLE_NOTHING)
-#if WITH_GTKMM_3_0
(*miterLimitAdj)->set_value(query.stroke_miterlimit.value); // TODO: reflect averagedness?
-#else
- miterLimitAdj->set_value(query.stroke_miterlimit.value); // TODO: reflect averagedness?
-#endif
if (result_join != QUERY_STYLE_MULTIPLE_DIFFERENT &&
result_join != QUERY_STYLE_NOTHING ) {
@@ -985,7 +934,7 @@ StrokeStyle::updateLine()
if (!sel || sel->isEmpty())
return;
- std::vector<SPItem*> const objects = sel->itemList();
+ std::vector<SPItem*> const objects(sel->items().begin(), sel->items().end());
SPObject * const object = objects[0];
SPStyle * const style = object->style;
@@ -1041,19 +990,14 @@ StrokeStyle::scaleLine()
SPDocument *document = desktop->getDocument();
Inkscape::Selection *selection = desktop->getSelection();
- std::vector<SPItem*> items=selection->itemList();
+ auto items= selection->items();
/* TODO: Create some standardized method */
SPCSSAttr *css = sp_repr_css_attr_new();
if (!items.empty()) {
-#if WITH_GTKMM_3_0
double width_typed = (*widthAdj)->get_value();
double const miterlimit = (*miterLimitAdj)->get_value();
-#else
- double width_typed = widthAdj->get_value();
- double const miterlimit = miterLimitAdj->get_value();
-#endif
Inkscape::Util::Unit const *const unit = unitSelector->getUnit();
@@ -1061,7 +1005,7 @@ StrokeStyle::scaleLine()
int ndash;
dashSelector->get_dash(&ndash, &dash, &offset);
- for(std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end();++i){
+ for(auto i=items.begin();i!=items.end();++i){
/* Set stroke width */
double width;
if (unit->type == Inkscape::Util::UNIT_TYPE_LINEAR) {
@@ -1093,11 +1037,7 @@ StrokeStyle::scaleLine()
if (unit->type != Inkscape::Util::UNIT_TYPE_LINEAR) {
// reset to 100 percent
-#if WITH_GTKMM_3_0
(*widthAdj)->set_value(100.0);
-#else
- widthAdj->set_value(100.0);
-#endif
}
}
diff --git a/src/widgets/stroke-style.h b/src/widgets/stroke-style.h
index d83067a4a..76582602d 100644
--- a/src/widgets/stroke-style.h
+++ b/src/widgets/stroke-style.h
@@ -23,12 +23,7 @@
#include "widgets/dash-selector.h"
#include <gtkmm/radiobutton.h>
-
-#if WITH_GTKMM_3_0
#include <gtkmm/grid.h>
-#else
-#include <gtkmm/table.h>
-#endif
#include <glibmm/i18n.h>
@@ -189,15 +184,9 @@ private:
MarkerComboBox *startMarkerCombo;
MarkerComboBox *midMarkerCombo;
MarkerComboBox *endMarkerCombo;
-#if WITH_GTKMM_3_0
Gtk::Grid *table;
Glib::RefPtr<Gtk::Adjustment> *widthAdj;
Glib::RefPtr<Gtk::Adjustment> *miterLimitAdj;
-#else
- Gtk::Table *table;
- Gtk::Adjustment *widthAdj;
- Gtk::Adjustment *miterLimitAdj;
-#endif
Inkscape::UI::Widget::SpinButton *miterLimitSpin;
Inkscape::UI::Widget::SpinButton *widthSpin;
Inkscape::UI::Widget::UnitMenu *unitSelector;
diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp
index 3fa240a05..0160bcac7 100644
--- a/src/widgets/text-toolbar.cpp
+++ b/src/widgets/text-toolbar.cpp
@@ -38,7 +38,8 @@
#include "document.h"
#include "widgets/ege-adjustment-action.h"
#include "widgets/ege-select-one-action.h"
-#include "widgets/ink-action.h"
+#include "ink-radio-action.h"
+#include "ink-toggle-action.h"
#include "widgets/ink-comboboxentry-action.h"
#include "inkscape.h"
#include "selection-chemistry.h"
@@ -373,8 +374,8 @@ static void sp_text_align_mode_changed( EgeSelectOneAction *act, GObject *tbl )
// move the x of all texts to preserve the same bbox
Inkscape::Selection *selection = desktop->getSelection();
- std::vector<SPItem*> itemlist=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end(); ++i){
+ auto itemlist= selection->items();
+ for(auto i=itemlist.begin();i!=itemlist.end(); ++i){
if (SP_IS_TEXT(*i)) {
SPItem *item = *i;
@@ -555,8 +556,8 @@ static void sp_text_lineheight_value_changed( GtkAdjustment *adj, GObject *tbl )
// Only need to save for undo if a text item has been changed.
Inkscape::Selection *selection = desktop->getSelection();
bool modmade = false;
- std::vector<SPItem*> itemlist=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end(); ++i){
+ auto itemlist= selection->items();
+ for(auto i=itemlist.begin();i!=itemlist.end(); ++i){
if (SP_IS_TEXT (*i)) {
modmade = true;
}
@@ -620,7 +621,7 @@ static void sp_text_lineheight_unit_changed( gpointer /* */, GObject *tbl )
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
Inkscape::Selection *selection = desktop->getSelection();
- std::vector<SPItem*> itemlist=selection->itemList();
+ auto itemlist = selection->items();
// Convert between units
if ((unit->abbr == "" || unit->abbr == "em") && old_unit == SP_CSS_UNIT_EX) {
@@ -639,7 +640,7 @@ static void sp_text_lineheight_unit_changed( gpointer /* */, GObject *tbl )
// Convert absolute to relative... for the moment use average font-size
double font_size = 0;
int count = 0;
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end(); ++i){
+ for(auto i=itemlist.begin();i!=itemlist.end(); ++i){
if (SP_IS_TEXT (*i)) {
double doc_scale = Geom::Affine((*i)->i2dt_affine()).descrim();
font_size += (*i)->style->font_size.computed * doc_scale;
@@ -668,7 +669,7 @@ static void sp_text_lineheight_unit_changed( gpointer /* */, GObject *tbl )
// Convert relative to absolute... for the moment use average font-size
double font_size = 0;
int count = 0;
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end(); ++i){
+ for(auto i=itemlist.begin();i!=itemlist.end(); ++i){
if (SP_IS_TEXT (*i)) {
double doc_scale = Geom::Affine((*i)->i2dt_affine()).descrim();
font_size += (*i)->style->font_size.computed * doc_scale;
@@ -711,7 +712,7 @@ static void sp_text_lineheight_unit_changed( gpointer /* */, GObject *tbl )
// Only need to save for undo if a text item has been changed.
bool modmade = false;
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end(); ++i){
+ for(auto i=itemlist.begin();i!=itemlist.end(); ++i){
if (SP_IS_TEXT (*i)) {
modmade = true;
}
@@ -1115,8 +1116,8 @@ static void sp_text_toolbox_selection_changed(Inkscape::Selection */*selection*/
// Only flowed text can be justified, only normal text can be kerned...
// Find out if we have flowed text now so we can use it several places
gboolean isFlow = false;
- std::vector<SPItem*> itemlist=SP_ACTIVE_DESKTOP->getSelection()->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end(); ++i){
+ auto itemlist= SP_ACTIVE_DESKTOP->getSelection()->items();
+ for(auto i=itemlist.begin();i!=itemlist.end(); ++i){
// const gchar* id = reinterpret_cast<SPItem *>(items->data)->getId();
// std::cout << " " << id << std::endl;
if( SP_IS_FLOWTEXT(*i)) {
@@ -1557,8 +1558,7 @@ void sp_text_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje
g_object_set_data( holder, "TextFontFamilyAction", act );
// Change style of drop-down from menu to list
-#if GTK_CHECK_VERSION(3,0,0)
- GtkCssProvider *css_provider = gtk_css_provider_new();
+ auto css_provider = gtk_css_provider_new();
gtk_css_provider_load_from_data(css_provider,
"#TextFontFamilyAction_combobox {\n"
" -GtkComboBox-appears-as-list: true;\n"
@@ -1569,24 +1569,10 @@ void sp_text_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje
"}\n",
-1, NULL);
- GdkScreen *screen = gdk_screen_get_default();
+ auto screen = gdk_screen_get_default();
gtk_style_context_add_provider_for_screen(screen,
GTK_STYLE_PROVIDER(css_provider),
GTK_STYLE_PROVIDER_PRIORITY_USER);
-#else
- gtk_rc_parse_string (
- "style \"dropdown-as-list-style\"\n"
- "{\n"
- " GtkComboBox::appears-as-list = 1\n"
- "}\n"
- "widget \"*.TextFontFamilyAction_combobox\" style \"dropdown-as-list-style\""
- "style \"fontfamily-separator-style\"\n"
- "{\n"
- " GtkWidget::wide-separators = 1\n"
- " GtkWidget::separator-height = 6\n"
- "}\n"
- "widget \"*gtk-combobox-popup-window.GtkScrolledWindow.GtkTreeView\" style \"fontfamily-separator-style\"");
-#endif
}
/* Font size */
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp
index 1e67cca8f..f74be4b15 100644
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -43,6 +43,7 @@
#include "../helper/action.h"
#include "icon.h"
#include "ink-action.h"
+#include "ink-toggle-action.h"
#include "../inkscape.h"
#include "ui/interface.h"
#include "../shortcuts.h"
@@ -1009,26 +1010,18 @@ static GtkWidget* toolboxNewCommon( GtkWidget* tb, BarId id, GtkPositionType /*h
GtkWidget *ToolboxFactory::createToolToolbox()
{
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *tb = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
+ auto tb = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_set_name(tb, "ToolToolbox");
gtk_box_set_homogeneous(GTK_BOX(tb), FALSE);
-#else
- GtkWidget *tb = gtk_vbox_new(FALSE, 0);
-#endif
return toolboxNewCommon( tb, BAR_TOOL, GTK_POS_TOP );
}
GtkWidget *ToolboxFactory::createAuxToolbox()
{
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *tb = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
+ auto tb = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_set_name(tb, "AuxToolbox");
gtk_box_set_homogeneous(GTK_BOX(tb), FALSE);
-#else
- GtkWidget *tb = gtk_vbox_new(FALSE, 0);
-#endif
return toolboxNewCommon( tb, BAR_AUX, GTK_POS_LEFT );
}
@@ -1039,38 +1032,26 @@ GtkWidget *ToolboxFactory::createAuxToolbox()
GtkWidget *ToolboxFactory::createCommandsToolbox()
{
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *tb = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
+ auto tb = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_set_name(tb, "CommandsToolbox");
gtk_box_set_homogeneous(GTK_BOX(tb), FALSE);
-#else
- GtkWidget *tb = gtk_vbox_new(FALSE, 0);
-#endif
return toolboxNewCommon( tb, BAR_COMMANDS, GTK_POS_LEFT );
}
GtkWidget *ToolboxFactory::createSnapToolbox()
{
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget *tb = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
+ auto tb = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_set_name(tb, "SnapToolbox");
gtk_box_set_homogeneous(GTK_BOX(tb), FALSE);
-#else
- GtkWidget *tb = gtk_vbox_new(FALSE, 0);
-#endif
return toolboxNewCommon( tb, BAR_SNAP, GTK_POS_LEFT );
}
static GtkWidget* createCustomSlider( GtkAdjustment *adjustment, gdouble climbRate, guint digits, Inkscape::UI::Widget::UnitTracker *unit_tracker)
{
-#if WITH_GTKMM_3_0
- Glib::RefPtr<Gtk::Adjustment> adj = Glib::wrap(adjustment, true);
- Inkscape::UI::Widget::SpinButton *inkSpinner = new Inkscape::UI::Widget::SpinButton(adj, climbRate, digits);
-#else
- Inkscape::UI::Widget::SpinButton *inkSpinner = new Inkscape::UI::Widget::SpinButton(*Glib::wrap(adjustment, true), climbRate, digits);
-#endif
+ auto adj = Glib::wrap(adjustment, true);
+ auto inkSpinner = new Inkscape::UI::Widget::SpinButton(adj, climbRate, digits);
inkSpinner->addUnitTracker(unit_tracker);
inkSpinner = Gtk::manage( inkSpinner );
GtkWidget *widget = GTK_WIDGET( inkSpinner->gobj() );
@@ -1432,17 +1413,10 @@ void setup_aux_toolbox(GtkWidget *toolbox, SPDesktop *desktop)
if ( aux_toolboxes[i].prep_func ) {
// converted to GtkActions and UIManager
- GtkWidget* kludge = dataHolders[aux_toolboxes[i].type_name];
-
-#if GTK_CHECK_VERSION(3,0,0)
- GtkWidget* holder = gtk_grid_new();
+ auto kludge = dataHolders[aux_toolboxes[i].type_name];
+ auto holder = gtk_grid_new();
gtk_widget_set_name( holder, "ToolbarHolder" );
gtk_grid_attach( GTK_GRID(holder), kludge, 2, 0, 1, 1);
-#else
- GtkWidget* holder = gtk_table_new( 1, 3, FALSE );
- gtk_table_attach( GTK_TABLE(holder), kludge, 2, 3, 0, 1, GTK_SHRINK, GTK_SHRINK, 0, 0 );
-#endif
-
gchar* tmp = g_strdup_printf( "/ui/%s", aux_toolboxes[i].ui_name );
GtkWidget* toolBar = gtk_ui_manager_get_widget( mgr, tmp );
g_free( tmp );
@@ -1454,30 +1428,20 @@ void setup_aux_toolbox(GtkWidget *toolbox, SPDesktop *desktop)
Inkscape::IconSize toolboxSize = ToolboxFactory::prefToSize("/toolbox/small");
gtk_toolbar_set_icon_size( GTK_TOOLBAR(toolBar), static_cast<GtkIconSize>(toolboxSize) );
-
-#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_hexpand(toolBar, TRUE);
gtk_grid_attach( GTK_GRID(holder), toolBar, 0, 0, 1, 1);
-#else
- gtk_table_attach( GTK_TABLE(holder), toolBar, 0, 1, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0 );
-#endif
if ( aux_toolboxes[i].swatch_verb_id != SP_VERB_INVALID ) {
Inkscape::UI::Widget::StyleSwatch *swatch = new Inkscape::UI::Widget::StyleSwatch( NULL, _(aux_toolboxes[i].swatch_tip) );
swatch->setDesktop( desktop );
swatch->setClickVerb( aux_toolboxes[i].swatch_verb_id );
swatch->setWatchedTool( aux_toolboxes[i].swatch_tool, true );
- GtkWidget *swatch_ = GTK_WIDGET( swatch->gobj() );
-
-#if GTK_CHECK_VERSION(3,0,0)
+ auto swatch_ = GTK_WIDGET( swatch->gobj() );
gtk_widget_set_margin_left(swatch_, AUX_BETWEEN_BUTTON_GROUPS);
gtk_widget_set_margin_right(swatch_, AUX_BETWEEN_BUTTON_GROUPS);
gtk_widget_set_margin_top(swatch_, AUX_SPACING);
gtk_widget_set_margin_bottom(swatch_, AUX_SPACING);
gtk_grid_attach( GTK_GRID(holder), swatch_, 1, 0, 1, 1);
-#else
- gtk_table_attach( GTK_TABLE(holder), swatch_, 1, 2, 0, 1, (GtkAttachOptions)(GTK_SHRINK | GTK_FILL), (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), AUX_BETWEEN_BUTTON_GROUPS, AUX_SPACING );
-#endif
}
if(i==0){
gtk_widget_show_all( holder );
diff --git a/src/widgets/tweak-toolbar.cpp b/src/widgets/tweak-toolbar.cpp
index 9a021082c..a6b8ba436 100644
--- a/src/widgets/tweak-toolbar.cpp
+++ b/src/widgets/tweak-toolbar.cpp
@@ -36,7 +36,8 @@
#include "widgets/ege-adjustment-action.h"
#include "widgets/ege-output-action.h"
#include "widgets/ege-select-one-action.h"
-#include "widgets/ink-action.h"
+#include "ink-radio-action.h"
+#include "ink-toggle-action.h"
#include "toolbox.h"
#include "ui/icon-names.h"
#include "ui/tools/tweak-tool.h"
diff --git a/src/xml/Makefile_insert b/src/xml/Makefile_insert
deleted file mode 100644
index da55d7f7e..000000000
--- a/src/xml/Makefile_insert
+++ /dev/null
@@ -1,51 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-ink_common_sources += \
- xml/comment-node.h \
- xml/composite-node-observer.cpp xml/composite-node-observer.h \
- xml/element-node.h \
- xml/helper-observer.cpp \
- xml/helper-observer.h \
- xml/node-observer.h \
- xml/quote.cpp \
- xml/quote.h \
- xml/repr-css.cpp \
- xml/log-builder.cpp \
- xml/log-builder.h \
- xml/node-fns.cpp \
- xml/node-fns.h \
- xml/pi-node.h \
- xml/rebase-hrefs.cpp \
- xml/rebase-hrefs.h \
- xml/repr-io.cpp \
- xml/repr-sorting.cpp \
- xml/repr-sorting.h \
- xml/repr-util.cpp \
- xml/repr.cpp \
- xml/repr.h \
- xml/simple-document.h \
- xml/simple-document.cpp \
- xml/simple-node.h \
- xml/simple-node.cpp \
- xml/node.h \
- xml/croco-node-iface.cpp \
- xml/croco-node-iface.h \
- xml/attribute-record.h \
- xml/sp-css-attr.h \
- xml/event.cpp xml/event.h xml/event-fns.h \
- xml/document.h \
- xml/node-event-vector.h \
- xml/node-iterators.h \
- xml/sp-css-attr.h \
- xml/subtree.cpp \
- xml/subtree.h \
- xml/text-node.h \
- xml/invalid-operation-exception.h
-
-# ######################
-# ### CxxTest stuff ####
-# ######################
-CXXTEST_TESTSUITES += \
- $(srcdir)/xml/rebase-hrefs-test.h \
- $(srcdir)/xml/repr-action-test.h \
- $(srcdir)/xml/quote-test.h
diff --git a/testfiles/CMakeLists.txt b/testfiles/CMakeLists.txt
index ad022d21e..3de607894 100644
--- a/testfiles/CMakeLists.txt
+++ b/testfiles/CMakeLists.txt
@@ -11,40 +11,21 @@ set_source_files_properties(
${CMAKE_BINARY_DIR}/src/inkscape-version.cpp
PROPERTIES GENERATED TRUE)
-# include_directories(${CMAKE_CURRENT_BINARY_DIR}/__/src)
include_directories(${CMAKE_BINARY_DIR}/src)
-add_executable(unittest
- unittest.cpp
- doc-per-case-test.cpp
- src/attributes-test.cpp
- src/color-profile-test.cpp
- src/dir-util-test.cpp
-)
-
-target_link_libraries(unittest inkscape_base)
-
-add_dependencies(unittest inkscape_version)
+set(TEST_SOURCES
+ attributes-test
+ color-profile-test
+ dir-util-test
+ sp-object-test
+ object-set-test)
-set (_optional_unittest_libs )
-
-if (NOT "${WITH_EXT_GDL}")
- list (APPEND _optional_unittest_libs "gdl_LIB")
-endif()
-
-target_link_libraries(unittest
+set(TEST_LIBS
gmock_main
-
- # order from automake
- #sp_LIB
-
- #inkscape_LIB
- #sp_LIB # annoying, we need both!
- nrtype_LIB # annoying, we need both!
-
+ inkscape_base
+ nrtype_LIB
croco_LIB
avoid_LIB
- ${_optional_unittest_libs}
cola_LIB
vpsc_LIB
livarot_LIB
@@ -53,12 +34,13 @@ target_link_libraries(unittest
depixelize_LIB
util_LIB
gc_LIB
-
${INKSCAPE_LIBS}
)
-
-add_test(BaseTest ${EXECUTABLE_OUTPUT_PATH}/unittest)
-add_dependencies(check unittest)
-
-#
+foreach(source ${TEST_SOURCES})
+ add_executable(${source} src/${source}.cpp unittest.cpp doc-per-case-test.cpp)
+ target_link_libraries(${source} ${TEST_LIBS})
+ add_test(NAME ${source} COMMAND ${EXECUTABLE_OUTPUT_PATH}/${source})
+ add_dependencies(${source} inkscape_version)
+ add_dependencies(check ${source})
+endforeach() \ No newline at end of file
diff --git a/testfiles/src/object-set-test.cpp b/testfiles/src/object-set-test.cpp
new file mode 100644
index 000000000..79a49488a
--- /dev/null
+++ b/testfiles/src/object-set-test.cpp
@@ -0,0 +1,321 @@
+/*
+ * Multiindex container for selection
+ *
+ * Authors:
+ * Adrian Boguszewski
+ *
+ * Copyright (C) 2016 Adrian Boguszewski
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+#include <gtest/gtest.h>
+#include <doc-per-case-test.h>
+#include <src/sp-factory.h>
+#include <src/sp-rect.h>
+#include <src/object-set.h>
+#include <xml/node.h>
+#include <src/xml/text-node.h>
+#include <src/xml/simple-document.h>
+
+using namespace Inkscape;
+using namespace Inkscape::XML;
+
+class ObjectSetTest: public DocPerCaseTest {
+public:
+ ObjectSetTest() {
+ A = new SPObject();
+ B = new SPObject();
+ C = new SPObject();
+ D = new SPObject();
+ E = new SPObject();
+ F = new SPObject();
+ G = new SPObject();
+ H = new SPObject();
+ X = new SPObject();
+ set = new ObjectSet();
+ set2 = new ObjectSet();
+ auto sd = new SimpleDocument();
+ auto xt = new TextNode(Util::share_string("x"), sd);
+ auto ht = new TextNode(Util::share_string("h"), sd);
+ auto gt = new TextNode(Util::share_string("g"), sd);
+ auto ft = new TextNode(Util::share_string("f"), sd);
+ auto et = new TextNode(Util::share_string("e"), sd);
+ auto dt = new TextNode(Util::share_string("d"), sd);
+ auto ct = new TextNode(Util::share_string("c"), sd);
+ auto bt = new TextNode(Util::share_string("b"), sd);
+ auto at = new TextNode(Util::share_string("a"), sd);
+ X->invoke_build(_doc, xt, 0);
+ H->invoke_build(_doc, ht, 0);
+ G->invoke_build(_doc, gt, 0);
+ F->invoke_build(_doc, ft, 0);
+ E->invoke_build(_doc, et, 0);
+ D->invoke_build(_doc, dt, 0);
+ C->invoke_build(_doc, ct, 0);
+ B->invoke_build(_doc, bt, 0);
+ A->invoke_build(_doc, at, 0);
+ }
+ ~ObjectSetTest() {
+ delete set;
+ delete set2;
+ delete X;
+ delete H;
+ delete G;
+ delete F;
+ delete E;
+ delete D;
+ delete C;
+ delete B;
+ delete A;
+ }
+ SPObject* A;
+ SPObject* B;
+ SPObject* C;
+ SPObject* D;
+ SPObject* E;
+ SPObject* F;
+ SPObject* G;
+ SPObject* H;
+ SPObject* X;
+ ObjectSet* set;
+ ObjectSet* set2;
+};
+
+TEST_F(ObjectSetTest, Basics) {
+ EXPECT_EQ(0, set->size());
+ set->add(A);
+ EXPECT_EQ(1, set->size());
+ EXPECT_TRUE(set->includes(A));
+ set->add(B);
+ set->add(C);
+ EXPECT_EQ(3, set->size());
+ EXPECT_TRUE(set->includes(B));
+ EXPECT_TRUE(set->includes(C));
+ EXPECT_FALSE(set->includes(D));
+ EXPECT_FALSE(set->includes(X));
+ EXPECT_FALSE(set->includes(nullptr));
+ set->remove(A);
+ EXPECT_EQ(2, set->size());
+ EXPECT_FALSE(set->includes(A));
+ set->clear();
+ EXPECT_EQ(0, set->size());
+ bool resultNull = set->add(nullptr);
+ EXPECT_FALSE(resultNull);
+ EXPECT_EQ(0, set->size());
+ bool resultNull2 = set->remove(nullptr);
+ EXPECT_FALSE(resultNull2);
+}
+
+TEST_F(ObjectSetTest, Advanced) {
+ set->add(A);
+ set->add(B);
+ set->add(C);
+ EXPECT_TRUE(set->includes(C));
+ set->toggle(C);
+ EXPECT_EQ(2, set->size());
+ EXPECT_FALSE(set->includes(C));
+ set->toggle(D);
+ EXPECT_EQ(3, set->size());
+ EXPECT_TRUE(set->includes(D));
+ set->toggle(D);
+ EXPECT_EQ(2, set->size());
+ EXPECT_FALSE(set->includes(D));
+ EXPECT_EQ(nullptr, set->single());
+ set->set(X);
+ EXPECT_EQ(1, set->size());
+ EXPECT_TRUE(set->includes(X));
+ EXPECT_EQ(X, set->single());
+ EXPECT_FALSE(set->isEmpty());
+ set->clear();
+ EXPECT_TRUE(set->isEmpty());
+ std::vector<SPObject*> list1 {A, B, C, D};
+ std::vector<SPObject*> list2 {E, F};
+ set->addList(list1);
+ EXPECT_EQ(4, set->size());
+ set->addList(list2);
+ EXPECT_EQ(6, set->size());
+ EXPECT_TRUE(set->includes(A));
+ EXPECT_TRUE(set->includes(B));
+ EXPECT_TRUE(set->includes(C));
+ EXPECT_TRUE(set->includes(D));
+ EXPECT_TRUE(set->includes(E));
+ EXPECT_TRUE(set->includes(F));
+ set->setList(list2);
+ EXPECT_EQ(2, set->size());
+ EXPECT_TRUE(set->includes(E));
+ EXPECT_TRUE(set->includes(F));
+}
+
+TEST_F(ObjectSetTest, Items) {
+ // cannot test smallestItem and largestItem functions due to too many dependencies
+ // uncomment if the problem is fixed
+ SPRect* rect10x100 = (SPRect *) SPFactory::createObject("svg:rect");
+// rect10x100->invoke_build(_doc, _doc->rroot, 1);
+ SPRect* rect20x40 = (SPRect *) SPFactory::createObject("svg:rect");
+// rect20x40->invoke_build(_doc, _doc->rroot, 1);
+// SPRect* rect30x30 = (SPRect *) SPFactory::createObject("svg:rect");
+// rect30x30->invoke_build(_doc, _doc->rroot, 1);
+// rect10x100->width = 10;
+// rect10x100->height = 100;
+// rect20x40->width = 20;
+// rect20x40->height = 40;
+// rect30x30->width = 30;
+// rect30x30->height = 30;
+ set->add(rect10x100);
+ EXPECT_EQ(rect10x100, set->singleItem());
+ EXPECT_EQ(rect10x100->getRepr(), set->singleRepr());
+ set->add(rect20x40);
+ EXPECT_EQ(nullptr, set->singleItem());
+ EXPECT_EQ(nullptr, set->singleRepr());
+// set->add(rect30x30);
+// EXPECT_EQ(3, set->size());
+// EXPECT_EQ(rect10x100, set->smallestItem(ObjectSet::CompareSize::HORIZONTAL));
+// EXPECT_EQ(rect30x30, set->smallestItem(ObjectSet::CompareSize::VERTICAL));
+// EXPECT_EQ(rect20x40, set->smallestItem(ObjectSet::CompareSize::AREA));
+// EXPECT_EQ(rect30x30, set->largestItem(ObjectSet::CompareSize::HORIZONTAL));
+// EXPECT_EQ(rect10x100, set->largestItem(ObjectSet::CompareSize::VERTICAL));
+// EXPECT_EQ(rect10x100, set->largestItem(ObjectSet::CompareSize::AREA));
+}
+
+TEST_F(ObjectSetTest, Ranges) {
+ std::vector<SPObject*> objs {A, D, B, E, C, F};
+ set->add(objs.begin() + 1, objs.end() - 1);
+ EXPECT_EQ(4, set->size());
+ auto it = set->objects().begin();
+ EXPECT_EQ(D, *it++);
+ EXPECT_EQ(B, *it++);
+ EXPECT_EQ(E, *it++);
+ EXPECT_EQ(C, *it++);
+ EXPECT_EQ(set->objects().end(), it);
+ SPObject* rect1 = SPFactory::createObject("svg:rect");
+ SPObject* rect2 = SPFactory::createObject("svg:rect");
+ SPObject* rect3 = SPFactory::createObject("svg:rect");
+ set->add(rect1);
+ set->add(rect2);
+ set->add(rect3);
+ EXPECT_EQ(7, set->size());
+ auto xmlNode = set->xmlNodes().begin();
+ EXPECT_EQ(3, boost::distance(set->xmlNodes()));
+ EXPECT_EQ(rect1->getRepr(), *xmlNode++);
+ EXPECT_EQ(rect2->getRepr(), *xmlNode++);
+ EXPECT_EQ(rect3->getRepr(), *xmlNode++);
+ EXPECT_EQ(set->xmlNodes().end(), xmlNode);
+ auto item = set->items().begin();
+ EXPECT_EQ(3, boost::distance(set->items()));
+ EXPECT_EQ(rect1, *item++);
+ EXPECT_EQ(rect2, *item++);
+ EXPECT_EQ(rect3, *item++);
+ EXPECT_EQ(set->items().end(), item);
+}
+
+TEST_F(ObjectSetTest, Autoremoving) {
+ set->add(A);
+ EXPECT_TRUE(set->includes(A));
+ EXPECT_EQ(1, set->size());
+ A->releaseReferences();
+ EXPECT_EQ(0, set->size());
+}
+
+TEST_F(ObjectSetTest, BasicDescendants) {
+ A->attach(B, nullptr);
+ B->attach(C, nullptr);
+ A->attach(D, nullptr);
+ bool resultB = set->add(B);
+ bool resultB2 = set->add(B);
+ EXPECT_TRUE(resultB);
+ EXPECT_FALSE(resultB2);
+ EXPECT_TRUE(set->includes(B));
+ bool resultC = set->add(C);
+ EXPECT_FALSE(resultC);
+ EXPECT_FALSE(set->includes(C));
+ EXPECT_EQ(1, set->size());
+ bool resultA = set->add(A);
+ EXPECT_TRUE(resultA);
+ EXPECT_EQ(1, set->size());
+ EXPECT_TRUE(set->includes(A));
+ EXPECT_FALSE(set->includes(B));
+}
+
+TEST_F(ObjectSetTest, AdvancedDescendants) {
+ A->attach(B, nullptr);
+ A->attach(C, nullptr);
+ A->attach(X, nullptr);
+ B->attach(D, nullptr);
+ B->attach(E, nullptr);
+ C->attach(F, nullptr);
+ C->attach(G, nullptr);
+ C->attach(H, nullptr);
+ set->add(A);
+ bool resultF = set->remove(F);
+ EXPECT_TRUE(resultF);
+ EXPECT_EQ(4, set->size());
+ EXPECT_FALSE(set->includes(F));
+ EXPECT_TRUE(set->includes(B));
+ EXPECT_TRUE(set->includes(G));
+ EXPECT_TRUE(set->includes(H));
+ EXPECT_TRUE(set->includes(X));
+ bool resultF2 = set->add(F);
+ EXPECT_TRUE(resultF2);
+ EXPECT_EQ(5, set->size());
+ EXPECT_TRUE(set->includes(F));
+}
+
+TEST_F(ObjectSetTest, Removing) {
+ A->attach(B, nullptr);
+ A->attach(C, nullptr);
+ A->attach(X, nullptr);
+ B->attach(D, nullptr);
+ B->attach(E, nullptr);
+ C->attach(F, nullptr);
+ C->attach(G, nullptr);
+ C->attach(H, nullptr);
+ bool removeH = set->remove(H);
+ EXPECT_FALSE(removeH);
+ set->add(A);
+ bool removeX = set->remove(X);
+ EXPECT_TRUE(removeX);
+ EXPECT_EQ(2, set->size());
+ EXPECT_TRUE(set->includes(B));
+ EXPECT_TRUE(set->includes(C));
+ EXPECT_FALSE(set->includes(X));
+ EXPECT_FALSE(set->includes(A));
+ bool removeX2 = set->remove(X);
+ EXPECT_FALSE(removeX2);
+ EXPECT_EQ(2, set->size());
+ bool removeA = set->remove(A);
+ EXPECT_FALSE(removeA);
+ EXPECT_EQ(2, set->size());
+ bool removeC = set->remove(C);
+ EXPECT_TRUE(removeC);
+ EXPECT_EQ(1, set->size());
+ EXPECT_TRUE(set->includes(B));
+ EXPECT_FALSE(set->includes(C));
+}
+
+TEST_F(ObjectSetTest, TwoSets) {
+ A->attach(B, nullptr);
+ A->attach(C, nullptr);
+ set->add(A);
+ set2->add(A);
+ EXPECT_EQ(1, set->size());
+ EXPECT_EQ(1, set2->size());
+ set->remove(B);
+ EXPECT_EQ(1, set->size());
+ EXPECT_TRUE(set->includes(C));
+ EXPECT_EQ(1, set2->size());
+ EXPECT_TRUE(set2->includes(A));
+ C->releaseReferences();
+ EXPECT_EQ(0, set->size());
+ EXPECT_EQ(1, set2->size());
+ EXPECT_TRUE(set2->includes(A));
+}
+
+TEST_F(ObjectSetTest, SetRemoving) {
+ ObjectSet *objectSet = new ObjectSet();
+ A->attach(B, nullptr);
+ objectSet->add(A);
+ objectSet->add(C);
+ EXPECT_EQ(2, objectSet->size());
+ delete objectSet;
+ EXPECT_STREQ(nullptr, A->getId());
+ EXPECT_STREQ(nullptr, C->getId());
+}
diff --git a/testfiles/src/sp-object-test.cpp b/testfiles/src/sp-object-test.cpp
new file mode 100644
index 000000000..df811647f
--- /dev/null
+++ b/testfiles/src/sp-object-test.cpp
@@ -0,0 +1,120 @@
+/*
+ * Multiindex container for selection
+ *
+ * Authors:
+ * Adrian Boguszewski
+ *
+ * Copyright (C) 2016 Adrian Boguszewski
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+#include <gtest/gtest.h>
+#include <src/sp-object.h>
+#include <src/sp-item.h>
+#include <src/xml/node.h>
+#include <src/xml/text-node.h>
+#include <doc-per-case-test.h>
+#include <src/xml/simple-document.h>
+
+using namespace Inkscape;
+using namespace Inkscape::XML;
+
+class SPObjectTest: public DocPerCaseTest {
+public:
+ SPObjectTest() {
+ a = new SPItem();
+ b = new SPItem();
+ c = new SPItem();
+ d = new SPItem();
+ e = new SPItem();
+ auto sd = new SimpleDocument();
+ auto et = new TextNode(Util::share_string("e"), sd);
+ auto dt = new TextNode(Util::share_string("d"), sd);
+ auto ct = new TextNode(Util::share_string("c"), sd);
+ auto bt = new TextNode(Util::share_string("b"), sd);
+ auto at = new TextNode(Util::share_string("a"), sd);
+ e->invoke_build(_doc, et, 0);
+ d->invoke_build(_doc, dt, 0);
+ c->invoke_build(_doc, ct, 0);
+ b->invoke_build(_doc, bt, 0);
+ a->invoke_build(_doc, at, 0);
+ }
+ ~SPObjectTest() {
+ delete e;
+ delete d;
+ delete c;
+ delete b;
+ delete a;
+ }
+ SPObject* a;
+ SPObject* b;
+ SPObject* c;
+ SPObject* d;
+ SPObject* e;
+};
+
+TEST_F(SPObjectTest, Basics) {
+ a->attach(c, a->lastChild());
+ a->attach(b, nullptr);
+ a->attach(d, c);
+ EXPECT_TRUE(a->hasChildren());
+ EXPECT_EQ(b, a->firstChild());
+ EXPECT_EQ(d, a->lastChild());
+ auto children = a->childList(false);
+ EXPECT_EQ(3, children.size());
+ EXPECT_EQ(b, children[0]);
+ EXPECT_EQ(c, children[1]);
+ EXPECT_EQ(d, children[2]);
+ a->attach(b, a->lastChild());
+ EXPECT_EQ(3, a->children.size());
+ a->reorder(b, b);
+ EXPECT_EQ(3, a->children.size());
+ EXPECT_EQ(b, &a->children.front());
+ EXPECT_EQ(d, &a->children.back());
+ a->reorder(b, d);
+ EXPECT_EQ(3, a->children.size());
+ EXPECT_EQ(c, &a->children.front());
+ EXPECT_EQ(b, &a->children.back());
+ a->reorder(d, nullptr);
+ EXPECT_EQ(3, a->children.size());
+ EXPECT_EQ(d, &a->children.front());
+ EXPECT_EQ(b, &a->children.back());
+ a->reorder(c, b);
+ EXPECT_EQ(3, a->children.size());
+ EXPECT_EQ(d, &a->children.front());
+ EXPECT_EQ(c, &a->children.back());
+ a->detach(b);
+ EXPECT_EQ(c, a->lastChild());
+ children = a->childList(false);
+ EXPECT_EQ(2, children.size());
+ EXPECT_EQ(d, children[0]);
+ EXPECT_EQ(c, children[1]);
+ a->detach(b);
+ EXPECT_EQ(2, a->childList(false).size());
+ a->releaseReferences();
+ EXPECT_FALSE(a->hasChildren());
+ EXPECT_EQ(nullptr, a->firstChild());
+ EXPECT_EQ(nullptr, a->lastChild());
+}
+
+TEST_F(SPObjectTest, Advanced) {
+ a->attach(b, a->lastChild());
+ a->attach(c, a->lastChild());
+ a->attach(d, a->lastChild());
+ a->attach(e, a->lastChild());
+ EXPECT_EQ(e, a->get_child_by_repr(e->getRepr()));
+ EXPECT_EQ(c, a->get_child_by_repr(c->getRepr()));
+ EXPECT_EQ(d, e->getPrev());
+ EXPECT_EQ(c, d->getPrev());
+ EXPECT_EQ(b, c->getPrev());
+ EXPECT_EQ(nullptr, b->getPrev());
+ EXPECT_EQ(nullptr, e->getNext());
+ EXPECT_EQ(e, d->getNext());
+ EXPECT_EQ(d, c->getNext());
+ EXPECT_EQ(c, b->getNext());
+ std::vector<SPObject*> tmp = {b, c, d, e};
+ int index = 0;
+ for(auto& child: a->children) {
+ EXPECT_EQ(tmp[index++], &child);
+ }
+}
diff --git a/testfiles/unittest.cpp b/testfiles/unittest.cpp
index 79e240e06..1e6d1ff3a 100644
--- a/testfiles/unittest.cpp
+++ b/testfiles/unittest.cpp
@@ -16,19 +16,6 @@
#include "inkgc/gc-core.h"
#include "inkscape.h"
-namespace {
-
-// Ensure that a known positive test works
-TEST(PreTest, WorldIsSane)
-{
- EXPECT_EQ(4, 2 + 2);
-}
-
-// Example of type casting to avoid compile warnings.
-
-
-} // namespace
-
int main(int argc, char **argv) {
// setup general environment